From 425a2a6fa2892594eabe00e981cf5867b065e4f1 Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Thu, 11 May 2023 12:14:46 +0000 Subject: [PATCH] fix: set NotLockable flag when resource does not need to be lockable disable compression preference when resource is lockable Signed-off-by: Mateusz Jablonski --- .../command_queue_tests_pvc_and_later.cpp | 3 +++ .../cl_command_stream_receiver_tests.cpp | 2 ++ .../command_stream_receiver_hw_1_tests.cpp | 12 ++++++++---- .../command_stream_receiver_hw_2_tests.cpp | 12 ++++++++++++ .../unit_test/gmm_helper/gmm_helper_tests.cpp | 19 ++++++++++++++++--- .../test/unit_test/mem_obj/buffer_tests.cpp | 3 +++ .../migraton_controller_tests.cpp | 3 +++ .../program/printf_handler_tests.cpp | 2 ++ shared/source/gmm_helper/gmm.cpp | 7 ++++++- .../libult/ult_command_stream_receiver.h | 5 +---- .../aub_command_stream_receiver_2_tests.cpp | 3 ++- .../command_stream_receiver_tests.cpp | 3 +++ .../helpers/blit_commands_helper_tests.cpp | 3 +++ .../windows/wddm_memory_manager_tests.cpp | 4 ++-- .../windows/wddm_special_heap_test.cpp | 2 ++ .../program/program_initialization_tests.cpp | 2 ++ 16 files changed, 70 insertions(+), 15 deletions(-) diff --git a/opencl/test/unit_test/command_queue/command_queue_tests_pvc_and_later.cpp b/opencl/test/unit_test/command_queue/command_queue_tests_pvc_and_later.cpp index 9a305eb546..a7ebb23a51 100644 --- a/opencl/test/unit_test/command_queue/command_queue_tests_pvc_and_later.cpp +++ b/opencl/test/unit_test/command_queue/command_queue_tests_pvc_and_later.cpp @@ -292,6 +292,9 @@ HWTEST2_F(CommandQueuePvcAndLaterTests, whenPrepareHostPtrSurfaceForSplitThenSet HostPtrSurface hostPtrSurf(ptr, ptrSize); queue->getGpgpuCommandStreamReceiver().createAllocationForHostSurface(hostPtrSurf, false); + EXPECT_EQ(1u, hostPtrSurf.getAllocation()->hostPtrTaskCountAssignment.load()); + hostPtrSurf.getAllocation()->hostPtrTaskCountAssignment--; + queue->prepareHostPtrSurfaceForSplit(false, *hostPtrSurf.getAllocation()); for (auto i = static_cast(aub_stream::EngineType::ENGINE_BCS1); i <= static_cast(aub_stream::EngineType::ENGINE_BCS8); i++) { diff --git a/opencl/test/unit_test/command_stream/cl_command_stream_receiver_tests.cpp b/opencl/test/unit_test/command_stream/cl_command_stream_receiver_tests.cpp index e78034c6b5..04d2c83191 100644 --- a/opencl/test/unit_test/command_stream/cl_command_stream_receiver_tests.cpp +++ b/opencl/test/unit_test/command_stream/cl_command_stream_receiver_tests.cpp @@ -133,4 +133,6 @@ TEST_F(CommandStreamReceiverMultiRootDeviceTest, WhenCreatingCommandStreamGraphi EXPECT_TRUE(commandStreamReceiver->createAllocationForHostSurface(surface, false)); ASSERT_NE(nullptr, surface.getAllocation()); EXPECT_EQ(expectedRootDeviceIndex, surface.getAllocation()->getRootDeviceIndex()); + EXPECT_EQ(1u, surface.getAllocation()->hostPtrTaskCountAssignment.load()); + surface.getAllocation()->hostPtrTaskCountAssignment--; } diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_1_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_1_tests.cpp index 00e453a787..b26fdc8a62 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_1_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_1_tests.cpp @@ -1090,10 +1090,14 @@ struct RelaxedOrderingBcsTests : public BcsTests { } BlitProperties generateBlitProperties(CommandStreamReceiver &csr, Buffer *clBuffer) { - return BlitProperties::constructPropertiesForReadWrite(BlitterConstants::BlitDirection::HostPtrToBuffer, - csr, clBuffer->getGraphicsAllocation(pDevice->getRootDeviceIndex()), nullptr, hostPtr, - clBuffer->getGraphicsAllocation(pDevice->getRootDeviceIndex())->getGpuAddress(), 0, - 0, 0, {1, 1, 1}, 0, 0, 0, 0); + auto properties = BlitProperties::constructPropertiesForReadWrite(BlitterConstants::BlitDirection::HostPtrToBuffer, + csr, clBuffer->getGraphicsAllocation(pDevice->getRootDeviceIndex()), nullptr, hostPtr, + clBuffer->getGraphicsAllocation(pDevice->getRootDeviceIndex())->getGpuAddress(), 0, + 0, 0, {1, 1, 1}, 0, 0, 0, 0); + EXPECT_EQ(1u, properties.srcAllocation->hostPtrTaskCountAssignment.load()); + properties.srcAllocation->hostPtrTaskCountAssignment--; + + return properties; } std::unique_ptr> ultHwConfigBackup; diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp index 360a3e91c3..9d01ca8455 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp @@ -1748,6 +1748,9 @@ HWTEST_F(BcsTests, givenHostPtrToImageWhenConstructPropertiesIsCalledThenValuesA EXPECT_EQ(dstRowPitchExpected, blitProperties.dstRowPitch); EXPECT_EQ(srcSlicePitchExpected, blitProperties.srcSlicePitch); EXPECT_EQ(dstSlicePitchExpected, blitProperties.dstSlicePitch); + + EXPECT_EQ(1u, blitProperties.srcAllocation->hostPtrTaskCountAssignment.load()); + blitProperties.srcAllocation->hostPtrTaskCountAssignment--; } HWTEST_F(BcsTests, givenImageToHostPtrWhenConstructPropertiesIsCalledThenValuesAreSetCorrectly) { @@ -1786,6 +1789,9 @@ HWTEST_F(BcsTests, givenImageToHostPtrWhenConstructPropertiesIsCalledThenValuesA EXPECT_EQ(dstRowPitchExpected, blitProperties.dstRowPitch); EXPECT_EQ(srcSlicePitchExpected, blitProperties.srcSlicePitch); EXPECT_EQ(dstSlicePitchExpected, blitProperties.dstSlicePitch); + + EXPECT_EQ(1u, blitProperties.dstAllocation->hostPtrTaskCountAssignment.load()); + blitProperties.dstAllocation->hostPtrTaskCountAssignment--; } HWTEST_F(BcsTests, givenHostPtrToImageWithInputRowSlicePitchesWhenConstructPropertiesIsCalledThenValuesAreSetCorrectly) { @@ -1816,6 +1822,9 @@ HWTEST_F(BcsTests, givenHostPtrToImageWithInputRowSlicePitchesWhenConstructPrope EXPECT_EQ(dstRowPitchExpected, blitProperties.dstRowPitch); EXPECT_EQ(inputSlicePitch, blitProperties.srcSlicePitch); EXPECT_EQ(dstSlicePitchExpected, blitProperties.dstSlicePitch); + + EXPECT_EQ(1u, blitProperties.srcAllocation->hostPtrTaskCountAssignment.load()); + blitProperties.srcAllocation->hostPtrTaskCountAssignment--; } HWTEST_F(BcsTests, givenImageToHostPtrWithInputRowSlicePitchesWhenConstructPropertiesIsCalledThenValuesAreSetCorrectly) { @@ -1847,6 +1856,9 @@ HWTEST_F(BcsTests, givenImageToHostPtrWithInputRowSlicePitchesWhenConstructPrope EXPECT_EQ(inputRowPitch, blitProperties.dstRowPitch); EXPECT_EQ(srcSlicePitchExpected, blitProperties.srcSlicePitch); EXPECT_EQ(inputSlicePitch, blitProperties.dstSlicePitch); + + EXPECT_EQ(1u, blitProperties.dstAllocation->hostPtrTaskCountAssignment.load()); + blitProperties.dstAllocation->hostPtrTaskCountAssignment--; } HWTEST_F(BcsTests, givenHostPtrToImageWhenBlitBufferIsCalledThenBlitCmdIsFound) { diff --git a/opencl/test/unit_test/gmm_helper/gmm_helper_tests.cpp b/opencl/test/unit_test/gmm_helper/gmm_helper_tests.cpp index 735698edcb..cc13592e39 100644 --- a/opencl/test/unit_test/gmm_helper/gmm_helper_tests.cpp +++ b/opencl/test/unit_test/gmm_helper/gmm_helper_tests.cpp @@ -1473,7 +1473,7 @@ TEST_F(GmmLocalMemoryTests, givenFtrLocalMemoryWhenUsingLocalMemoryAndAllocation EXPECT_EQ(0u, gmm->resourceParams.Flags.Info.NotLockable); } -TEST_F(GmmLocalMemoryTests, givenFtrLocalMemoryWhenUsingLocalMemoryFalseAndAllocationIsNotLockableThenNotLockableFlagsIsSetAndLocalAndNonLocalOnlyAreNotSet) { +TEST_F(GmmHelperTests, givenNotLockableAllocationWhenCreatingGmmThenNotLockableFlagsIsSetAndLocalAndNonLocalOnlyAreNotSet) { StorageInfo storageInfo{}; storageInfo.isLockable = false; storageInfo.memoryBanks.set(1); @@ -1530,7 +1530,7 @@ TEST_F(GmmLocalMemoryTests, givenLocalMemoryAndStorageInfoWithoutLocalOnlyRequir EXPECT_EQ(0u, gmm->resourceParams.Flags.Info.LocalOnly); } -TEST_F(GmmLocalMemoryTests, givenFtrLocalMemoryAndCompressionEnabledWhenUsingLocalMemoryAndAllocationIsNotLockableThenNotLockableAndLocalOnlyFlagsAreSetAndNonLocalOnlyIsNotSet) { +TEST_F(GmmHelperTests, givenCompressionEnabledWhenUsingLocalMemoryAndAllocationIsNotLockableThenNotLockableAndLocalOnlyFlagsAreSetAndNonLocalOnlyIsNotSet) { DebugManagerStateRestore restorer; DebugManager.flags.RenderCompressedBuffersEnabled.set(1); StorageInfo storageInfo{}; @@ -1541,10 +1541,23 @@ TEST_F(GmmLocalMemoryTests, givenFtrLocalMemoryAndCompressionEnabledWhenUsingLoc auto gmm = std::make_unique(getGmmHelper(), nullptr, 1, 0, GMM_RESOURCE_USAGE_OCL_BUFFER, true, storageInfo, true); EXPECT_TRUE(gmm->isCompressionEnabled); EXPECT_EQ(0u, gmm->resourceParams.Flags.Info.NonLocalOnly); - EXPECT_EQ(1u, gmm->resourceParams.Flags.Info.LocalOnly); + EXPECT_EQ(defaultHwInfo->featureTable.flags.ftrLocalMemory, gmm->resourceParams.Flags.Info.LocalOnly); EXPECT_EQ(1u, gmm->resourceParams.Flags.Info.NotLockable); } +TEST_F(GmmHelperTests, givenCompressionSupportedWhenAllocationIsLockableThenGmmHasNoCompression) { + DebugManagerStateRestore restorer; + DebugManager.flags.RenderCompressedBuffersEnabled.set(1); + StorageInfo storageInfo{}; + storageInfo.isLockable = true; + storageInfo.systemMemoryPlacement = false; + storageInfo.memoryBanks.set(1); + + auto gmm = std::make_unique(getGmmHelper(), nullptr, 1, 0, GMM_RESOURCE_USAGE_OCL_BUFFER, true, storageInfo, true); + EXPECT_FALSE(gmm->isCompressionEnabled); + EXPECT_EQ(0u, gmm->resourceParams.Flags.Info.NotLockable); +} + TEST_F(GmmLocalMemoryTests, givenFtrLocalMemoryWhenUseSystemMemoryIsFalseAndAllocationIsNotLockableThenLocalAndNonLocalOnlyAndNotLockableFlagsAreNotSet) { DebugManagerStateRestore restorer; for (auto csrMode = static_cast(CommandStreamReceiverType::CSR_HW); csrMode < static_cast(CommandStreamReceiverType::CSR_TYPES_NUM); csrMode++) { diff --git a/opencl/test/unit_test/mem_obj/buffer_tests.cpp b/opencl/test/unit_test/mem_obj/buffer_tests.cpp index 20961c40ee..bafccafead 100644 --- a/opencl/test/unit_test/mem_obj/buffer_tests.cpp +++ b/opencl/test/unit_test/mem_obj/buffer_tests.cpp @@ -1973,11 +1973,14 @@ HWTEST_F(BufferCreateTests, givenClMemCopyHostPointerPassedToBufferCreateWhenAll DebugManagerStateRestore subTestRestorer; DebugManager.flags.RenderCompressedBuffersEnabled.set(1); DebugManager.flags.OverrideBufferSuitableForRenderCompression.set(1); + cl_int retVal; cl_mem_flags flags = CL_MEM_READ_WRITE | CL_MEM_COPY_HOST_PTR; auto writeBufferCounter = commandQueue->writeBufferCounter; size_t lockResourceCalled = memoryManager->lockResourceCalled; + static_cast *>(executionEnvironment->rootDeviceEnvironments[0]->gfxCoreHelper.get())->setIsLockable = false; + std::unique_ptr buffer(Buffer::create(&context, flags, sizeof(memory), memory, retVal)); ASSERT_NE(nullptr, buffer.get()); EXPECT_EQ(commandQueue->writeBufferCounter, writeBufferCounter + 1); diff --git a/opencl/test/unit_test/memory_manager/migraton_controller_tests.cpp b/opencl/test/unit_test/memory_manager/migraton_controller_tests.cpp index eb56a077ed..69b62217e3 100644 --- a/opencl/test/unit_test/memory_manager/migraton_controller_tests.cpp +++ b/opencl/test/unit_test/memory_manager/migraton_controller_tests.cpp @@ -184,6 +184,9 @@ HWTEST2_F(MigrationControllerTests, givenMultiGraphicsAllocationUsedInOneCsrWhen ASSERT_TRUE(pImage->getMultiGraphicsAllocation().requiresMigrations()); + pImage->getMultiGraphicsAllocation().getGraphicsAllocation(0)->getDefaultGmm()->resourceParams.Flags.Info.NotLockable = false; + pImage->getMultiGraphicsAllocation().getGraphicsAllocation(1)->getDefaultGmm()->resourceParams.Flags.Info.NotLockable = false; + auto migrationSyncData = static_cast(pImage->getMultiGraphicsAllocation().getMigrationSyncData()); EXPECT_EQ(0u, migrationSyncData->waitOnCpuCalled); diff --git a/opencl/test/unit_test/program/printf_handler_tests.cpp b/opencl/test/unit_test/program/printf_handler_tests.cpp index 9247bcaf8c..2bcd031032 100644 --- a/opencl/test/unit_test/program/printf_handler_tests.cpp +++ b/opencl/test/unit_test/program/printf_handler_tests.cpp @@ -191,6 +191,8 @@ HWTEST_F(PrintfHandlerTests, givenGpuHangOnFlushBcsStreamAndEnabledStatelessComp EXPECT_FALSE(printfHandler->printEnqueueOutput()); EXPECT_EQ(1u, bcsCsr->blitBufferCalled); EXPECT_EQ(BlitterConstants::BlitDirection::BufferToHostPtr, bcsCsr->receivedBlitProperties[0].blitDirection); + EXPECT_EQ(1u, bcsCsr->receivedBlitProperties[0].dstAllocation->hostPtrTaskCountAssignment.load()); + bcsCsr->receivedBlitProperties[0].dstAllocation->hostPtrTaskCountAssignment--; } HWTEST_F(PrintfHandlerTests, givenDisallowedLocalMemoryCpuAccessWhenPrintEnqueueOutputIsCalledThenBCSEngineIsUsedToCopyPrintfOutput) { diff --git a/shared/source/gmm_helper/gmm.cpp b/shared/source/gmm_helper/gmm.cpp index dc730fa0b2..e3ac619ebd 100644 --- a/shared/source/gmm_helper/gmm.cpp +++ b/shared/source/gmm_helper/gmm.cpp @@ -54,6 +54,8 @@ Gmm::Gmm(GmmHelper *gmmHelper, const void *alignedPtr, size_t alignedSize, size_ resourceParams.Flags.Gpu.NoRestriction = 1; } + preferCompressed &= !storageInfo.isLockable; + applyAuxFlagsForBuffer(preferCompressed); applyMemoryFlags(storageInfo); applyAppResource(storageInfo); @@ -73,6 +75,7 @@ Gmm::~Gmm() = default; Gmm::Gmm(GmmHelper *gmmHelper, ImageInfo &inputOutputImgInfo, const StorageInfo &storageInfo, bool preferCompressed) : gmmHelper(gmmHelper) { this->resourceParams = {}; + preferCompressed &= !storageInfo.isLockable; setupImageResourceParams(inputOutputImgInfo, preferCompressed); applyMemoryFlags(storageInfo); applyAppResource(storageInfo); @@ -346,13 +349,15 @@ void Gmm::applyMemoryFlags(const StorageInfo &storageInfo) { if (extraMemoryFlagsRequired()) { applyExtraMemoryFlags(storageInfo); } else if (!storageInfo.isLockable) { - resourceParams.Flags.Info.NotLockable = 1; if (isCompressionEnabled || storageInfo.localOnlyRequired) { resourceParams.Flags.Info.LocalOnly = 1; } } } } + if (!storageInfo.isLockable) { + resourceParams.Flags.Info.NotLockable = 1; + } if (hardwareInfo->featureTable.flags.ftrMultiTileArch) { resourceParams.MultiTileArch.Enable = 1; diff --git a/shared/test/common/libult/ult_command_stream_receiver.h b/shared/test/common/libult/ult_command_stream_receiver.h index 129db7cc9c..ebcfdae0a4 100644 --- a/shared/test/common/libult/ult_command_stream_receiver.h +++ b/shared/test/common/libult/ult_command_stream_receiver.h @@ -363,10 +363,7 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw, publ bool createAllocationForHostSurface(HostPtrSurface &surface, bool requiresL3Flush) override { createAllocationForHostSurfaceCalled++; cpuCopyForHostPtrSurfaceAllowed = surface.peekIsPtrCopyAllowed(); - auto status = BaseClass::createAllocationForHostSurface(surface, requiresL3Flush); - if (status) - surface.getAllocation()->hostPtrTaskCountAssignment--; - return status; + return BaseClass::createAllocationForHostSurface(surface, requiresL3Flush); } void ensureCommandBufferAllocation(LinearStream &commandStream, size_t minimumRequiredSize, size_t additionalAllocationSize) override { diff --git a/shared/test/unit_test/command_stream/aub_command_stream_receiver_2_tests.cpp b/shared/test/unit_test/command_stream/aub_command_stream_receiver_2_tests.cpp index 98626c4a15..5154f6deb6 100644 --- a/shared/test/unit_test/command_stream/aub_command_stream_receiver_2_tests.cpp +++ b/shared/test/unit_test/command_stream/aub_command_stream_receiver_2_tests.cpp @@ -586,7 +586,7 @@ class OsAgnosticMemoryManagerForImagesWithNoHostPtr : public OsAgnosticMemoryMan }; using AubCommandStreamReceiverNoHostPtrTests = ::testing::Test; -HWTEST_F(AubCommandStreamReceiverNoHostPtrTests, givenAubCommandStreamReceiverWhenWriteMemoryIsCalledOnImageWithNoHostPtrThenResourceShouldBeLockedToGetCpuAddress) { +HWTEST_F(AubCommandStreamReceiverNoHostPtrTests, givenAubCommandStreamReceiverWhenWriteMemoryIsCalledOnLockableImageWithNoHostPtrThenResourceShouldBeLockedToGetCpuAddress) { ExecutionEnvironment *executionEnvironment = new MockExecutionEnvironment(); auto memoryManager = new OsAgnosticMemoryManagerForImagesWithNoHostPtr(*executionEnvironment); executionEnvironment->memoryManager.reset(memoryManager); @@ -611,6 +611,7 @@ HWTEST_F(AubCommandStreamReceiverNoHostPtrTests, givenAubCommandStreamReceiverWh auto imageAllocation = memoryManager->allocateGraphicsMemoryInPreferredPool(allocProperties, nullptr); ASSERT_NE(nullptr, imageAllocation); + imageAllocation->getDefaultGmm()->resourceParams.Flags.Info.NotLockable = false; EXPECT_TRUE(aubCsr->writeMemory(*imageAllocation)); diff --git a/shared/test/unit_test/command_stream/command_stream_receiver_tests.cpp b/shared/test/unit_test/command_stream/command_stream_receiver_tests.cpp index b53208ce37..7c580a8c48 100644 --- a/shared/test/unit_test/command_stream/command_stream_receiver_tests.cpp +++ b/shared/test/unit_test/command_stream/command_stream_receiver_tests.cpp @@ -1799,6 +1799,9 @@ TEST_F(CreateAllocationForHostSurfaceTest, givenReadOnlyHostPointerWhenAllocatio auto allocation = surface.getAllocation(); ASSERT_NE(nullptr, allocation); + EXPECT_EQ(1u, allocation->hostPtrTaskCountAssignment.load()); + allocation->hostPtrTaskCountAssignment--; + EXPECT_NE(memory, allocation->getUnderlyingBuffer()); EXPECT_EQ(0, memcmp(allocation->getUnderlyingBuffer(), memory, size)); diff --git a/shared/test/unit_test/helpers/blit_commands_helper_tests.cpp b/shared/test/unit_test/helpers/blit_commands_helper_tests.cpp index b6d4633af8..4c56571547 100644 --- a/shared/test/unit_test/helpers/blit_commands_helper_tests.cpp +++ b/shared/test/unit_test/helpers/blit_commands_helper_tests.cpp @@ -66,6 +66,9 @@ TEST(BlitCommandsHelperTest, GivenBufferParamsWhenConstructingPropertiesForReadW EXPECT_EQ(blitProperties.dstSlicePitch, dstSlicePitch); EXPECT_EQ(blitProperties.srcRowPitch, srcRowPitch); EXPECT_EQ(blitProperties.srcSlicePitch, srcSlicePitch); + + EXPECT_EQ(1u, blitProperties.dstAllocation->hostPtrTaskCountAssignment.load()); + blitProperties.dstAllocation->hostPtrTaskCountAssignment--; } TEST(BlitCommandsHelperTest, GivenBufferParamsWhenConstructingPropertiesForBufferRegionsThenPropertiesCreatedCorrectly) { diff --git a/shared/test/unit_test/os_interface/windows/wddm_memory_manager_tests.cpp b/shared/test/unit_test/os_interface/windows/wddm_memory_manager_tests.cpp index b99e6d0c2a..6ee8f491d8 100644 --- a/shared/test/unit_test/os_interface/windows/wddm_memory_manager_tests.cpp +++ b/shared/test/unit_test/os_interface/windows/wddm_memory_manager_tests.cpp @@ -107,7 +107,7 @@ TEST_F(WddmMemoryManagerTests, GivenNotCompressedAndNotLockableAllocationTypeWhe EXPECT_NE(nullptr, graphicsAllocation); - EXPECT_TRUE(graphicsAllocation->storageInfo.isLockable); + EXPECT_TRUE(graphicsAllocation->isAllocationLockable()); memoryManager->freeGraphicsMemory(graphicsAllocation); } @@ -126,7 +126,7 @@ TEST_F(WddmMemoryManagerTests, GivenCompressedAndNotLockableAllocationTypeWhenAl EXPECT_NE(nullptr, graphicsAllocation); - EXPECT_FALSE(graphicsAllocation->storageInfo.isLockable); + EXPECT_FALSE(graphicsAllocation->isAllocationLockable()); memoryManager->freeGraphicsMemory(graphicsAllocation); } diff --git a/shared/test/unit_test/os_interface/windows/wddm_special_heap_test.cpp b/shared/test/unit_test/os_interface/windows/wddm_special_heap_test.cpp index ad59a46f54..e3a03df781 100644 --- a/shared/test/unit_test/os_interface/windows/wddm_special_heap_test.cpp +++ b/shared/test/unit_test/os_interface/windows/wddm_special_heap_test.cpp @@ -58,6 +58,8 @@ TEST_F(WddmFrontWindowPoolAllocatorTests, givenAllocateInFrontWindowPoolFlagWhen if (preferredAllocationMethod == GfxMemoryAllocationMethod::AllocateByKmd) { EXPECT_TRUE(allocation->isAllocationLockable()); + } else { + EXPECT_FALSE(allocation->isAllocationLockable()); } memManager->freeGraphicsMemory(allocation); } diff --git a/shared/test/unit_test/program/program_initialization_tests.cpp b/shared/test/unit_test/program/program_initialization_tests.cpp index 486745b89c..3c0e9e9554 100644 --- a/shared/test/unit_test/program/program_initialization_tests.cpp +++ b/shared/test/unit_test/program/program_initialization_tests.cpp @@ -67,6 +67,8 @@ TEST(AllocateGlobalSurfaceTest, GivenSvmAllocsManagerWhenGlobalsAreNotExportedTh } TEST(AllocateGlobalSurfaceTest, GivenSvmAllocsManagerWhenGlobalsAreExportedThenMemoryIsAllocatedAsUsmDeviceAllocation) { + DebugManagerStateRestore restorer; + DebugManager.flags.ForceLocalMemoryAccessMode.set(0); MockDevice device{}; REQUIRE_SVM_OR_SKIP(&device); device.injectMemoryManager(new MockMemoryManager());