mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 17:13:29 +08:00
Refactor MemorySynchronizationCommands class
Related-To: NEO-4338 Change-Id: Id0ae9c73293fd99f53fccc11a69ca14fa9a6d119 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
4bf503da12
commit
b2210fa5bb
@@ -28,6 +28,8 @@
|
||||
#include "level_zero/core/source/fence/fence.h"
|
||||
#include "level_zero/tools/source/metrics/metric.h"
|
||||
|
||||
#include "pipe_control_args.h"
|
||||
|
||||
#include <limits>
|
||||
#include <thread>
|
||||
|
||||
@@ -219,7 +221,8 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandLists(
|
||||
|
||||
auto commandListPreemption = commandList->getCommandListPreemptionMode();
|
||||
if (statePreemption != commandListPreemption) {
|
||||
NEO::MemorySynchronizationCommands<GfxFamily>::addPipeControl(child, false);
|
||||
NEO::PipeControlArgs args;
|
||||
NEO::MemorySynchronizationCommands<GfxFamily>::addPipeControl(child, args);
|
||||
NEO::PreemptionHelper::programCmdStream<GfxFamily>(child,
|
||||
commandListPreemption,
|
||||
statePreemption,
|
||||
@@ -267,9 +270,13 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandLists(
|
||||
if (isCopyOnlyCommandQueue) {
|
||||
NEO::EncodeMiFlushDW<GfxFamily>::programMiFlushDw(child, fence->getGpuAddress(), Fence::STATE_SIGNALED, false, true);
|
||||
} else {
|
||||
NEO::MemorySynchronizationCommands<GfxFamily>::obtainPipeControlAndProgramPostSyncOperation(
|
||||
NEO::PipeControlArgs args(true);
|
||||
NEO::MemorySynchronizationCommands<GfxFamily>::addPipeControlAndProgramPostSyncOperation(
|
||||
child, POST_SYNC_OPERATION::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA,
|
||||
fence->getGpuAddress(), Fence::STATE_SIGNALED, true, device->getHwInfo());
|
||||
fence->getGpuAddress(),
|
||||
Fence::STATE_SIGNALED,
|
||||
device->getHwInfo(),
|
||||
args);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -352,9 +359,14 @@ void CommandQueueHw<gfxCoreFamily>::dispatchTaskCountWrite(NEO::LinearStream &co
|
||||
if (isCopyOnlyCommandQueue) {
|
||||
NEO::EncodeMiFlushDW<GfxFamily>::programMiFlushDw(commandStream, gpuAddress, taskCountToWrite, false, true);
|
||||
} else {
|
||||
NEO::MemorySynchronizationCommands<GfxFamily>::obtainPipeControlAndProgramPostSyncOperation(
|
||||
commandStream, POST_SYNC_OPERATION::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA,
|
||||
gpuAddress, taskCountToWrite, true, device->getHwInfo());
|
||||
NEO::PipeControlArgs args(true);
|
||||
NEO::MemorySynchronizationCommands<GfxFamily>::addPipeControlAndProgramPostSyncOperation(
|
||||
commandStream,
|
||||
POST_SYNC_OPERATION::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA,
|
||||
gpuAddress,
|
||||
taskCountToWrite,
|
||||
device->getHwInfo(),
|
||||
args);
|
||||
}
|
||||
}
|
||||
} // namespace L0
|
||||
|
||||
Reference in New Issue
Block a user