pub struct RenderPipelineState(/* private fields */);Expand description
A compiled render pipeline configuration.
C++ equivalent: MTL::RenderPipelineState
Implementations§
Source§impl RenderPipelineState
impl RenderPipelineState
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create a RenderPipelineState from a raw pointer.
§Safety
The pointer must be a valid Metal render 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 threadgroup_size_matches_tile_size(&self) -> bool
pub fn threadgroup_size_matches_tile_size(&self) -> bool
Check if threadgroup size is multiple of thread execution width.
C++ equivalent: bool threadgroupSizeMatchesTileSize() const
Sourcepub fn imageblock_sample_length(&self) -> UInteger
pub fn imageblock_sample_length(&self) -> UInteger
Get the imageblock sample length.
C++ equivalent: NS::UInteger imageblockSampleLength() const
Sourcepub fn support_indirect_command_buffers(&self) -> bool
pub fn support_indirect_command_buffers(&self) -> bool
Check if alpha-to-coverage is supported.
C++ equivalent: bool supportIndirectCommandBuffers() const
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 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 max_total_threadgroups_per_mesh_grid(&self) -> UInteger
pub fn max_total_threadgroups_per_mesh_grid(&self) -> UInteger
Get the maximum total threadgroups per mesh grid.
C++ equivalent: NS::UInteger maxTotalThreadgroupsPerMeshGrid() const
Sourcepub fn max_total_threads_per_mesh_threadgroup(&self) -> UInteger
pub fn max_total_threads_per_mesh_threadgroup(&self) -> UInteger
Get the maximum total threads per mesh threadgroup.
C++ equivalent: NS::UInteger maxTotalThreadsPerMeshThreadgroup() const
Sourcepub fn max_total_threads_per_object_threadgroup(&self) -> UInteger
pub fn max_total_threads_per_object_threadgroup(&self) -> UInteger
Get the maximum total threads per object threadgroup.
C++ equivalent: NS::UInteger maxTotalThreadsPerObjectThreadgroup() const
Sourcepub fn mesh_thread_execution_width(&self) -> UInteger
pub fn mesh_thread_execution_width(&self) -> UInteger
Get the mesh thread execution width.
C++ equivalent: NS::UInteger meshThreadExecutionWidth() const
Sourcepub fn object_thread_execution_width(&self) -> UInteger
pub fn object_thread_execution_width(&self) -> UInteger
Get the object thread execution width.
C++ equivalent: NS::UInteger objectThreadExecutionWidth() const
Sourcepub fn required_threads_per_mesh_threadgroup(&self) -> Size
pub fn required_threads_per_mesh_threadgroup(&self) -> Size
Get the required threads per mesh threadgroup.
C++ equivalent: Size requiredThreadsPerMeshThreadgroup() const
Sourcepub fn required_threads_per_object_threadgroup(&self) -> Size
pub fn required_threads_per_object_threadgroup(&self) -> Size
Get the required threads per object threadgroup.
C++ equivalent: Size requiredThreadsPerObjectThreadgroup() const
Sourcepub fn required_threads_per_tile_threadgroup(&self) -> Size
pub fn required_threads_per_tile_threadgroup(&self) -> Size
Get the required threads per tile threadgroup.
C++ equivalent: Size requiredThreadsPerTileThreadgroup() const
Sourcepub fn function_handle_with_name(
&self,
name: &str,
stage: RenderStages,
) -> Option<FunctionHandle>
pub fn function_handle_with_name( &self, name: &str, stage: RenderStages, ) -> Option<FunctionHandle>
Get a function handle by name and stage.
C++ equivalent: FunctionHandle* functionHandle(const NS::String* name, MTL::RenderStages stage)
Sourcepub fn function_handle_with_function(
&self,
function: &Function,
stage: RenderStages,
) -> Option<FunctionHandle>
pub fn function_handle_with_function( &self, function: &Function, stage: RenderStages, ) -> Option<FunctionHandle>
Get a function handle from a function and stage.
C++ equivalent: FunctionHandle* functionHandle(const MTL::Function* function, MTL::RenderStages stage)
Sourcepub fn new_intersection_function_table(
&self,
descriptor: &IntersectionFunctionTableDescriptor,
stage: RenderStages,
) -> Option<IntersectionFunctionTable>
pub fn new_intersection_function_table( &self, descriptor: &IntersectionFunctionTableDescriptor, stage: RenderStages, ) -> Option<IntersectionFunctionTable>
Create a new intersection function table.
C++ equivalent: IntersectionFunctionTable* newIntersectionFunctionTable(const IntersectionFunctionTableDescriptor*, RenderStages)
Sourcepub fn new_visible_function_table(
&self,
descriptor: &VisibleFunctionTableDescriptor,
stage: RenderStages,
) -> Option<VisibleFunctionTable>
pub fn new_visible_function_table( &self, descriptor: &VisibleFunctionTableDescriptor, stage: RenderStages, ) -> Option<VisibleFunctionTable>
Create a new visible function table.
C++ equivalent: VisibleFunctionTable* newVisibleFunctionTable(const VisibleFunctionTableDescriptor*, RenderStages)
Sourcepub fn new_render_pipeline_state(
&self,
additional_functions: &RenderPipelineFunctionsDescriptor,
) -> Result<RenderPipelineState, Error>
pub fn new_render_pipeline_state( &self, additional_functions: &RenderPipelineFunctionsDescriptor, ) -> Result<RenderPipelineState, Error>
Create a new render pipeline state with additional binary functions.
C++ equivalent: RenderPipelineState* newRenderPipelineState(const RenderPipelineFunctionsDescriptor*, NS::Error**)
Sourcepub fn reflection(&self) -> Option<RenderPipelineReflection>
pub fn reflection(&self) -> Option<RenderPipelineReflection>
Get the pipeline reflection information.
C++ equivalent: RenderPipelineReflection* reflection() const