Skip to content

Commit cd90426

Browse files
fix: request for task count should enable monitor fence dispatch
Related-To: NEO-10356 Signed-off-by: Zbigniew Zdanowicz <[email protected]>
1 parent fc770ca commit cd90426

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

shared/source/command_stream/command_stream_receiver_hw_base.inl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2238,6 +2238,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::handleImmediateFlushSendBatc
22382238
size_t chainedBatchBufferStartOffset = startFromCsr ? csrStream.getUsed() : 0;
22392239
uint64_t taskStartAddress = immediateCommandStream.getGpuBase() + immediateCommandStreamStart;
22402240
bool hasStallingCmds = (startFromCsr || dispatchFlags.blockingAppend || dispatchFlags.hasStallingCmds);
2241+
bool dispatchMonitorFence = dispatchFlags.blockingAppend || dispatchFlags.requireTaskCountUpdate;
22412242

22422243
constexpr bool immediateLowPriority = false;
22432244
const QueueThrottle immediateThrottle = getThrottleFromPowerSavingUint(this->getUmdPowerHintValue());
@@ -2246,7 +2247,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::handleImmediateFlushSendBatc
22462247
BatchBuffer batchBuffer{streamToSubmit.getGraphicsAllocation(), startOffset, chainedBatchBufferStartOffset, taskStartAddress, chainedBatchBuffer,
22472248
immediateLowPriority, immediateThrottle, immediateSliceCount,
22482249
streamToSubmit.getUsed(), &streamToSubmit, flushData.endPtr, this->getNumClients(), hasStallingCmds,
2249-
dispatchFlags.hasRelaxedOrderingDependencies, dispatchFlags.blockingAppend, false};
2250+
dispatchFlags.hasRelaxedOrderingDependencies, dispatchMonitorFence, false};
22502251
updateStreamTaskCount(streamToSubmit, taskCount + 1);
22512252

22522253
auto submissionStatus = flushHandler(batchBuffer, this->getResidencyAllocations());

shared/test/unit_test/command_stream/command_stream_receiver_tests.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6368,6 +6368,8 @@ HWTEST_F(CommandStreamReceiverHwTest, givenEpilogueStreamAvailableWhenFlushImmed
63686368
LinearStream epilogueStream(commandBuffer);
63696369

63706370
commandStreamReceiver.storeMakeResidentAllocations = true;
6371+
commandStreamReceiver.recordFlushedBatchBuffer = true;
6372+
63716373
immediateFlushTaskFlags.requireTaskCountUpdate = true;
63726374
immediateFlushTaskFlags.optionalEpilogueCmdStream = &epilogueStream;
63736375

@@ -6377,6 +6379,7 @@ HWTEST_F(CommandStreamReceiverHwTest, givenEpilogueStreamAvailableWhenFlushImmed
63776379
*pDevice);
63786380

63796381
EXPECT_TRUE(commandStreamReceiver.isMadeResident(commandBuffer));
6382+
EXPECT_TRUE(commandStreamReceiver.latestFlushedBatchBuffer.dispatchMonitorFence);
63806383

63816384
HardwareParse hwParser;
63826385

0 commit comments

Comments
 (0)