mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
Use wait utils while waiting for timestamps
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
4d433d8674
commit
63116e4100
@@ -978,34 +978,6 @@ bool CommandQueue::isTimestampWaitEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
void CommandQueue::waitForTimestamps(uint32_t taskCount) {
|
||||
if (isTimestampWaitEnabled()) {
|
||||
bool waited = false;
|
||||
|
||||
for (const auto ×tamp : timestampPacketContainer->peekNodes()) {
|
||||
for (uint32_t i = 0; i < timestamp->getPacketsUsed(); i++) {
|
||||
while (timestamp->getContextEndValue(i) == 1) {
|
||||
}
|
||||
waited = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (isOOQEnabled()) {
|
||||
for (const auto ×tamp : deferredTimestampPackets->peekNodes()) {
|
||||
for (uint32_t i = 0; i < timestamp->getPacketsUsed(); i++) {
|
||||
while (timestamp->getContextEndValue(i) == 1) {
|
||||
}
|
||||
waited = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (waited) {
|
||||
getGpgpuCommandStreamReceiver().updateTagFromCpu(taskCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CommandQueue::waitForAllEngines(bool blockedQueue, PrintfHandler *printfHandler, bool cleanTemporaryAllocationsList) {
|
||||
if (blockedQueue) {
|
||||
while (isQueueBlocked()) {
|
||||
|
||||
Reference in New Issue
Block a user