Avoid ReadModifyWrite problem on devices with coherent L3.

Setting one of bitfields requires read from local memory which is very slow.
This is not needed for devices that have coherent L3.
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek
2022-03-04 14:07:37 +00:00
committed by Compute-Runtime-Automation
parent c5ff07237b
commit f293c9ab25

View File

@@ -759,10 +759,14 @@ inline bool CommandStreamReceiverHw<GfxFamily>::flushBatchedSubmissions() {
}
//make sure we flush DC if needed
if (epiloguePipeControlLocation) {
bool flushDcInEpilogue = MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(
!DebugManager.flags.DisableDcFlushInEpilogue.get(), hwInfo);
((PIPE_CONTROL *)epiloguePipeControlLocation)->setDcFlushEnable(flushDcInEpilogue);
if (epiloguePipeControlLocation && MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo)) {
auto emitDcFlush = true;
if (DebugManager.flags.DisableDcFlushInEpilogue.get()) {
emitDcFlush = false;
}
((PIPE_CONTROL *)epiloguePipeControlLocation)->setDcFlushEnable(emitDcFlush);
}
primaryCmdBuffer->batchBuffer.endCmdPtr = currentBBendLocation;