mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 07:14:10 +08:00
refactor: respect comp format debug flags on iGPU
Related-To: NEO-14942 Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3478aaec9d
commit
de92cd90be
@@ -579,6 +579,9 @@ struct Xe2BcsTests : public UltCommandStreamReceiverTest {
|
|||||||
|
|
||||||
XE2_HPG_CORETEST_F(Xe2BcsTests, givenBufferInDeviceMemoryWhenStatelessCompressionIsEnabledThenBlitterForBufferUsesStatelessCompressedSettings) {
|
XE2_HPG_CORETEST_F(Xe2BcsTests, givenBufferInDeviceMemoryWhenStatelessCompressionIsEnabledThenBlitterForBufferUsesStatelessCompressedSettings) {
|
||||||
using MEM_COPY = typename Xe2HpgCoreFamily::MEM_COPY;
|
using MEM_COPY = typename Xe2HpgCoreFamily::MEM_COPY;
|
||||||
|
|
||||||
|
debugManager.flags.BcsCompressionFormatForXe2Plus.set(0x1);
|
||||||
|
|
||||||
char buff[1024] = {0};
|
char buff[1024] = {0};
|
||||||
LinearStream stream(buff, 1024);
|
LinearStream stream(buff, 1024);
|
||||||
MockGraphicsAllocation clearColorAlloc;
|
MockGraphicsAllocation clearColorAlloc;
|
||||||
@@ -600,13 +603,13 @@ XE2_HPG_CORETEST_F(Xe2BcsTests, givenBufferInDeviceMemoryWhenStatelessCompressio
|
|||||||
|
|
||||||
BlitCommandsHelper<Xe2HpgCoreFamily>::appendBlitCommandsForBuffer<MEM_COPY>(blitProperties, *bltCmd, context->getDevice(0)->getRootDeviceEnvironment());
|
BlitCommandsHelper<Xe2HpgCoreFamily>::appendBlitCommandsForBuffer<MEM_COPY>(blitProperties, *bltCmd, context->getDevice(0)->getRootDeviceEnvironment());
|
||||||
|
|
||||||
EXPECT_EQ(static_cast<uint32_t>(debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get()), bltCmd->getCompressionFormat());
|
EXPECT_EQ(static_cast<uint32_t>(debugManager.flags.BcsCompressionFormatForXe2Plus.get()), bltCmd->getCompressionFormat());
|
||||||
}
|
}
|
||||||
|
|
||||||
XE2_HPG_CORETEST_F(Xe2BcsTests, givenDstBufferInDeviceAndSrcInSystemMemoryWhenStatelessCompressionIsEnabledThenBlitterForBufferUsesStatelessCompressedSettings) {
|
XE2_HPG_CORETEST_F(Xe2BcsTests, givenDstBufferInDeviceAndSrcInSystemMemoryWhenStatelessCompressionIsEnabledThenBlitterForBufferUsesStatelessCompressedSettings) {
|
||||||
using MEM_COPY = typename Xe2HpgCoreFamily::MEM_COPY;
|
using MEM_COPY = typename Xe2HpgCoreFamily::MEM_COPY;
|
||||||
|
|
||||||
debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.set(0x1);
|
debugManager.flags.BcsCompressionFormatForXe2Plus.set(0x1);
|
||||||
|
|
||||||
char buff[1024] = {0};
|
char buff[1024] = {0};
|
||||||
LinearStream stream(buff, 1024);
|
LinearStream stream(buff, 1024);
|
||||||
@@ -630,33 +633,7 @@ XE2_HPG_CORETEST_F(Xe2BcsTests, givenDstBufferInDeviceAndSrcInSystemMemoryWhenSt
|
|||||||
|
|
||||||
BlitCommandsHelper<Xe2HpgCoreFamily>::appendBlitCommandsForBuffer(blitProperties, *bltCmd, context->getDevice(0)->getRootDeviceEnvironment());
|
BlitCommandsHelper<Xe2HpgCoreFamily>::appendBlitCommandsForBuffer(blitProperties, *bltCmd, context->getDevice(0)->getRootDeviceEnvironment());
|
||||||
|
|
||||||
EXPECT_EQ(static_cast<uint32_t>(debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get()), bltCmd->getCompressionFormat());
|
EXPECT_EQ(static_cast<uint32_t>(debugManager.flags.BcsCompressionFormatForXe2Plus.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>(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<MEM_COPY>();
|
|
||||||
*bltCmd = Xe2HpgCoreFamily::cmdInitXyCopyBlt;
|
|
||||||
|
|
||||||
debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(true);
|
|
||||||
platformsImpl->clear();
|
|
||||||
EXPECT_EQ(platform(), nullptr);
|
|
||||||
|
|
||||||
BlitCommandsHelper<Xe2HpgCoreFamily>::appendBlitCommandsForBuffer(blitProperties, *bltCmd, context->getDevice(0)->getRootDeviceEnvironment());
|
|
||||||
|
|
||||||
EXPECT_EQ(0u, bltCmd->getCompressionFormat());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
XE2_HPG_CORETEST_F(Xe2BcsTests, givenCompressibleDstBuffersWhenAppendBlitCommandsForBufferCalledThenSetCompressionFormat) {
|
XE2_HPG_CORETEST_F(Xe2BcsTests, givenCompressibleDstBuffersWhenAppendBlitCommandsForBufferCalledThenSetCompressionFormat) {
|
||||||
|
|||||||
@@ -350,6 +350,9 @@ struct Xe3BcsTests : public UltCommandStreamReceiverTest {
|
|||||||
|
|
||||||
XE3_CORETEST_F(Xe3BcsTests, givenBufferInDeviceMemoryWhenStatelessCompressionIsEnabledThenBlitterForBufferUsesStatelessCompressedSettings) {
|
XE3_CORETEST_F(Xe3BcsTests, givenBufferInDeviceMemoryWhenStatelessCompressionIsEnabledThenBlitterForBufferUsesStatelessCompressedSettings) {
|
||||||
using MEM_COPY = typename Xe3CoreFamily::MEM_COPY;
|
using MEM_COPY = typename Xe3CoreFamily::MEM_COPY;
|
||||||
|
|
||||||
|
debugManager.flags.BcsCompressionFormatForXe2Plus.set(0x1);
|
||||||
|
|
||||||
char buff[1024] = {0};
|
char buff[1024] = {0};
|
||||||
LinearStream stream(buff, 1024);
|
LinearStream stream(buff, 1024);
|
||||||
MockGraphicsAllocation clearColorAlloc;
|
MockGraphicsAllocation clearColorAlloc;
|
||||||
@@ -371,13 +374,13 @@ XE3_CORETEST_F(Xe3BcsTests, givenBufferInDeviceMemoryWhenStatelessCompressionIsE
|
|||||||
|
|
||||||
BlitCommandsHelper<Xe3CoreFamily>::appendBlitCommandsForBuffer<MEM_COPY>(blitProperties, *bltCmd, context->getDevice(0)->getRootDeviceEnvironment());
|
BlitCommandsHelper<Xe3CoreFamily>::appendBlitCommandsForBuffer<MEM_COPY>(blitProperties, *bltCmd, context->getDevice(0)->getRootDeviceEnvironment());
|
||||||
|
|
||||||
EXPECT_EQ(static_cast<uint32_t>(debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get()), bltCmd->getCompressionFormat());
|
EXPECT_EQ(static_cast<uint32_t>(debugManager.flags.BcsCompressionFormatForXe2Plus.get()), bltCmd->getCompressionFormat());
|
||||||
}
|
}
|
||||||
|
|
||||||
XE3_CORETEST_F(Xe3BcsTests, givenDstBufferInDeviceAndSrcInSystemMemoryWhenStatelessCompressionIsEnabledThenBlitterForBufferUsesStatelessCompressedSettings) {
|
XE3_CORETEST_F(Xe3BcsTests, givenDstBufferInDeviceAndSrcInSystemMemoryWhenStatelessCompressionIsEnabledThenBlitterForBufferUsesStatelessCompressedSettings) {
|
||||||
using MEM_COPY = typename Xe3CoreFamily::MEM_COPY;
|
using MEM_COPY = typename Xe3CoreFamily::MEM_COPY;
|
||||||
|
|
||||||
debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.set(0x1);
|
debugManager.flags.BcsCompressionFormatForXe2Plus.set(0x1);
|
||||||
|
|
||||||
char buff[1024] = {0};
|
char buff[1024] = {0};
|
||||||
LinearStream stream(buff, 1024);
|
LinearStream stream(buff, 1024);
|
||||||
@@ -401,33 +404,7 @@ XE3_CORETEST_F(Xe3BcsTests, givenDstBufferInDeviceAndSrcInSystemMemoryWhenStatel
|
|||||||
|
|
||||||
BlitCommandsHelper<Xe3CoreFamily>::appendBlitCommandsForBuffer(blitProperties, *bltCmd, context->getDevice(0)->getRootDeviceEnvironment());
|
BlitCommandsHelper<Xe3CoreFamily>::appendBlitCommandsForBuffer(blitProperties, *bltCmd, context->getDevice(0)->getRootDeviceEnvironment());
|
||||||
|
|
||||||
EXPECT_EQ(static_cast<uint32_t>(debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get()), bltCmd->getCompressionFormat());
|
EXPECT_EQ(static_cast<uint32_t>(debugManager.flags.BcsCompressionFormatForXe2Plus.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>(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<MEM_COPY>();
|
|
||||||
*bltCmd = Xe3CoreFamily::cmdInitXyCopyBlt;
|
|
||||||
|
|
||||||
debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(true);
|
|
||||||
platformsImpl->clear();
|
|
||||||
EXPECT_EQ(platform(), nullptr);
|
|
||||||
|
|
||||||
BlitCommandsHelper<Xe3CoreFamily>::appendBlitCommandsForBuffer(blitProperties, *bltCmd, context->getDevice(0)->getRootDeviceEnvironment());
|
|
||||||
|
|
||||||
EXPECT_EQ(0u, bltCmd->getCompressionFormat());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
XE3_CORETEST_F(Xe3BcsTests, givenCompressibleDstBuffersWhenAppendBlitCommandsForBufferCalledThenSetCompressionFormat) {
|
XE3_CORETEST_F(Xe3BcsTests, givenCompressibleDstBuffersWhenAppendBlitCommandsForBufferCalledThenSetCompressionFormat) {
|
||||||
|
|||||||
@@ -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, 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, 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, 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, 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, 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")
|
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")
|
||||||
|
|||||||
@@ -19,10 +19,8 @@ void BlitCommandsHelper<GfxFamily>::appendBlitMemSetCompressionFormat(void *blit
|
|||||||
memSetCmd->setCompressionFormat(compressionFormat);
|
memSetCmd->setCompressionFormat(compressionFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.get()) {
|
if (debugManager.flags.BcsCompressionFormatForXe2Plus.get() != -1) {
|
||||||
if (!MemoryPoolHelper::isSystemMemoryPool(dstAlloc->getMemoryPool())) {
|
memSetCmd->setCompressionFormat(debugManager.flags.BcsCompressionFormatForXe2Plus.get());
|
||||||
memSetCmd->setCompressionFormat(debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -227,21 +227,8 @@ void BlitCommandsHelper<Family>::appendBlitCommandsMemCopy(const BlitProperties
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.get()) {
|
if (debugManager.flags.BcsCompressionFormatForXe2Plus.get() != -1) {
|
||||||
bool enable = false;
|
compressionFormat = static_cast<uint8_t>(debugManager.flags.BcsCompressionFormatForXe2Plus.get());
|
||||||
if (srcAllocation) {
|
|
||||||
if (!MemoryPoolHelper::isSystemMemoryPool(srcAllocation->getMemoryPool())) {
|
|
||||||
enable = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (dstAllocation) {
|
|
||||||
if (!MemoryPoolHelper::isSystemMemoryPool(dstAllocation->getMemoryPool())) {
|
|
||||||
enable = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (enable) {
|
|
||||||
compressionFormat = static_cast<uint8_t>(debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
blitCmd.setCompressionFormat(static_cast<COMPRESSION_FORMAT30>(compressionFormat));
|
blitCmd.setCompressionFormat(static_cast<COMPRESSION_FORMAT30>(compressionFormat));
|
||||||
|
|||||||
@@ -183,21 +183,8 @@ void BlitCommandsHelper<Family>::appendBlitCommandsMemCopy(const BlitProperties
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.get()) {
|
if (debugManager.flags.BcsCompressionFormatForXe2Plus.get() != -1) {
|
||||||
bool enable = false;
|
compressionFormat = static_cast<uint8_t>(debugManager.flags.BcsCompressionFormatForXe2Plus.get());
|
||||||
if (srcAllocation) {
|
|
||||||
if (!MemoryPoolHelper::isSystemMemoryPool(srcAllocation->getMemoryPool())) {
|
|
||||||
enable = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (dstAllocation) {
|
|
||||||
if (!MemoryPoolHelper::isSystemMemoryPool(dstAllocation->getMemoryPool())) {
|
|
||||||
enable = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (enable) {
|
|
||||||
compressionFormat = static_cast<uint8_t>(debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
blitCmd.setCompressionFormat(static_cast<COMPRESSION_FORMAT30>(compressionFormat));
|
blitCmd.setCompressionFormat(static_cast<COMPRESSION_FORMAT30>(compressionFormat));
|
||||||
|
|||||||
@@ -314,6 +314,7 @@ OverrideMultiStoragePlacement = -1
|
|||||||
ForceMultiTileAllocPlacement = 0
|
ForceMultiTileAllocPlacement = 0
|
||||||
ForceSingleTileAllocPlacement = 0
|
ForceSingleTileAllocPlacement = 0
|
||||||
FormatForStatelessCompressionWithUnifiedMemory = 0xF
|
FormatForStatelessCompressionWithUnifiedMemory = 0xF
|
||||||
|
BcsCompressionFormatForXe2Plus = -1
|
||||||
ForceBufferCompressionFormat = -1
|
ForceBufferCompressionFormat = -1
|
||||||
ExperimentalSetWalkerPartitionCount = 0
|
ExperimentalSetWalkerPartitionCount = 0
|
||||||
EnableStatelessCompressionWithUnifiedMemory = 0
|
EnableStatelessCompressionWithUnifiedMemory = 0
|
||||||
|
|||||||
@@ -562,15 +562,15 @@ HWTEST2_F(BlitTests, givenXe2HpgCoreWhenAppendBlitCommandsMemCopyIsCalledThenNot
|
|||||||
EXPECT_EQ(bltCmd.getCompressionFormat(), 0);
|
EXPECT_EQ(bltCmd.getCompressionFormat(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST2_F(BlitTests, givenXe2HpgCoreWhenAppendBlitCommandsMemCopyIsCalledWithDebugFlagSetThenNothingChanged, IsXe2HpgCore) {
|
HWTEST2_F(BlitTests, givenXe2HpgCoreWhenAppendBlitCommandsMemCopyIsCalledWithDebugFlagSetThenCompFormatChanged, IsXe2HpgCore) {
|
||||||
auto bltCmd = FamilyType::cmdInitXyCopyBlt;
|
auto bltCmd = FamilyType::cmdInitXyCopyBlt;
|
||||||
DebugManagerStateRestore restore{};
|
DebugManagerStateRestore restore{};
|
||||||
debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1);
|
debugManager.flags.BcsCompressionFormatForXe2Plus.set(1);
|
||||||
BlitProperties properties = {};
|
BlitProperties properties = {};
|
||||||
properties.dstAllocation = nullptr;
|
properties.dstAllocation = nullptr;
|
||||||
properties.srcAllocation = nullptr;
|
properties.srcAllocation = nullptr;
|
||||||
NEO::BlitCommandsHelper<FamilyType>::appendBlitCommandsMemCopy(properties, bltCmd, pDevice->getRootDeviceEnvironment());
|
NEO::BlitCommandsHelper<FamilyType>::appendBlitCommandsMemCopy(properties, bltCmd, pDevice->getRootDeviceEnvironment());
|
||||||
EXPECT_EQ(bltCmd.getCompressionFormat(), 0);
|
EXPECT_EQ(bltCmd.getCompressionFormat(), 1u);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST2_F(BlitTests, givenXe2HpgCoreWhenDstGraphicAlloctionWhenAppendBlitCommandsMemCopyIsCalledThenCompressionChanged, IsXe2HpgCore) {
|
HWTEST2_F(BlitTests, givenXe2HpgCoreWhenDstGraphicAlloctionWhenAppendBlitCommandsMemCopyIsCalledThenCompressionChanged, IsXe2HpgCore) {
|
||||||
@@ -599,9 +599,9 @@ HWTEST2_F(BlitTests, givenXe2HpgCoreWhenDstGraphicAlloctionAndStatelessFlagSetWh
|
|||||||
DebugManagerStateRestore dbgRestore;
|
DebugManagerStateRestore dbgRestore;
|
||||||
|
|
||||||
uint32_t newCompressionFormat = 1;
|
uint32_t newCompressionFormat = 1;
|
||||||
uint32_t statelessCompressionFormat = debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get();
|
uint32_t statelessCompressionFormat = 15u;
|
||||||
debugManager.flags.ForceBufferCompressionFormat.set(static_cast<int32_t>(newCompressionFormat));
|
debugManager.flags.ForceBufferCompressionFormat.set(static_cast<int32_t>(newCompressionFormat));
|
||||||
debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1);
|
debugManager.flags.BcsCompressionFormatForXe2Plus.set(statelessCompressionFormat);
|
||||||
|
|
||||||
auto gmm = std::make_unique<MockGmm>(pDevice->getGmmHelper());
|
auto gmm = std::make_unique<MockGmm>(pDevice->getGmmHelper());
|
||||||
gmm->setCompressionEnabled(true);
|
gmm->setCompressionEnabled(true);
|
||||||
@@ -621,7 +621,7 @@ HWTEST2_F(BlitTests, givenXe2HpgCoreWhenDstGraphicAlloctionAndStatelessFlagSetAn
|
|||||||
DebugManagerStateRestore dbgRestore;
|
DebugManagerStateRestore dbgRestore;
|
||||||
|
|
||||||
uint32_t newCompressionFormat = 2;
|
uint32_t newCompressionFormat = 2;
|
||||||
debugManager.flags.ForceBufferCompressionFormat.set(static_cast<int32_t>(newCompressionFormat));
|
debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.set(static_cast<int32_t>(newCompressionFormat));
|
||||||
debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1);
|
debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1);
|
||||||
|
|
||||||
auto gmm = std::make_unique<MockGmm>(pDevice->getGmmHelper());
|
auto gmm = std::make_unique<MockGmm>(pDevice->getGmmHelper());
|
||||||
@@ -661,10 +661,8 @@ HWTEST2_F(BlitTests, givenXe2HpgCoreWhenSrcGraphicAlloctionAndStatelessFlagSetWh
|
|||||||
BlitProperties properties = {};
|
BlitProperties properties = {};
|
||||||
DebugManagerStateRestore dbgRestore;
|
DebugManagerStateRestore dbgRestore;
|
||||||
|
|
||||||
uint32_t newCompressionFormat = 1;
|
uint32_t statelessCompressionFormat = 15u;
|
||||||
uint32_t statelessCompressionFormat = debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get();
|
debugManager.flags.BcsCompressionFormatForXe2Plus.set(statelessCompressionFormat);
|
||||||
debugManager.flags.ForceBufferCompressionFormat.set(static_cast<int32_t>(newCompressionFormat));
|
|
||||||
debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1);
|
|
||||||
|
|
||||||
auto gmm = std::make_unique<MockGmm>(pDevice->getGmmHelper());
|
auto gmm = std::make_unique<MockGmm>(pDevice->getGmmHelper());
|
||||||
gmm->setCompressionEnabled(true);
|
gmm->setCompressionEnabled(true);
|
||||||
@@ -684,7 +682,7 @@ HWTEST2_F(BlitTests, givenXe2HpgCoreWhenSrcGraphicAlloctionAndStatelessFlagSetAn
|
|||||||
DebugManagerStateRestore dbgRestore;
|
DebugManagerStateRestore dbgRestore;
|
||||||
|
|
||||||
uint32_t newCompressionFormat = 2;
|
uint32_t newCompressionFormat = 2;
|
||||||
debugManager.flags.ForceBufferCompressionFormat.set(static_cast<int32_t>(newCompressionFormat));
|
debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.set(static_cast<int32_t>(newCompressionFormat));
|
||||||
debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1);
|
debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1);
|
||||||
|
|
||||||
auto gmm = std::make_unique<MockGmm>(pDevice->getGmmHelper());
|
auto gmm = std::make_unique<MockGmm>(pDevice->getGmmHelper());
|
||||||
@@ -708,17 +706,6 @@ HWTEST2_F(BlitTests, givenXe3CoreWhenAppendBlitCommandsMemCopyIsCalledThenNothin
|
|||||||
EXPECT_EQ(bltCmd.getCompressionFormat(), 0);
|
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<FamilyType>::appendBlitCommandsMemCopy(properties, bltCmd, pDevice->getRootDeviceEnvironment());
|
|
||||||
EXPECT_EQ(bltCmd.getCompressionFormat(), 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
HWTEST2_F(BlitTests, givenXe3CoreWhenDstGraphicAlloctionWhenAppendBlitCommandsMemCopyIsCalledThenCompressionChanged, IsXe3Core) {
|
HWTEST2_F(BlitTests, givenXe3CoreWhenDstGraphicAlloctionWhenAppendBlitCommandsMemCopyIsCalledThenCompressionChanged, IsXe3Core) {
|
||||||
auto bltCmd = FamilyType::cmdInitXyCopyBlt;
|
auto bltCmd = FamilyType::cmdInitXyCopyBlt;
|
||||||
BlitProperties properties = {};
|
BlitProperties properties = {};
|
||||||
@@ -745,9 +732,9 @@ HWTEST2_F(BlitTests, givenXe3CoreWhenDstGraphicAlloctionAndStatelessFlagSetWhenA
|
|||||||
DebugManagerStateRestore dbgRestore;
|
DebugManagerStateRestore dbgRestore;
|
||||||
|
|
||||||
uint32_t newCompressionFormat = 1;
|
uint32_t newCompressionFormat = 1;
|
||||||
uint32_t statelessCompressionFormat = debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get();
|
uint32_t statelessCompressionFormat = 15u;
|
||||||
debugManager.flags.ForceBufferCompressionFormat.set(static_cast<int32_t>(newCompressionFormat));
|
debugManager.flags.ForceBufferCompressionFormat.set(static_cast<int32_t>(newCompressionFormat));
|
||||||
debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1);
|
debugManager.flags.BcsCompressionFormatForXe2Plus.set(statelessCompressionFormat);
|
||||||
|
|
||||||
auto gmm = std::make_unique<MockGmm>(pDevice->getGmmHelper());
|
auto gmm = std::make_unique<MockGmm>(pDevice->getGmmHelper());
|
||||||
gmm->setCompressionEnabled(true);
|
gmm->setCompressionEnabled(true);
|
||||||
@@ -767,7 +754,7 @@ HWTEST2_F(BlitTests, givenXe3CoreWhenDstGraphicAlloctionAndStatelessFlagSetAndSy
|
|||||||
DebugManagerStateRestore dbgRestore;
|
DebugManagerStateRestore dbgRestore;
|
||||||
|
|
||||||
uint32_t newCompressionFormat = 1;
|
uint32_t newCompressionFormat = 1;
|
||||||
debugManager.flags.ForceBufferCompressionFormat.set(static_cast<int32_t>(newCompressionFormat));
|
debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.set(static_cast<int32_t>(newCompressionFormat));
|
||||||
debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1);
|
debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1);
|
||||||
|
|
||||||
auto gmm = std::make_unique<MockGmm>(pDevice->getGmmHelper());
|
auto gmm = std::make_unique<MockGmm>(pDevice->getGmmHelper());
|
||||||
@@ -807,10 +794,8 @@ HWTEST2_F(BlitTests, givenXe3CoreWhenSrcGraphicAlloctionAndStatelessFlagSetWhenA
|
|||||||
BlitProperties properties = {};
|
BlitProperties properties = {};
|
||||||
DebugManagerStateRestore dbgRestore;
|
DebugManagerStateRestore dbgRestore;
|
||||||
|
|
||||||
uint32_t newCompressionFormat = 1;
|
uint32_t statelessCompressionFormat = 15u;
|
||||||
uint32_t statelessCompressionFormat = debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.get();
|
debugManager.flags.BcsCompressionFormatForXe2Plus.set(statelessCompressionFormat);
|
||||||
debugManager.flags.ForceBufferCompressionFormat.set(static_cast<int32_t>(newCompressionFormat));
|
|
||||||
debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1);
|
|
||||||
|
|
||||||
auto gmm = std::make_unique<MockGmm>(pDevice->getGmmHelper());
|
auto gmm = std::make_unique<MockGmm>(pDevice->getGmmHelper());
|
||||||
gmm->setCompressionEnabled(true);
|
gmm->setCompressionEnabled(true);
|
||||||
@@ -830,7 +815,7 @@ HWTEST2_F(BlitTests, givenXe3CoreWhenSrcGraphicAlloctionAndStatelessFlagSetAndSy
|
|||||||
DebugManagerStateRestore dbgRestore;
|
DebugManagerStateRestore dbgRestore;
|
||||||
|
|
||||||
uint32_t newCompressionFormat = 1;
|
uint32_t newCompressionFormat = 1;
|
||||||
debugManager.flags.ForceBufferCompressionFormat.set(static_cast<int32_t>(newCompressionFormat));
|
debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.set(static_cast<int32_t>(newCompressionFormat));
|
||||||
debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1);
|
debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(1);
|
||||||
|
|
||||||
auto gmm = std::make_unique<MockGmm>(pDevice->getGmmHelper());
|
auto gmm = std::make_unique<MockGmm>(pDevice->getGmmHelper());
|
||||||
|
|||||||
@@ -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;
|
using MEM_SET = typename FamilyType::MEM_SET;
|
||||||
DebugManagerStateRestore dbgRestore;
|
DebugManagerStateRestore dbgRestore;
|
||||||
debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(true);
|
debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(true);
|
||||||
debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.set(2);
|
debugManager.flags.BcsCompressionFormatForXe2Plus.set(2);
|
||||||
|
|
||||||
uint32_t pattern = 1;
|
uint32_t pattern = 1;
|
||||||
uint32_t streamBuffer[100] = {};
|
uint32_t streamBuffer[100] = {};
|
||||||
@@ -86,15 +86,14 @@ HWTEST2_F(BlitTests, givenEnableStatelessCompressionWithUnifiedMemoryAndSystemMe
|
|||||||
EXPECT_NE(cmdList.end(), itor);
|
EXPECT_NE(cmdList.end(), itor);
|
||||||
{
|
{
|
||||||
auto blitCmd = genCmdCast<MEM_SET *>(*itor);
|
auto blitCmd = genCmdCast<MEM_SET *>(*itor);
|
||||||
EXPECT_EQ(blitCmd->getCompressionFormat(), 0u);
|
EXPECT_EQ(blitCmd->getCompressionFormat(), 2u);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST2_F(BlitTests, givenEnableStatelessCompressionWithUnifiedMemoryAndLocalMemWhenAppendBlitCommandsForVillBufferThenCompresionEnabled, IsXe2HpgCore) {
|
HWTEST2_F(BlitTests, givenEnableStatelessCompressionWithUnifiedMemoryAndLocalMemWhenAppendBlitCommandsForVillBufferThenCompresionEnabled, IsXe2HpgCore) {
|
||||||
using MEM_SET = typename FamilyType::MEM_SET;
|
using MEM_SET = typename FamilyType::MEM_SET;
|
||||||
DebugManagerStateRestore dbgRestore;
|
DebugManagerStateRestore dbgRestore;
|
||||||
debugManager.flags.EnableStatelessCompressionWithUnifiedMemory.set(true);
|
debugManager.flags.BcsCompressionFormatForXe2Plus.set(2);
|
||||||
debugManager.flags.FormatForStatelessCompressionWithUnifiedMemory.set(2);
|
|
||||||
|
|
||||||
uint32_t pattern = 1;
|
uint32_t pattern = 1;
|
||||||
uint32_t streamBuffer[100] = {};
|
uint32_t streamBuffer[100] = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user