[−][src]Struct vulkano::command_buffer::submit::SubmitBindSparseBuilder
Prototype for a submission that binds sparse memory.
Methods
impl<'a> SubmitBindSparseBuilder<'a>
[src]
pub fn new() -> SubmitBindSparseBuilder<'a>
[src]
Builds a new empty SubmitBindSparseBuilder
.
pub fn add(&mut self, builder: SubmitBindSparseBatchBuilder<'a>)
[src]
Adds a batch to the command.
Batches start execution in order, but can finish in a different order. In other words any wait semaphore added to a batch will apply to further batches as well, but when a semaphore is signalled, it does not mean that previous batches have been completed.
pub fn has_fence(&self) -> bool
[src]
Returns true if this builder will signal a fence when submitted.
Example
use vulkano::command_buffer::submit::SubmitBindSparseBuilder; use vulkano::sync::Fence; unsafe { let fence = Fence::from_pool(device.clone()).unwrap(); let mut builder = SubmitBindSparseBuilder::new(); assert!(!builder.has_fence()); builder.set_fence_signal(&fence); assert!(builder.has_fence()); }
pub unsafe fn set_fence_signal(&mut self, fence: &'a Fence)
[src]
Adds an operation that signals a fence after this submission ends.
Example
use std::time::Duration; use vulkano::command_buffer::submit::SubmitBindSparseBuilder; use vulkano::sync::Fence; unsafe { let fence = Fence::from_pool(device.clone()).unwrap(); let mut builder = SubmitBindSparseBuilder::new(); builder.set_fence_signal(&fence); builder.submit(&queue).unwrap(); // We must not destroy the fence before it is signaled. fence.wait(None).unwrap(); }
Safety
-
The fence must not be signaled at the time when you call
submit()
. -
If you use the fence for multiple submissions, only one at a time must be executed by the GPU. In other words, you must submit one, wait for the fence to be signaled, then reset the fence, and then only submit the second.
-
If you submit this builder, the fence must be kept alive until it is signaled by the GPU. Destroying the fence earlier is an undefined behavior.
-
The fence, buffers, images, and semaphores must all belong to the same device.
pub fn merge(
&mut self,
other: SubmitBindSparseBuilder<'a>
) -> Result<(), SubmitBindSparseBuilder<'a>>
[src]
&mut self,
other: SubmitBindSparseBuilder<'a>
) -> Result<(), SubmitBindSparseBuilder<'a>>
Attempts to merge this builder with another one.
If both builders have a fence already set, then this function will return other
as an
error.
pub fn submit(self, queue: &Queue) -> Result<(), SubmitBindSparseError>
[src]
Submits the command. Calls vkQueueBindSparse
.
Trait Implementations
impl<'a> Debug for SubmitBindSparseBuilder<'a>
[src]
Auto Trait Implementations
impl<'a> Send for SubmitBindSparseBuilder<'a>
impl<'a> Unpin for SubmitBindSparseBuilder<'a>
impl<'a> Sync for SubmitBindSparseBuilder<'a>
impl<'a> UnwindSafe for SubmitBindSparseBuilder<'a>
impl<'a> RefUnwindSafe for SubmitBindSparseBuilder<'a>
Blanket Implementations
impl<T> Content for T
[src]
fn ref_from_ptr(*mut c_void, usize) -> Option<*mut T>
[src]
fn is_size_suitable(usize) -> bool
[src]
fn indiv_size() -> usize
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,