Struct vulkano::command_buffer::sys::PipelineBarrierBuilder [] [src]

pub struct PipelineBarrierBuilder { /* fields omitted */ }

Prototype for a pipeline barrier that's going to be added to a command buffer builder.

Note: we use a builder-like API here so that users can pass multiple buffers or images of multiple different types. Doing so with a single function would be very tedious in terms of API.

Methods

impl PipelineBarrierBuilder
[src]

Adds a command that adds a pipeline barrier to a command buffer.

Returns true if no barrier or execution dependency has been added yet.

Merges another pipeline builder into this one.

Adds an execution dependency. This means that all the stages in source of the previous commands must finish before any of the stages in dest of the following commands can start.

Safety

  • If the pipeline stages include geometry or tessellation stages, then the corresponding features must have been enabled.
  • There are certain rules regarding the pipeline barriers inside render passes.

Adds a memory barrier. This means that all the memory writes by the given source stages for the given source accesses must be visible by the given dest stages for the given dest accesses.

Also adds an execution dependency.

Safety

  • If the pipeline stages include geometry or tessellation stages, then the corresponding features must have been enabled.
  • There are certain rules regarding the pipeline barriers inside render passes.

Adds a buffer memory barrier. This means that all the memory writes to the given buffer by the given source stages for the given source accesses must be visible by the given dest stages for the given dest accesses.

Also adds an execution dependency.

Also allows transfering buffer ownership between queues.

Safety

  • If the pipeline stages include geometry or tessellation stages, then the corresponding features must have been enabled.
  • There are certain rules regarding the pipeline barriers inside render passes.
  • The buffer must be alive for at least as long as the command buffer to which this barrier is added.
  • Queue ownership transfers must be correct.

Adds an image memory barrier. This is the equivalent of add_buffer_memory_barrier but for images.

In addition to transfering image ownership between queues, it also allows changing the layout of images.

Safety

  • If the pipeline stages include geometry or tessellation stages, then the corresponding features must have been enabled.
  • There are certain rules regarding the pipeline barriers inside render passes.
  • The buffer must be alive for at least as long as the command buffer to which this barrier is added.
  • Queue ownership transfers must be correct.
  • Image layouts transfers must be correct.
  • Access flags must be compatible with the image usage flags passed at image creation.