mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
Improve wait function for Fence object
Related-To: NEO-6242 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
cf9a5ed7d7
commit
814b0ecb87
@@ -366,7 +366,15 @@ WaitStatus CommandStreamReceiver::baseWaitFunction(volatile uint32_t *pollAddres
|
||||
partitionAddress = ptrOffset(partitionAddress, this->postSyncWriteOffset);
|
||||
}
|
||||
|
||||
return testTaskCountReady(pollAddress, taskCountToWait) ? WaitStatus::Ready : WaitStatus::NotReady;
|
||||
partitionAddress = pollAddress;
|
||||
for (uint32_t i = 0; i < activePartitions; i++) {
|
||||
if (*partitionAddress < taskCountToWait) {
|
||||
return WaitStatus::NotReady;
|
||||
}
|
||||
partitionAddress = ptrOffset(partitionAddress, this->postSyncWriteOffset);
|
||||
}
|
||||
|
||||
return WaitStatus::Ready;
|
||||
}
|
||||
|
||||
void CommandStreamReceiver::setTagAllocation(GraphicsAllocation *allocation) {
|
||||
@@ -800,7 +808,7 @@ bool CommandStreamReceiver::checkImplicitFlushForGpuIdle() {
|
||||
|
||||
bool CommandStreamReceiver::testTaskCountReady(volatile uint32_t *pollAddress, uint32_t taskCountToWait) {
|
||||
for (uint32_t i = 0; i < activePartitions; i++) {
|
||||
if (*pollAddress < taskCountToWait) {
|
||||
if (!WaitUtils::waitFunction(pollAddress, taskCountToWait)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user