From 916b740e7d32d4ff003af242af2a86f3e641e11a Mon Sep 17 00:00:00 2001 From: Kamil Kopryk Date: Wed, 28 Dec 2022 15:51:48 +0000 Subject: [PATCH] Refactor: dont use global gfxCoreHelper getter in l0 files 1/n Related-To: NEO-6853 Signed-off-by: Kamil Kopryk --- .../sources/cmdqueue/test_cmdqueue_3.cpp | 12 ++++---- .../debugger/active_debugger_fixture.h | 3 +- .../sources/debugger/l0_debugger_fixture.h | 9 +++--- .../sources/debugger/test_l0_debugger_1.cpp | 3 +- .../sources/debugger/test_l0_debugger_2.cpp | 2 +- .../unit_tests/sources/device/test_device.cpp | 2 +- .../unit_tests/sources/event/test_event.cpp | 2 +- .../sources/debug/debug_session_tests.cpp | 6 ++-- .../unit_test/device/sub_device_tests.cpp | 8 +++-- shared/source/helpers/hw_helper.h | 6 ++-- shared/source/helpers/hw_helper_base.inl | 4 +-- .../xe_hp_core/hw_helper_xe_hp_core.cpp | 2 +- .../xe_hpc_core/hw_helper_xe_hpc_core.cpp | 2 +- .../xe_hpg_core/hw_helper_xe_hpg_core.cpp | 2 +- .../unit_test/helpers/hw_helper_tests.cpp | 30 +++++++------------ 15 files changed, 46 insertions(+), 47 deletions(-) diff --git a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_3.cpp b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_3.cpp index c91b9fc302..46874224c0 100644 --- a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_3.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_3.cpp @@ -89,7 +89,7 @@ HWTEST2_F(CommandQueueProgramSBATest, whenCreatingCommandQueueThenItIsInitialize uint32_t alignedSize = 4096u; NEO::LinearStream child(commandQueue->commandStream.getSpace(alignedSize), alignedSize); - auto &gfxCoreHelper = GfxCoreHelper::get(neoDevice->getHardwareInfo().platform.eRenderCoreFamily); + auto &gfxCoreHelper = neoDevice->getGfxCoreHelper(); const bool isaInLocalMemory = !gfxCoreHelper.useSystemMemoryPlacementForISA(neoDevice->getHardwareInfo()); commandQueue->programStateBaseAddress(0u, true, child, true); @@ -637,10 +637,10 @@ struct EngineInstancedDeviceExecuteTests : public ::testing::Test { hwInfo->gtSystemInfo.CCSInfo.NumberOfCCSEnabled = numCcs; hwInfo->featureTable.flags.ftrCCSNode = (numCcs > 0); - auto &gfxCoreHelper = rootDeviceEnvironment.getHelper(); + auto &gfxCoreHelper = rootDeviceEnvironment.getHelper(); gfxCoreHelper.adjustDefaultEngineType(hwInfo); - if (!multiCcsDevice(*hwInfo, numCcs)) { + if (!multiCcsDevice(rootDeviceEnvironment, numCcs)) { return false; } executionEnvironment->parseAffinityMask(); @@ -651,8 +651,10 @@ struct EngineInstancedDeviceExecuteTests : public ::testing::Test { return true; } - bool multiCcsDevice(const HardwareInfo &hwInfo, uint32_t expectedNumCcs) { - auto gpgpuEngines = GfxCoreHelper::get(hwInfo.platform.eRenderCoreFamily).getGpgpuEngineInstances(hwInfo); + bool multiCcsDevice(const NEO::RootDeviceEnvironment &rootDeviceEnvironment, uint32_t expectedNumCcs) { + auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo(); + auto &gfxCoreHelper = rootDeviceEnvironment.getHelper(); + auto gpgpuEngines = gfxCoreHelper.getGpgpuEngineInstances(hwInfo); uint32_t numCcs = 0; diff --git a/level_zero/core/test/unit_tests/sources/debugger/active_debugger_fixture.h b/level_zero/core/test/unit_tests/sources/debugger/active_debugger_fixture.h index 7d9aea659d..2a4cfc1cb9 100644 --- a/level_zero/core/test/unit_tests/sources/debugger/active_debugger_fixture.h +++ b/level_zero/core/test/unit_tests/sources/debugger/active_debugger_fixture.h @@ -39,7 +39,8 @@ struct ActiveDebuggerFixture { executionEnvironment->rootDeviceEnvironments[0]->builtins.reset(mockBuiltIns); executionEnvironment->rootDeviceEnvironments[0]->initGmm(); - auto isHexadecimalArrayPreferred = GfxCoreHelper::get(hwInfo.platform.eRenderCoreFamily).isSipKernelAsHexadecimalArrayPreferred(); + auto &gfxCoreHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); + auto isHexadecimalArrayPreferred = gfxCoreHelper.isSipKernelAsHexadecimalArrayPreferred(); if (isHexadecimalArrayPreferred) { MockSipData::useMockSip = true; } diff --git a/level_zero/core/test/unit_tests/sources/debugger/l0_debugger_fixture.h b/level_zero/core/test/unit_tests/sources/debugger/l0_debugger_fixture.h index 08e8c03dd0..0b515ae265 100644 --- a/level_zero/core/test/unit_tests/sources/debugger/l0_debugger_fixture.h +++ b/level_zero/core/test/unit_tests/sources/debugger/l0_debugger_fixture.h @@ -31,16 +31,17 @@ struct L0DebuggerFixture { memoryOperationsHandler = new NEO::MockMemoryOperations(); executionEnvironment->rootDeviceEnvironments[0]->memoryOperationsInterface.reset(memoryOperationsHandler); executionEnvironment->setDebuggingEnabled(); + executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(&hwInfo); - hwInfo = *NEO::defaultHwInfo.get(); + hwInfo = *executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo(); hwInfo.featureTable.flags.ftrLocalMemory = true; - auto isHexadecimalArrayPreferred = GfxCoreHelper::get(hwInfo.platform.eRenderCoreFamily).isSipKernelAsHexadecimalArrayPreferred(); + auto &gfxCoreHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); + auto isHexadecimalArrayPreferred = gfxCoreHelper.isSipKernelAsHexadecimalArrayPreferred(); if (isHexadecimalArrayPreferred) { MockSipData::useMockSip = true; } - executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(&hwInfo); executionEnvironment->rootDeviceEnvironments[0]->initGmm(); executionEnvironment->initializeMemoryManager(); @@ -61,7 +62,7 @@ struct L0DebuggerFixture { std::unique_ptr> driverHandle; NEO::MockDevice *neoDevice = nullptr; L0::Device *device = nullptr; - NEO::HardwareInfo hwInfo; + NEO::HardwareInfo hwInfo = *defaultHwInfo; MockMemoryOperations *memoryOperationsHandler = nullptr; VariableBackup mockSipCalled{&NEO::MockSipData::called}; VariableBackup mockSipCalledType{&NEO::MockSipData::calledType}; diff --git a/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_1.cpp b/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_1.cpp index 30476a9adb..273beee66b 100644 --- a/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_1.cpp +++ b/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_1.cpp @@ -45,7 +45,8 @@ TEST_F(L0DebuggerTest, givenL0DebuggerWhenGettingSipAllocationThenValidSipTypeIs ASSERT_NE(nullptr, systemRoutine); auto sipType = SipKernel::getSipKernelType(*neoDevice); - auto isHexadecimalArrayPreferred = GfxCoreHelper::get(hwInfo.platform.eRenderCoreFamily).isSipKernelAsHexadecimalArrayPreferred(); + auto &gfxCoreHelper = neoDevice->getGfxCoreHelper(); + auto isHexadecimalArrayPreferred = gfxCoreHelper.isSipKernelAsHexadecimalArrayPreferred(); auto expectedSipAllocation = isHexadecimalArrayPreferred ? NEO::MockSipData::mockSipKernel->getSipAllocation() diff --git a/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_2.cpp b/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_2.cpp index 1b9ba79ae0..8fd1a7a85c 100644 --- a/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_2.cpp +++ b/level_zero/core/test/unit_tests/sources/debugger/test_l0_debugger_2.cpp @@ -190,7 +190,7 @@ HWTEST2_P(L0DebuggerWithBlitterTest, givenImmediateCommandListWhenExecutingWithF ASSERT_TRUE(FamilyType::PARSE::parseCommandBuffer( cmdList, commandList->csr->getCS().getCpuBase(), commandList->csr->getCS().getUsed())); - const auto &gfxCoreHelper = GfxCoreHelper::get(defaultHwInfo->platform.eRenderCoreFamily); + auto &gfxCoreHelper = device->getGfxCoreHelper(); if (gfxCoreHelper.isSipWANeeded(hwInfo)) { auto miLoadImm = findAll(cmdList.begin(), cmdList.end()); diff --git a/level_zero/core/test/unit_tests/sources/device/test_device.cpp b/level_zero/core/test/unit_tests/sources/device/test_device.cpp index 1f280ba27a..e8957b2285 100644 --- a/level_zero/core/test/unit_tests/sources/device/test_device.cpp +++ b/level_zero/core/test/unit_tests/sources/device/test_device.cpp @@ -1228,7 +1228,7 @@ TEST_F(DeviceTest, givenCallToDevicePropertiesThenMaximumMemoryToBeAllocatedIsCo device->getProperties(&deviceProperties); EXPECT_EQ(deviceProperties.maxMemAllocSize, this->neoDevice->getDeviceInfo().maxMemAllocSize); - auto &gfxCoreHelper = GfxCoreHelper::get(defaultHwInfo->platform.eRenderCoreFamily); + auto &gfxCoreHelper = neoDevice->getGfxCoreHelper(); auto expectedSize = this->neoDevice->getDeviceInfo().globalMemSize; if (!this->neoDevice->areSharedSystemAllocationsAllowed()) { expectedSize = std::min(expectedSize, gfxCoreHelper.getMaxMemAllocSize()); diff --git a/level_zero/core/test/unit_tests/sources/event/test_event.cpp b/level_zero/core/test/unit_tests/sources/event/test_event.cpp index 2b0365b5f3..d9222ea97d 100644 --- a/level_zero/core/test/unit_tests/sources/event/test_event.cpp +++ b/level_zero/core/test/unit_tests/sources/event/test_event.cpp @@ -1695,7 +1695,7 @@ HWTEST2_F(TimestampEventCreateMultiKernel, givenOverflowingTimeStampDataOnTwoKer ze_kernel_timestamp_result_t results; event->queryKernelTimestamp(&results); - auto &gfxCoreHelper = GfxCoreHelper::get(device->getHwInfo().platform.eRenderCoreFamily); + auto &gfxCoreHelper = device->getGfxCoreHelper(); if (gfxCoreHelper.useOnlyGlobalTimestamps() == false) { EXPECT_EQ(static_cast(maxTimeStampValue - 2), results.context.kernelStart); EXPECT_EQ(static_cast(maxTimeStampValue + 2), results.context.kernelEnd); diff --git a/level_zero/tools/test/unit_tests/sources/debug/debug_session_tests.cpp b/level_zero/tools/test/unit_tests/sources/debug/debug_session_tests.cpp index 433976ed2c..de1a2f876b 100644 --- a/level_zero/tools/test/unit_tests/sources/debug/debug_session_tests.cpp +++ b/level_zero/tools/test/unit_tests/sources/debug/debug_session_tests.cpp @@ -705,7 +705,7 @@ HWTEST2_F(DebugSessionTest, givenErrorFromReadMemoryWhenReadSbaRegistersCalledTh auto result = sessionMock->readSbaRegisters(EuThread::ThreadId(0, thread), 0, 9, sba); - auto &gfxCoreHelper = GfxCoreHelper::get(neoDevice->getHardwareInfo().platform.eRenderCoreFamily); + auto &gfxCoreHelper = neoDevice->getGfxCoreHelper(); EXPECT_TRUE(gfxCoreHelper.isScratchSpaceSurfaceStateAccessible()); EXPECT_EQ(ZE_RESULT_ERROR_UNKNOWN, result); } @@ -1924,7 +1924,7 @@ TEST_F(DebugSessionRegistersAccessTest, WhenReadingSbaRegistersThenCorrectAddres session->stateSaveAreaHeader.resize(size); } - auto &gfxCoreHelper = GfxCoreHelper::get(neoDevice->getHardwareInfo().platform.eRenderCoreFamily); + auto &gfxCoreHelper = neoDevice->getGfxCoreHelper(); ze_device_thread_t thread = {0, 0, 0, 0}; ze_device_thread_t thread1 = {0, 0, 0, 1}; EuThread::ThreadId threadId(0, thread); @@ -2429,7 +2429,7 @@ TEST(DebugSessionTest, GivenStoppedThreadWhenUnderInvalidConditionsThenSlmWriteF retVal = sessionMock->slmMemoryAccess(threadId, &desc, writeSize, input); EXPECT_EQ(ZE_RESULT_ERROR_NOT_AVAILABLE, retVal); - desc.address = 0x1000000f; //force a read + desc.address = 0x1000000f; // force a read retVal = sessionMock->slmMemoryAccess(threadId, &desc, writeSize, input); EXPECT_EQ(ZE_RESULT_ERROR_NOT_AVAILABLE, retVal); sessionMock->slmCmdRegisterAccessReadyCount = 2; diff --git a/opencl/test/unit_test/device/sub_device_tests.cpp b/opencl/test/unit_test/device/sub_device_tests.cpp index f61812352b..105e009b4c 100644 --- a/opencl/test/unit_test/device/sub_device_tests.cpp +++ b/opencl/test/unit_test/device/sub_device_tests.cpp @@ -335,7 +335,7 @@ struct EngineInstancedDeviceTests : public ::testing::Test { auto &gfxCoreHelper = rootDeviceEnvironment.getHelper(); gfxCoreHelper.adjustDefaultEngineType(hwInfo); - if (!multiCcsDevice(*hwInfo, numCcs)) { + if (!multiCcsDevice(rootDeviceEnvironment, numCcs)) { return false; } executionEnvironment->parseAffinityMask(); @@ -378,8 +378,10 @@ struct EngineInstancedDeviceTests : public ::testing::Test { return true; } - bool multiCcsDevice(const HardwareInfo &hwInfo, uint32_t expectedNumCcs) { - auto gpgpuEngines = GfxCoreHelper::get(hwInfo.platform.eRenderCoreFamily).getGpgpuEngineInstances(hwInfo); + bool multiCcsDevice(const RootDeviceEnvironment &rootDeviceEnvironment, uint32_t expectedNumCcs) { + auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo(); + auto &gfxCoreHelper = rootDeviceEnvironment.getHelper(); + auto gpgpuEngines = gfxCoreHelper.getGpgpuEngineInstances(hwInfo); uint32_t numCcs = 0; diff --git a/shared/source/helpers/hw_helper.h b/shared/source/helpers/hw_helper.h index 4d0b3ed7ee..20ba9c58ff 100644 --- a/shared/source/helpers/hw_helper.h +++ b/shared/source/helpers/hw_helper.h @@ -78,7 +78,7 @@ class GfxCoreHelper { bool isReadOnly, uint32_t surfaceType, bool forceNonAuxMode, - bool useL1Cache) = 0; + bool useL1Cache) const = 0; virtual const EngineInstancesContainer getGpgpuEngineInstances(const HardwareInfo &hwInfo) const = 0; virtual EngineGroupType getEngineGroupType(aub_stream::EngineType engineType, EngineUsage engineUsage, const HardwareInfo &hwInfo) const = 0; virtual const StackVec getDeviceSubGroupSizes() const = 0; @@ -244,9 +244,9 @@ class GfxCoreHelperHw : public GfxCoreHelper { bool isReadOnly, uint32_t surfaceType, bool forceNonAuxMode, - bool useL1Cache) override; + bool useL1Cache) const override; - MOCKABLE_VIRTUAL void setL1CachePolicy(bool useL1Cache, typename GfxFamily::RENDER_SURFACE_STATE *surfaceState, const HardwareInfo *hwInfo); + MOCKABLE_VIRTUAL void setL1CachePolicy(bool useL1Cache, typename GfxFamily::RENDER_SURFACE_STATE *surfaceState, const HardwareInfo *hwInfo) const; const EngineInstancesContainer getGpgpuEngineInstances(const HardwareInfo &hwInfo) const override; diff --git a/shared/source/helpers/hw_helper_base.inl b/shared/source/helpers/hw_helper_base.inl index 1d75db9e49..8986511c3b 100644 --- a/shared/source/helpers/hw_helper_base.inl +++ b/shared/source/helpers/hw_helper_base.inl @@ -111,7 +111,7 @@ void GfxCoreHelperHw::setRenderSurfaceStateForScratchResource(const Root bool isReadOnly, uint32_t surfaceType, bool forceNonAuxMode, - bool useL1Cache) { + bool useL1Cache) const { using RENDER_SURFACE_STATE = typename Family::RENDER_SURFACE_STATE; using SURFACE_FORMAT = typename RENDER_SURFACE_STATE::SURFACE_FORMAT; using AUXILIARY_SURFACE_MODE = typename RENDER_SURFACE_STATE::AUXILIARY_SURFACE_MODE; @@ -174,7 +174,7 @@ void GfxCoreHelperHw::setRenderSurfaceStateForScratchResource(const Root } template -void NEO::GfxCoreHelperHw::setL1CachePolicy(bool useL1Cache, typename GfxFamily::RENDER_SURFACE_STATE *surfaceState, const HardwareInfo *hwInfo) {} +void NEO::GfxCoreHelperHw::setL1CachePolicy(bool useL1Cache, typename GfxFamily::RENDER_SURFACE_STATE *surfaceState, const HardwareInfo *hwInfo) const {} template bool GfxCoreHelperHw::getEnableLocalMemory(const HardwareInfo &hwInfo) const { diff --git a/shared/source/xe_hp_core/hw_helper_xe_hp_core.cpp b/shared/source/xe_hp_core/hw_helper_xe_hp_core.cpp index 9ab116cc13..7e09dafb8a 100644 --- a/shared/source/xe_hp_core/hw_helper_xe_hp_core.cpp +++ b/shared/source/xe_hp_core/hw_helper_xe_hp_core.cpp @@ -55,7 +55,7 @@ uint32_t GfxCoreHelperHw::computeSlmValues(const HardwareInfo &hwInfo, u } template <> -void GfxCoreHelperHw::setL1CachePolicy(bool useL1Cache, typename Family::RENDER_SURFACE_STATE *surfaceState, const HardwareInfo *hwInfo) { +void GfxCoreHelperHw::setL1CachePolicy(bool useL1Cache, typename Family::RENDER_SURFACE_STATE *surfaceState, const HardwareInfo *hwInfo) const { } template <> diff --git a/shared/source/xe_hpc_core/hw_helper_xe_hpc_core.cpp b/shared/source/xe_hpc_core/hw_helper_xe_hpc_core.cpp index f92e379dee..4edca327de 100644 --- a/shared/source/xe_hpc_core/hw_helper_xe_hpc_core.cpp +++ b/shared/source/xe_hpc_core/hw_helper_xe_hpc_core.cpp @@ -210,7 +210,7 @@ size_t MemorySynchronizationCommands::getSizeForAdditonalSynchronization } template <> -void GfxCoreHelperHw::setL1CachePolicy(bool useL1Cache, typename Family::RENDER_SURFACE_STATE *surfaceState, const HardwareInfo *hwInfo) { +void GfxCoreHelperHw::setL1CachePolicy(bool useL1Cache, typename Family::RENDER_SURFACE_STATE *surfaceState, const HardwareInfo *hwInfo) const { if (useL1Cache) { surfaceState->setL1CachePolicyL1CacheControl(Family::RENDER_SURFACE_STATE::L1_CACHE_POLICY_WB); if (DebugManager.flags.OverrideL1CacheControlInSurfaceStateForScratchSpace.get() != -1) { diff --git a/shared/source/xe_hpg_core/hw_helper_xe_hpg_core.cpp b/shared/source/xe_hpg_core/hw_helper_xe_hpg_core.cpp index dee03813c7..3a187b58d4 100644 --- a/shared/source/xe_hpg_core/hw_helper_xe_hpg_core.cpp +++ b/shared/source/xe_hpg_core/hw_helper_xe_hpg_core.cpp @@ -58,7 +58,7 @@ bool GfxCoreHelperHw::is1MbAlignmentSupported(const HardwareInfo &hwInfo } template <> -void GfxCoreHelperHw::setL1CachePolicy(bool useL1Cache, typename Family::RENDER_SURFACE_STATE *surfaceState, const HardwareInfo *hwInfo) { +void GfxCoreHelperHw::setL1CachePolicy(bool useL1Cache, typename Family::RENDER_SURFACE_STATE *surfaceState, const HardwareInfo *hwInfo) const { if (useL1Cache) { surfaceState->setL1CachePolicyL1CacheControl(Family::RENDER_SURFACE_STATE::L1_CACHE_POLICY_WB); if (DebugManager.flags.OverrideL1CacheControlInSurfaceStateForScratchSpace.get() != -1) { diff --git a/shared/test/unit_test/helpers/hw_helper_tests.cpp b/shared/test/unit_test/helpers/hw_helper_tests.cpp index 8e12ef50ef..f9800aef13 100644 --- a/shared/test/unit_test/helpers/hw_helper_tests.cpp +++ b/shared/test/unit_test/helpers/hw_helper_tests.cpp @@ -87,21 +87,11 @@ HWTEST_F(GfxCoreHelperTest, givenForceExtendedKernelIsaSizeSetWhenGettingISAPadd } } -HWTEST_F(GfxCoreHelperTest, WhenSettingRenderSurfaceStateForBufferThenL1CachePolicyIsSet) { +HWTEST2_F(GfxCoreHelperTest, WhenSettingRenderSurfaceStateForBufferThenL1CachePolicyIsSet, IsAtLeastXeHpgCore) { using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE; using SURFACE_TYPE = typename RENDER_SURFACE_STATE::SURFACE_TYPE; - class MockGfxCoreHelperHw : public GfxCoreHelperHw { - public: - bool called = false; - using GfxCoreHelperHw::GfxCoreHelperHw; - MockGfxCoreHelperHw() {} - void setL1CachePolicy(bool useL1Cache, typename FamilyType::RENDER_SURFACE_STATE *surfaceState, const HardwareInfo *hwInfo) override { - GfxCoreHelperHw::setL1CachePolicy(useL1Cache, surfaceState, hwInfo); - called = true; - } - }; - MockGfxCoreHelperHw helper; + auto &gfxCoreHelper = this->pDevice->getGfxCoreHelper(); void *stateBuffer = alignedMalloc(sizeof(RENDER_SURFACE_STATE), sizeof(RENDER_SURFACE_STATE)); ASSERT_NE(nullptr, stateBuffer); memset(stateBuffer, 0, sizeof(RENDER_SURFACE_STATE)); @@ -116,14 +106,16 @@ HWTEST_F(GfxCoreHelperTest, WhenSettingRenderSurfaceStateForBufferThenL1CachePol uint32_t pitch = 0x40; SURFACE_TYPE type = RENDER_SURFACE_STATE::SURFACE_TYPE_SURFTYPE_BUFFER; - helper.setRenderSurfaceStateForScratchResource(rootDeviceEnvironment, stateBuffer, size, addr, offset, pitch, nullptr, false, type, false, - false); - ASSERT_EQ(helper.called, true); - helper.called = false; + gfxCoreHelper.setRenderSurfaceStateForScratchResource(rootDeviceEnvironment, stateBuffer, size, addr, offset, pitch, nullptr, false, type, false, + false); + + EXPECT_NE(FamilyType::RENDER_SURFACE_STATE::L1_CACHE_POLICY_WB, surfaceState->getL1CachePolicyL1CacheControl()); + + gfxCoreHelper.setRenderSurfaceStateForScratchResource(rootDeviceEnvironment, stateBuffer, size, addr, offset, pitch, nullptr, false, type, false, + true); + + EXPECT_EQ(FamilyType::RENDER_SURFACE_STATE::L1_CACHE_POLICY_WB, surfaceState->getL1CachePolicyL1CacheControl()); - helper.setRenderSurfaceStateForScratchResource(rootDeviceEnvironment, stateBuffer, size, addr, offset, pitch, nullptr, false, type, false, - true); - ASSERT_EQ(helper.called, true); alignedFree(stateBuffer); }