compute-runtime/shared/test/unit_test/gen11/command_encoder_tests_gen11...

37 lines
1.3 KiB
C++

/*
* Copyright (C) 2020-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/command_container/encode_surface_state.h"
#include "shared/source/gen11/hw_cmds.h"
#include "shared/source/helpers/blit_commands_helper.h"
#include "shared/test/common/mocks/mock_device.h"
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
#include "shared/test/common/test_macros/test.h"
using namespace NEO;
using Gen11CommandEncodeTest = testing::Test;
GEN11TEST_F(Gen11CommandEncodeTest, givenGen11PlatformWhenDoBindingTablePrefetchIsCalledThenReturnsFalse) {
EXPECT_FALSE(EncodeSurfaceState<FamilyType>::doBindingTablePrefetch());
}
GEN11TEST_F(Gen11CommandEncodeTest, givenBcsCommandsHelperWhenMiArbCheckWaRequiredThenReturnTrue) {
EXPECT_FALSE(BlitCommandsHelper<FamilyType>::miArbCheckWaRequired());
}
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);
}