diff --git a/src/gallium/frontends/rusticl/api/event.rs b/src/gallium/frontends/rusticl/api/event.rs index 81a774f91a7..71412fe10c6 100644 --- a/src/gallium/frontends/rusticl/api/event.rs +++ b/src/gallium/frontends/rusticl/api/event.rs @@ -165,6 +165,10 @@ pub fn create_and_queue( block: bool, work: EventSig, ) -> CLResult<()> { + if deps.iter().any(|dep| dep.is_error()) { + return Err(CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST); + } + let e = Event::new(&q, cmd_type, deps, work); if !event.is_null() { // SAFETY: we check for null and valid API use is to pass in a valid pointer