From 095108edd8586bf3eda0eeab07dcfa7261fd7715 Mon Sep 17 00:00:00 2001 From: Maciej Plewka Date: Wed, 12 Apr 2023 11:56:43 +0000 Subject: [PATCH] Abort when blit resolve operation dispatched for different tilings Related-To: NEO-7872, NEO-7873, NEO-7874, NEO-7875 Signed-off-by: Maciej Plewka --- .../unit_test/xe_hp_core/copy_engine_tests_xe_hp_core.cpp | 2 +- .../generated/xe_hp_core/hw_cmds_generated_xe_hp_core.inl | 4 ++-- .../generated/xe_hpc_core/hw_cmds_generated_xe_hpc_core.inl | 4 ++-- .../generated/xe_hpg_core/hw_cmds_generated_xe_hpg_core.inl | 4 ++-- shared/source/helpers/blit_commands_helper_xehp_and_later.inl | 2 ++ 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/opencl/test/unit_test/xe_hp_core/copy_engine_tests_xe_hp_core.cpp b/opencl/test/unit_test/xe_hp_core/copy_engine_tests_xe_hp_core.cpp index 00f8534e39..5f9f4f4e86 100644 --- a/opencl/test/unit_test/xe_hp_core/copy_engine_tests_xe_hp_core.cpp +++ b/opencl/test/unit_test/xe_hp_core/copy_engine_tests_xe_hp_core.cpp @@ -243,7 +243,7 @@ XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenCompressedBufferWhenResolveBlitIsCal auto bltCmd = genCmdCast(*(hwParser.cmdList.begin())); EXPECT_NE(nullptr, bltCmd); - EXPECT_EQ(XY_COPY_BLT::SPECIAL_MODE_OF_OPERATION::SPECIAL_MODE_OF_OPERATION_FULL_RESOLVE, bltCmd->getSpecialModeofOperation()); + EXPECT_EQ(XY_COPY_BLT::SPECIAL_MODE_OF_OPERATION::SPECIAL_MODE_OF_OPERATION_FULL_RESOLVE, bltCmd->getSpecialModeOfOperation()); } XE_HP_CORE_TEST_F(BlitXE_HP_CORETests, givenCompressedBufferWhenNonAuxToAuxBlitIsCalledThenDontProgramSourceCompression) { diff --git a/shared/source/generated/xe_hp_core/hw_cmds_generated_xe_hp_core.inl b/shared/source/generated/xe_hp_core/hw_cmds_generated_xe_hp_core.inl index 461cf739a1..a0deb89c19 100644 --- a/shared/source/generated/xe_hp_core/hw_cmds_generated_xe_hp_core.inl +++ b/shared/source/generated/xe_hp_core/hw_cmds_generated_xe_hp_core.inl @@ -3532,7 +3532,7 @@ struct XY_BLOCK_COPY_BLT { TheStructure.Common.SpecialModeofOperation = value; } - inline SPECIAL_MODE_OF_OPERATION getSpecialModeofOperation() const { + inline SPECIAL_MODE_OF_OPERATION getSpecialModeOfOperation() const { return static_cast(TheStructure.Common.SpecialModeofOperation); } @@ -4216,7 +4216,7 @@ struct XY_FAST_COLOR_BLT { TheStructure.Common.SpecialModeofOperation = value; } - inline SPECIAL_MODE_OF_OPERATION getSpecialModeofOperation() const { + inline SPECIAL_MODE_OF_OPERATION getSpecialModeOfOperation() const { return static_cast(TheStructure.Common.SpecialModeofOperation); } diff --git a/shared/source/generated/xe_hpc_core/hw_cmds_generated_xe_hpc_core.inl b/shared/source/generated/xe_hpc_core/hw_cmds_generated_xe_hpc_core.inl index 5de2a4b8d2..bbafb7a9e9 100644 --- a/shared/source/generated/xe_hpc_core/hw_cmds_generated_xe_hpc_core.inl +++ b/shared/source/generated/xe_hpc_core/hw_cmds_generated_xe_hpc_core.inl @@ -3816,7 +3816,7 @@ struct XY_BLOCK_COPY_BLT { TheStructure.Common.SpecialModeofOperation = value; } - inline SPECIAL_MODE_OF_OPERATION getSpecialModeofOperation() const { + inline SPECIAL_MODE_OF_OPERATION getSpecialModeOfOperation() const { return static_cast(TheStructure.Common.SpecialModeofOperation); } @@ -4500,7 +4500,7 @@ struct XY_FAST_COLOR_BLT { TheStructure.Common.SpecialModeofOperation = value; } - inline SPECIAL_MODE_OF_OPERATION getSpecialModeofOperation() const { + inline SPECIAL_MODE_OF_OPERATION getSpecialModeOfOperation() const { return static_cast(TheStructure.Common.SpecialModeofOperation); } diff --git a/shared/source/generated/xe_hpg_core/hw_cmds_generated_xe_hpg_core.inl b/shared/source/generated/xe_hpg_core/hw_cmds_generated_xe_hpg_core.inl index da56320be9..f486706d91 100644 --- a/shared/source/generated/xe_hpg_core/hw_cmds_generated_xe_hpg_core.inl +++ b/shared/source/generated/xe_hpg_core/hw_cmds_generated_xe_hpg_core.inl @@ -3567,7 +3567,7 @@ struct XY_BLOCK_COPY_BLT { TheStructure.Common.SpecialModeofOperation = value; } - inline SPECIAL_MODE_OF_OPERATION getSpecialModeofOperation() const { + inline SPECIAL_MODE_OF_OPERATION getSpecialModeOfOperation() const { return static_cast(TheStructure.Common.SpecialModeofOperation); } @@ -4252,7 +4252,7 @@ struct XY_FAST_COLOR_BLT { TheStructure.Common.SpecialModeofOperation = value; } - inline SPECIAL_MODE_OF_OPERATION getSpecialModeofOperation() const { + inline SPECIAL_MODE_OF_OPERATION getSpecialModeOfOperation() const { return static_cast(TheStructure.Common.SpecialModeofOperation); } 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 8eab10e7ed..8bfeccf3a7 100644 --- a/shared/source/helpers/blit_commands_helper_xehp_and_later.inl +++ b/shared/source/helpers/blit_commands_helper_xehp_and_later.inl @@ -81,6 +81,7 @@ void BlitCommandsHelper::appendBlitCommandsBlockCopy(const BlitProper if (AuxTranslationDirection::AuxToNonAux == blitProperties.auxTranslationDirection) { blitCmd.setSpecialModeofOperation(XY_BLOCK_COPY_BLT::SPECIAL_MODE_OF_OPERATION::SPECIAL_MODE_OF_OPERATION_FULL_RESOLVE); + UNRECOVERABLE_IF(blitCmd.getSourceTiling() != blitCmd.getDestinationTiling()); } else if (AuxTranslationDirection::NonAuxToAux == blitProperties.auxTranslationDirection) { blitCmd.setSourceCompressionEnable(XY_BLOCK_COPY_BLT::COMPRESSION_ENABLE::COMPRESSION_ENABLE_COMPRESSION_DISABLE); } @@ -213,6 +214,7 @@ void BlitCommandsHelper::appendSurfaceType(const BlitProperties &blit template void BlitCommandsHelper::appendTilingType(const GMM_TILE_TYPE srcTilingType, const GMM_TILE_TYPE dstTilingType, typename GfxFamily::XY_BLOCK_COPY_BLT &blitCmd) { using XY_BLOCK_COPY_BLT = typename GfxFamily::XY_BLOCK_COPY_BLT; + UNRECOVERABLE_IF((srcTilingType != dstTilingType) && blitCmd.getSpecialModeOfOperation() == XY_BLOCK_COPY_BLT::SPECIAL_MODE_OF_OPERATION::SPECIAL_MODE_OF_OPERATION_FULL_RESOLVE); if (srcTilingType == GMM_TILED_4) { blitCmd.setSourceTiling(XY_BLOCK_COPY_BLT::TILING::TILING_TILE4); } else if (srcTilingType == GMM_TILED_64) {