Add regkey to override MOCS index in surface state for scratch space

Introduce the debug regkey OverrideMocsIndexForScratchSpace
to control MOCS index in surface state for scratch space

Related-To: NEO-6509

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
Milczarek, Slawomir
2021-12-07 14:20:57 +00:00
committed by Compute-Runtime-Automation
parent 5d99b1c7a6
commit b16438de56
4 changed files with 41 additions and 1 deletions

View File

@@ -155,6 +155,10 @@ void HwHelperHw<Family>::setRenderSurfaceStateForBuffer(const RootDeviceEnvironm
} else {
state.setMemoryObjectControlState(gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED));
}
if (DebugManager.flags.OverrideMocsIndexForScratchSpace.get() != -1) {
auto mocsIndex = static_cast<uint32_t>(DebugManager.flags.OverrideMocsIndexForScratchSpace.get()) << 1;
state.setMemoryObjectControlState(mocsIndex);
}
state.setSurfaceBaseAddress(bufferStateAddress);