gfx_backend_empty

Struct CommandBuffer

Source
pub struct CommandBuffer;
Expand description

Dummy command buffer, which ignores all the calls.

Trait Implementations§

Source§

impl CommandBuffer<Backend> for CommandBuffer

Source§

unsafe fn begin( &mut self, _: CommandBufferFlags, _: CommandBufferInheritanceInfo<'_, Backend>, )

Begins recording commands to a command buffer.
Source§

unsafe fn finish(&mut self)

Finish recording commands to a command buffer.
Source§

unsafe fn reset(&mut self, _: bool)

Empties the command buffer, optionally releasing all resources from the commands that have been submitted.
Source§

unsafe fn pipeline_barrier<'a, T>( &mut self, _: Range<PipelineStage>, _: Dependencies, _: T, )
where T: Iterator<Item = Barrier<'a, Backend>>,

Inserts a synchronization dependency between pipeline stages in the command buffer.
Source§

unsafe fn fill_buffer(&mut self, _: &Buffer, _: SubRange, _: u32)

Fill a buffer with the given u32 value.
Source§

unsafe fn update_buffer(&mut self, _: &Buffer, _: Offset, _: &[u8])

Copy data from the given slice into a buffer.
Source§

unsafe fn clear_image<T>(&mut self, _: &Image, _: Layout, _: ClearValue, _: T)

Clears an image to the given color/depth/stencil.
Source§

unsafe fn clear_attachments<T, U>(&mut self, _: T, _: U)

Takes an iterator of attachments and an iterator of rect’s, and clears the given rect’s for each attachment.
Source§

unsafe fn resolve_image<T>( &mut self, _: &Image, _: Layout, _: &Image, _: Layout, _: T, )

“Resolves” a multisampled image, converting it into a non-multisampled image. Takes an iterator of regions to apply the resolution to.
Source§

unsafe fn blit_image<T>( &mut self, _: &Image, _: Layout, _: &Image, _: Layout, _: Filter, _: T, )

Copies regions from the source to destination image, applying scaling, filtering and potentially format conversion.
Source§

unsafe fn bind_index_buffer(&mut self, _: &Buffer, _: SubRange, _: IndexType)

Bind the index buffer view, making it the “current” one that draw commands will operate on.
Source§

unsafe fn bind_vertex_buffers<'a, T>(&mut self, _: u32, _: T)
where T: Iterator<Item = (&'a Buffer, SubRange)>,

Bind the vertex buffer set, making it the “current” one that draw commands will operate on. Read more
Source§

unsafe fn set_viewports<T>(&mut self, _: u32, _: T)

Set the viewport parameters for the rasterizer. Read more
Source§

unsafe fn set_scissors<T>(&mut self, _: u32, _: T)

Set the scissor rectangles for the rasterizer. Read more
Source§

unsafe fn set_stencil_reference(&mut self, _: Face, _: StencilValue)

Sets the stencil reference value for comparison operations and store operations. Will be used on the LHS of stencil compare ops and as store value when the store op is Reference.
Source§

unsafe fn set_stencil_read_mask(&mut self, _: Face, _: StencilValue)

Sets the stencil read mask.
Source§

unsafe fn set_stencil_write_mask(&mut self, _: Face, _: StencilValue)

Sets the stencil write mask.
Source§

unsafe fn set_blend_constants(&mut self, _: ColorValue)

Set the blend constant values dynamically.
Source§

unsafe fn set_depth_bounds(&mut self, _: Range<f32>)

Set the depth bounds test values dynamically.
Source§

unsafe fn set_line_width(&mut self, _: f32)

Set the line width dynamically. Read more
Source§

unsafe fn set_depth_bias(&mut self, _: DepthBias)

Set the depth bias dynamically.
Source§

unsafe fn begin_render_pass<'a, T>( &mut self, _: &(), _: &(), _: Rect, _: T, _: SubpassContents, )
where T: Iterator<Item = RenderAttachmentInfo<'a, Backend>>,

Begins recording commands for a render pass on the given framebuffer. Read more
Source§

unsafe fn next_subpass(&mut self, _: SubpassContents)

Steps to the next subpass in the current render pass.
Source§

unsafe fn end_render_pass(&mut self)

Finishes recording commands for the current a render pass.
Source§

unsafe fn bind_graphics_pipeline(&mut self, _: &())

Bind a graphics pipeline. Read more
Source§

unsafe fn bind_graphics_descriptor_sets<'a, I, J>( &mut self, _: &(), _: usize, _: I, _: J, )
where I: Iterator<Item = &'a DescriptorSet>,

Takes an iterator of graphics DescriptorSet’s, and binds them to the command buffer. first_set is the index that the first descriptor is mapped to in the command buffer.
Source§

unsafe fn bind_compute_pipeline(&mut self, _: &())

Bind a compute pipeline. Read more
Source§

unsafe fn bind_compute_descriptor_sets<'a, I, J>( &mut self, _: &(), _: usize, _: I, _: J, )
where I: Iterator<Item = &'a DescriptorSet>,

Takes an iterator of compute DescriptorSet’s, and binds them to the command buffer, first_set is the index that the first descriptor is mapped to in the command buffer.
Source§

unsafe fn dispatch(&mut self, _: WorkGroupCount)

Execute a workgroup in the compute pipeline. x, y and z are the number of local workgroups to dispatch along each “axis”; a total of xyz local workgroups will be created. Read more
Source§

unsafe fn dispatch_indirect(&mut self, _: &Buffer, _: Offset)

Works similarly to dispatch() but reads parameters from the given buffer during execution.
Source§

unsafe fn copy_buffer<T>(&mut self, _: &Buffer, _: &Buffer, _: T)

Adds a command to copy regions from the source to destination buffer.
Source§

unsafe fn copy_image<T>( &mut self, _: &Image, _: Layout, _: &Image, _: Layout, _: T, )

Copies regions from the source to the destination images, which have the given layouts. No format conversion is done; the source and destination Layout’s must have the same sized image formats (such as Rgba8Unorm and R32, both of which are 32 bits).
Source§

unsafe fn copy_buffer_to_image<T>( &mut self, _: &Buffer, _: &Image, _: Layout, _: T, )

Copies regions from the source buffer to the destination image.
Source§

unsafe fn copy_image_to_buffer<T>( &mut self, _: &Image, _: Layout, _: &Buffer, _: T, )

Copies regions from the source image to the destination buffer.
Source§

unsafe fn draw(&mut self, _: Range<VertexCount>, _: Range<InstanceCount>)

Performs a non-indexed drawing operation, fetching vertex attributes from the currently bound vertex buffers. It performs instanced drawing, drawing instances.len() times with an instanceIndex starting with the start of the range.
Source§

unsafe fn draw_indexed( &mut self, _: Range<IndexCount>, _: VertexOffset, _: Range<InstanceCount>, )

Performs indexed drawing, drawing the range of indices given by the current index buffer and any bound vertex buffers. base_vertex specifies the vertex offset corresponding to index 0. That is, the offset into the vertex buffer is (current_index + base_vertex) Read more
Source§

unsafe fn draw_indirect( &mut self, _: &Buffer, _: Offset, _: DrawCount, _: Stride, )

Functions identically to draw(), except the parameters are read from the given buffer, starting at offset and increasing stride bytes with each successive draw. Performs draw_count draws total. draw_count may be zero. Read more
Source§

unsafe fn draw_indexed_indirect( &mut self, _: &Buffer, _: Offset, _: DrawCount, _: Stride, )

Like draw_indirect(), this does indexed drawing a la draw_indexed() but reads the draw parameters out of the given buffer. Read more
Source§

unsafe fn draw_indirect_count( &mut self, _: &Buffer, _: Offset, _: &Buffer, _: Offset, _: u32, _: Stride, )

Functions identically to draw_indirect(), except the amount of draw calls are specified by the u32 in count_buffer at count_buffer_offset. There is a limit of max_draw_count invocations. Read more
Source§

unsafe fn draw_indexed_indirect_count( &mut self, _: &Buffer, _: Offset, _: &Buffer, _: Offset, _: u32, _: Stride, )

Functions identically to draw_indexed_indirect(), except the amount of draw calls are specified by the u32 in count_buffer at count_buffer_offset. There is a limit of max_draw_count invocations. Read more
Source§

unsafe fn draw_mesh_tasks(&mut self, _: TaskCount, _: TaskCount)

Dispatches task_count of threads. Similar to compute dispatch.
Source§

unsafe fn draw_mesh_tasks_indirect( &mut self, _: &Buffer, _: Offset, _: DrawCount, _: Stride, )

Indirect version of draw_mesh_tasks. Analogous to draw_indirect, but for mesh shaders.
Source§

unsafe fn draw_mesh_tasks_indirect_count( &mut self, _: &Buffer, _: Offset, _: &Buffer, _: Offset, _: u32, _: Stride, )

Like draw_mesh_tasks_indirect except that the draw count is read by the device from a buffer during execution. The command will read an unsigned 32-bit integer from count_buffer located at count_buffer_offset and use this as the draw count.
Source§

unsafe fn set_event(&mut self, _: &(), _: PipelineStage)

Signals an event once all specified stages of the shader pipeline have completed.
Source§

unsafe fn reset_event(&mut self, _: &(), _: PipelineStage)

Resets an event once all specified stages of the shader pipeline have completed.
Source§

unsafe fn wait_events<'a, I, J>(&mut self, _: I, _: Range<PipelineStage>, _: J)
where J: Iterator<Item = Barrier<'a, Backend>>,

Waits at some shader stage(s) until all events have been signalled. Read more
Source§

unsafe fn begin_query(&mut self, _: Query<'_, Backend>, _: ControlFlags)

Begins a query operation. Queries count operations or record timestamps resulting from commands that occur between the beginning and end of the query, and save the results to the query pool.
Source§

unsafe fn end_query(&mut self, _: Query<'_, Backend>)

End a query.
Source§

unsafe fn reset_query_pool(&mut self, _: &(), _: Range<Id>)

Reset/clear the values in the given range of the query pool.
Source§

unsafe fn copy_query_pool_results( &mut self, _: &(), _: Range<Id>, _: &Buffer, _: Offset, _: Stride, _: ResultFlags, )

Copy query results into a buffer.
Source§

unsafe fn write_timestamp(&mut self, _: PipelineStage, _: Query<'_, Backend>)

Requests a timestamp to be written.
Source§

unsafe fn push_graphics_constants( &mut self, _: &(), _: ShaderStageFlags, _: u32, _: &[u32], )

Modify constant data in a graphics pipeline. Push constants are intended to modify data in a pipeline more quickly than a updating the values inside a descriptor set. Read more
Source§

unsafe fn push_compute_constants(&mut self, _: &(), _: u32, _: &[u32])

Modify constant data in a compute pipeline. Push constants are intended to modify data in a pipeline more quickly than a updating the values inside a descriptor set. Read more
Source§

unsafe fn execute_commands<'a, T>(&mut self, _: T)
where T: Iterator<Item = &'a CommandBuffer>,

Execute the given secondary command buffers.
Source§

unsafe fn insert_debug_marker(&mut self, _: &str, _: u32)

Debug mark the current spot in the command buffer.
Source§

unsafe fn begin_debug_marker(&mut self, _: &str, _: u32)

Start a debug marker at the current place in the command buffer.
Source§

unsafe fn end_debug_marker(&mut self)

End the last started debug marker scope.
Source§

unsafe fn begin_primary(&mut self, flags: CommandBufferFlags)

Begins recording a primary command buffer (that has no inheritance information).
Source§

impl Debug for CommandBuffer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.