Remove RMW access patterns from functions programming on gfx memory

Related-To: NEO-4338

Change-Id: I8fe555525f937e75c5439702b328c734af9af1f9
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2020-04-08 18:33:03 +02:00
committed by sys_ocldev
parent 719b22ee11
commit 5e98368dad
18 changed files with 247 additions and 181 deletions

View File

@@ -39,25 +39,28 @@ void PreambleHelper<SKLFamily>::programPipelineSelect(LinearStream *pCommandStre
typedef typename SKLFamily::PIPELINE_SELECT PIPELINE_SELECT;
auto pCmd = (PIPELINE_SELECT *)pCommandStream->getSpace(sizeof(PIPELINE_SELECT));
*pCmd = SKLFamily::cmdInitPipelineSelect;
auto pCmd = pCommandStream->getSpaceForCmd<PIPELINE_SELECT>();
PIPELINE_SELECT cmd = SKLFamily::cmdInitPipelineSelect;
auto mask = pipelineSelectEnablePipelineSelectMaskBits | pipelineSelectMediaSamplerDopClockGateMaskBits;
pCmd->setMaskBits(mask);
pCmd->setPipelineSelection(PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU);
pCmd->setMediaSamplerDopClockGateEnable(!pipelineSelectArgs.mediaSamplerRequired);
cmd.setMaskBits(mask);
cmd.setPipelineSelection(PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU);
cmd.setMediaSamplerDopClockGateEnable(!pipelineSelectArgs.mediaSamplerRequired);
*pCmd = cmd;
}
template <>
void PreambleHelper<SKLFamily>::addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo, aub_stream::EngineType engineType) {
auto pipeControl = pCommandStream->getSpaceForCmd<PIPE_CONTROL>();
*pipeControl = SKLFamily::cmdInitPipeControl;
pipeControl->setCommandStreamerStallEnable(true);
PIPE_CONTROL cmd = SKLFamily::cmdInitPipeControl;
cmd.setCommandStreamerStallEnable(true);
if (hwInfo->workaroundTable.waSendMIFLUSHBeforeVFE) {
pipeControl->setRenderTargetCacheFlushEnable(true);
pipeControl->setDepthCacheFlushEnable(true);
pipeControl->setDcFlushEnable(true);
cmd.setRenderTargetCacheFlushEnable(true);
cmd.setDepthCacheFlushEnable(true);
cmd.setDcFlushEnable(true);
}
*pipeControl = cmd;
}
template <>
@@ -70,14 +73,15 @@ void PreambleHelper<SKLFamily>::programThreadArbitration(LinearStream *pCommandS
UNRECOVERABLE_IF(requiredThreadArbitrationPolicy == ThreadArbitrationPolicy::NotPresent);
auto pipeControl = pCommandStream->getSpaceForCmd<PIPE_CONTROL>();
*pipeControl = SKLFamily::cmdInitPipeControl;
pipeControl->setCommandStreamerStallEnable(true);
PIPE_CONTROL cmd = SKLFamily::cmdInitPipeControl;
cmd.setCommandStreamerStallEnable(true);
*pipeControl = cmd;
auto pCmd = pCommandStream->getSpaceForCmd<MI_LOAD_REGISTER_IMM>();
*pCmd = SKLFamily::cmdInitLoadRegisterImm;
pCmd->setRegisterOffset(DebugControlReg2::address);
pCmd->setDataDword(DebugControlReg2::getRegData(requiredThreadArbitrationPolicy));
MI_LOAD_REGISTER_IMM lriCmd = SKLFamily::cmdInitLoadRegisterImm;
lriCmd.setRegisterOffset(DebugControlReg2::address);
lriCmd.setDataDword(DebugControlReg2::getRegData(requiredThreadArbitrationPolicy));
*pCmd = lriCmd;
}
template <>