mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Use single class to program load register command
Change-Id: I90fe084409588cb32f0ac43a3db5082047d7a68b Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
138f04bdcd
commit
ce1b669cda
@@ -80,11 +80,10 @@ void PreemptionHelper::applyPreemptionWaCmdsBegin<GfxFamily>(LinearStream *pComm
|
||||
if (preemptionMode == PreemptionMode::ThreadGroup ||
|
||||
preemptionMode == PreemptionMode::MidThread) {
|
||||
if (device.getHardwareInfo().workaroundTable.waModifyVFEStateAfterGPGPUPreemption) {
|
||||
auto pCmd = reinterpret_cast<MI_LOAD_REGISTER_IMM *>(pCommandStream->getSpace(sizeof(MI_LOAD_REGISTER_IMM)));
|
||||
MI_LOAD_REGISTER_IMM cmd = GfxFamily::cmdInitLoadRegisterImm;
|
||||
cmd.setRegisterOffset(CS_GPR_R0);
|
||||
cmd.setDataDword(GPGPU_WALKER_COOKIE_VALUE_BEFORE_WALKER);
|
||||
*pCmd = cmd;
|
||||
LriHelper<GfxFamily>::program(pCommandStream,
|
||||
CS_GPR_R0,
|
||||
GPGPU_WALKER_COOKIE_VALUE_BEFORE_WALKER,
|
||||
false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,11 +95,10 @@ void PreemptionHelper::applyPreemptionWaCmdsEnd<GfxFamily>(LinearStream *pComman
|
||||
if (preemptionMode == PreemptionMode::ThreadGroup ||
|
||||
preemptionMode == PreemptionMode::MidThread) {
|
||||
if (device.getHardwareInfo().workaroundTable.waModifyVFEStateAfterGPGPUPreemption) {
|
||||
auto pCmd = reinterpret_cast<MI_LOAD_REGISTER_IMM *>(pCommandStream->getSpace(sizeof(MI_LOAD_REGISTER_IMM)));
|
||||
MI_LOAD_REGISTER_IMM cmd = GfxFamily::cmdInitLoadRegisterImm;
|
||||
cmd.setRegisterOffset(CS_GPR_R0);
|
||||
cmd.setDataDword(GPGPU_WALKER_COOKIE_VALUE_AFTER_WALKER);
|
||||
*pCmd = cmd;
|
||||
LriHelper<GfxFamily>::program(pCommandStream,
|
||||
CS_GPR_R0,
|
||||
GPGPU_WALKER_COOKIE_VALUE_AFTER_WALKER,
|
||||
false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user