rusticl/queue: do not return event status errors on flush/finish

Fixes random fails in the test_events userevents test as it sets an event
to -1 and clFinish returned that error code making the test fail.

Fixes: 3129fd8dcf ("rusticl/queue: check device error status")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36250>
This commit is contained in:
Karol Herbst 2025-07-20 21:27:29 +02:00 committed by Marge Bot
parent 566ea76d8e
commit 7ce8369985

View file

@ -476,10 +476,10 @@ impl Queue {
// Waiting on the last event is good enough here as the queue will process it in order
// It's not a problem if the weak ref is invalid as that means the work is already done
// and waiting isn't necessary anymore.
let err = last.upgrade().map(|e| e.wait()).unwrap_or_default();
if err < 0 {
return Err(err);
}
//
// We also ignore any error state of events as it's the callers responsibility to check
// for it if it cares.
last.upgrade().map(|e| e.wait());
}
Ok(())
}