Struct vulkano::command_buffer::submit::SubmitBindSparseBuilder [] [src]

pub struct SubmitBindSparseBuilder<'a> { /* fields omitted */ }

Prototype for a submission that binds sparse memory.

Methods

impl<'a> SubmitBindSparseBuilder<'a>
[src]

[src]

Builds a new empty SubmitBindSparseBuilder.

[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.

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

[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.

[src]

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.

[src]

Submits the command. Calls vkQueueBindSparse.

Trait Implementations

impl<'a> Debug for SubmitBindSparseBuilder<'a>
[src]

[src]

Formats the value using the given formatter.