From de92cd90be87da99dfda56d8135b997e3ce95887 Mon Sep 17 00:00:00 2001 From: Szymon Morek Date: Wed, 13 Aug 2025 12:38:09 +0000 Subject: [PATCH] refactor: respect comp format debug flags on iGPU Related-To: NEO-14942 Signed-off-by: Szymon Morek --- ..._stream_receiver_hw_tests_xe2_hpg_core.cpp | 35 +++------------ ...mand_stream_receiver_hw_tests_xe3_core.cpp | 35 +++------------ .../debug_settings/debug_variables_base.inl | 1 + .../blit_commands_helper_xe2_and_later.inl | 6 +-- ...ommand_stream_receiver_hw_xe2_hpg_core.cpp | 17 +------ .../command_stream_receiver_hw_xe3_core.cpp | 17 +------ shared/test/common/test_files/igdrcl.config | 1 + .../helpers/blit_commands_helper_tests.cpp | 45 +++++++------------ ...test_blit_commands_helper_xe2_hpg_core.cpp | 9 ++-- 9 files changed, 39 insertions(+), 127 deletions(-) diff --git a/opencl/test/unit_test/xe2_hpg_core/command_stream_receiver_hw_tests_xe2_hpg_core.cpp b/opencl/test/unit_test/xe2_hpg_core/command_stream_receiver_hw_tests_xe2_hpg_core.cpp index 9e96b3a926..57a0952543 100644 --- a/opencl/test/unit_test/xe2_hpg_core/command_stream_receiver_hw_tests_xe2_hpg_core.cpp +++ b/opencl/test/unit_test/xe2_hpg_core/command_stream_receiver_hw_tests_xe2_hpg_core.cpp @@ -579,6 +579,9 @@ struct Xe2BcsTests : public UltCommandStreamReceiverTest { XE2_HPG_CORETEST_F(Xe2BcsTests, givenBufferInDeviceMemoryWhenStatelessCompressionIsEnabledThenBlitterForBufferUsesStatelessCompressedSettings) { using MEM_COPY = typename Xe2HpgCoreFamily::MEM_COPY; + + debugManager.flags.BcsCompressionFormatForXe2Plus.set(0x1); + char buff[1024] = {0}; LinearStream stream(buff, 1024); MockGraphicsAllocation clearColorAlloc; @@ -600,13 +603,13 @@ XE2_HPG_CORETEST_F(Xe2BcsTests, givenBufferInDeviceMemoryWhenStatelessCompressio BlitCommandsHelper::appendBlitCommandsForBuffer(blitProperties, *bltCmd, context->getDevice(0)->getRootDeviceEnvironment()); - EXPECT_EQ(static_cast(debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get()), bltCmd->getCompressionFormat()); + EXPECT_EQ(static_cast(debugManager.flags.BcsCompressionFormatForXe2Plus.get()), bltCmd->getCompressionFormat()); } XE2_HPG_CORETEST_F(Xe2BcsTests, givenDstBufferInDeviceAndSrcInSystemMemoryWhenStatelessCompressionIsEnabledThenBlitterForBufferUsesStatelessCompressedSettings) { using MEM_COPY = typename Xe2HpgCoreFamily::MEM_COPY; - debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.set(0x1); + debugManager.flags.BcsCompressionFormatForXe2Plus.set(0x1); char buff[1024] = {0}; LinearStream stream(buff, 1024); @@ -630,33 +633,7 @@ XE2_HPG_CORETEST_F(Xe2BcsTests, givenDstBufferInDeviceAndSrcInSystemMemoryWhenSt BlitCommandsHelper::appendBlitCommandsForBuffer(blitProperties, *bltCmd, context->getDevice(0)->getRootDeviceEnvironment()); - EXPECT_EQ(static_cast(debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get()), bltCmd->getCompressionFormat()); -} - -XE2_HPG_CORETEST_F(Xe2BcsTests, givenBufferInSystemMemoryWhenStatelessCompressionIsEnabledThenBlitterForBufferDoesntUseStatelessCompressedSettings) { - using MEM_COPY = typename Xe2HpgCoreFamily::MEM_COPY; - char buff[1024] = {0}; - LinearStream stream(buff, 1024); - MockGraphicsAllocation clearColorAlloc; - - auto buffer = clUniquePtr(Buffer::create(context.get(), CL_MEM_FORCE_HOST_MEMORY_INTEL, MemoryConstants::pageSize64k, nullptr, retVal)); - EXPECT_EQ(CL_SUCCESS, retVal); - - auto allocation = buffer->getGraphicsAllocation(pClDevice->getRootDeviceIndex()); - EXPECT_TRUE(MemoryPoolHelper::isSystemMemoryPool(allocation->getMemoryPool())); - - auto blitProperties = BlitProperties::constructPropertiesForCopy(allocation, allocation, - 0, 0, {BlitterConstants::maxBlitWidth - 1, 1, 1}, 0, 0, 0, 0, &clearColorAlloc); - auto bltCmd = stream.getSpaceForCmd(); - *bltCmd = Xe2HpgCoreFamily::cmdInitXyCopyBlt; - - debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(true); - platformsImpl->clear(); - EXPECT_EQ(platform(), nullptr); - - BlitCommandsHelper::appendBlitCommandsForBuffer(blitProperties, *bltCmd, context->getDevice(0)->getRootDeviceEnvironment()); - - EXPECT_EQ(0u, bltCmd->getCompressionFormat()); + EXPECT_EQ(static_cast(debugManager.flags.BcsCompressionFormatForXe2Plus.get()), bltCmd->getCompressionFormat()); } XE2_HPG_CORETEST_F(Xe2BcsTests, givenCompressibleDstBuffersWhenAppendBlitCommandsForBufferCalledThenSetCompressionFormat) { diff --git a/opencl/test/unit_test/xe3_core/command_stream_receiver_hw_tests_xe3_core.cpp b/opencl/test/unit_test/xe3_core/command_stream_receiver_hw_tests_xe3_core.cpp index 2823bd8233..30b1a1da6b 100644 --- a/opencl/test/unit_test/xe3_core/command_stream_receiver_hw_tests_xe3_core.cpp +++ b/opencl/test/unit_test/xe3_core/command_stream_receiver_hw_tests_xe3_core.cpp @@ -350,6 +350,9 @@ struct Xe3BcsTests : public UltCommandStreamReceiverTest { XE3_CORETEST_F(Xe3BcsTests, givenBufferInDeviceMemoryWhenStatelessCompressionIsEnabledThenBlitterForBufferUsesStatelessCompressedSettings) { using MEM_COPY = typename Xe3CoreFamily::MEM_COPY; + + debugManager.flags.BcsCompressionFormatForXe2Plus.set(0x1); + char buff[1024] = {0}; LinearStream stream(buff, 1024); MockGraphicsAllocation clearColorAlloc; @@ -371,13 +374,13 @@ XE3_CORETEST_F(Xe3BcsTests, givenBufferInDeviceMemoryWhenStatelessCompressionIsE BlitCommandsHelper::appendBlitCommandsForBuffer(blitProperties, *bltCmd, context->getDevice(0)->getRootDeviceEnvironment()); - EXPECT_EQ(static_cast(debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get()), bltCmd->getCompressionFormat()); + EXPECT_EQ(static_cast(debugManager.flags.BcsCompressionFormatForXe2Plus.get()), bltCmd->getCompressionFormat()); } XE3_CORETEST_F(Xe3BcsTests, givenDstBufferInDeviceAndSrcInSystemMemoryWhenStatelessCompressionIsEnabledThenBlitterForBufferUsesStatelessCompressedSettings) { using MEM_COPY = typename Xe3CoreFamily::MEM_COPY; - debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.set(0x1); + debugManager.flags.BcsCompressionFormatForXe2Plus.set(0x1); char buff[1024] = {0}; LinearStream stream(buff, 1024); @@ -401,33 +404,7 @@ XE3_CORETEST_F(Xe3BcsTests, givenDstBufferInDeviceAndSrcInSystemMemoryWhenStatel BlitCommandsHelper::appendBlitCommandsForBuffer(blitProperties, *bltCmd, context->getDevice(0)->getRootDeviceEnvironment()); - EXPECT_EQ(static_cast(debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get()), bltCmd->getCompressionFormat()); -} - -XE3_CORETEST_F(Xe3BcsTests, givenBufferInSystemMemoryWhenStatelessCompressionIsEnabledThenBlitterForBufferDoesntUseStatelessCompressedSettings) { - using MEM_COPY = typename Xe3CoreFamily::MEM_COPY; - char buff[1024] = {0}; - LinearStream stream(buff, 1024); - MockGraphicsAllocation clearColorAlloc; - - auto buffer = clUniquePtr(Buffer::create(context.get(), CL_MEM_FORCE_HOST_MEMORY_INTEL, MemoryConstants::pageSize64k, nullptr, retVal)); - EXPECT_EQ(CL_SUCCESS, retVal); - - auto allocation = buffer->getGraphicsAllocation(pClDevice->getRootDeviceIndex()); - EXPECT_TRUE(MemoryPoolHelper::isSystemMemoryPool(allocation->getMemoryPool())); - - auto blitProperties = BlitProperties::constructPropertiesForCopy(allocation, allocation, - 0, 0, {BlitterConstants::maxBlitWidth - 1, 1, 1}, 0, 0, 0, 0, &clearColorAlloc); - auto bltCmd = stream.getSpaceForCmd(); - *bltCmd = Xe3CoreFamily::cmdInitXyCopyBlt; - - debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(true); - platformsImpl->clear(); - EXPECT_EQ(platform(), nullptr); - - BlitCommandsHelper::appendBlitCommandsForBuffer(blitProperties, *bltCmd, context->getDevice(0)->getRootDeviceEnvironment()); - - EXPECT_EQ(0u, bltCmd->getCompressionFormat()); + EXPECT_EQ(static_cast(debugManager.flags.BcsCompressionFormatForXe2Plus.get()), bltCmd->getCompressionFormat()); } XE3_CORETEST_F(Xe3BcsTests, givenCompressibleDstBuffersWhenAppendBlitCommandsForBufferCalledThenSetCompressionFormat) { diff --git a/shared/source/debug_settings/debug_variables_base.inl b/shared/source/debug_settings/debug_variables_base.inl index 7d2b5ed780..6d0c3670ed 100644 --- a/shared/source/debug_settings/debug_variables_base.inl +++ b/shared/source/debug_settings/debug_variables_base.inl @@ -163,6 +163,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, ForceMemoryBankIndexOverride, -1, "-1: default, DECLARE_DEBUG_VARIABLE(int32_t, EnablePrivateScratchSlot1, -1, "-1: default, 0: disable, 1: enable Allows using private scratch space") DECLARE_DEBUG_VARIABLE(int32_t, DisablePipeControlPrecedingPostSyncCommand, -1, "-1 default - disabled adding PIPE_CONTROL, 0 - disabled adding PIPE_CONTROL, 1 - enabled adding PIPE_CONTROL") DECLARE_DEBUG_VARIABLE(int32_t, FormatForStatelessCompressionWithUnifiedMemory, 0xF, "Format for stateless compression with unified memory") +DECLARE_DEBUG_VARIABLE(int32_t, BcsCompressionFormatForXe2Plus, -1, "Format for compression starting from Xe2 on BCS copies") DECLARE_DEBUG_VARIABLE(int32_t, ForceBufferCompressionFormat, -1, "-1: default, >0: Format value") DECLARE_DEBUG_VARIABLE(int32_t, EnableHwGenerationLocalIds, -1, "-1: default, 0: disable, 1: enable : Enables generation of local ids on HW") DECLARE_DEBUG_VARIABLE(int32_t, WalkerPartitionPreferHighestDimension, -1, "-1: default, 0: prefer biggest dimension, 1: prefer Z over Y over X if they divide partition count evenly") diff --git a/shared/source/helpers/blit_commands_helper_xe2_and_later.inl b/shared/source/helpers/blit_commands_helper_xe2_and_later.inl index b0ba2e33b1..5b737b0ecd 100644 --- a/shared/source/helpers/blit_commands_helper_xe2_and_later.inl +++ b/shared/source/helpers/blit_commands_helper_xe2_and_later.inl @@ -19,10 +19,8 @@ void BlitCommandsHelper::appendBlitMemSetCompressionFormat(void *blit memSetCmd->setCompressionFormat(compressionFormat); } - if (debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.get()) { - if (!MemoryPoolHelper::isSystemMemoryPool(dstAlloc->getMemoryPool())) { - memSetCmd->setCompressionFormat(debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get()); - } + if (debugManager.flags.BcsCompressionFormatForXe2Plus.get() != -1) { + memSetCmd->setCompressionFormat(debugManager.flags.BcsCompressionFormatForXe2Plus.get()); } } diff --git a/shared/source/xe2_hpg_core/command_stream_receiver_hw_xe2_hpg_core.cpp b/shared/source/xe2_hpg_core/command_stream_receiver_hw_xe2_hpg_core.cpp index c0ab405394..0b4bedd8a2 100644 --- a/shared/source/xe2_hpg_core/command_stream_receiver_hw_xe2_hpg_core.cpp +++ b/shared/source/xe2_hpg_core/command_stream_receiver_hw_xe2_hpg_core.cpp @@ -227,21 +227,8 @@ void BlitCommandsHelper::appendBlitCommandsMemCopy(const BlitProperties } } - if (debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.get()) { - bool enable = false; - if (srcAllocation) { - if (!MemoryPoolHelper::isSystemMemoryPool(srcAllocation->getMemoryPool())) { - enable = true; - } - } - if (dstAllocation) { - if (!MemoryPoolHelper::isSystemMemoryPool(dstAllocation->getMemoryPool())) { - enable = true; - } - } - if (enable) { - compressionFormat = static_cast(debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get()); - } + if (debugManager.flags.BcsCompressionFormatForXe2Plus.get() != -1) { + compressionFormat = static_cast(debugManager.flags.BcsCompressionFormatForXe2Plus.get()); } blitCmd.setCompressionFormat(static_cast(compressionFormat)); diff --git a/shared/source/xe3_core/command_stream_receiver_hw_xe3_core.cpp b/shared/source/xe3_core/command_stream_receiver_hw_xe3_core.cpp index 7eb904f86f..eee43293b0 100644 --- a/shared/source/xe3_core/command_stream_receiver_hw_xe3_core.cpp +++ b/shared/source/xe3_core/command_stream_receiver_hw_xe3_core.cpp @@ -183,21 +183,8 @@ void BlitCommandsHelper::appendBlitCommandsMemCopy(const BlitProperties } } - if (debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.get()) { - bool enable = false; - if (srcAllocation) { - if (!MemoryPoolHelper::isSystemMemoryPool(srcAllocation->getMemoryPool())) { - enable = true; - } - } - if (dstAllocation) { - if (!MemoryPoolHelper::isSystemMemoryPool(dstAllocation->getMemoryPool())) { - enable = true; - } - } - if (enable) { - compressionFormat = static_cast(debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get()); - } + if (debugManager.flags.BcsCompressionFormatForXe2Plus.get() != -1) { + compressionFormat = static_cast(debugManager.flags.BcsCompressionFormatForXe2Plus.get()); } blitCmd.setCompressionFormat(static_cast(compressionFormat)); diff --git a/shared/test/common/test_files/igdrcl.config b/shared/test/common/test_files/igdrcl.config index 14f023db61..eb3d94eeec 100644 --- a/shared/test/common/test_files/igdrcl.config +++ b/shared/test/common/test_files/igdrcl.config @@ -314,6 +314,7 @@ OverrideMultiStoragePlacement = -1 ForceMultiTileAllocPlacement = 0 ForceSingleTileAllocPlacement = 0 FormatForStatelessCompressionWithUnifiedMemory = 0xF +BcsCompressionFormatForXe2Plus = -1 ForceBufferCompressionFormat = -1 ExperimentalSetWalkerPartitionCount = 0 EnableStatelessCompressionWithUnifiedMemory = 0 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 d8834d5e78..b420dd3bdd 100644 --- a/shared/test/unit_test/helpers/blit_commands_helper_tests.cpp +++ b/shared/test/unit_test/helpers/blit_commands_helper_tests.cpp @@ -562,15 +562,15 @@ HWTEST2_F(BlitTests, givenXe2HpgCoreWhenAppendBlitCommandsMemCopyIsCalledThenNot EXPECT_EQ(bltCmd.getCompressionFormat(), 0); } -HWTEST2_F(BlitTests, givenXe2HpgCoreWhenAppendBlitCommandsMemCopyIsCalledWithDebugFlagSetThenNothingChanged, IsXe2HpgCore) { +HWTEST2_F(BlitTests, givenXe2HpgCoreWhenAppendBlitCommandsMemCopyIsCalledWithDebugFlagSetThenCompFormatChanged, IsXe2HpgCore) { auto bltCmd = FamilyType::cmdInitXyCopyBlt; DebugManagerStateRestore restore{}; - debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1); + debugManager.flags.BcsCompressionFormatForXe2Plus.set(1); BlitProperties properties = {}; properties.dstAllocation = nullptr; properties.srcAllocation = nullptr; NEO::BlitCommandsHelper::appendBlitCommandsMemCopy(properties, bltCmd, pDevice->getRootDeviceEnvironment()); - EXPECT_EQ(bltCmd.getCompressionFormat(), 0); + EXPECT_EQ(bltCmd.getCompressionFormat(), 1u); } HWTEST2_F(BlitTests, givenXe2HpgCoreWhenDstGraphicAlloctionWhenAppendBlitCommandsMemCopyIsCalledThenCompressionChanged, IsXe2HpgCore) { @@ -599,9 +599,9 @@ HWTEST2_F(BlitTests, givenXe2HpgCoreWhenDstGraphicAlloctionAndStatelessFlagSetWh DebugManagerStateRestore dbgRestore; uint32_t newCompressionFormat = 1; - uint32_t statelessCompressionFormat = debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get(); + uint32_t statelessCompressionFormat = 15u; debugManager.flags.ForceBufferCompressionFormat.set(static_cast(newCompressionFormat)); - debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1); + debugManager.flags.BcsCompressionFormatForXe2Plus.set(statelessCompressionFormat); auto gmm = std::make_unique(pDevice->getGmmHelper()); gmm->setCompressionEnabled(true); @@ -621,7 +621,7 @@ HWTEST2_F(BlitTests, givenXe2HpgCoreWhenDstGraphicAlloctionAndStatelessFlagSetAn DebugManagerStateRestore dbgRestore; uint32_t newCompressionFormat = 2; - debugManager.flags.ForceBufferCompressionFormat.set(static_cast(newCompressionFormat)); + debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.set(static_cast(newCompressionFormat)); debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1); auto gmm = std::make_unique(pDevice->getGmmHelper()); @@ -661,10 +661,8 @@ HWTEST2_F(BlitTests, givenXe2HpgCoreWhenSrcGraphicAlloctionAndStatelessFlagSetWh BlitProperties properties = {}; DebugManagerStateRestore dbgRestore; - uint32_t newCompressionFormat = 1; - uint32_t statelessCompressionFormat = debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get(); - debugManager.flags.ForceBufferCompressionFormat.set(static_cast(newCompressionFormat)); - debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1); + uint32_t statelessCompressionFormat = 15u; + debugManager.flags.BcsCompressionFormatForXe2Plus.set(statelessCompressionFormat); auto gmm = std::make_unique(pDevice->getGmmHelper()); gmm->setCompressionEnabled(true); @@ -684,7 +682,7 @@ HWTEST2_F(BlitTests, givenXe2HpgCoreWhenSrcGraphicAlloctionAndStatelessFlagSetAn DebugManagerStateRestore dbgRestore; uint32_t newCompressionFormat = 2; - debugManager.flags.ForceBufferCompressionFormat.set(static_cast(newCompressionFormat)); + debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.set(static_cast(newCompressionFormat)); debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1); auto gmm = std::make_unique(pDevice->getGmmHelper()); @@ -708,17 +706,6 @@ HWTEST2_F(BlitTests, givenXe3CoreWhenAppendBlitCommandsMemCopyIsCalledThenNothin EXPECT_EQ(bltCmd.getCompressionFormat(), 0); } -HWTEST2_F(BlitTests, givenXe3CoreWhenAppendBlitCommandsMemCopyIsCalledWithDebugFlagSetThenNothingChanged, IsXe3Core) { - auto bltCmd = FamilyType::cmdInitXyCopyBlt; - DebugManagerStateRestore restore{}; - debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1); - BlitProperties properties = {}; - properties.dstAllocation = nullptr; - properties.srcAllocation = nullptr; - NEO::BlitCommandsHelper::appendBlitCommandsMemCopy(properties, bltCmd, pDevice->getRootDeviceEnvironment()); - EXPECT_EQ(bltCmd.getCompressionFormat(), 0); -} - HWTEST2_F(BlitTests, givenXe3CoreWhenDstGraphicAlloctionWhenAppendBlitCommandsMemCopyIsCalledThenCompressionChanged, IsXe3Core) { auto bltCmd = FamilyType::cmdInitXyCopyBlt; BlitProperties properties = {}; @@ -745,9 +732,9 @@ HWTEST2_F(BlitTests, givenXe3CoreWhenDstGraphicAlloctionAndStatelessFlagSetWhenA DebugManagerStateRestore dbgRestore; uint32_t newCompressionFormat = 1; - uint32_t statelessCompressionFormat = debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get(); + uint32_t statelessCompressionFormat = 15u; debugManager.flags.ForceBufferCompressionFormat.set(static_cast(newCompressionFormat)); - debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1); + debugManager.flags.BcsCompressionFormatForXe2Plus.set(statelessCompressionFormat); auto gmm = std::make_unique(pDevice->getGmmHelper()); gmm->setCompressionEnabled(true); @@ -767,7 +754,7 @@ HWTEST2_F(BlitTests, givenXe3CoreWhenDstGraphicAlloctionAndStatelessFlagSetAndSy DebugManagerStateRestore dbgRestore; uint32_t newCompressionFormat = 1; - debugManager.flags.ForceBufferCompressionFormat.set(static_cast(newCompressionFormat)); + debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.set(static_cast(newCompressionFormat)); debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1); auto gmm = std::make_unique(pDevice->getGmmHelper()); @@ -807,10 +794,8 @@ HWTEST2_F(BlitTests, givenXe3CoreWhenSrcGraphicAlloctionAndStatelessFlagSetWhenA BlitProperties properties = {}; DebugManagerStateRestore dbgRestore; - uint32_t newCompressionFormat = 1; - uint32_t statelessCompressionFormat = debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get(); - debugManager.flags.ForceBufferCompressionFormat.set(static_cast(newCompressionFormat)); - debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1); + uint32_t statelessCompressionFormat = 15u; + debugManager.flags.BcsCompressionFormatForXe2Plus.set(statelessCompressionFormat); auto gmm = std::make_unique(pDevice->getGmmHelper()); gmm->setCompressionEnabled(true); @@ -830,7 +815,7 @@ HWTEST2_F(BlitTests, givenXe3CoreWhenSrcGraphicAlloctionAndStatelessFlagSetAndSy DebugManagerStateRestore dbgRestore; uint32_t newCompressionFormat = 1; - debugManager.flags.ForceBufferCompressionFormat.set(static_cast(newCompressionFormat)); + debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.set(static_cast(newCompressionFormat)); debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1); auto gmm = std::make_unique(pDevice->getGmmHelper()); diff --git a/shared/test/unit_test/xe2_hpg_core/test_blit_commands_helper_xe2_hpg_core.cpp b/shared/test/unit_test/xe2_hpg_core/test_blit_commands_helper_xe2_hpg_core.cpp index af55f2242c..55e0241e9d 100644 --- a/shared/test/unit_test/xe2_hpg_core/test_blit_commands_helper_xe2_hpg_core.cpp +++ b/shared/test/unit_test/xe2_hpg_core/test_blit_commands_helper_xe2_hpg_core.cpp @@ -63,11 +63,11 @@ HWTEST2_F(BlitTests, givenOverridedMocksValueWhenAppendBlitCommandsForVillBuffer } } -HWTEST2_F(BlitTests, givenEnableStatelessCompressionWithUnifiedMemoryAndSystemMemWhenAppendBlitCommandsForVillBufferThenCompresionDisabled, IsXe2HpgCore) { +HWTEST2_F(BlitTests, givenEnableStatelessCompressionWithUnifiedMemoryAndSystemMemWhenAppendBlitCommandsForVillBufferThenCompresionEnabled, IsXe2HpgCore) { using MEM_SET = typename FamilyType::MEM_SET; DebugManagerStateRestore dbgRestore; debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(true); - debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.set(2); + debugManager.flags.BcsCompressionFormatForXe2Plus.set(2); uint32_t pattern = 1; uint32_t streamBuffer[100] = {}; @@ -86,15 +86,14 @@ HWTEST2_F(BlitTests, givenEnableStatelessCompressionWithUnifiedMemoryAndSystemMe EXPECT_NE(cmdList.end(), itor); { auto blitCmd = genCmdCast(*itor); - EXPECT_EQ(blitCmd->getCompressionFormat(), 0u); + EXPECT_EQ(blitCmd->getCompressionFormat(), 2u); } } HWTEST2_F(BlitTests, givenEnableStatelessCompressionWithUnifiedMemoryAndLocalMemWhenAppendBlitCommandsForVillBufferThenCompresionEnabled, IsXe2HpgCore) { using MEM_SET = typename FamilyType::MEM_SET; DebugManagerStateRestore dbgRestore; - debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(true); - debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.set(2); + debugManager.flags.BcsCompressionFormatForXe2Plus.set(2); uint32_t pattern = 1; uint32_t streamBuffer[100] = {};