mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-21 22:34:43 +00:00
Update DESIGN.md
This commit is contained in:
parent
5c6c8e8b72
commit
6f11dbd8f5
@ -106,6 +106,8 @@ pub fn submit_command_buffer<'a>(cmd: &'a CommandsBuffer) -> FenceGuard<'a> {
|
||||
|
||||
The `FenceGuard` ensures that the command buffer is alive. Destroying a `FenceGuard` blocks until the vulkan fence is fulfilled.
|
||||
|
||||
*Leak-safety: `CommandsBuffer` should contain a flag indicating whether or not it is currently locked. Destroying the `FenceGuard` clears the flag. Destroying a locked command buffer panicks. This avoids problems if the user `mem::forget`s the guard.*.
|
||||
|
||||
### Mutability
|
||||
|
||||
*Only relevant for buffers and images.*
|
||||
@ -136,6 +138,11 @@ impl GpuAccess<T> {
|
||||
pub fn lock(&self) -> &mut T { ... }
|
||||
pub fn try_lock(&self) -> Option<&mut T> { ... }
|
||||
}
|
||||
|
||||
unsafe impl<T> SomeTrait<T> for GpuAccess<T> {
|
||||
unsafe fn force_access(&self) -> &mut T { ... }
|
||||
fn block_until(&self, fence: Fence) { ... }
|
||||
}
|
||||
```
|
||||
|
||||
The command buffer writes the fence in the `GpuAccess` through a trait.
|
||||
|
Loading…
Reference in New Issue
Block a user