SWDEV-424249 - Check if HwEvent is available
Allocate marker only if HW event doesn't exist for the last command. Change-Id: I3e7284202365a9c75313fb5403f0c1908ab51d1e
This commit is contained in:
@@ -121,7 +121,15 @@ void HostQueue::finish(bool cpu_wait) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (nullptr == command || command->type() != CL_COMMAND_MARKER ||
|
||||
// If command doesn't contain HW event and runtime didn't request CPU wait,
|
||||
// then force marker submit
|
||||
bool force_marker = false;
|
||||
if (AMD_DIRECT_DISPATCH && (command != nullptr) && !cpu_wait) {
|
||||
void* hw_event =
|
||||
(command->NotifyEvent() != nullptr) ? command->NotifyEvent()->HwEvent() : command->HwEvent();
|
||||
force_marker = (hw_event == nullptr);
|
||||
}
|
||||
if (nullptr == command || force_marker ||
|
||||
vdev()->isHandlerPending() || vdev()->isFenceDirty()) {
|
||||
if (nullptr != command) {
|
||||
command->release();
|
||||
|
||||
Reference in New Issue
Block a user