pub struct ComputePipelineState(/* private fields */);Expand description
A compiled compute pipeline configuration.
C++ equivalent: MTL::ComputePipelineState
Implementations§
Source§impl ComputePipelineState
impl ComputePipelineState
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create a ComputePipelineState from a raw pointer.
§Safety
The pointer must be a valid Metal compute pipeline state object.
Sourcepub fn max_total_threads_per_threadgroup(&self) -> UInteger
pub fn max_total_threads_per_threadgroup(&self) -> UInteger
Get the maximum total threads per threadgroup.
C++ equivalent: NS::UInteger maxTotalThreadsPerThreadgroup() const
Sourcepub fn thread_execution_width(&self) -> UInteger
pub fn thread_execution_width(&self) -> UInteger
Get the thread execution width.
C++ equivalent: NS::UInteger threadExecutionWidth() const
Sourcepub fn static_threadgroup_memory_length(&self) -> UInteger
pub fn static_threadgroup_memory_length(&self) -> UInteger
Get the static threadgroup memory length.
C++ equivalent: NS::UInteger staticThreadgroupMemoryLength() const
Sourcepub fn support_indirect_command_buffers(&self) -> bool
pub fn support_indirect_command_buffers(&self) -> bool
Check if the pipeline supports indirect command buffers.
C++ equivalent: bool supportIndirectCommandBuffers() const
Sourcepub fn imageblock_memory_length(&self, dimensions: Size) -> UInteger
pub fn imageblock_memory_length(&self, dimensions: Size) -> UInteger
Get the imageblock memory length for given imageblock dimensions.
C++ equivalent: NS::UInteger imageblockMemoryLength(MTL::Size imageblockDimensions)
Sourcepub fn gpu_resource_id(&self) -> ResourceID
pub fn gpu_resource_id(&self) -> ResourceID
Get the GPU resource ID for bindless access.
C++ equivalent: ResourceID gpuResourceID() const
Sourcepub fn shader_validation(&self) -> ShaderValidation
pub fn shader_validation(&self) -> ShaderValidation
Get the shader validation mode.
C++ equivalent: ShaderValidation shaderValidation() const
Sourcepub fn required_threads_per_threadgroup(&self) -> Size
pub fn required_threads_per_threadgroup(&self) -> Size
Get the required threads per threadgroup.
C++ equivalent: Size requiredThreadsPerThreadgroup() const
Sourcepub fn function_handle_with_name(&self, name: &str) -> Option<FunctionHandle>
pub fn function_handle_with_name(&self, name: &str) -> Option<FunctionHandle>
Get a function handle for a function by name.
C++ equivalent: FunctionHandle* functionHandle(const NS::String* name)
Sourcepub fn function_handle_with_function(
&self,
function: &Function,
) -> Option<FunctionHandle>
pub fn function_handle_with_function( &self, function: &Function, ) -> Option<FunctionHandle>
Get a function handle for a function.
C++ equivalent: FunctionHandle* functionHandle(const MTL::Function* function)
Sourcepub fn function_handle_with_binary_function(
&self,
binary_function: *const c_void,
) -> Option<FunctionHandle>
pub fn function_handle_with_binary_function( &self, binary_function: *const c_void, ) -> Option<FunctionHandle>
Get a function handle for a binary function.
C++ equivalent: FunctionHandle* functionHandle(const MTL4::BinaryFunction* function)
Sourcepub fn new_compute_pipeline_state_with_functions(
&self,
functions: *const c_void,
) -> Result<ComputePipelineState, Error>
pub fn new_compute_pipeline_state_with_functions( &self, functions: *const c_void, ) -> Result<ComputePipelineState, Error>
Create a new compute pipeline state with additional functions.
C++ equivalent: ComputePipelineState* newComputePipelineState(const NS::Array* functions, NS::Error** error)
Sourcepub fn new_compute_pipeline_state_with_binary_functions(
&self,
binary_functions: *const c_void,
) -> Result<ComputePipelineState, Error>
pub fn new_compute_pipeline_state_with_binary_functions( &self, binary_functions: *const c_void, ) -> Result<ComputePipelineState, Error>
Create a new compute pipeline state with additional binary functions.
C++ equivalent: ComputePipelineState* newComputePipelineStateWithBinaryFunctions(const NS::Array* additionalBinaryFunctions, NS::Error** error)
Sourcepub fn new_intersection_function_table(
&self,
descriptor: &IntersectionFunctionTableDescriptor,
) -> Option<IntersectionFunctionTable>
pub fn new_intersection_function_table( &self, descriptor: &IntersectionFunctionTableDescriptor, ) -> Option<IntersectionFunctionTable>
Create a new intersection function table.
C++ equivalent: IntersectionFunctionTable* newIntersectionFunctionTable(const MTL::IntersectionFunctionTableDescriptor* descriptor)
Sourcepub fn new_visible_function_table(
&self,
descriptor: &VisibleFunctionTableDescriptor,
) -> Option<VisibleFunctionTable>
pub fn new_visible_function_table( &self, descriptor: &VisibleFunctionTableDescriptor, ) -> Option<VisibleFunctionTable>
Create a new visible function table.
C++ equivalent: VisibleFunctionTable* newVisibleFunctionTable(const MTL::VisibleFunctionTableDescriptor* descriptor)
Sourcepub fn reflection(&self) -> Option<ComputePipelineReflection>
pub fn reflection(&self) -> Option<ComputePipelineReflection>
Get the pipeline reflection information.
C++ equivalent: ComputePipelineReflection* reflection()