SWDEV-285318 - Wait for the queue before destruction

With direct dispatch enabled make sure the queue is done before
destruction.

Change-Id: Ib80af3efb97dfb93e2dce60a11db34fb5c45f5cd
Этот коммит содержится в:
German Andryeyev
2021-05-19 09:58:39 -04:00
родитель 721c3eb150
Коммит a81756bba3
+7
Просмотреть файл
@@ -54,6 +54,13 @@ HostQueue::HostQueue(Context& context, Device& device, cl_command_queue_properti
bool HostQueue::terminate() {
if (AMD_DIRECT_DISPATCH) {
Command* marker = new Marker(*this, true);
if (marker != nullptr) {
marker->enqueue();
marker->awaitCompletion();
marker->release();
}
thread_.acceptingCommands_ = false;
thread_.Release();
} else {
if (Os::isThreadAlive(thread_)) {