Struct vulkano::command_buffer::sys::UnsafeCommandBufferBuilder [−][src]
pub struct UnsafeCommandBufferBuilder { /* fields omitted */ }
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
impl UnsafeCommandBufferBuilder
[src]
impl UnsafeCommandBufferBuilder
[src]pub unsafe fn new<F>(
pool_alloc: &UnsafeCommandPoolAlloc,
level: CommandBufferLevel<F>,
usage: CommandBufferUsage
) -> Result<UnsafeCommandBufferBuilder, OomError> where
F: FramebufferAbstract,
[src]
pub unsafe fn new<F>(
pool_alloc: &UnsafeCommandPoolAlloc,
level: CommandBufferLevel<F>,
usage: CommandBufferUsage
) -> Result<UnsafeCommandBufferBuilder, OomError> where
F: FramebufferAbstract,
[src]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.
pub fn build(self) -> Result<UnsafeCommandBuffer, OomError>
[src]
pub fn build(self) -> Result<UnsafeCommandBuffer, OomError>
[src]Turns the builder into an actual command buffer.
pub unsafe fn begin_query(&mut self, query: Query<'_>, flags: QueryControlFlags)
[src]
pub unsafe fn begin_query(&mut self, query: Query<'_>, flags: QueryControlFlags)
[src]Calls vkCmdBeginQuery
on the builder.
pub unsafe fn begin_render_pass<F: ?Sized, I>(
&mut self,
framebuffer: &F,
subpass_contents: SubpassContents,
clear_values: I
) where
F: FramebufferAbstract,
I: Iterator<Item = ClearValue>,
[src]
pub unsafe fn begin_render_pass<F: ?Sized, I>(
&mut self,
framebuffer: &F,
subpass_contents: SubpassContents,
clear_values: I
) where
F: FramebufferAbstract,
I: Iterator<Item = ClearValue>,
[src]Calls vkCmdBeginRenderPass
on the builder.
pub unsafe fn bind_descriptor_sets<'s, Pl: ?Sized, S, I>(
&mut self,
graphics: bool,
pipeline_layout: &Pl,
first_binding: u32,
sets: S,
dynamic_offsets: I
) where
Pl: PipelineLayoutAbstract,
S: Iterator<Item = &'s UnsafeDescriptorSet>,
I: Iterator<Item = u32>,
[src]
pub unsafe fn bind_descriptor_sets<'s, Pl: ?Sized, S, I>(
&mut self,
graphics: bool,
pipeline_layout: &Pl,
first_binding: u32,
sets: S,
dynamic_offsets: I
) where
Pl: PipelineLayoutAbstract,
S: Iterator<Item = &'s UnsafeDescriptorSet>,
I: Iterator<Item = u32>,
[src]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: ?Sized>(
&mut self,
buffer: &B,
index_ty: IndexType
) where
B: BufferAccess,
[src]
pub unsafe fn bind_index_buffer<B: ?Sized>(
&mut self,
buffer: &B,
index_ty: IndexType
) where
B: BufferAccess,
[src]Calls vkCmdBindIndexBuffer
on the builder.
pub unsafe fn bind_pipeline_compute<Cp: ?Sized>(&mut self, pipeline: &Cp) where
Cp: ComputePipelineAbstract,
[src]
pub unsafe fn bind_pipeline_compute<Cp: ?Sized>(&mut self, pipeline: &Cp) where
Cp: ComputePipelineAbstract,
[src]Calls vkCmdBindPipeline
on the builder with a compute pipeline.
pub unsafe fn bind_pipeline_graphics<Gp: ?Sized>(&mut self, pipeline: &Gp) where
Gp: GraphicsPipelineAbstract,
[src]
pub unsafe fn bind_pipeline_graphics<Gp: ?Sized>(&mut self, pipeline: &Gp) where
Gp: GraphicsPipelineAbstract,
[src]Calls vkCmdBindPipeline
on the builder with a graphics pipeline.
pub unsafe fn bind_vertex_buffers(
&mut self,
first_binding: u32,
params: UnsafeCommandBufferBuilderBindVertexBuffer
)
[src]
pub unsafe fn bind_vertex_buffers(
&mut self,
first_binding: u32,
params: UnsafeCommandBufferBuilderBindVertexBuffer
)
[src]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: ?Sized, D: ?Sized, R>(
&mut self,
source: &S,
source_layout: ImageLayout,
destination: &D,
destination_layout: ImageLayout,
regions: R
) where
S: ImageAccess,
D: ImageAccess,
R: Iterator<Item = UnsafeCommandBufferBuilderImageCopy>,
[src]
pub unsafe fn copy_image<S: ?Sized, D: ?Sized, R>(
&mut self,
source: &S,
source_layout: ImageLayout,
destination: &D,
destination_layout: ImageLayout,
regions: R
) where
S: ImageAccess,
D: ImageAccess,
R: Iterator<Item = UnsafeCommandBufferBuilderImageCopy>,
[src]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: ?Sized, D: ?Sized, R>(
&mut self,
source: &S,
source_layout: ImageLayout,
destination: &D,
destination_layout: ImageLayout,
regions: R,
filter: Filter
) where
S: ImageAccess,
D: ImageAccess,
R: Iterator<Item = UnsafeCommandBufferBuilderImageBlit>,
[src]
pub unsafe fn blit_image<S: ?Sized, D: ?Sized, R>(
&mut self,
source: &S,
source_layout: ImageLayout,
destination: &D,
destination_layout: ImageLayout,
regions: R,
filter: Filter
) where
S: ImageAccess,
D: ImageAccess,
R: Iterator<Item = UnsafeCommandBufferBuilderImageBlit>,
[src]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: ?Sized, R>(
&mut self,
image: &I,
layout: ImageLayout,
color: ClearValue,
regions: R
) where
I: ImageAccess,
R: Iterator<Item = UnsafeCommandBufferBuilderColorImageClear>,
[src]
pub unsafe fn clear_color_image<I: ?Sized, R>(
&mut self,
image: &I,
layout: ImageLayout,
color: ClearValue,
regions: R
) where
I: ImageAccess,
R: Iterator<Item = UnsafeCommandBufferBuilderColorImageClear>,
[src]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 copy_buffer<S: ?Sized, D: ?Sized, R>(
&mut self,
source: &S,
destination: &D,
regions: R
) where
S: BufferAccess,
D: BufferAccess,
R: Iterator<Item = (usize, usize, usize)>,
[src]
pub unsafe fn copy_buffer<S: ?Sized, D: ?Sized, R>(
&mut self,
source: &S,
destination: &D,
regions: R
) where
S: BufferAccess,
D: BufferAccess,
R: Iterator<Item = (usize, usize, usize)>,
[src]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: ?Sized, D: ?Sized, R>(
&mut self,
source: &S,
destination: &D,
destination_layout: ImageLayout,
regions: R
) where
S: BufferAccess,
D: ImageAccess,
R: Iterator<Item = UnsafeCommandBufferBuilderBufferImageCopy>,
[src]
pub unsafe fn copy_buffer_to_image<S: ?Sized, D: ?Sized, R>(
&mut self,
source: &S,
destination: &D,
destination_layout: ImageLayout,
regions: R
) where
S: BufferAccess,
D: ImageAccess,
R: Iterator<Item = UnsafeCommandBufferBuilderBufferImageCopy>,
[src]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: ?Sized, D: ?Sized, R>(
&mut self,
source: &S,
source_layout: ImageLayout,
destination: &D,
regions: R
) where
S: ImageAccess,
D: BufferAccess,
R: Iterator<Item = UnsafeCommandBufferBuilderBufferImageCopy>,
[src]
pub unsafe fn copy_image_to_buffer<S: ?Sized, D: ?Sized, R>(
&mut self,
source: &S,
source_layout: ImageLayout,
destination: &D,
regions: R
) where
S: ImageAccess,
D: BufferAccess,
R: Iterator<Item = UnsafeCommandBufferBuilderBufferImageCopy>,
[src]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: usize,
flags: QueryResultFlags
) where
D: BufferAccess + TypedBufferAccess<Content = [T]>,
T: QueryResultElement,
[src]
pub unsafe fn copy_query_pool_results<D, T>(
&mut self,
queries: QueriesRange<'_>,
destination: D,
stride: usize,
flags: QueryResultFlags
) where
D: BufferAccess + TypedBufferAccess<Content = [T]>,
T: QueryResultElement,
[src]Calls vkCmdCopyQueryPoolResults
on the builder.
pub unsafe fn dispatch_indirect<B: ?Sized>(&mut self, buffer: &B) where
B: BufferAccess,
[src]
pub unsafe fn dispatch_indirect<B: ?Sized>(&mut self, buffer: &B) where
B: BufferAccess,
[src]Calls vkCmdDispatchIndirect
on the builder.
pub unsafe fn draw(
&mut self,
vertex_count: u32,
instance_count: u32,
first_vertex: u32,
first_instance: u32
)
[src]
pub unsafe fn draw(
&mut self,
vertex_count: u32,
instance_count: u32,
first_vertex: u32,
first_instance: u32
)
[src]Calls vkCmdDraw
on the builder.
pub unsafe fn draw_indexed(
&mut self,
index_count: u32,
instance_count: u32,
first_index: u32,
vertex_offset: i32,
first_instance: u32
)
[src]
pub unsafe fn draw_indexed(
&mut self,
index_count: u32,
instance_count: u32,
first_index: u32,
vertex_offset: i32,
first_instance: u32
)
[src]Calls vkCmdDrawIndexed
on the builder.
pub unsafe fn draw_indirect<B: ?Sized>(
&mut self,
buffer: &B,
draw_count: u32,
stride: u32
) where
B: BufferAccess,
[src]
pub unsafe fn draw_indirect<B: ?Sized>(
&mut self,
buffer: &B,
draw_count: u32,
stride: u32
) where
B: BufferAccess,
[src]Calls vkCmdDrawIndirect
on the builder.
pub unsafe fn draw_indexed_indirect<B: ?Sized>(
&mut self,
buffer: &B,
draw_count: u32,
stride: u32
) where
B: BufferAccess,
[src]
pub unsafe fn draw_indexed_indirect<B: ?Sized>(
&mut self,
buffer: &B,
draw_count: u32,
stride: u32
) where
B: BufferAccess,
[src]Calls vkCmdDrawIndexedIndirect
on the builder.
pub unsafe fn end_render_pass(&mut self)
[src]
pub unsafe fn end_render_pass(&mut self)
[src]Calls vkCmdEndRenderPass
on the builder.
pub unsafe fn execute_commands(
&mut self,
cbs: UnsafeCommandBufferBuilderExecuteCommands
)
[src]
pub unsafe fn execute_commands(
&mut self,
cbs: UnsafeCommandBufferBuilderExecuteCommands
)
[src]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.
pub unsafe fn fill_buffer<B: ?Sized>(&mut self, buffer: &B, data: u32) where
B: BufferAccess,
[src]
pub unsafe fn fill_buffer<B: ?Sized>(&mut self, buffer: &B, data: u32) where
B: BufferAccess,
[src]Calls vkCmdFillBuffer
on the builder.
pub unsafe fn next_subpass(&mut self, subpass_contents: SubpassContents)
[src]
pub unsafe fn next_subpass(&mut self, subpass_contents: SubpassContents)
[src]Calls vkCmdNextSubpass
on the builder.
pub unsafe fn pipeline_barrier(
&mut self,
command: &UnsafeCommandBufferBuilderPipelineBarrier
)
[src]
&mut self,
command: &UnsafeCommandBufferBuilderPipelineBarrier
)
pub unsafe fn push_constants<Pl: ?Sized, D>(
&mut self,
pipeline_layout: &Pl,
stages: ShaderStages,
offset: u32,
size: u32,
data: &D
) where
Pl: PipelineLayoutAbstract,
D: ?Sized,
[src]
pub unsafe fn push_constants<Pl: ?Sized, D>(
&mut self,
pipeline_layout: &Pl,
stages: ShaderStages,
offset: u32,
size: u32,
data: &D
) where
Pl: PipelineLayoutAbstract,
D: ?Sized,
[src]Calls vkCmdPushConstants
on the builder.
pub unsafe fn reset_event(&mut self, event: &Event, stages: PipelineStages)
[src]
pub unsafe fn reset_event(&mut self, event: &Event, stages: PipelineStages)
[src]Calls vkCmdResetEvent
on the builder.
pub unsafe fn reset_query_pool(&mut self, queries: QueriesRange<'_>)
[src]
pub unsafe fn reset_query_pool(&mut self, queries: QueriesRange<'_>)
[src]Calls vkCmdResetQueryPool
on the builder.
pub unsafe fn set_blend_constants(&mut self, constants: [f32; 4])
[src]
pub unsafe fn set_blend_constants(&mut self, constants: [f32; 4])
[src]Calls vkCmdSetBlendConstants
on the builder.
pub unsafe fn set_depth_bias(
&mut self,
constant_factor: f32,
clamp: f32,
slope_factor: f32
)
[src]
pub unsafe fn set_depth_bias(
&mut self,
constant_factor: f32,
clamp: f32,
slope_factor: f32
)
[src]Calls vkCmdSetDepthBias
on the builder.
pub unsafe fn set_depth_bounds(&mut self, min: f32, max: f32)
[src]
pub unsafe fn set_depth_bounds(&mut self, min: f32, max: f32)
[src]Calls vkCmdSetDepthBounds
on the builder.
pub unsafe fn set_event(&mut self, event: &Event, stages: PipelineStages)
[src]
pub unsafe fn set_event(&mut self, event: &Event, stages: PipelineStages)
[src]Calls vkCmdSetEvent
on the builder.
pub unsafe fn set_line_width(&mut self, line_width: f32)
[src]
pub unsafe fn set_line_width(&mut self, line_width: f32)
[src]Calls vkCmdSetLineWidth
on the builder.
pub unsafe fn set_stencil_compare_mask(
&mut self,
face_mask: StencilFaceFlags,
compare_mask: u32
)
[src]
pub unsafe fn set_stencil_compare_mask(
&mut self,
face_mask: StencilFaceFlags,
compare_mask: u32
)
[src]Calls vkCmdSetStencilCompareMask
on the builder.
pub unsafe fn set_stencil_reference(
&mut self,
face_mask: StencilFaceFlags,
reference: u32
)
[src]
pub unsafe fn set_stencil_reference(
&mut self,
face_mask: StencilFaceFlags,
reference: u32
)
[src]Calls vkCmdSetStencilReference
on the builder.
pub unsafe fn set_stencil_write_mask(
&mut self,
face_mask: StencilFaceFlags,
write_mask: u32
)
[src]
pub unsafe fn set_stencil_write_mask(
&mut self,
face_mask: StencilFaceFlags,
write_mask: u32
)
[src]Calls vkCmdSetStencilWriteMask
on the builder.
pub unsafe fn set_scissor<I>(&mut self, first_scissor: u32, scissors: I) where
I: Iterator<Item = Scissor>,
[src]
pub unsafe fn set_scissor<I>(&mut self, first_scissor: u32, scissors: I) where
I: Iterator<Item = Scissor>,
[src]Calls vkCmdSetScissor
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: Iterator<Item = Viewport>,
[src]
pub unsafe fn set_viewport<I>(&mut self, first_viewport: u32, viewports: I) where
I: Iterator<Item = Viewport>,
[src]Calls vkCmdSetViewport
on the builder.
If the list is empty then the command is automatically ignored.
pub unsafe fn update_buffer<B: ?Sized, D>(&mut self, buffer: &B, data: &D) where
B: BufferAccess,
D: ?Sized,
[src]
pub unsafe fn update_buffer<B: ?Sized, D>(&mut self, buffer: &B, data: &D) where
B: BufferAccess,
D: ?Sized,
[src]Calls vkCmdUpdateBuffer
on the builder.
pub unsafe fn write_timestamp(&mut self, query: Query<'_>, stage: PipelineStage)
[src]
pub unsafe fn write_timestamp(&mut self, query: Query<'_>, stage: PipelineStage)
[src]Calls vkCmdWriteTimestamp
on the builder.
pub unsafe fn debug_marker_begin(&mut self, name: &CStr, color: [f32; 4])
[src]
pub unsafe fn debug_marker_begin(&mut self, name: &CStr, color: [f32; 4])
[src]Calls vkCmdBeginDebugUtilsLabelEXT
on the builder.
Safety
The command pool that this command buffer was allocated from must support graphics or compute operations
pub unsafe fn debug_marker_end(&mut self)
[src]
pub unsafe fn debug_marker_end(&mut self)
[src]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
impl Debug for UnsafeCommandBufferBuilder
[src]
impl Debug for UnsafeCommandBufferBuilder
[src]impl VulkanObject for UnsafeCommandBufferBuilder
[src]
impl VulkanObject for UnsafeCommandBufferBuilder
[src]type Object = CommandBuffer
type Object = CommandBuffer
The type of the object.
const TYPE: ObjectType
[src]
const TYPE: ObjectType
[src]The ObjectType
of the internal Vulkan handle.
fn internal_object(&self) -> CommandBuffer
[src]
fn internal_object(&self) -> CommandBuffer
[src]Returns a reference to the object.
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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Content for T
[src]
impl<T> Content for T
[src]pub fn ref_from_ptr(*mut c_void, usize) -> Option<*mut T>
[src]
pub fn ref_from_ptr(*mut c_void, usize) -> Option<*mut T>
[src]Builds a pointer to this type from a raw pointer.
pub fn is_size_suitable(usize) -> bool
[src]
pub fn is_size_suitable(usize) -> bool
[src]Returns true if the size is suitable to store a type like this.
pub fn indiv_size() -> usize
[src]
pub fn indiv_size() -> usize
[src]Returns the size of an individual element.