SWDEV-285318 - Wait for the queue before destruction
With direct dispatch enabled make sure the queue is done before destruction. Change-Id: Ib80af3efb97dfb93e2dce60a11db34fb5c45f5cd
Этот коммит содержится в:
@@ -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_)) {
|
||||
|
||||
Ссылка в новой задаче
Block a user