rusticl/mesa: add return status to PipeFence::wait
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36158>
This commit is contained in:
@@ -183,7 +183,9 @@ impl Context {
|
||||
d.helper_ctx()
|
||||
.exec(|ctx| ctx.buffer_subdata(r, 0, user_ptr, size.try_into().unwrap()))
|
||||
})
|
||||
.for_each(|f| f.wait());
|
||||
.for_each(|f| {
|
||||
f.wait();
|
||||
});
|
||||
}
|
||||
|
||||
Ok(res)
|
||||
@@ -255,7 +257,9 @@ impl Context {
|
||||
d.helper_ctx()
|
||||
.exec(|ctx| ctx.texture_subdata(r, &bx, user_ptr, stride, layer_stride))
|
||||
})
|
||||
.for_each(|f| f.wait());
|
||||
.for_each(|f| {
|
||||
f.wait();
|
||||
});
|
||||
}
|
||||
|
||||
Ok(res)
|
||||
|
||||
@@ -30,8 +30,11 @@ impl PipeFence {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn wait(&self) {
|
||||
self.screen.fence_finish(self.fence);
|
||||
/// Returns false on errors.
|
||||
///
|
||||
/// TODO: should be a Result.
|
||||
pub fn wait(&self) -> bool {
|
||||
self.screen.fence_finish(self.fence)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -445,14 +445,14 @@ impl PipeScreen {
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn fence_finish(&self, fence: *mut pipe_fence_handle) {
|
||||
pub(super) fn fence_finish(&self, fence: *mut pipe_fence_handle) -> bool {
|
||||
unsafe {
|
||||
self.screen().fence_finish.unwrap()(
|
||||
self.screen.as_ptr(),
|
||||
ptr::null_mut(),
|
||||
fence,
|
||||
OS_TIMEOUT_INFINITE as u64,
|
||||
);
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user