[−][src]Struct rendy_command::EncoderCommon
Encoder for recording commands inside or outside renderpass.
Methods
impl<'a, B, C> EncoderCommon<'a, B, C> where
B: Backend,
[src]
B: Backend,
pub unsafe fn bind_index_buffer<'b>(
&mut self,
buffer: &'b B::Buffer,
offset: u64,
index_type: IndexType
) where
C: Supports<Graphics>,
[src]
&mut self,
buffer: &'b B::Buffer,
offset: u64,
index_type: IndexType
) where
C: Supports<Graphics>,
Bind index buffer.
Last bound index buffer is used in draw_indexed
command.
Note that draw*
commands available only inside renderpass.
Safety
offset
must not be greater than the size of buffer
.
Sum of offset
and starting address of the buffer
must be
multiple of index size indicated by index_type
.
See: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdBindIndexBuffer.html
pub unsafe fn bind_vertex_buffers<'b>(
&mut self,
first_binding: u32,
buffers: impl IntoIterator<Item = (&'b B::Buffer, u64)>
) where
C: Supports<Graphics>,
[src]
&mut self,
first_binding: u32,
buffers: impl IntoIterator<Item = (&'b B::Buffer, u64)>
) where
C: Supports<Graphics>,
Bind vertex buffers.
Last bound vertex buffer is used in draw
and draw_indexed
commands.
Note that draw*
commands available only inside renderpass.
Safety
first_binding + buffers.into_iter().count()
must less than or equal to the maxVertexInputBindings
device limit.
See: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdBindVertexBuffers.html
pub fn bind_graphics_pipeline(&mut self, pipeline: &B::GraphicsPipeline) where
C: Supports<Graphics>,
[src]
C: Supports<Graphics>,
Bind graphics pipeline.
Last bound vertex buffer is used in [draw
], [draw_indexed
], draw_indirect
and draw_indexed_indirect
commands.
pub unsafe fn bind_graphics_descriptor_sets<'b>(
&mut self,
layout: &B::PipelineLayout,
first_set: u32,
sets: impl IntoIterator<Item = &'b B::DescriptorSet>,
offsets: impl IntoIterator<Item = u32>
) where
C: Supports<Graphics>,
[src]
&mut self,
layout: &B::PipelineLayout,
first_set: u32,
sets: impl IntoIterator<Item = &'b B::DescriptorSet>,
offsets: impl IntoIterator<Item = u32>
) where
C: Supports<Graphics>,
Bind descriptor sets to graphics pipeline.
Safety
See: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdBindDescriptorSets.html
pub fn bind_compute_pipeline(&mut self, pipeline: &B::ComputePipeline) where
C: Supports<Compute>,
[src]
C: Supports<Compute>,
Bind compute pipeline.
pub unsafe fn bind_compute_descriptor_sets<'b>(
&mut self,
layout: &B::PipelineLayout,
first_set: u32,
sets: impl IntoIterator<Item = &'b B::DescriptorSet>,
offsets: impl IntoIterator<Item = u32>
) where
C: Supports<Compute>,
[src]
&mut self,
layout: &B::PipelineLayout,
first_set: u32,
sets: impl IntoIterator<Item = &'b B::DescriptorSet>,
offsets: impl IntoIterator<Item = u32>
) where
C: Supports<Compute>,
Bind descriptor sets to compute pipeline.
Safety
See: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdBindDescriptorSets.html
pub unsafe fn pipeline_barrier<'b>(
&mut self,
stages: Range<PipelineStage>,
dependencies: Dependencies,
barriers: impl IntoIterator<Item = Barrier<'b, B>>
)
[src]
&mut self,
stages: Range<PipelineStage>,
dependencies: Dependencies,
barriers: impl IntoIterator<Item = Barrier<'b, B>>
)
Insert pipeline barrier.
Safety
See: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdPipelineBarrier.html
pub unsafe fn push_constants<'b>(
&mut self,
layout: &B::PipelineLayout,
stages: ShaderStageFlags,
offset: u32,
constants: &[u32]
)
[src]
&mut self,
layout: &B::PipelineLayout,
stages: ShaderStageFlags,
offset: u32,
constants: &[u32]
)
Push graphics constants.
Safety
offset
must be multiple of 4.
constants.len() + offset
, must be less than or equal to the
maxPushConstantsSize
device limit.
See: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdPushConstants.html
pub unsafe fn set_scissors<'b>(
&mut self,
first_scissor: u32,
rects: impl IntoIterator<Item = &'b Rect>
) where
C: Supports<Graphics>,
[src]
&mut self,
first_scissor: u32,
rects: impl IntoIterator<Item = &'b Rect>
) where
C: Supports<Graphics>,
Set scissors
Safety
first_scissor + rects.count()
must be less than the
maxViewports
device limit.
See: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/vkCmdSetScissor.html
pub fn reborrow<K>(&mut self) -> EncoderCommon<B, K> where
C: Supports<K>,
[src]
C: Supports<K>,
Reborrow encoder.
Trait Implementations
impl<'a, B: Backend, C> Debug for EncoderCommon<'a, B, C> where
C: Debug,
[src]
C: Debug,
Auto Trait Implementations
impl<'a, B, C> Unpin for EncoderCommon<'a, B, C> where
C: Unpin,
C: Unpin,
impl<'a, B, C> Sync for EncoderCommon<'a, B, C> where
C: Sync,
<B as Backend>::CommandBuffer: Sync,
C: Sync,
<B as Backend>::CommandBuffer: Sync,
impl<'a, B, C> Send for EncoderCommon<'a, B, C> where
C: Send,
<B as Backend>::CommandBuffer: Send,
C: Send,
<B as Backend>::CommandBuffer: Send,
impl<'a, B, C> !UnwindSafe for EncoderCommon<'a, B, C>
impl<'a, B, C> RefUnwindSafe for EncoderCommon<'a, B, C> where
C: RefUnwindSafe,
<B as Backend>::CommandBuffer: RefUnwindSafe,
C: RefUnwindSafe,
<B as Backend>::CommandBuffer: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Supports<T> for T
[src]
impl<T> SetParameter for T
[src]
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
[src]
T: Parameter<Self>,
Sets value
as a parameter of self
.