pub struct ParallelRenderCommandEncoder(/* private fields */);Expand description
A command encoder that creates multiple render command encoders that render in parallel.
C++ equivalent: MTL::ParallelRenderCommandEncoder
Parallel render encoders allow you to split rendering work across multiple render command encoders that can execute concurrently on the GPU.
Implementations§
Source§impl ParallelRenderCommandEncoder
impl ParallelRenderCommandEncoder
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create a ParallelRenderCommandEncoder from a raw pointer.
§Safety
The pointer must be a valid Metal parallel render command encoder object.
Sourcepub fn device(&self) -> Device
pub fn device(&self) -> Device
Get the device that created this encoder.
C++ equivalent: Device* device() const
Sourcepub fn command_buffer(&self) -> CommandBuffer
pub fn command_buffer(&self) -> CommandBuffer
Get the command buffer that this encoder is encoding into.
C++ equivalent: CommandBuffer* commandBuffer() const
Sourcepub fn label(&self) -> Option<String>
pub fn label(&self) -> Option<String>
Get the label for this encoder.
C++ equivalent: NS::String* label() const
Sourcepub fn set_label(&self, label: &str)
pub fn set_label(&self, label: &str)
Set the label for this encoder.
C++ equivalent: void setLabel(const NS::String*)
Sourcepub fn end_encoding(&self)
pub fn end_encoding(&self)
End encoding commands with this encoder.
C++ equivalent: void endEncoding()
Sourcepub fn insert_debug_signpost(&self, string: &str)
pub fn insert_debug_signpost(&self, string: &str)
Insert a debug signpost.
C++ equivalent: void insertDebugSignpost(const NS::String*)
Sourcepub fn push_debug_group(&self, string: &str)
pub fn push_debug_group(&self, string: &str)
Push a debug group.
C++ equivalent: void pushDebugGroup(const NS::String*)
Sourcepub fn pop_debug_group(&self)
pub fn pop_debug_group(&self)
Pop the current debug group.
C++ equivalent: void popDebugGroup()
Sourcepub fn barrier_after_queue_stages(
&self,
after_stages: Stages,
before_stages: Stages,
)
pub fn barrier_after_queue_stages( &self, after_stages: Stages, before_stages: Stages, )
Insert a barrier to synchronize queue stages.
C++ equivalent: void barrierAfterQueueStages(Stages, Stages)
Sourcepub fn render_command_encoder(&self) -> Option<RenderCommandEncoder>
pub fn render_command_encoder(&self) -> Option<RenderCommandEncoder>
Create a new render command encoder that renders in parallel.
C++ equivalent: RenderCommandEncoder* renderCommandEncoder()
Each call creates a new render encoder that shares the render pass with other encoders created from this parallel encoder.
Sourcepub fn set_color_store_action(
&self,
store_action: StoreAction,
color_attachment_index: UInteger,
)
pub fn set_color_store_action( &self, store_action: StoreAction, color_attachment_index: UInteger, )
Set the store action for a color attachment.
C++ equivalent: void setColorStoreAction(StoreAction, NS::UInteger)
Sourcepub fn set_color_store_action_options(
&self,
store_action_options: StoreActionOptions,
color_attachment_index: UInteger,
)
pub fn set_color_store_action_options( &self, store_action_options: StoreActionOptions, color_attachment_index: UInteger, )
Set the store action options for a color attachment.
C++ equivalent: void setColorStoreActionOptions(StoreActionOptions, NS::UInteger)
Sourcepub fn set_depth_store_action(&self, store_action: StoreAction)
pub fn set_depth_store_action(&self, store_action: StoreAction)
Set the store action for the depth attachment.
C++ equivalent: void setDepthStoreAction(StoreAction)
Sourcepub fn set_depth_store_action_options(
&self,
store_action_options: StoreActionOptions,
)
pub fn set_depth_store_action_options( &self, store_action_options: StoreActionOptions, )
Set the store action options for the depth attachment.
C++ equivalent: void setDepthStoreActionOptions(StoreActionOptions)
Sourcepub fn set_stencil_store_action(&self, store_action: StoreAction)
pub fn set_stencil_store_action(&self, store_action: StoreAction)
Set the store action for the stencil attachment.
C++ equivalent: void setStencilStoreAction(StoreAction)
Sourcepub fn set_stencil_store_action_options(
&self,
store_action_options: StoreActionOptions,
)
pub fn set_stencil_store_action_options( &self, store_action_options: StoreActionOptions, )
Set the store action options for the stencil attachment.
C++ equivalent: void setStencilStoreActionOptions(StoreActionOptions)