2020-10-07 14:22:26 +02:00
|
|
|
/*
|
2023-01-20 17:45:04 +00:00
|
|
|
* Copyright (C) 2020-2023 Intel Corporation
|
2020-10-07 14:22:26 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2023-01-20 17:45:04 +00:00
|
|
|
#include "shared/source/command_container/encode_surface_state.h"
|
2022-06-29 19:17:47 +00:00
|
|
|
#include "shared/source/gen11/hw_cmds.h"
|
2020-11-16 17:12:08 +00:00
|
|
|
#include "shared/source/helpers/blit_commands_helper.h"
|
2023-07-18 11:48:29 +00:00
|
|
|
#include "shared/test/common/mocks/mock_device.h"
|
2022-06-29 19:17:47 +00:00
|
|
|
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
|
|
|
|
#include "shared/test/common/test_macros/test.h"
|
2020-10-07 14:22:26 +02:00
|
|
|
|
|
|
|
|
using namespace NEO;
|
|
|
|
|
|
|
|
|
|
using Gen11CommandEncodeTest = testing::Test;
|
|
|
|
|
GEN11TEST_F(Gen11CommandEncodeTest, givenGen11PlatformWhenDoBindingTablePrefetchIsCalledThenReturnsFalse) {
|
|
|
|
|
EXPECT_FALSE(EncodeSurfaceState<FamilyType>::doBindingTablePrefetch());
|
|
|
|
|
}
|
2020-11-16 17:12:08 +00:00
|
|
|
|
|
|
|
|
GEN11TEST_F(Gen11CommandEncodeTest, givenBcsCommandsHelperWhenMiArbCheckWaRequiredThenReturnTrue) {
|
|
|
|
|
EXPECT_FALSE(BlitCommandsHelper<FamilyType>::miArbCheckWaRequired());
|
|
|
|
|
}
|
2023-07-18 11:48:29 +00:00
|
|
|
|
|
|
|
|
GEN11TEST_F(Gen11CommandEncodeTest, givenSurfaceStateWhenAuxParamsForMCSCCSAreSetThenAuxModeStaysTheSame) {
|
|
|
|
|
auto surfaceState = FamilyType::cmdInitRenderSurfaceState;
|
|
|
|
|
MockDevice device;
|
|
|
|
|
auto releaseHelper = device.getReleaseHelper();
|
|
|
|
|
|
|
|
|
|
auto originalAuxMode = surfaceState.getAuxiliarySurfaceMode();
|
|
|
|
|
|
|
|
|
|
EncodeSurfaceState<FamilyType>::setAuxParamsForMCSCCS(&surfaceState, releaseHelper);
|
|
|
|
|
|
|
|
|
|
EXPECT_EQ(surfaceState.getAuxiliarySurfaceMode(), originalAuxMode);
|
|
|
|
|
}
|