SWDEV-352487 - Don't add notifications as the last command

Change-Id: Ifed34485839ef2c9491e8e8f6bb3569932160b1c
Cette révision appartient à :
German
2022-10-21 17:49:08 -04:00
révisé par German Andryeyev
Parent a65ed69c1b
révision e223b0f678
+7 -4
Voir le fichier
@@ -113,7 +113,7 @@ void HostQueue::finish() {
Command* command = nullptr;
if (IS_HIP) {
command = getLastQueuedCommand(true);
if (AMD_DIRECT_DISPATCH && command == nullptr) {
if (command == nullptr) {
return;
}
}
@@ -233,9 +233,12 @@ void HostQueue::append(Command& command) {
}
// Set last submitted command
Command* prevLastEnqueueCommand;
command.retain();
{
Command* prevLastEnqueueCommand = nullptr;
// Attach only real commands and skip internal notifications for CPU queue
if (command.waitingEvent() == nullptr) {
command.retain();
// lastCmdLock_ ensures that lastEnqueueCommand() can retain the command before it is swapped
// out. We want to keep this critical section as short as possible, so the command should be
// released outside this section.