mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-01 04:23:00 +08:00
Use Semaphore to wait for dependencies from different device
Change-Id: I154f377c77847e93d5b188a5b2252e74d9d70b75 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
@@ -347,6 +347,8 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
|
||||
auto submissionRequired = isCommandWithoutKernel(commandType) ? false : true;
|
||||
|
||||
if (submissionRequired) {
|
||||
EventsRequest eventsRequest(numEventsInWaitList, eventWaitList, nullptr);
|
||||
|
||||
completionStamp = enqueueNonBlocked<commandType>(
|
||||
surfacesForResidency,
|
||||
numSurfaceForResidency,
|
||||
@@ -354,6 +356,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
|
||||
commandStreamStart,
|
||||
blocking,
|
||||
multiDispatchInfo,
|
||||
eventsRequest,
|
||||
eventBuilder,
|
||||
taskLevel,
|
||||
slmUsed,
|
||||
@@ -507,6 +510,7 @@ CompletionStamp CommandQueueHw<GfxFamily>::enqueueNonBlocked(
|
||||
size_t commandStreamStart,
|
||||
bool &blocking,
|
||||
const MultiDispatchInfo &multiDispatchInfo,
|
||||
EventsRequest &eventsRequest,
|
||||
EventBuilder &eventBuilder,
|
||||
uint32_t taskLevel,
|
||||
bool slmUsed,
|
||||
@@ -588,6 +592,9 @@ CompletionStamp CommandQueueHw<GfxFamily>::enqueueNonBlocked(
|
||||
dispatchFlags.flushStampReference = this->flushStamp->getStampReference();
|
||||
dispatchFlags.preemptionMode = PreemptionHelper::taskPreemptionMode(*device, multiDispatchInfo);
|
||||
dispatchFlags.outOfOrderExecutionAllowed = !eventBuilder.getEvent() || commandStreamReceiver.isNTo1SubmissionModelEnabled();
|
||||
if (commandStreamReceiver.peekTimestampPacketWriteEnabled()) {
|
||||
dispatchFlags.outOfDeviceDependencies = &eventsRequest;
|
||||
}
|
||||
|
||||
DEBUG_BREAK_IF(taskLevel >= Event::eventNotReady);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user