mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 17:10:11 +01:00
rusticl/event: we need to call the CL_COMPLETE callback on errors as well
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10673
Fixes: 47a80d7ff4 ("rusticl/event: proper eventing support")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27777>
This commit is contained in:
parent
67ea2eb97a
commit
36fb256e9a
1 changed files with 5 additions and 2 deletions
|
|
@ -107,8 +107,11 @@ impl Event {
|
|||
self.cv.notify_all();
|
||||
}
|
||||
|
||||
if [CL_COMPLETE, CL_RUNNING, CL_SUBMITTED].contains(&(new as u32)) {
|
||||
if let Some(cbs) = lock.cbs.get_mut(new as usize) {
|
||||
// on error we need to call the CL_COMPLETE callbacks
|
||||
let cb_idx = if new < 0 { CL_COMPLETE } else { new as u32 };
|
||||
|
||||
if [CL_COMPLETE, CL_RUNNING, CL_SUBMITTED].contains(&cb_idx) {
|
||||
if let Some(cbs) = lock.cbs.get_mut(cb_idx as usize) {
|
||||
cbs.drain(..).for_each(|cb| cb.call(self, new));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue