rusticl/event: fix create_and_queue for deps in error states

Cc: mesa-stable
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36007>
This commit is contained in:
Karol Herbst 2025-07-07 00:14:34 +02:00 committed by Marge Bot
parent 7154180b67
commit 5d29acf23d

View file

@ -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