MTLRenderCommandEncoder

Trait MTLRenderCommandEncoder 

Source
pub unsafe trait MTLRenderCommandEncoder: MTLCommandEncoder {
Show 131 methods // Provided methods fn setRenderPipelineState( &self, pipeline_state: &ProtocolObject<dyn MTLRenderPipelineState>, ) where Self: Sized + Message { ... } unsafe fn setVertexBytes_length_atIndex( &self, bytes: NonNull<c_void>, length: NSUInteger, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setVertexBuffer_offset_atIndex( &self, buffer: Option<&ProtocolObject<dyn MTLBuffer>>, offset: NSUInteger, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setVertexBufferOffset_atIndex( &self, offset: NSUInteger, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setVertexBuffers_offsets_withRange( &self, buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>, offsets: NonNull<NSUInteger>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setVertexBuffer_offset_attributeStride_atIndex( &self, buffer: Option<&ProtocolObject<dyn MTLBuffer>>, offset: NSUInteger, stride: NSUInteger, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setVertexBuffers_offsets_attributeStrides_withRange( &self, buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>, offsets: NonNull<NSUInteger>, strides: NonNull<NSUInteger>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setVertexBufferOffset_attributeStride_atIndex( &self, offset: NSUInteger, stride: NSUInteger, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setVertexBytes_length_attributeStride_atIndex( &self, bytes: NonNull<c_void>, length: NSUInteger, stride: NSUInteger, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setVertexTexture_atIndex( &self, texture: Option<&ProtocolObject<dyn MTLTexture>>, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setVertexTextures_withRange( &self, textures: NonNull<*const ProtocolObject<dyn MTLTexture>>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setVertexSamplerState_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setVertexSamplerStates_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setVertexSamplerState_lodMinClamp_lodMaxClamp_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, lod_min_clamp: c_float, lod_max_clamp: c_float, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setVertexSamplerStates_lodMinClamps_lodMaxClamps_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, lod_min_clamps: NonNull<c_float>, lod_max_clamps: NonNull<c_float>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setVertexVisibleFunctionTable_atBufferIndex( &self, function_table: Option<&ProtocolObject<dyn MTLVisibleFunctionTable>>, buffer_index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setVertexVisibleFunctionTables_withBufferRange( &self, function_tables: NonNull<*const ProtocolObject<dyn MTLVisibleFunctionTable>>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setVertexIntersectionFunctionTable_atBufferIndex( &self, intersection_function_table: Option<&ProtocolObject<dyn MTLIntersectionFunctionTable>>, buffer_index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setVertexIntersectionFunctionTables_withBufferRange( &self, intersection_function_tables: NonNull<*const ProtocolObject<dyn MTLIntersectionFunctionTable>>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setVertexAccelerationStructure_atBufferIndex( &self, acceleration_structure: Option<&ProtocolObject<dyn MTLAccelerationStructure>>, buffer_index: NSUInteger, ) where Self: Sized + Message { ... } fn setViewport(&self, viewport: MTLViewport) where Self: Sized + Message { ... } unsafe fn setViewports_count( &self, viewports: NonNull<MTLViewport>, count: NSUInteger, ) where Self: Sized + Message { ... } fn setFrontFacingWinding(&self, front_facing_winding: MTLWinding) where Self: Sized + Message { ... } unsafe fn setVertexAmplificationCount_viewMappings( &self, count: NSUInteger, view_mappings: *const MTLVertexAmplificationViewMapping, ) where Self: Sized + Message { ... } fn setCullMode(&self, cull_mode: MTLCullMode) where Self: Sized + Message { ... } fn setDepthClipMode(&self, depth_clip_mode: MTLDepthClipMode) where Self: Sized + Message { ... } fn setDepthBias_slopeScale_clamp( &self, depth_bias: c_float, slope_scale: c_float, clamp: c_float, ) where Self: Sized + Message { ... } fn setDepthTestMinBound_maxBound( &self, min_bound: c_float, max_bound: c_float, ) where Self: Sized + Message { ... } fn setScissorRect(&self, rect: MTLScissorRect) where Self: Sized + Message { ... } unsafe fn setScissorRects_count( &self, scissor_rects: NonNull<MTLScissorRect>, count: NSUInteger, ) where Self: Sized + Message { ... } fn setTriangleFillMode(&self, fill_mode: MTLTriangleFillMode) where Self: Sized + Message { ... } unsafe fn setFragmentBytes_length_atIndex( &self, bytes: NonNull<c_void>, length: NSUInteger, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setFragmentBuffer_offset_atIndex( &self, buffer: Option<&ProtocolObject<dyn MTLBuffer>>, offset: NSUInteger, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setFragmentBufferOffset_atIndex( &self, offset: NSUInteger, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setFragmentBuffers_offsets_withRange( &self, buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>, offsets: NonNull<NSUInteger>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setFragmentTexture_atIndex( &self, texture: Option<&ProtocolObject<dyn MTLTexture>>, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setFragmentTextures_withRange( &self, textures: NonNull<*const ProtocolObject<dyn MTLTexture>>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setFragmentSamplerState_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setFragmentSamplerStates_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setFragmentSamplerState_lodMinClamp_lodMaxClamp_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, lod_min_clamp: c_float, lod_max_clamp: c_float, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setFragmentSamplerStates_lodMinClamps_lodMaxClamps_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, lod_min_clamps: NonNull<c_float>, lod_max_clamps: NonNull<c_float>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setFragmentVisibleFunctionTable_atBufferIndex( &self, function_table: Option<&ProtocolObject<dyn MTLVisibleFunctionTable>>, buffer_index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setFragmentVisibleFunctionTables_withBufferRange( &self, function_tables: NonNull<*const ProtocolObject<dyn MTLVisibleFunctionTable>>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setFragmentIntersectionFunctionTable_atBufferIndex( &self, intersection_function_table: Option<&ProtocolObject<dyn MTLIntersectionFunctionTable>>, buffer_index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setFragmentIntersectionFunctionTables_withBufferRange( &self, intersection_function_tables: NonNull<*const ProtocolObject<dyn MTLIntersectionFunctionTable>>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setFragmentAccelerationStructure_atBufferIndex( &self, acceleration_structure: Option<&ProtocolObject<dyn MTLAccelerationStructure>>, buffer_index: NSUInteger, ) where Self: Sized + Message { ... } fn setBlendColorRed_green_blue_alpha( &self, red: c_float, green: c_float, blue: c_float, alpha: c_float, ) where Self: Sized + Message { ... } fn setDepthStencilState( &self, depth_stencil_state: Option<&ProtocolObject<dyn MTLDepthStencilState>>, ) where Self: Sized + Message { ... } fn setStencilReferenceValue(&self, reference_value: u32) where Self: Sized + Message { ... } fn setStencilFrontReferenceValue_backReferenceValue( &self, front_reference_value: u32, back_reference_value: u32, ) where Self: Sized + Message { ... } fn setVisibilityResultMode_offset( &self, mode: MTLVisibilityResultMode, offset: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setColorStoreAction_atIndex( &self, store_action: MTLStoreAction, color_attachment_index: NSUInteger, ) where Self: Sized + Message { ... } fn setDepthStoreAction(&self, store_action: MTLStoreAction) where Self: Sized + Message { ... } fn setStencilStoreAction(&self, store_action: MTLStoreAction) where Self: Sized + Message { ... } unsafe fn setColorStoreActionOptions_atIndex( &self, store_action_options: MTLStoreActionOptions, color_attachment_index: NSUInteger, ) where Self: Sized + Message { ... } fn setDepthStoreActionOptions( &self, store_action_options: MTLStoreActionOptions, ) where Self: Sized + Message { ... } fn setStencilStoreActionOptions( &self, store_action_options: MTLStoreActionOptions, ) where Self: Sized + Message { ... } unsafe fn setObjectBytes_length_atIndex( &self, bytes: NonNull<c_void>, length: NSUInteger, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setObjectBuffer_offset_atIndex( &self, buffer: Option<&ProtocolObject<dyn MTLBuffer>>, offset: NSUInteger, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setObjectBufferOffset_atIndex( &self, offset: NSUInteger, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setObjectBuffers_offsets_withRange( &self, buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>, offsets: NonNull<NSUInteger>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setObjectTexture_atIndex( &self, texture: Option<&ProtocolObject<dyn MTLTexture>>, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setObjectTextures_withRange( &self, textures: NonNull<*const ProtocolObject<dyn MTLTexture>>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setObjectSamplerState_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setObjectSamplerStates_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setObjectSamplerState_lodMinClamp_lodMaxClamp_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, lod_min_clamp: c_float, lod_max_clamp: c_float, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setObjectSamplerStates_lodMinClamps_lodMaxClamps_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, lod_min_clamps: NonNull<c_float>, lod_max_clamps: NonNull<c_float>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setObjectThreadgroupMemoryLength_atIndex( &self, length: NSUInteger, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setMeshBytes_length_atIndex( &self, bytes: NonNull<c_void>, length: NSUInteger, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setMeshBuffer_offset_atIndex( &self, buffer: Option<&ProtocolObject<dyn MTLBuffer>>, offset: NSUInteger, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setMeshBufferOffset_atIndex( &self, offset: NSUInteger, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setMeshBuffers_offsets_withRange( &self, buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>, offsets: NonNull<NSUInteger>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setMeshTexture_atIndex( &self, texture: Option<&ProtocolObject<dyn MTLTexture>>, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setMeshTextures_withRange( &self, textures: NonNull<*const ProtocolObject<dyn MTLTexture>>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setMeshSamplerState_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setMeshSamplerStates_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setMeshSamplerState_lodMinClamp_lodMaxClamp_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, lod_min_clamp: c_float, lod_max_clamp: c_float, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setMeshSamplerStates_lodMinClamps_lodMaxClamps_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, lod_min_clamps: NonNull<c_float>, lod_max_clamps: NonNull<c_float>, range: NSRange, ) where Self: Sized + Message { ... } fn drawMeshThreadgroups_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup( &self, threadgroups_per_grid: MTLSize, threads_per_object_threadgroup: MTLSize, threads_per_mesh_threadgroup: MTLSize, ) where Self: Sized + Message { ... } fn drawMeshThreads_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup( &self, threads_per_grid: MTLSize, threads_per_object_threadgroup: MTLSize, threads_per_mesh_threadgroup: MTLSize, ) where Self: Sized + Message { ... } unsafe fn drawMeshThreadgroupsWithIndirectBuffer_indirectBufferOffset_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup( &self, indirect_buffer: &ProtocolObject<dyn MTLBuffer>, indirect_buffer_offset: NSUInteger, threads_per_object_threadgroup: MTLSize, threads_per_mesh_threadgroup: MTLSize, ) where Self: Sized + Message { ... } unsafe fn drawPrimitives_vertexStart_vertexCount_instanceCount( &self, primitive_type: MTLPrimitiveType, vertex_start: NSUInteger, vertex_count: NSUInteger, instance_count: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn drawPrimitives_vertexStart_vertexCount( &self, primitive_type: MTLPrimitiveType, vertex_start: NSUInteger, vertex_count: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset_instanceCount( &self, primitive_type: MTLPrimitiveType, index_count: NSUInteger, index_type: MTLIndexType, index_buffer: &ProtocolObject<dyn MTLBuffer>, index_buffer_offset: NSUInteger, instance_count: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset( &self, primitive_type: MTLPrimitiveType, index_count: NSUInteger, index_type: MTLIndexType, index_buffer: &ProtocolObject<dyn MTLBuffer>, index_buffer_offset: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn drawPrimitives_vertexStart_vertexCount_instanceCount_baseInstance( &self, primitive_type: MTLPrimitiveType, vertex_start: NSUInteger, vertex_count: NSUInteger, instance_count: NSUInteger, base_instance: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset_instanceCount_baseVertex_baseInstance( &self, primitive_type: MTLPrimitiveType, index_count: NSUInteger, index_type: MTLIndexType, index_buffer: &ProtocolObject<dyn MTLBuffer>, index_buffer_offset: NSUInteger, instance_count: NSUInteger, base_vertex: NSInteger, base_instance: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn drawPrimitives_indirectBuffer_indirectBufferOffset( &self, primitive_type: MTLPrimitiveType, indirect_buffer: &ProtocolObject<dyn MTLBuffer>, indirect_buffer_offset: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn drawIndexedPrimitives_indexType_indexBuffer_indexBufferOffset_indirectBuffer_indirectBufferOffset( &self, primitive_type: MTLPrimitiveType, index_type: MTLIndexType, index_buffer: &ProtocolObject<dyn MTLBuffer>, index_buffer_offset: NSUInteger, indirect_buffer: &ProtocolObject<dyn MTLBuffer>, indirect_buffer_offset: NSUInteger, ) where Self: Sized + Message { ... } fn textureBarrier(&self) where Self: Sized + Message { ... } fn updateFence_afterStages( &self, fence: &ProtocolObject<dyn MTLFence>, stages: MTLRenderStages, ) where Self: Sized + Message { ... } fn waitForFence_beforeStages( &self, fence: &ProtocolObject<dyn MTLFence>, stages: MTLRenderStages, ) where Self: Sized + Message { ... } unsafe fn setTessellationFactorBuffer_offset_instanceStride( &self, buffer: Option<&ProtocolObject<dyn MTLBuffer>>, offset: NSUInteger, instance_stride: NSUInteger, ) where Self: Sized + Message { ... } fn setTessellationFactorScale(&self, scale: c_float) where Self: Sized + Message { ... } unsafe fn drawPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_instanceCount_baseInstance( &self, number_of_patch_control_points: NSUInteger, patch_start: NSUInteger, patch_count: NSUInteger, patch_index_buffer: Option<&ProtocolObject<dyn MTLBuffer>>, patch_index_buffer_offset: NSUInteger, instance_count: NSUInteger, base_instance: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn drawPatches_patchIndexBuffer_patchIndexBufferOffset_indirectBuffer_indirectBufferOffset( &self, number_of_patch_control_points: NSUInteger, patch_index_buffer: Option<&ProtocolObject<dyn MTLBuffer>>, patch_index_buffer_offset: NSUInteger, indirect_buffer: &ProtocolObject<dyn MTLBuffer>, indirect_buffer_offset: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn drawIndexedPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_controlPointIndexBuffer_controlPointIndexBufferOffset_instanceCount_baseInstance( &self, number_of_patch_control_points: NSUInteger, patch_start: NSUInteger, patch_count: NSUInteger, patch_index_buffer: Option<&ProtocolObject<dyn MTLBuffer>>, patch_index_buffer_offset: NSUInteger, control_point_index_buffer: &ProtocolObject<dyn MTLBuffer>, control_point_index_buffer_offset: NSUInteger, instance_count: NSUInteger, base_instance: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn drawIndexedPatches_patchIndexBuffer_patchIndexBufferOffset_controlPointIndexBuffer_controlPointIndexBufferOffset_indirectBuffer_indirectBufferOffset( &self, number_of_patch_control_points: NSUInteger, patch_index_buffer: Option<&ProtocolObject<dyn MTLBuffer>>, patch_index_buffer_offset: NSUInteger, control_point_index_buffer: &ProtocolObject<dyn MTLBuffer>, control_point_index_buffer_offset: NSUInteger, indirect_buffer: &ProtocolObject<dyn MTLBuffer>, indirect_buffer_offset: NSUInteger, ) where Self: Sized + Message { ... } fn tileWidth(&self) -> NSUInteger where Self: Sized + Message { ... } fn tileHeight(&self) -> NSUInteger where Self: Sized + Message { ... } unsafe fn setTileBytes_length_atIndex( &self, bytes: NonNull<c_void>, length: NSUInteger, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setTileBuffer_offset_atIndex( &self, buffer: Option<&ProtocolObject<dyn MTLBuffer>>, offset: NSUInteger, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setTileBufferOffset_atIndex( &self, offset: NSUInteger, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setTileBuffers_offsets_withRange( &self, buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>, offsets: NonNull<NSUInteger>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setTileTexture_atIndex( &self, texture: Option<&ProtocolObject<dyn MTLTexture>>, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setTileTextures_withRange( &self, textures: NonNull<*const ProtocolObject<dyn MTLTexture>>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setTileSamplerState_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setTileSamplerStates_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setTileSamplerState_lodMinClamp_lodMaxClamp_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, lod_min_clamp: c_float, lod_max_clamp: c_float, index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setTileSamplerStates_lodMinClamps_lodMaxClamps_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, lod_min_clamps: NonNull<c_float>, lod_max_clamps: NonNull<c_float>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setTileVisibleFunctionTable_atBufferIndex( &self, function_table: Option<&ProtocolObject<dyn MTLVisibleFunctionTable>>, buffer_index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setTileVisibleFunctionTables_withBufferRange( &self, function_tables: NonNull<*const ProtocolObject<dyn MTLVisibleFunctionTable>>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setTileIntersectionFunctionTable_atBufferIndex( &self, intersection_function_table: Option<&ProtocolObject<dyn MTLIntersectionFunctionTable>>, buffer_index: NSUInteger, ) where Self: Sized + Message { ... } unsafe fn setTileIntersectionFunctionTables_withBufferRange( &self, intersection_function_tables: NonNull<*const ProtocolObject<dyn MTLIntersectionFunctionTable>>, range: NSRange, ) where Self: Sized + Message { ... } unsafe fn setTileAccelerationStructure_atBufferIndex( &self, acceleration_structure: Option<&ProtocolObject<dyn MTLAccelerationStructure>>, buffer_index: NSUInteger, ) where Self: Sized + Message { ... } fn dispatchThreadsPerTile(&self, threads_per_tile: MTLSize) where Self: Sized + Message { ... } unsafe fn setThreadgroupMemoryLength_offset_atIndex( &self, length: NSUInteger, offset: NSUInteger, index: NSUInteger, ) where Self: Sized + Message { ... } fn useResource_usage( &self, resource: &ProtocolObject<dyn MTLResource>, usage: MTLResourceUsage, ) where Self: Sized + Message { ... } unsafe fn useResources_count_usage( &self, resources: NonNull<NonNull<ProtocolObject<dyn MTLResource>>>, count: NSUInteger, usage: MTLResourceUsage, ) where Self: Sized + Message { ... } fn useResource_usage_stages( &self, resource: &ProtocolObject<dyn MTLResource>, usage: MTLResourceUsage, stages: MTLRenderStages, ) where Self: Sized + Message { ... } unsafe fn useResources_count_usage_stages( &self, resources: NonNull<NonNull<ProtocolObject<dyn MTLResource>>>, count: NSUInteger, usage: MTLResourceUsage, stages: MTLRenderStages, ) where Self: Sized + Message { ... } fn useHeap(&self, heap: &ProtocolObject<dyn MTLHeap>) where Self: Sized + Message { ... } unsafe fn useHeaps_count( &self, heaps: NonNull<NonNull<ProtocolObject<dyn MTLHeap>>>, count: NSUInteger, ) where Self: Sized + Message { ... } fn useHeap_stages( &self, heap: &ProtocolObject<dyn MTLHeap>, stages: MTLRenderStages, ) where Self: Sized + Message { ... } unsafe fn useHeaps_count_stages( &self, heaps: NonNull<NonNull<ProtocolObject<dyn MTLHeap>>>, count: NSUInteger, stages: MTLRenderStages, ) where Self: Sized + Message { ... } unsafe fn executeCommandsInBuffer_withRange( &self, indirect_command_buffer: &ProtocolObject<dyn MTLIndirectCommandBuffer>, execution_range: NSRange, ) where Self: Sized + Message { ... } unsafe fn executeCommandsInBuffer_indirectBuffer_indirectBufferOffset( &self, indirect_commandbuffer: &ProtocolObject<dyn MTLIndirectCommandBuffer>, indirect_range_buffer: &ProtocolObject<dyn MTLBuffer>, indirect_buffer_offset: NSUInteger, ) where Self: Sized + Message { ... } fn memoryBarrierWithScope_afterStages_beforeStages( &self, scope: MTLBarrierScope, after: MTLRenderStages, before: MTLRenderStages, ) where Self: Sized + Message { ... } unsafe fn memoryBarrierWithResources_count_afterStages_beforeStages( &self, resources: NonNull<NonNull<ProtocolObject<dyn MTLResource>>>, count: NSUInteger, after: MTLRenderStages, before: MTLRenderStages, ) where Self: Sized + Message { ... } unsafe fn sampleCountersInBuffer_atSampleIndex_withBarrier( &self, sample_buffer: &ProtocolObject<dyn MTLCounterSampleBuffer>, sample_index: NSUInteger, barrier: bool, ) where Self: Sized + Message { ... } fn setColorAttachmentMap( &self, mapping: Option<&MTLLogicalToPhysicalColorAttachmentMap>, ) where Self: Sized + Message { ... }
}
Available on crate features MTLCommandEncoder and MTLRenderCommandEncoder only.
Expand description

MTLRenderCommandEncoder is a container for graphics rendering state and the code to translate the state into a command format that the device can execute.

See also Apple’s documentation

Provided Methods§

Source

fn setRenderPipelineState( &self, pipeline_state: &ProtocolObject<dyn MTLRenderPipelineState>, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLRenderPipeline only.

Sets the current render pipeline state object.

Source

unsafe fn setVertexBytes_length_atIndex( &self, bytes: NonNull<c_void>, length: NSUInteger, index: NSUInteger, )
where Self: Sized + Message,

Set the data (by copy) for a given vertex buffer binding point. This will remove any existing MTLBuffer from the binding point.

§Safety
  • bytes must be a valid pointer.
  • index might not be bounds-checked.
Source

unsafe fn setVertexBuffer_offset_atIndex( &self, buffer: Option<&ProtocolObject<dyn MTLBuffer>>, offset: NSUInteger, index: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLBuffer and MTLResource only.

Set a global buffer for all vertex shaders at the given bind point index.

§Safety
  • buffer may need to be synchronized.
  • buffer may be unretained, you must ensure it is kept alive while in use.
  • buffer contents should be of the correct type.
  • offset might not be bounds-checked.
  • index might not be bounds-checked.
Source

unsafe fn setVertexBufferOffset_atIndex( &self, offset: NSUInteger, index: NSUInteger, )
where Self: Sized + Message,

Set the offset within the current global buffer for all vertex shaders at the given bind point index.

§Safety
  • offset might not be bounds-checked.
  • index might not be bounds-checked.
Source

unsafe fn setVertexBuffers_offsets_withRange( &self, buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>, offsets: NonNull<NSUInteger>, range: NSRange, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLBuffer and MTLResource only.

Set an array of global buffers for all vertex shaders with the given bind point range.

§Safety
  • buffers must be a valid pointer.
  • offsets might not be bounds-checked.
  • offsets must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setVertexBuffer_offset_attributeStride_atIndex( &self, buffer: Option<&ProtocolObject<dyn MTLBuffer>>, offset: NSUInteger, stride: NSUInteger, index: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLBuffer and MTLResource only.

sets vertex buffer at specified index with provided offset and stride. Only call this when the buffer-index is part of the vertexDescriptor and has set its stride to MTLBufferLayoutStrideDynamic

§Safety
  • buffer may need to be synchronized.
  • buffer may be unretained, you must ensure it is kept alive while in use.
  • buffer contents should be of the correct type.
  • offset might not be bounds-checked.
  • stride might not be bounds-checked.
  • index might not be bounds-checked.
Source

unsafe fn setVertexBuffers_offsets_attributeStrides_withRange( &self, buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>, offsets: NonNull<NSUInteger>, strides: NonNull<NSUInteger>, range: NSRange, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLBuffer and MTLResource only.

sets an array of vertex buffers with provided offsets and strides with the given bind point range. only call this when at least one buffer is part of the vertexDescriptor, other buffers must set their value relative to the attributeStrides array to MTLAttributeStrideStatic

§Safety
  • buffers must be a valid pointer.
  • offsets might not be bounds-checked.
  • offsets must be a valid pointer.
  • strides might not be bounds-checked.
  • strides must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setVertexBufferOffset_attributeStride_atIndex( &self, offset: NSUInteger, stride: NSUInteger, index: NSUInteger, )
where Self: Sized + Message,

only call this when the buffer-index is part of the vertexDescriptor and has set its stride to MTLBufferLayoutStrideDynamic

§Safety
  • offset might not be bounds-checked.
  • stride might not be bounds-checked.
  • index might not be bounds-checked.
Source

unsafe fn setVertexBytes_length_attributeStride_atIndex( &self, bytes: NonNull<c_void>, length: NSUInteger, stride: NSUInteger, index: NSUInteger, )
where Self: Sized + Message,

only call this when the buffer-index is part of the vertexDescriptor and has set its stride to MTLBufferLayoutStrideDynamic

§Safety
  • bytes must be a valid pointer.
  • stride might not be bounds-checked.
  • index might not be bounds-checked.
Source

unsafe fn setVertexTexture_atIndex( &self, texture: Option<&ProtocolObject<dyn MTLTexture>>, index: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLResource and MTLTexture only.

Set a global texture for all vertex shaders at the given bind point index.

§Safety
  • texture may need to be synchronized.
  • texture may be unretained, you must ensure it is kept alive while in use.
  • index might not be bounds-checked.
Source

unsafe fn setVertexTextures_withRange( &self, textures: NonNull<*const ProtocolObject<dyn MTLTexture>>, range: NSRange, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLResource and MTLTexture only.

Set an array of global textures for all vertex shaders with the given bind point range.

§Safety
  • textures must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setVertexSamplerState_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, index: NSUInteger, )
where Self: Sized + Message,

Available on crate feature MTLSampler only.

Set a global sampler for all vertex shaders at the given bind point index.

§Safety

index might not be bounds-checked.

Source

unsafe fn setVertexSamplerStates_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, range: NSRange, )
where Self: Sized + Message,

Available on crate feature MTLSampler only.

Set an array of global samplers for all vertex shaders with the given bind point range.

§Safety
  • samplers must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setVertexSamplerState_lodMinClamp_lodMaxClamp_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, lod_min_clamp: c_float, lod_max_clamp: c_float, index: NSUInteger, )
where Self: Sized + Message,

Available on crate feature MTLSampler only.

Set a global sampler for all vertex shaders at the given bind point index.

§Safety

index might not be bounds-checked.

Source

unsafe fn setVertexSamplerStates_lodMinClamps_lodMaxClamps_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, lod_min_clamps: NonNull<c_float>, lod_max_clamps: NonNull<c_float>, range: NSRange, )
where Self: Sized + Message,

Available on crate feature MTLSampler only.

Set an array of global samplers for all vertex shaders with the given bind point range.

§Safety
  • samplers must be a valid pointer.
  • lod_min_clamps must be a valid pointer.
  • lod_max_clamps must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setVertexVisibleFunctionTable_atBufferIndex( &self, function_table: Option<&ProtocolObject<dyn MTLVisibleFunctionTable>>, buffer_index: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLResource and MTLVisibleFunctionTable only.

Set a global visible function table for all vertex shaders at the given buffer bind point index.

§Safety
  • function_table may need to be synchronized.
  • function_table may be unretained, you must ensure it is kept alive while in use.
  • bufferIndex might not be bounds-checked.
Source

unsafe fn setVertexVisibleFunctionTables_withBufferRange( &self, function_tables: NonNull<*const ProtocolObject<dyn MTLVisibleFunctionTable>>, range: NSRange, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLResource and MTLVisibleFunctionTable only.

Set an array of global visible function tables for all vertex shaders with the given buffer bind point range.

§Safety
  • function_tables must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setVertexIntersectionFunctionTable_atBufferIndex( &self, intersection_function_table: Option<&ProtocolObject<dyn MTLIntersectionFunctionTable>>, buffer_index: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLIntersectionFunctionTable and MTLResource only.

Set a global intersection function table for all vertex shaders at the given buffer bind point index.

§Safety
  • intersection_function_table may need to be synchronized.
  • intersection_function_table may be unretained, you must ensure it is kept alive while in use.
  • bufferIndex might not be bounds-checked.
Source

unsafe fn setVertexIntersectionFunctionTables_withBufferRange( &self, intersection_function_tables: NonNull<*const ProtocolObject<dyn MTLIntersectionFunctionTable>>, range: NSRange, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLIntersectionFunctionTable and MTLResource only.

Set an array of global intersection function tables for all vertex shaders with the given buffer bind point range.

§Safety
  • intersection_function_tables must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setVertexAccelerationStructure_atBufferIndex( &self, acceleration_structure: Option<&ProtocolObject<dyn MTLAccelerationStructure>>, buffer_index: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAccelerationStructure and MTLAllocation and MTLResource only.

Set a global acceleration structure for all vertex shaders at the given buffer bind point index.

§Safety
  • acceleration_structure may need to be synchronized.
  • acceleration_structure may be unretained, you must ensure it is kept alive while in use.
  • bufferIndex might not be bounds-checked.
Source

fn setViewport(&self, viewport: MTLViewport)
where Self: Sized + Message,

Set the viewport, which is used to transform vertexes from normalized device coordinates to window coordinates. Fragments that lie outside of the viewport are clipped, and optionally clamped for fragments outside of znear/zfar.

Source

unsafe fn setViewports_count( &self, viewports: NonNull<MTLViewport>, count: NSUInteger, )
where Self: Sized + Message,

Specifies an array of viewports, which are used to transform vertices from normalized device coordinates to window coordinates based on [[ viewport_array_index ]] value specified in the vertex shader.

§Safety
  • viewports must be a valid pointer.
  • count might not be bounds-checked.
Source

fn setFrontFacingWinding(&self, front_facing_winding: MTLWinding)
where Self: Sized + Message,

The winding order of front-facing primitives.

Source

unsafe fn setVertexAmplificationCount_viewMappings( &self, count: NSUInteger, view_mappings: *const MTLVertexAmplificationViewMapping, )
where Self: Sized + Message,

Specifies the vertex amplification count and associated view mappings for each amplification ID.

Parameter count: the amplification count. The maximum value is currently 2.

Parameter viewMappings: an array of mapping elements.

Each mapping element describes how to route the corresponding amplification ID to a specific viewport and render target array index by using offsets from the base array index provided by the [[render_target_array_index]] and/or [[viewport_array_index]] output attributes in the vertex shader. This allows a modicum of programmability for each amplified vertex to be routed to a different [[render_target_array_index]] and [[viewport_array_index]] even though these attribytes cannot be amplified themselves.

§Safety
  • count might not be bounds-checked.
  • view_mappings must be a valid pointer or null.
Source

fn setCullMode(&self, cull_mode: MTLCullMode)
where Self: Sized + Message,

Controls if primitives are culled when front facing, back facing, or not culled at all.

Source

fn setDepthClipMode(&self, depth_clip_mode: MTLDepthClipMode)
where Self: Sized + Message,

Controls what is done with fragments outside of the near or far planes.

Source

fn setDepthBias_slopeScale_clamp( &self, depth_bias: c_float, slope_scale: c_float, clamp: c_float, )
where Self: Sized + Message,

Depth Bias.

Source

fn setDepthTestMinBound_maxBound(&self, min_bound: c_float, max_bound: c_float)
where Self: Sized + Message,

Configures the minimum and maximum bounds for depth bounds testing.

The render command encoder disables depth bounds testing by default. The render command encoder also disables depth bounds testing when all of the following properties equal a specific value:

  • The minBound property is equal to 0.0f.
  • The maxBound property is equal to 1.0f. Both minBound and maxBound need to be within [0.0f, 1.0f], and minBound needs to be less than or equal to maxBound.
  • Parameters:
  • minBound: A minimum bound for depth testing, which discards fragments with a stored depth that is less than minBound.
  • maxBound: A maximum bound for depth testing, which discards fragments with a stored depth that is greater than maxBound.
Source

fn setScissorRect(&self, rect: MTLScissorRect)
where Self: Sized + Message,

Specifies a rectangle for a fragment scissor test. All fragments outside of this rectangle are discarded.

Source

unsafe fn setScissorRects_count( &self, scissor_rects: NonNull<MTLScissorRect>, count: NSUInteger, )
where Self: Sized + Message,

Specifies an array of rectangles for a fragment scissor test. The specific rectangle used is based on the [[ viewport_array_index ]] value output by the vertex shader. Fragments that lie outside the scissor rectangle are discarded.

§Safety
  • scissor_rects must be a valid pointer.
  • count might not be bounds-checked.
Source

fn setTriangleFillMode(&self, fill_mode: MTLTriangleFillMode)
where Self: Sized + Message,

Set how to rasterize triangle and triangle strip primitives.

Source

unsafe fn setFragmentBytes_length_atIndex( &self, bytes: NonNull<c_void>, length: NSUInteger, index: NSUInteger, )
where Self: Sized + Message,

Set the data (by copy) for a given fragment buffer binding point. This will remove any existing MTLBuffer from the binding point.

§Safety
  • bytes must be a valid pointer.
  • index might not be bounds-checked.
Source

unsafe fn setFragmentBuffer_offset_atIndex( &self, buffer: Option<&ProtocolObject<dyn MTLBuffer>>, offset: NSUInteger, index: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLBuffer and MTLResource only.

Set a global buffer for all fragment shaders at the given bind point index.

§Safety
  • buffer may need to be synchronized.
  • buffer may be unretained, you must ensure it is kept alive while in use.
  • buffer contents should be of the correct type.
  • offset might not be bounds-checked.
  • index might not be bounds-checked.
Source

unsafe fn setFragmentBufferOffset_atIndex( &self, offset: NSUInteger, index: NSUInteger, )
where Self: Sized + Message,

Set the offset within the current global buffer for all fragment shaders at the given bind point index.

§Safety
  • offset might not be bounds-checked.
  • index might not be bounds-checked.
Source

unsafe fn setFragmentBuffers_offsets_withRange( &self, buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>, offsets: NonNull<NSUInteger>, range: NSRange, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLBuffer and MTLResource only.

Set an array of global buffers for all fragment shaders with the given bind point range.

§Safety
  • buffers must be a valid pointer.
  • offsets might not be bounds-checked.
  • offsets must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setFragmentTexture_atIndex( &self, texture: Option<&ProtocolObject<dyn MTLTexture>>, index: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLResource and MTLTexture only.

Set a global texture for all fragment shaders at the given bind point index.

§Safety
  • texture may need to be synchronized.
  • texture may be unretained, you must ensure it is kept alive while in use.
  • index might not be bounds-checked.
Source

unsafe fn setFragmentTextures_withRange( &self, textures: NonNull<*const ProtocolObject<dyn MTLTexture>>, range: NSRange, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLResource and MTLTexture only.

Set an array of global textures for all fragment shaders with the given bind point range.

§Safety
  • textures must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setFragmentSamplerState_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, index: NSUInteger, )
where Self: Sized + Message,

Available on crate feature MTLSampler only.

Set a global sampler for all fragment shaders at the given bind point index.

§Safety

index might not be bounds-checked.

Source

unsafe fn setFragmentSamplerStates_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, range: NSRange, )
where Self: Sized + Message,

Available on crate feature MTLSampler only.

Set an array of global samplers for all fragment shaders with the given bind point range.

§Safety
  • samplers must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setFragmentSamplerState_lodMinClamp_lodMaxClamp_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, lod_min_clamp: c_float, lod_max_clamp: c_float, index: NSUInteger, )
where Self: Sized + Message,

Available on crate feature MTLSampler only.

Set a global sampler for all fragment shaders at the given bind point index.

§Safety

index might not be bounds-checked.

Source

unsafe fn setFragmentSamplerStates_lodMinClamps_lodMaxClamps_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, lod_min_clamps: NonNull<c_float>, lod_max_clamps: NonNull<c_float>, range: NSRange, )
where Self: Sized + Message,

Available on crate feature MTLSampler only.

Set an array of global samplers for all fragment shaders with the given bind point range.

§Safety
  • samplers must be a valid pointer.
  • lod_min_clamps must be a valid pointer.
  • lod_max_clamps must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setFragmentVisibleFunctionTable_atBufferIndex( &self, function_table: Option<&ProtocolObject<dyn MTLVisibleFunctionTable>>, buffer_index: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLResource and MTLVisibleFunctionTable only.

Set a global visible function table for all fragment shaders at the given buffer bind point index.

§Safety
  • function_table may need to be synchronized.
  • function_table may be unretained, you must ensure it is kept alive while in use.
  • bufferIndex might not be bounds-checked.
Source

unsafe fn setFragmentVisibleFunctionTables_withBufferRange( &self, function_tables: NonNull<*const ProtocolObject<dyn MTLVisibleFunctionTable>>, range: NSRange, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLResource and MTLVisibleFunctionTable only.

Set an array of global visible function tables for all fragment shaders with the given buffer bind point range.

§Safety
  • function_tables must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setFragmentIntersectionFunctionTable_atBufferIndex( &self, intersection_function_table: Option<&ProtocolObject<dyn MTLIntersectionFunctionTable>>, buffer_index: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLIntersectionFunctionTable and MTLResource only.

Set a global intersection function table for all fragment shaders at the given buffer bind point index.

§Safety
  • intersection_function_table may need to be synchronized.
  • intersection_function_table may be unretained, you must ensure it is kept alive while in use.
  • bufferIndex might not be bounds-checked.
Source

unsafe fn setFragmentIntersectionFunctionTables_withBufferRange( &self, intersection_function_tables: NonNull<*const ProtocolObject<dyn MTLIntersectionFunctionTable>>, range: NSRange, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLIntersectionFunctionTable and MTLResource only.

Set an array of global intersection function tables for all fragment shaders with the given buffer bind point range.

§Safety
  • intersection_function_tables must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setFragmentAccelerationStructure_atBufferIndex( &self, acceleration_structure: Option<&ProtocolObject<dyn MTLAccelerationStructure>>, buffer_index: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAccelerationStructure and MTLAllocation and MTLResource only.

Set a global acceleration structure for all fragment shaders at the given buffer bind point index.

§Safety
  • acceleration_structure may need to be synchronized.
  • acceleration_structure may be unretained, you must ensure it is kept alive while in use.
  • bufferIndex might not be bounds-checked.
Source

fn setBlendColorRed_green_blue_alpha( &self, red: c_float, green: c_float, blue: c_float, alpha: c_float, )
where Self: Sized + Message,

Set the constant blend color used across all blending on all render targets

Source

fn setDepthStencilState( &self, depth_stencil_state: Option<&ProtocolObject<dyn MTLDepthStencilState>>, )
where Self: Sized + Message,

Available on crate feature MTLDepthStencil only.

Set the DepthStencil state object.

Source

fn setStencilReferenceValue(&self, reference_value: u32)
where Self: Sized + Message,

Set the stencil reference value for both the back and front stencil buffers.

Source

fn setStencilFrontReferenceValue_backReferenceValue( &self, front_reference_value: u32, back_reference_value: u32, )
where Self: Sized + Message,

Set the stencil reference value for the back and front stencil buffers independently.

Source

fn setVisibilityResultMode_offset( &self, mode: MTLVisibilityResultMode, offset: NSUInteger, )
where Self: Sized + Message,

Monitor if samples pass the depth and stencil tests.

Parameter mode: Controls if the counter is disabled or moniters passing samples.

Parameter offset: The offset relative to the occlusion query buffer provided when the command encoder was created. offset must be a multiple of 8.

Source

unsafe fn setColorStoreAction_atIndex( &self, store_action: MTLStoreAction, color_attachment_index: NSUInteger, )
where Self: Sized + Message,

Available on crate feature MTLRenderPass only.

If the the store action for a given color attachment was set to MTLStoreActionUnknown when the render command encoder was created, setColorStoreAction:atIndex: must be used to finalize the store action before endEncoding is called.

Parameter storeAction: The desired store action for the given color attachment. This may be set to any value other than MTLStoreActionUnknown.

Parameter colorAttachmentIndex: The index of the color attachment

§Safety

colorAttachmentIndex might not be bounds-checked.

Source

fn setDepthStoreAction(&self, store_action: MTLStoreAction)
where Self: Sized + Message,

Available on crate feature MTLRenderPass only.

If the the store action for the depth attachment was set to MTLStoreActionUnknown when the render command encoder was created, setDepthStoreAction: must be used to finalize the store action before endEncoding is called.

Source

fn setStencilStoreAction(&self, store_action: MTLStoreAction)
where Self: Sized + Message,

Available on crate feature MTLRenderPass only.

If the the store action for the stencil attachment was set to MTLStoreActionUnknown when the render command encoder was created, setStencilStoreAction: must be used to finalize the store action before endEncoding is called.

Source

unsafe fn setColorStoreActionOptions_atIndex( &self, store_action_options: MTLStoreActionOptions, color_attachment_index: NSUInteger, )
where Self: Sized + Message,

Available on crate feature MTLRenderPass only.

If the the store action for a given color attachment was set to MTLStoreActionUnknown when the render command encoder was created, setColorStoreActionOptions:atIndex: may be used to finalize the store action options before endEncoding is called.

Parameter storeActionOptions: The desired store action options for the given color attachment.

Parameter colorAttachmentIndex: The index of the color attachment

§Safety

colorAttachmentIndex might not be bounds-checked.

Source

fn setDepthStoreActionOptions( &self, store_action_options: MTLStoreActionOptions, )
where Self: Sized + Message,

Available on crate feature MTLRenderPass only.

If the the store action for the depth attachment was set to MTLStoreActionUnknown when the render command encoder was created, setDepthStoreActionOptions: may be used to finalize the store action options before endEncoding is called.

Source

fn setStencilStoreActionOptions( &self, store_action_options: MTLStoreActionOptions, )
where Self: Sized + Message,

Available on crate feature MTLRenderPass only.

If the the store action for the stencil attachment was set to MTLStoreActionUnknown when the render command encoder was created, setStencilStoreActionOptions: may be used to finalize the store action options before endEncoding is called.

Source

unsafe fn setObjectBytes_length_atIndex( &self, bytes: NonNull<c_void>, length: NSUInteger, index: NSUInteger, )
where Self: Sized + Message,

Set the data (by copy) for a given object shader buffer binding point. This will remove any existing MTLBuffer from the binding point.

§Safety
  • bytes must be a valid pointer.
  • index might not be bounds-checked.
Source

unsafe fn setObjectBuffer_offset_atIndex( &self, buffer: Option<&ProtocolObject<dyn MTLBuffer>>, offset: NSUInteger, index: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLBuffer and MTLResource only.

Set a global buffer for all object shaders at the given bind point index.

§Safety
  • buffer may need to be synchronized.
  • buffer may be unretained, you must ensure it is kept alive while in use.
  • buffer contents should be of the correct type.
  • offset might not be bounds-checked.
  • index might not be bounds-checked.
Source

unsafe fn setObjectBufferOffset_atIndex( &self, offset: NSUInteger, index: NSUInteger, )
where Self: Sized + Message,

Set the offset within the current global buffer for all object shaders at the given bind point index.

§Safety
  • offset might not be bounds-checked.
  • index might not be bounds-checked.
Source

unsafe fn setObjectBuffers_offsets_withRange( &self, buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>, offsets: NonNull<NSUInteger>, range: NSRange, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLBuffer and MTLResource only.

Set an array of global buffers for all object shaders with the given bind point range.

§Safety
  • buffers must be a valid pointer.
  • offsets might not be bounds-checked.
  • offsets must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setObjectTexture_atIndex( &self, texture: Option<&ProtocolObject<dyn MTLTexture>>, index: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLResource and MTLTexture only.

Set a global texture for all object shaders at the given bind point index.

§Safety
  • texture may need to be synchronized.
  • texture may be unretained, you must ensure it is kept alive while in use.
  • index might not be bounds-checked.
Source

unsafe fn setObjectTextures_withRange( &self, textures: NonNull<*const ProtocolObject<dyn MTLTexture>>, range: NSRange, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLResource and MTLTexture only.

Set an array of global textures for all object shaders with the given bind point range.

§Safety
  • textures must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setObjectSamplerState_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, index: NSUInteger, )
where Self: Sized + Message,

Available on crate feature MTLSampler only.

Set a global sampler for all object shaders at the given bind point index.

§Safety

index might not be bounds-checked.

Source

unsafe fn setObjectSamplerStates_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, range: NSRange, )
where Self: Sized + Message,

Available on crate feature MTLSampler only.

Set an array of global samplers for all object shaders with the given bind point range.

§Safety
  • samplers must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setObjectSamplerState_lodMinClamp_lodMaxClamp_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, lod_min_clamp: c_float, lod_max_clamp: c_float, index: NSUInteger, )
where Self: Sized + Message,

Available on crate feature MTLSampler only.

Set a global sampler for all object shaders at the given bind point index.

§Safety

index might not be bounds-checked.

Source

unsafe fn setObjectSamplerStates_lodMinClamps_lodMaxClamps_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, lod_min_clamps: NonNull<c_float>, lod_max_clamps: NonNull<c_float>, range: NSRange, )
where Self: Sized + Message,

Available on crate feature MTLSampler only.

Set an array of global samplers for all object shaders with the given bind point range.

§Safety
  • samplers must be a valid pointer.
  • lod_min_clamps must be a valid pointer.
  • lod_max_clamps must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setObjectThreadgroupMemoryLength_atIndex( &self, length: NSUInteger, index: NSUInteger, )
where Self: Sized + Message,

Set the threadgroup memory byte length at the binding point specified by the index for all object shaders.

§Safety

index might not be bounds-checked.

Source

unsafe fn setMeshBytes_length_atIndex( &self, bytes: NonNull<c_void>, length: NSUInteger, index: NSUInteger, )
where Self: Sized + Message,

Set the data (by copy) for a given mesh shader buffer binding point. This will remove any existing MTLBuffer from the binding point.

§Safety
  • bytes must be a valid pointer.
  • index might not be bounds-checked.
Source

unsafe fn setMeshBuffer_offset_atIndex( &self, buffer: Option<&ProtocolObject<dyn MTLBuffer>>, offset: NSUInteger, index: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLBuffer and MTLResource only.

Set a global buffer for all mesh shaders at the given bind point index.

§Safety
  • buffer may need to be synchronized.
  • buffer may be unretained, you must ensure it is kept alive while in use.
  • buffer contents should be of the correct type.
  • offset might not be bounds-checked.
  • index might not be bounds-checked.
Source

unsafe fn setMeshBufferOffset_atIndex( &self, offset: NSUInteger, index: NSUInteger, )
where Self: Sized + Message,

Set the offset within the current global buffer for all mesh shaders at the given bind point index.

§Safety
  • offset might not be bounds-checked.
  • index might not be bounds-checked.
Source

unsafe fn setMeshBuffers_offsets_withRange( &self, buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>, offsets: NonNull<NSUInteger>, range: NSRange, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLBuffer and MTLResource only.

Set an array of global buffers for all mesh shaders with the given bind point range.

§Safety
  • buffers must be a valid pointer.
  • offsets might not be bounds-checked.
  • offsets must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setMeshTexture_atIndex( &self, texture: Option<&ProtocolObject<dyn MTLTexture>>, index: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLResource and MTLTexture only.

Set a global texture for all mesh shaders at the given bind point index.

§Safety
  • texture may need to be synchronized.
  • texture may be unretained, you must ensure it is kept alive while in use.
  • index might not be bounds-checked.
Source

unsafe fn setMeshTextures_withRange( &self, textures: NonNull<*const ProtocolObject<dyn MTLTexture>>, range: NSRange, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLResource and MTLTexture only.

Set an array of global textures for all mesh shaders with the given bind point range.

§Safety
  • textures must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setMeshSamplerState_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, index: NSUInteger, )
where Self: Sized + Message,

Available on crate feature MTLSampler only.

Set a global sampler for all mesh shaders at the given bind point index.

§Safety

index might not be bounds-checked.

Source

unsafe fn setMeshSamplerStates_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, range: NSRange, )
where Self: Sized + Message,

Available on crate feature MTLSampler only.

Set an array of global samplers for all mesh shaders with the given bind point range.

§Safety
  • samplers must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setMeshSamplerState_lodMinClamp_lodMaxClamp_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, lod_min_clamp: c_float, lod_max_clamp: c_float, index: NSUInteger, )
where Self: Sized + Message,

Available on crate feature MTLSampler only.

Set a global sampler for all mesh shaders at the given bind point index.

§Safety

index might not be bounds-checked.

Source

unsafe fn setMeshSamplerStates_lodMinClamps_lodMaxClamps_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, lod_min_clamps: NonNull<c_float>, lod_max_clamps: NonNull<c_float>, range: NSRange, )
where Self: Sized + Message,

Available on crate feature MTLSampler only.

Set an array of global samplers for all mesh shaders with the given bind point range.

§Safety
  • samplers must be a valid pointer.
  • lod_min_clamps must be a valid pointer.
  • lod_max_clamps must be a valid pointer.
  • range might not be bounds-checked.
Source

fn drawMeshThreadgroups_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup( &self, threadgroups_per_grid: MTLSize, threads_per_object_threadgroup: MTLSize, threads_per_mesh_threadgroup: MTLSize, )
where Self: Sized + Message,

Available on crate feature MTLTypes only.

Enqueue a grid of object (if present) or mesh shader threadgroups.

The dimensions of the threadgroups and the grid are specified directly.

Parameter threadgroupsPerGrid: The number of threadgroups in the object (if present) or mesh shader grid.

Parameter threadsPerObjectThreadgroup: The number of threads in one object shader threadgroup. Ignored if object shader is not present.

Parameter threadsPerMeshThreadgroup: The number of threads in one mesh shader threadgroup.

Source

fn drawMeshThreads_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup( &self, threads_per_grid: MTLSize, threads_per_object_threadgroup: MTLSize, threads_per_mesh_threadgroup: MTLSize, )
where Self: Sized + Message,

Available on crate feature MTLTypes only.

Enqueue a grid of object (if present) of mesh shader threadgroups.

The dimensions of the threadgroups and the grid are specified directly. The dimensions of threadsPerGrid does not have to be a multiple of threadsPerThreadgroup for object shaders. For mesh shaders, threadsPerGrid is rounded down to the neareset multiple of threadsPerMeshThreadgroup (in each dimension).

Parameter threadsPerGrid: The number of threads in the object (if present) or mesh shader grid

Parameter threadsPerObjectThreadgroup: The number of threads in one object shader threadgroup. Ignored if object shader is not present.

Parameter threadsPerMeshThreadgroup: The number of threads in one mesh shader threadgroup.

Source

unsafe fn drawMeshThreadgroupsWithIndirectBuffer_indirectBufferOffset_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup( &self, indirect_buffer: &ProtocolObject<dyn MTLBuffer>, indirect_buffer_offset: NSUInteger, threads_per_object_threadgroup: MTLSize, threads_per_mesh_threadgroup: MTLSize, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLBuffer and MTLResource and MTLTypes only.

Enqueue a grid of object (if present) or mesh shader threadgroups.

The dimensions of the threadgroups are specified directly, the dimensions of the grid, in threadgroups, are read from a buffer by the GPU.

Parameter indirectBuffer: A buffer object that the device will read the grid size from, see MTLDispatchThreadgroupsIndirectArguments.

Parameter indirectBufferOffset: Byte offset within _indirectBuffer_to read arguments from. _indirectBufferOffset_must be a multiple of 4.

Parameter threadsPerObjectThreadgroup: The number of threads in one object shader threadgroup. Ignored if object shader is not present.

Parameter threadsPerMeshThreadgroup: The number of threads in one mesh shader threadgroup.

§Safety
  • indirect_buffer may need to be synchronized.
  • indirect_buffer may be unretained, you must ensure it is kept alive while in use.
  • indirect_buffer contents should be of the correct type.
  • indirectBufferOffset might not be bounds-checked.
Source

unsafe fn drawPrimitives_vertexStart_vertexCount_instanceCount( &self, primitive_type: MTLPrimitiveType, vertex_start: NSUInteger, vertex_count: NSUInteger, instance_count: NSUInteger, )
where Self: Sized + Message,

Draw primitives without an index list.

Parameter primitiveType: The type of primitives that elements are assembled into.

Parameter vertexStart: For each instance, the first index to draw

Parameter vertexCount: For each instance, the number of indexes to draw

Parameter instanceCount: The number of instances drawn.

§Safety
  • vertexCount might not be bounds-checked.
  • instanceCount might not be bounds-checked.
Source

unsafe fn drawPrimitives_vertexStart_vertexCount( &self, primitive_type: MTLPrimitiveType, vertex_start: NSUInteger, vertex_count: NSUInteger, )
where Self: Sized + Message,

Draw primitives without an index list.

Parameter primitiveType: The type of primitives that elements are assembled into.

Parameter vertexStart: For each instance, the first index to draw

Parameter vertexCount: For each instance, the number of indexes to draw

§Safety

vertexCount might not be bounds-checked.

Source

unsafe fn drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset_instanceCount( &self, primitive_type: MTLPrimitiveType, index_count: NSUInteger, index_type: MTLIndexType, index_buffer: &ProtocolObject<dyn MTLBuffer>, index_buffer_offset: NSUInteger, instance_count: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLArgument and MTLBuffer and MTLResource only.

Draw primitives with an index list.

Parameter primitiveType: The type of primitives that elements are assembled into.

Parameter indexCount: The number of indexes to read from the index buffer for each instance.

Parameter indexType: The type if indexes, either 16 bit integer or 32 bit integer.

Parameter indexBuffer: A buffer object that the device will read indexes from.

Parameter indexBufferOffset: Byte offset within _indexBuffer_to start reading indexes from. _indexBufferOffset_must be a multiple of the index size.

Parameter instanceCount: The number of instances drawn.

§Safety
  • indexCount might not be bounds-checked.
  • index_buffer may need to be synchronized.
  • index_buffer may be unretained, you must ensure it is kept alive while in use.
  • index_buffer contents should be of the correct type.
  • indexBufferOffset might not be bounds-checked.
  • instanceCount might not be bounds-checked.
Source

unsafe fn drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset( &self, primitive_type: MTLPrimitiveType, index_count: NSUInteger, index_type: MTLIndexType, index_buffer: &ProtocolObject<dyn MTLBuffer>, index_buffer_offset: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLArgument and MTLBuffer and MTLResource only.

Draw primitives with an index list.

Parameter primitiveType: The type of primitives that elements are assembled into.

Parameter indexCount: The number of indexes to read from the index buffer for each instance.

Parameter indexType: The type if indexes, either 16 bit integer or 32 bit integer.

Parameter indexBuffer: A buffer object that the device will read indexes from.

Parameter indexBufferOffset: Byte offset within _indexBuffer_to start reading indexes from. _indexBufferOffset_must be a multiple of the index size.

§Safety
  • indexCount might not be bounds-checked.
  • index_buffer may need to be synchronized.
  • index_buffer may be unretained, you must ensure it is kept alive while in use.
  • index_buffer contents should be of the correct type.
  • indexBufferOffset might not be bounds-checked.
Source

unsafe fn drawPrimitives_vertexStart_vertexCount_instanceCount_baseInstance( &self, primitive_type: MTLPrimitiveType, vertex_start: NSUInteger, vertex_count: NSUInteger, instance_count: NSUInteger, base_instance: NSUInteger, )
where Self: Sized + Message,

Draw primitives without an index list.

Parameter primitiveType: The type of primitives that elements are assembled into.

Parameter vertexStart: For each instance, the first index to draw

Parameter vertexCount: For each instance, the number of indexes to draw

Parameter instanceCount: The number of instances drawn.

Parameter baseInstance: Offset for instance_id.

§Safety
  • vertexCount might not be bounds-checked.
  • instanceCount might not be bounds-checked.
Source

unsafe fn drawIndexedPrimitives_indexCount_indexType_indexBuffer_indexBufferOffset_instanceCount_baseVertex_baseInstance( &self, primitive_type: MTLPrimitiveType, index_count: NSUInteger, index_type: MTLIndexType, index_buffer: &ProtocolObject<dyn MTLBuffer>, index_buffer_offset: NSUInteger, instance_count: NSUInteger, base_vertex: NSInteger, base_instance: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLArgument and MTLBuffer and MTLResource only.

Draw primitives with an index list.

Parameter primitiveType: The type of primitives that elements are assembled into.

Parameter indexCount: The number of indexes to read from the index buffer for each instance.

Parameter indexType: The type if indexes, either 16 bit integer or 32 bit integer.

Parameter indexBuffer: A buffer object that the device will read indexes from.

Parameter indexBufferOffset: Byte offset within _indexBuffer_to start reading indexes from. _indexBufferOffset_must be a multiple of the index size.

Parameter instanceCount: The number of instances drawn.

Parameter baseVertex: Offset for vertex_id. NOTE: this can be negative

Parameter baseInstance: Offset for instance_id.

§Safety
  • indexCount might not be bounds-checked.
  • index_buffer may need to be synchronized.
  • index_buffer may be unretained, you must ensure it is kept alive while in use.
  • index_buffer contents should be of the correct type.
  • indexBufferOffset might not be bounds-checked.
  • instanceCount might not be bounds-checked.
Source

unsafe fn drawPrimitives_indirectBuffer_indirectBufferOffset( &self, primitive_type: MTLPrimitiveType, indirect_buffer: &ProtocolObject<dyn MTLBuffer>, indirect_buffer_offset: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLBuffer and MTLResource only.

Draw primitives without an index list using an indirect buffer see MTLDrawPrimitivesIndirectArguments.

Parameter primitiveType: The type of primitives that elements are assembled into.

Parameter indirectBuffer: A buffer object that the device will read drawPrimitives arguments from, see MTLDrawPrimitivesIndirectArguments.

Parameter indirectBufferOffset: Byte offset within _indirectBuffer_to start reading indexes from. _indirectBufferOffset_must be a multiple of 4.

§Safety
  • indirect_buffer may need to be synchronized.
  • indirect_buffer may be unretained, you must ensure it is kept alive while in use.
  • indirect_buffer contents should be of the correct type.
  • indirectBufferOffset might not be bounds-checked.
Source

unsafe fn drawIndexedPrimitives_indexType_indexBuffer_indexBufferOffset_indirectBuffer_indirectBufferOffset( &self, primitive_type: MTLPrimitiveType, index_type: MTLIndexType, index_buffer: &ProtocolObject<dyn MTLBuffer>, index_buffer_offset: NSUInteger, indirect_buffer: &ProtocolObject<dyn MTLBuffer>, indirect_buffer_offset: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLArgument and MTLBuffer and MTLResource only.

Draw primitives with an index list using an indirect buffer see MTLDrawIndexedPrimitivesIndirectArguments.

Parameter primitiveType: The type of primitives that elements are assembled into.

Parameter indexType: The type if indexes, either 16 bit integer or 32 bit integer.

Parameter indexBuffer: A buffer object that the device will read indexes from.

Parameter indexBufferOffset: Byte offset within _indexBuffer_to start reading indexes from. _indexBufferOffset_must be a multiple of the index size.

Parameter indirectBuffer: A buffer object that the device will read drawIndexedPrimitives arguments from, see MTLDrawIndexedPrimitivesIndirectArguments.

Parameter indirectBufferOffset: Byte offset within _indirectBuffer_to start reading indexes from. _indirectBufferOffset_must be a multiple of 4.

§Safety
  • index_buffer may need to be synchronized.
  • index_buffer may be unretained, you must ensure it is kept alive while in use.
  • index_buffer contents should be of the correct type.
  • indexBufferOffset might not be bounds-checked.
  • indirect_buffer may need to be synchronized.
  • indirect_buffer may be unretained, you must ensure it is kept alive while in use.
  • indirect_buffer contents should be of the correct type.
  • indirectBufferOffset might not be bounds-checked.
Source

fn textureBarrier(&self)
where Self: Sized + Message,

👎Deprecated

Ensure that following fragment shaders can read textures written by previous draw calls (in particular the framebuffer)

Source

fn updateFence_afterStages( &self, fence: &ProtocolObject<dyn MTLFence>, stages: MTLRenderStages, )
where Self: Sized + Message,

Available on crate feature MTLFence only.

Update the fence to capture all GPU work so far enqueued by this encoder for the given stages.

Unlike <st

updateFence: </st , this method will update the fence when the given stage(s) complete, allowing for commands to overlap in execution. On iOS, render command encoder fence updates are always delayed until the end of the encoder.

Source

fn waitForFence_beforeStages( &self, fence: &ProtocolObject<dyn MTLFence>, stages: MTLRenderStages, )
where Self: Sized + Message,

Available on crate feature MTLFence only.

Prevent further GPU work until the fence is reached for the given stages.

Unlike <st

waitForFence: </st , this method will only block commands assoicated with the given stage(s), allowing for commands to overlap in execution. On iOS, render command encoder fence waits always occur the beginning of the encoder.

Source

unsafe fn setTessellationFactorBuffer_offset_instanceStride( &self, buffer: Option<&ProtocolObject<dyn MTLBuffer>>, offset: NSUInteger, instance_stride: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
§Safety
  • buffer may need to be synchronized.
  • buffer may be unretained, you must ensure it is kept alive while in use.
  • buffer contents should be of the correct type.
  • offset might not be bounds-checked.
  • instanceStride might not be bounds-checked.
Source

fn setTessellationFactorScale(&self, scale: c_float)
where Self: Sized + Message,

Source

unsafe fn drawPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_instanceCount_baseInstance( &self, number_of_patch_control_points: NSUInteger, patch_start: NSUInteger, patch_count: NSUInteger, patch_index_buffer: Option<&ProtocolObject<dyn MTLBuffer>>, patch_index_buffer_offset: NSUInteger, instance_count: NSUInteger, base_instance: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
§Safety
  • patchCount might not be bounds-checked.
  • patch_index_buffer may need to be synchronized.
  • patch_index_buffer may be unretained, you must ensure it is kept alive while in use.
  • patch_index_buffer contents should be of the correct type.
  • patchIndexBufferOffset might not be bounds-checked.
  • instanceCount might not be bounds-checked.
Source

unsafe fn drawPatches_patchIndexBuffer_patchIndexBufferOffset_indirectBuffer_indirectBufferOffset( &self, number_of_patch_control_points: NSUInteger, patch_index_buffer: Option<&ProtocolObject<dyn MTLBuffer>>, patch_index_buffer_offset: NSUInteger, indirect_buffer: &ProtocolObject<dyn MTLBuffer>, indirect_buffer_offset: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
§Safety
  • patch_index_buffer may need to be synchronized.
  • patch_index_buffer may be unretained, you must ensure it is kept alive while in use.
  • patch_index_buffer contents should be of the correct type.
  • patchIndexBufferOffset might not be bounds-checked.
  • indirect_buffer may need to be synchronized.
  • indirect_buffer may be unretained, you must ensure it is kept alive while in use.
  • indirect_buffer contents should be of the correct type.
  • indirectBufferOffset might not be bounds-checked.
Source

unsafe fn drawIndexedPatches_patchStart_patchCount_patchIndexBuffer_patchIndexBufferOffset_controlPointIndexBuffer_controlPointIndexBufferOffset_instanceCount_baseInstance( &self, number_of_patch_control_points: NSUInteger, patch_start: NSUInteger, patch_count: NSUInteger, patch_index_buffer: Option<&ProtocolObject<dyn MTLBuffer>>, patch_index_buffer_offset: NSUInteger, control_point_index_buffer: &ProtocolObject<dyn MTLBuffer>, control_point_index_buffer_offset: NSUInteger, instance_count: NSUInteger, base_instance: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
§Safety
  • patchCount might not be bounds-checked.
  • patch_index_buffer may need to be synchronized.
  • patch_index_buffer may be unretained, you must ensure it is kept alive while in use.
  • patch_index_buffer contents should be of the correct type.
  • patchIndexBufferOffset might not be bounds-checked.
  • control_point_index_buffer may need to be synchronized.
  • control_point_index_buffer may be unretained, you must ensure it is kept alive while in use.
  • control_point_index_buffer contents should be of the correct type.
  • controlPointIndexBufferOffset might not be bounds-checked.
  • instanceCount might not be bounds-checked.
Source

unsafe fn drawIndexedPatches_patchIndexBuffer_patchIndexBufferOffset_controlPointIndexBuffer_controlPointIndexBufferOffset_indirectBuffer_indirectBufferOffset( &self, number_of_patch_control_points: NSUInteger, patch_index_buffer: Option<&ProtocolObject<dyn MTLBuffer>>, patch_index_buffer_offset: NSUInteger, control_point_index_buffer: &ProtocolObject<dyn MTLBuffer>, control_point_index_buffer_offset: NSUInteger, indirect_buffer: &ProtocolObject<dyn MTLBuffer>, indirect_buffer_offset: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
§Safety
  • patch_index_buffer may need to be synchronized.
  • patch_index_buffer may be unretained, you must ensure it is kept alive while in use.
  • patch_index_buffer contents should be of the correct type.
  • patchIndexBufferOffset might not be bounds-checked.
  • control_point_index_buffer may need to be synchronized.
  • control_point_index_buffer may be unretained, you must ensure it is kept alive while in use.
  • control_point_index_buffer contents should be of the correct type.
  • controlPointIndexBufferOffset might not be bounds-checked.
  • indirect_buffer may need to be synchronized.
  • indirect_buffer may be unretained, you must ensure it is kept alive while in use.
  • indirect_buffer contents should be of the correct type.
  • indirectBufferOffset might not be bounds-checked.
Source

fn tileWidth(&self) -> NSUInteger
where Self: Sized + Message,

The width of the tile for this render pass.

Source

fn tileHeight(&self) -> NSUInteger
where Self: Sized + Message,

The height of the tile for this render pass.

Source

unsafe fn setTileBytes_length_atIndex( &self, bytes: NonNull<c_void>, length: NSUInteger, index: NSUInteger, )
where Self: Sized + Message,

Set the data (by copy) for a given tile buffer binding point. This will remove any existing MTLBuffer from the binding point.

§Safety
  • bytes must be a valid pointer.
  • index might not be bounds-checked.
Source

unsafe fn setTileBuffer_offset_atIndex( &self, buffer: Option<&ProtocolObject<dyn MTLBuffer>>, offset: NSUInteger, index: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLBuffer and MTLResource only.

Set a global buffer for all tile shaders at the given bind point index.

§Safety
  • buffer may need to be synchronized.
  • buffer may be unretained, you must ensure it is kept alive while in use.
  • buffer contents should be of the correct type.
  • offset might not be bounds-checked.
  • index might not be bounds-checked.
Source

unsafe fn setTileBufferOffset_atIndex( &self, offset: NSUInteger, index: NSUInteger, )
where Self: Sized + Message,

Set the offset within the current global buffer for all tile shaders at the given bind point index.

§Safety
  • offset might not be bounds-checked.
  • index might not be bounds-checked.
Source

unsafe fn setTileBuffers_offsets_withRange( &self, buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>, offsets: NonNull<NSUInteger>, range: NSRange, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLBuffer and MTLResource only.

Set an array of global buffers for all tile shaders with the given bind point range.

§Safety
  • buffers must be a valid pointer.
  • offsets might not be bounds-checked.
  • offsets must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setTileTexture_atIndex( &self, texture: Option<&ProtocolObject<dyn MTLTexture>>, index: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLResource and MTLTexture only.

Set a global texture for all tile shaders at the given bind point index.

§Safety
  • texture may need to be synchronized.
  • texture may be unretained, you must ensure it is kept alive while in use.
  • index might not be bounds-checked.
Source

unsafe fn setTileTextures_withRange( &self, textures: NonNull<*const ProtocolObject<dyn MTLTexture>>, range: NSRange, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLResource and MTLTexture only.

Set an array of global textures for all tile shaders with the given bind point range.

§Safety
  • textures must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setTileSamplerState_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, index: NSUInteger, )
where Self: Sized + Message,

Available on crate feature MTLSampler only.

Set a global sampler for all tile shaders at the given bind point index.

§Safety

index might not be bounds-checked.

Source

unsafe fn setTileSamplerStates_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, range: NSRange, )
where Self: Sized + Message,

Available on crate feature MTLSampler only.

Set an array of global samplers for all fragment shaders with the given bind point range.

§Safety
  • samplers must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setTileSamplerState_lodMinClamp_lodMaxClamp_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, lod_min_clamp: c_float, lod_max_clamp: c_float, index: NSUInteger, )
where Self: Sized + Message,

Available on crate feature MTLSampler only.

Set a global sampler for all tile shaders at the given bind point index.

§Safety

index might not be bounds-checked.

Source

unsafe fn setTileSamplerStates_lodMinClamps_lodMaxClamps_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, lod_min_clamps: NonNull<c_float>, lod_max_clamps: NonNull<c_float>, range: NSRange, )
where Self: Sized + Message,

Available on crate feature MTLSampler only.

Set an array of global samplers for all tile shaders with the given bind point range.

§Safety
  • samplers must be a valid pointer.
  • lod_min_clamps must be a valid pointer.
  • lod_max_clamps must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setTileVisibleFunctionTable_atBufferIndex( &self, function_table: Option<&ProtocolObject<dyn MTLVisibleFunctionTable>>, buffer_index: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLResource and MTLVisibleFunctionTable only.

Set a global visible function table for all tile shaders at the given buffer bind point index.

§Safety
  • function_table may need to be synchronized.
  • function_table may be unretained, you must ensure it is kept alive while in use.
  • bufferIndex might not be bounds-checked.
Source

unsafe fn setTileVisibleFunctionTables_withBufferRange( &self, function_tables: NonNull<*const ProtocolObject<dyn MTLVisibleFunctionTable>>, range: NSRange, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLResource and MTLVisibleFunctionTable only.

Set an array of global visible function tables for all tile shaders with the given buffer bind point range.

§Safety
  • function_tables must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setTileIntersectionFunctionTable_atBufferIndex( &self, intersection_function_table: Option<&ProtocolObject<dyn MTLIntersectionFunctionTable>>, buffer_index: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLIntersectionFunctionTable and MTLResource only.

Set a global intersection function table for all tile shaders at the given buffer bind point index.

§Safety
  • intersection_function_table may need to be synchronized.
  • intersection_function_table may be unretained, you must ensure it is kept alive while in use.
  • bufferIndex might not be bounds-checked.
Source

unsafe fn setTileIntersectionFunctionTables_withBufferRange( &self, intersection_function_tables: NonNull<*const ProtocolObject<dyn MTLIntersectionFunctionTable>>, range: NSRange, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLIntersectionFunctionTable and MTLResource only.

Set an array of global intersection function tables for all tile shaders with the given buffer bind point range.

§Safety
  • intersection_function_tables must be a valid pointer.
  • range might not be bounds-checked.
Source

unsafe fn setTileAccelerationStructure_atBufferIndex( &self, acceleration_structure: Option<&ProtocolObject<dyn MTLAccelerationStructure>>, buffer_index: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAccelerationStructure and MTLAllocation and MTLResource only.

Set a global acceleration structure for all tile shaders at the given buffer bind point index.

§Safety
  • acceleration_structure may need to be synchronized.
  • acceleration_structure may be unretained, you must ensure it is kept alive while in use.
  • bufferIndex might not be bounds-checked.
Source

fn dispatchThreadsPerTile(&self, threads_per_tile: MTLSize)
where Self: Sized + Message,

Available on crate feature MTLTypes only.

dispatch threads to perform a mid-render compute operation.

Source

unsafe fn setThreadgroupMemoryLength_offset_atIndex( &self, length: NSUInteger, offset: NSUInteger, index: NSUInteger, )
where Self: Sized + Message,

Set the size of the threadgroup memory argument at the given bind point index and offset.

§Safety
  • offset might not be bounds-checked.
  • index might not be bounds-checked.
Source

fn useResource_usage( &self, resource: &ProtocolObject<dyn MTLResource>, usage: MTLResourceUsage, )
where Self: Sized + Message,

👎Deprecated
Available on crate features MTLAllocation and MTLResource only.

Declare that a resource may be accessed by the render pass through an argument buffer

This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resource through an argument buffer. However, this method may cause color attachments to become decompressed. Therefore, this method should be called until as late as possible within a render command encoder. Declaring a minimal usage (i.e. read-only) may prevent color attachments from becoming decompressed on some devices.

Note that calling useResource does not retain the resource. It is the responsiblity of the user to retain the resource until the command buffer has been executed.

Source

unsafe fn useResources_count_usage( &self, resources: NonNull<NonNull<ProtocolObject<dyn MTLResource>>>, count: NSUInteger, usage: MTLResourceUsage, )
where Self: Sized + Message,

👎Deprecated
Available on crate features MTLAllocation and MTLResource only.

Declare that an array of resources may be accessed through an argument buffer by the render pass

This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resources through an argument buffer. However, this method may cause color attachments to become decompressed. Therefore, this method should be called until as late as possible within a render command encoder. Declaring a minimal usage (i.e. read-only) may prevent color attachments from becoming decompressed on some devices.

Note that calling useResources does not retain the resources. It is the responsiblity of the user to retain the resources until the command buffer has been executed.

§Safety
  • resources must be a valid pointer.
  • count might not be bounds-checked.
Source

fn useResource_usage_stages( &self, resource: &ProtocolObject<dyn MTLResource>, usage: MTLResourceUsage, stages: MTLRenderStages, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLResource only.

Declare that a resource may be accessed by the render pass through an argument buffer

For hazard tracked resources, this method protects against data hazards. This method must be called before encoding any draw commands which may access the resource through an argument buffer. However, this method may cause color attachments to become decompressed. Therefore, this method should be called until as late as possible within a render command encoder. Declaring a minimal usage (i.e. read-only) may prevent color attachments from becoming decompressed on some devices.

Note that calling useResource does not retain the resource. It is the responsiblity of the user to retain the resource until the command buffer has been executed.

Source

unsafe fn useResources_count_usage_stages( &self, resources: NonNull<NonNull<ProtocolObject<dyn MTLResource>>>, count: NSUInteger, usage: MTLResourceUsage, stages: MTLRenderStages, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLResource only.

Declare that an array of resources may be accessed through an argument buffer by the render pass

For hazard tracked resources, this method protects against data hazards. This method must be called before encoding any draw commands which may access the resources through an argument buffer. However, this method may cause color attachments to become decompressed. Therefore, this method should be called until as late as possible within a render command encoder. Declaring a minimal usage (i.e. read-only) may prevent color attachments from becoming decompressed on some devices.

Note that calling useResources does not retain the resources. It is the responsiblity of the user to retain the resources until the command buffer has been executed.

§Safety
  • resources must be a valid pointer.
  • count might not be bounds-checked.
Source

fn useHeap(&self, heap: &ProtocolObject<dyn MTLHeap>)
where Self: Sized + Message,

👎Deprecated
Available on crate features MTLAllocation and MTLHeap only.

Declare that the resources allocated from a heap may be accessed by the render pass through an argument buffer

This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resources allocated from the heap through an argument buffer. This method may cause all of the color attachments allocated from the heap to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.

Source

unsafe fn useHeaps_count( &self, heaps: NonNull<NonNull<ProtocolObject<dyn MTLHeap>>>, count: NSUInteger, )
where Self: Sized + Message,

👎Deprecated
Available on crate features MTLAllocation and MTLHeap only.

Declare that the resources allocated from an array of heaps may be accessed by the render pass through an argument buffer

This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resources allocated from the heaps through an argument buffer. This method may cause all of the color attachments allocated from the heaps to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.

§Safety
  • heaps must be a valid pointer.
  • count might not be bounds-checked.
Source

fn useHeap_stages( &self, heap: &ProtocolObject<dyn MTLHeap>, stages: MTLRenderStages, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLHeap only.

Declare that the resources allocated from a heap may be accessed by the render pass through an argument buffer

If the heap is tracked, this method protects against hazard tracking; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resources allocated from the heap through an argument buffer. This method may cause all of the color attachments allocated from the heap to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.

Source

unsafe fn useHeaps_count_stages( &self, heaps: NonNull<NonNull<ProtocolObject<dyn MTLHeap>>>, count: NSUInteger, stages: MTLRenderStages, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLHeap only.

Declare that the resources allocated from an array of heaps may be accessed by the render pass through an argument buffer

This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resources allocated from the heaps through an argument buffer. This method may cause all of the color attachments allocated from the heaps to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.

§Safety
  • heaps must be a valid pointer.
  • count might not be bounds-checked.
Source

unsafe fn executeCommandsInBuffer_withRange( &self, indirect_command_buffer: &ProtocolObject<dyn MTLIndirectCommandBuffer>, execution_range: NSRange, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLIndirectCommandBuffer and MTLResource only.

Execute commands in the buffer within the range specified.

The same indirect command buffer may be executed any number of times within the same encoder.

§Safety
  • indirect_command_buffer may need to be synchronized.
  • indirect_command_buffer may be unretained, you must ensure it is kept alive while in use.
  • executionRange might not be bounds-checked.
Source

unsafe fn executeCommandsInBuffer_indirectBuffer_indirectBufferOffset( &self, indirect_commandbuffer: &ProtocolObject<dyn MTLIndirectCommandBuffer>, indirect_range_buffer: &ProtocolObject<dyn MTLBuffer>, indirect_buffer_offset: NSUInteger, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLBuffer and MTLIndirectCommandBuffer and MTLResource only.

Execute commands in the buffer within the range specified by the indirect range buffer.

Parameter indirectRangeBuffer: An indirect buffer from which the device reads the execution range parameter, as laid out in the MTLIndirectCommandBufferExecutionRange structure.

Parameter indirectBufferOffset: The byte offset within indirectBuffer where the execution range parameter is located. Must be a multiple of 4 bytes.

The same indirect command buffer may be executed any number of times within the same encoder.

§Safety
  • indirect_commandbuffer may need to be synchronized.
  • indirect_commandbuffer may be unretained, you must ensure it is kept alive while in use.
  • indirect_range_buffer may need to be synchronized.
  • indirect_range_buffer may be unretained, you must ensure it is kept alive while in use.
  • indirect_range_buffer contents should be of the correct type.
  • indirectBufferOffset might not be bounds-checked.
Source

fn memoryBarrierWithScope_afterStages_beforeStages( &self, scope: MTLBarrierScope, after: MTLRenderStages, before: MTLRenderStages, )
where Self: Sized + Message,

Make stores to memory encoded before the barrier coherent with loads from memory encoded after the barrier.

The barrier makes stores coherent that 1) are to a resource with a type in the given scope, and 2) happen at (or before) the stage given by afterStages. Only affects loads that happen at (or after) the stage given by beforeStages.

Source

unsafe fn memoryBarrierWithResources_count_afterStages_beforeStages( &self, resources: NonNull<NonNull<ProtocolObject<dyn MTLResource>>>, count: NSUInteger, after: MTLRenderStages, before: MTLRenderStages, )
where Self: Sized + Message,

Available on crate features MTLAllocation and MTLResource only.

Make stores to memory encoded before the barrier coherent with loads from memory encoded after the barrier.

The barrier makes stores coherent that 1) are to resources in given array, and 2) happen at (or before) the stage given by afterStages. Only affects loads that happen at (or after) the stage give by beforeStages.

§Safety
  • resources must be a valid pointer.
  • count might not be bounds-checked.
Source

unsafe fn sampleCountersInBuffer_atSampleIndex_withBarrier( &self, sample_buffer: &ProtocolObject<dyn MTLCounterSampleBuffer>, sample_index: NSUInteger, barrier: bool, )
where Self: Sized + Message,

Available on crate feature MTLCounters only.

Sample hardware counters at this point in the render encoder and store the counter sample into the sample buffer at the specified index.

Parameter sampleBuffer: The sample buffer to sample into

Parameter sampleIndex: The index into the counter buffer to write the sample.

Parameter barrier: Insert a barrier before taking the sample. Passing YES will ensure that all work encoded before this operation in the encoder is complete but does not isolate the work with respect to other encoders. Passing NO will allow the sample to be taken concurrently with other operations in this encoder. In general, passing YES will lead to more repeatable counter results but may negatively impact performance. Passing NO will generally be higher performance but counter results may not be repeatable.

§Safety

sampleIndex might not be bounds-checked.

Source

fn setColorAttachmentMap( &self, mapping: Option<&MTLLogicalToPhysicalColorAttachmentMap>, )
where Self: Sized + Message,

Available on crate feature MTLRenderPipeline only.

Sets the mapping from logical shader color output to physical render pass color attachments.

Use this method to define how the physical color attachments you specify via MTLRenderPassDescriptor/colorAttachments map to the logical color output the fragment shader writes to.

To use this feature, make sure to set MTLRenderPassDescriptor/supportColorAttachmentMapping to <doc ://com.apple.documentation/documentation/swift/true>.

  • Parameter mapping: Mapping from logical shader outputs to physical outputs.

Trait Implementations§

Source§

impl ProtocolType for dyn MTLRenderCommandEncoder

Source§

const NAME: &'static str = "MTLRenderCommandEncoder"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn MTLRenderCommandEncoder

Implementations on Foreign Types§

Source§

impl<T> MTLRenderCommandEncoder for ProtocolObject<T>

Implementors§