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 { ... }
}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§
Sourcefn setRenderPipelineState(
&self,
pipeline_state: &ProtocolObject<dyn MTLRenderPipelineState>,
)
Available on crate features MTLAllocation and MTLRenderPipeline only.
fn setRenderPipelineState( &self, pipeline_state: &ProtocolObject<dyn MTLRenderPipelineState>, )
MTLAllocation and MTLRenderPipeline only.Sets the current render pipeline state object.
Sourceunsafe fn setVertexBytes_length_atIndex(
&self,
bytes: NonNull<c_void>,
length: NSUInteger,
index: NSUInteger,
)
unsafe fn setVertexBytes_length_atIndex( &self, bytes: NonNull<c_void>, length: NSUInteger, index: NSUInteger, )
Set the data (by copy) for a given vertex buffer binding point. This will remove any existing MTLBuffer from the binding point.
§Safety
bytesmust be a valid pointer.indexmight not be bounds-checked.
Sourceunsafe fn setVertexBuffer_offset_atIndex(
&self,
buffer: Option<&ProtocolObject<dyn MTLBuffer>>,
offset: NSUInteger,
index: NSUInteger,
)
Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
unsafe fn setVertexBuffer_offset_atIndex( &self, buffer: Option<&ProtocolObject<dyn MTLBuffer>>, offset: NSUInteger, index: NSUInteger, )
MTLAllocation and MTLBuffer and MTLResource only.Set a global buffer for all vertex shaders at the given bind point index.
§Safety
buffermay need to be synchronized.buffermay be unretained, you must ensure it is kept alive while in use.buffercontents should be of the correct type.offsetmight not be bounds-checked.indexmight not be bounds-checked.
Sourceunsafe fn setVertexBufferOffset_atIndex(
&self,
offset: NSUInteger,
index: NSUInteger,
)
unsafe fn setVertexBufferOffset_atIndex( &self, offset: NSUInteger, index: NSUInteger, )
Set the offset within the current global buffer for all vertex shaders at the given bind point index.
§Safety
offsetmight not be bounds-checked.indexmight not be bounds-checked.
Sourceunsafe fn setVertexBuffers_offsets_withRange(
&self,
buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>,
offsets: NonNull<NSUInteger>,
range: NSRange,
)
Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
unsafe fn setVertexBuffers_offsets_withRange( &self, buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>, offsets: NonNull<NSUInteger>, range: NSRange, )
MTLAllocation and MTLBuffer and MTLResource only.Set an array of global buffers for all vertex shaders with the given bind point range.
§Safety
buffersmust be a valid pointer.offsetsmight not be bounds-checked.offsetsmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setVertexBuffer_offset_attributeStride_atIndex(
&self,
buffer: Option<&ProtocolObject<dyn MTLBuffer>>,
offset: NSUInteger,
stride: NSUInteger,
index: NSUInteger,
)
Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
unsafe fn setVertexBuffer_offset_attributeStride_atIndex( &self, buffer: Option<&ProtocolObject<dyn MTLBuffer>>, offset: NSUInteger, stride: NSUInteger, index: NSUInteger, )
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
buffermay need to be synchronized.buffermay be unretained, you must ensure it is kept alive while in use.buffercontents should be of the correct type.offsetmight not be bounds-checked.stridemight not be bounds-checked.indexmight not be bounds-checked.
Sourceunsafe fn setVertexBuffers_offsets_attributeStrides_withRange(
&self,
buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>,
offsets: NonNull<NSUInteger>,
strides: NonNull<NSUInteger>,
range: NSRange,
)
Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
unsafe fn setVertexBuffers_offsets_attributeStrides_withRange( &self, buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>, offsets: NonNull<NSUInteger>, strides: NonNull<NSUInteger>, range: NSRange, )
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
buffersmust be a valid pointer.offsetsmight not be bounds-checked.offsetsmust be a valid pointer.stridesmight not be bounds-checked.stridesmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setVertexBufferOffset_attributeStride_atIndex(
&self,
offset: NSUInteger,
stride: NSUInteger,
index: NSUInteger,
)
unsafe fn setVertexBufferOffset_attributeStride_atIndex( &self, offset: NSUInteger, stride: NSUInteger, index: NSUInteger, )
only call this when the buffer-index is part of the vertexDescriptor and
has set its stride to MTLBufferLayoutStrideDynamic
§Safety
offsetmight not be bounds-checked.stridemight not be bounds-checked.indexmight not be bounds-checked.
Sourceunsafe fn setVertexBytes_length_attributeStride_atIndex(
&self,
bytes: NonNull<c_void>,
length: NSUInteger,
stride: NSUInteger,
index: NSUInteger,
)
unsafe fn setVertexBytes_length_attributeStride_atIndex( &self, bytes: NonNull<c_void>, length: NSUInteger, stride: NSUInteger, index: NSUInteger, )
only call this when the buffer-index is part of the vertexDescriptor and
has set its stride to MTLBufferLayoutStrideDynamic
§Safety
bytesmust be a valid pointer.stridemight not be bounds-checked.indexmight not be bounds-checked.
Sourceunsafe fn setVertexTexture_atIndex(
&self,
texture: Option<&ProtocolObject<dyn MTLTexture>>,
index: NSUInteger,
)
Available on crate features MTLAllocation and MTLResource and MTLTexture only.
unsafe fn setVertexTexture_atIndex( &self, texture: Option<&ProtocolObject<dyn MTLTexture>>, index: NSUInteger, )
MTLAllocation and MTLResource and MTLTexture only.Set a global texture for all vertex shaders at the given bind point index.
§Safety
texturemay need to be synchronized.texturemay be unretained, you must ensure it is kept alive while in use.indexmight not be bounds-checked.
Sourceunsafe fn setVertexTextures_withRange(
&self,
textures: NonNull<*const ProtocolObject<dyn MTLTexture>>,
range: NSRange,
)
Available on crate features MTLAllocation and MTLResource and MTLTexture only.
unsafe fn setVertexTextures_withRange( &self, textures: NonNull<*const ProtocolObject<dyn MTLTexture>>, range: NSRange, )
MTLAllocation and MTLResource and MTLTexture only.Set an array of global textures for all vertex shaders with the given bind point range.
§Safety
texturesmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setVertexSamplerState_atIndex(
&self,
sampler: Option<&ProtocolObject<dyn MTLSamplerState>>,
index: NSUInteger,
)
Available on crate feature MTLSampler only.
unsafe fn setVertexSamplerState_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, index: NSUInteger, )
MTLSampler only.Set a global sampler for all vertex shaders at the given bind point index.
§Safety
index might not be bounds-checked.
Sourceunsafe fn setVertexSamplerStates_withRange(
&self,
samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>,
range: NSRange,
)
Available on crate feature MTLSampler only.
unsafe fn setVertexSamplerStates_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, range: NSRange, )
MTLSampler only.Set an array of global samplers for all vertex shaders with the given bind point range.
§Safety
samplersmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setVertexSamplerState_lodMinClamp_lodMaxClamp_atIndex(
&self,
sampler: Option<&ProtocolObject<dyn MTLSamplerState>>,
lod_min_clamp: c_float,
lod_max_clamp: c_float,
index: NSUInteger,
)
Available on crate feature MTLSampler only.
unsafe fn setVertexSamplerState_lodMinClamp_lodMaxClamp_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, lod_min_clamp: c_float, lod_max_clamp: c_float, index: NSUInteger, )
MTLSampler only.Set a global sampler for all vertex shaders at the given bind point index.
§Safety
index might not be bounds-checked.
Sourceunsafe 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,
)
Available on crate feature MTLSampler only.
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, )
MTLSampler only.Set an array of global samplers for all vertex shaders with the given bind point range.
§Safety
samplersmust be a valid pointer.lod_min_clampsmust be a valid pointer.lod_max_clampsmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setVertexVisibleFunctionTable_atBufferIndex(
&self,
function_table: Option<&ProtocolObject<dyn MTLVisibleFunctionTable>>,
buffer_index: NSUInteger,
)
Available on crate features MTLAllocation and MTLResource and MTLVisibleFunctionTable only.
unsafe fn setVertexVisibleFunctionTable_atBufferIndex( &self, function_table: Option<&ProtocolObject<dyn MTLVisibleFunctionTable>>, buffer_index: NSUInteger, )
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_tablemay need to be synchronized.function_tablemay be unretained, you must ensure it is kept alive while in use.bufferIndexmight not be bounds-checked.
Sourceunsafe fn setVertexVisibleFunctionTables_withBufferRange(
&self,
function_tables: NonNull<*const ProtocolObject<dyn MTLVisibleFunctionTable>>,
range: NSRange,
)
Available on crate features MTLAllocation and MTLResource and MTLVisibleFunctionTable only.
unsafe fn setVertexVisibleFunctionTables_withBufferRange( &self, function_tables: NonNull<*const ProtocolObject<dyn MTLVisibleFunctionTable>>, range: NSRange, )
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_tablesmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setVertexIntersectionFunctionTable_atBufferIndex(
&self,
intersection_function_table: Option<&ProtocolObject<dyn MTLIntersectionFunctionTable>>,
buffer_index: NSUInteger,
)
Available on crate features MTLAllocation and MTLIntersectionFunctionTable and MTLResource only.
unsafe fn setVertexIntersectionFunctionTable_atBufferIndex( &self, intersection_function_table: Option<&ProtocolObject<dyn MTLIntersectionFunctionTable>>, buffer_index: NSUInteger, )
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_tablemay need to be synchronized.intersection_function_tablemay be unretained, you must ensure it is kept alive while in use.bufferIndexmight not be bounds-checked.
Sourceunsafe fn setVertexIntersectionFunctionTables_withBufferRange(
&self,
intersection_function_tables: NonNull<*const ProtocolObject<dyn MTLIntersectionFunctionTable>>,
range: NSRange,
)
Available on crate features MTLAllocation and MTLIntersectionFunctionTable and MTLResource only.
unsafe fn setVertexIntersectionFunctionTables_withBufferRange( &self, intersection_function_tables: NonNull<*const ProtocolObject<dyn MTLIntersectionFunctionTable>>, range: NSRange, )
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_tablesmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setVertexAccelerationStructure_atBufferIndex(
&self,
acceleration_structure: Option<&ProtocolObject<dyn MTLAccelerationStructure>>,
buffer_index: NSUInteger,
)
Available on crate features MTLAccelerationStructure and MTLAllocation and MTLResource only.
unsafe fn setVertexAccelerationStructure_atBufferIndex( &self, acceleration_structure: Option<&ProtocolObject<dyn MTLAccelerationStructure>>, buffer_index: NSUInteger, )
MTLAccelerationStructure and MTLAllocation and MTLResource only.Set a global acceleration structure for all vertex shaders at the given buffer bind point index.
§Safety
acceleration_structuremay need to be synchronized.acceleration_structuremay be unretained, you must ensure it is kept alive while in use.bufferIndexmight not be bounds-checked.
Sourcefn setViewport(&self, viewport: MTLViewport)
fn setViewport(&self, viewport: MTLViewport)
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.
Sourceunsafe fn setViewports_count(
&self,
viewports: NonNull<MTLViewport>,
count: NSUInteger,
)
unsafe fn setViewports_count( &self, viewports: NonNull<MTLViewport>, count: NSUInteger, )
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
viewportsmust be a valid pointer.countmight not be bounds-checked.
Sourcefn setFrontFacingWinding(&self, front_facing_winding: MTLWinding)
fn setFrontFacingWinding(&self, front_facing_winding: MTLWinding)
The winding order of front-facing primitives.
Sourceunsafe fn setVertexAmplificationCount_viewMappings(
&self,
count: NSUInteger,
view_mappings: *const MTLVertexAmplificationViewMapping,
)
unsafe fn setVertexAmplificationCount_viewMappings( &self, count: NSUInteger, view_mappings: *const MTLVertexAmplificationViewMapping, )
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
countmight not be bounds-checked.view_mappingsmust be a valid pointer or null.
Sourcefn setCullMode(&self, cull_mode: MTLCullMode)
fn setCullMode(&self, cull_mode: MTLCullMode)
Controls if primitives are culled when front facing, back facing, or not culled at all.
Sourcefn setDepthClipMode(&self, depth_clip_mode: MTLDepthClipMode)
fn setDepthClipMode(&self, depth_clip_mode: MTLDepthClipMode)
Controls what is done with fragments outside of the near or far planes.
Sourcefn setDepthBias_slopeScale_clamp(
&self,
depth_bias: c_float,
slope_scale: c_float,
clamp: c_float,
)
fn setDepthBias_slopeScale_clamp( &self, depth_bias: c_float, slope_scale: c_float, clamp: c_float, )
Depth Bias.
Sourcefn setDepthTestMinBound_maxBound(&self, min_bound: c_float, max_bound: c_float)
fn setDepthTestMinBound_maxBound(&self, min_bound: c_float, max_bound: c_float)
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
minBoundproperty is equal to0.0f. - The
maxBoundproperty is equal to1.0f. BothminBoundandmaxBoundneed to be within[0.0f, 1.0f], andminBoundneeds to be less than or equal tomaxBound. - 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.
Sourcefn setScissorRect(&self, rect: MTLScissorRect)
fn setScissorRect(&self, rect: MTLScissorRect)
Specifies a rectangle for a fragment scissor test. All fragments outside of this rectangle are discarded.
Sourceunsafe fn setScissorRects_count(
&self,
scissor_rects: NonNull<MTLScissorRect>,
count: NSUInteger,
)
unsafe fn setScissorRects_count( &self, scissor_rects: NonNull<MTLScissorRect>, count: NSUInteger, )
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_rectsmust be a valid pointer.countmight not be bounds-checked.
Sourcefn setTriangleFillMode(&self, fill_mode: MTLTriangleFillMode)
fn setTriangleFillMode(&self, fill_mode: MTLTriangleFillMode)
Set how to rasterize triangle and triangle strip primitives.
Sourceunsafe fn setFragmentBytes_length_atIndex(
&self,
bytes: NonNull<c_void>,
length: NSUInteger,
index: NSUInteger,
)
unsafe fn setFragmentBytes_length_atIndex( &self, bytes: NonNull<c_void>, length: NSUInteger, index: NSUInteger, )
Set the data (by copy) for a given fragment buffer binding point. This will remove any existing MTLBuffer from the binding point.
§Safety
bytesmust be a valid pointer.indexmight not be bounds-checked.
Sourceunsafe fn setFragmentBuffer_offset_atIndex(
&self,
buffer: Option<&ProtocolObject<dyn MTLBuffer>>,
offset: NSUInteger,
index: NSUInteger,
)
Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
unsafe fn setFragmentBuffer_offset_atIndex( &self, buffer: Option<&ProtocolObject<dyn MTLBuffer>>, offset: NSUInteger, index: NSUInteger, )
MTLAllocation and MTLBuffer and MTLResource only.Set a global buffer for all fragment shaders at the given bind point index.
§Safety
buffermay need to be synchronized.buffermay be unretained, you must ensure it is kept alive while in use.buffercontents should be of the correct type.offsetmight not be bounds-checked.indexmight not be bounds-checked.
Sourceunsafe fn setFragmentBufferOffset_atIndex(
&self,
offset: NSUInteger,
index: NSUInteger,
)
unsafe fn setFragmentBufferOffset_atIndex( &self, offset: NSUInteger, index: NSUInteger, )
Set the offset within the current global buffer for all fragment shaders at the given bind point index.
§Safety
offsetmight not be bounds-checked.indexmight not be bounds-checked.
Sourceunsafe fn setFragmentBuffers_offsets_withRange(
&self,
buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>,
offsets: NonNull<NSUInteger>,
range: NSRange,
)
Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
unsafe fn setFragmentBuffers_offsets_withRange( &self, buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>, offsets: NonNull<NSUInteger>, range: NSRange, )
MTLAllocation and MTLBuffer and MTLResource only.Set an array of global buffers for all fragment shaders with the given bind point range.
§Safety
buffersmust be a valid pointer.offsetsmight not be bounds-checked.offsetsmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setFragmentTexture_atIndex(
&self,
texture: Option<&ProtocolObject<dyn MTLTexture>>,
index: NSUInteger,
)
Available on crate features MTLAllocation and MTLResource and MTLTexture only.
unsafe fn setFragmentTexture_atIndex( &self, texture: Option<&ProtocolObject<dyn MTLTexture>>, index: NSUInteger, )
MTLAllocation and MTLResource and MTLTexture only.Set a global texture for all fragment shaders at the given bind point index.
§Safety
texturemay need to be synchronized.texturemay be unretained, you must ensure it is kept alive while in use.indexmight not be bounds-checked.
Sourceunsafe fn setFragmentTextures_withRange(
&self,
textures: NonNull<*const ProtocolObject<dyn MTLTexture>>,
range: NSRange,
)
Available on crate features MTLAllocation and MTLResource and MTLTexture only.
unsafe fn setFragmentTextures_withRange( &self, textures: NonNull<*const ProtocolObject<dyn MTLTexture>>, range: NSRange, )
MTLAllocation and MTLResource and MTLTexture only.Set an array of global textures for all fragment shaders with the given bind point range.
§Safety
texturesmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setFragmentSamplerState_atIndex(
&self,
sampler: Option<&ProtocolObject<dyn MTLSamplerState>>,
index: NSUInteger,
)
Available on crate feature MTLSampler only.
unsafe fn setFragmentSamplerState_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, index: NSUInteger, )
MTLSampler only.Set a global sampler for all fragment shaders at the given bind point index.
§Safety
index might not be bounds-checked.
Sourceunsafe fn setFragmentSamplerStates_withRange(
&self,
samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>,
range: NSRange,
)
Available on crate feature MTLSampler only.
unsafe fn setFragmentSamplerStates_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, range: NSRange, )
MTLSampler only.Set an array of global samplers for all fragment shaders with the given bind point range.
§Safety
samplersmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setFragmentSamplerState_lodMinClamp_lodMaxClamp_atIndex(
&self,
sampler: Option<&ProtocolObject<dyn MTLSamplerState>>,
lod_min_clamp: c_float,
lod_max_clamp: c_float,
index: NSUInteger,
)
Available on crate feature MTLSampler only.
unsafe fn setFragmentSamplerState_lodMinClamp_lodMaxClamp_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, lod_min_clamp: c_float, lod_max_clamp: c_float, index: NSUInteger, )
MTLSampler only.Set a global sampler for all fragment shaders at the given bind point index.
§Safety
index might not be bounds-checked.
Sourceunsafe 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,
)
Available on crate feature MTLSampler only.
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, )
MTLSampler only.Set an array of global samplers for all fragment shaders with the given bind point range.
§Safety
samplersmust be a valid pointer.lod_min_clampsmust be a valid pointer.lod_max_clampsmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setFragmentVisibleFunctionTable_atBufferIndex(
&self,
function_table: Option<&ProtocolObject<dyn MTLVisibleFunctionTable>>,
buffer_index: NSUInteger,
)
Available on crate features MTLAllocation and MTLResource and MTLVisibleFunctionTable only.
unsafe fn setFragmentVisibleFunctionTable_atBufferIndex( &self, function_table: Option<&ProtocolObject<dyn MTLVisibleFunctionTable>>, buffer_index: NSUInteger, )
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_tablemay need to be synchronized.function_tablemay be unretained, you must ensure it is kept alive while in use.bufferIndexmight not be bounds-checked.
Sourceunsafe fn setFragmentVisibleFunctionTables_withBufferRange(
&self,
function_tables: NonNull<*const ProtocolObject<dyn MTLVisibleFunctionTable>>,
range: NSRange,
)
Available on crate features MTLAllocation and MTLResource and MTLVisibleFunctionTable only.
unsafe fn setFragmentVisibleFunctionTables_withBufferRange( &self, function_tables: NonNull<*const ProtocolObject<dyn MTLVisibleFunctionTable>>, range: NSRange, )
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_tablesmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setFragmentIntersectionFunctionTable_atBufferIndex(
&self,
intersection_function_table: Option<&ProtocolObject<dyn MTLIntersectionFunctionTable>>,
buffer_index: NSUInteger,
)
Available on crate features MTLAllocation and MTLIntersectionFunctionTable and MTLResource only.
unsafe fn setFragmentIntersectionFunctionTable_atBufferIndex( &self, intersection_function_table: Option<&ProtocolObject<dyn MTLIntersectionFunctionTable>>, buffer_index: NSUInteger, )
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_tablemay need to be synchronized.intersection_function_tablemay be unretained, you must ensure it is kept alive while in use.bufferIndexmight not be bounds-checked.
Sourceunsafe fn setFragmentIntersectionFunctionTables_withBufferRange(
&self,
intersection_function_tables: NonNull<*const ProtocolObject<dyn MTLIntersectionFunctionTable>>,
range: NSRange,
)
Available on crate features MTLAllocation and MTLIntersectionFunctionTable and MTLResource only.
unsafe fn setFragmentIntersectionFunctionTables_withBufferRange( &self, intersection_function_tables: NonNull<*const ProtocolObject<dyn MTLIntersectionFunctionTable>>, range: NSRange, )
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_tablesmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setFragmentAccelerationStructure_atBufferIndex(
&self,
acceleration_structure: Option<&ProtocolObject<dyn MTLAccelerationStructure>>,
buffer_index: NSUInteger,
)
Available on crate features MTLAccelerationStructure and MTLAllocation and MTLResource only.
unsafe fn setFragmentAccelerationStructure_atBufferIndex( &self, acceleration_structure: Option<&ProtocolObject<dyn MTLAccelerationStructure>>, buffer_index: NSUInteger, )
MTLAccelerationStructure and MTLAllocation and MTLResource only.Set a global acceleration structure for all fragment shaders at the given buffer bind point index.
§Safety
acceleration_structuremay need to be synchronized.acceleration_structuremay be unretained, you must ensure it is kept alive while in use.bufferIndexmight not be bounds-checked.
Sourcefn setBlendColorRed_green_blue_alpha(
&self,
red: c_float,
green: c_float,
blue: c_float,
alpha: c_float,
)
fn setBlendColorRed_green_blue_alpha( &self, red: c_float, green: c_float, blue: c_float, alpha: c_float, )
Set the constant blend color used across all blending on all render targets
Sourcefn setDepthStencilState(
&self,
depth_stencil_state: Option<&ProtocolObject<dyn MTLDepthStencilState>>,
)
Available on crate feature MTLDepthStencil only.
fn setDepthStencilState( &self, depth_stencil_state: Option<&ProtocolObject<dyn MTLDepthStencilState>>, )
MTLDepthStencil only.Set the DepthStencil state object.
Sourcefn setStencilReferenceValue(&self, reference_value: u32)
fn setStencilReferenceValue(&self, reference_value: u32)
Set the stencil reference value for both the back and front stencil buffers.
Sourcefn setStencilFrontReferenceValue_backReferenceValue(
&self,
front_reference_value: u32,
back_reference_value: u32,
)
fn setStencilFrontReferenceValue_backReferenceValue( &self, front_reference_value: u32, back_reference_value: u32, )
Set the stencil reference value for the back and front stencil buffers independently.
Sourcefn setVisibilityResultMode_offset(
&self,
mode: MTLVisibilityResultMode,
offset: NSUInteger,
)
fn setVisibilityResultMode_offset( &self, mode: MTLVisibilityResultMode, offset: NSUInteger, )
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.
Sourceunsafe fn setColorStoreAction_atIndex(
&self,
store_action: MTLStoreAction,
color_attachment_index: NSUInteger,
)
Available on crate feature MTLRenderPass only.
unsafe fn setColorStoreAction_atIndex( &self, store_action: MTLStoreAction, color_attachment_index: NSUInteger, )
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.
Sourcefn setDepthStoreAction(&self, store_action: MTLStoreAction)
Available on crate feature MTLRenderPass only.
fn setDepthStoreAction(&self, store_action: MTLStoreAction)
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.
Sourcefn setStencilStoreAction(&self, store_action: MTLStoreAction)
Available on crate feature MTLRenderPass only.
fn setStencilStoreAction(&self, store_action: MTLStoreAction)
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.
Sourceunsafe fn setColorStoreActionOptions_atIndex(
&self,
store_action_options: MTLStoreActionOptions,
color_attachment_index: NSUInteger,
)
Available on crate feature MTLRenderPass only.
unsafe fn setColorStoreActionOptions_atIndex( &self, store_action_options: MTLStoreActionOptions, color_attachment_index: NSUInteger, )
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.
Sourcefn setDepthStoreActionOptions(
&self,
store_action_options: MTLStoreActionOptions,
)
Available on crate feature MTLRenderPass only.
fn setDepthStoreActionOptions( &self, store_action_options: MTLStoreActionOptions, )
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.
Sourcefn setStencilStoreActionOptions(
&self,
store_action_options: MTLStoreActionOptions,
)
Available on crate feature MTLRenderPass only.
fn setStencilStoreActionOptions( &self, store_action_options: MTLStoreActionOptions, )
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.
Sourceunsafe fn setObjectBytes_length_atIndex(
&self,
bytes: NonNull<c_void>,
length: NSUInteger,
index: NSUInteger,
)
unsafe fn setObjectBytes_length_atIndex( &self, bytes: NonNull<c_void>, length: NSUInteger, index: NSUInteger, )
Set the data (by copy) for a given object shader buffer binding point. This will remove any existing MTLBuffer from the binding point.
§Safety
bytesmust be a valid pointer.indexmight not be bounds-checked.
Sourceunsafe fn setObjectBuffer_offset_atIndex(
&self,
buffer: Option<&ProtocolObject<dyn MTLBuffer>>,
offset: NSUInteger,
index: NSUInteger,
)
Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
unsafe fn setObjectBuffer_offset_atIndex( &self, buffer: Option<&ProtocolObject<dyn MTLBuffer>>, offset: NSUInteger, index: NSUInteger, )
MTLAllocation and MTLBuffer and MTLResource only.Set a global buffer for all object shaders at the given bind point index.
§Safety
buffermay need to be synchronized.buffermay be unretained, you must ensure it is kept alive while in use.buffercontents should be of the correct type.offsetmight not be bounds-checked.indexmight not be bounds-checked.
Sourceunsafe fn setObjectBufferOffset_atIndex(
&self,
offset: NSUInteger,
index: NSUInteger,
)
unsafe fn setObjectBufferOffset_atIndex( &self, offset: NSUInteger, index: NSUInteger, )
Set the offset within the current global buffer for all object shaders at the given bind point index.
§Safety
offsetmight not be bounds-checked.indexmight not be bounds-checked.
Sourceunsafe fn setObjectBuffers_offsets_withRange(
&self,
buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>,
offsets: NonNull<NSUInteger>,
range: NSRange,
)
Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
unsafe fn setObjectBuffers_offsets_withRange( &self, buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>, offsets: NonNull<NSUInteger>, range: NSRange, )
MTLAllocation and MTLBuffer and MTLResource only.Set an array of global buffers for all object shaders with the given bind point range.
§Safety
buffersmust be a valid pointer.offsetsmight not be bounds-checked.offsetsmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setObjectTexture_atIndex(
&self,
texture: Option<&ProtocolObject<dyn MTLTexture>>,
index: NSUInteger,
)
Available on crate features MTLAllocation and MTLResource and MTLTexture only.
unsafe fn setObjectTexture_atIndex( &self, texture: Option<&ProtocolObject<dyn MTLTexture>>, index: NSUInteger, )
MTLAllocation and MTLResource and MTLTexture only.Set a global texture for all object shaders at the given bind point index.
§Safety
texturemay need to be synchronized.texturemay be unretained, you must ensure it is kept alive while in use.indexmight not be bounds-checked.
Sourceunsafe fn setObjectTextures_withRange(
&self,
textures: NonNull<*const ProtocolObject<dyn MTLTexture>>,
range: NSRange,
)
Available on crate features MTLAllocation and MTLResource and MTLTexture only.
unsafe fn setObjectTextures_withRange( &self, textures: NonNull<*const ProtocolObject<dyn MTLTexture>>, range: NSRange, )
MTLAllocation and MTLResource and MTLTexture only.Set an array of global textures for all object shaders with the given bind point range.
§Safety
texturesmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setObjectSamplerState_atIndex(
&self,
sampler: Option<&ProtocolObject<dyn MTLSamplerState>>,
index: NSUInteger,
)
Available on crate feature MTLSampler only.
unsafe fn setObjectSamplerState_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, index: NSUInteger, )
MTLSampler only.Set a global sampler for all object shaders at the given bind point index.
§Safety
index might not be bounds-checked.
Sourceunsafe fn setObjectSamplerStates_withRange(
&self,
samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>,
range: NSRange,
)
Available on crate feature MTLSampler only.
unsafe fn setObjectSamplerStates_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, range: NSRange, )
MTLSampler only.Set an array of global samplers for all object shaders with the given bind point range.
§Safety
samplersmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setObjectSamplerState_lodMinClamp_lodMaxClamp_atIndex(
&self,
sampler: Option<&ProtocolObject<dyn MTLSamplerState>>,
lod_min_clamp: c_float,
lod_max_clamp: c_float,
index: NSUInteger,
)
Available on crate feature MTLSampler only.
unsafe fn setObjectSamplerState_lodMinClamp_lodMaxClamp_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, lod_min_clamp: c_float, lod_max_clamp: c_float, index: NSUInteger, )
MTLSampler only.Set a global sampler for all object shaders at the given bind point index.
§Safety
index might not be bounds-checked.
Sourceunsafe 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,
)
Available on crate feature MTLSampler only.
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, )
MTLSampler only.Set an array of global samplers for all object shaders with the given bind point range.
§Safety
samplersmust be a valid pointer.lod_min_clampsmust be a valid pointer.lod_max_clampsmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setObjectThreadgroupMemoryLength_atIndex(
&self,
length: NSUInteger,
index: NSUInteger,
)
unsafe fn setObjectThreadgroupMemoryLength_atIndex( &self, length: NSUInteger, index: NSUInteger, )
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.
Sourceunsafe fn setMeshBytes_length_atIndex(
&self,
bytes: NonNull<c_void>,
length: NSUInteger,
index: NSUInteger,
)
unsafe fn setMeshBytes_length_atIndex( &self, bytes: NonNull<c_void>, length: NSUInteger, index: NSUInteger, )
Set the data (by copy) for a given mesh shader buffer binding point. This will remove any existing MTLBuffer from the binding point.
§Safety
bytesmust be a valid pointer.indexmight not be bounds-checked.
Sourceunsafe fn setMeshBuffer_offset_atIndex(
&self,
buffer: Option<&ProtocolObject<dyn MTLBuffer>>,
offset: NSUInteger,
index: NSUInteger,
)
Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
unsafe fn setMeshBuffer_offset_atIndex( &self, buffer: Option<&ProtocolObject<dyn MTLBuffer>>, offset: NSUInteger, index: NSUInteger, )
MTLAllocation and MTLBuffer and MTLResource only.Set a global buffer for all mesh shaders at the given bind point index.
§Safety
buffermay need to be synchronized.buffermay be unretained, you must ensure it is kept alive while in use.buffercontents should be of the correct type.offsetmight not be bounds-checked.indexmight not be bounds-checked.
Sourceunsafe fn setMeshBufferOffset_atIndex(
&self,
offset: NSUInteger,
index: NSUInteger,
)
unsafe fn setMeshBufferOffset_atIndex( &self, offset: NSUInteger, index: NSUInteger, )
Set the offset within the current global buffer for all mesh shaders at the given bind point index.
§Safety
offsetmight not be bounds-checked.indexmight not be bounds-checked.
Sourceunsafe fn setMeshBuffers_offsets_withRange(
&self,
buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>,
offsets: NonNull<NSUInteger>,
range: NSRange,
)
Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
unsafe fn setMeshBuffers_offsets_withRange( &self, buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>, offsets: NonNull<NSUInteger>, range: NSRange, )
MTLAllocation and MTLBuffer and MTLResource only.Set an array of global buffers for all mesh shaders with the given bind point range.
§Safety
buffersmust be a valid pointer.offsetsmight not be bounds-checked.offsetsmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setMeshTexture_atIndex(
&self,
texture: Option<&ProtocolObject<dyn MTLTexture>>,
index: NSUInteger,
)
Available on crate features MTLAllocation and MTLResource and MTLTexture only.
unsafe fn setMeshTexture_atIndex( &self, texture: Option<&ProtocolObject<dyn MTLTexture>>, index: NSUInteger, )
MTLAllocation and MTLResource and MTLTexture only.Set a global texture for all mesh shaders at the given bind point index.
§Safety
texturemay need to be synchronized.texturemay be unretained, you must ensure it is kept alive while in use.indexmight not be bounds-checked.
Sourceunsafe fn setMeshTextures_withRange(
&self,
textures: NonNull<*const ProtocolObject<dyn MTLTexture>>,
range: NSRange,
)
Available on crate features MTLAllocation and MTLResource and MTLTexture only.
unsafe fn setMeshTextures_withRange( &self, textures: NonNull<*const ProtocolObject<dyn MTLTexture>>, range: NSRange, )
MTLAllocation and MTLResource and MTLTexture only.Set an array of global textures for all mesh shaders with the given bind point range.
§Safety
texturesmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setMeshSamplerState_atIndex(
&self,
sampler: Option<&ProtocolObject<dyn MTLSamplerState>>,
index: NSUInteger,
)
Available on crate feature MTLSampler only.
unsafe fn setMeshSamplerState_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, index: NSUInteger, )
MTLSampler only.Set a global sampler for all mesh shaders at the given bind point index.
§Safety
index might not be bounds-checked.
Sourceunsafe fn setMeshSamplerStates_withRange(
&self,
samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>,
range: NSRange,
)
Available on crate feature MTLSampler only.
unsafe fn setMeshSamplerStates_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, range: NSRange, )
MTLSampler only.Set an array of global samplers for all mesh shaders with the given bind point range.
§Safety
samplersmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setMeshSamplerState_lodMinClamp_lodMaxClamp_atIndex(
&self,
sampler: Option<&ProtocolObject<dyn MTLSamplerState>>,
lod_min_clamp: c_float,
lod_max_clamp: c_float,
index: NSUInteger,
)
Available on crate feature MTLSampler only.
unsafe fn setMeshSamplerState_lodMinClamp_lodMaxClamp_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, lod_min_clamp: c_float, lod_max_clamp: c_float, index: NSUInteger, )
MTLSampler only.Set a global sampler for all mesh shaders at the given bind point index.
§Safety
index might not be bounds-checked.
Sourceunsafe 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,
)
Available on crate feature MTLSampler only.
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, )
MTLSampler only.Set an array of global samplers for all mesh shaders with the given bind point range.
§Safety
samplersmust be a valid pointer.lod_min_clampsmust be a valid pointer.lod_max_clampsmust be a valid pointer.rangemight not be bounds-checked.
Sourcefn drawMeshThreadgroups_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup(
&self,
threadgroups_per_grid: MTLSize,
threads_per_object_threadgroup: MTLSize,
threads_per_mesh_threadgroup: MTLSize,
)
Available on crate feature MTLTypes only.
fn drawMeshThreadgroups_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup( &self, threadgroups_per_grid: MTLSize, threads_per_object_threadgroup: MTLSize, threads_per_mesh_threadgroup: MTLSize, )
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.
Sourcefn drawMeshThreads_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup(
&self,
threads_per_grid: MTLSize,
threads_per_object_threadgroup: MTLSize,
threads_per_mesh_threadgroup: MTLSize,
)
Available on crate feature MTLTypes only.
fn drawMeshThreads_threadsPerObjectThreadgroup_threadsPerMeshThreadgroup( &self, threads_per_grid: MTLSize, threads_per_object_threadgroup: MTLSize, threads_per_mesh_threadgroup: MTLSize, )
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.
Sourceunsafe 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,
)
Available on crate features MTLAllocation and MTLBuffer and MTLResource and MTLTypes only.
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, )
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_buffermay need to be synchronized.indirect_buffermay be unretained, you must ensure it is kept alive while in use.indirect_buffercontents should be of the correct type.indirectBufferOffsetmight not be bounds-checked.
Sourceunsafe fn drawPrimitives_vertexStart_vertexCount_instanceCount(
&self,
primitive_type: MTLPrimitiveType,
vertex_start: NSUInteger,
vertex_count: NSUInteger,
instance_count: NSUInteger,
)
unsafe fn drawPrimitives_vertexStart_vertexCount_instanceCount( &self, primitive_type: MTLPrimitiveType, vertex_start: NSUInteger, vertex_count: NSUInteger, instance_count: NSUInteger, )
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
vertexCountmight not be bounds-checked.instanceCountmight not be bounds-checked.
Sourceunsafe fn drawPrimitives_vertexStart_vertexCount(
&self,
primitive_type: MTLPrimitiveType,
vertex_start: NSUInteger,
vertex_count: NSUInteger,
)
unsafe fn drawPrimitives_vertexStart_vertexCount( &self, primitive_type: MTLPrimitiveType, vertex_start: NSUInteger, vertex_count: NSUInteger, )
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.
Sourceunsafe 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,
)
Available on crate features MTLAllocation and MTLArgument and MTLBuffer and MTLResource only.
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, )
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
indexCountmight not be bounds-checked.index_buffermay need to be synchronized.index_buffermay be unretained, you must ensure it is kept alive while in use.index_buffercontents should be of the correct type.indexBufferOffsetmight not be bounds-checked.instanceCountmight not be bounds-checked.
Sourceunsafe 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,
)
Available on crate features MTLAllocation and MTLArgument and MTLBuffer and MTLResource only.
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, )
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
indexCountmight not be bounds-checked.index_buffermay need to be synchronized.index_buffermay be unretained, you must ensure it is kept alive while in use.index_buffercontents should be of the correct type.indexBufferOffsetmight not be bounds-checked.
Sourceunsafe fn drawPrimitives_vertexStart_vertexCount_instanceCount_baseInstance(
&self,
primitive_type: MTLPrimitiveType,
vertex_start: NSUInteger,
vertex_count: NSUInteger,
instance_count: NSUInteger,
base_instance: NSUInteger,
)
unsafe fn drawPrimitives_vertexStart_vertexCount_instanceCount_baseInstance( &self, primitive_type: MTLPrimitiveType, vertex_start: NSUInteger, vertex_count: NSUInteger, instance_count: NSUInteger, base_instance: NSUInteger, )
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
vertexCountmight not be bounds-checked.instanceCountmight not be bounds-checked.
Sourceunsafe 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,
)
Available on crate features MTLAllocation and MTLArgument and MTLBuffer and MTLResource only.
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, )
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
indexCountmight not be bounds-checked.index_buffermay need to be synchronized.index_buffermay be unretained, you must ensure it is kept alive while in use.index_buffercontents should be of the correct type.indexBufferOffsetmight not be bounds-checked.instanceCountmight not be bounds-checked.
Sourceunsafe fn drawPrimitives_indirectBuffer_indirectBufferOffset(
&self,
primitive_type: MTLPrimitiveType,
indirect_buffer: &ProtocolObject<dyn MTLBuffer>,
indirect_buffer_offset: NSUInteger,
)
Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
unsafe fn drawPrimitives_indirectBuffer_indirectBufferOffset( &self, primitive_type: MTLPrimitiveType, indirect_buffer: &ProtocolObject<dyn MTLBuffer>, indirect_buffer_offset: NSUInteger, )
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_buffermay need to be synchronized.indirect_buffermay be unretained, you must ensure it is kept alive while in use.indirect_buffercontents should be of the correct type.indirectBufferOffsetmight not be bounds-checked.
Sourceunsafe 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,
)
Available on crate features MTLAllocation and MTLArgument and MTLBuffer and MTLResource only.
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, )
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_buffermay need to be synchronized.index_buffermay be unretained, you must ensure it is kept alive while in use.index_buffercontents should be of the correct type.indexBufferOffsetmight not be bounds-checked.indirect_buffermay need to be synchronized.indirect_buffermay be unretained, you must ensure it is kept alive while in use.indirect_buffercontents should be of the correct type.indirectBufferOffsetmight not be bounds-checked.
Sourcefn textureBarrier(&self)
👎Deprecated
fn textureBarrier(&self)
Ensure that following fragment shaders can read textures written by previous draw calls (in particular the framebuffer)
Sourcefn updateFence_afterStages(
&self,
fence: &ProtocolObject<dyn MTLFence>,
stages: MTLRenderStages,
)
Available on crate feature MTLFence only.
fn updateFence_afterStages( &self, fence: &ProtocolObject<dyn MTLFence>, stages: MTLRenderStages, )
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.
Sourcefn waitForFence_beforeStages(
&self,
fence: &ProtocolObject<dyn MTLFence>,
stages: MTLRenderStages,
)
Available on crate feature MTLFence only.
fn waitForFence_beforeStages( &self, fence: &ProtocolObject<dyn MTLFence>, stages: MTLRenderStages, )
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.
Sourceunsafe fn setTessellationFactorBuffer_offset_instanceStride(
&self,
buffer: Option<&ProtocolObject<dyn MTLBuffer>>,
offset: NSUInteger,
instance_stride: NSUInteger,
)
Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
unsafe fn setTessellationFactorBuffer_offset_instanceStride( &self, buffer: Option<&ProtocolObject<dyn MTLBuffer>>, offset: NSUInteger, instance_stride: NSUInteger, )
MTLAllocation and MTLBuffer and MTLResource only.§Safety
buffermay need to be synchronized.buffermay be unretained, you must ensure it is kept alive while in use.buffercontents should be of the correct type.offsetmight not be bounds-checked.instanceStridemight not be bounds-checked.
fn setTessellationFactorScale(&self, scale: c_float)
Sourceunsafe 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,
)
Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
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, )
MTLAllocation and MTLBuffer and MTLResource only.§Safety
patchCountmight not be bounds-checked.patch_index_buffermay need to be synchronized.patch_index_buffermay be unretained, you must ensure it is kept alive while in use.patch_index_buffercontents should be of the correct type.patchIndexBufferOffsetmight not be bounds-checked.instanceCountmight not be bounds-checked.
Sourceunsafe 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,
)
Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
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, )
MTLAllocation and MTLBuffer and MTLResource only.§Safety
patch_index_buffermay need to be synchronized.patch_index_buffermay be unretained, you must ensure it is kept alive while in use.patch_index_buffercontents should be of the correct type.patchIndexBufferOffsetmight not be bounds-checked.indirect_buffermay need to be synchronized.indirect_buffermay be unretained, you must ensure it is kept alive while in use.indirect_buffercontents should be of the correct type.indirectBufferOffsetmight not be bounds-checked.
Sourceunsafe 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,
)
Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
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, )
MTLAllocation and MTLBuffer and MTLResource only.§Safety
patchCountmight not be bounds-checked.patch_index_buffermay need to be synchronized.patch_index_buffermay be unretained, you must ensure it is kept alive while in use.patch_index_buffercontents should be of the correct type.patchIndexBufferOffsetmight not be bounds-checked.control_point_index_buffermay need to be synchronized.control_point_index_buffermay be unretained, you must ensure it is kept alive while in use.control_point_index_buffercontents should be of the correct type.controlPointIndexBufferOffsetmight not be bounds-checked.instanceCountmight not be bounds-checked.
Sourceunsafe 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,
)
Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
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, )
MTLAllocation and MTLBuffer and MTLResource only.§Safety
patch_index_buffermay need to be synchronized.patch_index_buffermay be unretained, you must ensure it is kept alive while in use.patch_index_buffercontents should be of the correct type.patchIndexBufferOffsetmight not be bounds-checked.control_point_index_buffermay need to be synchronized.control_point_index_buffermay be unretained, you must ensure it is kept alive while in use.control_point_index_buffercontents should be of the correct type.controlPointIndexBufferOffsetmight not be bounds-checked.indirect_buffermay need to be synchronized.indirect_buffermay be unretained, you must ensure it is kept alive while in use.indirect_buffercontents should be of the correct type.indirectBufferOffsetmight not be bounds-checked.
Sourcefn tileWidth(&self) -> NSUInteger
fn tileWidth(&self) -> NSUInteger
The width of the tile for this render pass.
Sourcefn tileHeight(&self) -> NSUInteger
fn tileHeight(&self) -> NSUInteger
The height of the tile for this render pass.
Sourceunsafe fn setTileBytes_length_atIndex(
&self,
bytes: NonNull<c_void>,
length: NSUInteger,
index: NSUInteger,
)
unsafe fn setTileBytes_length_atIndex( &self, bytes: NonNull<c_void>, length: NSUInteger, index: NSUInteger, )
Set the data (by copy) for a given tile buffer binding point. This will remove any existing MTLBuffer from the binding point.
§Safety
bytesmust be a valid pointer.indexmight not be bounds-checked.
Sourceunsafe fn setTileBuffer_offset_atIndex(
&self,
buffer: Option<&ProtocolObject<dyn MTLBuffer>>,
offset: NSUInteger,
index: NSUInteger,
)
Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
unsafe fn setTileBuffer_offset_atIndex( &self, buffer: Option<&ProtocolObject<dyn MTLBuffer>>, offset: NSUInteger, index: NSUInteger, )
MTLAllocation and MTLBuffer and MTLResource only.Set a global buffer for all tile shaders at the given bind point index.
§Safety
buffermay need to be synchronized.buffermay be unretained, you must ensure it is kept alive while in use.buffercontents should be of the correct type.offsetmight not be bounds-checked.indexmight not be bounds-checked.
Sourceunsafe fn setTileBufferOffset_atIndex(
&self,
offset: NSUInteger,
index: NSUInteger,
)
unsafe fn setTileBufferOffset_atIndex( &self, offset: NSUInteger, index: NSUInteger, )
Set the offset within the current global buffer for all tile shaders at the given bind point index.
§Safety
offsetmight not be bounds-checked.indexmight not be bounds-checked.
Sourceunsafe fn setTileBuffers_offsets_withRange(
&self,
buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>,
offsets: NonNull<NSUInteger>,
range: NSRange,
)
Available on crate features MTLAllocation and MTLBuffer and MTLResource only.
unsafe fn setTileBuffers_offsets_withRange( &self, buffers: NonNull<*const ProtocolObject<dyn MTLBuffer>>, offsets: NonNull<NSUInteger>, range: NSRange, )
MTLAllocation and MTLBuffer and MTLResource only.Set an array of global buffers for all tile shaders with the given bind point range.
§Safety
buffersmust be a valid pointer.offsetsmight not be bounds-checked.offsetsmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setTileTexture_atIndex(
&self,
texture: Option<&ProtocolObject<dyn MTLTexture>>,
index: NSUInteger,
)
Available on crate features MTLAllocation and MTLResource and MTLTexture only.
unsafe fn setTileTexture_atIndex( &self, texture: Option<&ProtocolObject<dyn MTLTexture>>, index: NSUInteger, )
MTLAllocation and MTLResource and MTLTexture only.Set a global texture for all tile shaders at the given bind point index.
§Safety
texturemay need to be synchronized.texturemay be unretained, you must ensure it is kept alive while in use.indexmight not be bounds-checked.
Sourceunsafe fn setTileTextures_withRange(
&self,
textures: NonNull<*const ProtocolObject<dyn MTLTexture>>,
range: NSRange,
)
Available on crate features MTLAllocation and MTLResource and MTLTexture only.
unsafe fn setTileTextures_withRange( &self, textures: NonNull<*const ProtocolObject<dyn MTLTexture>>, range: NSRange, )
MTLAllocation and MTLResource and MTLTexture only.Set an array of global textures for all tile shaders with the given bind point range.
§Safety
texturesmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setTileSamplerState_atIndex(
&self,
sampler: Option<&ProtocolObject<dyn MTLSamplerState>>,
index: NSUInteger,
)
Available on crate feature MTLSampler only.
unsafe fn setTileSamplerState_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, index: NSUInteger, )
MTLSampler only.Set a global sampler for all tile shaders at the given bind point index.
§Safety
index might not be bounds-checked.
Sourceunsafe fn setTileSamplerStates_withRange(
&self,
samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>,
range: NSRange,
)
Available on crate feature MTLSampler only.
unsafe fn setTileSamplerStates_withRange( &self, samplers: NonNull<*const ProtocolObject<dyn MTLSamplerState>>, range: NSRange, )
MTLSampler only.Set an array of global samplers for all fragment shaders with the given bind point range.
§Safety
samplersmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setTileSamplerState_lodMinClamp_lodMaxClamp_atIndex(
&self,
sampler: Option<&ProtocolObject<dyn MTLSamplerState>>,
lod_min_clamp: c_float,
lod_max_clamp: c_float,
index: NSUInteger,
)
Available on crate feature MTLSampler only.
unsafe fn setTileSamplerState_lodMinClamp_lodMaxClamp_atIndex( &self, sampler: Option<&ProtocolObject<dyn MTLSamplerState>>, lod_min_clamp: c_float, lod_max_clamp: c_float, index: NSUInteger, )
MTLSampler only.Set a global sampler for all tile shaders at the given bind point index.
§Safety
index might not be bounds-checked.
Sourceunsafe 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,
)
Available on crate feature MTLSampler only.
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, )
MTLSampler only.Set an array of global samplers for all tile shaders with the given bind point range.
§Safety
samplersmust be a valid pointer.lod_min_clampsmust be a valid pointer.lod_max_clampsmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setTileVisibleFunctionTable_atBufferIndex(
&self,
function_table: Option<&ProtocolObject<dyn MTLVisibleFunctionTable>>,
buffer_index: NSUInteger,
)
Available on crate features MTLAllocation and MTLResource and MTLVisibleFunctionTable only.
unsafe fn setTileVisibleFunctionTable_atBufferIndex( &self, function_table: Option<&ProtocolObject<dyn MTLVisibleFunctionTable>>, buffer_index: NSUInteger, )
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_tablemay need to be synchronized.function_tablemay be unretained, you must ensure it is kept alive while in use.bufferIndexmight not be bounds-checked.
Sourceunsafe fn setTileVisibleFunctionTables_withBufferRange(
&self,
function_tables: NonNull<*const ProtocolObject<dyn MTLVisibleFunctionTable>>,
range: NSRange,
)
Available on crate features MTLAllocation and MTLResource and MTLVisibleFunctionTable only.
unsafe fn setTileVisibleFunctionTables_withBufferRange( &self, function_tables: NonNull<*const ProtocolObject<dyn MTLVisibleFunctionTable>>, range: NSRange, )
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_tablesmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setTileIntersectionFunctionTable_atBufferIndex(
&self,
intersection_function_table: Option<&ProtocolObject<dyn MTLIntersectionFunctionTable>>,
buffer_index: NSUInteger,
)
Available on crate features MTLAllocation and MTLIntersectionFunctionTable and MTLResource only.
unsafe fn setTileIntersectionFunctionTable_atBufferIndex( &self, intersection_function_table: Option<&ProtocolObject<dyn MTLIntersectionFunctionTable>>, buffer_index: NSUInteger, )
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_tablemay need to be synchronized.intersection_function_tablemay be unretained, you must ensure it is kept alive while in use.bufferIndexmight not be bounds-checked.
Sourceunsafe fn setTileIntersectionFunctionTables_withBufferRange(
&self,
intersection_function_tables: NonNull<*const ProtocolObject<dyn MTLIntersectionFunctionTable>>,
range: NSRange,
)
Available on crate features MTLAllocation and MTLIntersectionFunctionTable and MTLResource only.
unsafe fn setTileIntersectionFunctionTables_withBufferRange( &self, intersection_function_tables: NonNull<*const ProtocolObject<dyn MTLIntersectionFunctionTable>>, range: NSRange, )
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_tablesmust be a valid pointer.rangemight not be bounds-checked.
Sourceunsafe fn setTileAccelerationStructure_atBufferIndex(
&self,
acceleration_structure: Option<&ProtocolObject<dyn MTLAccelerationStructure>>,
buffer_index: NSUInteger,
)
Available on crate features MTLAccelerationStructure and MTLAllocation and MTLResource only.
unsafe fn setTileAccelerationStructure_atBufferIndex( &self, acceleration_structure: Option<&ProtocolObject<dyn MTLAccelerationStructure>>, buffer_index: NSUInteger, )
MTLAccelerationStructure and MTLAllocation and MTLResource only.Set a global acceleration structure for all tile shaders at the given buffer bind point index.
§Safety
acceleration_structuremay need to be synchronized.acceleration_structuremay be unretained, you must ensure it is kept alive while in use.bufferIndexmight not be bounds-checked.
Sourcefn dispatchThreadsPerTile(&self, threads_per_tile: MTLSize)
Available on crate feature MTLTypes only.
fn dispatchThreadsPerTile(&self, threads_per_tile: MTLSize)
MTLTypes only.dispatch threads to perform a mid-render compute operation.
Sourceunsafe fn setThreadgroupMemoryLength_offset_atIndex(
&self,
length: NSUInteger,
offset: NSUInteger,
index: NSUInteger,
)
unsafe fn setThreadgroupMemoryLength_offset_atIndex( &self, length: NSUInteger, offset: NSUInteger, index: NSUInteger, )
Set the size of the threadgroup memory argument at the given bind point index and offset.
§Safety
offsetmight not be bounds-checked.indexmight not be bounds-checked.
Sourcefn useResource_usage(
&self,
resource: &ProtocolObject<dyn MTLResource>,
usage: MTLResourceUsage,
)
👎DeprecatedAvailable on crate features MTLAllocation and MTLResource only.
fn useResource_usage( &self, resource: &ProtocolObject<dyn MTLResource>, usage: MTLResourceUsage, )
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.
Sourceunsafe fn useResources_count_usage(
&self,
resources: NonNull<NonNull<ProtocolObject<dyn MTLResource>>>,
count: NSUInteger,
usage: MTLResourceUsage,
)
👎DeprecatedAvailable on crate features MTLAllocation and MTLResource only.
unsafe fn useResources_count_usage( &self, resources: NonNull<NonNull<ProtocolObject<dyn MTLResource>>>, count: NSUInteger, usage: MTLResourceUsage, )
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
resourcesmust be a valid pointer.countmight not be bounds-checked.
Sourcefn useResource_usage_stages(
&self,
resource: &ProtocolObject<dyn MTLResource>,
usage: MTLResourceUsage,
stages: MTLRenderStages,
)
Available on crate features MTLAllocation and MTLResource only.
fn useResource_usage_stages( &self, resource: &ProtocolObject<dyn MTLResource>, usage: MTLResourceUsage, stages: MTLRenderStages, )
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.
Sourceunsafe fn useResources_count_usage_stages(
&self,
resources: NonNull<NonNull<ProtocolObject<dyn MTLResource>>>,
count: NSUInteger,
usage: MTLResourceUsage,
stages: MTLRenderStages,
)
Available on crate features MTLAllocation and MTLResource only.
unsafe fn useResources_count_usage_stages( &self, resources: NonNull<NonNull<ProtocolObject<dyn MTLResource>>>, count: NSUInteger, usage: MTLResourceUsage, stages: MTLRenderStages, )
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
resourcesmust be a valid pointer.countmight not be bounds-checked.
Sourcefn useHeap(&self, heap: &ProtocolObject<dyn MTLHeap>)
👎DeprecatedAvailable on crate features MTLAllocation and MTLHeap only.
fn useHeap(&self, heap: &ProtocolObject<dyn MTLHeap>)
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.
Sourceunsafe fn useHeaps_count(
&self,
heaps: NonNull<NonNull<ProtocolObject<dyn MTLHeap>>>,
count: NSUInteger,
)
👎DeprecatedAvailable on crate features MTLAllocation and MTLHeap only.
unsafe fn useHeaps_count( &self, heaps: NonNull<NonNull<ProtocolObject<dyn MTLHeap>>>, count: NSUInteger, )
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
heapsmust be a valid pointer.countmight not be bounds-checked.
Sourcefn useHeap_stages(
&self,
heap: &ProtocolObject<dyn MTLHeap>,
stages: MTLRenderStages,
)
Available on crate features MTLAllocation and MTLHeap only.
fn useHeap_stages( &self, heap: &ProtocolObject<dyn MTLHeap>, stages: MTLRenderStages, )
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.
Sourceunsafe fn useHeaps_count_stages(
&self,
heaps: NonNull<NonNull<ProtocolObject<dyn MTLHeap>>>,
count: NSUInteger,
stages: MTLRenderStages,
)
Available on crate features MTLAllocation and MTLHeap only.
unsafe fn useHeaps_count_stages( &self, heaps: NonNull<NonNull<ProtocolObject<dyn MTLHeap>>>, count: NSUInteger, stages: MTLRenderStages, )
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
heapsmust be a valid pointer.countmight not be bounds-checked.
Sourceunsafe fn executeCommandsInBuffer_withRange(
&self,
indirect_command_buffer: &ProtocolObject<dyn MTLIndirectCommandBuffer>,
execution_range: NSRange,
)
Available on crate features MTLAllocation and MTLIndirectCommandBuffer and MTLResource only.
unsafe fn executeCommandsInBuffer_withRange( &self, indirect_command_buffer: &ProtocolObject<dyn MTLIndirectCommandBuffer>, execution_range: NSRange, )
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_buffermay need to be synchronized.indirect_command_buffermay be unretained, you must ensure it is kept alive while in use.executionRangemight not be bounds-checked.
Sourceunsafe fn executeCommandsInBuffer_indirectBuffer_indirectBufferOffset(
&self,
indirect_commandbuffer: &ProtocolObject<dyn MTLIndirectCommandBuffer>,
indirect_range_buffer: &ProtocolObject<dyn MTLBuffer>,
indirect_buffer_offset: NSUInteger,
)
Available on crate features MTLAllocation and MTLBuffer and MTLIndirectCommandBuffer and MTLResource only.
unsafe fn executeCommandsInBuffer_indirectBuffer_indirectBufferOffset( &self, indirect_commandbuffer: &ProtocolObject<dyn MTLIndirectCommandBuffer>, indirect_range_buffer: &ProtocolObject<dyn MTLBuffer>, indirect_buffer_offset: NSUInteger, )
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_commandbuffermay need to be synchronized.indirect_commandbuffermay be unretained, you must ensure it is kept alive while in use.indirect_range_buffermay need to be synchronized.indirect_range_buffermay be unretained, you must ensure it is kept alive while in use.indirect_range_buffercontents should be of the correct type.indirectBufferOffsetmight not be bounds-checked.
Sourcefn memoryBarrierWithScope_afterStages_beforeStages(
&self,
scope: MTLBarrierScope,
after: MTLRenderStages,
before: MTLRenderStages,
)
fn memoryBarrierWithScope_afterStages_beforeStages( &self, scope: MTLBarrierScope, after: MTLRenderStages, before: MTLRenderStages, )
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.
Sourceunsafe fn memoryBarrierWithResources_count_afterStages_beforeStages(
&self,
resources: NonNull<NonNull<ProtocolObject<dyn MTLResource>>>,
count: NSUInteger,
after: MTLRenderStages,
before: MTLRenderStages,
)
Available on crate features MTLAllocation and MTLResource only.
unsafe fn memoryBarrierWithResources_count_afterStages_beforeStages( &self, resources: NonNull<NonNull<ProtocolObject<dyn MTLResource>>>, count: NSUInteger, after: MTLRenderStages, before: MTLRenderStages, )
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
resourcesmust be a valid pointer.countmight not be bounds-checked.
Sourceunsafe fn sampleCountersInBuffer_atSampleIndex_withBarrier(
&self,
sample_buffer: &ProtocolObject<dyn MTLCounterSampleBuffer>,
sample_index: NSUInteger,
barrier: bool,
)
Available on crate feature MTLCounters only.
unsafe fn sampleCountersInBuffer_atSampleIndex_withBarrier( &self, sample_buffer: &ProtocolObject<dyn MTLCounterSampleBuffer>, sample_index: NSUInteger, barrier: bool, )
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.
Sourcefn setColorAttachmentMap(
&self,
mapping: Option<&MTLLogicalToPhysicalColorAttachmentMap>,
)
Available on crate feature MTLRenderPipeline only.
fn setColorAttachmentMap( &self, mapping: Option<&MTLLogicalToPhysicalColorAttachmentMap>, )
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.