Append before setting last command to avoid corner case

Change-Id: Iafe5f899427f0119e7f43e96af38e6e3a1dbfc93
Этот коммит содержится в:
Christophe Paquot authored and Christophe Paquot committed 2020-02-13 22:23:20 -05:00
1 родитель 7fb53890b8
Коммит 566144edb2
1 file changed
+2 -2
+2 -2
Просмотреть файл
@@ -240,11 +240,11 @@ void Command::enqueue() {
Agent::postEventCreate(as_cl(static_cast<Event*>(this)), type_);
}
ClPrint(LOG_DEBUG, LOG_CMD, "command is enqueued: %p", this);
queue_->append(*this);
if (IS_HIP) {
queue_->setLastQueuedCommand(this);
}
ClPrint(LOG_DEBUG, LOG_CMD, "command is enqueued: %p", this);
queue_->append(*this);
queue_->flush();
if ((queue_->device().settings().waitCommand_ && (type_ != 0)) ||
((commandWaitBits_ & 0x2) != 0)) {