2020-10-07 20:22:26 +08:00
|
|
|
/*
|
2023-01-21 01:45:04 +08:00
|
|
|
* Copyright (C) 2020-2023 Intel Corporation
|
2020-10-07 20:22:26 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2023-01-21 01:45:04 +08:00
|
|
|
#include "shared/source/command_container/encode_surface_state.h"
|
2022-06-30 03:17:47 +08:00
|
|
|
#include "shared/source/gen11/hw_cmds.h"
|
2020-11-17 01:12:08 +08:00
|
|
|
#include "shared/source/helpers/blit_commands_helper.h"
|
2023-07-18 19:48:29 +08:00
|
|
|
#include "shared/test/common/mocks/mock_device.h"
|
2022-06-30 03:17:47 +08:00
|
|
|
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
|
|
|
#include "shared/test/common/test_macros/test.h"
|
2020-10-07 20:22:26 +08:00
|
|
|
|
|
|
|
using namespace NEO;
|
|
|
|
|
|
|
|
using Gen11CommandEncodeTest = testing::Test;
|
|
|
|
GEN11TEST_F(Gen11CommandEncodeTest, givenGen11PlatformWhenDoBindingTablePrefetchIsCalledThenReturnsFalse) {
|
|
|
|
EXPECT_FALSE(EncodeSurfaceState<FamilyType>::doBindingTablePrefetch());
|
|
|
|
}
|
2020-11-17 01:12:08 +08:00
|
|
|
|
|
|
|
GEN11TEST_F(Gen11CommandEncodeTest, givenBcsCommandsHelperWhenMiArbCheckWaRequiredThenReturnTrue) {
|
|
|
|
EXPECT_FALSE(BlitCommandsHelper<FamilyType>::miArbCheckWaRequired());
|
|
|
|
}
|
2023-07-18 19:48:29 +08: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);
|
|
|
|
}
|