[][src]Struct bedrock::CmdRecord

pub struct CmdRecord<'d> { /* fields omitted */ }

The recording state of commandbuffers

Methods

impl<'d> CmdRecord<'d>[src]

[feature = "Implements"] Graphics Commands: Manipulating with Render Passes

pub fn begin_render_pass(
    &mut self,
    pass: &RenderPass,
    framebuffer: &Framebuffer,
    render_area: VkRect2D,
    clear_values: &[ClearValue],
    inline_commands: bool
) -> &mut Self
[src]

Begin a new render pass

pub fn next_subpass(&mut self, inline_commands: bool) -> &mut Self[src]

Transition to the next subpass of a render pass

pub fn end_render_pass(&mut self) -> &mut Self[src]

End the current render pass

impl<'d> CmdRecord<'d>[src]

[feature = "Implements"] Graphics/Compute Commands: Pipeline Setup

pub fn bind_graphics_pipeline(&mut self, pipeline: &Pipeline) -> &mut Self[src]

Bind a pipeline object to a command buffer

pub fn bind_compute_pipeline(&mut self, pipeline: &Pipeline) -> &mut Self[src]

Bind a pipeline object to a command buffer

pub fn bind_graphics_pipeline_layout(
    &mut self,
    layout: &PipelineLayout
) -> &mut Self
[src]

Bind a pipeline layout object to a command buffer

pub fn bind_compute_pipeline_layout(
    &mut self,
    layout: &PipelineLayout
) -> &mut Self
[src]

Bind a pipeline layout object to a command buffer

pub fn bind_graphics_pipeline_pair(
    &mut self,
    pipeline: &Pipeline,
    layout: &PipelineLayout
) -> &mut Self
[src]

Bind a pipeline object and a pipeline layout object to a command buffer

pub fn bind_compute_pipeline_pair(
    &mut self,
    pipeline: &Pipeline,
    layout: &PipelineLayout
) -> &mut Self
[src]

Bind a pipeline object and a pipeline layout object to a command buffer

pub fn bind_graphics_descriptor_sets(
    &mut self,
    first: u32,
    descriptor_sets: &[VkDescriptorSet],
    dynamic_offsets: &[u32]
) -> &mut Self
[src]

Binds descriptor sets to a command buffer

pub fn bind_compute_descriptor_sets(
    &mut self,
    first: u32,
    descriptor_sets: &[VkDescriptorSet],
    dynamic_offsets: &[u32]
) -> &mut Self
[src]

Binds descriptor sets to a command buffer

pub fn push_graphics_constant<T>(
    &mut self,
    stage: ShaderStage,
    offset: u32,
    value: &T
) -> &mut Self
[src]

Update the value of push constant

pub fn push_compute_constant<T>(
    &mut self,
    stage: ShaderStage,
    offset: u32,
    value: &T
) -> &mut Self
[src]

Update the value of push constant

impl<'d> CmdRecord<'d>[src]

[feature = "Implements"] Graphics Commands: Updating dynamic states

pub fn set_viewport(
    &mut self,
    first: u32,
    viewports: &[VkViewport]
) -> &mut Self
[src]

Set the viewport on a command buffer

pub fn set_scissor(&mut self, first: u32, scissors: &[VkRect2D]) -> &mut Self[src]

Set the dynamic scissor rectangles on a command buffer

pub fn set_line_width(&mut self, w: f32) -> &Self[src]

Set the dynamic line width state

pub fn set_depth_bias(
    &mut self,
    constant_factor: f32,
    clamp: f32,
    slope_factor: f32
) -> &mut Self
[src]

Set the depth bias dynamic state

pub fn set_blend_constants(&mut self, blend_constants: [f32; 4]) -> &mut Self[src]

Set the values of blend constants

pub fn set_depth_bounds(&mut self, bounds: Range<f32>) -> &mut Self[src]

Set the depth bounds test values for a command buffer

pub fn set_stencil_compare_mask(
    &mut self,
    face_mask: StencilFaceMask,
    compare_mask: u32
) -> &mut Self
[src]

Set the stencil compare mask dynamic state

pub fn set_stencil_write_mask(
    &mut self,
    face_mask: StencilFaceMask,
    write_mask: u32
) -> &mut Self
[src]

Set the stencil write mask dynamic state

pub fn set_stencil_reference(
    &mut self,
    face_mask: StencilFaceMask,
    reference: u32
) -> &mut Self
[src]

Set the stencil reference dynamic state

impl<'d> CmdRecord<'d>[src]

[feature = "Implements"] Graphics Commands: Binding Buffers

pub fn bind_index_buffer(
    &mut self,
    buffer: &Buffer,
    offset: usize,
    index_type: IndexType
) -> &mut Self
[src]

Bind an index buffer to a command buffer

pub fn bind_vertex_buffers(
    &mut self,
    first: u32,
    buffers: &[(&Buffer, usize)]
) -> &mut Self
[src]

Bind vertex buffers to a command buffer

impl<'d> CmdRecord<'d>[src]

[feature = "Implements"] Graphics Commands: Inside a Render Pass

pub fn draw(
    &mut self,
    vertex_count: u32,
    instance_count: u32,
    first_vertex: u32,
    first_instance: u32
) -> &mut Self
[src]

Draw primitives

pub fn draw_indexed(
    &mut self,
    index_count: u32,
    instance_count: u32,
    first_index: u32,
    vertex_offset: i32,
    first_instance: u32
) -> &mut Self
[src]

Issue an indexed draw into a command buffer

pub fn draw_indirect(
    &mut self,
    buffer: &Buffer,
    offset: usize,
    draw_count: u32,
    stride: u32
) -> &mut Self
[src]

Issue an indirect draw into a command buffer

pub fn draw_indexed_indirect(
    &mut self,
    buffer: &Buffer,
    offset: usize,
    draw_count: u32,
    stride: u32
) -> &mut Self
[src]

Perform an indexed indirect draw

impl<'d> CmdRecord<'d>[src]

[feature = "Implements"] Compute Commands: Dispatching kernels

pub fn dispatch(
    &mut self,
    group_count_x: u32,
    group_count_y: u32,
    group_count_z: u32
) -> &mut Self
[src]

Dispatch compute work items

pub fn dispatch_indirect(&mut self, buffer: &Buffer, offset: usize) -> &mut Self[src]

Dispatch compute work items using indirect parameters

impl<'d> CmdRecord<'d>[src]

[feature = "Implements"] Transfer Commands: Copying resources

pub fn copy_buffer(
    &mut self,
    src: &Buffer,
    dst: &Buffer,
    regions: &[VkBufferCopy]
) -> &mut Self
[src]

Copy data between buffer regions

pub fn copy_image(
    &mut self,
    src: &Image,
    src_layout: ImageLayout,
    dst: &Image,
    dst_layout: ImageLayout,
    regions: &[VkImageCopy]
) -> &mut Self
[src]

Copy data between images

pub fn blit_image(
    &mut self,
    src: &Image,
    src_layout: ImageLayout,
    dst: &Image,
    dst_layout: ImageLayout,
    regions: &[VkImageBlit],
    filter: FilterMode
) -> &mut Self
[src]

Copy regions of an image, potentially performing format conversion

pub fn copy_buffer_to_image(
    &mut self,
    src_buffer: &Buffer,
    dst_image: &Image,
    dst_layout: ImageLayout,
    regions: &[VkBufferImageCopy]
) -> &mut Self
[src]

Copy data from a buffer into an image

pub fn copy_image_to_buffer(
    &mut self,
    src_image: &Image,
    src_layout: ImageLayout,
    dst_buffer: &Buffer,
    regions: &[VkBufferImageCopy]
) -> &mut Self
[src]

Copy image data into a buffer

pub fn update_buffer<T>(
    &mut self,
    dst: &Buffer,
    dst_offset: usize,
    size: usize,
    data: &T
) -> &mut Self
[src]

Update a buffer's contents from host memory

impl<'d> CmdRecord<'d>[src]

[feature = "Implements"] Graphics/Compute Commands: Transfer-like(clearing/filling) commands

pub fn fill_buffer(
    &mut self,
    dst: &Buffer,
    dst_offset: usize,
    size: usize,
    data: u32
) -> &mut Self
[src]

Fill a region of a buffer with a fixed value.
size is number of bytes to fill

pub fn clear_color_image<T: ClearColorValue>(
    &mut self,
    image: &Image,
    layout: ImageLayout,
    color: &T,
    ranges: &[VkImageSubresourceRange]
) -> &mut Self
[src]

Clear regions of a color image

pub fn clear_depth_stencil_image(
    &mut self,
    image: &Image,
    layout: ImageLayout,
    depth: f32,
    stencil: u32,
    ranges: &[VkImageSubresourceRange]
) -> &mut Self
[src]

Fill regions of a combined depth/stencil image

pub fn clear_attachments(
    &mut self,
    attachments: &[VkClearAttachment],
    rects: &[VkClearRect]
) -> &mut Self
[src]

Clear regions within currently bound framebuffer attachments

impl<'d> CmdRecord<'d>[src]

[feature = "Implements"] Graphics Commands: Executing Subcommands

pub unsafe fn execute_commands(
    &mut self,
    buffers: &[VkCommandBuffer]
) -> &mut Self
[src]

Execute a secondary command buffer from a primary command buffer

Safety

Caller must be primary buffer and in the render pass when executing secondary command buffer

impl<'d> CmdRecord<'d>[src]

[feature = "Implements"] Graphics Commands: Resolving an image to another image

pub fn resolve_image(
    &mut self,
    src: &Image,
    src_layout: ImageLayout,
    dst: &Image,
    dst_layout: ImageLayout,
    regions: &[VkImageResolve]
) -> &mut Self
[src]

Resolve regions of an image

impl<'d> CmdRecord<'d>[src]

[feature = "Implements"] Graphics/Compute Commands: Synchronization between command buffers/queues

pub fn set_event(
    &mut self,
    event: &Event,
    stage_mask: PipelineStageFlags
) -> &mut Self
[src]

Set an event object to signaled state

pub fn reset_event(
    &mut self,
    event: &Event,
    stage_mask: PipelineStageFlags
) -> &mut Self
[src]

Reset an event object to non-signaled state

pub fn wait_events(
    &mut self,
    events: &[&Event],
    src_stage_mask: PipelineStageFlags,
    dst_stage_mask: PipelineStageFlags,
    memory_barriers: &[VkMemoryBarrier],
    buffer_memory_barriers: &[VkBufferMemoryBarrier],
    image_memory_barriers: &[VkImageMemoryBarrier]
) -> &mut Self
[src]

Wait for one or more events and insert a set of memory

pub fn pipeline_barrier(
    &mut self,
    src_stage_mask: PipelineStageFlags,
    dst_stage_mask: PipelineStageFlags,
    by_region: bool,
    memory_barriers: &[VkMemoryBarrier],
    buffer_memory_barriers: &[BufferMemoryBarrier],
    image_memory_barriers: &[ImageMemoryBarrier]
) -> &mut Self
[src]

Insert a memory dependency

impl<'d> CmdRecord<'d>[src]

[feature = "Implements"] Graphics/Compute Commands: Querying

pub fn begin_query(
    &mut self,
    pool: &QueryPool,
    query: u32,
    precise_query: bool
) -> &mut Self
[src]

Begin a query

pub fn end_query(&mut self, pool: &QueryPool, query: u32) -> &mut Self[src]

Ends a query

pub fn reset_query_pool(
    &mut self,
    pool: &QueryPool,
    range: Range<u32>
) -> &mut Self
[src]

Reset queries in a query pool

pub fn write_timestamp(
    &mut self,
    stage: PipelineStageFlags,
    pool: &QueryPool,
    query: u32
) -> &mut Self
[src]

Write a device timestamp into a query object

pub fn copy_query_pool_results(
    &mut self,
    pool: &QueryPool,
    range: Range<u32>,
    dst: &Buffer,
    dst_offset: usize,
    stride: usize,
    wide_result: bool,
    flags: QueryResultFlags
) -> &mut Self
[src]

Copy the results of queries in a query pool to a buffer object

Trait Implementations

impl<'d> Drop for CmdRecord<'d>[src]

Implicitly closing the recording state. This may cause a panic when there are errors in commands

Auto Trait Implementations

impl<'d> RefUnwindSafe for CmdRecord<'d>

impl<'d> !Send for CmdRecord<'d>

impl<'d> !Sync for CmdRecord<'d>

impl<'d> Unpin for CmdRecord<'d>

impl<'d> UnwindSafe for CmdRecord<'d>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.