diff --git a/opencl/source/gen8/image_gen8.cpp b/opencl/source/gen8/image_gen8.cpp index 715d7ca9e5..62e456430b 100644 --- a/opencl/source/gen8/image_gen8.cpp +++ b/opencl/source/gen8/image_gen8.cpp @@ -20,7 +20,7 @@ template <> void ImageHw::setMediaSurfaceRotation(void *) {} template <> -void ImageHw::setSurfaceMemoryObjectControlStateIndexToMocsTable(void *, uint32_t) {} +void ImageHw::setSurfaceMemoryObjectControlState(void *, uint32_t) {} } // namespace NEO diff --git a/opencl/source/mem_obj/image.h b/opencl/source/mem_obj/image.h index f183a3d445..5face27fed 100644 --- a/opencl/source/mem_obj/image.h +++ b/opencl/source/mem_obj/image.h @@ -138,7 +138,7 @@ class Image : public MemObj { virtual void setImageArg(void *memory, bool isMediaBlockImage, uint32_t mipLevel, uint32_t rootDeviceIndex, bool useGlobalAtomics) = 0; virtual void setMediaImageArg(void *memory, uint32_t rootDeviceIndex) = 0; virtual void setMediaSurfaceRotation(void *memory) = 0; - virtual void setSurfaceMemoryObjectControlStateIndexToMocsTable(void *memory, uint32_t value) = 0; + virtual void setSurfaceMemoryObjectControlState(void *memory, uint32_t value) = 0; const cl_image_desc &getImageDesc() const; const cl_image_format &getImageFormat() const; @@ -305,7 +305,7 @@ class ImageHw : public Image { void setAuxParamsForMultisamples(RENDER_SURFACE_STATE *surfaceState); void setMediaImageArg(void *memory, uint32_t rootDeviceIndex) override; void setMediaSurfaceRotation(void *memory) override; - void setSurfaceMemoryObjectControlStateIndexToMocsTable(void *memory, uint32_t value) override; + void setSurfaceMemoryObjectControlState(void *memory, uint32_t value) override; void appendSurfaceStateParams(RENDER_SURFACE_STATE *surfaceState, uint32_t rootDeviceIndex, bool useGlobalAtomics); void appendSurfaceStateDepthParams(RENDER_SURFACE_STATE *surfaceState, Gmm *gmm); void appendSurfaceStateExt(void *memory); diff --git a/opencl/source/mem_obj/image.inl b/opencl/source/mem_obj/image.inl index ccca51e578..a2f3d0170f 100644 --- a/opencl/source/mem_obj/image.inl +++ b/opencl/source/mem_obj/image.inl @@ -167,7 +167,7 @@ void ImageHw::setMediaImageArg(void *memory, uint32_t rootDeviceIndex state.setXOffsetForVCr(0); state.setYOffsetForVCr(0); - setSurfaceMemoryObjectControlStateIndexToMocsTable( + setSurfaceMemoryObjectControlState( reinterpret_cast(&state), gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_IMAGE)); @@ -214,13 +214,13 @@ inline void ImageHw::setMediaSurfaceRotation(void *memory) { } template -inline void ImageHw::setSurfaceMemoryObjectControlStateIndexToMocsTable(void *memory, uint32_t value) { +inline void ImageHw::setSurfaceMemoryObjectControlState(void *memory, uint32_t value) { using MEDIA_SURFACE_STATE = typename GfxFamily::MEDIA_SURFACE_STATE; using SURFACE_FORMAT = typename MEDIA_SURFACE_STATE::SURFACE_FORMAT; auto surfaceState = reinterpret_cast(memory); - surfaceState->setSurfaceMemoryObjectControlStateIndexToMocsTables(value); + surfaceState->setSurfaceMemoryObjectControlState(value); } } // namespace NEO diff --git a/opencl/test/unit_test/command_queue/enqueue_kernel_2_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_kernel_2_tests.cpp index 08882df148..d422c32b5a 100644 --- a/opencl/test/unit_test/command_queue/enqueue_kernel_2_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_kernel_2_tests.cpp @@ -275,7 +275,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, EnqueueWorkItemTestsWithLimitedParamSet, givenDebugV auto itorCmd = find(cmdList.begin(), cmdList.end()); ASSERT_NE(itorWalker, itorCmd); auto *cmdSBA = (STATE_BASE_ADDRESS *)*itorCmd; - auto mocsProgrammed = cmdSBA->getStatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables() >> 1; + auto mocsProgrammed = cmdSBA->getStatelessDataPortAccessMemoryObjectControlState() >> 1; EXPECT_EQ(1u, mocsProgrammed); } diff --git a/opencl/test/unit_test/command_queue/enqueue_map_image_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_map_image_tests.cpp index 50681f4f08..0b37f39f4c 100644 --- a/opencl/test/unit_test/command_queue/enqueue_map_image_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_map_image_tests.cpp @@ -942,7 +942,7 @@ TEST_F(EnqueueMapImageTest, givenImage1DArrayWhenEnqueueMapImageIsCalledThenRetu void setImageArg(void *memory, bool isMediaBlockImage, uint32_t mipLevel, uint32_t rootDeviceIndex, bool useGlobalAtomics) override {} void setMediaImageArg(void *memory, uint32_t rootDeviceIndex) override {} void setMediaSurfaceRotation(void *memory) override {} - void setSurfaceMemoryObjectControlStateIndexToMocsTable(void *memory, uint32_t value) override {} + void setSurfaceMemoryObjectControlState(void *memory, uint32_t value) override {} void transformImage2dArrayTo3d(void *memory) override {} void transformImage3dTo2dArray(void *memory) override {} }; diff --git a/opencl/test/unit_test/gen11/image_tests_gen11.cpp b/opencl/test/unit_test/gen11/image_tests_gen11.cpp index 16d55584fc..6d51784fb3 100644 --- a/opencl/test/unit_test/gen11/image_tests_gen11.cpp +++ b/opencl/test/unit_test/gen11/image_tests_gen11.cpp @@ -93,16 +93,3 @@ GEN11TEST_F(gen11ImageTests, givenImageForGen11WhenClearColorParametersAreSetThe EXPECT_EQ(0, memcmp(&surfaceStateBefore, &surfaceStateAfter, sizeof(RENDER_SURFACE_STATE))); } - -using Gen11RenderSurfaceStateDataTests = ::testing::Test; - -GEN11TEST_F(Gen11RenderSurfaceStateDataTests, WhenMemoryObjectControlStateIndexToMocsTablesIsSetThenValueIsShift) { - using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE; - auto surfaceState = FamilyType::cmdInitRenderSurfaceState; - - uint32_t value = 4; - surfaceState.setMemoryObjectControlStateIndexToMocsTables(value); - - EXPECT_EQ(surfaceState.TheStructure.Common.MemoryObjectControlState_IndexToMocsTables, value >> 1); - EXPECT_EQ(surfaceState.getMemoryObjectControlStateIndexToMocsTables(), value); -} diff --git a/opencl/test/unit_test/gen12lp/image_tests_gen12lp.inl b/opencl/test/unit_test/gen12lp/image_tests_gen12lp.inl index 999a6596af..96d70487d1 100644 --- a/opencl/test/unit_test/gen12lp/image_tests_gen12lp.inl +++ b/opencl/test/unit_test/gen12lp/image_tests_gen12lp.inl @@ -156,16 +156,3 @@ GEN12LPTEST_F(gen12LpImageTests, givenMediaCompressionThenSurfaceStateParamsAreS EXPECT_TRUE(surfaceState.getMemoryCompressionEnable()); EXPECT_EQ(surfaceState.getAuxiliarySurfaceMode(), RENDER_SURFACE_STATE::AUXILIARY_SURFACE_MODE::AUXILIARY_SURFACE_MODE_AUX_NONE); } - -using Gen12lpRenderSurfaceStateDataTests = ::testing::Test; - -GEN12LPTEST_F(Gen12lpRenderSurfaceStateDataTests, WhenMemoryObjectControlStateIndexToMocsTablesIsSetThenValueIsShifted) { - using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE; - auto surfaceState = FamilyType::cmdInitRenderSurfaceState; - - uint32_t value = 4; - surfaceState.setMemoryObjectControlStateIndexToMocsTables(value); - - EXPECT_EQ(surfaceState.TheStructure.Common.MemoryObjectControlStateIndexToMocsTables, value >> 1); - EXPECT_EQ(surfaceState.getMemoryObjectControlStateIndexToMocsTables(), value); -} diff --git a/opencl/test/unit_test/gen9/image_tests_gen9.cpp b/opencl/test/unit_test/gen9/image_tests_gen9.cpp index 0f168b7dce..e26f6b2a89 100644 --- a/opencl/test/unit_test/gen9/image_tests_gen9.cpp +++ b/opencl/test/unit_test/gen9/image_tests_gen9.cpp @@ -27,16 +27,3 @@ GEN9TEST_F(gen9ImageTests, appendSurfaceSWhenAppendingSurfaceStateParamsThenSurf EXPECT_EQ(0, memcmp(&surfaceStateBefore, &surfaceStateAfter, sizeof(RENDER_SURFACE_STATE))); } - -using Gen9RenderSurfaceStateDataTests = ::testing::Test; - -GEN9TEST_F(Gen9RenderSurfaceStateDataTests, WhenMemoryObjectControlStateIndexToMocsTablesIsSetThenValueIsShifted) { - using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE; - auto surfaceState = FamilyType::cmdInitRenderSurfaceState; - - uint32_t value = 4; - surfaceState.setMemoryObjectControlStateIndexToMocsTables(value); - - EXPECT_EQ(surfaceState.TheStructure.Common.MemoryObjectControlState_IndexToMocsTables, value >> 1); - EXPECT_EQ(surfaceState.getMemoryObjectControlStateIndexToMocsTables(), value); -} diff --git a/opencl/test/unit_test/helpers/test_preamble_xehp_and_later.cpp b/opencl/test/unit_test/helpers/test_preamble_xehp_and_later.cpp index 1bf8f4ea13..80447a8908 100644 --- a/opencl/test/unit_test/helpers/test_preamble_xehp_and_later.cpp +++ b/opencl/test/unit_test/helpers/test_preamble_xehp_and_later.cpp @@ -256,16 +256,16 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHpCommandStreamReceiverFlushTaskTests, whenFlushC hwParserCsr.findHardwareCommands(); ASSERT_NE(nullptr, hwParserCsr.cmdStateBaseAddress); auto stateBaseAddress = static_cast(hwParserCsr.cmdStateBaseAddress); - auto expectedMocsIndexForStateless = gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CONST); - auto expectedMocsIndexForHeap = gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_STATE_HEAP_BUFFER); + auto expectedMocsForStateless = gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CONST); + auto expectedMocsForHeap = gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_STATE_HEAP_BUFFER); - EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getSurfaceStateMemoryObjectControlStateIndexToMocsTables()); - EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getDynamicStateMemoryObjectControlStateIndexToMocsTables()); - EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getGeneralStateMemoryObjectControlStateIndexToMocsTables()); - EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getInstructionMemoryObjectControlStateIndexToMocsTables()); - EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables()); - EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables()); - EXPECT_EQ(expectedMocsIndexForStateless, stateBaseAddress->getStatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables()); + EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getSurfaceStateMemoryObjectControlState()); + EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getDynamicStateMemoryObjectControlState()); + EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getGeneralStateMemoryObjectControlState()); + EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getInstructionMemoryObjectControlState()); + EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getBindlessSurfaceStateMemoryObjectControlState()); + EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getBindlessSamplerStateMemoryObjectControlState()); + EXPECT_EQ(expectedMocsForStateless, stateBaseAddress->getStatelessDataPortAccessMemoryObjectControlState()); } HWCMDTEST_F(IGFX_XE_HP_CORE, XeHpCommandStreamReceiverFlushTaskTests, whenFlushCalledThenStateBaseAddressHasAllCachesOffWhenDebugFlagIsPresent) { @@ -281,14 +281,14 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHpCommandStreamReceiverFlushTaskTests, whenFlushC hwParserCsr.findHardwareCommands(); ASSERT_NE(nullptr, hwParserCsr.cmdStateBaseAddress); auto stateBaseAddress = static_cast(hwParserCsr.cmdStateBaseAddress); - auto expectedMocsIndexForHeap = gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER_CACHELINE_MISALIGNED); + auto expectedMocsForHeap = gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER_CACHELINE_MISALIGNED); - EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getSurfaceStateMemoryObjectControlStateIndexToMocsTables()); - EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getDynamicStateMemoryObjectControlStateIndexToMocsTables()); - EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getGeneralStateMemoryObjectControlStateIndexToMocsTables()); - EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getInstructionMemoryObjectControlStateIndexToMocsTables()); - EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables()); - EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables()); + EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getSurfaceStateMemoryObjectControlState()); + EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getDynamicStateMemoryObjectControlState()); + EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getGeneralStateMemoryObjectControlState()); + EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getInstructionMemoryObjectControlState()); + EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getBindlessSurfaceStateMemoryObjectControlState()); + EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getBindlessSamplerStateMemoryObjectControlState()); } HWCMDTEST_F(IGFX_XE_HP_CORE, XeHpCommandStreamReceiverFlushTaskTests, givenL3ToL1DebugFlagWhenStatelessMocsIsProgrammedThenItHasL1CachingOn) { diff --git a/opencl/test/unit_test/mem_obj/image_validate_tests.cpp b/opencl/test/unit_test/mem_obj/image_validate_tests.cpp index 952d4cc6c9..d619835883 100644 --- a/opencl/test/unit_test/mem_obj/image_validate_tests.cpp +++ b/opencl/test/unit_test/mem_obj/image_validate_tests.cpp @@ -773,7 +773,7 @@ struct NullImage : public Image { void setImageArg(void *memory, bool isMediaBlockImage, uint32_t mipLevel, uint32_t rootDeviceIndex, bool useGlobalAtomics) override {} void setMediaImageArg(void *memory, uint32_t rootDeviceIndex) override {} void setMediaSurfaceRotation(void *memory) override {} - void setSurfaceMemoryObjectControlStateIndexToMocsTable(void *memory, uint32_t value) override {} + void setSurfaceMemoryObjectControlState(void *memory, uint32_t value) override {} void transformImage2dArrayTo3d(void *memory) override {} void transformImage3dTo2dArray(void *memory) override {} }; diff --git a/opencl/test/unit_test/mocks/mock_image.h b/opencl/test/unit_test/mocks/mock_image.h index 1aa760105f..b1ae852b72 100644 --- a/opencl/test/unit_test/mocks/mock_image.h +++ b/opencl/test/unit_test/mocks/mock_image.h @@ -40,7 +40,7 @@ struct MockImageBase : public Image { void setImageArg(void *memory, bool isMediaBlockImage, uint32_t mipLevel, uint32_t rootDeviceIndex, bool useGlobalAtomics) override {} void setMediaImageArg(void *memory, uint32_t rootDeviceIndex) override {} void setMediaSurfaceRotation(void *memory) override {} - void setSurfaceMemoryObjectControlStateIndexToMocsTable(void *memory, uint32_t value) override {} + void setSurfaceMemoryObjectControlState(void *memory, uint32_t value) override {} void transformImage2dArrayTo3d(void *memory) override {} void transformImage3dTo2dArray(void *memory) override {} }; diff --git a/opencl/test/unit_test/xe_hp_core/hw_helper_tests_xe_hp_core.cpp b/opencl/test/unit_test/xe_hp_core/hw_helper_tests_xe_hp_core.cpp index 018d8b04e0..643f8ced83 100644 --- a/opencl/test/unit_test/xe_hp_core/hw_helper_tests_xe_hp_core.cpp +++ b/opencl/test/unit_test/xe_hp_core/hw_helper_tests_xe_hp_core.cpp @@ -219,19 +219,6 @@ XE_HP_CORE_TEST_F(HwInfoConfigTestXE_HP_CORE, givenMultitileConfigWhenConfigurin } } -using XE_HP_CORERenderSurfaceStateDataTests = ::testing::Test; - -XE_HP_CORE_TEST_F(XE_HP_CORERenderSurfaceStateDataTests, WhenMemoryObjectControlStateIndexToMocsTablesIsSetThenValueIsShift) { - using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE; - auto surfaceState = FamilyType::cmdInitRenderSurfaceState; - - uint32_t value = 4; - surfaceState.setMemoryObjectControlStateIndexToMocsTables(value); - - EXPECT_EQ(surfaceState.TheStructure.Common.MemoryObjectControlStateIndexToMocsTables, value >> 1); - EXPECT_EQ(surfaceState.getMemoryObjectControlStateIndexToMocsTables(), value); -} - using LriHelperTestsXE_HP_CORE = ::testing::Test; XE_HP_CORE_TEST_F(LriHelperTestsXE_HP_CORE, whenProgrammingLriCommandThenExpectMmioRemapEnableCorrectlySet) { diff --git a/opencl/test/unit_test/xe_hpc_core/hw_helper_tests_xe_hpc_core.cpp b/opencl/test/unit_test/xe_hpc_core/hw_helper_tests_xe_hpc_core.cpp index a11f06cdd6..e605271553 100644 --- a/opencl/test/unit_test/xe_hpc_core/hw_helper_tests_xe_hpc_core.cpp +++ b/opencl/test/unit_test/xe_hpc_core/hw_helper_tests_xe_hpc_core.cpp @@ -823,19 +823,6 @@ XE_HPC_CORETEST_F(HwInfoConfigTestXeHpcCore, givenMultitileConfigWhenConfiguring } } -using XeHpcCoreRenderSurfaceStateDataTests = ::testing::Test; - -XE_HPC_CORETEST_F(XeHpcCoreRenderSurfaceStateDataTests, WhenMemoryObjectControlStateIndexToMocsTablesIsSetThenValueIsShift) { - using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE; - auto surfaceState = FamilyType::cmdInitRenderSurfaceState; - - uint32_t value = 4; - surfaceState.setMemoryObjectControlStateIndexToMocsTables(value); - - EXPECT_EQ(surfaceState.TheStructure.Common.MemoryObjectControlStateIndexToMocsTables, value >> 1); - EXPECT_EQ(surfaceState.getMemoryObjectControlStateIndexToMocsTables(), value); -} - using LriHelperTestsXeHpcCore = ::testing::Test; XE_HPC_CORETEST_F(LriHelperTestsXeHpcCore, whenProgrammingLriCommandThenExpectMmioRemapEnableCorrectlySet) { diff --git a/opencl/test/unit_test/xe_hpg_core/hw_helper_tests_xe_hpg_core.cpp b/opencl/test/unit_test/xe_hpg_core/hw_helper_tests_xe_hpg_core.cpp index 35fc490b1d..0325b3f598 100644 --- a/opencl/test/unit_test/xe_hpg_core/hw_helper_tests_xe_hpg_core.cpp +++ b/opencl/test/unit_test/xe_hpg_core/hw_helper_tests_xe_hpg_core.cpp @@ -114,19 +114,6 @@ XE_HPG_CORETEST_F(HwInfoConfigTestXeHpgCore, givenDebugVariableSetWhenConfigureI EXPECT_TRUE(hwInfo.capabilityTable.blitterOperationsSupported); } -using XeHpgCoreRenderSurfaceStateDataTests = ::testing::Test; - -XE_HPG_CORETEST_F(XeHpgCoreRenderSurfaceStateDataTests, WhenMemoryObjectControlStateIndexToMocsTablesIsSetThenValueIsShift) { - using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE; - auto surfaceState = FamilyType::cmdInitRenderSurfaceState; - - uint32_t value = 4; - surfaceState.setMemoryObjectControlStateIndexToMocsTables(value); - - EXPECT_EQ(surfaceState.TheStructure.Common.MemoryObjectControlStateIndexToMocsTables, value >> 1); - EXPECT_EQ(surfaceState.getMemoryObjectControlStateIndexToMocsTables(), value); -} - using LriHelperTestsXeHpgCore = ::testing::Test; XE_HPG_CORETEST_F(LriHelperTestsXeHpgCore, whenProgrammingLriCommandThenExpectMmioRemapEnableCorrectlySet) { diff --git a/shared/source/generated/gen11/hw_cmds_generated_gen11.inl b/shared/source/generated/gen11/hw_cmds_generated_gen11.inl index 814c259b0b..4f7f0e4944 100644 --- a/shared/source/generated/gen11/hw_cmds_generated_gen11.inl +++ b/shared/source/generated/gen11/hw_cmds_generated_gen11.inl @@ -2642,12 +2642,6 @@ typedef struct tagRENDER_SURFACE_STATE { inline uint32_t getMemoryObjectControlStateReserved() const { return (TheStructure.Common.MemoryObjectControlState_Reserved); } - inline void setMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { - TheStructure.Common.MemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint32_t getMemoryObjectControlStateIndexToMocsTables() const { - return (TheStructure.Common.MemoryObjectControlState_IndexToMocsTables << 1); - } inline void setMemoryObjectControlState(const uint32_t value) { TheStructure.Common.MemoryObjectControlState_Reserved = value; TheStructure.Common.MemoryObjectControlState_IndexToMocsTables = (value >> 1); @@ -3571,10 +3565,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getGeneralStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.GeneralStateMemoryObjectControlState_Reserved); } - inline void setGeneralStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setGeneralStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getGeneralStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getGeneralStateMemoryObjectControlState() const { return (TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagGENERALSTATEBASEADDRESS { @@ -3593,12 +3587,6 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateReserved() const { return (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved); } - inline void setStatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { - TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables() const { - return (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables << 1); - } inline void setStatelessDataPortAccessMemoryObjectControlState(const uint32_t value) { TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved = value; TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables = (value >> 1); @@ -3620,10 +3608,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getSurfaceStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.SurfaceStateMemoryObjectControlState_Reserved); } - inline void setSurfaceStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setSurfaceStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getSurfaceStateMemoryObjectControlState() const { return (TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagSURFACESTATEBASEADDRESS { @@ -3648,10 +3636,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getDynamicStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.DynamicStateMemoryObjectControlState_Reserved); } - inline void setDynamicStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setDynamicStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getDynamicStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getDynamicStateMemoryObjectControlState() const { return (TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagDYNAMICSTATEBASEADDRESS { @@ -3676,10 +3664,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getIndirectObjectMemoryObjectControlStateReserved() const { return (TheStructure.Common.IndirectObjectMemoryObjectControlState_Reserved); } - inline void setIndirectObjectMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setIndirectObjectMemoryObjectControlState(const uint64_t value) { TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getIndirectObjectMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getIndirectObjectMemoryObjectControlState() const { return (TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagINDIRECTOBJECTBASEADDRESS { @@ -3704,12 +3692,6 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getInstructionMemoryObjectControlStateReserved() const { return (TheStructure.Common.InstructionMemoryObjectControlState_Reserved); } - inline void setInstructionMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { - TheStructure.Common.InstructionMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint64_t getInstructionMemoryObjectControlStateIndexToMocsTables() const { - return (TheStructure.Common.InstructionMemoryObjectControlState_IndexToMocsTables << 1); - } inline void setInstructionMemoryObjectControlState(const uint32_t value) { uint64_t val = static_cast(value); TheStructure.Common.InstructionMemoryObjectControlState_Reserved = val; @@ -3790,10 +3772,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_Reserved); } - inline void setBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setBindlessSurfaceStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getBindlessSurfaceStateMemoryObjectControlState() const { return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagBINDLESSSURFACESTATEBASEADDRESS { @@ -3824,10 +3806,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getBindlessSamplerStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_Reserved); } - inline void setBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setBindlessSamplerStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getBindlessSamplerStateMemoryObjectControlState() const { return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagBINDLESSSAMPLERSTATEBASEADDRESS { @@ -4978,10 +4960,10 @@ typedef struct tagMEDIA_SURFACE_STATE { inline uint32_t getSurfaceMemoryObjectControlStateReserved() const { return (TheStructure.Common.SurfaceMemoryObjectControlState_Reserved); } - inline void setSurfaceMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { + inline void setSurfaceMemoryObjectControlState(const uint32_t value) { TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint32_t getSurfaceMemoryObjectControlStateIndexToMocsTables() const { + inline uint32_t getSurfaceMemoryObjectControlState() const { return (TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables << 1); } inline void setTiledResourceMode(const TILED_RESOURCE_MODE value) { diff --git a/shared/source/generated/gen12lp/hw_cmds_generated_gen12lp.inl b/shared/source/generated/gen12lp/hw_cmds_generated_gen12lp.inl index 41d8690167..ea17ec5198 100644 --- a/shared/source/generated/gen12lp/hw_cmds_generated_gen12lp.inl +++ b/shared/source/generated/gen12lp/hw_cmds_generated_gen12lp.inl @@ -2459,13 +2459,6 @@ typedef struct tagRENDER_SURFACE_STATE { inline uint32_t getMemoryObjectControlStateReserved() const { return (TheStructure.Common.MemoryObjectControlStateReserved_56); } - inline void setMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { - DEBUG_BREAK_IF(value > 0x7e000000L); - TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1; - } - inline uint32_t getMemoryObjectControlStateIndexToMocsTables() const { - return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1); - } inline void setMemoryObjectControlState(const uint32_t value) { TheStructure.Common.MemoryObjectControlStateReserved_56 = value; TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = (value >> 1); @@ -3384,10 +3377,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getGeneralStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.GeneralStateMemoryObjectControlState_Reserved); } - inline void setGeneralStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setGeneralStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getGeneralStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getGeneralStateMemoryObjectControlState() const { return (TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagGENERALSTATEBASEADDRESS { @@ -3406,12 +3399,6 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateReserved() const { return (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved); } - inline void setStatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { - TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables() const { - return (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables << 1); - } inline void setStatelessDataPortAccessMemoryObjectControlState(const uint32_t value) { TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved = value; TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables = (value >> 1); @@ -3433,10 +3420,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getSurfaceStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.SurfaceStateMemoryObjectControlState_Reserved); } - inline void setSurfaceStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setSurfaceStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getSurfaceStateMemoryObjectControlState() const { return (TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagSURFACESTATEBASEADDRESS { @@ -3461,10 +3448,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getDynamicStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.DynamicStateMemoryObjectControlState_Reserved); } - inline void setDynamicStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setDynamicStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getDynamicStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getDynamicStateMemoryObjectControlState() const { return (TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagDYNAMICSTATEBASEADDRESS { @@ -3489,10 +3476,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getIndirectObjectMemoryObjectControlStateReserved() const { return (TheStructure.Common.IndirectObjectMemoryObjectControlState_Reserved); } - inline void setIndirectObjectMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setIndirectObjectMemoryObjectControlState(const uint64_t value) { TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getIndirectObjectMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getIndirectObjectMemoryObjectControlState() const { return (TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagINDIRECTOBJECTBASEADDRESS { @@ -3517,12 +3504,6 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getInstructionMemoryObjectControlStateReserved() const { return (TheStructure.Common.InstructionMemoryObjectControlState_Reserved); } - inline void setInstructionMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { - TheStructure.Common.InstructionMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint64_t getInstructionMemoryObjectControlStateIndexToMocsTables() const { - return (TheStructure.Common.InstructionMemoryObjectControlState_IndexToMocsTables << 1); - } inline void setInstructionMemoryObjectControlState(const uint32_t value) { uint64_t val = static_cast(value); TheStructure.Common.InstructionMemoryObjectControlState_Reserved = val; @@ -3603,10 +3584,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_Reserved); } - inline void setBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setBindlessSurfaceStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getBindlessSurfaceStateMemoryObjectControlState() const { return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagBINDLESSSURFACESTATEBASEADDRESS { @@ -3637,10 +3618,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getBindlessSamplerStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_Reserved); } - inline void setBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setBindlessSamplerStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getBindlessSamplerStateMemoryObjectControlState() const { return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagBINDLESSSAMPLERSTATEBASEADDRESS { @@ -4473,12 +4454,12 @@ typedef struct tagMEDIA_SURFACE_STATE { inline uint32_t getXOffsetForUCb() const { return TheStructure.Common.XOffsetForU_Cb; } - inline void setSurfaceMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { + inline void setSurfaceMemoryObjectControlState(const uint32_t value) { UNRECOVERABLE_IF(value > 0x3f); - TheStructure.Common.SurfaceMemoryObjectControlStateIndexToMocsTables = value; + TheStructure.Common.SurfaceMemoryObjectControlStateIndexToMocsTables = value >> 1; } - inline uint32_t getSurfaceMemoryObjectControlStateIndexToMocsTables() const { - return TheStructure.Common.SurfaceMemoryObjectControlStateIndexToMocsTables; + inline uint32_t getSurfaceMemoryObjectControlState() const { + return TheStructure.Common.SurfaceMemoryObjectControlStateIndexToMocsTables << 1; } inline void setTiledResourceMode(const TILED_RESOURCE_MODE value) { TheStructure.Common.TiledResourceMode = value; diff --git a/shared/source/generated/gen8/hw_cmds_generated_gen8.inl b/shared/source/generated/gen8/hw_cmds_generated_gen8.inl index beea0c0866..50842e0f65 100644 --- a/shared/source/generated/gen8/hw_cmds_generated_gen8.inl +++ b/shared/source/generated/gen8/hw_cmds_generated_gen8.inl @@ -3639,16 +3639,6 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint32_t getInstructionBufferSize() const { return (TheStructure.Common.InstructionBufferSize); } - inline void setStatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { - if (value == 0) { - TheStructure.RawData[3] = 0x00710000; - } else { - TheStructure.RawData[3] = 0x00790000; - } - } - inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables() const { - return (uint32_t)(((TheStructure.RawData[3] & 0x007f0000u) == 0x00710000u) ? 0 : 2); - } inline void setInstructionMemoryObjectControlState(const uint32_t value) { TheStructure.Common.InstructionMemoryObjectControlState_AgeForQuadlru = value; TheStructure.Common.InstructionMemoryObjectControlState_Reserved = (value >> 2); diff --git a/shared/source/generated/gen9/hw_cmds_generated_gen9.inl b/shared/source/generated/gen9/hw_cmds_generated_gen9.inl index adc07be72e..39c1fde8e9 100644 --- a/shared/source/generated/gen9/hw_cmds_generated_gen9.inl +++ b/shared/source/generated/gen9/hw_cmds_generated_gen9.inl @@ -2675,12 +2675,6 @@ typedef struct tagRENDER_SURFACE_STATE { inline uint32_t getMemoryObjectControlStateReserved() const { return (TheStructure.Common.MemoryObjectControlState_Reserved); } - inline void setMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { - TheStructure.Common.MemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint32_t getMemoryObjectControlStateIndexToMocsTables() const { - return (TheStructure.Common.MemoryObjectControlState_IndexToMocsTables << 1); - } inline void setMemoryObjectControlState(const uint32_t value) { TheStructure.Common.MemoryObjectControlState_Reserved = value; TheStructure.Common.MemoryObjectControlState_IndexToMocsTables = (value >> 1); @@ -3484,10 +3478,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getGeneralStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.GeneralStateMemoryObjectControlState_Reserved); } - inline void setGeneralStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setGeneralStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getGeneralStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getGeneralStateMemoryObjectControlState() const { return (TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagGENERALSTATEBASEADDRESS { @@ -3506,12 +3500,6 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateReserved() const { return (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved); } - inline void setStatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { - TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables() const { - return (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables << 1); - } inline void setStatelessDataPortAccessMemoryObjectControlState(const uint32_t value) { TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved = value; TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables = (value >> 1); @@ -3533,10 +3521,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getSurfaceStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.SurfaceStateMemoryObjectControlState_Reserved); } - inline void setSurfaceStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setSurfaceStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getSurfaceStateMemoryObjectControlState() const { return (TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagSURFACESTATEBASEADDRESS { @@ -3561,10 +3549,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getDynamicStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.DynamicStateMemoryObjectControlState_Reserved); } - inline void setDynamicStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setDynamicStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getDynamicStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getDynamicStateMemoryObjectControlState() const { return (TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagDYNAMICSTATEBASEADDRESS { @@ -3589,10 +3577,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getIndirectObjectMemoryObjectControlStateReserved() const { return (TheStructure.Common.IndirectObjectMemoryObjectControlState_Reserved); } - inline void setIndirectObjectMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setIndirectObjectMemoryObjectControlState(const uint64_t value) { TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getIndirectObjectMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getIndirectObjectMemoryObjectControlState() const { return (TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagINDIRECTOBJECTBASEADDRESS { @@ -3617,12 +3605,6 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getInstructionMemoryObjectControlStateReserved() const { return (TheStructure.Common.InstructionMemoryObjectControlState_Reserved); } - inline void setInstructionMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { - TheStructure.Common.InstructionMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint64_t getInstructionMemoryObjectControlStateIndexToMocsTables() const { - return (TheStructure.Common.InstructionMemoryObjectControlState_IndexToMocsTables << 1); - } inline void setInstructionMemoryObjectControlState(const uint32_t value) { uint64_t val = static_cast(value); TheStructure.Common.InstructionMemoryObjectControlState_Reserved = val; @@ -3703,10 +3685,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_Reserved); } - inline void setBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setBindlessSurfaceStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getBindlessSurfaceStateMemoryObjectControlState() const { return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagBINDLESSSURFACESTATEBASEADDRESS { @@ -4728,10 +4710,10 @@ typedef struct tagMEDIA_SURFACE_STATE { inline uint32_t getSurfaceMemoryObjectControlStateReserved() const { return (TheStructure.Common.SurfaceMemoryObjectControlState_Reserved); } - inline void setSurfaceMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { + inline void setSurfaceMemoryObjectControlState(const uint32_t value) { TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint32_t getSurfaceMemoryObjectControlStateIndexToMocsTables() const { + inline uint32_t getSurfaceMemoryObjectControlState() const { return (TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables << 1); } inline void setTiledResourceMode(const TILED_RESOURCE_MODE value) { 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 32133c8da3..51e2b582a5 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 @@ -318,10 +318,10 @@ typedef struct tagMEDIA_SURFACE_STATE { inline uint32_t getSurfaceMemoryObjectControlStateReserved() const { return (TheStructure.Common.SurfaceMemoryObjectControlState_Reserved); } - inline void setSurfaceMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { + inline void setSurfaceMemoryObjectControlState(const uint32_t value) { TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint32_t getSurfaceMemoryObjectControlStateIndexToMocsTables() const { + inline uint32_t getSurfaceMemoryObjectControlState() const { return (TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables << 1); } inline void setTiledResourceMode(const TILED_RESOURCE_MODE value) { @@ -2066,13 +2066,6 @@ typedef struct tagRENDER_SURFACE_STATE { inline uint32_t getBaseMipLevel() const { return TheStructure.Common.BaseMipLevel; } - inline void setMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { - DEBUG_BREAK_IF(value > 0x7e000000L); - TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1; - } - inline uint32_t getMemoryObjectControlStateIndexToMocsTables() const { - return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1); - } inline void setMemoryObjectControlState(const uint32_t value) { TheStructure.Common.MemoryObjectControlStateEncryptedData = value; TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = (value >> 1); @@ -2992,10 +2985,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getGeneralStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.GeneralStateMemoryObjectControlState_Reserved); } - inline void setGeneralStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setGeneralStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getGeneralStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getGeneralStateMemoryObjectControlState() const { return (TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagGENERALSTATEBASEADDRESS { @@ -3032,12 +3025,6 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateReserved() const { return (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved); } - inline void setStatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { - TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables() const { - return (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables << 1); - } inline void setStatelessDataPortAccessMemoryObjectControlState(const uint32_t value) { TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved = value; TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables = (value >> 1); @@ -3059,10 +3046,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getSurfaceStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.SurfaceStateMemoryObjectControlState_Reserved); } - inline void setSurfaceStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setSurfaceStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getSurfaceStateMemoryObjectControlState() const { return (TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagSURFACESTATEBASEADDRESS { @@ -3087,10 +3074,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getDynamicStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.DynamicStateMemoryObjectControlState_Reserved); } - inline void setDynamicStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setDynamicStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getDynamicStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getDynamicStateMemoryObjectControlState() const { return (TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagDYNAMICSTATEBASEADDRESS { @@ -3115,12 +3102,6 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getInstructionMemoryObjectControlStateReserved() const { return (TheStructure.Common.InstructionMemoryObjectControlState_Reserved); } - inline void setInstructionMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { - TheStructure.Common.InstructionMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint64_t getInstructionMemoryObjectControlStateIndexToMocsTables() const { - return (TheStructure.Common.InstructionMemoryObjectControlState_IndexToMocsTables << 1); - } inline void setInstructionMemoryObjectControlState(const uint32_t value) { uint64_t val = static_cast(value); TheStructure.Common.InstructionMemoryObjectControlState_Reserved = val; @@ -3201,10 +3182,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_Reserved); } - inline void setBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setBindlessSurfaceStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getBindlessSurfaceStateMemoryObjectControlState() const { return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagBINDLESSSURFACESTATEBASEADDRESS { @@ -3235,10 +3216,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getBindlessSamplerStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_Reserved); } - inline void setBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setBindlessSamplerStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getBindlessSamplerStateMemoryObjectControlState() const { return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagBINDLESSSAMPLERSTATEBASEADDRESS { @@ -6120,11 +6101,11 @@ typedef struct tagMI_LOAD_REGISTER_MEM { return TheStructure.RawData[index]; } inline void - setMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { + setMemoryObjectControlState(const uint32_t value) { DEBUG_BREAK_IF(value > 0x7e00); TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1; } - inline uint32_t getMemoryObjectControlStateIndexToMocsTables() const { + inline uint32_t getMemoryObjectControlState() const { return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1); } inline void setMemoryObjectControlStateEnable(const bool value) { @@ -6472,11 +6453,11 @@ typedef struct tagMI_STORE_DATA_IMM { return TheStructure.Common.WorkloadPartitionIdOffsetEnable; } inline void - setMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { + setMemoryObjectControlState(const uint32_t value) { DEBUG_BREAK_IF(value > 0xfc000); TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1; } - inline uint32_t getMemoryObjectControlStateIndexToMocsTables() const { + inline uint32_t getMemoryObjectControlState() const { return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1); } inline void setMemoryObjectControlStateEnable(const bool value) { @@ -6580,11 +6561,11 @@ typedef struct tagMI_STORE_REGISTER_MEM { return TheStructure.RawData[index]; } inline void - setMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { + setMemoryObjectControlState(const uint32_t value) { DEBUG_BREAK_IF(value > 0x7e00); TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1; } - inline uint32_t getMemoryObjectControlStateIndexToMocsTables() const { + inline uint32_t getMemoryObjectControlState() const { return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1); } inline void setMemoryObjectControlStateEnable(const bool value) { 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 6e0e303ff5..786421725a 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 @@ -401,12 +401,12 @@ typedef struct tagMEDIA_SURFACE_STATE { inline uint32_t getXOffsetForUCb() const { return TheStructure.Common.XOffsetForU_Cb; } - inline void setSurfaceMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { + inline void setSurfaceMemoryObjectControlState(const uint32_t value) { UNRECOVERABLE_IF(value > 0x7e); - TheStructure.Common.SurfaceMemoryObjectControlStateIndexToMocsTables = value; + TheStructure.Common.SurfaceMemoryObjectControlStateIndexToMocsTables = value >> 1; } - inline uint32_t getSurfaceMemoryObjectControlStateIndexToMocsTables() const { - return TheStructure.Common.SurfaceMemoryObjectControlStateIndexToMocsTables; + inline uint32_t getSurfaceMemoryObjectControlState() const { + return TheStructure.Common.SurfaceMemoryObjectControlStateIndexToMocsTables << 1; } inline void setVerticalLineStrideOffset(const bool value) { TheStructure.Common.VerticalLineStrideOffset = value; @@ -2132,13 +2132,6 @@ typedef struct tagRENDER_SURFACE_STATE { mocs |= (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1); return (mocs); } - inline void setMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { - UNRECOVERABLE_IF(value > 0x3f); - TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1; - } - inline uint32_t getMemoryObjectControlStateIndexToMocsTables() const { - return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1); - } inline void setWidth(const uint32_t value) { TheStructure.Common.Width = value - 1; } @@ -3040,11 +3033,11 @@ typedef struct tagSTATE_BASE_ADDRESS { inline bool getGeneralStateBaseAddressModifyEnable() const { return TheStructure.Common.GeneralStateBaseAddressModifyEnable; } - inline void setGeneralStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setGeneralStateMemoryObjectControlState(const uint64_t value) { UNRECOVERABLE_IF(value > 0x7fL); TheStructure.Common.GeneralStateMemoryObjectControlStateIndexToMocsTables = (value >> 1); // patched } - inline uint64_t getGeneralStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getGeneralStateMemoryObjectControlState() const { return TheStructure.Common.GeneralStateMemoryObjectControlStateIndexToMocsTables << 1; // patched } typedef enum tagGENERALSTATEBASEADDRESS { @@ -3082,13 +3075,6 @@ typedef struct tagSTATE_BASE_ADDRESS { inline bool getDisableSupportForMultiGpuPartialWritesForStatelessMessages() const { return TheStructure.Common.DisableSupportForMultiGpuPartialWritesForStatelessMessages; } - inline void setStatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { - UNRECOVERABLE_IF(value > 0x7f); - TheStructure.Common.StatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables = (value >> 1); // patched - } - inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables() const { - return TheStructure.Common.StatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables << 1; // patched - } inline void setStatelessDataPortAccessMemoryObjectControlState(const uint32_t value) { // patched TheStructure.Common.StatelessDataPortAccessMemoryObjectControlStateReserved_112 = value; TheStructure.Common.StatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables = (value >> 1); @@ -3111,11 +3097,11 @@ typedef struct tagSTATE_BASE_ADDRESS { inline bool getSurfaceStateBaseAddressModifyEnable() const { return TheStructure.Common.SurfaceStateBaseAddressModifyEnable; } - inline void setSurfaceStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setSurfaceStateMemoryObjectControlState(const uint64_t value) { UNRECOVERABLE_IF(value > 0x7fL); TheStructure.Common.SurfaceStateMemoryObjectControlStateIndexToMocsTables = (value >> 1); // patched } - inline uint64_t getSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getSurfaceStateMemoryObjectControlState() const { return TheStructure.Common.SurfaceStateMemoryObjectControlStateIndexToMocsTables << 1; // patched } typedef enum tagSURFACESTATEBASEADDRESS { @@ -3135,11 +3121,11 @@ typedef struct tagSTATE_BASE_ADDRESS { inline bool getDynamicStateBaseAddressModifyEnable() const { return TheStructure.Common.DynamicStateBaseAddressModifyEnable; } - inline void setDynamicStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setDynamicStateMemoryObjectControlState(const uint64_t value) { UNRECOVERABLE_IF(value > 0x7fL); TheStructure.Common.DynamicStateMemoryObjectControlStateIndexToMocsTables = (value >> 1); // patched } - inline uint64_t getDynamicStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getDynamicStateMemoryObjectControlState() const { return TheStructure.Common.DynamicStateMemoryObjectControlStateIndexToMocsTables << 1; // patched } typedef enum tagDYNAMICSTATEBASEADDRESS { @@ -3159,13 +3145,6 @@ typedef struct tagSTATE_BASE_ADDRESS { inline bool getInstructionBaseAddressModifyEnable() const { return TheStructure.Common.InstructionBaseAddressModifyEnable; } - inline void setInstructionMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { - UNRECOVERABLE_IF(value > 0x7fL); - TheStructure.Common.InstructionMemoryObjectControlStateIndexToMocsTables = (value >> 1); // patched - } - inline uint64_t getInstructionMemoryObjectControlStateIndexToMocsTables() const { - return TheStructure.Common.InstructionMemoryObjectControlStateIndexToMocsTables << 1; //patched - } inline void setInstructionMemoryObjectControlState(const uint32_t value) { // patched uint64_t val = static_cast(value); TheStructure.Common.InstructionMemoryObjectControlStateReserved_324 = val; @@ -3245,11 +3224,11 @@ typedef struct tagSTATE_BASE_ADDRESS { inline bool getBindlessSurfaceStateBaseAddressModifyEnable() const { return TheStructure.Common.BindlessSurfaceStateBaseAddressModifyEnable; } - inline void setBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setBindlessSurfaceStateMemoryObjectControlState(const uint64_t value) { UNRECOVERABLE_IF((value >> 1) > 0x3fL); TheStructure.Common.BindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables = value >> 1; } - inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getBindlessSurfaceStateMemoryObjectControlState() const { return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables << 1); } typedef enum tagBINDLESSSURFACESTATEBASEADDRESS { @@ -3281,11 +3260,11 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getBindlessSamplerStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlStateReserved_612); } - inline void setBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setBindlessSamplerStateMemoryObjectControlState(const uint64_t value) { UNRECOVERABLE_IF((value >> 1) > 0x3fL); TheStructure.Common.BindlessSamplerStateMemoryObjectControlStateIndexToMocsTables = value >> 1; } - inline uint64_t getBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getBindlessSamplerStateMemoryObjectControlState() const { return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlStateIndexToMocsTables << 1); } typedef enum tagBINDLESSSAMPLERSTATEBASEADDRESS { 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 e407ad93ce..338d6b9ac4 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 @@ -318,10 +318,10 @@ typedef struct tagMEDIA_SURFACE_STATE { inline uint32_t getSurfaceMemoryObjectControlStateReserved() const { return (TheStructure.Common.SurfaceMemoryObjectControlState_Reserved); } - inline void setSurfaceMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { + inline void setSurfaceMemoryObjectControlState(const uint32_t value) { TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint32_t getSurfaceMemoryObjectControlStateIndexToMocsTables() const { + inline uint32_t getSurfaceMemoryObjectControlState() const { return (TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables << 1); } inline void setTiledResourceMode(const TILED_RESOURCE_MODE value) { @@ -2090,13 +2090,6 @@ typedef struct tagRENDER_SURFACE_STATE { inline uint32_t getBaseMipLevel() const { return TheStructure.Common.BaseMipLevel; } - inline void setMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { - DEBUG_BREAK_IF(value > 0x7e000000L); - TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1; - } - inline uint32_t getMemoryObjectControlStateIndexToMocsTables() const { - return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1); - } inline void setMemoryObjectControlState(const uint32_t value) { TheStructure.Common.MemoryObjectControlStateEncryptedData = value; TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = (value >> 1); @@ -3037,10 +3030,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getGeneralStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.GeneralStateMemoryObjectControlState_Reserved); } - inline void setGeneralStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setGeneralStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getGeneralStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getGeneralStateMemoryObjectControlState() const { return (TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagGENERALSTATEBASEADDRESS { @@ -3077,12 +3070,6 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateReserved() const { return (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved); } - inline void setStatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { - TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables() const { - return (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables << 1); - } inline void setL1CachePolicyL1CacheControl(const L1_CACHE_POLICY value) { TheStructure.Common.L1CachePolicyL1CacheControl = value; } @@ -3110,10 +3097,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getSurfaceStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.SurfaceStateMemoryObjectControlState_Reserved); } - inline void setSurfaceStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setSurfaceStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getSurfaceStateMemoryObjectControlState() const { return (TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagSURFACESTATEBASEADDRESS { @@ -3138,10 +3125,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getDynamicStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.DynamicStateMemoryObjectControlState_Reserved); } - inline void setDynamicStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setDynamicStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getDynamicStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getDynamicStateMemoryObjectControlState() const { return (TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagDYNAMICSTATEBASEADDRESS { @@ -3166,12 +3153,6 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getInstructionMemoryObjectControlStateReserved() const { return (TheStructure.Common.InstructionMemoryObjectControlState_Reserved); } - inline void setInstructionMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { - TheStructure.Common.InstructionMemoryObjectControlState_IndexToMocsTables = value >> 1; - } - inline uint64_t getInstructionMemoryObjectControlStateIndexToMocsTables() const { - return (TheStructure.Common.InstructionMemoryObjectControlState_IndexToMocsTables << 1); - } inline void setInstructionMemoryObjectControlState(const uint32_t value) { uint64_t val = static_cast(value); TheStructure.Common.InstructionMemoryObjectControlState_Reserved = val; @@ -3252,10 +3233,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_Reserved); } - inline void setBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setBindlessSurfaceStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getBindlessSurfaceStateMemoryObjectControlState() const { return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagBINDLESSSURFACESTATEBASEADDRESS { @@ -3286,10 +3267,10 @@ typedef struct tagSTATE_BASE_ADDRESS { inline uint64_t getBindlessSamplerStateMemoryObjectControlStateReserved() const { return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_Reserved); } - inline void setBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { + inline void setBindlessSamplerStateMemoryObjectControlState(const uint64_t value) { TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables = value >> 1; } - inline uint64_t getBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables() const { + inline uint64_t getBindlessSamplerStateMemoryObjectControlState() const { return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables << 1); } typedef enum tagBINDLESSSAMPLERSTATEBASEADDRESS { @@ -6221,11 +6202,11 @@ typedef struct tagMI_LOAD_REGISTER_MEM { return TheStructure.RawData[index]; } inline void - setMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { + setMemoryObjectControlState(const uint32_t value) { DEBUG_BREAK_IF(value > 0x7e00); TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1; } - inline uint32_t getMemoryObjectControlStateIndexToMocsTables() const { + inline uint32_t getMemoryObjectControlState() const { return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1); } inline void setMemoryObjectControlStateEnable(const bool value) { @@ -6573,11 +6554,11 @@ typedef struct tagMI_STORE_DATA_IMM { return TheStructure.Common.WorkloadPartitionIdOffsetEnable; } inline void - setMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { + setMemoryObjectControlState(const uint32_t value) { DEBUG_BREAK_IF(value > 0xfc000); TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1; } - inline uint32_t getMemoryObjectControlStateIndexToMocsTables() const { + inline uint32_t getMemoryObjectControlState() const { return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1); } inline void setMemoryObjectControlStateEnable(const bool value) { @@ -6681,11 +6662,11 @@ typedef struct tagMI_STORE_REGISTER_MEM { return TheStructure.RawData[index]; } inline void - setMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { + setMemoryObjectControlState(const uint32_t value) { DEBUG_BREAK_IF(value > 0x7e00); TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1; } - inline uint32_t getMemoryObjectControlStateIndexToMocsTables() const { + inline uint32_t getMemoryObjectControlState() const { return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1); } inline void setMemoryObjectControlStateEnable(const bool value) { diff --git a/shared/source/helpers/state_base_address_icllp_and_later.inl b/shared/source/helpers/state_base_address_icllp_and_later.inl index f3496fcf97..7219f21a98 100644 --- a/shared/source/helpers/state_base_address_icllp_and_later.inl +++ b/shared/source/helpers/state_base_address_icllp_and_later.inl @@ -34,8 +34,8 @@ void StateBaseAddressHelper::appendStateBaseAddressParameters( auto l3CacheOnPolicy = GMM_RESOURCE_USAGE_OCL_STATE_HEAP_BUFFER; if (gmmHelper != nullptr) { - stateBaseAddress->setBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables(gmmHelper->getMOCS(l3CacheOnPolicy)); - stateBaseAddress->setBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables(gmmHelper->getMOCS(l3CacheOnPolicy)); + stateBaseAddress->setBindlessSurfaceStateMemoryObjectControlState(gmmHelper->getMOCS(l3CacheOnPolicy)); + stateBaseAddress->setBindlessSamplerStateMemoryObjectControlState(gmmHelper->getMOCS(l3CacheOnPolicy)); } appendExtraCacheSettings(stateBaseAddress, gmmHelper); diff --git a/shared/source/helpers/state_base_address_xehp_and_later.inl b/shared/source/helpers/state_base_address_xehp_and_later.inl index a1ab13b7f3..3fe095a9e0 100644 --- a/shared/source/helpers/state_base_address_xehp_and_later.inl +++ b/shared/source/helpers/state_base_address_xehp_and_later.inl @@ -61,11 +61,11 @@ void StateBaseAddressHelper::appendStateBaseAddressParameters( stateBaseAddress->setInstructionMemoryObjectControlState(gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER_CACHELINE_MISALIGNED)); } - stateBaseAddress->setSurfaceStateMemoryObjectControlStateIndexToMocsTables(gmmHelper->getMOCS(l3CacheOnPolicy)); - stateBaseAddress->setDynamicStateMemoryObjectControlStateIndexToMocsTables(gmmHelper->getMOCS(l3CacheOnPolicy)); - stateBaseAddress->setGeneralStateMemoryObjectControlStateIndexToMocsTables(gmmHelper->getMOCS(l3CacheOnPolicy)); - stateBaseAddress->setBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables(gmmHelper->getMOCS(l3CacheOnPolicy)); - stateBaseAddress->setBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables(gmmHelper->getMOCS(l3CacheOnPolicy)); + stateBaseAddress->setSurfaceStateMemoryObjectControlState(gmmHelper->getMOCS(l3CacheOnPolicy)); + stateBaseAddress->setDynamicStateMemoryObjectControlState(gmmHelper->getMOCS(l3CacheOnPolicy)); + stateBaseAddress->setGeneralStateMemoryObjectControlState(gmmHelper->getMOCS(l3CacheOnPolicy)); + stateBaseAddress->setBindlessSurfaceStateMemoryObjectControlState(gmmHelper->getMOCS(l3CacheOnPolicy)); + stateBaseAddress->setBindlessSamplerStateMemoryObjectControlState(gmmHelper->getMOCS(l3CacheOnPolicy)); bool enableMultiGpuAtomics = isMultiOsContextCapable; if (DebugManager.flags.EnableMultiGpuAtomicsOptimization.get()) { diff --git a/shared/test/unit_test/gen11/CMakeLists.txt b/shared/test/unit_test/gen11/CMakeLists.txt index e93475f020..da2c8ddac7 100644 --- a/shared/test/unit_test/gen11/CMakeLists.txt +++ b/shared/test/unit_test/gen11/CMakeLists.txt @@ -5,5 +5,9 @@ # if(TESTS_GEN11) + target_sources(neo_shared_tests PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_gen11_tests.cpp + ) add_subdirectories() endif() diff --git a/shared/test/unit_test/gen11/hw_cmds_gen11_tests.cpp b/shared/test/unit_test/gen11/hw_cmds_gen11_tests.cpp new file mode 100644 index 0000000000..26050b0825 --- /dev/null +++ b/shared/test/unit_test/gen11/hw_cmds_gen11_tests.cpp @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2021 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/source/gen11/hw_cmds_base.h" + +#include "test.h" + +using namespace NEO; + +using Gen11HwCmdTest = ::testing::Test; + +GEN11TEST_F(Gen11HwCmdTest, givenRenderSurfaceStateWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto renderSurfaceState = FamilyType::cmdInitRenderSurfaceState; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + renderSurfaceState.setMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, renderSurfaceState.TheStructure.Common.MemoryObjectControlState_IndexToMocsTables); +} + +GEN11TEST_F(Gen11HwCmdTest, givenStateBaseAddressWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto stateBaseAddress = FamilyType::cmdInitStateBaseAddress; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + stateBaseAddress.setGeneralStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setStatelessDataPortAccessMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setSurfaceStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setDynamicStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setIndirectObjectMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setInstructionMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.InstructionMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setBindlessSurfaceStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setBindlessSamplerStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables); +} + +GEN11TEST_F(Gen11HwCmdTest, givenMediaSurfaceStateWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto mediaSurfaceState = FamilyType::cmdInitMediaSurfaceState; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + mediaSurfaceState.setSurfaceMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, mediaSurfaceState.TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables); +} \ No newline at end of file diff --git a/shared/test/unit_test/gen12lp/CMakeLists.txt b/shared/test/unit_test/gen12lp/CMakeLists.txt index 52fb458536..55dcf6c7de 100644 --- a/shared/test/unit_test/gen12lp/CMakeLists.txt +++ b/shared/test/unit_test/gen12lp/CMakeLists.txt @@ -5,5 +5,9 @@ # if(TESTS_GEN12LP) + target_sources(neo_shared_tests PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_gen12lp_tests.cpp + ) add_subdirectories() endif() diff --git a/shared/test/unit_test/gen12lp/hw_cmds_gen12lp_tests.cpp b/shared/test/unit_test/gen12lp/hw_cmds_gen12lp_tests.cpp new file mode 100644 index 0000000000..93ff5293c9 --- /dev/null +++ b/shared/test/unit_test/gen12lp/hw_cmds_gen12lp_tests.cpp @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2021 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/source/gen12lp/hw_cmds_base.h" + +#include "test.h" + +using namespace NEO; + +using Gen12lpHwCmdTest = ::testing::Test; + +GEN12LPTEST_F(Gen12lpHwCmdTest, givenRenderSurfaceStateWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto renderSurfaceState = FamilyType::cmdInitRenderSurfaceState; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + renderSurfaceState.setMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, renderSurfaceState.TheStructure.Common.MemoryObjectControlStateIndexToMocsTables); +} + +GEN12LPTEST_F(Gen12lpHwCmdTest, givenStateBaseAddressWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto stateBaseAddress = FamilyType::cmdInitStateBaseAddress; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + stateBaseAddress.setGeneralStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setStatelessDataPortAccessMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setSurfaceStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setDynamicStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setIndirectObjectMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setInstructionMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.InstructionMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setBindlessSurfaceStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setBindlessSamplerStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables); +} + +GEN12LPTEST_F(Gen12lpHwCmdTest, givenMediaSurfaceStateWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto mediaSurfaceState = FamilyType::cmdInitMediaSurfaceState; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + mediaSurfaceState.setSurfaceMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, mediaSurfaceState.TheStructure.Common.SurfaceMemoryObjectControlStateIndexToMocsTables); +} \ No newline at end of file diff --git a/shared/test/unit_test/gen9/CMakeLists.txt b/shared/test/unit_test/gen9/CMakeLists.txt index b7292c7ddb..959232f2e1 100644 --- a/shared/test/unit_test/gen9/CMakeLists.txt +++ b/shared/test/unit_test/gen9/CMakeLists.txt @@ -5,5 +5,9 @@ # if(TESTS_GEN9) + target_sources(neo_shared_tests PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_gen9_tests.cpp + ) add_subdirectories() endif() diff --git a/shared/test/unit_test/gen9/hw_cmds_gen9_tests.cpp b/shared/test/unit_test/gen9/hw_cmds_gen9_tests.cpp new file mode 100644 index 0000000000..fdf187d7aa --- /dev/null +++ b/shared/test/unit_test/gen9/hw_cmds_gen9_tests.cpp @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2021 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/source/gen9/hw_cmds_base.h" + +#include "test.h" + +using namespace NEO; + +using Gen9HwCmdTest = ::testing::Test; + +GEN9TEST_F(Gen9HwCmdTest, givenRenderSurfaceStateWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto renderSurfaceState = FamilyType::cmdInitRenderSurfaceState; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + renderSurfaceState.setMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, renderSurfaceState.TheStructure.Common.MemoryObjectControlState_IndexToMocsTables); +} + +GEN9TEST_F(Gen9HwCmdTest, givenStateBaseAddressWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto stateBaseAddress = FamilyType::cmdInitStateBaseAddress; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + stateBaseAddress.setGeneralStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setStatelessDataPortAccessMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setSurfaceStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setDynamicStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setIndirectObjectMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setInstructionMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.InstructionMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setBindlessSurfaceStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables); +} + +GEN9TEST_F(Gen9HwCmdTest, givenMediaSurfaceStateWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto mediaSurfaceState = FamilyType::cmdInitMediaSurfaceState; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + mediaSurfaceState.setSurfaceMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, mediaSurfaceState.TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables); +} \ No newline at end of file diff --git a/shared/test/unit_test/xe_hp_core/CMakeLists.txt b/shared/test/unit_test/xe_hp_core/CMakeLists.txt new file mode 100644 index 0000000000..dd0fc5c643 --- /dev/null +++ b/shared/test/unit_test/xe_hp_core/CMakeLists.txt @@ -0,0 +1,13 @@ +# +# Copyright (C) 2021 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +if(TESTS_XE_HP_CORE) + target_sources(neo_shared_tests PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_xe_hp_core_tests.cpp + ) + add_subdirectories() +endif() diff --git a/shared/test/unit_test/xe_hp_core/hw_cmds_xe_hp_core_tests.cpp b/shared/test/unit_test/xe_hp_core/hw_cmds_xe_hp_core_tests.cpp new file mode 100644 index 0000000000..915d936aeb --- /dev/null +++ b/shared/test/unit_test/xe_hp_core/hw_cmds_xe_hp_core_tests.cpp @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2021 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/source/xe_hp_core/hw_cmds_base.h" + +#include "test.h" + +using namespace NEO; + +using XeHpCoreHwCmdTest = ::testing::Test; + +XE_HP_CORE_TEST_F(XeHpCoreHwCmdTest, givenRenderSurfaceStateWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto renderSurfaceState = FamilyType::cmdInitRenderSurfaceState; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + renderSurfaceState.setMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, renderSurfaceState.TheStructure.Common.MemoryObjectControlStateIndexToMocsTables); +} + +XE_HP_CORE_TEST_F(XeHpCoreHwCmdTest, givenStateBaseAddressWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto stateBaseAddress = FamilyType::cmdInitStateBaseAddress; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + stateBaseAddress.setGeneralStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setStatelessDataPortAccessMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setSurfaceStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setDynamicStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setInstructionMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.InstructionMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setBindlessSurfaceStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setBindlessSamplerStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables); +} + +XE_HP_CORE_TEST_F(XeHpCoreHwCmdTest, givenPostSyncDataWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto postSyncData = FamilyType::cmdInitPostSyncData; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + postSyncData.setMocs(mocs); + EXPECT_EQ(expectedMocsIndex, postSyncData.TheStructure.Common.MocsIndexToMocsTables); +} + +XE_HP_CORE_TEST_F(XeHpCoreHwCmdTest, givenLoadRegisterMemWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto loadRegisterMem = FamilyType::cmdInitLoadRegisterMem; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + loadRegisterMem.setMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, loadRegisterMem.TheStructure.Common.MemoryObjectControlStateIndexToMocsTables); +} + +XE_HP_CORE_TEST_F(XeHpCoreHwCmdTest, givenStoreRegisterMemWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto storeRegisterMem = FamilyType::cmdInitStoreRegisterMem; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + storeRegisterMem.setMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, storeRegisterMem.TheStructure.Common.MemoryObjectControlStateIndexToMocsTables); +} + +XE_HP_CORE_TEST_F(XeHpCoreHwCmdTest, givenStoreDataImmWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto storeDataImm = FamilyType::cmdInitStoreDataImm; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + storeDataImm.setMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, storeDataImm.TheStructure.Common.MemoryObjectControlStateIndexToMocsTables); +} diff --git a/shared/test/unit_test/xe_hpc_core/CMakeLists.txt b/shared/test/unit_test/xe_hpc_core/CMakeLists.txt new file mode 100644 index 0000000000..ce2ae189c7 --- /dev/null +++ b/shared/test/unit_test/xe_hpc_core/CMakeLists.txt @@ -0,0 +1,13 @@ +# +# Copyright (C) 2021 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +if(TESTS_XE_HPC_CORE) + target_sources(neo_shared_tests PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_xe_hpc_core_tests.cpp + ) + add_subdirectories() +endif() diff --git a/shared/test/unit_test/xe_hpc_core/hw_cmds_xe_hpc_core_tests.cpp b/shared/test/unit_test/xe_hpc_core/hw_cmds_xe_hpc_core_tests.cpp new file mode 100644 index 0000000000..ef3d3d83a2 --- /dev/null +++ b/shared/test/unit_test/xe_hpc_core/hw_cmds_xe_hpc_core_tests.cpp @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2021 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/source/xe_hpc_core/hw_cmds_base.h" + +#include "test.h" + +using namespace NEO; + +using XeHpcCoreHwCmdTest = ::testing::Test; + +XE_HPC_CORETEST_F(XeHpcCoreHwCmdTest, givenMediaSurfaceStateWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto mediaSurfaceState = FamilyType::cmdInitMediaSurfaceState; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + mediaSurfaceState.setSurfaceMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, mediaSurfaceState.TheStructure.Common.SurfaceMemoryObjectControlStateIndexToMocsTables); +} + +XE_HPC_CORETEST_F(XeHpcCoreHwCmdTest, givenRenderSurfaceStateWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto renderSurfaceState = FamilyType::cmdInitRenderSurfaceState; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + renderSurfaceState.setMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, renderSurfaceState.TheStructure.Common.MemoryObjectControlStateIndexToMocsTables); +} + +XE_HPC_CORETEST_F(XeHpcCoreHwCmdTest, givenStateBaseAddressWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto stateBaseAddress = FamilyType::cmdInitStateBaseAddress; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + stateBaseAddress.setGeneralStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.GeneralStateMemoryObjectControlStateIndexToMocsTables); + + stateBaseAddress.setStatelessDataPortAccessMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.StatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables); + + stateBaseAddress.setSurfaceStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.SurfaceStateMemoryObjectControlStateIndexToMocsTables); + + stateBaseAddress.setDynamicStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.DynamicStateMemoryObjectControlStateIndexToMocsTables); + + stateBaseAddress.setInstructionMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.InstructionMemoryObjectControlStateIndexToMocsTables); + + stateBaseAddress.setBindlessSurfaceStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.BindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables); + + stateBaseAddress.setBindlessSamplerStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.BindlessSamplerStateMemoryObjectControlStateIndexToMocsTables); +} + +XE_HPC_CORETEST_F(XeHpcCoreHwCmdTest, givenPostSyncDataWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto postSyncData = FamilyType::cmdInitPostSyncData; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + postSyncData.setMocs(mocs); + EXPECT_EQ(expectedMocsIndex, postSyncData.TheStructure.Common.MocsIndexToMocsTables); +} diff --git a/shared/test/unit_test/xe_hpg_core/CMakeLists.txt b/shared/test/unit_test/xe_hpg_core/CMakeLists.txt new file mode 100644 index 0000000000..98b54ae76f --- /dev/null +++ b/shared/test/unit_test/xe_hpg_core/CMakeLists.txt @@ -0,0 +1,13 @@ +# +# Copyright (C) 2021 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +if(TESTS_XE_HPG_CORE) + target_sources(neo_shared_tests PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_xe_hpg_core_tests.cpp + ) + add_subdirectories() +endif() diff --git a/shared/test/unit_test/xe_hpg_core/hw_cmds_xe_hpg_core_tests.cpp b/shared/test/unit_test/xe_hpg_core/hw_cmds_xe_hpg_core_tests.cpp new file mode 100644 index 0000000000..4e74ef1aac --- /dev/null +++ b/shared/test/unit_test/xe_hpg_core/hw_cmds_xe_hpg_core_tests.cpp @@ -0,0 +1,88 @@ +/* + * Copyright (C) 2021 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/source/xe_hpg_core/hw_cmds_base.h" + +#include "test.h" + +using namespace NEO; + +using XeHpgCoreHwCmdTest = ::testing::Test; + +XE_HPG_CORETEST_F(XeHpgCoreHwCmdTest, givenMediaSurfaceStateWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto mediaSurfaceState = FamilyType::cmdInitMediaSurfaceState; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + mediaSurfaceState.setSurfaceMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, mediaSurfaceState.TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables); +} + +XE_HPG_CORETEST_F(XeHpgCoreHwCmdTest, givenRenderSurfaceStateWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto renderSurfaceState = FamilyType::cmdInitRenderSurfaceState; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + renderSurfaceState.setMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, renderSurfaceState.TheStructure.Common.MemoryObjectControlStateIndexToMocsTables); +} + +XE_HPG_CORETEST_F(XeHpgCoreHwCmdTest, givenStateBaseAddressWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto stateBaseAddress = FamilyType::cmdInitStateBaseAddress; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + stateBaseAddress.setGeneralStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setStatelessDataPortAccessMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setSurfaceStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setDynamicStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setInstructionMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.InstructionMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setBindlessSurfaceStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables); + + stateBaseAddress.setBindlessSamplerStateMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, stateBaseAddress.TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables); +} + +XE_HPG_CORETEST_F(XeHpgCoreHwCmdTest, givenPostSyncDataWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto postSyncData = FamilyType::cmdInitPostSyncData; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + postSyncData.setMocs(mocs); + EXPECT_EQ(expectedMocsIndex, postSyncData.TheStructure.Common.MocsIndexToMocsTables); +} + +XE_HPG_CORETEST_F(XeHpgCoreHwCmdTest, givenLoadRegisterMemWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto loadRegisterMem = FamilyType::cmdInitLoadRegisterMem; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + loadRegisterMem.setMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, loadRegisterMem.TheStructure.Common.MemoryObjectControlStateIndexToMocsTables); +} + +XE_HPG_CORETEST_F(XeHpgCoreHwCmdTest, givenStoreRegisterMemWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto storeRegisterMem = FamilyType::cmdInitStoreRegisterMem; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + storeRegisterMem.setMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, storeRegisterMem.TheStructure.Common.MemoryObjectControlStateIndexToMocsTables); +} + +XE_HPG_CORETEST_F(XeHpgCoreHwCmdTest, givenStoreDataImmWhenProgrammingMocsThenMocsIndexIsSetProperly) { + auto storeDataImm = FamilyType::cmdInitStoreDataImm; + uint32_t mocs = 4u; + uint32_t expectedMocsIndex = (mocs >> 1); + storeDataImm.setMemoryObjectControlState(mocs); + EXPECT_EQ(expectedMocsIndex, storeDataImm.TheStructure.Common.MemoryObjectControlStateIndexToMocsTables); +}