Refactor memory object control state methods in generated commands

remove setters/getters for Index To Mocs Tables fields
all information contained in MOCS from gmm client context is now handled
by dedicated method set/get MemoryObjectControlState

Related-To: NEO-6466


Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2021-12-13 12:34:09 +00:00
committed by Compute-Runtime-Automation
parent 601271c92e
commit 03e617d14f
35 changed files with 582 additions and 327 deletions

View File

@@ -20,7 +20,7 @@ template <>
void ImageHw<Family>::setMediaSurfaceRotation(void *) {} void ImageHw<Family>::setMediaSurfaceRotation(void *) {}
template <> template <>
void ImageHw<Family>::setSurfaceMemoryObjectControlStateIndexToMocsTable(void *, uint32_t) {} void ImageHw<Family>::setSurfaceMemoryObjectControlState(void *, uint32_t) {}
} // namespace NEO } // namespace NEO

View File

@@ -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 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 setMediaImageArg(void *memory, uint32_t rootDeviceIndex) = 0;
virtual void setMediaSurfaceRotation(void *memory) = 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_desc &getImageDesc() const;
const cl_image_format &getImageFormat() const; const cl_image_format &getImageFormat() const;
@@ -305,7 +305,7 @@ class ImageHw : public Image {
void setAuxParamsForMultisamples(RENDER_SURFACE_STATE *surfaceState); void setAuxParamsForMultisamples(RENDER_SURFACE_STATE *surfaceState);
void setMediaImageArg(void *memory, uint32_t rootDeviceIndex) override; void setMediaImageArg(void *memory, uint32_t rootDeviceIndex) override;
void setMediaSurfaceRotation(void *memory) 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 appendSurfaceStateParams(RENDER_SURFACE_STATE *surfaceState, uint32_t rootDeviceIndex, bool useGlobalAtomics);
void appendSurfaceStateDepthParams(RENDER_SURFACE_STATE *surfaceState, Gmm *gmm); void appendSurfaceStateDepthParams(RENDER_SURFACE_STATE *surfaceState, Gmm *gmm);
void appendSurfaceStateExt(void *memory); void appendSurfaceStateExt(void *memory);

View File

@@ -167,7 +167,7 @@ void ImageHw<GfxFamily>::setMediaImageArg(void *memory, uint32_t rootDeviceIndex
state.setXOffsetForVCr(0); state.setXOffsetForVCr(0);
state.setYOffsetForVCr(0); state.setYOffsetForVCr(0);
setSurfaceMemoryObjectControlStateIndexToMocsTable( setSurfaceMemoryObjectControlState(
reinterpret_cast<void *>(&state), reinterpret_cast<void *>(&state),
gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_IMAGE)); gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_IMAGE));
@@ -214,13 +214,13 @@ inline void ImageHw<GfxFamily>::setMediaSurfaceRotation(void *memory) {
} }
template <typename GfxFamily> template <typename GfxFamily>
inline void ImageHw<GfxFamily>::setSurfaceMemoryObjectControlStateIndexToMocsTable(void *memory, uint32_t value) { inline void ImageHw<GfxFamily>::setSurfaceMemoryObjectControlState(void *memory, uint32_t value) {
using MEDIA_SURFACE_STATE = typename GfxFamily::MEDIA_SURFACE_STATE; using MEDIA_SURFACE_STATE = typename GfxFamily::MEDIA_SURFACE_STATE;
using SURFACE_FORMAT = typename MEDIA_SURFACE_STATE::SURFACE_FORMAT; using SURFACE_FORMAT = typename MEDIA_SURFACE_STATE::SURFACE_FORMAT;
auto surfaceState = reinterpret_cast<MEDIA_SURFACE_STATE *>(memory); auto surfaceState = reinterpret_cast<MEDIA_SURFACE_STATE *>(memory);
surfaceState->setSurfaceMemoryObjectControlStateIndexToMocsTables(value); surfaceState->setSurfaceMemoryObjectControlState(value);
} }
} // namespace NEO } // namespace NEO

View File

@@ -275,7 +275,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, EnqueueWorkItemTestsWithLimitedParamSet, givenDebugV
auto itorCmd = find<STATE_BASE_ADDRESS *>(cmdList.begin(), cmdList.end()); auto itorCmd = find<STATE_BASE_ADDRESS *>(cmdList.begin(), cmdList.end());
ASSERT_NE(itorWalker, itorCmd); ASSERT_NE(itorWalker, itorCmd);
auto *cmdSBA = (STATE_BASE_ADDRESS *)*itorCmd; auto *cmdSBA = (STATE_BASE_ADDRESS *)*itorCmd;
auto mocsProgrammed = cmdSBA->getStatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables() >> 1; auto mocsProgrammed = cmdSBA->getStatelessDataPortAccessMemoryObjectControlState() >> 1;
EXPECT_EQ(1u, mocsProgrammed); EXPECT_EQ(1u, mocsProgrammed);
} }

View File

@@ -942,7 +942,7 @@ TEST_F(EnqueueMapImageTest, givenImage1DArrayWhenEnqueueMapImageIsCalledThenRetu
void setImageArg(void *memory, bool isMediaBlockImage, uint32_t mipLevel, uint32_t rootDeviceIndex, bool useGlobalAtomics) override {} void setImageArg(void *memory, bool isMediaBlockImage, uint32_t mipLevel, uint32_t rootDeviceIndex, bool useGlobalAtomics) override {}
void setMediaImageArg(void *memory, uint32_t rootDeviceIndex) override {} void setMediaImageArg(void *memory, uint32_t rootDeviceIndex) override {}
void setMediaSurfaceRotation(void *memory) 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 transformImage2dArrayTo3d(void *memory) override {}
void transformImage3dTo2dArray(void *memory) override {} void transformImage3dTo2dArray(void *memory) override {}
}; };

View File

@@ -93,16 +93,3 @@ GEN11TEST_F(gen11ImageTests, givenImageForGen11WhenClearColorParametersAreSetThe
EXPECT_EQ(0, memcmp(&surfaceStateBefore, &surfaceStateAfter, sizeof(RENDER_SURFACE_STATE))); 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);
}

View File

@@ -156,16 +156,3 @@ GEN12LPTEST_F(gen12LpImageTests, givenMediaCompressionThenSurfaceStateParamsAreS
EXPECT_TRUE(surfaceState.getMemoryCompressionEnable()); EXPECT_TRUE(surfaceState.getMemoryCompressionEnable());
EXPECT_EQ(surfaceState.getAuxiliarySurfaceMode(), RENDER_SURFACE_STATE::AUXILIARY_SURFACE_MODE::AUXILIARY_SURFACE_MODE_AUX_NONE); 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);
}

View File

@@ -27,16 +27,3 @@ GEN9TEST_F(gen9ImageTests, appendSurfaceSWhenAppendingSurfaceStateParamsThenSurf
EXPECT_EQ(0, memcmp(&surfaceStateBefore, &surfaceStateAfter, sizeof(RENDER_SURFACE_STATE))); 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);
}

View File

@@ -256,16 +256,16 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHpCommandStreamReceiverFlushTaskTests, whenFlushC
hwParserCsr.findHardwareCommands<FamilyType>(); hwParserCsr.findHardwareCommands<FamilyType>();
ASSERT_NE(nullptr, hwParserCsr.cmdStateBaseAddress); ASSERT_NE(nullptr, hwParserCsr.cmdStateBaseAddress);
auto stateBaseAddress = static_cast<STATE_BASE_ADDRESS *>(hwParserCsr.cmdStateBaseAddress); auto stateBaseAddress = static_cast<STATE_BASE_ADDRESS *>(hwParserCsr.cmdStateBaseAddress);
auto expectedMocsIndexForStateless = gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CONST); auto expectedMocsForStateless = gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CONST);
auto expectedMocsIndexForHeap = gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_STATE_HEAP_BUFFER); auto expectedMocsForHeap = gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_STATE_HEAP_BUFFER);
EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getSurfaceStateMemoryObjectControlStateIndexToMocsTables()); EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getSurfaceStateMemoryObjectControlState());
EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getDynamicStateMemoryObjectControlStateIndexToMocsTables()); EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getDynamicStateMemoryObjectControlState());
EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getGeneralStateMemoryObjectControlStateIndexToMocsTables()); EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getGeneralStateMemoryObjectControlState());
EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getInstructionMemoryObjectControlStateIndexToMocsTables()); EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getInstructionMemoryObjectControlState());
EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables()); EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getBindlessSurfaceStateMemoryObjectControlState());
EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables()); EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getBindlessSamplerStateMemoryObjectControlState());
EXPECT_EQ(expectedMocsIndexForStateless, stateBaseAddress->getStatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables()); EXPECT_EQ(expectedMocsForStateless, stateBaseAddress->getStatelessDataPortAccessMemoryObjectControlState());
} }
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHpCommandStreamReceiverFlushTaskTests, whenFlushCalledThenStateBaseAddressHasAllCachesOffWhenDebugFlagIsPresent) { HWCMDTEST_F(IGFX_XE_HP_CORE, XeHpCommandStreamReceiverFlushTaskTests, whenFlushCalledThenStateBaseAddressHasAllCachesOffWhenDebugFlagIsPresent) {
@@ -281,14 +281,14 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHpCommandStreamReceiverFlushTaskTests, whenFlushC
hwParserCsr.findHardwareCommands<FamilyType>(); hwParserCsr.findHardwareCommands<FamilyType>();
ASSERT_NE(nullptr, hwParserCsr.cmdStateBaseAddress); ASSERT_NE(nullptr, hwParserCsr.cmdStateBaseAddress);
auto stateBaseAddress = static_cast<STATE_BASE_ADDRESS *>(hwParserCsr.cmdStateBaseAddress); auto stateBaseAddress = static_cast<STATE_BASE_ADDRESS *>(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(expectedMocsForHeap, stateBaseAddress->getSurfaceStateMemoryObjectControlState());
EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getDynamicStateMemoryObjectControlStateIndexToMocsTables()); EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getDynamicStateMemoryObjectControlState());
EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getGeneralStateMemoryObjectControlStateIndexToMocsTables()); EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getGeneralStateMemoryObjectControlState());
EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getInstructionMemoryObjectControlStateIndexToMocsTables()); EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getInstructionMemoryObjectControlState());
EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables()); EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getBindlessSurfaceStateMemoryObjectControlState());
EXPECT_EQ(expectedMocsIndexForHeap, stateBaseAddress->getBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables()); EXPECT_EQ(expectedMocsForHeap, stateBaseAddress->getBindlessSamplerStateMemoryObjectControlState());
} }
HWCMDTEST_F(IGFX_XE_HP_CORE, XeHpCommandStreamReceiverFlushTaskTests, givenL3ToL1DebugFlagWhenStatelessMocsIsProgrammedThenItHasL1CachingOn) { HWCMDTEST_F(IGFX_XE_HP_CORE, XeHpCommandStreamReceiverFlushTaskTests, givenL3ToL1DebugFlagWhenStatelessMocsIsProgrammedThenItHasL1CachingOn) {

View File

@@ -773,7 +773,7 @@ struct NullImage : public Image {
void setImageArg(void *memory, bool isMediaBlockImage, uint32_t mipLevel, uint32_t rootDeviceIndex, bool useGlobalAtomics) override {} void setImageArg(void *memory, bool isMediaBlockImage, uint32_t mipLevel, uint32_t rootDeviceIndex, bool useGlobalAtomics) override {}
void setMediaImageArg(void *memory, uint32_t rootDeviceIndex) override {} void setMediaImageArg(void *memory, uint32_t rootDeviceIndex) override {}
void setMediaSurfaceRotation(void *memory) 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 transformImage2dArrayTo3d(void *memory) override {}
void transformImage3dTo2dArray(void *memory) override {} void transformImage3dTo2dArray(void *memory) override {}
}; };

View File

@@ -40,7 +40,7 @@ struct MockImageBase : public Image {
void setImageArg(void *memory, bool isMediaBlockImage, uint32_t mipLevel, uint32_t rootDeviceIndex, bool useGlobalAtomics) override {} void setImageArg(void *memory, bool isMediaBlockImage, uint32_t mipLevel, uint32_t rootDeviceIndex, bool useGlobalAtomics) override {}
void setMediaImageArg(void *memory, uint32_t rootDeviceIndex) override {} void setMediaImageArg(void *memory, uint32_t rootDeviceIndex) override {}
void setMediaSurfaceRotation(void *memory) 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 transformImage2dArrayTo3d(void *memory) override {}
void transformImage3dTo2dArray(void *memory) override {} void transformImage3dTo2dArray(void *memory) override {}
}; };

View File

@@ -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; using LriHelperTestsXE_HP_CORE = ::testing::Test;
XE_HP_CORE_TEST_F(LriHelperTestsXE_HP_CORE, whenProgrammingLriCommandThenExpectMmioRemapEnableCorrectlySet) { XE_HP_CORE_TEST_F(LriHelperTestsXE_HP_CORE, whenProgrammingLriCommandThenExpectMmioRemapEnableCorrectlySet) {

View File

@@ -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; using LriHelperTestsXeHpcCore = ::testing::Test;
XE_HPC_CORETEST_F(LriHelperTestsXeHpcCore, whenProgrammingLriCommandThenExpectMmioRemapEnableCorrectlySet) { XE_HPC_CORETEST_F(LriHelperTestsXeHpcCore, whenProgrammingLriCommandThenExpectMmioRemapEnableCorrectlySet) {

View File

@@ -114,19 +114,6 @@ XE_HPG_CORETEST_F(HwInfoConfigTestXeHpgCore, givenDebugVariableSetWhenConfigureI
EXPECT_TRUE(hwInfo.capabilityTable.blitterOperationsSupported); 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; using LriHelperTestsXeHpgCore = ::testing::Test;
XE_HPG_CORETEST_F(LriHelperTestsXeHpgCore, whenProgrammingLriCommandThenExpectMmioRemapEnableCorrectlySet) { XE_HPG_CORETEST_F(LriHelperTestsXeHpgCore, whenProgrammingLriCommandThenExpectMmioRemapEnableCorrectlySet) {

View File

@@ -2642,12 +2642,6 @@ typedef struct tagRENDER_SURFACE_STATE {
inline uint32_t getMemoryObjectControlStateReserved() const { inline uint32_t getMemoryObjectControlStateReserved() const {
return (TheStructure.Common.MemoryObjectControlState_Reserved); 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) { inline void setMemoryObjectControlState(const uint32_t value) {
TheStructure.Common.MemoryObjectControlState_Reserved = value; TheStructure.Common.MemoryObjectControlState_Reserved = value;
TheStructure.Common.MemoryObjectControlState_IndexToMocsTables = (value >> 1); TheStructure.Common.MemoryObjectControlState_IndexToMocsTables = (value >> 1);
@@ -3571,10 +3565,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getGeneralStateMemoryObjectControlStateReserved() const { inline uint64_t getGeneralStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.GeneralStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getGeneralStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getGeneralStateMemoryObjectControlState() const {
return (TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagGENERALSTATEBASEADDRESS { typedef enum tagGENERALSTATEBASEADDRESS {
@@ -3593,12 +3587,6 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateReserved() const { inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateReserved() const {
return (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved); 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) { inline void setStatelessDataPortAccessMemoryObjectControlState(const uint32_t value) {
TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved = value; TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved = value;
TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables = (value >> 1); TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables = (value >> 1);
@@ -3620,10 +3608,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getSurfaceStateMemoryObjectControlStateReserved() const { inline uint64_t getSurfaceStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.SurfaceStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getSurfaceStateMemoryObjectControlState() const {
return (TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagSURFACESTATEBASEADDRESS { typedef enum tagSURFACESTATEBASEADDRESS {
@@ -3648,10 +3636,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getDynamicStateMemoryObjectControlStateReserved() const { inline uint64_t getDynamicStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.DynamicStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getDynamicStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getDynamicStateMemoryObjectControlState() const {
return (TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagDYNAMICSTATEBASEADDRESS { typedef enum tagDYNAMICSTATEBASEADDRESS {
@@ -3676,10 +3664,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getIndirectObjectMemoryObjectControlStateReserved() const { inline uint64_t getIndirectObjectMemoryObjectControlStateReserved() const {
return (TheStructure.Common.IndirectObjectMemoryObjectControlState_Reserved); 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; TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getIndirectObjectMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getIndirectObjectMemoryObjectControlState() const {
return (TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagINDIRECTOBJECTBASEADDRESS { typedef enum tagINDIRECTOBJECTBASEADDRESS {
@@ -3704,12 +3692,6 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getInstructionMemoryObjectControlStateReserved() const { inline uint64_t getInstructionMemoryObjectControlStateReserved() const {
return (TheStructure.Common.InstructionMemoryObjectControlState_Reserved); 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) { inline void setInstructionMemoryObjectControlState(const uint32_t value) {
uint64_t val = static_cast<uint64_t>(value); uint64_t val = static_cast<uint64_t>(value);
TheStructure.Common.InstructionMemoryObjectControlState_Reserved = val; TheStructure.Common.InstructionMemoryObjectControlState_Reserved = val;
@@ -3790,10 +3772,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateReserved() const { inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getBindlessSurfaceStateMemoryObjectControlState() const {
return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagBINDLESSSURFACESTATEBASEADDRESS { typedef enum tagBINDLESSSURFACESTATEBASEADDRESS {
@@ -3824,10 +3806,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getBindlessSamplerStateMemoryObjectControlStateReserved() const { inline uint64_t getBindlessSamplerStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getBindlessSamplerStateMemoryObjectControlState() const {
return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagBINDLESSSAMPLERSTATEBASEADDRESS { typedef enum tagBINDLESSSAMPLERSTATEBASEADDRESS {
@@ -4978,10 +4960,10 @@ typedef struct tagMEDIA_SURFACE_STATE {
inline uint32_t getSurfaceMemoryObjectControlStateReserved() const { inline uint32_t getSurfaceMemoryObjectControlStateReserved() const {
return (TheStructure.Common.SurfaceMemoryObjectControlState_Reserved); 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; TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint32_t getSurfaceMemoryObjectControlStateIndexToMocsTables() const { inline uint32_t getSurfaceMemoryObjectControlState() const {
return (TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables << 1);
} }
inline void setTiledResourceMode(const TILED_RESOURCE_MODE value) { inline void setTiledResourceMode(const TILED_RESOURCE_MODE value) {

View File

@@ -2459,13 +2459,6 @@ typedef struct tagRENDER_SURFACE_STATE {
inline uint32_t getMemoryObjectControlStateReserved() const { inline uint32_t getMemoryObjectControlStateReserved() const {
return (TheStructure.Common.MemoryObjectControlStateReserved_56); 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) { inline void setMemoryObjectControlState(const uint32_t value) {
TheStructure.Common.MemoryObjectControlStateReserved_56 = value; TheStructure.Common.MemoryObjectControlStateReserved_56 = value;
TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = (value >> 1); TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = (value >> 1);
@@ -3384,10 +3377,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getGeneralStateMemoryObjectControlStateReserved() const { inline uint64_t getGeneralStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.GeneralStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getGeneralStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getGeneralStateMemoryObjectControlState() const {
return (TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagGENERALSTATEBASEADDRESS { typedef enum tagGENERALSTATEBASEADDRESS {
@@ -3406,12 +3399,6 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateReserved() const { inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateReserved() const {
return (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved); 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) { inline void setStatelessDataPortAccessMemoryObjectControlState(const uint32_t value) {
TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved = value; TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved = value;
TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables = (value >> 1); TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables = (value >> 1);
@@ -3433,10 +3420,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getSurfaceStateMemoryObjectControlStateReserved() const { inline uint64_t getSurfaceStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.SurfaceStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getSurfaceStateMemoryObjectControlState() const {
return (TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagSURFACESTATEBASEADDRESS { typedef enum tagSURFACESTATEBASEADDRESS {
@@ -3461,10 +3448,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getDynamicStateMemoryObjectControlStateReserved() const { inline uint64_t getDynamicStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.DynamicStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getDynamicStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getDynamicStateMemoryObjectControlState() const {
return (TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagDYNAMICSTATEBASEADDRESS { typedef enum tagDYNAMICSTATEBASEADDRESS {
@@ -3489,10 +3476,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getIndirectObjectMemoryObjectControlStateReserved() const { inline uint64_t getIndirectObjectMemoryObjectControlStateReserved() const {
return (TheStructure.Common.IndirectObjectMemoryObjectControlState_Reserved); 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; TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getIndirectObjectMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getIndirectObjectMemoryObjectControlState() const {
return (TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagINDIRECTOBJECTBASEADDRESS { typedef enum tagINDIRECTOBJECTBASEADDRESS {
@@ -3517,12 +3504,6 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getInstructionMemoryObjectControlStateReserved() const { inline uint64_t getInstructionMemoryObjectControlStateReserved() const {
return (TheStructure.Common.InstructionMemoryObjectControlState_Reserved); 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) { inline void setInstructionMemoryObjectControlState(const uint32_t value) {
uint64_t val = static_cast<uint64_t>(value); uint64_t val = static_cast<uint64_t>(value);
TheStructure.Common.InstructionMemoryObjectControlState_Reserved = val; TheStructure.Common.InstructionMemoryObjectControlState_Reserved = val;
@@ -3603,10 +3584,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateReserved() const { inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getBindlessSurfaceStateMemoryObjectControlState() const {
return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagBINDLESSSURFACESTATEBASEADDRESS { typedef enum tagBINDLESSSURFACESTATEBASEADDRESS {
@@ -3637,10 +3618,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getBindlessSamplerStateMemoryObjectControlStateReserved() const { inline uint64_t getBindlessSamplerStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getBindlessSamplerStateMemoryObjectControlState() const {
return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagBINDLESSSAMPLERSTATEBASEADDRESS { typedef enum tagBINDLESSSAMPLERSTATEBASEADDRESS {
@@ -4473,12 +4454,12 @@ typedef struct tagMEDIA_SURFACE_STATE {
inline uint32_t getXOffsetForUCb() const { inline uint32_t getXOffsetForUCb() const {
return TheStructure.Common.XOffsetForU_Cb; return TheStructure.Common.XOffsetForU_Cb;
} }
inline void setSurfaceMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { inline void setSurfaceMemoryObjectControlState(const uint32_t value) {
UNRECOVERABLE_IF(value > 0x3f); UNRECOVERABLE_IF(value > 0x3f);
TheStructure.Common.SurfaceMemoryObjectControlStateIndexToMocsTables = value; TheStructure.Common.SurfaceMemoryObjectControlStateIndexToMocsTables = value >> 1;
} }
inline uint32_t getSurfaceMemoryObjectControlStateIndexToMocsTables() const { inline uint32_t getSurfaceMemoryObjectControlState() const {
return TheStructure.Common.SurfaceMemoryObjectControlStateIndexToMocsTables; return TheStructure.Common.SurfaceMemoryObjectControlStateIndexToMocsTables << 1;
} }
inline void setTiledResourceMode(const TILED_RESOURCE_MODE value) { inline void setTiledResourceMode(const TILED_RESOURCE_MODE value) {
TheStructure.Common.TiledResourceMode = value; TheStructure.Common.TiledResourceMode = value;

View File

@@ -3639,16 +3639,6 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint32_t getInstructionBufferSize() const { inline uint32_t getInstructionBufferSize() const {
return (TheStructure.Common.InstructionBufferSize); 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) { inline void setInstructionMemoryObjectControlState(const uint32_t value) {
TheStructure.Common.InstructionMemoryObjectControlState_AgeForQuadlru = value; TheStructure.Common.InstructionMemoryObjectControlState_AgeForQuadlru = value;
TheStructure.Common.InstructionMemoryObjectControlState_Reserved = (value >> 2); TheStructure.Common.InstructionMemoryObjectControlState_Reserved = (value >> 2);

View File

@@ -2675,12 +2675,6 @@ typedef struct tagRENDER_SURFACE_STATE {
inline uint32_t getMemoryObjectControlStateReserved() const { inline uint32_t getMemoryObjectControlStateReserved() const {
return (TheStructure.Common.MemoryObjectControlState_Reserved); 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) { inline void setMemoryObjectControlState(const uint32_t value) {
TheStructure.Common.MemoryObjectControlState_Reserved = value; TheStructure.Common.MemoryObjectControlState_Reserved = value;
TheStructure.Common.MemoryObjectControlState_IndexToMocsTables = (value >> 1); TheStructure.Common.MemoryObjectControlState_IndexToMocsTables = (value >> 1);
@@ -3484,10 +3478,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getGeneralStateMemoryObjectControlStateReserved() const { inline uint64_t getGeneralStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.GeneralStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getGeneralStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getGeneralStateMemoryObjectControlState() const {
return (TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagGENERALSTATEBASEADDRESS { typedef enum tagGENERALSTATEBASEADDRESS {
@@ -3506,12 +3500,6 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateReserved() const { inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateReserved() const {
return (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved); 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) { inline void setStatelessDataPortAccessMemoryObjectControlState(const uint32_t value) {
TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved = value; TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved = value;
TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables = (value >> 1); TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables = (value >> 1);
@@ -3533,10 +3521,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getSurfaceStateMemoryObjectControlStateReserved() const { inline uint64_t getSurfaceStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.SurfaceStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getSurfaceStateMemoryObjectControlState() const {
return (TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagSURFACESTATEBASEADDRESS { typedef enum tagSURFACESTATEBASEADDRESS {
@@ -3561,10 +3549,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getDynamicStateMemoryObjectControlStateReserved() const { inline uint64_t getDynamicStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.DynamicStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getDynamicStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getDynamicStateMemoryObjectControlState() const {
return (TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagDYNAMICSTATEBASEADDRESS { typedef enum tagDYNAMICSTATEBASEADDRESS {
@@ -3589,10 +3577,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getIndirectObjectMemoryObjectControlStateReserved() const { inline uint64_t getIndirectObjectMemoryObjectControlStateReserved() const {
return (TheStructure.Common.IndirectObjectMemoryObjectControlState_Reserved); 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; TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getIndirectObjectMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getIndirectObjectMemoryObjectControlState() const {
return (TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.IndirectObjectMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagINDIRECTOBJECTBASEADDRESS { typedef enum tagINDIRECTOBJECTBASEADDRESS {
@@ -3617,12 +3605,6 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getInstructionMemoryObjectControlStateReserved() const { inline uint64_t getInstructionMemoryObjectControlStateReserved() const {
return (TheStructure.Common.InstructionMemoryObjectControlState_Reserved); 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) { inline void setInstructionMemoryObjectControlState(const uint32_t value) {
uint64_t val = static_cast<uint64_t>(value); uint64_t val = static_cast<uint64_t>(value);
TheStructure.Common.InstructionMemoryObjectControlState_Reserved = val; TheStructure.Common.InstructionMemoryObjectControlState_Reserved = val;
@@ -3703,10 +3685,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateReserved() const { inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getBindlessSurfaceStateMemoryObjectControlState() const {
return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagBINDLESSSURFACESTATEBASEADDRESS { typedef enum tagBINDLESSSURFACESTATEBASEADDRESS {
@@ -4728,10 +4710,10 @@ typedef struct tagMEDIA_SURFACE_STATE {
inline uint32_t getSurfaceMemoryObjectControlStateReserved() const { inline uint32_t getSurfaceMemoryObjectControlStateReserved() const {
return (TheStructure.Common.SurfaceMemoryObjectControlState_Reserved); 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; TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint32_t getSurfaceMemoryObjectControlStateIndexToMocsTables() const { inline uint32_t getSurfaceMemoryObjectControlState() const {
return (TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables << 1);
} }
inline void setTiledResourceMode(const TILED_RESOURCE_MODE value) { inline void setTiledResourceMode(const TILED_RESOURCE_MODE value) {

View File

@@ -318,10 +318,10 @@ typedef struct tagMEDIA_SURFACE_STATE {
inline uint32_t getSurfaceMemoryObjectControlStateReserved() const { inline uint32_t getSurfaceMemoryObjectControlStateReserved() const {
return (TheStructure.Common.SurfaceMemoryObjectControlState_Reserved); 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; TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint32_t getSurfaceMemoryObjectControlStateIndexToMocsTables() const { inline uint32_t getSurfaceMemoryObjectControlState() const {
return (TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables << 1);
} }
inline void setTiledResourceMode(const TILED_RESOURCE_MODE value) { inline void setTiledResourceMode(const TILED_RESOURCE_MODE value) {
@@ -2066,13 +2066,6 @@ typedef struct tagRENDER_SURFACE_STATE {
inline uint32_t getBaseMipLevel() const { inline uint32_t getBaseMipLevel() const {
return TheStructure.Common.BaseMipLevel; 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) { inline void setMemoryObjectControlState(const uint32_t value) {
TheStructure.Common.MemoryObjectControlStateEncryptedData = value; TheStructure.Common.MemoryObjectControlStateEncryptedData = value;
TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = (value >> 1); TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = (value >> 1);
@@ -2992,10 +2985,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getGeneralStateMemoryObjectControlStateReserved() const { inline uint64_t getGeneralStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.GeneralStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getGeneralStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getGeneralStateMemoryObjectControlState() const {
return (TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagGENERALSTATEBASEADDRESS { typedef enum tagGENERALSTATEBASEADDRESS {
@@ -3032,12 +3025,6 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateReserved() const { inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateReserved() const {
return (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved); 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) { inline void setStatelessDataPortAccessMemoryObjectControlState(const uint32_t value) {
TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved = value; TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved = value;
TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables = (value >> 1); TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_IndexToMocsTables = (value >> 1);
@@ -3059,10 +3046,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getSurfaceStateMemoryObjectControlStateReserved() const { inline uint64_t getSurfaceStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.SurfaceStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getSurfaceStateMemoryObjectControlState() const {
return (TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagSURFACESTATEBASEADDRESS { typedef enum tagSURFACESTATEBASEADDRESS {
@@ -3087,10 +3074,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getDynamicStateMemoryObjectControlStateReserved() const { inline uint64_t getDynamicStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.DynamicStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getDynamicStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getDynamicStateMemoryObjectControlState() const {
return (TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagDYNAMICSTATEBASEADDRESS { typedef enum tagDYNAMICSTATEBASEADDRESS {
@@ -3115,12 +3102,6 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getInstructionMemoryObjectControlStateReserved() const { inline uint64_t getInstructionMemoryObjectControlStateReserved() const {
return (TheStructure.Common.InstructionMemoryObjectControlState_Reserved); 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) { inline void setInstructionMemoryObjectControlState(const uint32_t value) {
uint64_t val = static_cast<uint64_t>(value); uint64_t val = static_cast<uint64_t>(value);
TheStructure.Common.InstructionMemoryObjectControlState_Reserved = val; TheStructure.Common.InstructionMemoryObjectControlState_Reserved = val;
@@ -3201,10 +3182,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateReserved() const { inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getBindlessSurfaceStateMemoryObjectControlState() const {
return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagBINDLESSSURFACESTATEBASEADDRESS { typedef enum tagBINDLESSSURFACESTATEBASEADDRESS {
@@ -3235,10 +3216,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getBindlessSamplerStateMemoryObjectControlStateReserved() const { inline uint64_t getBindlessSamplerStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getBindlessSamplerStateMemoryObjectControlState() const {
return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagBINDLESSSAMPLERSTATEBASEADDRESS { typedef enum tagBINDLESSSAMPLERSTATEBASEADDRESS {
@@ -6120,11 +6101,11 @@ typedef struct tagMI_LOAD_REGISTER_MEM {
return TheStructure.RawData[index]; return TheStructure.RawData[index];
} }
inline void inline void
setMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { setMemoryObjectControlState(const uint32_t value) {
DEBUG_BREAK_IF(value > 0x7e00); DEBUG_BREAK_IF(value > 0x7e00);
TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1; TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1;
} }
inline uint32_t getMemoryObjectControlStateIndexToMocsTables() const { inline uint32_t getMemoryObjectControlState() const {
return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1); return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1);
} }
inline void setMemoryObjectControlStateEnable(const bool value) { inline void setMemoryObjectControlStateEnable(const bool value) {
@@ -6472,11 +6453,11 @@ typedef struct tagMI_STORE_DATA_IMM {
return TheStructure.Common.WorkloadPartitionIdOffsetEnable; return TheStructure.Common.WorkloadPartitionIdOffsetEnable;
} }
inline void inline void
setMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { setMemoryObjectControlState(const uint32_t value) {
DEBUG_BREAK_IF(value > 0xfc000); DEBUG_BREAK_IF(value > 0xfc000);
TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1; TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1;
} }
inline uint32_t getMemoryObjectControlStateIndexToMocsTables() const { inline uint32_t getMemoryObjectControlState() const {
return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1); return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1);
} }
inline void setMemoryObjectControlStateEnable(const bool value) { inline void setMemoryObjectControlStateEnable(const bool value) {
@@ -6580,11 +6561,11 @@ typedef struct tagMI_STORE_REGISTER_MEM {
return TheStructure.RawData[index]; return TheStructure.RawData[index];
} }
inline void inline void
setMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { setMemoryObjectControlState(const uint32_t value) {
DEBUG_BREAK_IF(value > 0x7e00); DEBUG_BREAK_IF(value > 0x7e00);
TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1; TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1;
} }
inline uint32_t getMemoryObjectControlStateIndexToMocsTables() const { inline uint32_t getMemoryObjectControlState() const {
return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1); return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1);
} }
inline void setMemoryObjectControlStateEnable(const bool value) { inline void setMemoryObjectControlStateEnable(const bool value) {

View File

@@ -401,12 +401,12 @@ typedef struct tagMEDIA_SURFACE_STATE {
inline uint32_t getXOffsetForUCb() const { inline uint32_t getXOffsetForUCb() const {
return TheStructure.Common.XOffsetForU_Cb; return TheStructure.Common.XOffsetForU_Cb;
} }
inline void setSurfaceMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { inline void setSurfaceMemoryObjectControlState(const uint32_t value) {
UNRECOVERABLE_IF(value > 0x7e); UNRECOVERABLE_IF(value > 0x7e);
TheStructure.Common.SurfaceMemoryObjectControlStateIndexToMocsTables = value; TheStructure.Common.SurfaceMemoryObjectControlStateIndexToMocsTables = value >> 1;
} }
inline uint32_t getSurfaceMemoryObjectControlStateIndexToMocsTables() const { inline uint32_t getSurfaceMemoryObjectControlState() const {
return TheStructure.Common.SurfaceMemoryObjectControlStateIndexToMocsTables; return TheStructure.Common.SurfaceMemoryObjectControlStateIndexToMocsTables << 1;
} }
inline void setVerticalLineStrideOffset(const bool value) { inline void setVerticalLineStrideOffset(const bool value) {
TheStructure.Common.VerticalLineStrideOffset = value; TheStructure.Common.VerticalLineStrideOffset = value;
@@ -2132,13 +2132,6 @@ typedef struct tagRENDER_SURFACE_STATE {
mocs |= (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1); mocs |= (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1);
return (mocs); 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) { inline void setWidth(const uint32_t value) {
TheStructure.Common.Width = value - 1; TheStructure.Common.Width = value - 1;
} }
@@ -3040,11 +3033,11 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline bool getGeneralStateBaseAddressModifyEnable() const { inline bool getGeneralStateBaseAddressModifyEnable() const {
return TheStructure.Common.GeneralStateBaseAddressModifyEnable; return TheStructure.Common.GeneralStateBaseAddressModifyEnable;
} }
inline void setGeneralStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { inline void setGeneralStateMemoryObjectControlState(const uint64_t value) {
UNRECOVERABLE_IF(value > 0x7fL); UNRECOVERABLE_IF(value > 0x7fL);
TheStructure.Common.GeneralStateMemoryObjectControlStateIndexToMocsTables = (value >> 1); // patched TheStructure.Common.GeneralStateMemoryObjectControlStateIndexToMocsTables = (value >> 1); // patched
} }
inline uint64_t getGeneralStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getGeneralStateMemoryObjectControlState() const {
return TheStructure.Common.GeneralStateMemoryObjectControlStateIndexToMocsTables << 1; // patched return TheStructure.Common.GeneralStateMemoryObjectControlStateIndexToMocsTables << 1; // patched
} }
typedef enum tagGENERALSTATEBASEADDRESS { typedef enum tagGENERALSTATEBASEADDRESS {
@@ -3082,13 +3075,6 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline bool getDisableSupportForMultiGpuPartialWritesForStatelessMessages() const { inline bool getDisableSupportForMultiGpuPartialWritesForStatelessMessages() const {
return TheStructure.Common.DisableSupportForMultiGpuPartialWritesForStatelessMessages; 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 inline void setStatelessDataPortAccessMemoryObjectControlState(const uint32_t value) { // patched
TheStructure.Common.StatelessDataPortAccessMemoryObjectControlStateReserved_112 = value; TheStructure.Common.StatelessDataPortAccessMemoryObjectControlStateReserved_112 = value;
TheStructure.Common.StatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables = (value >> 1); TheStructure.Common.StatelessDataPortAccessMemoryObjectControlStateIndexToMocsTables = (value >> 1);
@@ -3111,11 +3097,11 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline bool getSurfaceStateBaseAddressModifyEnable() const { inline bool getSurfaceStateBaseAddressModifyEnable() const {
return TheStructure.Common.SurfaceStateBaseAddressModifyEnable; return TheStructure.Common.SurfaceStateBaseAddressModifyEnable;
} }
inline void setSurfaceStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { inline void setSurfaceStateMemoryObjectControlState(const uint64_t value) {
UNRECOVERABLE_IF(value > 0x7fL); UNRECOVERABLE_IF(value > 0x7fL);
TheStructure.Common.SurfaceStateMemoryObjectControlStateIndexToMocsTables = (value >> 1); // patched TheStructure.Common.SurfaceStateMemoryObjectControlStateIndexToMocsTables = (value >> 1); // patched
} }
inline uint64_t getSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getSurfaceStateMemoryObjectControlState() const {
return TheStructure.Common.SurfaceStateMemoryObjectControlStateIndexToMocsTables << 1; // patched return TheStructure.Common.SurfaceStateMemoryObjectControlStateIndexToMocsTables << 1; // patched
} }
typedef enum tagSURFACESTATEBASEADDRESS { typedef enum tagSURFACESTATEBASEADDRESS {
@@ -3135,11 +3121,11 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline bool getDynamicStateBaseAddressModifyEnable() const { inline bool getDynamicStateBaseAddressModifyEnable() const {
return TheStructure.Common.DynamicStateBaseAddressModifyEnable; return TheStructure.Common.DynamicStateBaseAddressModifyEnable;
} }
inline void setDynamicStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { inline void setDynamicStateMemoryObjectControlState(const uint64_t value) {
UNRECOVERABLE_IF(value > 0x7fL); UNRECOVERABLE_IF(value > 0x7fL);
TheStructure.Common.DynamicStateMemoryObjectControlStateIndexToMocsTables = (value >> 1); // patched TheStructure.Common.DynamicStateMemoryObjectControlStateIndexToMocsTables = (value >> 1); // patched
} }
inline uint64_t getDynamicStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getDynamicStateMemoryObjectControlState() const {
return TheStructure.Common.DynamicStateMemoryObjectControlStateIndexToMocsTables << 1; // patched return TheStructure.Common.DynamicStateMemoryObjectControlStateIndexToMocsTables << 1; // patched
} }
typedef enum tagDYNAMICSTATEBASEADDRESS { typedef enum tagDYNAMICSTATEBASEADDRESS {
@@ -3159,13 +3145,6 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline bool getInstructionBaseAddressModifyEnable() const { inline bool getInstructionBaseAddressModifyEnable() const {
return TheStructure.Common.InstructionBaseAddressModifyEnable; 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 inline void setInstructionMemoryObjectControlState(const uint32_t value) { // patched
uint64_t val = static_cast<uint64_t>(value); uint64_t val = static_cast<uint64_t>(value);
TheStructure.Common.InstructionMemoryObjectControlStateReserved_324 = val; TheStructure.Common.InstructionMemoryObjectControlStateReserved_324 = val;
@@ -3245,11 +3224,11 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline bool getBindlessSurfaceStateBaseAddressModifyEnable() const { inline bool getBindlessSurfaceStateBaseAddressModifyEnable() const {
return TheStructure.Common.BindlessSurfaceStateBaseAddressModifyEnable; return TheStructure.Common.BindlessSurfaceStateBaseAddressModifyEnable;
} }
inline void setBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { inline void setBindlessSurfaceStateMemoryObjectControlState(const uint64_t value) {
UNRECOVERABLE_IF((value >> 1) > 0x3fL); UNRECOVERABLE_IF((value >> 1) > 0x3fL);
TheStructure.Common.BindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables = value >> 1; TheStructure.Common.BindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables = value >> 1;
} }
inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getBindlessSurfaceStateMemoryObjectControlState() const {
return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables << 1); return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables << 1);
} }
typedef enum tagBINDLESSSURFACESTATEBASEADDRESS { typedef enum tagBINDLESSSURFACESTATEBASEADDRESS {
@@ -3281,11 +3260,11 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getBindlessSamplerStateMemoryObjectControlStateReserved() const { inline uint64_t getBindlessSamplerStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlStateReserved_612); return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlStateReserved_612);
} }
inline void setBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables(const uint64_t value) { inline void setBindlessSamplerStateMemoryObjectControlState(const uint64_t value) {
UNRECOVERABLE_IF((value >> 1) > 0x3fL); UNRECOVERABLE_IF((value >> 1) > 0x3fL);
TheStructure.Common.BindlessSamplerStateMemoryObjectControlStateIndexToMocsTables = value >> 1; TheStructure.Common.BindlessSamplerStateMemoryObjectControlStateIndexToMocsTables = value >> 1;
} }
inline uint64_t getBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getBindlessSamplerStateMemoryObjectControlState() const {
return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlStateIndexToMocsTables << 1); return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlStateIndexToMocsTables << 1);
} }
typedef enum tagBINDLESSSAMPLERSTATEBASEADDRESS { typedef enum tagBINDLESSSAMPLERSTATEBASEADDRESS {

View File

@@ -318,10 +318,10 @@ typedef struct tagMEDIA_SURFACE_STATE {
inline uint32_t getSurfaceMemoryObjectControlStateReserved() const { inline uint32_t getSurfaceMemoryObjectControlStateReserved() const {
return (TheStructure.Common.SurfaceMemoryObjectControlState_Reserved); 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; TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint32_t getSurfaceMemoryObjectControlStateIndexToMocsTables() const { inline uint32_t getSurfaceMemoryObjectControlState() const {
return (TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables << 1);
} }
inline void setTiledResourceMode(const TILED_RESOURCE_MODE value) { inline void setTiledResourceMode(const TILED_RESOURCE_MODE value) {
@@ -2090,13 +2090,6 @@ typedef struct tagRENDER_SURFACE_STATE {
inline uint32_t getBaseMipLevel() const { inline uint32_t getBaseMipLevel() const {
return TheStructure.Common.BaseMipLevel; 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) { inline void setMemoryObjectControlState(const uint32_t value) {
TheStructure.Common.MemoryObjectControlStateEncryptedData = value; TheStructure.Common.MemoryObjectControlStateEncryptedData = value;
TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = (value >> 1); TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = (value >> 1);
@@ -3037,10 +3030,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getGeneralStateMemoryObjectControlStateReserved() const { inline uint64_t getGeneralStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.GeneralStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getGeneralStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getGeneralStateMemoryObjectControlState() const {
return (TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.GeneralStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagGENERALSTATEBASEADDRESS { typedef enum tagGENERALSTATEBASEADDRESS {
@@ -3077,12 +3070,6 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateReserved() const { inline uint32_t getStatelessDataPortAccessMemoryObjectControlStateReserved() const {
return (TheStructure.Common.StatelessDataPortAccessMemoryObjectControlState_Reserved); 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) { inline void setL1CachePolicyL1CacheControl(const L1_CACHE_POLICY value) {
TheStructure.Common.L1CachePolicyL1CacheControl = value; TheStructure.Common.L1CachePolicyL1CacheControl = value;
} }
@@ -3110,10 +3097,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getSurfaceStateMemoryObjectControlStateReserved() const { inline uint64_t getSurfaceStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.SurfaceStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getSurfaceStateMemoryObjectControlState() const {
return (TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.SurfaceStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagSURFACESTATEBASEADDRESS { typedef enum tagSURFACESTATEBASEADDRESS {
@@ -3138,10 +3125,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getDynamicStateMemoryObjectControlStateReserved() const { inline uint64_t getDynamicStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.DynamicStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getDynamicStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getDynamicStateMemoryObjectControlState() const {
return (TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.DynamicStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagDYNAMICSTATEBASEADDRESS { typedef enum tagDYNAMICSTATEBASEADDRESS {
@@ -3166,12 +3153,6 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getInstructionMemoryObjectControlStateReserved() const { inline uint64_t getInstructionMemoryObjectControlStateReserved() const {
return (TheStructure.Common.InstructionMemoryObjectControlState_Reserved); 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) { inline void setInstructionMemoryObjectControlState(const uint32_t value) {
uint64_t val = static_cast<uint64_t>(value); uint64_t val = static_cast<uint64_t>(value);
TheStructure.Common.InstructionMemoryObjectControlState_Reserved = val; TheStructure.Common.InstructionMemoryObjectControlState_Reserved = val;
@@ -3252,10 +3233,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateReserved() const { inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getBindlessSurfaceStateMemoryObjectControlState() const {
return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.BindlessSurfaceStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagBINDLESSSURFACESTATEBASEADDRESS { typedef enum tagBINDLESSSURFACESTATEBASEADDRESS {
@@ -3286,10 +3267,10 @@ typedef struct tagSTATE_BASE_ADDRESS {
inline uint64_t getBindlessSamplerStateMemoryObjectControlStateReserved() const { inline uint64_t getBindlessSamplerStateMemoryObjectControlStateReserved() const {
return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_Reserved); 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; TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables = value >> 1;
} }
inline uint64_t getBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables() const { inline uint64_t getBindlessSamplerStateMemoryObjectControlState() const {
return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables << 1); return (TheStructure.Common.BindlessSamplerStateMemoryObjectControlState_IndexToMocsTables << 1);
} }
typedef enum tagBINDLESSSAMPLERSTATEBASEADDRESS { typedef enum tagBINDLESSSAMPLERSTATEBASEADDRESS {
@@ -6221,11 +6202,11 @@ typedef struct tagMI_LOAD_REGISTER_MEM {
return TheStructure.RawData[index]; return TheStructure.RawData[index];
} }
inline void inline void
setMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { setMemoryObjectControlState(const uint32_t value) {
DEBUG_BREAK_IF(value > 0x7e00); DEBUG_BREAK_IF(value > 0x7e00);
TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1; TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1;
} }
inline uint32_t getMemoryObjectControlStateIndexToMocsTables() const { inline uint32_t getMemoryObjectControlState() const {
return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1); return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1);
} }
inline void setMemoryObjectControlStateEnable(const bool value) { inline void setMemoryObjectControlStateEnable(const bool value) {
@@ -6573,11 +6554,11 @@ typedef struct tagMI_STORE_DATA_IMM {
return TheStructure.Common.WorkloadPartitionIdOffsetEnable; return TheStructure.Common.WorkloadPartitionIdOffsetEnable;
} }
inline void inline void
setMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { setMemoryObjectControlState(const uint32_t value) {
DEBUG_BREAK_IF(value > 0xfc000); DEBUG_BREAK_IF(value > 0xfc000);
TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1; TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1;
} }
inline uint32_t getMemoryObjectControlStateIndexToMocsTables() const { inline uint32_t getMemoryObjectControlState() const {
return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1); return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1);
} }
inline void setMemoryObjectControlStateEnable(const bool value) { inline void setMemoryObjectControlStateEnable(const bool value) {
@@ -6681,11 +6662,11 @@ typedef struct tagMI_STORE_REGISTER_MEM {
return TheStructure.RawData[index]; return TheStructure.RawData[index];
} }
inline void inline void
setMemoryObjectControlStateIndexToMocsTables(const uint32_t value) { setMemoryObjectControlState(const uint32_t value) {
DEBUG_BREAK_IF(value > 0x7e00); DEBUG_BREAK_IF(value > 0x7e00);
TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1; TheStructure.Common.MemoryObjectControlStateIndexToMocsTables = value >> 1;
} }
inline uint32_t getMemoryObjectControlStateIndexToMocsTables() const { inline uint32_t getMemoryObjectControlState() const {
return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1); return (TheStructure.Common.MemoryObjectControlStateIndexToMocsTables << 1);
} }
inline void setMemoryObjectControlStateEnable(const bool value) { inline void setMemoryObjectControlStateEnable(const bool value) {

View File

@@ -34,8 +34,8 @@ void StateBaseAddressHelper<GfxFamily>::appendStateBaseAddressParameters(
auto l3CacheOnPolicy = GMM_RESOURCE_USAGE_OCL_STATE_HEAP_BUFFER; auto l3CacheOnPolicy = GMM_RESOURCE_USAGE_OCL_STATE_HEAP_BUFFER;
if (gmmHelper != nullptr) { if (gmmHelper != nullptr) {
stateBaseAddress->setBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables(gmmHelper->getMOCS(l3CacheOnPolicy)); stateBaseAddress->setBindlessSurfaceStateMemoryObjectControlState(gmmHelper->getMOCS(l3CacheOnPolicy));
stateBaseAddress->setBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables(gmmHelper->getMOCS(l3CacheOnPolicy)); stateBaseAddress->setBindlessSamplerStateMemoryObjectControlState(gmmHelper->getMOCS(l3CacheOnPolicy));
} }
appendExtraCacheSettings(stateBaseAddress, gmmHelper); appendExtraCacheSettings(stateBaseAddress, gmmHelper);

View File

@@ -61,11 +61,11 @@ void StateBaseAddressHelper<GfxFamily>::appendStateBaseAddressParameters(
stateBaseAddress->setInstructionMemoryObjectControlState(gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER_CACHELINE_MISALIGNED)); stateBaseAddress->setInstructionMemoryObjectControlState(gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER_CACHELINE_MISALIGNED));
} }
stateBaseAddress->setSurfaceStateMemoryObjectControlStateIndexToMocsTables(gmmHelper->getMOCS(l3CacheOnPolicy)); stateBaseAddress->setSurfaceStateMemoryObjectControlState(gmmHelper->getMOCS(l3CacheOnPolicy));
stateBaseAddress->setDynamicStateMemoryObjectControlStateIndexToMocsTables(gmmHelper->getMOCS(l3CacheOnPolicy)); stateBaseAddress->setDynamicStateMemoryObjectControlState(gmmHelper->getMOCS(l3CacheOnPolicy));
stateBaseAddress->setGeneralStateMemoryObjectControlStateIndexToMocsTables(gmmHelper->getMOCS(l3CacheOnPolicy)); stateBaseAddress->setGeneralStateMemoryObjectControlState(gmmHelper->getMOCS(l3CacheOnPolicy));
stateBaseAddress->setBindlessSurfaceStateMemoryObjectControlStateIndexToMocsTables(gmmHelper->getMOCS(l3CacheOnPolicy)); stateBaseAddress->setBindlessSurfaceStateMemoryObjectControlState(gmmHelper->getMOCS(l3CacheOnPolicy));
stateBaseAddress->setBindlessSamplerStateMemoryObjectControlStateIndexToMocsTables(gmmHelper->getMOCS(l3CacheOnPolicy)); stateBaseAddress->setBindlessSamplerStateMemoryObjectControlState(gmmHelper->getMOCS(l3CacheOnPolicy));
bool enableMultiGpuAtomics = isMultiOsContextCapable; bool enableMultiGpuAtomics = isMultiOsContextCapable;
if (DebugManager.flags.EnableMultiGpuAtomicsOptimization.get()) { if (DebugManager.flags.EnableMultiGpuAtomicsOptimization.get()) {

View File

@@ -5,5 +5,9 @@
# #
if(TESTS_GEN11) 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() add_subdirectories()
endif() endif()

View File

@@ -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);
}

View File

@@ -5,5 +5,9 @@
# #
if(TESTS_GEN12LP) 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() add_subdirectories()
endif() endif()

View File

@@ -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);
}

View File

@@ -5,5 +5,9 @@
# #
if(TESTS_GEN9) 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() add_subdirectories()
endif() endif()

View File

@@ -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);
}

View File

@@ -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()

View File

@@ -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);
}

View File

@@ -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()

View File

@@ -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);
}

View File

@@ -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()

View File

@@ -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);
}