mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Update latestSentTaskCount before flush during blit dispatch
Change-Id: I44e1f4e8a70c17b902164491c6d58e8523160ac3 Related-To: NEO-3020 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
2ca97d3881
commit
62e2ca05e1
@ -787,6 +787,7 @@ void CommandStreamReceiverHw<GfxFamily>::blitFromHostPtr(MemObj &destinationMemO
|
||||
auto &commandStream = getCS(BlitCommandsHelper<GfxFamily>::estimateBlitCommandsSize(sourceSize));
|
||||
auto commandStreamStart = commandStream.getUsed();
|
||||
auto newTaskCount = taskCount + 1;
|
||||
latestSentTaskCount = newTaskCount;
|
||||
|
||||
HostPtrSurface hostPtrSurface(sourceHostPtr, static_cast<size_t>(sourceSize), true);
|
||||
bool success = createAllocationForHostSurface(hostPtrSurface, false);
|
||||
@ -818,7 +819,6 @@ void CommandStreamReceiverHw<GfxFamily>::blitFromHostPtr(MemObj &destinationMemO
|
||||
makeSurfacePackNonResident(getResidencyAllocations());
|
||||
|
||||
latestFlushedTaskCount = newTaskCount;
|
||||
latestSentTaskCount = newTaskCount;
|
||||
taskCount = newTaskCount;
|
||||
|
||||
lock.unlock();
|
||||
|
@ -316,6 +316,7 @@ HWTEST_F(BcsTests, givenBltSizeWithLeftoverWhenDispatchedThenProgramAllRequiredC
|
||||
EXPECT_EQ(newTaskCount, csr.taskCount);
|
||||
EXPECT_EQ(newTaskCount, csr.latestFlushedTaskCount);
|
||||
EXPECT_EQ(newTaskCount, csr.latestSentTaskCount);
|
||||
EXPECT_EQ(newTaskCount, csr.latestSentTaskCountValueDuringFlush);
|
||||
EXPECT_EQ(1u, csr.recursiveLockCounter.load());
|
||||
|
||||
HardwareParse hwParser;
|
||||
|
@ -94,6 +94,7 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
|
||||
if (recordFlusheBatchBuffer) {
|
||||
latestFlushedBatchBuffer = batchBuffer;
|
||||
}
|
||||
latestSentTaskCountValueDuringFlush = latestSentTaskCount;
|
||||
return BaseClass::flush(batchBuffer, allocationsForResidency);
|
||||
}
|
||||
|
||||
@ -169,6 +170,7 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
|
||||
bool initProgrammingFlagsCalled = false;
|
||||
LinearStream *lastFlushedCommandStream = nullptr;
|
||||
BatchBuffer latestFlushedBatchBuffer = {};
|
||||
uint32_t latestSentTaskCountValueDuringFlush = 0;
|
||||
std::atomic<uint32_t> latestWaitForCompletionWithTimeoutTaskCount{0};
|
||||
|
||||
protected:
|
||||
|
Reference in New Issue
Block a user