From 4846fbe410d8d2aea598b8280617ece27426d857 Mon Sep 17 00:00:00 2001 From: Bartosz Dunajski Date: Wed, 29 Jan 2025 10:45:02 +0000 Subject: [PATCH] refactor: unify blit memory fill methods and pass BlitProperties 2 Related-To: NEO-13003 Signed-off-by: Bartosz Dunajski --- level_zero/core/source/cmdlist/cmdlist_hw.inl | 10 ++-- .../command_stream_receiver_hw_gen12lp.cpp | 4 +- shared/source/helpers/blit_commands_helper.h | 10 ++-- .../helpers/blit_commands_helper_base.inl | 59 ++++++++++--------- .../blit_commands_helper_pvc_and_later.inl | 17 +++--- .../blit_commands_helper_xehp_and_later.inl | 5 +- shared/source/helpers/blit_properties.cpp | 12 ++++ shared/source/helpers/blit_properties.h | 3 + shared/source/helpers/constants.h | 3 +- ...command_stream_receiver_hw_xe_hpg_core.cpp | 4 +- .../helpers/blit_commands_helper_tests.cpp | 24 ++++++-- .../helpers/blit_commands_helper_tests.inl | 5 +- ...est_blit_commands_helper_pvc_and_later.cpp | 40 ++++++++++--- ...test_blit_commands_helper_xe2_hpg_core.cpp | 34 ++++++++--- 14 files changed, 157 insertions(+), 73 deletions(-) diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.inl b/level_zero/core/source/cmdlist/cmdlist_hw.inl index d8912d8566..66975893d6 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw.inl @@ -2327,15 +2327,15 @@ ze_result_t CommandListCoreFamily::appendBlitFill(void *ptr, } } - uint64_t offset = getAllocationOffsetForAppendBlitFill(ptr, *gpuAllocation); + auto offset = getAllocationOffsetForAppendBlitFill(ptr, *gpuAllocation); commandContainer.addToResidencyContainer(gpuAllocation); uint32_t patternToCommand[4] = {}; memcpy_s(&patternToCommand, sizeof(patternToCommand), pattern, patternSize); - NEO::BlitCommandsHelper::dispatchBlitMemoryColorFill(gpuAllocation, offset, patternToCommand, patternSize, - *commandContainer.getCommandStream(), - size, - neoDevice->getRootDeviceEnvironmentRef()); + + auto blitProperties = NEO::BlitProperties::constructPropertiesForMemoryFill(gpuAllocation, size, patternToCommand, patternSize, offset); + + NEO::BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, *commandContainer.getCommandStream(), neoDevice->getRootDeviceEnvironmentRef()); dummyBlitWa.isWaRequired = true; appendSignalEventPostWalker(signalEvent, nullptr, nullptr, false, false, true); diff --git a/shared/source/gen12lp/command_stream_receiver_hw_gen12lp.cpp b/shared/source/gen12lp/command_stream_receiver_hw_gen12lp.cpp index f8d0262f2a..038d974732 100644 --- a/shared/source/gen12lp/command_stream_receiver_hw_gen12lp.cpp +++ b/shared/source/gen12lp/command_stream_receiver_hw_gen12lp.cpp @@ -108,8 +108,8 @@ void BlitCommandsHelper::appendBlitCommandsForImages(const BlitPropertie } template <> -void BlitCommandsHelper::dispatchBlitMemoryByteFill(NEO::GraphicsAllocation *dstAlloc, uint64_t offset, uint32_t *pattern, LinearStream &linearStream, size_t size, RootDeviceEnvironment &rootDeviceEnvironment) { - NEO::BlitCommandsHelper::dispatchBlitMemoryFill(dstAlloc, offset, pattern, linearStream, size, rootDeviceEnvironment, COLOR_DEPTH::COLOR_DEPTH_8_BIT_COLOR, 1); +void BlitCommandsHelper::dispatchBlitMemoryByteFill(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment) { + NEO::BlitCommandsHelper::dispatchBlitMemoryFill(blitProperties, linearStream, rootDeviceEnvironment); } template <> diff --git a/shared/source/helpers/blit_commands_helper.h b/shared/source/helpers/blit_commands_helper.h index 76dc015b4e..fd7493a2c3 100644 --- a/shared/source/helpers/blit_commands_helper.h +++ b/shared/source/helpers/blit_commands_helper.h @@ -49,9 +49,9 @@ struct BlitCommandsHelper { static void dispatchBlitCommandsForBufferRegion(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment); static void dispatchBlitCommandsForBufferPerRow(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment); static void dispatchBlitCommandsForImageRegion(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment); - static void dispatchBlitMemoryColorFill(NEO::GraphicsAllocation *dstAlloc, uint64_t offset, uint32_t *pattern, size_t patternSize, LinearStream &linearStream, size_t size, RootDeviceEnvironment &rootDeviceEnvironment); - static void dispatchBlitMemoryByteFill(NEO::GraphicsAllocation *dstAlloc, uint64_t offset, uint32_t *pattern, LinearStream &linearStream, size_t size, RootDeviceEnvironment &rootDeviceEnvironment); - static void dispatchBlitMemoryFill(NEO::GraphicsAllocation *dstAlloc, uint64_t offset, uint32_t *pattern, LinearStream &linearStream, size_t size, RootDeviceEnvironment &rootDeviceEnvironment, COLOR_DEPTH depth, size_t patternSize); + static void dispatchBlitMemoryColorFill(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment); + static void dispatchBlitMemoryByteFill(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment); + static void dispatchBlitMemoryFill(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment); static void dispatchDummyBlit(LinearStream &linearStream, EncodeDummyBlitWaArgs &waArgs); static size_t getDummyBlitSize(const EncodeDummyBlitWaArgs &waArgs); static bool isDummyBlitWaNeeded(const EncodeDummyBlitWaArgs &waArgs); @@ -67,9 +67,9 @@ struct BlitCommandsHelper { template static void appendColorDepth(const BlitProperties &blitProperties, T &blitCmd); static void appendBlitMemoryOptionsForFillBuffer(NEO::GraphicsAllocation *dstAlloc, typename GfxFamily::XY_COLOR_BLT &blitCmd, const RootDeviceEnvironment &rootDeviceEnvironment); - static void appendBlitFillCommand(typename GfxFamily::XY_COLOR_BLT &blitCmd); + static void appendBlitFillCommand(const BlitProperties &blitProperties, typename GfxFamily::XY_COLOR_BLT &blitCmd); static void appendBlitMemSetCompressionFormat(void *blitCmd, NEO::GraphicsAllocation *dstAlloc, uint32_t compressionFormat); - static void appendBlitMemSetCommand(void *blitCmd); + static void appendBlitMemSetCommand(const BlitProperties &blitProperties, void *blitCmd); static void appendSurfaceType(const BlitProperties &blitProperties, typename GfxFamily::XY_BLOCK_COPY_BLT &blitCmd); static void appendTilingEnable(typename GfxFamily::XY_COLOR_BLT &blitCmd); static void appendTilingType(const GMM_TILE_TYPE srcTilingType, const GMM_TILE_TYPE dstTilingType, typename GfxFamily::XY_BLOCK_COPY_BLT &blitCmd); diff --git a/shared/source/helpers/blit_commands_helper_base.inl b/shared/source/helpers/blit_commands_helper_base.inl index 251ddf65be..18c24b1d60 100644 --- a/shared/source/helpers/blit_commands_helper_base.inl +++ b/shared/source/helpers/blit_commands_helper_base.inl @@ -11,6 +11,7 @@ #include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/register_offsets.h" #include "shared/source/helpers/timestamp_packet.h" +#include "shared/source/utilities/lookup_array.h" #include @@ -253,22 +254,37 @@ void BlitCommandsHelper::dispatchBlitCommandsForBufferPerRow(const Bl } template -void BlitCommandsHelper::appendBlitMemSetCommand(void *blitCmd) {} +void BlitCommandsHelper::appendBlitMemSetCommand(const BlitProperties &blitProperties, void *blitCmd) {} template -void BlitCommandsHelper::dispatchBlitMemoryFill(NEO::GraphicsAllocation *dstAlloc, uint64_t offset, uint32_t *pattern, LinearStream &linearStream, size_t size, RootDeviceEnvironment &rootDeviceEnvironment, COLOR_DEPTH depth, size_t patternSize) { +void BlitCommandsHelper::dispatchBlitMemoryFill(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment) { using XY_COLOR_BLT = typename GfxFamily::XY_COLOR_BLT; auto blitCmd = GfxFamily::cmdInitXyColorBlt; const auto maxWidth = getMaxBlitWidth(rootDeviceEnvironment); const auto maxHeight = getMaxBlitHeight(rootDeviceEnvironment, true); - blitCmd.setFillColor(pattern); - blitCmd.setColorDepth(depth); + auto colorDepth = COLOR_DEPTH::COLOR_DEPTH_128_BIT_COLOR; - uint64_t sizeToFill = size / patternSize; + const LookupArray colorDepthLookup({{ + {1, COLOR_DEPTH::COLOR_DEPTH_8_BIT_COLOR}, + {2, COLOR_DEPTH::COLOR_DEPTH_16_BIT_COLOR}, + {4, COLOR_DEPTH::COLOR_DEPTH_32_BIT_COLOR}, + {8, COLOR_DEPTH::COLOR_DEPTH_64_BIT_COLOR}, + }}); + + auto colorDepthV = colorDepthLookup.find(blitProperties.fillPatternSize); + if (colorDepthV.has_value()) { + colorDepth = *colorDepthV; + } + + blitCmd.setFillColor(blitProperties.fillPattern); + blitCmd.setColorDepth(colorDepth); + + uint64_t sizeToFill = blitProperties.copySize.x / blitProperties.fillPatternSize; + uint64_t offset = blitProperties.dstOffset.x; while (sizeToFill != 0) { auto tmpCmd = blitCmd; - tmpCmd.setDestinationBaseAddress(ptrOffset(dstAlloc->getGpuAddress(), static_cast(offset))); + tmpCmd.setDestinationBaseAddress(ptrOffset(blitProperties.dstAllocation->getGpuAddress(), static_cast(offset))); uint64_t height = 0; uint64_t width = 0; if (sizeToFill <= maxWidth) { @@ -283,15 +299,15 @@ void BlitCommandsHelper::dispatchBlitMemoryFill(NEO::GraphicsAllocati } tmpCmd.setDestinationX2CoordinateRight(static_cast(width)); tmpCmd.setDestinationY2CoordinateBottom(static_cast(height)); - tmpCmd.setDestinationPitch(static_cast(width * patternSize)); + tmpCmd.setDestinationPitch(static_cast(width * blitProperties.fillPatternSize)); - appendBlitMemoryOptionsForFillBuffer(dstAlloc, tmpCmd, rootDeviceEnvironment); - appendBlitFillCommand(tmpCmd); + appendBlitMemoryOptionsForFillBuffer(blitProperties.dstAllocation, tmpCmd, rootDeviceEnvironment); + appendBlitFillCommand(blitProperties, tmpCmd); auto cmd = linearStream.getSpaceForCmd(); *cmd = tmpCmd; auto blitSize = width * height; - offset += (blitSize * patternSize); + offset += (blitSize * blitProperties.fillPatternSize); sizeToFill -= blitSize; } } @@ -554,25 +570,14 @@ template void BlitCommandsHelper::adjustControlSurfaceType(const BlitProperties &blitProperties, typename GfxFamily::XY_BLOCK_COPY_BLT &blitCmd) {} template -void BlitCommandsHelper::appendBlitFillCommand(typename GfxFamily::XY_COLOR_BLT &blitCmd) {} +void BlitCommandsHelper::appendBlitFillCommand(const BlitProperties &blitProperties, typename GfxFamily::XY_COLOR_BLT &blitCmd) {} template -void BlitCommandsHelper::dispatchBlitMemoryColorFill(NEO::GraphicsAllocation *dstAlloc, uint64_t offset, uint32_t *pattern, size_t patternSize, LinearStream &linearStream, size_t size, RootDeviceEnvironment &rootDeviceEnvironment) { - switch (patternSize) { - case 1: - NEO::BlitCommandsHelper::dispatchBlitMemoryByteFill(dstAlloc, offset, pattern, linearStream, size, rootDeviceEnvironment); - break; - case 2: - NEO::BlitCommandsHelper::dispatchBlitMemoryFill(dstAlloc, offset, pattern, linearStream, size, rootDeviceEnvironment, COLOR_DEPTH::COLOR_DEPTH_16_BIT_COLOR, 2); - break; - case 4: - NEO::BlitCommandsHelper::dispatchBlitMemoryFill(dstAlloc, offset, pattern, linearStream, size, rootDeviceEnvironment, COLOR_DEPTH::COLOR_DEPTH_32_BIT_COLOR, 4); - break; - case 8: - NEO::BlitCommandsHelper::dispatchBlitMemoryFill(dstAlloc, offset, pattern, linearStream, size, rootDeviceEnvironment, COLOR_DEPTH::COLOR_DEPTH_64_BIT_COLOR, 8); - break; - default: - NEO::BlitCommandsHelper::dispatchBlitMemoryFill(dstAlloc, offset, pattern, linearStream, size, rootDeviceEnvironment, COLOR_DEPTH::COLOR_DEPTH_128_BIT_COLOR, 16); +void BlitCommandsHelper::dispatchBlitMemoryColorFill(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment) { + if (blitProperties.fillPatternSize == 1) { + NEO::BlitCommandsHelper::dispatchBlitMemoryByteFill(blitProperties, linearStream, rootDeviceEnvironment); + } else { + NEO::BlitCommandsHelper::dispatchBlitMemoryFill(blitProperties, linearStream, rootDeviceEnvironment); } } diff --git a/shared/source/helpers/blit_commands_helper_pvc_and_later.inl b/shared/source/helpers/blit_commands_helper_pvc_and_later.inl index 7ded6974f4..85a3251e5e 100644 --- a/shared/source/helpers/blit_commands_helper_pvc_and_later.inl +++ b/shared/source/helpers/blit_commands_helper_pvc_and_later.inl @@ -12,7 +12,7 @@ namespace NEO { template -void BlitCommandsHelper::dispatchBlitMemoryByteFill(NEO::GraphicsAllocation *dstAlloc, uint64_t offset, uint32_t *pattern, LinearStream &linearStream, size_t size, RootDeviceEnvironment &rootDeviceEnvironment) { +void BlitCommandsHelper::dispatchBlitMemoryByteFill(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment) { using MEM_SET = typename Family::MEM_SET; auto blitCmd = Family::cmdInitMemSet; @@ -23,19 +23,20 @@ void BlitCommandsHelper::dispatchBlitMemoryByteFill(NEO::GraphicsAllo blitCmd.setDestinationMOCS(mocs); uint32_t compressionFormat = 0; - if (dstAlloc->isCompressionEnabled()) { - auto resourceFormat = dstAlloc->getDefaultGmm()->gmmResourceInfo->getResourceFormat(); + if (blitProperties.dstAllocation->isCompressionEnabled()) { + auto resourceFormat = blitProperties.dstAllocation->getDefaultGmm()->gmmResourceInfo->getResourceFormat(); compressionFormat = static_cast(rootDeviceEnvironment.getGmmClientContext()->getSurfaceStateCompressionFormat(resourceFormat)); } - appendBlitMemSetCompressionFormat(&blitCmd, dstAlloc, compressionFormat); + appendBlitMemSetCompressionFormat(&blitCmd, blitProperties.dstAllocation, compressionFormat); - blitCmd.setFillData(*pattern); + blitCmd.setFillData(*blitProperties.fillPattern); - auto sizeToFill = size; + auto sizeToFill = blitProperties.copySize.x; + uint64_t offset = blitProperties.dstOffset.x; while (sizeToFill != 0) { auto tmpCmd = blitCmd; - tmpCmd.setDestinationStartAddress(ptrOffset(dstAlloc->getGpuAddress(), static_cast(offset))); + tmpCmd.setDestinationStartAddress(ptrOffset(blitProperties.dstAllocation->getGpuAddress(), static_cast(offset))); size_t height = 0; size_t width = 0; if (sizeToFill <= BlitterConstants::maxBlitSetWidth) { @@ -52,7 +53,7 @@ void BlitCommandsHelper::dispatchBlitMemoryByteFill(NEO::GraphicsAllo tmpCmd.setFillHeight(static_cast(height)); tmpCmd.setDestinationPitch(static_cast(width)); - appendBlitMemSetCommand(&tmpCmd); + appendBlitMemSetCommand(blitProperties, &tmpCmd); auto cmd = linearStream.getSpaceForCmd(); *cmd = tmpCmd; diff --git a/shared/source/helpers/blit_commands_helper_xehp_and_later.inl b/shared/source/helpers/blit_commands_helper_xehp_and_later.inl index 872747a40b..91a18e1faf 100644 --- a/shared/source/helpers/blit_commands_helper_xehp_and_later.inl +++ b/shared/source/helpers/blit_commands_helper_xehp_and_later.inl @@ -367,7 +367,10 @@ void BlitCommandsHelper::dispatchDummyBlit(LinearStream &linearStream appendTilingEnable(blitCmd); appendBlitMemoryOptionsForFillBuffer(dummyAllocation, blitCmd, *rootDeviceEnvironment); - appendBlitFillCommand(blitCmd); + + BlitProperties blitProperties = {}; + + appendBlitFillCommand(blitProperties, blitCmd); auto cmd = linearStream.getSpaceForCmd(); *cmd = blitCmd; diff --git a/shared/source/helpers/blit_properties.cpp b/shared/source/helpers/blit_properties.cpp index 2934a53b32..f701247c37 100644 --- a/shared/source/helpers/blit_properties.cpp +++ b/shared/source/helpers/blit_properties.cpp @@ -13,6 +13,18 @@ namespace NEO { +BlitProperties BlitProperties::constructPropertiesForMemoryFill(GraphicsAllocation *dstAllocation, size_t size, uint32_t *pattern, size_t patternSize, size_t offset) { + return { + .blitDirection = BlitterConstants::BlitDirection::fill, + .dstAllocation = dstAllocation, + .fillPattern = pattern, + .copySize = {size, 1, 1}, + .dstOffset = {offset, 0, 0}, + .srcOffset = {0, 0, 0}, + .fillPatternSize = patternSize, + .isSystemMemoryPoolUsed = MemoryPoolHelper::isSystemMemoryPool(dstAllocation->getMemoryPool())}; +} + BlitProperties BlitProperties::constructPropertiesForReadWrite(BlitterConstants::BlitDirection blitDirection, CommandStreamReceiver &commandStreamReceiver, GraphicsAllocation *memObjAllocation, diff --git a/shared/source/helpers/blit_properties.h b/shared/source/helpers/blit_properties.h index 5c21ae4c79..7b1b34a35c 100644 --- a/shared/source/helpers/blit_properties.h +++ b/shared/source/helpers/blit_properties.h @@ -43,6 +43,7 @@ struct BlitSyncProperties { }; struct BlitProperties { + static BlitProperties constructPropertiesForMemoryFill(GraphicsAllocation *dstAllocation, size_t size, uint32_t *pattern, size_t patternSize, size_t offset); static BlitProperties constructPropertiesForReadWrite(BlitterConstants::BlitDirection blitDirection, CommandStreamReceiver &commandStreamReceiver, GraphicsAllocation *memObjAllocation, @@ -75,6 +76,7 @@ struct BlitProperties { GraphicsAllocation *dstAllocation = nullptr; GraphicsAllocation *srcAllocation = nullptr; GraphicsAllocation *clearColorAllocation = nullptr; + uint32_t *fillPattern = nullptr; uint64_t dstGpuAddress = 0; uint64_t srcGpuAddress = 0; @@ -86,6 +88,7 @@ struct BlitProperties { size_t dstSlicePitch = 0; size_t srcRowPitch = 0; size_t srcSlicePitch = 0; + size_t fillPatternSize = 0; Vec3 dstSize = 0; Vec3 srcSize = 0; size_t bytesPerPixel = 1; diff --git a/shared/source/helpers/constants.h b/shared/source/helpers/constants.h index f360f0c75d..86eb117095 100644 --- a/shared/source/helpers/constants.h +++ b/shared/source/helpers/constants.h @@ -70,9 +70,10 @@ enum class BlitDirection : uint32_t { bufferToHostPtr, hostPtrToBuffer, bufferToBuffer, + fill, hostPtrToImage, imageToHostPtr, - imageToImage + imageToImage, }; enum PostBlitMode : int32_t { diff --git a/shared/source/xe_hpg_core/command_stream_receiver_hw_xe_hpg_core.cpp b/shared/source/xe_hpg_core/command_stream_receiver_hw_xe_hpg_core.cpp index c4efed4f2f..8d81165245 100644 --- a/shared/source/xe_hpg_core/command_stream_receiver_hw_xe_hpg_core.cpp +++ b/shared/source/xe_hpg_core/command_stream_receiver_hw_xe_hpg_core.cpp @@ -150,8 +150,8 @@ void BlitCommandsHelper::appendBlitCommandsBlockCopy(const BlitPropertie } template <> -void BlitCommandsHelper::dispatchBlitMemoryByteFill(NEO::GraphicsAllocation *dstAlloc, uint64_t offset, uint32_t *pattern, LinearStream &linearStream, size_t size, RootDeviceEnvironment &rootDeviceEnvironment) { - NEO::BlitCommandsHelper::dispatchBlitMemoryFill(dstAlloc, offset, pattern, linearStream, size, rootDeviceEnvironment, COLOR_DEPTH::COLOR_DEPTH_8_BIT_COLOR, 1); +void BlitCommandsHelper::dispatchBlitMemoryByteFill(const BlitProperties &blitProperties, LinearStream &linearStream, RootDeviceEnvironment &rootDeviceEnvironment) { + NEO::BlitCommandsHelper::dispatchBlitMemoryFill(blitProperties, linearStream, rootDeviceEnvironment); } template <> 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 4fb43af458..5e24bc0c92 100644 --- a/shared/test/unit_test/helpers/blit_commands_helper_tests.cpp +++ b/shared/test/unit_test/helpers/blit_commands_helper_tests.cpp @@ -253,7 +253,10 @@ HWTEST_F(BlitTests, givenMemoryWhenFillPatternWithBlitThenCommandIsProgrammed) { MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory, reinterpret_cast(0x1234), 0x1000, 0, sizeof(uint32_t), MemoryPool::system4KBPages, MemoryManager::maxOsContextCount); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0, pattern, sizeof(uint32_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef()); + + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), pattern, sizeof(uint32_t), 0); + + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef()); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed())); @@ -270,7 +273,9 @@ HWTEST_F(BlitTests, givenMemorySizeBiggerThanMaxWidthButLessThanTwiceMaxWidthWhe reinterpret_cast(0x1234), 0x1000, 0, (2 * BlitterConstants::maxBlitWidth) - 1, MemoryPool::system4KBPages, MemoryManager::maxOsContextCount); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0, pattern, sizeof(uint32_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef()); + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), pattern, sizeof(uint32_t), 0); + + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef()); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed())); @@ -290,7 +295,10 @@ HWTEST_F(BlitTests, givenMemoryPointerOffsetVerifyCorrectDestinationBaseAddress) MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory, reinterpret_cast(0x1234), 0x1000, 0, sizeof(uint32_t), MemoryPool::system4KBPages, MemoryManager::maxOsContextCount); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0x234, pattern, sizeof(uint32_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef()); + + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), pattern, sizeof(uint32_t), 0x234); + + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef()); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed())); @@ -316,7 +324,10 @@ HWTEST_F(BlitTests, givenMemorySizeTwiceBiggerThanMaxWidthWhenFillPatternWithBli MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory, reinterpret_cast(0x1234), 0x1000, 0, (2 * BlitterConstants::maxBlitWidth * sizeof(uint32_t)), MemoryPool::system4KBPages, MemoryManager::maxOsContextCount); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0, pattern, sizeof(uint32_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef()); + + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), pattern, sizeof(uint32_t), 0); + + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef()); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed())); @@ -343,7 +354,10 @@ HWTEST_F(BlitTests, givenMemorySizeIsLessThanTwicenMaxWidthWhenFillPatternWithBl MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory, reinterpret_cast(0x1234), 0x1000, 0, ((BlitterConstants::maxBlitWidth + 1) * sizeof(uint32_t)), MemoryPool::system4KBPages, MemoryManager::maxOsContextCount); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0, pattern, sizeof(uint32_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef()); + + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), pattern, sizeof(uint32_t), 0); + + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef()); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed())); diff --git a/shared/test/unit_test/helpers/blit_commands_helper_tests.inl b/shared/test/unit_test/helpers/blit_commands_helper_tests.inl index 8002774ed1..38bcbfe626 100644 --- a/shared/test/unit_test/helpers/blit_commands_helper_tests.inl +++ b/shared/test/unit_test/helpers/blit_commands_helper_tests.inl @@ -10,6 +10,7 @@ #include "shared/source/execution_environment/execution_environment.h" #include "shared/source/gmm_helper/gmm_helper.h" #include "shared/source/helpers/blit_commands_helper.h" +#include "shared/source/helpers/blit_properties.h" #include "shared/source/helpers/definitions/command_encoder_args.h" #include "shared/test/common/cmd_parse/gen_cmd_parse.h" #include "shared/test/common/fixtures/device_fixture.h" @@ -53,7 +54,9 @@ class GivenLinearStreamWhenCallDispatchBlitMemoryColorFillThenCorrectDepthIsProg canonizedGpuAddress); uint32_t patternToCommand[4]; memset(patternToCommand, 4, patternSize); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0, patternToCommand, patternSize, stream, mockAllocation.getUnderlyingBufferSize(), device->getRootDeviceEnvironmentRef()); + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), patternToCommand, patternSize, 0); + + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, device->getRootDeviceEnvironmentRef()); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed())); diff --git a/shared/test/unit_test/helpers/test_blit_commands_helper_pvc_and_later.cpp b/shared/test/unit_test/helpers/test_blit_commands_helper_pvc_and_later.cpp index 1532f23246..013cf190e1 100644 --- a/shared/test/unit_test/helpers/test_blit_commands_helper_pvc_and_later.cpp +++ b/shared/test/unit_test/helpers/test_blit_commands_helper_pvc_and_later.cpp @@ -25,7 +25,10 @@ HWTEST2_F(BlitTests, givenOneBytePatternWhenFillPatternWithBlitThenCommandIsProg MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory, reinterpret_cast(0x1234), 0x1000, 0, sizeof(uint32_t), MemoryPool::system4KBPages, MemoryManager::maxOsContextCount); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef()); + + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0); + + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef()); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed())); @@ -41,7 +44,10 @@ HWTEST2_F(BlitTests, givenDeviceWithoutDefaultGmmWhenAppendBlitCommandsForVillBu MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory, reinterpret_cast(0x1234), 0x1000, 0, sizeof(uint32_t), MemoryPool::system4KBPages, MemoryManager::maxOsContextCount); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef()); + + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0); + + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef()); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed())); @@ -64,8 +70,10 @@ HWTEST2_F(BlitTests, givenGmmWithDisabledCompresionWhenAppendBlitCommandsForVill MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory, reinterpret_cast(0x1234), 0x1000, 0, sizeof(uint32_t), MemoryPool::system4KBPages, MemoryManager::maxOsContextCount); + + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0); mockAllocation.setGmm(gmm.get(), 0u); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef()); + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef()); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed())); @@ -90,7 +98,10 @@ HWTEST2_F(BlitTests, givenGmmWithEnabledCompresionWhenAppendBlitCommandsForVillB MemoryPool::system4KBPages, MemoryManager::maxOsContextCount); mockAllocation.setGmm(gmm.get(), 0u); auto &rootDeviceEnvironment = pDevice->getRootDeviceEnvironmentRef(); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), rootDeviceEnvironment); + + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0); + + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, rootDeviceEnvironment); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed())); @@ -118,7 +129,8 @@ HWTEST2_F(BlitTests, givenOverridedMocksValueWhenAppendBlitCommandsForVillBuffer MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory, reinterpret_cast(0x1234), 0x1000, 0, sizeof(uint32_t), MemoryPool::system4KBPages, MemoryManager::maxOsContextCount); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef()); + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0); + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef()); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed())); @@ -141,7 +153,10 @@ HWTEST2_F(BlitTests, givenEnableStatelessCompressionWithUnifiedMemoryAndSystemMe MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory, reinterpret_cast(0x1234), 0x1000, 0, sizeof(uint32_t), MemoryPool::system4KBPages, MemoryManager::maxOsContextCount); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef()); + + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0); + + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef()); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed())); @@ -172,7 +187,9 @@ HWTEST2_F(BlitTests, givenEnableStatelessCompressionWithUnifiedMemoryAndLocalMem MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory, reinterpret_cast(0x1234), 0x1000, 0, sizeof(uint32_t), MemoryPool::localMemory, MemoryManager::maxOsContextCount); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef()); + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0); + + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef()); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed())); @@ -193,7 +210,9 @@ HWTEST2_F(BlitTests, givenMemorySizeBiggerThanMaxWidthButLessThanTwiceMaxWidthWh MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory, reinterpret_cast(0x1234), 0x1000, 0, (2 * BlitterConstants::maxBlitSetWidth) - 1, MemoryPool::system4KBPages, MemoryManager::maxOsContextCount); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef()); + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0); + + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef()); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed())); @@ -213,7 +232,10 @@ HWTEST2_F(BlitTests, givenMemorySizeTwiceBiggerThanMaxWidthWhenFillPatternWithBl MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory, reinterpret_cast(0x1234), 0x1000, 0, (2 * BlitterConstants::maxBlitSetWidth), MemoryPool::system4KBPages, MemoryManager::maxOsContextCount); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef()); + + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0); + + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef()); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed())); 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 edbb25a862..76713ee2dd 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 @@ -25,7 +25,10 @@ HWTEST2_F(BlitTests, givenOneBytePatternWhenFillPatternWithBlitThenCommandIsProg MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory, reinterpret_cast(0x1234), 0x1000, 0, sizeof(uint32_t), MemoryPool::system4KBPages, MemoryManager::maxOsContextCount); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef()); + + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0); + + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef()); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed())); @@ -45,7 +48,10 @@ HWTEST2_F(BlitTests, givenOverridedMocksValueWhenAppendBlitCommandsForVillBuffer MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory, reinterpret_cast(0x1234), 0x1000, 0, sizeof(uint32_t), MemoryPool::system4KBPages, MemoryManager::maxOsContextCount); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef()); + + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0); + + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef()); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed())); @@ -69,7 +75,10 @@ HWTEST2_F(BlitTests, givenEnableStatelessCompressionWithUnifiedMemoryAndSystemMe MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory, reinterpret_cast(0x1234), 0x1000, 0, sizeof(uint32_t), MemoryPool::system4KBPages, MemoryManager::maxOsContextCount); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef()); + + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0); + + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef()); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed())); @@ -93,7 +102,10 @@ HWTEST2_F(BlitTests, givenEnableStatelessCompressionWithUnifiedMemoryAndLocalMem MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory, reinterpret_cast(0x1234), 0x1000, 0, sizeof(uint32_t), MemoryPool::localMemory, MemoryManager::maxOsContextCount); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef()); + + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0); + + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef()); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed())); @@ -113,7 +125,10 @@ HWTEST2_F(BlitTests, givenMemorySizeBiggerThanMaxWidthButLessThanTwiceMaxWidthWh MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory, reinterpret_cast(0x1234), 0x1000, 0, (2 * BlitterConstants::maxBlitSetWidth) - 1, MemoryPool::system4KBPages, MemoryManager::maxOsContextCount); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef()); + + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0); + + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef()); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed())); @@ -133,7 +148,10 @@ HWTEST2_F(BlitTests, givenMemorySizeTwiceBiggerThanMaxWidthWhenFillPatternWithBl MockGraphicsAllocation mockAllocation(0, 1u /*num gmms*/, AllocationType::internalHostMemory, reinterpret_cast(0x1234), 0x1000, 0, (2 * BlitterConstants::maxBlitSetWidth), MemoryPool::system4KBPages, MemoryManager::maxOsContextCount); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), pDevice->getRootDeviceEnvironmentRef()); + + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0); + + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef()); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed())); @@ -158,7 +176,9 @@ HWTEST2_F(BlitTests, givenGmmWithEnabledCompresionWhenAppendBlitCommandsForFillB MemoryPool::system4KBPages, MemoryManager::maxOsContextCount); mockAllocation.setGmm(gmm.get(), 0u); auto &rootDeviceEnvironment = pDevice->getRootDeviceEnvironmentRef(); - BlitCommandsHelper::dispatchBlitMemoryColorFill(&mockAllocation, 0, &pattern, sizeof(uint8_t), stream, mockAllocation.getUnderlyingBufferSize(), rootDeviceEnvironment); + auto blitProperties = BlitProperties::constructPropertiesForMemoryFill(&mockAllocation, mockAllocation.getUnderlyingBufferSize(), &pattern, sizeof(uint8_t), 0); + + BlitCommandsHelper::dispatchBlitMemoryColorFill(blitProperties, stream, rootDeviceEnvironment); GenCmdList cmdList; ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer( cmdList, ptrOffset(stream.getCpuBase(), 0), stream.getUsed()));