Struct vulkano::command_buffer::sys::UnsafeCommandBufferBuilder [−][src]
pub struct UnsafeCommandBufferBuilder { /* fields omitted */ }
Expand description
Command buffer being built.
You can add commands to an UnsafeCommandBufferBuilder
by using the AddCommand
trait.
The AddCommand<&Cmd>
trait is implemented on the UnsafeCommandBufferBuilder
for any Cmd
that is a raw Vulkan command.
When you are finished adding commands, you can use the CommandBufferBuild
trait to turn this
builder into an UnsafeCommandBuffer
.
Implementations
pub unsafe fn new(
pool_alloc: &UnsafeCommandPoolAlloc,
level: CommandBufferLevel,
usage: CommandBufferUsage
) -> Result<UnsafeCommandBufferBuilder, OomError>
pub unsafe fn new(
pool_alloc: &UnsafeCommandPoolAlloc,
level: CommandBufferLevel,
usage: CommandBufferUsage
) -> Result<UnsafeCommandBufferBuilder, OomError>
Creates a new builder, for recording commands.
Safety
pool_alloc
must outlive the returned builder and its created command buffer.kind
must match howpool_alloc
was created.- All submitted commands must be valid and follow the requirements of the Vulkan specification.
- Any resources used by submitted commands must outlive the returned builder and its created command buffer. They must be protected against data races through manual synchronization.
Note: Some checks are still made with
debug_assert!
. Do not expect to be able to submit invalid commands.
Turns the builder into an actual command buffer.
Calls vkCmdBeginQuery
on the builder.
pub unsafe fn begin_render_pass<I>(
&mut self,
framebuffer: &Framebuffer,
subpass_contents: SubpassContents,
clear_values: I
) where
I: IntoIterator<Item = ClearValue>,
pub unsafe fn begin_render_pass<I>(
&mut self,
framebuffer: &Framebuffer,
subpass_contents: SubpassContents,
clear_values: I
) where
I: IntoIterator<Item = ClearValue>,
Calls vkCmdBeginRenderPass
on the builder.
pub unsafe fn bind_descriptor_sets<'s, S, I>(
&mut self,
pipeline_bind_point: PipelineBindPoint,
pipeline_layout: &PipelineLayout,
first_set: u32,
sets: S,
dynamic_offsets: I
) where
S: IntoIterator<Item = &'s UnsafeDescriptorSet>,
I: IntoIterator<Item = u32>,
pub unsafe fn bind_descriptor_sets<'s, S, I>(
&mut self,
pipeline_bind_point: PipelineBindPoint,
pipeline_layout: &PipelineLayout,
first_set: u32,
sets: S,
dynamic_offsets: I
) where
S: IntoIterator<Item = &'s UnsafeDescriptorSet>,
I: IntoIterator<Item = u32>,
Calls vkCmdBindDescriptorSets
on the builder.
Does nothing if the list of descriptor sets is empty, as it would be a no-op and isn’t a valid usage of the command anyway.
pub unsafe fn bind_index_buffer<B>(&mut self, buffer: &B, index_ty: IndexType) where
B: ?Sized + BufferAccess,
pub unsafe fn bind_index_buffer<B>(&mut self, buffer: &B, index_ty: IndexType) where
B: ?Sized + BufferAccess,
Calls vkCmdBindIndexBuffer
on the builder.
Calls vkCmdBindPipeline
on the builder with a compute pipeline.
Calls vkCmdBindPipeline
on the builder with a graphics pipeline.
pub unsafe fn bind_vertex_buffers(
&mut self,
first_binding: u32,
params: UnsafeCommandBufferBuilderBindVertexBuffer
)
pub unsafe fn bind_vertex_buffers(
&mut self,
first_binding: u32,
params: UnsafeCommandBufferBuilderBindVertexBuffer
)
Calls vkCmdBindVertexBuffers
on the builder.
Does nothing if the list of buffers is empty, as it would be a no-op and isn’t a valid usage of the command anyway.
pub unsafe fn copy_image<S, D, R>(
&mut self,
source: &S,
source_layout: ImageLayout,
destination: &D,
destination_layout: ImageLayout,
regions: R
) where
S: ?Sized + ImageAccess,
D: ?Sized + ImageAccess,
R: IntoIterator<Item = UnsafeCommandBufferBuilderImageCopy>,
pub unsafe fn copy_image<S, D, R>(
&mut self,
source: &S,
source_layout: ImageLayout,
destination: &D,
destination_layout: ImageLayout,
regions: R
) where
S: ?Sized + ImageAccess,
D: ?Sized + ImageAccess,
R: IntoIterator<Item = UnsafeCommandBufferBuilderImageCopy>,
Calls vkCmdCopyImage
on the builder.
Does nothing if the list of regions is empty, as it would be a no-op and isn’t a valid usage of the command anyway.
pub unsafe fn blit_image<S, D, R>(
&mut self,
source: &S,
source_layout: ImageLayout,
destination: &D,
destination_layout: ImageLayout,
regions: R,
filter: Filter
) where
S: ?Sized + ImageAccess,
D: ?Sized + ImageAccess,
R: IntoIterator<Item = UnsafeCommandBufferBuilderImageBlit>,
pub unsafe fn blit_image<S, D, R>(
&mut self,
source: &S,
source_layout: ImageLayout,
destination: &D,
destination_layout: ImageLayout,
regions: R,
filter: Filter
) where
S: ?Sized + ImageAccess,
D: ?Sized + ImageAccess,
R: IntoIterator<Item = UnsafeCommandBufferBuilderImageBlit>,
Calls vkCmdBlitImage
on the builder.
Does nothing if the list of regions is empty, as it would be a no-op and isn’t a valid usage of the command anyway.
pub unsafe fn clear_color_image<I, R>(
&mut self,
image: &I,
layout: ImageLayout,
color: ClearValue,
regions: R
) where
I: ?Sized + ImageAccess,
R: IntoIterator<Item = UnsafeCommandBufferBuilderColorImageClear>,
pub unsafe fn clear_color_image<I, R>(
&mut self,
image: &I,
layout: ImageLayout,
color: ClearValue,
regions: R
) where
I: ?Sized + ImageAccess,
R: IntoIterator<Item = UnsafeCommandBufferBuilderColorImageClear>,
Calls vkCmdClearColorImage
on the builder.
Does nothing if the list of regions is empty, as it would be a no-op and isn’t a valid usage of the command anyway.
pub unsafe fn clear_depth_stencil_image<I, R>(
&mut self,
image: &I,
layout: ImageLayout,
clear_value: ClearValue,
regions: R
) where
I: ?Sized + ImageAccess,
R: IntoIterator<Item = UnsafeCommandBufferBuilderDepthStencilImageClear>,
pub unsafe fn clear_depth_stencil_image<I, R>(
&mut self,
image: &I,
layout: ImageLayout,
clear_value: ClearValue,
regions: R
) where
I: ?Sized + ImageAccess,
R: IntoIterator<Item = UnsafeCommandBufferBuilderDepthStencilImageClear>,
Calls vkCmdClearDepthStencilImage
on the builder.
Does nothing if the list of regions is empty, as it would be a no-op and isn’t a valid usage of the command anyway.
pub unsafe fn copy_buffer<S, D, R>(
&mut self,
source: &S,
destination: &D,
regions: R
) where
S: ?Sized + BufferAccess,
D: ?Sized + BufferAccess,
R: IntoIterator<Item = (DeviceSize, DeviceSize, DeviceSize)>,
pub unsafe fn copy_buffer<S, D, R>(
&mut self,
source: &S,
destination: &D,
regions: R
) where
S: ?Sized + BufferAccess,
D: ?Sized + BufferAccess,
R: IntoIterator<Item = (DeviceSize, DeviceSize, DeviceSize)>,
Calls vkCmdCopyBuffer
on the builder.
Does nothing if the list of regions is empty, as it would be a no-op and isn’t a valid usage of the command anyway.
pub unsafe fn copy_buffer_to_image<S, D, R>(
&mut self,
source: &S,
destination: &D,
destination_layout: ImageLayout,
regions: R
) where
S: ?Sized + BufferAccess,
D: ?Sized + ImageAccess,
R: IntoIterator<Item = UnsafeCommandBufferBuilderBufferImageCopy>,
pub unsafe fn copy_buffer_to_image<S, D, R>(
&mut self,
source: &S,
destination: &D,
destination_layout: ImageLayout,
regions: R
) where
S: ?Sized + BufferAccess,
D: ?Sized + ImageAccess,
R: IntoIterator<Item = UnsafeCommandBufferBuilderBufferImageCopy>,
Calls vkCmdCopyBufferToImage
on the builder.
Does nothing if the list of regions is empty, as it would be a no-op and isn’t a valid usage of the command anyway.
pub unsafe fn copy_image_to_buffer<S, D, R>(
&mut self,
source: &S,
source_layout: ImageLayout,
destination: &D,
regions: R
) where
S: ?Sized + ImageAccess,
D: ?Sized + BufferAccess,
R: IntoIterator<Item = UnsafeCommandBufferBuilderBufferImageCopy>,
pub unsafe fn copy_image_to_buffer<S, D, R>(
&mut self,
source: &S,
source_layout: ImageLayout,
destination: &D,
regions: R
) where
S: ?Sized + ImageAccess,
D: ?Sized + BufferAccess,
R: IntoIterator<Item = UnsafeCommandBufferBuilderBufferImageCopy>,
Calls vkCmdCopyImageToBuffer
on the builder.
Does nothing if the list of regions is empty, as it would be a no-op and isn’t a valid usage of the command anyway.
pub unsafe fn copy_query_pool_results<D, T>(
&mut self,
queries: QueriesRange<'_>,
destination: &D,
stride: DeviceSize,
flags: QueryResultFlags
) where
D: TypedBufferAccess<Content = [T]>,
T: QueryResultElement,
pub unsafe fn copy_query_pool_results<D, T>(
&mut self,
queries: QueriesRange<'_>,
destination: &D,
stride: DeviceSize,
flags: QueryResultFlags
) where
D: TypedBufferAccess<Content = [T]>,
T: QueryResultElement,
Calls vkCmdCopyQueryPoolResults
on the builder.
Calls vkCmdDispatchIndirect
on the builder.
Calls vkCmdDraw
on the builder.
Calls vkCmdDrawIndexed
on the builder.
pub unsafe fn draw_indirect<B>(
&mut self,
buffer: &B,
draw_count: u32,
stride: u32
) where
B: ?Sized + BufferAccess,
pub unsafe fn draw_indirect<B>(
&mut self,
buffer: &B,
draw_count: u32,
stride: u32
) where
B: ?Sized + BufferAccess,
Calls vkCmdDrawIndirect
on the builder.
pub unsafe fn draw_indexed_indirect<B>(
&mut self,
buffer: &B,
draw_count: u32,
stride: u32
) where
B: ?Sized + BufferAccess,
pub unsafe fn draw_indexed_indirect<B>(
&mut self,
buffer: &B,
draw_count: u32,
stride: u32
) where
B: ?Sized + BufferAccess,
Calls vkCmdDrawIndexedIndirect
on the builder.
Calls vkCmdEndRenderPass
on the builder.
Calls vkCmdExecuteCommands
on the builder.
Does nothing if the list of command buffers is empty, as it would be a no-op and isn’t a valid usage of the command anyway.
Calls vkCmdFillBuffer
on the builder.
Calls vkCmdNextSubpass
on the builder.
pub unsafe fn pipeline_barrier(
&mut self,
command: &UnsafeCommandBufferBuilderPipelineBarrier
)
pub unsafe fn push_constants<D>(
&mut self,
pipeline_layout: &PipelineLayout,
stages: ShaderStages,
offset: u32,
size: u32,
data: &D
) where
D: ?Sized,
pub unsafe fn push_constants<D>(
&mut self,
pipeline_layout: &PipelineLayout,
stages: ShaderStages,
offset: u32,
size: u32,
data: &D
) where
D: ?Sized,
Calls vkCmdPushConstants
on the builder.
pub unsafe fn push_descriptor_set(
&mut self,
pipeline_bind_point: PipelineBindPoint,
pipeline_layout: &PipelineLayout,
set_num: u32,
descriptor_writes: &[DescriptorWrite]
)
pub unsafe fn push_descriptor_set(
&mut self,
pipeline_bind_point: PipelineBindPoint,
pipeline_layout: &PipelineLayout,
set_num: u32,
descriptor_writes: &[DescriptorWrite]
)
Calls vkCmdPushDescriptorSetKHR
on the builder.
If the list is empty then the command is automatically ignored.
Calls vkCmdResetEvent
on the builder.
Calls vkCmdResetQueryPool
on the builder.
Calls vkCmdSetBlendConstants
on the builder.
pub unsafe fn set_color_write_enable<I>(&mut self, enables: I) where
I: IntoIterator<Item = bool>,
pub unsafe fn set_color_write_enable<I>(&mut self, enables: I) where
I: IntoIterator<Item = bool>,
Calls vkCmdSetColorWriteEnableEXT
on the builder.
If the list is empty then the command is automatically ignored.
Calls vkCmdSetCullModeEXT
on the builder.
Calls vkCmdSetDepthBias
on the builder.
Calls vkCmdSetDepthBiasEnableEXT
on the builder.
Calls vkCmdSetDepthBounds
on the builder.
Calls vkCmdSetDepthBoundsTestEnableEXT
on the builder.
Calls vkCmdSetDepthCompareOpEXT
on the builder.
Calls vkCmdSetDepthTestEnableEXT
on the builder.
Calls vkCmdSetDepthWriteEnableEXT
on the builder.
pub unsafe fn set_discard_rectangle<I>(
&mut self,
first_rectangle: u32,
rectangles: I
) where
I: IntoIterator<Item = Scissor>,
pub unsafe fn set_discard_rectangle<I>(
&mut self,
first_rectangle: u32,
rectangles: I
) where
I: IntoIterator<Item = Scissor>,
Calls vkCmdSetDiscardRectangleEXT
on the builder.
If the list is empty then the command is automatically ignored.
Calls vkCmdSetEvent
on the builder.
Calls vkCmdSetFrontFaceEXT
on the builder.
Calls vkCmdSetLineStippleEXT
on the builder.
Calls vkCmdSetLineWidth
on the builder.
Calls vkCmdSetLogicOpEXT
on the builder.
Calls vkCmdSetPatchControlPointsEXT
on the builder.
Calls vkCmdSetPrimitiveRestartEnableEXT
on the builder.
Calls vkCmdSetPrimitiveTopologyEXT
on the builder.
Calls vkCmdSetRasterizerDiscardEnableEXT
on the builder.
Calls vkCmdSetStencilCompareMask
on the builder.
pub unsafe fn set_stencil_op(
&mut self,
face_mask: StencilFaces,
fail_op: StencilOp,
pass_op: StencilOp,
depth_fail_op: StencilOp,
compare_op: CompareOp
)
pub unsafe fn set_stencil_op(
&mut self,
face_mask: StencilFaces,
fail_op: StencilOp,
pass_op: StencilOp,
depth_fail_op: StencilOp,
compare_op: CompareOp
)
Calls vkCmdSetStencilOpEXT
on the builder.
Calls vkCmdSetStencilReference
on the builder.
Calls vkCmdSetStencilTestEnableEXT
on the builder.
Calls vkCmdSetStencilWriteMask
on the builder.
pub unsafe fn set_scissor<I>(&mut self, first_scissor: u32, scissors: I) where
I: IntoIterator<Item = Scissor>,
pub unsafe fn set_scissor<I>(&mut self, first_scissor: u32, scissors: I) where
I: IntoIterator<Item = Scissor>,
Calls vkCmdSetScissor
on the builder.
If the list is empty then the command is automatically ignored.
pub unsafe fn set_scissor_with_count<I>(&mut self, scissors: I) where
I: IntoIterator<Item = Scissor>,
pub unsafe fn set_scissor_with_count<I>(&mut self, scissors: I) where
I: IntoIterator<Item = Scissor>,
Calls vkCmdSetScissorWithCountEXT
on the builder.
If the list is empty then the command is automatically ignored.
pub unsafe fn set_viewport<I>(&mut self, first_viewport: u32, viewports: I) where
I: IntoIterator<Item = Viewport>,
pub unsafe fn set_viewport<I>(&mut self, first_viewport: u32, viewports: I) where
I: IntoIterator<Item = Viewport>,
Calls vkCmdSetViewport
on the builder.
If the list is empty then the command is automatically ignored.
pub unsafe fn set_viewport_with_count<I>(&mut self, viewports: I) where
I: IntoIterator<Item = Viewport>,
pub unsafe fn set_viewport_with_count<I>(&mut self, viewports: I) where
I: IntoIterator<Item = Viewport>,
Calls vkCmdSetViewportWithCountEXT
on the builder.
If the list is empty then the command is automatically ignored.
pub unsafe fn update_buffer<B, D>(&mut self, buffer: &B, data: &D) where
B: ?Sized + BufferAccess,
D: ?Sized,
pub unsafe fn update_buffer<B, D>(&mut self, buffer: &B, data: &D) where
B: ?Sized + BufferAccess,
D: ?Sized,
Calls vkCmdUpdateBuffer
on the builder.
Calls vkCmdWriteTimestamp
on the builder.
Calls vkCmdBeginDebugUtilsLabelEXT
on the builder.
Safety
The command pool that this command buffer was allocated from must support graphics or compute operations
Calls vkCmdEndDebugUtilsLabelEXT
on the builder.
Safety
There must be an outstanding vkCmdBeginDebugUtilsLabelEXT
command prior to the
vkQueueEndDebugUtilsLabelEXT
on the queue tha CommandBuffer
is submitted to.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for UnsafeCommandBufferBuilder
impl Send for UnsafeCommandBufferBuilder
impl Sync for UnsafeCommandBufferBuilder
impl Unpin for UnsafeCommandBufferBuilder
impl UnwindSafe for UnsafeCommandBufferBuilder
Blanket Implementations
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.