pub struct SubmitBindSparseBuilder<'a> { /* private fields */ }
Expand description

Prototype for a submission that binds sparse memory.

Implementations

Builds a new empty SubmitBindSparseBuilder.

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.

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());
}

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.

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.

Submits the command. Calls vkQueueBindSparse.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Builds a pointer to this type from a raw pointer.
Returns true if the size is suitable to store a type like this.
Returns the size of an individual element.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.