pub struct ComputeCommandEncoderRef(/* private fields */);Expand description
A borrowed reference to a ComputeCommandEncoder.
Implementations§
Source§impl ComputeCommandEncoderRef
impl ComputeCommandEncoderRef
pub fn set_compute_pipeline_state(&self, state: &ComputePipelineStateRef)
pub fn set_buffer( &self, index: NSUInteger, buffer: Option<&BufferRef>, offset: NSUInteger, )
pub fn set_buffers( &self, start_index: NSUInteger, data: &[Option<&BufferRef>], offsets: &[NSUInteger], )
pub fn set_texture(&self, index: NSUInteger, texture: Option<&TextureRef>)
pub fn set_textures( &self, start_index: NSUInteger, data: &[Option<&TextureRef>], )
pub fn set_sampler_state( &self, index: NSUInteger, sampler: Option<&SamplerStateRef>, )
pub fn set_sampler_states( &self, start_index: NSUInteger, data: &[Option<&SamplerStateRef>], )
pub fn set_sampler_state_with_lod( &self, index: NSUInteger, sampler: Option<&SamplerStateRef>, lod_clamp: Range<f32>, )
pub fn set_bytes( &self, index: NSUInteger, length: NSUInteger, bytes: *const c_void, )
pub fn set_visible_function_table( &self, buffer_index: NSUInteger, visible_function_table: Option<&VisibleFunctionTableRef>, )
pub fn set_visible_function_tables( &self, buffer_start_index: NSUInteger, visible_function_tables: &[&VisibleFunctionTableRef], )
pub fn dispatch_thread_groups( &self, thread_groups_count: MTLSize, threads_per_threadgroup: MTLSize, )
pub fn dispatch_threads( &self, threads_per_grid: MTLSize, threads_per_thread_group: MTLSize, )
pub fn dispatch_thread_groups_indirect( &self, buffer: &BufferRef, offset: NSUInteger, threads_per_threadgroup: MTLSize, )
pub fn set_threadgroup_memory_length( &self, at_index: NSUInteger, size: NSUInteger, )
Sourcepub fn memory_barrier_with_resources(&self, resources: &[&ResourceRef])
pub fn memory_barrier_with_resources(&self, resources: &[&ResourceRef])
Encodes a barrier so that changes to a set of resources made by commands encoded before the barrier are completed before further commands are executed.
Availability: iOS 12.0+, macOS 10.14+
§Arguments
resources: A slice of resources.
Sourcepub fn use_resource(&self, resource: &ResourceRef, usage: MTLResourceUsage)
pub fn use_resource(&self, resource: &ResourceRef, usage: MTLResourceUsage)
Specifies that a resource in an argument buffer can be safely used by a compute pass.
Availability: iOS 11.0+, macOS 10.13+
§Arguments
resource: A specific resource within an argument buffer.usage: The options that describe how the resource will be used by a compute function.
Sourcepub fn use_resources(&self, resources: &[&ResourceRef], usage: MTLResourceUsage)
pub fn use_resources(&self, resources: &[&ResourceRef], usage: MTLResourceUsage)
Specifies that an array of resources in an argument buffer can be safely used by a compute pass.
Availability: iOS 11.0+, macOS 10.13+
See https://developer.apple.com/documentation/metal/mtlcomputecommandencoder/2866561-useresources
§Arguments
resources: A slice of resources within an argument buffer.usage: The options that describe how the array of resources will be used by a compute function.
Sourcepub fn use_heap(&self, heap: &HeapRef)
pub fn use_heap(&self, heap: &HeapRef)
Specifies that a heap containing resources in an argument buffer can be safely used by a compute pass.
Availability: iOS 11.0+, macOS 10.13+
See https://developer.apple.com/documentation/metal/mtlcomputecommandencoder/2866530-useheap
§Arguments
heap: A heap that contains resources within an argument buffer.
Sourcepub fn use_heaps(&self, heaps: &[&HeapRef])
pub fn use_heaps(&self, heaps: &[&HeapRef])
Specifies that an array of heaps containing resources in an argument buffer can be safely used by a compute pass.
Availability: iOS 11.0+, macOS 10.13+
§Arguments
heaps: A slice of heaps that contains resources within an argument buffer.
pub fn update_fence(&self, fence: &FenceRef)
pub fn wait_for_fence(&self, fence: &FenceRef)
Sourcepub fn set_acceleration_structure(
&self,
index: NSUInteger,
accel: Option<&AccelerationStructureRef>,
)
pub fn set_acceleration_structure( &self, index: NSUInteger, accel: Option<&AccelerationStructureRef>, )
Only available in (macos(11.0), ios(14.0))
Sourcepub fn set_intersection_function_table(
&self,
index: NSUInteger,
table: Option<&IntersectionFunctionTableRef>,
)
pub fn set_intersection_function_table( &self, index: NSUInteger, table: Option<&IntersectionFunctionTableRef>, )
Only available in (macos(11.0), ios(14.0))