mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 23:33:20 +08:00
Wait for barrier on every OCL split blitter
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
adbda5906a
commit
320deec53b
@@ -452,6 +452,7 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
|
||||
};
|
||||
std::array<BcsTimestampPacketContainers, bcsInfoMaskSize> bcsTimestampPacketContainers;
|
||||
bool stallingCommandsOnNextFlushRequired = false;
|
||||
bool splitBarrierRequired = false;
|
||||
};
|
||||
|
||||
template <typename PtrType>
|
||||
|
||||
@@ -258,6 +258,7 @@ cl_int CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
|
||||
} else if (computeCommandStreamReceiver.peekTimestampPacketWriteEnabled()) {
|
||||
if (CL_COMMAND_BARRIER == commandType) {
|
||||
setStallingCommandsOnNextFlush(true);
|
||||
this->splitBarrierRequired = true;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < eventsRequest.numEventsInWaitList; i++) {
|
||||
@@ -1245,7 +1246,7 @@ cl_int CommandQueueHw<GfxFamily>::enqueueBlitSplit(MultiDispatchInfo &dispatchIn
|
||||
di,
|
||||
numEventsInWaitList,
|
||||
eventWaitList,
|
||||
event);
|
||||
nullptr);
|
||||
DEBUG_BREAK_IF(ret != CL_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -1259,6 +1260,9 @@ cl_int CommandQueueHw<GfxFamily>::enqueueBlitSplit(MultiDispatchInfo &dispatchIn
|
||||
auto remainingSize = size;
|
||||
|
||||
for (size_t i = 0; i < copyEngines.size(); i++) {
|
||||
if (isOOQEnabled() && this->splitBarrierRequired) {
|
||||
this->setStallingCommandsOnNextFlush(true);
|
||||
}
|
||||
auto localSize = remainingSize / (copyEngines.size() - i);
|
||||
auto localParams = dispatchInfo.peekBuiltinOpParams();
|
||||
localParams.size.x = localSize;
|
||||
@@ -1282,6 +1286,7 @@ cl_int CommandQueueHw<GfxFamily>::enqueueBlitSplit(MultiDispatchInfo &dispatchIn
|
||||
}
|
||||
|
||||
this->timestampPacketContainer->swapNodes(splitNodes);
|
||||
this->splitBarrierRequired = false;
|
||||
|
||||
queueOwnership.unlock();
|
||||
for (auto &lock : locks) {
|
||||
|
||||
Reference in New Issue
Block a user