mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-10 04:31:30 +11:00
Add memory barrier to ComputePass
We need to be able to call memory_barrier() on ComputePass, to avoid the borrow checker complaining if we tried to call it on the underlying command buffer.
This commit is contained in:
parent
5a9b8d9243
commit
ea0fbab8aa
|
@ -743,6 +743,15 @@ impl<'a> ComputePass<'a> {
|
|||
.dispatch(pipeline, descriptor_set, workgroup_count, workgroup_size);
|
||||
}
|
||||
|
||||
/// Add a memory barrier.
|
||||
///
|
||||
/// Inserts a memory barrier in the compute encoder. This is a convenience
|
||||
/// function for calling the same function on the underlying command buffer,
|
||||
/// avoiding borrow check issues.
|
||||
pub unsafe fn memory_barrier(&mut self) {
|
||||
self.cmd_buf.memory_barrier();
|
||||
}
|
||||
|
||||
pub unsafe fn end(self) {
|
||||
self.cmd_buf.cmd_buf().end_compute_pass();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue