pub struct RenderCommandEncoder(/* private fields */);Methods from Deref<Target = RenderCommandEncoderRef>§
pub fn set_render_pipeline_state(&self, pipeline_state: &RenderPipelineStateRef)
pub fn set_viewport(&self, viewport: MTLViewport)
pub fn set_viewports(&self, viewports: &[MTLViewport])
pub fn set_front_facing_winding(&self, winding: MTLWinding)
pub fn set_cull_mode(&self, mode: MTLCullMode)
pub fn set_depth_clip_mode(&self, mode: MTLDepthClipMode)
pub fn set_depth_bias(&self, bias: f32, scale: f32, clamp: f32)
pub fn set_scissor_rect(&self, rect: MTLScissorRect)
pub fn set_scissor_rects(&self, rects: &[MTLScissorRect])
pub fn set_triangle_fill_mode(&self, mode: MTLTriangleFillMode)
pub fn set_blend_color(&self, red: f32, green: f32, blue: f32, alpha: f32)
pub fn set_depth_stencil_state( &self, depth_stencil_state: &DepthStencilStateRef, )
pub fn set_stencil_reference_value(&self, value: u32)
pub fn set_stencil_front_back_reference_value(&self, front: u32, back: u32)
pub fn set_visibility_result_mode( &self, mode: MTLVisibilityResultMode, offset: NSUInteger, )
pub fn set_vertex_amplification_count( &self, count: NSUInteger, view_mappings: Option<&[VertexAmplificationViewMapping]>, )
pub fn set_vertex_bytes( &self, index: NSUInteger, length: NSUInteger, bytes: *const c_void, )
pub fn set_vertex_buffer( &self, index: NSUInteger, buffer: Option<&BufferRef>, offset: NSUInteger, )
pub fn set_vertex_buffer_offset(&self, index: NSUInteger, offset: NSUInteger)
pub fn set_vertex_buffers( &self, start_index: NSUInteger, data: &[Option<&BufferRef>], offsets: &[NSUInteger], )
pub fn set_vertex_texture( &self, index: NSUInteger, texture: Option<&TextureRef>, )
pub fn set_vertex_textures( &self, start_index: NSUInteger, data: &[Option<&TextureRef>], )
pub fn set_vertex_sampler_state( &self, index: NSUInteger, sampler: Option<&SamplerStateRef>, )
pub fn set_vertex_sampler_states( &self, start_index: NSUInteger, data: &[Option<&SamplerStateRef>], )
pub fn set_vertex_sampler_state_with_lod( &self, index: NSUInteger, sampler: Option<&SamplerStateRef>, lod_clamp: Range<f32>, )
Sourcepub fn set_vertex_acceleration_structure(
&self,
index: NSUInteger,
accel: Option<&AccelerationStructureRef>,
)
pub fn set_vertex_acceleration_structure( &self, index: NSUInteger, accel: Option<&AccelerationStructureRef>, )
Only available in (macos(12.0), ios(15.0))
Sourcepub fn set_vertex_intersection_function_table(
&self,
index: NSUInteger,
table: Option<&IntersectionFunctionTableRef>,
)
pub fn set_vertex_intersection_function_table( &self, index: NSUInteger, table: Option<&IntersectionFunctionTableRef>, )
Only available in (macos(12.0), ios(15.0))
pub fn set_vertex_visible_function_table( &self, buffer_index: NSUInteger, visible_function_table: Option<&VisibleFunctionTableRef>, )
pub fn set_vertex_visible_function_tables( &self, buffer_start_index: NSUInteger, visible_function_tables: &[&VisibleFunctionTableRef], )
Sourcepub fn set_object_buffer(
&self,
index: NSUInteger,
buffer: Option<&BufferRef>,
offset: NSUInteger,
)
pub fn set_object_buffer( &self, index: NSUInteger, buffer: Option<&BufferRef>, offset: NSUInteger, )
Only available in (macos(13.0), ios(16.0))
Sourcepub fn set_object_buffer_offset(&self, index: NSUInteger, offset: NSUInteger)
pub fn set_object_buffer_offset(&self, index: NSUInteger, offset: NSUInteger)
Only available in (macos(13.0), ios(16.0))
Sourcepub fn set_object_bytes(
&self,
index: NSUInteger,
length: NSUInteger,
bytes: *const c_void,
)
pub fn set_object_bytes( &self, index: NSUInteger, length: NSUInteger, bytes: *const c_void, )
Only available in (macos(13.0), ios(16.0))
Sourcepub fn set_object_sampler_state(
&self,
index: NSUInteger,
sampler: Option<&SamplerStateRef>,
)
pub fn set_object_sampler_state( &self, index: NSUInteger, sampler: Option<&SamplerStateRef>, )
Only available in (macos(13.0), ios(16.0))
Sourcepub fn set_object_sampler_state_with_lod(
&self,
index: NSUInteger,
sampler: Option<&SamplerStateRef>,
lod_clamp: Range<f32>,
)
pub fn set_object_sampler_state_with_lod( &self, index: NSUInteger, sampler: Option<&SamplerStateRef>, lod_clamp: Range<f32>, )
Only available in (macos(13.0), ios(16.0))
Sourcepub fn set_object_texture(
&self,
index: NSUInteger,
texture: Option<&TextureRef>,
)
pub fn set_object_texture( &self, index: NSUInteger, texture: Option<&TextureRef>, )
Only available in (macos(13.0), ios(16.0))
Sourcepub fn set_object_threadgroup_memory_length(
&self,
index: NSUInteger,
length: NSUInteger,
)
pub fn set_object_threadgroup_memory_length( &self, index: NSUInteger, length: NSUInteger, )
Only available in (macos(13.0), ios(16.0))
Sourcepub fn set_object_buffers(
&self,
start_index: NSUInteger,
data: &[Option<&BufferRef>],
offsets: &[NSUInteger],
)
pub fn set_object_buffers( &self, start_index: NSUInteger, data: &[Option<&BufferRef>], offsets: &[NSUInteger], )
Only available in (macos(13.0), ios(16.0))
Sourcepub fn set_object_sampler_states(
&self,
start_index: NSUInteger,
data: &[Option<&SamplerStateRef>],
)
pub fn set_object_sampler_states( &self, start_index: NSUInteger, data: &[Option<&SamplerStateRef>], )
Only available in (macos(13.0), ios(16.0))
Sourcepub fn set_object_textures(
&self,
start_index: NSUInteger,
data: &[Option<&TextureRef>],
)
pub fn set_object_textures( &self, start_index: NSUInteger, data: &[Option<&TextureRef>], )
Only available in (macos(13.0), ios(16.0))
Sourcepub fn set_mesh_buffer(
&self,
index: NSUInteger,
buffer: Option<&BufferRef>,
offset: NSUInteger,
)
pub fn set_mesh_buffer( &self, index: NSUInteger, buffer: Option<&BufferRef>, offset: NSUInteger, )
Only available in (macos(13.0), ios(16.0))
Sourcepub fn set_mesh_buffer_offset(&self, index: NSUInteger, offset: NSUInteger)
pub fn set_mesh_buffer_offset(&self, index: NSUInteger, offset: NSUInteger)
Only available in (macos(13.0), ios(16.0))
Sourcepub fn set_mesh_bytes(
&self,
index: NSUInteger,
length: NSUInteger,
bytes: *const c_void,
)
pub fn set_mesh_bytes( &self, index: NSUInteger, length: NSUInteger, bytes: *const c_void, )
Only available in (macos(13.0), ios(16.0))
Sourcepub fn set_mesh_sampler_state(
&self,
index: NSUInteger,
sampler: Option<&SamplerStateRef>,
)
pub fn set_mesh_sampler_state( &self, index: NSUInteger, sampler: Option<&SamplerStateRef>, )
Only available in (macos(13.0), ios(16.0))
Sourcepub fn set_mesh_sampler_state_with_lod(
&self,
index: NSUInteger,
sampler: Option<&SamplerStateRef>,
lod_clamp: Range<f32>,
)
pub fn set_mesh_sampler_state_with_lod( &self, index: NSUInteger, sampler: Option<&SamplerStateRef>, lod_clamp: Range<f32>, )
Only available in (macos(13.0), ios(16.0))
Sourcepub fn set_mesh_texture(&self, index: NSUInteger, texture: Option<&TextureRef>)
pub fn set_mesh_texture(&self, index: NSUInteger, texture: Option<&TextureRef>)
Only available in (macos(13.0), ios(16.0))
Sourcepub fn set_mesh_buffers(
&self,
start_index: NSUInteger,
data: &[Option<&BufferRef>],
offsets: &[NSUInteger],
)
pub fn set_mesh_buffers( &self, start_index: NSUInteger, data: &[Option<&BufferRef>], offsets: &[NSUInteger], )
Only available in (macos(13.0), ios(16.0))
Sourcepub fn set_mesh_sampler_states(
&self,
start_index: NSUInteger,
data: &[Option<&SamplerStateRef>],
)
pub fn set_mesh_sampler_states( &self, start_index: NSUInteger, data: &[Option<&SamplerStateRef>], )
Only available in (macos(13.0), ios(16.0))
Sourcepub fn set_mesh_textures(
&self,
start_index: NSUInteger,
data: &[Option<&TextureRef>],
)
pub fn set_mesh_textures( &self, start_index: NSUInteger, data: &[Option<&TextureRef>], )
Only available in (macos(13.0), ios(16.0))
pub fn set_fragment_bytes( &self, index: NSUInteger, length: NSUInteger, bytes: *const c_void, )
pub fn set_fragment_buffer( &self, index: NSUInteger, buffer: Option<&BufferRef>, offset: NSUInteger, )
pub fn set_fragment_buffer_offset(&self, index: NSUInteger, offset: NSUInteger)
pub fn set_fragment_buffers( &self, start_index: NSUInteger, data: &[Option<&BufferRef>], offsets: &[NSUInteger], )
pub fn set_fragment_texture( &self, index: NSUInteger, texture: Option<&TextureRef>, )
pub fn set_fragment_textures( &self, start_index: NSUInteger, data: &[Option<&TextureRef>], )
pub fn set_fragment_sampler_state( &self, index: NSUInteger, sampler: Option<&SamplerStateRef>, )
pub fn set_fragment_sampler_states( &self, start_index: NSUInteger, data: &[Option<&SamplerStateRef>], )
pub fn set_fragment_sampler_state_with_lod( &self, index: NSUInteger, sampler: Option<&SamplerStateRef>, lod_clamp: Range<f32>, )
Sourcepub fn set_fragment_acceleration_structure(
&self,
index: NSUInteger,
accel: Option<&AccelerationStructureRef>,
)
pub fn set_fragment_acceleration_structure( &self, index: NSUInteger, accel: Option<&AccelerationStructureRef>, )
Only available in (macos(12.0), ios(15.0))
Sourcepub fn set_fragment_intersection_function_table(
&self,
index: NSUInteger,
table: Option<&IntersectionFunctionTableRef>,
)
pub fn set_fragment_intersection_function_table( &self, index: NSUInteger, table: Option<&IntersectionFunctionTableRef>, )
Only available in (macos(12.0), ios(15.0))
pub fn set_fragment_visible_function_table( &self, buffer_index: NSUInteger, visible_function_table: Option<&VisibleFunctionTableRef>, )
pub fn set_fragment_visible_function_tables( &self, buffer_start_index: NSUInteger, visible_function_tables: &[&VisibleFunctionTableRef], )
pub fn draw_primitives( &self, primitive_type: MTLPrimitiveType, vertex_start: NSUInteger, vertex_count: NSUInteger, )
pub fn draw_primitives_instanced( &self, primitive_type: MTLPrimitiveType, vertex_start: NSUInteger, vertex_count: NSUInteger, instance_count: NSUInteger, )
pub fn draw_primitives_instanced_base_instance( &self, primitive_type: MTLPrimitiveType, vertex_start: NSUInteger, vertex_count: NSUInteger, instance_count: NSUInteger, base_instance: NSUInteger, )
pub fn draw_primitives_indirect( &self, primitive_type: MTLPrimitiveType, indirect_buffer: &BufferRef, indirect_buffer_offset: NSUInteger, )
pub fn draw_indexed_primitives( &self, primitive_type: MTLPrimitiveType, index_count: NSUInteger, index_type: MTLIndexType, index_buffer: &BufferRef, index_buffer_offset: NSUInteger, )
pub fn draw_indexed_primitives_instanced( &self, primitive_type: MTLPrimitiveType, index_count: NSUInteger, index_type: MTLIndexType, index_buffer: &BufferRef, index_buffer_offset: NSUInteger, instance_count: NSUInteger, )
pub fn draw_indexed_primitives_instanced_base_instance( &self, primitive_type: MTLPrimitiveType, index_count: NSUInteger, index_type: MTLIndexType, index_buffer: &BufferRef, index_buffer_offset: NSUInteger, instance_count: NSUInteger, base_vertex: NSInteger, base_instance: NSUInteger, )
pub fn draw_indexed_primitives_indirect( &self, primitive_type: MTLPrimitiveType, index_type: MTLIndexType, index_buffer: &BufferRef, index_buffer_offset: NSUInteger, indirect_buffer: &BufferRef, indirect_buffer_offset: NSUInteger, )
Sourcepub fn draw_mesh_threadgroups(
&self,
threadgroups_per_grid: MTLSize,
threads_per_object_threadgroup: MTLSize,
threads_per_mesh_threadgroup: MTLSize,
)
pub fn draw_mesh_threadgroups( &self, threadgroups_per_grid: MTLSize, threads_per_object_threadgroup: MTLSize, threads_per_mesh_threadgroup: MTLSize, )
Only available in (macos(13.0), ios(16.0))
Sourcepub fn draw_mesh_threadgroups_with_indirect_buffer(
&self,
indirect_buffer: &BufferRef,
indirect_buffer_offset: NSUInteger,
threads_per_object_threadgroup: MTLSize,
threads_per_mesh_threadgroup: MTLSize,
)
pub fn draw_mesh_threadgroups_with_indirect_buffer( &self, indirect_buffer: &BufferRef, indirect_buffer_offset: NSUInteger, threads_per_object_threadgroup: MTLSize, threads_per_mesh_threadgroup: MTLSize, )
Only available in (macos(13.0), ios(16.0))
Sourcepub fn draw_mesh_threads(
&self,
threads_per_grid: MTLSize,
threads_per_object_threadgroup: MTLSize,
threads_per_mesh_threadgroup: MTLSize,
)
pub fn draw_mesh_threads( &self, threads_per_grid: MTLSize, threads_per_object_threadgroup: MTLSize, threads_per_mesh_threadgroup: MTLSize, )
Only available in (macos(13.0), ios(16.0))
Sourcepub fn use_resource(&self, resource: &ResourceRef, usage: MTLResourceUsage)
👎Deprecated: Use use_resource_at instead
pub fn use_resource(&self, resource: &ResourceRef, usage: MTLResourceUsage)
Use use_resource_at instead
Adds an untracked resource to the render pass.
Availability: iOS 11.0+, macOS 10.13+
§Arguments
resource: A resource within an argument buffer.usage: Options for describing how a graphics function uses the resource.
Sourcepub fn use_resource_at(
&self,
resource: &ResourceRef,
usage: MTLResourceUsage,
stages: MTLRenderStages,
)
pub fn use_resource_at( &self, resource: &ResourceRef, usage: MTLResourceUsage, stages: MTLRenderStages, )
Adds an untracked resource to the render pass, specifying which render stages need it.
Availability: iOS 13.0+, macOS 10.15+
§Arguments
resource: A resource within an argument buffer.usage: Options for describing how a graphics function uses the resource.stages: The render stages where the resource must be resident.
See https://developer.apple.com/documentation/metal/mtlrendercommandencoder/3043404-useresource
Sourcepub fn use_resources(
&self,
resources: &[&ResourceRef],
usage: MTLResourceUsage,
stages: MTLRenderStages,
)
pub fn use_resources( &self, resources: &[&ResourceRef], usage: MTLResourceUsage, stages: MTLRenderStages, )
Adds an array of untracked resources to the render pass, specifying which stages need them.
When working with color render targets, call this method as late as possible to improve performance.
Availability: iOS 13.0+, macOS 10.15+
§Arguments
resources: A slice of resources within an argument buffer.usage: Options for describing how a graphics function uses the resources.stages: The render stages where the resources must be resident.
Sourcepub fn use_heap(&self, heap: &HeapRef)
👎Deprecated: Use use_heap_at instead
pub fn use_heap(&self, heap: &HeapRef)
Use use_heap_at instead
Adds the resources in a heap to the render pass.
Availability: iOS 11.0+, macOS 10.13+
§Arguments:
heap: A heap that contains resources within an argument buffer.
Sourcepub fn use_heap_at(&self, heap: &HeapRef, stages: MTLRenderStages)
pub fn use_heap_at(&self, heap: &HeapRef, stages: MTLRenderStages)
Adds the resources in a heap to the render pass, specifying which render stages need them.
Availability: iOS 13.0+, macOS 10.15+
§Arguments
heap: A heap that contains resources within an argument buffer.stages: The render stages where the resources must be resident.
Sourcepub fn use_heaps(&self, heaps: &[&HeapRef], stages: MTLRenderStages)
pub fn use_heaps(&self, heaps: &[&HeapRef], stages: MTLRenderStages)
Adds the resources in an array of heaps to the render pass, specifying which render stages need them.
Availability: iOS 13.0+, macOS 10.15+
§Arguments
heaps: A slice of heaps that contains resources within an argument buffer.stages: The render stages where the resources must be resident.
pub fn execute_commands_in_buffer( &self, buffer: &IndirectCommandBufferRef, with_range: NSRange, )
pub fn update_fence(&self, fence: &FenceRef, after_stages: MTLRenderStages)
pub fn wait_for_fence(&self, fence: &FenceRef, before_stages: MTLRenderStages)
Sourcepub fn sample_counters_in_buffer(
&self,
sample_buffer: &CounterSampleBufferRef,
sample_index: NSUInteger,
with_barrier: bool,
)
pub fn sample_counters_in_buffer( &self, sample_buffer: &CounterSampleBufferRef, sample_index: NSUInteger, with_barrier: bool, )
Methods from Deref<Target = CommandEncoderRef>§
pub fn label(&self) -> &str
pub fn set_label(&self, label: &str)
pub fn end_encoding(&self)
pub fn insert_debug_signpost(&self, name: &str)
pub fn push_debug_group(&self, name: &str)
pub fn pop_debug_group(&self)
Trait Implementations§
Source§impl AsMut<RenderCommandEncoderRef> for RenderCommandEncoder
impl AsMut<RenderCommandEncoderRef> for RenderCommandEncoder
Source§fn as_mut(&mut self) -> &mut RenderCommandEncoderRef
fn as_mut(&mut self) -> &mut RenderCommandEncoderRef
Source§impl AsRef<RenderCommandEncoderRef> for RenderCommandEncoder
impl AsRef<RenderCommandEncoderRef> for RenderCommandEncoder
Source§fn as_ref(&self) -> &RenderCommandEncoderRef
fn as_ref(&self) -> &RenderCommandEncoderRef
Source§impl Borrow<RenderCommandEncoderRef> for RenderCommandEncoder
impl Borrow<RenderCommandEncoderRef> for RenderCommandEncoder
Source§fn borrow(&self) -> &RenderCommandEncoderRef
fn borrow(&self) -> &RenderCommandEncoderRef
Source§impl BorrowMut<RenderCommandEncoderRef> for RenderCommandEncoder
impl BorrowMut<RenderCommandEncoderRef> for RenderCommandEncoder
Source§fn borrow_mut(&mut self) -> &mut RenderCommandEncoderRef
fn borrow_mut(&mut self) -> &mut RenderCommandEncoderRef
Source§impl Clone for RenderCommandEncoder
impl Clone for RenderCommandEncoder
Source§fn clone(&self) -> RenderCommandEncoder
fn clone(&self) -> RenderCommandEncoder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more