SWDEV-440746 - Release last command on terminate

Change-Id: Ib6a9b8fc9a8692eb17b39b854cefd92c6b59733f
Tento commit je obsažen v:
German Andryeyev
2024-04-19 16:12:16 -04:00
rodič 7448113cfc
revize 0ccdb3e160
+5 -5
Zobrazit soubor
@@ -59,11 +59,11 @@ HostQueue::HostQueue(Context& context, Device& device, cl_command_queue_properti
bool HostQueue::terminate() {
if (AMD_DIRECT_DISPATCH) {
if (vdev() != nullptr) {
Command* marker = new Marker(*this, true);
if (marker != nullptr) {
marker->enqueue();
marker->awaitCompletion();
marker->release();
// If the queue still has the last command, then wait and release it
if (lastEnqueueCommand_ != nullptr) {
lastEnqueueCommand_->awaitCompletion();
lastEnqueueCommand_->release();
lastEnqueueCommand_ = nullptr;
}
}
thread_.Release();