Struct vulkano::command_buffer::AutoCommandBufferBuilder [−][src]
Note that command buffers allocated from the default command pool (Arc<StandardCommandPool>
)
don’t implement the Send
and Sync
traits. If you use this pool, then the
AutoCommandBufferBuilder
will not implement Send
and Sync
either. Once a command buffer
is built, however, it does implement Send
and Sync
.
Implementations
impl AutoCommandBufferBuilder<StandardCommandPoolBuilder>
[src]
pub fn new(
device: Arc<Device>,
queue_family: QueueFamily<'_>
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
[src]
device: Arc<Device>,
queue_family: QueueFamily<'_>
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
pub fn primary(
device: Arc<Device>,
queue_family: QueueFamily<'_>
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
[src]
device: Arc<Device>,
queue_family: QueueFamily<'_>
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
Starts building a primary command buffer.
The final command buffer can only be executed once at a time. In other words, it is as if executing the command buffer modifies it.
pub fn primary_one_time_submit(
device: Arc<Device>,
queue_family: QueueFamily<'_>
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
[src]
device: Arc<Device>,
queue_family: QueueFamily<'_>
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
Starts building a primary command buffer.
Contrary to primary
, the final command buffer can only be submitted once before being
destroyed. This makes it possible for the implementation to perform additional
optimizations.
pub fn primary_simultaneous_use(
device: Arc<Device>,
queue_family: QueueFamily<'_>
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
[src]
device: Arc<Device>,
queue_family: QueueFamily<'_>
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
Starts building a primary command buffer.
Contrary to primary
, the final command buffer can be executed multiple times in parallel
in multiple different queues.
pub fn secondary_compute(
device: Arc<Device>,
queue_family: QueueFamily<'_>
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
[src]
device: Arc<Device>,
queue_family: QueueFamily<'_>
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
Starts building a secondary compute command buffer.
The final command buffer can only be executed once at a time. In other words, it is as if executing the command buffer modifies it.
pub fn secondary_compute_one_time_submit(
device: Arc<Device>,
queue_family: QueueFamily<'_>
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
[src]
device: Arc<Device>,
queue_family: QueueFamily<'_>
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
Starts building a secondary compute command buffer.
Contrary to secondary_compute
, the final command buffer can only be submitted once before
being destroyed. This makes it possible for the implementation to perform additional
optimizations.
pub fn secondary_compute_simultaneous_use(
device: Arc<Device>,
queue_family: QueueFamily<'_>
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
[src]
device: Arc<Device>,
queue_family: QueueFamily<'_>
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
Starts building a secondary compute command buffer.
Contrary to secondary_compute
, the final command buffer can be executed multiple times in
parallel in multiple different queues.
pub fn secondary_compute_inherit_queries(
device: Arc<Device>,
queue_family: QueueFamily<'_>,
occlusion_query: KindOcclusionQuery,
query_statistics_flags: QueryPipelineStatisticFlags
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
[src]
device: Arc<Device>,
queue_family: QueueFamily<'_>,
occlusion_query: KindOcclusionQuery,
query_statistics_flags: QueryPipelineStatisticFlags
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
Same as secondary_compute
, but allows specifying how queries are being inherited.
pub fn secondary_compute_one_time_submit_inherit_queries(
device: Arc<Device>,
queue_family: QueueFamily<'_>,
occlusion_query: KindOcclusionQuery,
query_statistics_flags: QueryPipelineStatisticFlags
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
[src]
device: Arc<Device>,
queue_family: QueueFamily<'_>,
occlusion_query: KindOcclusionQuery,
query_statistics_flags: QueryPipelineStatisticFlags
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
Same as secondary_compute_one_time_submit
, but allows specifying how queries are being inherited.
pub fn secondary_compute_simultaneous_use_inherit_queries(
device: Arc<Device>,
queue_family: QueueFamily<'_>,
occlusion_query: KindOcclusionQuery,
query_statistics_flags: QueryPipelineStatisticFlags
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
[src]
device: Arc<Device>,
queue_family: QueueFamily<'_>,
occlusion_query: KindOcclusionQuery,
query_statistics_flags: QueryPipelineStatisticFlags
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError>
Same as secondary_compute_simultaneous_use
, but allows specifying how queries are being inherited.
pub fn secondary_graphics<R>(
device: Arc<Device>,
queue_family: QueueFamily<'_>,
subpass: Subpass<R>
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError> where
R: RenderPassAbstract + Clone + Send + Sync + 'static,
[src]
device: Arc<Device>,
queue_family: QueueFamily<'_>,
subpass: Subpass<R>
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError> where
R: RenderPassAbstract + Clone + Send + Sync + 'static,
Starts building a secondary graphics command buffer.
The final command buffer can only be executed once at a time. In other words, it is as if executing the command buffer modifies it.
pub fn secondary_graphics_one_time_submit<R>(
device: Arc<Device>,
queue_family: QueueFamily<'_>,
subpass: Subpass<R>
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError> where
R: RenderPassAbstract + Clone + Send + Sync + 'static,
[src]
device: Arc<Device>,
queue_family: QueueFamily<'_>,
subpass: Subpass<R>
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError> where
R: RenderPassAbstract + Clone + Send + Sync + 'static,
Starts building a secondary graphics command buffer.
Contrary to secondary_graphics
, the final command buffer can only be submitted once
before being destroyed. This makes it possible for the implementation to perform additional
optimizations.
pub fn secondary_graphics_simultaneous_use<R>(
device: Arc<Device>,
queue_family: QueueFamily<'_>,
subpass: Subpass<R>
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError> where
R: RenderPassAbstract + Clone + Send + Sync + 'static,
[src]
device: Arc<Device>,
queue_family: QueueFamily<'_>,
subpass: Subpass<R>
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError> where
R: RenderPassAbstract + Clone + Send + Sync + 'static,
Starts building a secondary graphics command buffer.
Contrary to secondary_graphics
, the final command buffer can be executed multiple times
in parallel in multiple different queues.
pub fn secondary_graphics_inherit_queries<R>(
device: Arc<Device>,
queue_family: QueueFamily<'_>,
subpass: Subpass<R>,
occlusion_query: KindOcclusionQuery,
query_statistics_flags: QueryPipelineStatisticFlags
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError> where
R: RenderPassAbstract + Clone + Send + Sync + 'static,
[src]
device: Arc<Device>,
queue_family: QueueFamily<'_>,
subpass: Subpass<R>,
occlusion_query: KindOcclusionQuery,
query_statistics_flags: QueryPipelineStatisticFlags
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError> where
R: RenderPassAbstract + Clone + Send + Sync + 'static,
Same as secondary_graphics
, but allows specifying how queries are being inherited.
pub fn secondary_graphics_one_time_submit_inherit_queries<R>(
device: Arc<Device>,
queue_family: QueueFamily<'_>,
subpass: Subpass<R>,
occlusion_query: KindOcclusionQuery,
query_statistics_flags: QueryPipelineStatisticFlags
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError> where
R: RenderPassAbstract + Clone + Send + Sync + 'static,
[src]
device: Arc<Device>,
queue_family: QueueFamily<'_>,
subpass: Subpass<R>,
occlusion_query: KindOcclusionQuery,
query_statistics_flags: QueryPipelineStatisticFlags
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError> where
R: RenderPassAbstract + Clone + Send + Sync + 'static,
Same as secondary_graphics_one_time_submit
, but allows specifying how queries are being inherited.
pub fn secondary_graphics_simultaneous_use_inherit_queries<R>(
device: Arc<Device>,
queue_family: QueueFamily<'_>,
subpass: Subpass<R>,
occlusion_query: KindOcclusionQuery,
query_statistics_flags: QueryPipelineStatisticFlags
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError> where
R: RenderPassAbstract + Clone + Send + Sync + 'static,
[src]
device: Arc<Device>,
queue_family: QueueFamily<'_>,
subpass: Subpass<R>,
occlusion_query: KindOcclusionQuery,
query_statistics_flags: QueryPipelineStatisticFlags
) -> Result<AutoCommandBufferBuilder<StandardCommandPoolBuilder>, OomError> where
R: RenderPassAbstract + Clone + Send + Sync + 'static,
Same as secondary_graphics_simultaneous_use
, but allows specifying how queries are being inherited.
impl<P> AutoCommandBufferBuilder<P>
[src]
pub fn build(self) -> Result<AutoCommandBuffer<P::Alloc>, BuildError> where
P: CommandPoolBuilderAlloc,
[src]
P: CommandPoolBuilderAlloc,
Builds the command buffer.
pub fn begin_render_pass<F, C>(
&mut self,
framebuffer: F,
contents: SubpassContents,
clear_values: C
) -> Result<&mut Self, BeginRenderPassError> where
F: FramebufferAbstract + RenderPassDescClearValues<C> + Clone + Send + Sync + 'static,
[src]
&mut self,
framebuffer: F,
contents: SubpassContents,
clear_values: C
) -> Result<&mut Self, BeginRenderPassError> where
F: FramebufferAbstract + RenderPassDescClearValues<C> + Clone + Send + Sync + 'static,
Adds a command that enters a render pass.
If secondary
is true, then you will only be able to add secondary command buffers while
you’re inside the first subpass of the render pass. If secondary
is false, you will only
be able to add inline draw commands and not secondary command buffers.
C must contain exactly one clear value for each attachment in the framebuffer.
You must call this before you can add draw commands.
pub fn copy_image<S, D>(
&mut self,
source: S,
source_offset: [i32; 3],
source_base_array_layer: u32,
source_mip_level: u32,
destination: D,
destination_offset: [i32; 3],
destination_base_array_layer: u32,
destination_mip_level: u32,
extent: [u32; 3],
layer_count: u32
) -> Result<&mut Self, CopyImageError> where
S: ImageAccess + Send + Sync + 'static,
D: ImageAccess + Send + Sync + 'static,
[src]
&mut self,
source: S,
source_offset: [i32; 3],
source_base_array_layer: u32,
source_mip_level: u32,
destination: D,
destination_offset: [i32; 3],
destination_base_array_layer: u32,
destination_mip_level: u32,
extent: [u32; 3],
layer_count: u32
) -> Result<&mut Self, CopyImageError> where
S: ImageAccess + Send + Sync + 'static,
D: ImageAccess + Send + Sync + 'static,
Adds a command that copies an image to another.
Copy operations have several restrictions:
- Copy operations are only allowed on queue families that support transfer, graphics, or compute operations.
- The number of samples in the source and destination images must be equal.
- The size of the uncompressed element format of the source image must be equal to the compressed element format of the destination.
- If you copy between depth, stencil or depth-stencil images, the format of both images must match exactly.
- For two-dimensional images, the Z coordinate must be 0 for the image offsets and 1 for the extent. Same for the Y coordinate for one-dimensional images.
- For non-array images, the base array layer must be 0 and the number of layers must be 1.
If layer_count
is greater than 1, the copy will happen between each individual layer as
if they were separate images.
Panic
- Panics if the source or the destination was not created with
device
.
pub fn blit_image<S, D>(
&mut self,
source: S,
source_top_left: [i32; 3],
source_bottom_right: [i32; 3],
source_base_array_layer: u32,
source_mip_level: u32,
destination: D,
destination_top_left: [i32; 3],
destination_bottom_right: [i32; 3],
destination_base_array_layer: u32,
destination_mip_level: u32,
layer_count: u32,
filter: Filter
) -> Result<&mut Self, BlitImageError> where
S: ImageAccess + Send + Sync + 'static,
D: ImageAccess + Send + Sync + 'static,
[src]
&mut self,
source: S,
source_top_left: [i32; 3],
source_bottom_right: [i32; 3],
source_base_array_layer: u32,
source_mip_level: u32,
destination: D,
destination_top_left: [i32; 3],
destination_bottom_right: [i32; 3],
destination_base_array_layer: u32,
destination_mip_level: u32,
layer_count: u32,
filter: Filter
) -> Result<&mut Self, BlitImageError> where
S: ImageAccess + Send + Sync + 'static,
D: ImageAccess + Send + Sync + 'static,
Adds a command that blits an image to another.
A blit is similar to an image copy operation, except that the portion of the image that is transferred can be resized. You choose an area of the source and an area of the destination, and the implementation will resize the area of the source so that it matches the size of the area of the destination before writing it.
Blit operations have several restrictions:
- Blit operations are only allowed on queue families that support graphics operations.
- The format of the source and destination images must support blit operations, which depends on the Vulkan implementation. Vulkan guarantees that some specific formats must always be supported. See tables 52 to 61 of the specifications.
- Only single-sampled images are allowed.
- You can only blit between two images whose formats belong to the same type. The types are: floating-point, signed integers, unsigned integers, depth-stencil.
- If you blit between depth, stencil or depth-stencil images, the format of both images must match exactly.
- If you blit between depth, stencil or depth-stencil images, only the
Nearest
filter is allowed. - For two-dimensional images, the Z coordinate must be 0 for the top-left offset and 1 for the bottom-right offset. Same for the Y coordinate for one-dimensional images.
- For non-array images, the base array layer must be 0 and the number of layers must be 1.
If layer_count
is greater than 1, the blit will happen between each individual layer as
if they were separate images.
Panic
- Panics if the source or the destination was not created with
device
.
pub fn clear_color_image<I>(
&mut self,
image: I,
color: ClearValue
) -> Result<&mut Self, ClearColorImageError> where
I: ImageAccess + Send + Sync + 'static,
[src]
&mut self,
image: I,
color: ClearValue
) -> Result<&mut Self, ClearColorImageError> where
I: ImageAccess + Send + Sync + 'static,
Adds a command that clears all the layers and mipmap levels of a color image with a specific value.
Panic
Panics if color
is not a color value.
pub fn clear_color_image_dimensions<I>(
&mut self,
image: I,
first_layer: u32,
num_layers: u32,
first_mipmap: u32,
num_mipmaps: u32,
color: ClearValue
) -> Result<&mut Self, ClearColorImageError> where
I: ImageAccess + Send + Sync + 'static,
[src]
&mut self,
image: I,
first_layer: u32,
num_layers: u32,
first_mipmap: u32,
num_mipmaps: u32,
color: ClearValue
) -> Result<&mut Self, ClearColorImageError> where
I: ImageAccess + Send + Sync + 'static,
Adds a command that clears a color image with a specific value.
Panic
- Panics if
color
is not a color value.
pub fn copy_buffer<S, D, T>(
&mut self,
source: S,
destination: D
) -> Result<&mut Self, CopyBufferError> where
S: TypedBufferAccess<Content = T> + Send + Sync + 'static,
D: TypedBufferAccess<Content = T> + Send + Sync + 'static,
T: ?Sized,
[src]
&mut self,
source: S,
destination: D
) -> Result<&mut Self, CopyBufferError> where
S: TypedBufferAccess<Content = T> + Send + Sync + 'static,
D: TypedBufferAccess<Content = T> + Send + Sync + 'static,
T: ?Sized,
Adds a command that copies from a buffer to another.
This command will copy from the source to the destination. If their size is not equal, then the amount of data copied is equal to the smallest of the two.
pub fn copy_buffer_dimensions<S, D, T>(
&mut self,
source: S,
source_offset: usize,
destination: D,
destination_offset: usize,
count: usize
) -> Result<&mut Self, CopyBufferError> where
S: TypedBufferAccess<Content = [T]> + Send + Sync + 'static,
D: TypedBufferAccess<Content = [T]> + Send + Sync + 'static,
[src]
&mut self,
source: S,
source_offset: usize,
destination: D,
destination_offset: usize,
count: usize
) -> Result<&mut Self, CopyBufferError> where
S: TypedBufferAccess<Content = [T]> + Send + Sync + 'static,
D: TypedBufferAccess<Content = [T]> + Send + Sync + 'static,
Adds a command that copies a range from the source to the destination buffer. Panics if out of bounds.
pub fn copy_buffer_to_image<S, D, Px>(
&mut self,
source: S,
destination: D
) -> Result<&mut Self, CopyBufferImageError> where
S: TypedBufferAccess<Content = [Px]> + Send + Sync + 'static,
D: ImageAccess + Send + Sync + 'static,
Format: AcceptsPixels<Px>,
[src]
&mut self,
source: S,
destination: D
) -> Result<&mut Self, CopyBufferImageError> where
S: TypedBufferAccess<Content = [Px]> + Send + Sync + 'static,
D: ImageAccess + Send + Sync + 'static,
Format: AcceptsPixels<Px>,
Adds a command that copies from a buffer to an image.
pub fn copy_buffer_to_image_dimensions<S, D, Px>(
&mut self,
source: S,
destination: D,
offset: [u32; 3],
size: [u32; 3],
first_layer: u32,
num_layers: u32,
mipmap: u32
) -> Result<&mut Self, CopyBufferImageError> where
S: TypedBufferAccess<Content = [Px]> + Send + Sync + 'static,
D: ImageAccess + Send + Sync + 'static,
Format: AcceptsPixels<Px>,
[src]
&mut self,
source: S,
destination: D,
offset: [u32; 3],
size: [u32; 3],
first_layer: u32,
num_layers: u32,
mipmap: u32
) -> Result<&mut Self, CopyBufferImageError> where
S: TypedBufferAccess<Content = [Px]> + Send + Sync + 'static,
D: ImageAccess + Send + Sync + 'static,
Format: AcceptsPixels<Px>,
Adds a command that copies from a buffer to an image.
pub fn copy_image_to_buffer<S, D, Px>(
&mut self,
source: S,
destination: D
) -> Result<&mut Self, CopyBufferImageError> where
S: ImageAccess + Send + Sync + 'static,
D: TypedBufferAccess<Content = [Px]> + Send + Sync + 'static,
Format: AcceptsPixels<Px>,
[src]
&mut self,
source: S,
destination: D
) -> Result<&mut Self, CopyBufferImageError> where
S: ImageAccess + Send + Sync + 'static,
D: TypedBufferAccess<Content = [Px]> + Send + Sync + 'static,
Format: AcceptsPixels<Px>,
pub fn copy_image_to_buffer_dimensions<S, D, Px>(
&mut self,
source: S,
destination: D,
offset: [u32; 3],
size: [u32; 3],
first_layer: u32,
num_layers: u32,
mipmap: u32
) -> Result<&mut Self, CopyBufferImageError> where
S: ImageAccess + Send + Sync + 'static,
D: TypedBufferAccess<Content = [Px]> + Send + Sync + 'static,
Format: AcceptsPixels<Px>,
[src]
&mut self,
source: S,
destination: D,
offset: [u32; 3],
size: [u32; 3],
first_layer: u32,
num_layers: u32,
mipmap: u32
) -> Result<&mut Self, CopyBufferImageError> where
S: ImageAccess + Send + Sync + 'static,
D: TypedBufferAccess<Content = [Px]> + Send + Sync + 'static,
Format: AcceptsPixels<Px>,
Adds a command that copies from an image to a buffer.
pub fn debug_marker_begin(
&mut self,
name: &'static CStr,
color: [f32; 4]
) -> Result<&mut Self, DebugMarkerError>
[src]
&mut self,
name: &'static CStr,
color: [f32; 4]
) -> Result<&mut Self, DebugMarkerError>
Open a command buffer debug label region.
Note: you need to enable VK_EXT_debug_utils
extension when creating an instance.
pub fn debug_marker_end(&mut self) -> Result<&mut Self, DebugMarkerError>
[src]
Close a command buffer label region.
Note: you need to open a command buffer label region first with debug_marker_begin
.
Note: you need to enable VK_EXT_debug_utils
extension when creating an instance.
pub fn debug_marker_insert(
&mut self,
name: &'static CStr,
color: [f32; 4]
) -> Result<&mut Self, DebugMarkerError>
[src]
&mut self,
name: &'static CStr,
color: [f32; 4]
) -> Result<&mut Self, DebugMarkerError>
Insert a label into a command buffer.
Note: you need to enable VK_EXT_debug_utils
extension when creating an instance.
pub fn dispatch<Cp, S, Pc, Do, Doi>(
&mut self,
group_counts: [u32; 3],
pipeline: Cp,
sets: S,
constants: Pc,
dynamic_offsets: Do
) -> Result<&mut Self, DispatchError> where
Cp: ComputePipelineAbstract + Send + Sync + 'static + Clone,
S: DescriptorSetsCollection,
Do: IntoIterator<Item = u32, IntoIter = Doi>,
Doi: Iterator<Item = u32> + Send + Sync + 'static,
[src]
&mut self,
group_counts: [u32; 3],
pipeline: Cp,
sets: S,
constants: Pc,
dynamic_offsets: Do
) -> Result<&mut Self, DispatchError> where
Cp: ComputePipelineAbstract + Send + Sync + 'static + Clone,
S: DescriptorSetsCollection,
Do: IntoIterator<Item = u32, IntoIter = Doi>,
Doi: Iterator<Item = u32> + Send + Sync + 'static,
Perform a single compute operation using a compute pipeline.
pub fn dispatch_indirect<Inb, Cp, S, Pc, Do, Doi>(
&mut self,
indirect_buffer: Inb,
pipeline: Cp,
sets: S,
constants: Pc,
dynamic_offsets: Do
) -> Result<&mut Self, DispatchIndirectError> where
Inb: BufferAccess + TypedBufferAccess<Content = [DispatchIndirectCommand]> + Send + Sync + 'static,
Cp: ComputePipelineAbstract + Send + Sync + 'static + Clone,
S: DescriptorSetsCollection,
Do: IntoIterator<Item = u32, IntoIter = Doi>,
Doi: Iterator<Item = u32> + Send + Sync + 'static,
[src]
&mut self,
indirect_buffer: Inb,
pipeline: Cp,
sets: S,
constants: Pc,
dynamic_offsets: Do
) -> Result<&mut Self, DispatchIndirectError> where
Inb: BufferAccess + TypedBufferAccess<Content = [DispatchIndirectCommand]> + Send + Sync + 'static,
Cp: ComputePipelineAbstract + Send + Sync + 'static + Clone,
S: DescriptorSetsCollection,
Do: IntoIterator<Item = u32, IntoIter = Doi>,
Doi: Iterator<Item = u32> + Send + Sync + 'static,
Perform multiple compute operations using a compute pipeline. One dispatch is performed for
each vulkano::command_buffer::DispatchIndirectCommand
struct in indirect_buffer
.
pub fn draw<V, Gp, S, Pc, Do, Doi>(
&mut self,
pipeline: Gp,
dynamic: &DynamicState,
vertex_buffer: V,
sets: S,
constants: Pc,
dynamic_offsets: Do
) -> Result<&mut Self, DrawError> where
Gp: GraphicsPipelineAbstract + VertexSource<V> + Send + Sync + 'static + Clone,
S: DescriptorSetsCollection,
Do: IntoIterator<Item = u32, IntoIter = Doi>,
Doi: Iterator<Item = u32> + Send + Sync + 'static,
[src]
&mut self,
pipeline: Gp,
dynamic: &DynamicState,
vertex_buffer: V,
sets: S,
constants: Pc,
dynamic_offsets: Do
) -> Result<&mut Self, DrawError> where
Gp: GraphicsPipelineAbstract + VertexSource<V> + Send + Sync + 'static + Clone,
S: DescriptorSetsCollection,
Do: IntoIterator<Item = u32, IntoIter = Doi>,
Doi: Iterator<Item = u32> + Send + Sync + 'static,
Perform a single draw operation using a graphics pipeline.
vertex_buffer
is a set of vertex and/or instance buffers used to provide input.
All data in vertex_buffer
is used for the draw operation. To use only some data in the
buffer, wrap it in a vulkano::buffer::BufferSlice
.
pub fn draw_indirect<V, Gp, S, Pc, Inb, Do, Doi>(
&mut self,
pipeline: Gp,
dynamic: &DynamicState,
vertex_buffer: V,
indirect_buffer: Inb,
sets: S,
constants: Pc,
dynamic_offsets: Do
) -> Result<&mut Self, DrawIndirectError> where
Gp: GraphicsPipelineAbstract + VertexSource<V> + Send + Sync + 'static + Clone,
S: DescriptorSetsCollection,
Inb: BufferAccess + TypedBufferAccess<Content = [DrawIndirectCommand]> + Send + Sync + 'static,
Do: IntoIterator<Item = u32, IntoIter = Doi>,
Doi: Iterator<Item = u32> + Send + Sync + 'static,
[src]
&mut self,
pipeline: Gp,
dynamic: &DynamicState,
vertex_buffer: V,
indirect_buffer: Inb,
sets: S,
constants: Pc,
dynamic_offsets: Do
) -> Result<&mut Self, DrawIndirectError> where
Gp: GraphicsPipelineAbstract + VertexSource<V> + Send + Sync + 'static + Clone,
S: DescriptorSetsCollection,
Inb: BufferAccess + TypedBufferAccess<Content = [DrawIndirectCommand]> + Send + Sync + 'static,
Do: IntoIterator<Item = u32, IntoIter = Doi>,
Doi: Iterator<Item = u32> + Send + Sync + 'static,
Perform multiple draw operations using a graphics pipeline. One draw is performed for each
vulkano::command_buffer::DrawIndirectCommand
struct in indirect_buffer
.
vertex_buffer
is a set of vertex and/or instance buffers used to provide input. It is
used for every draw operation.
All data in vertex_buffer
is used for every draw operation. To use only some data in the
buffer, wrap it in a vulkano::buffer::BufferSlice
.
pub fn draw_indexed<V, Gp, S, Pc, Ib, I, Do, Doi>(
&mut self,
pipeline: Gp,
dynamic: &DynamicState,
vertex_buffer: V,
index_buffer: Ib,
sets: S,
constants: Pc,
dynamic_offsets: Do
) -> Result<&mut Self, DrawIndexedError> where
Gp: GraphicsPipelineAbstract + VertexSource<V> + Send + Sync + 'static + Clone,
S: DescriptorSetsCollection,
Ib: BufferAccess + TypedBufferAccess<Content = [I]> + Send + Sync + 'static,
I: Index + 'static,
Do: IntoIterator<Item = u32, IntoIter = Doi>,
Doi: Iterator<Item = u32> + Send + Sync + 'static,
[src]
&mut self,
pipeline: Gp,
dynamic: &DynamicState,
vertex_buffer: V,
index_buffer: Ib,
sets: S,
constants: Pc,
dynamic_offsets: Do
) -> Result<&mut Self, DrawIndexedError> where
Gp: GraphicsPipelineAbstract + VertexSource<V> + Send + Sync + 'static + Clone,
S: DescriptorSetsCollection,
Ib: BufferAccess + TypedBufferAccess<Content = [I]> + Send + Sync + 'static,
I: Index + 'static,
Do: IntoIterator<Item = u32, IntoIter = Doi>,
Doi: Iterator<Item = u32> + Send + Sync + 'static,
Perform a single draw operation using a graphics pipeline, using an index buffer.
vertex_buffer
is a set of vertex and/or instance buffers used to provide input.
index_buffer
is a buffer containing indices into the vertex buffer that should be
processed in order.
All data in vertex_buffer
and index_buffer
is used for the draw operation. To use
only some data in the buffer, wrap it in a vulkano::buffer::BufferSlice
.
pub fn draw_indexed_indirect<V, Gp, S, Pc, Ib, Inb, I, Do, Doi>(
&mut self,
pipeline: Gp,
dynamic: &DynamicState,
vertex_buffer: V,
index_buffer: Ib,
indirect_buffer: Inb,
sets: S,
constants: Pc,
dynamic_offsets: Do
) -> Result<&mut Self, DrawIndexedIndirectError> where
Gp: GraphicsPipelineAbstract + VertexSource<V> + Send + Sync + 'static + Clone,
S: DescriptorSetsCollection,
Ib: BufferAccess + TypedBufferAccess<Content = [I]> + Send + Sync + 'static,
Inb: BufferAccess + TypedBufferAccess<Content = [DrawIndexedIndirectCommand]> + Send + Sync + 'static,
I: Index + 'static,
Do: IntoIterator<Item = u32, IntoIter = Doi>,
Doi: Iterator<Item = u32> + Send + Sync + 'static,
[src]
&mut self,
pipeline: Gp,
dynamic: &DynamicState,
vertex_buffer: V,
index_buffer: Ib,
indirect_buffer: Inb,
sets: S,
constants: Pc,
dynamic_offsets: Do
) -> Result<&mut Self, DrawIndexedIndirectError> where
Gp: GraphicsPipelineAbstract + VertexSource<V> + Send + Sync + 'static + Clone,
S: DescriptorSetsCollection,
Ib: BufferAccess + TypedBufferAccess<Content = [I]> + Send + Sync + 'static,
Inb: BufferAccess + TypedBufferAccess<Content = [DrawIndexedIndirectCommand]> + Send + Sync + 'static,
I: Index + 'static,
Do: IntoIterator<Item = u32, IntoIter = Doi>,
Doi: Iterator<Item = u32> + Send + Sync + 'static,
Perform multiple draw operations using a graphics pipeline, using an index buffer. One
draw is performed for for each vulkano::command_buffer::DrawIndirectCommand
struct in
indirect_buffer
.
vertex_buffer
is a set of vertex and/or instance buffers used to provide input.
index_buffer
is a buffer containing indices into the vertex buffer that should be
processed in order.
All data in vertex_buffer
and index_buffer
is used for every draw operation. To use
only some data in the buffer, wrap it in a vulkano::buffer::BufferSlice
.
pub fn end_render_pass(
&mut self
) -> Result<&mut Self, AutoCommandBufferBuilderContextError>
[src]
&mut self
) -> Result<&mut Self, AutoCommandBufferBuilderContextError>
Adds a command that ends the current render pass.
This must be called after you went through all the subpasses and before you can build the command buffer or add further commands.
pub fn execute_commands<C>(
&mut self,
command_buffer: C
) -> Result<&mut Self, ExecuteCommandsError> where
C: CommandBuffer + Send + Sync + 'static,
[src]
&mut self,
command_buffer: C
) -> Result<&mut Self, ExecuteCommandsError> where
C: CommandBuffer + Send + Sync + 'static,
Adds a command that executes a secondary command buffer.
If the flags
that command_buffer
was created with are more restrictive than those of
self
, then self
will be restricted to match. E.g. executing a secondary command buffer
with Flags::OneTimeSubmit
will set self
’s flags to Flags::OneTimeSubmit
also.
pub fn execute_commands_from_vec<C>(
&mut self,
command_buffers: Vec<C>
) -> Result<&mut Self, ExecuteCommandsError> where
C: CommandBuffer + Send + Sync + 'static,
[src]
&mut self,
command_buffers: Vec<C>
) -> Result<&mut Self, ExecuteCommandsError> where
C: CommandBuffer + Send + Sync + 'static,
Adds a command that multiple secondary command buffers in a vector.
This requires that the secondary command buffers do not have resource conflicts; an error
will be returned if there are any. Use execute_commands
if you want to ensure that
resource conflicts are automatically resolved.
pub fn fill_buffer<B>(
&mut self,
buffer: B,
data: u32
) -> Result<&mut Self, FillBufferError> where
B: BufferAccess + Send + Sync + 'static,
[src]
&mut self,
buffer: B,
data: u32
) -> Result<&mut Self, FillBufferError> where
B: BufferAccess + Send + Sync + 'static,
Adds a command that writes the content of a buffer.
This function is similar to the memset
function in C. The data
parameter is a number
that will be repeatedly written through the entire buffer.
Note: This function is technically safe because buffers can only contain integers or floating point numbers, which are always valid whatever their memory representation is. But unless your buffer actually contains only 32-bits integers, you are encouraged to use this function only for zeroing the content of a buffer by passing
0
for the data.
pub fn next_subpass(
&mut self,
contents: SubpassContents
) -> Result<&mut Self, AutoCommandBufferBuilderContextError>
[src]
&mut self,
contents: SubpassContents
) -> Result<&mut Self, AutoCommandBufferBuilderContextError>
Adds a command that jumps to the next subpass of the current render pass.
pub fn update_buffer<B, D, Dd>(
&mut self,
buffer: B,
data: Dd
) -> Result<&mut Self, UpdateBufferError> where
B: TypedBufferAccess<Content = D> + Send + Sync + 'static,
D: ?Sized,
Dd: SafeDeref<Target = D> + Send + Sync + 'static,
[src]
&mut self,
buffer: B,
data: Dd
) -> Result<&mut Self, UpdateBufferError> where
B: TypedBufferAccess<Content = D> + Send + Sync + 'static,
D: ?Sized,
Dd: SafeDeref<Target = D> + Send + Sync + 'static,
Adds a command that writes data to a buffer.
If data
is larger than the buffer, only the part of data
that fits is written. If the
buffer is larger than data
, only the start of the buffer is written.
Trait Implementations
impl<P> DeviceOwned for AutoCommandBufferBuilder<P>
[src]
Auto Trait Implementations
impl<P = StandardCommandPoolBuilder> !RefUnwindSafe for AutoCommandBufferBuilder<P>
impl<P = StandardCommandPoolBuilder> !Send for AutoCommandBufferBuilder<P>
impl<P = StandardCommandPoolBuilder> !Sync for AutoCommandBufferBuilder<P>
impl<P> Unpin for AutoCommandBufferBuilder<P> where
P: Unpin,
P: Unpin,
impl<P = StandardCommandPoolBuilder> !UnwindSafe for AutoCommandBufferBuilder<P>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Content for T
[src]
pub fn ref_from_ptr(*mut c_void, usize) -> Option<*mut T>
[src]
pub fn is_size_suitable(usize) -> bool
[src]
pub fn indiv_size() -> usize
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
pub 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>,