SWDEV-440746 - Release last command on terminate

Change-Id: Ib6a9b8fc9a8692eb17b39b854cefd92c6b59733f
Ta zmiana jest zawarta w:
%! (template.HTML=German Andryeyev)złożyło 2024-04-22 09:57:38 -04:00
1 rodzic 7448113cfc
złożenie 0ccdb3e160
Plik 1 zmieniony
+5 -5
+5 -5
Wyświetl plik
@@ -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();