Skip to content

Commit 0c02ab6

Browse files
Move blit enqueue out of enqueueCommon [5/n]
Change-Id: Ib63a4e9e60c7539a242034f36953c1d322fc9bee Signed-off-by: Bartosz Dunajski <[email protected]>
1 parent 847b850 commit 0c02ab6

File tree

1 file changed

+8
-18
lines changed

1 file changed

+8
-18
lines changed

opencl/source/command_queue/enqueue_common.h

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
163163
auto blockQueue = false;
164164
auto taskLevel = 0u;
165165
obtainTaskLevelAndBlockedStatus(taskLevel, numEventsInWaitList, eventWaitList, blockQueue, commandType);
166-
bool blitEnqueue = blitEnqueueAllowed(commandType);
167166

168167
if (parentKernel && !blockQueue) {
169168
while (!devQueueHw->isEMCriticalSectionFree())
@@ -185,35 +184,29 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
185184

186185
bool enqueueWithBlitAuxTranslation = HwHelperHw<GfxFamily>::isBlitAuxTranslationRequired(device->getHardwareInfo(), multiDispatchInfo);
187186

188-
if (blitEnqueue || getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled()) {
187+
if (getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled()) {
189188
eventsRequest.fillCsrDependencies(csrDeps, getGpgpuCommandStreamReceiver(), CsrDependencies::DependenciesType::OnCsr);
190189
auto allocator = getGpgpuCommandStreamReceiver().getTimestampPacketAllocator();
191190

192191
size_t nodesCount = 0u;
193-
if (blitEnqueue || isCacheFlushCommand(commandType)) {
192+
if (isCacheFlushCommand(commandType)) {
194193
nodesCount = 1;
195194
} else if (!multiDispatchInfo.empty()) {
196195
nodesCount = estimateTimestampPacketNodesCount(multiDispatchInfo);
197196
}
198197

199-
if (isCacheFlushForBcsRequired()) {
198+
if (isCacheFlushForBcsRequired() && enqueueWithBlitAuxTranslation) {
200199
// Cache flush for aux translation is always required (if supported)
201-
if ((blitEnqueue && isGpgpuSubmissionForBcsRequired(blockQueue)) || (enqueueWithBlitAuxTranslation)) {
202-
timestampPacketDependencies.cacheFlushNodes.add(allocator->getTag());
203-
}
204-
}
205-
206-
if (blitEnqueue && !blockQueue && getGpgpuCommandStreamReceiver().isStallingPipeControlOnNextFlushRequired()) {
207-
timestampPacketDependencies.barrierNodes.add(allocator->getTag());
200+
timestampPacketDependencies.cacheFlushNodes.add(allocator->getTag());
208201
}
209202

210203
if (nodesCount > 0) {
211-
obtainNewTimestampPacketNodes(nodesCount, timestampPacketDependencies.previousEnqueueNodes, clearAllDependencies, blitEnqueue);
204+
obtainNewTimestampPacketNodes(nodesCount, timestampPacketDependencies.previousEnqueueNodes, clearAllDependencies, false);
212205
csrDeps.push_back(&timestampPacketDependencies.previousEnqueueNodes);
213206
}
214207
}
215208

216-
auto &commandStream = *obtainCommandStream<commandType>(csrDeps, blitEnqueue, blockQueue, multiDispatchInfo, eventsRequest,
209+
auto &commandStream = *obtainCommandStream<commandType>(csrDeps, false, blockQueue, multiDispatchInfo, eventsRequest,
217210
blockedCommandsData, surfacesForResidency, numSurfaceForResidency);
218211
auto commandStreamStart = commandStream.getUsed();
219212

@@ -230,10 +223,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
230223

231224
bool flushDependenciesForNonKernelCommand = false;
232225

233-
if (blitEnqueue) {
234-
blitPropertiesContainer.push_back(processDispatchForBlitEnqueue(multiDispatchInfo, timestampPacketDependencies,
235-
eventsRequest, commandStream, commandType, blockQueue));
236-
} else if (multiDispatchInfo.empty() == false) {
226+
if (multiDispatchInfo.empty() == false) {
237227
processDispatchForKernels<commandType>(multiDispatchInfo, printfHandler, eventBuilder.getEvent(),
238228
hwTimeStamps, blockQueue, devQueueHw, csrDeps, blockedCommandsData.get(),
239229
timestampPacketDependencies);
@@ -260,7 +250,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
260250

261251
CompletionStamp completionStamp = {CompletionStamp::notReady, taskLevel, 0};
262252

263-
const EnqueueProperties enqueueProperties(blitEnqueue, !multiDispatchInfo.empty(), isCacheFlushCommand(commandType),
253+
const EnqueueProperties enqueueProperties(false, !multiDispatchInfo.empty(), isCacheFlushCommand(commandType),
264254
flushDependenciesForNonKernelCommand, &blitPropertiesContainer);
265255

266256
if (!blockQueue) {

0 commit comments

Comments
 (0)