[][src]Struct gfx_hal::command::CommandBuffer

pub struct CommandBuffer<B: Backend, C, S = OneShot, L = Primary, R = <B as Backend>::CommandBuffer> { /* fields omitted */ }

A strongly-typed command buffer that will only implement methods that are valid for the operations it supports.

Methods

impl<B: Backend, C: Supports<Compute>, S: Shot, L: Level> CommandBuffer<B, C, S, L>[src]

pub unsafe fn bind_compute_pipeline(&mut self, pipeline: &B::ComputePipeline)[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn bind_compute_descriptor_sets<I, J>(
    &mut self,
    layout: &B::PipelineLayout,
    first_set: usize,
    sets: I,
    offsets: J
) where
    I: IntoIterator,
    I::Item: Borrow<B::DescriptorSet>,
    J: IntoIterator,
    J::Item: Borrow<DescriptorSetOffset>, 
[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn dispatch(&mut self, count: WorkGroupCount)[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn dispatch_indirect(&mut self, buffer: &B::Buffer, offset: Offset)[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn push_compute_constants(
    &mut self,
    layout: &B::PipelineLayout,
    offset: u32,
    constants: &[u32]
)
[src]

Identical to the RawCommandBuffer method of the same name.

impl<B: Backend, C: Supports<Graphics>, S: Shot, L: Level> CommandBuffer<B, C, S, L>[src]

pub unsafe fn clear_image<T>(
    &mut self,
    image: &B::Image,
    layout: Layout,
    color: ClearColor,
    depth_stencil: ClearDepthStencil,
    subresource_ranges: T
) where
    T: IntoIterator,
    T::Item: Borrow<SubresourceRange>, 
[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn bind_index_buffer(&mut self, ibv: IndexBufferView<B>)[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn bind_vertex_buffers<I, T>(
    &mut self,
    first_binding: BufferIndex,
    buffers: I
) where
    I: IntoIterator<Item = (T, Offset)>,
    T: Borrow<B::Buffer>, 
[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn bind_graphics_pipeline(&mut self, pipeline: &B::GraphicsPipeline)[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn bind_graphics_descriptor_sets<I, J>(
    &mut self,
    layout: &B::PipelineLayout,
    first_set: usize,
    sets: I,
    offsets: J
) where
    I: IntoIterator,
    I::Item: Borrow<B::DescriptorSet>,
    J: IntoIterator,
    J::Item: Borrow<DescriptorSetOffset>, 
[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn set_viewports<T>(&mut self, first_viewport: u32, viewports: T) where
    T: IntoIterator,
    T::Item: Borrow<Viewport>, 
[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn set_scissors<T>(&mut self, first_scissor: u32, scissors: T) where
    T: IntoIterator,
    T::Item: Borrow<Rect>, 
[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn set_stencil_reference(&mut self, faces: Face, value: StencilValue)[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn set_stencil_read_mask(&mut self, faces: Face, value: StencilValue)[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn set_stencil_write_mask(
    &mut self,
    faces: Face,
    value: StencilValue
)
[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn set_blend_constants(&mut self, cv: ColorValue)[src]

Identical to the RawCommandBuffer method of the same name.

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

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn set_line_width(&mut self, width: f32)[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn set_depth_bias(&mut self, depth_bias: DepthBias)[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn push_graphics_constants(
    &mut self,
    layout: &B::PipelineLayout,
    stages: ShaderStageFlags,
    offset: u32,
    constants: &[u32]
)
[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn resolve_image<T>(
    &mut self,
    src: &B::Image,
    src_layout: Layout,
    dst: &B::Image,
    dst_layout: Layout,
    regions: T
) where
    T: IntoIterator,
    T::Item: Borrow<ImageResolve>, 
[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn blit_image<T>(
    &mut self,
    src: &B::Image,
    src_layout: Layout,
    dst: &B::Image,
    dst_layout: Layout,
    filter: Filter,
    regions: T
) where
    T: IntoIterator,
    T::Item: Borrow<ImageBlit>, 
[src]

Identical to the RawCommandBuffer method of the same name.

impl<B: Backend, C: Supports<Graphics>, S: Shot> CommandBuffer<B, C, S, Primary>[src]

pub unsafe fn begin_render_pass_inline<T>(
    &mut self,
    render_pass: &B::RenderPass,
    frame_buffer: &B::Framebuffer,
    render_area: Rect,
    clear_values: T
) -> RenderPassInlineEncoder<B> where
    T: IntoIterator,
    T::Item: Borrow<ClearValue>, 
[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn begin_render_pass_secondary<T>(
    &mut self,
    render_pass: &B::RenderPass,
    frame_buffer: &B::Framebuffer,
    render_area: Rect,
    clear_values: T
) -> RenderPassSecondaryEncoder<B> where
    T: IntoIterator,
    T::Item: Borrow<ClearValue>, 
[src]

Creates a new secondary render pass.

impl<B: Backend, C: Supports<GraphicsOrCompute>, S: Shot, L: Level> CommandBuffer<B, C, S, L>[src]

pub unsafe fn begin_query(&mut self, query: Query<B>, flags: ControlFlags)[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn end_query(&mut self, query: Query<B>)[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn reset_query_pool(
    &mut self,
    pool: &B::QueryPool,
    queries: Range<Id>
)
[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn copy_query_pool_results(
    &mut self,
    pool: &B::QueryPool,
    queries: Range<Id>,
    buffer: &B::Buffer,
    offset: Offset,
    stride: Offset,
    flags: ResultFlags
)
[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn write_timestamp(&mut self, stage: PipelineStage, query: Query<B>)[src]

Identical to the RawCommandBuffer method of the same name.

impl<B: Backend, C: Supports<Transfer>, S: Shot, L: Level> CommandBuffer<B, C, S, L>[src]

pub unsafe fn pipeline_barrier<'i, T>(
    &mut self,
    stages: Range<PipelineStage>,
    dependencies: Dependencies,
    barriers: T
) where
    T: IntoIterator,
    T::Item: Borrow<Barrier<'i, B>>, 
[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn fill_buffer<R>(&mut self, buffer: &B::Buffer, range: R, data: u32) where
    R: RangeArg<Offset>, 
[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn copy_buffer<T>(
    &mut self,
    src: &B::Buffer,
    dst: &B::Buffer,
    regions: T
) where
    T: IntoIterator,
    T::Item: Borrow<BufferCopy>, 
[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn update_buffer(
    &mut self,
    buffer: &B::Buffer,
    offset: Offset,
    data: &[u8]
)
[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn copy_image<T>(
    &mut self,
    src: &B::Image,
    src_layout: Layout,
    dst: &B::Image,
    dst_layout: Layout,
    regions: T
) where
    T: IntoIterator,
    T::Item: Borrow<ImageCopy>, 
[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn copy_buffer_to_image<T>(
    &mut self,
    src: &B::Buffer,
    dst: &B::Image,
    dst_layout: Layout,
    regions: T
) where
    T: IntoIterator,
    T::Item: Borrow<BufferImageCopy>, 
[src]

Identical to the RawCommandBuffer method of the same name.

pub unsafe fn copy_image_to_buffer<T>(
    &mut self,
    src: &B::Image,
    src_layout: Layout,
    dst: &B::Buffer,
    regions: T
) where
    T: IntoIterator,
    T::Item: Borrow<BufferImageCopy>, 
[src]

Identical to the RawCommandBuffer method of the same name.

impl<B: Backend, C> CommandBuffer<B, C, OneShot, Primary>[src]

pub unsafe fn begin(&mut self)[src]

Begin recording a one-shot primary command buffer.

impl<B: Backend, C> CommandBuffer<B, C, MultiShot, Primary>[src]

pub unsafe fn begin(&mut self, allow_pending_resubmit: bool)[src]

Begin recording a multi-shot primary command buffer.

impl<B: Backend, C> CommandBuffer<B, C, OneShot, Secondary>[src]

pub unsafe fn begin(&mut self, inheritance: CommandBufferInheritanceInfo<B>)[src]

Begin recording a one-shot secondary command buffer.

impl<B: Backend, C> CommandBuffer<B, C, MultiShot, Secondary>[src]

pub unsafe fn begin(
    &mut self,
    allow_pending_resubmit: bool,
    inheritance: CommandBufferInheritanceInfo<B>
)
[src]

Begin recording a multi-shot secondary command buffer.

impl<B: Backend, C, S: Shot, L: Level> CommandBuffer<B, C, S, L>[src]

pub unsafe fn new(raw: B::CommandBuffer) -> Self[src]

Create a new typed command buffer from a raw command pool.

pub unsafe fn finish(&mut self)[src]

Finish recording commands to the command buffers.

The command buffer must be reset to able to re-record commands.

pub unsafe fn reset(&mut self, release_resources: bool)[src]

Empties the command buffer, optionally releasing all resources from the commands that have been submitted. The command buffer is moved back to the "initial" state.

The command buffer must not be in the "pending" state. Additionally, the command pool must have been created with the RESET_INDIVIDUAL flag to be able to reset individual buffers.

pub unsafe fn downgrade<D>(&mut self) -> &mut CommandBuffer<B, D, S> where
    C: Supports<D>, 
[src]

Downgrade a command buffer to a lesser capability type.

impl<B: Backend, C, S: Shot> CommandBuffer<B, C, S, Primary>[src]

pub unsafe fn execute_commands<'a, I, T, K>(&mut self, cmd_buffers: I) where
    K: Capability,
    T: 'a + Submittable<B, K, Secondary>,
    I: IntoIterator<Item = &'a T>,
    C: Supports<K>, 
[src]

Identical to the RawCommandBuffer method of the same name.

Trait Implementations

impl<B: Backend, C, S, L> IntoRawCommandBuffer<B, C> for CommandBuffer<B, C, S, L>[src]

impl<B: Backend, C, K: Capability + Supports<C>, S, L: Level> Submittable<B, K, L> for CommandBuffer<B, C, S, L>[src]

impl<B: Debug + Backend, C: Debug, S: Debug, L: Debug, R: Debug> Debug for CommandBuffer<B, C, S, L, R>[src]

impl<B, C, S, L, R> Borrow<R> for CommandBuffer<B, C, S, L, R> where
    R: RawCommandBuffer<B>,
    B: Backend<CommandBuffer = R>, 
[src]

Auto Trait Implementations

impl<B, C, S, L, R> Unpin for CommandBuffer<B, C, S, L, R> where
    B: Unpin,
    C: Unpin,
    L: Unpin,
    R: Unpin,
    S: Unpin

impl<B, C, S, L, R> Sync for CommandBuffer<B, C, S, L, R> where
    C: Sync,
    L: Sync,
    R: Sync,
    S: Sync

impl<B, C, S, L, R> Send for CommandBuffer<B, C, S, L, R> where
    C: Send,
    L: Send,
    R: Send,
    S: Send

impl<B, C, S, L, R> UnwindSafe for CommandBuffer<B, C, S, L, R> where
    B: UnwindSafe,
    C: UnwindSafe,
    L: UnwindSafe,
    R: UnwindSafe,
    S: UnwindSafe

impl<B, C, S, L, R> RefUnwindSafe for CommandBuffer<B, C, S, L, R> where
    B: RefUnwindSafe,
    C: RefUnwindSafe,
    L: RefUnwindSafe,
    R: RefUnwindSafe,
    S: RefUnwindSafe

Blanket Implementations

impl<T> Supports<T> for T[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.

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

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

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