Expand description
§Bindings to the Metal framework
See Apple’s docs and the general docs on framework crates for more information.
Metal has tools for validating that you’re using it correctly, using these
is highly recommended! See Apple’s documentation on it, or
run man MetalValidation to get information on environment variables.
NOTE: To use MTLCreateSystemDefaultDevice you need to link to
CoreGraphics, this can be done by using objc2-core-graphics, or by
doing:
#[link(name = "CoreGraphics", kind = "framework")]
extern "C" {}§Safety considerations
Metal allows running arbitrary code on the GPU. We treat memory safety issues on the GPU as just as unsafe as that which applies to the CPU. A few notes on this below.
§Shaders
Shaders are (often) written in an unsafe C-like language.
Loading them (via MTLLibrary, function stitching etc.) is perfectly
safe, it is similar to dynamic linking. The restrictions that e.g.
libloading::Library::new labours under do not apply, since there are no
ctors in the Metal Shading Language (see section 4.2).
Similarly, getting individual shaders (MTLFunction) is safe, we can
model this as the same as calling dlsym (which just returns a pointer).
Calling functions though, is not safe. Even though they can have their
parameter and return types checked at runtime, they may have additional
restrictions not present in the signature (e.g. __builtin_unreachable()
is possible in MSL, so is out-of-bounds accesses). If you view
MTLFunction as essentially just an unsafe fn() pointer, this should be
apparent.
§Bounds checks
It is yet unclear whether Metal APIs are bounds-checked on the CPU side or not, so APIs that take offsets / lengths are often unsafe.
§Synchronization
MTLResource subclasses such as MTLBuffer and MTLTexture require
synchronization between the CPU and the GPU, or between different threads
on the GPU itself, so APIs taking these are often unsafe.
§Memory management and lifetimes
Resources used in MTL4CommandBuffers or command buffers with created
with one of:
MTLCommandBufferDescriptor::setRetainedReferences(false).MTLCommandQueue::commandBufferWithUnretainedReferences().
Must be kept alive for as long as they’re used.
§Type safety
MTLBuffer is untyped (in a similar manner as a [u8] slice), you must
ensure that any usage of it is done with valid types.
Structs§
- MTL4
Acceleration Structure Bounding BoxGeometry Descriptor MTL4AccelerationStructure - Describes bounding-box geometry suitable for ray tracing.
- MTL4
Acceleration Structure Curve Geometry Descriptor MTL4AccelerationStructure - Describes curve geometry suitable for ray tracing.
- MTL4
Acceleration Structure Descriptor MTL4AccelerationStructureandMTLAccelerationStructure - Base class for Metal 4 acceleration structure descriptors.
- MTL4
Acceleration Structure Geometry Descriptor MTL4AccelerationStructure - Base class for all Metal 4 acceleration structure geometry descriptors.
- MTL4
Acceleration Structure Motion Bounding BoxGeometry Descriptor MTL4AccelerationStructure - Describes motion bounding box geometry, suitable for motion ray tracing.
- MTL4
Acceleration Structure Motion Curve Geometry Descriptor MTL4AccelerationStructure - Describes motion curve geometry, suitable for motion ray tracing.
- MTL4
Acceleration Structure Motion Triangle Geometry Descriptor MTL4AccelerationStructure - Describes motion triangle geometry, suitable for motion ray tracing.
- MTL4
Acceleration Structure Triangle Geometry Descriptor MTL4AccelerationStructure - Describes triangle geometry suitable for ray tracing.
- MTL4
Alpha ToCoverage State MTL4PipelineState - Enumeration for controlling alpha-to-coverage state of a pipeline state object.
- MTL4
Alpha ToOne State MTL4PipelineState - Enumeration for controlling alpha-to-one state of a pipeline state object.
- MTL4
Argument Table Descriptor MTL4ArgumentTable - Groups parameters for the creation of a Metal argument table.
- MTL4
Binary Function Descriptor MTL4BinaryFunctionDescriptor - Base interface for other function-derived interfaces.
- MTL4
Binary Function Options MTL4BinaryFunctionDescriptor - Options for configuring the creation of binary functions.
- MTL4
Blend State MTL4PipelineState - Enumeration for controlling the blend state of a pipeline state object.
- MTL4
Buffer Range MTL4BufferRangeandMTLGPUAddress - A struct representing a range of a Metal buffer. The offset into the buffer is included in the address. The length is generally optional, which a value of (uint64_t)-1 representing the range from the given address to the end of the buffer. However, providing the length can enable more accurate API validation, especially when sub-allocating ranges of a buffer.
- MTL4
Command Allocator Descriptor MTL4CommandAllocator - Groups together parameters for creating a command allocator.
- MTL4
Command Buffer Options MTL4CommandBuffer - Options to configure a command buffer before encoding work into it.
- MTL4
Command Queue Descriptor MTL4CommandQueue - Groups together parameters for the creation of a new command queue.
- MTL4
Command Queue Error MTL4CommandQueue - Enumeration of kinds of errors that committing an array of command buffers instances can produce.
- MTL4
Commit Options MTL4CommandQueue - Represents options to configure a commit operation on a command queue.
- MTL4
Compiler Descriptor MTL4Compiler - Groups together properties for creating a compiler context.
- MTL4
Compiler Task Options MTL4Compiler - Apple’s documentation
- MTL4
Compiler Task Status MTL4CompilerTask - Represents the status of a compiler task.
- MTL4
Compute Pipeline Descriptor MTL4ComputePipelineandMTL4PipelineState - Describes a compute pipeline state.
- MTL4
Copy Sparse Buffer Mapping Operation MTL4CommandQueue - Groups together arguments for an operation to copy a sparse buffer mapping.
- MTL4
Copy Sparse Texture Mapping Operation MTL4CommandQueueandMTLTypes - Groups together arguments for an operation to copy a sparse texture mapping.
- MTL4
Counter Heap Descriptor MTL4Counters - Groups together parameters for configuring a counter heap object at creation time.
- MTL4
Counter Heap Type MTL4Counters - Defines the type of a
MTL4CounterHeapand the contents of its entries. - MTL4
Function Descriptor MTL4FunctionDescriptor - Base interface for describing a Metal 4 shader function.
- MTL4
Indirect Command Buffer Support State MTL4PipelineState - Enumeration for controlling support for
MTLIndirectCommandBuffer. - MTL4
Indirect Instance Acceleration Structure Descriptor MTL4AccelerationStructureandMTLAccelerationStructure - Descriptor for an “indirect” instance acceleration structure that allows providing the instance count and motion transform count indirectly, through buffer references.
- MTL4
Instance Acceleration Structure Descriptor MTL4AccelerationStructureandMTLAccelerationStructure - Descriptor for an instance acceleration structure.
- MTL4
Library Descriptor MTL4LibraryDescriptor - Serves as the base descriptor for creating a Metal library.
- MTL4
Library Function Descriptor MTL4FunctionDescriptorandMTL4LibraryFunctionDescriptor - Describes a shader function from a Metal library.
- MTL4
Logical ToPhysical Color Attachment Mapping State MTL4RenderPipeline - Enumerates possible behaviors of how a pipeline maps its logical outputs to its color attachments.
- MTL4
Machine Learning Pipeline Descriptor MTL4MachineLearningPipelineandMTL4PipelineState - Description for a machine learning pipeline state.
- MTL4
Machine Learning Pipeline Reflection MTL4MachineLearningPipeline - Represents reflection information for a machine learning pipeline state.
- MTL4
Mesh Render Pipeline Descriptor MTL4MeshRenderPipelineandMTL4PipelineState - Groups together properties you use to create a mesh render pipeline state object.
- MTL4
Pipeline Data SetSerializer Configuration MTL4PipelineDataSetSerializer - Configuration options for pipeline dataset serializer objects.
- MTL4
Pipeline Data SetSerializer Descriptor MTL4PipelineDataSetSerializer - Groups together properties to create a pipeline data set serializer.
- MTL4
Pipeline Descriptor MTL4PipelineState - Base type for descriptors you use for building pipeline state objects.
- MTL4
Pipeline Options MTL4PipelineState - Provides options controlling how to compile a pipeline state.
- MTL4
Pipeline Stage Dynamic Linking Descriptor MTL4LinkingDescriptor - Groups together properties to drive the dynamic linking process of a pipeline stage.
- MTL4
Primitive Acceleration Structure Descriptor MTL4AccelerationStructureandMTLAccelerationStructure - Descriptor for a primitive acceleration structure that directly references geometric shapes, such as triangles and bounding boxes.
- MTL4
Render Encoder Options MTL4RenderCommandEncoder - Custom render pass options you specify at encoder creation time.
- MTL4
Render Pass Descriptor MTL4RenderPass - Describes a render pass.
- MTL4
Render Pipeline Binary Functions Descriptor MTL4RenderPipeline - Allows you to specify additional binary functions to link to each stage of a render pipeline.
- MTL4
Render Pipeline Color Attachment Descriptor MTL4RenderPipeline - Apple’s documentation
- MTL4
Render Pipeline Color Attachment Descriptor Array MTL4RenderPipeline - An array of color attachment descriptions for a render pipeline.
- MTL4
Render Pipeline Descriptor MTL4PipelineStateandMTL4RenderPipeline - Groups together properties to create a render pipeline state object.
- MTL4
Render Pipeline Dynamic Linking Descriptor MTL4LinkingDescriptor - Groups together properties that provide linking properties for render pipelines.
- MTL4
Shader Reflection MTL4PipelineState - Option mask for requesting reflection information at pipeline build time.
- MTL4
Specialized Function Descriptor MTL4FunctionDescriptorandMTL4SpecializedFunctionDescriptor - Groups together properties to configure and create a specialized function by passing it to a factory method.
- MTL4
Static Linking Descriptor MTL4LinkingDescriptor - Groups together properties to drive a static linking process.
- MTL4
Stitched Function Descriptor MTL4FunctionDescriptorandMTL4StitchedFunctionDescriptor - Groups together properties that describe a shader function suitable for stitching.
- MTL4
Tile Render Pipeline Descriptor MTL4PipelineStateandMTL4TileRenderPipeline - Groups together properties you use to create a tile render pipeline state object.
- MTL4
Timestamp Granularity MTL4Counters - Provides a hint to the system about the desired accuracy when writing GPU counter timestamps.
- MTL4
Timestamp Heap Entry MTL4Counters - Represents a timestamp data entry in a counter heap of type
MTL4CounterHeapTypeTimestamp. - MTL4
Update Sparse Buffer Mapping Operation MTL4CommandQueueandMTLResourceStateCommandEncoder - Groups together arguments for an operation to update a sparse buffer mapping.
- MTL4
Update Sparse Texture Mapping Operation MTL4CommandQueueandMTLResourceStateCommandEncoderandMTLTypes - Groups together arguments for an operation to update a sparse texture mapping.
- MTL4
Visibility Options MTL4CommandEncoder - Memory consistency options for synchronization commands.
- MTLAcceleration
Structure Bounding BoxGeometry Descriptor MTLAccelerationStructure - Descriptor for bounding box geometry
- MTLAcceleration
Structure Curve Geometry Descriptor MTLAccelerationStructure - Acceleration structure geometry descriptor describing geometry made of curve primitives
- MTLAcceleration
Structure Descriptor MTLAccelerationStructure - Base class for acceleration structure descriptors. Do not use this class directly. Use one of the derived classes instead.
- MTLAcceleration
Structure Geometry Descriptor MTLAccelerationStructure - Base class for all geometry descriptors. Do not use this class directly. Use one of the derived classes instead.
- MTLAcceleration
Structure Instance Descriptor MTLAccelerationStructureandMTLAccelerationStructureTypes - Apple’s documentation
- MTLAcceleration
Structure Instance Descriptor Type MTLAccelerationStructure - Apple’s documentation
- MTLAcceleration
Structure Instance Options MTLAccelerationStructure - Apple’s documentation
- MTLAcceleration
Structure Motion Bounding BoxGeometry Descriptor MTLAccelerationStructure - Descriptor for motion bounding box geometry
- MTLAcceleration
Structure Motion Curve Geometry Descriptor MTLAccelerationStructure - Acceleration structure motion geometry descriptor describing geometry made of curve primitives
- MTLAcceleration
Structure Motion Instance Descriptor MTLAccelerationStructure - Apple’s documentation
- MTLAcceleration
Structure Motion Triangle Geometry Descriptor MTLAccelerationStructure - Descriptor for motion triangle geometry
- MTLAcceleration
Structure Pass Descriptor MTLAccelerationStructureCommandEncoder - MTLAccelerationStructurePassDescriptor represents a collection of attachments to be used to create a concrete acceleration structure encoder.
- MTLAcceleration
Structure Pass Sample Buffer Attachment Descriptor MTLAccelerationStructureCommandEncoder - Apple’s documentation
- MTLAcceleration
Structure Pass Sample Buffer Attachment Descriptor Array MTLAccelerationStructureCommandEncoder - Apple’s documentation
- MTLAcceleration
Structure Refit Options MTLAccelerationStructure - Controls the acceleration structure refit operation
- MTLAcceleration
Structure Sizes MTLDevice - Describes the memory requirements for an acceleration structure
- MTLAcceleration
Structure Triangle Geometry Descriptor MTLAccelerationStructure - Descriptor for triangle geometry
- MTLAcceleration
Structure Usage MTLAccelerationStructure - Apple’s documentation
- MTLAcceleration
Structure UserID Instance Descriptor MTLAccelerationStructureandMTLAccelerationStructureTypes - Apple’s documentation
- MTLArchitecture
MTLDevice - Contains information about the device’s architecture
- MTLArgument
Deprecated MTLArgument - MTLArgument
- MTLArgument
Buffers Tier MTLDevice - MTLArgumentBuffersTier determines support level for argument buffers.
- MTLArgument
Descriptor MTLDevice - Represents a member of an argument buffer
- MTLArgument
Type Deprecated MTLArgument - The type for an input to a MTLRenderPipelineState or a MTLComputePipelineState
- MTLArray
Type MTLArgument - Apple’s documentation
- MTLAttribute
MTLLibrary - Apple’s documentation
- MTLAttribute
Descriptor MTLStageInputOutputDescriptor - Apple’s documentation
- MTLAttribute
Descriptor Array MTLStageInputOutputDescriptor - Apple’s documentation
- MTLAttribute
Format MTLStageInputOutputDescriptor - Apple’s documentation
- MTLAxis
Aligned Bounding Box MTLAccelerationStructureTypes - An axis aligned bounding box with a min and max point
- MTLBarrier
Scope MTLCommandEncoder - Describes the types of resources that the a barrier operates on
- MTLBinary
Archive Descriptor MTLBinaryArchive - A class used to indicate how an archive should be created
- MTLBinary
Archive Error MTLBinaryArchive - Apple’s documentation
- MTLBinding
Access MTLArgument - Apple’s documentation
- MTLBinding
Type MTLArgument - The type of a resource binding.
- MTLBlend
Factor MTLRenderPipeline - Apple’s documentation
- MTLBlend
Operation MTLRenderPipeline - Apple’s documentation
- MTLBlit
Option MTLBlitCommandEncoder - Controls the blit operation
- MTLBlit
Pass Descriptor MTLBlitPass - MTLBlitPassDescriptor represents a collection of attachments to be used to create a concrete blit command encoder
- MTLBlit
Pass Sample Buffer Attachment Descriptor MTLBlitPass - Apple’s documentation
- MTLBlit
Pass Sample Buffer Attachment Descriptor Array MTLBlitPass - Apple’s documentation
- MTLBuffer
Layout Descriptor MTLStageInputOutputDescriptor - Apple’s documentation
- MTLBuffer
Layout Descriptor Array MTLStageInputOutputDescriptor - Apple’s documentation
- MTLBuffer
Sparse Tier MTLResource - Enumerates the different support levels for sparse buffers.
- MTLCPU
Cache Mode MTLResource - Describes what CPU cache mode is used for the CPU’s mapping of a texture resource.
- MTLCapture
Descriptor MTLCaptureManager - Apple’s documentation
- MTLCapture
Destination MTLCaptureManager - The destination where you want the GPU trace to be captured to.
- MTLCapture
Error MTLCaptureManager - Apple’s documentation
- MTLCapture
Manager MTLCaptureManager - Apple’s documentation
- MTLClear
Color MTLRenderPass - Apple’s documentation
- MTLColor
Write Mask MTLRenderPipeline - Apple’s documentation
- MTLCommand
Buffer Descriptor MTLCommandBuffer - An object that you use to configure new Metal command buffer objects.
- MTLCommand
Buffer Error MTLCommandBuffer - Error codes that can be found in MTLCommandBuffer.error
- MTLCommand
Buffer Error Option MTLCommandBuffer - Options for controlling the error reporting for Metal command buffer objects.
- MTLCommand
Buffer Status MTLCommandBuffer - MTLCommandBufferStatus reports the current stage in the lifetime of MTLCommandBuffer, as it proceeds to enqueued, committed, scheduled, and completed.
- MTLCommand
Encoder Error State MTLCommandBuffer - The error states for a Metal command encoder after command buffer execution.
- MTLCommand
Queue Descriptor MTLCommandQueue - Apple’s documentation
- MTLCompare
Function MTLDepthStencil - Apple’s documentation
- MTLCompile
Options MTLLibrary - Apple’s documentation
- MTLCompile
Symbol Visibility MTLLibrary - Apple’s documentation
- MTLComponent
Transform MTLAccelerationStructureTypes - A transformation represented by individual components such as translation and rotation. The rotation is represented by a quaternion, allowing for correct motion interpolation.
- MTLCompute
Pass Descriptor MTLComputePass - MTLComputePassDescriptor represents a collection of attachments to be used to create a concrete compute command encoder
- MTLCompute
Pass Sample Buffer Attachment Descriptor MTLComputePass - Apple’s documentation
- MTLCompute
Pass Sample Buffer Attachment Descriptor Array MTLComputePass - Apple’s documentation
- MTLCompute
Pipeline Descriptor MTLComputePipeline - Apple’s documentation
- MTLCompute
Pipeline Reflection MTLComputePipeline - Apple’s documentation
- MTLCounter
Result Stage Utilization MTLCounters - Apple’s documentation
- MTLCounter
Result Statistic MTLCounters - Apple’s documentation
- MTLCounter
Result Timestamp MTLCounters - Apple’s documentation
- MTLCounter
Sample Buffer Descriptor MTLCounters - Object to represent the counter state.
- MTLCounter
Sample Buffer Error MTLCounters - There wasn’t enough memory available to allocate the counter sample buffer.
- MTLCounter
Sampling Point MTLDevice - MTLCounterSamplingPoint determines type of sampling points that are supported on given device.
- MTLCull
Mode MTLRenderCommandEncoder - Apple’s documentation
- MTLCurve
Basis MTLAccelerationStructure - Basis function to use to interpolate curve control points
- MTLCurve
EndCaps MTLAccelerationStructure - Type of end cap to insert at the beginning and end of each connected sequence of curve segments.
- MTLCurve
Type MTLAccelerationStructure - Curve types
- MTLData
Type MTLDataType - An enumeration of the different data types in Metal.
- MTLDepth
Clip Mode MTLRenderCommandEncoder - Apple’s documentation
- MTLDepth
Stencil Descriptor MTLDepthStencil - Apple’s documentation
- MTLDevice
Location MTLDevice - Specifies the location of the GPU on macOS
- MTLDispatch
Threadgroups Indirect Arguments MTLComputeCommandEncoder - Apple’s documentation
- MTLDispatch
Threads Indirect Arguments MTLComputeCommandEncoder - Apple’s documentation
- MTLDispatch
Type MTLCommandBuffer - MTLDispatchType Describes how a command encoder will execute dispatched work.
- MTLDraw
Indexed Primitives Indirect Arguments MTLRenderCommandEncoder - Apple’s documentation
- MTLDraw
Patch Indirect Arguments MTLRenderCommandEncoder - Apple’s documentation
- MTLDraw
Primitives Indirect Arguments MTLRenderCommandEncoder - Apple’s documentation
- MTLDynamic
Library Error MTLDynamicLibrary - Apple’s documentation
- MTLFeature
Set Deprecated MTLDevice - Apple’s documentation
- MTLFunction
Constant MTLLibrary - describe an uberShader constant used by the function
- MTLFunction
Constant Values MTLFunctionConstantValues - Apple’s documentation
- MTLFunction
Descriptor MTLFunctionDescriptor - Apple’s documentation
- MTLFunction
LogType MTLFunctionLog - Apple’s documentation
- MTLFunction
Options MTLFunctionDescriptor - Apple’s documentation
- MTLFunction
Reflection MTLLibrary - Represents a reflection object containing information about a function in a Metal library.
- MTLFunction
Stitching Attribute Always Inline MTLFunctionStitching - Applies the
__attribute__((always_inline))attribute to the produced stitched function. - MTLFunction
Stitching Function Node MTLFunctionStitching - A function node that calls the specified function with arguments and ordering determined by data and control dependencies.
- MTLFunction
Stitching Graph MTLFunctionStitching - A function graph that describes a directed acyclic graph.
- MTLFunction
Stitching Input Node MTLFunctionStitching - An indexed input node of the produced stitched function.
- MTLFunction
Type MTLLibrary - An identifier for a top-level Metal function.
- MTLGPU
Family MTLDevice - Apple’s documentation
- MTLHazard
Tracking Mode MTLResource - Describes how hazard tracking is performed.
- MTLHeap
Descriptor MTLHeap - Apple’s documentation
- MTLHeap
Type MTLHeap - Describes the mode of operation for an MTLHeap.
- MTLIO
Command Queue Descriptor MTLIOCommandQueue - Represents a descriptor to create a MTLIOCommandQueue.
- MTLIO
Command Queue Type MTLIOCommandQueue - Apple’s documentation
- MTLIO
Compression Method MTLDevice - Apple’s documentation
- MTLIO
Compression Status MTLIOCompressor - Apple’s documentation
- MTLIO
Error MTLIOCommandQueue - Apple’s documentation
- MTLIO
Priority MTLIOCommandQueue - Apple’s documentation
- MTLIO
Status MTLIOCommandBuffer - Apple’s documentation
- MTLIndex
Type MTLArgument - Apple’s documentation
- MTLIndirect
Acceleration Structure Instance Descriptor MTLAccelerationStructureandMTLAccelerationStructureTypesandMTLTypes - Apple’s documentation
- MTLIndirect
Acceleration Structure Motion Instance Descriptor MTLAccelerationStructureandMTLTypes - Apple’s documentation
- MTLIndirect
Command Buffer Descriptor MTLIndirectCommandBuffer - Describes the limits and features that can be used in an indirect command
- MTLIndirect
Command Buffer Execution Range MTLIndirectCommandBuffer - The data layout required for specifying an indirect command buffer execution range.
- MTLIndirect
Command Type MTLIndirectCommandBuffer - A bitfield of commands that may be performed indirectly.
- MTLIndirect
Instance Acceleration Structure Descriptor MTLAccelerationStructure - Descriptor for an instance acceleration structure built with an indirected buffer of instances.
- MTLInstance
Acceleration Structure Descriptor MTLAccelerationStructure - Descriptor for an instance acceleration structure
- MTLIntersection
Function Buffer Arguments MTLIntersectionFunctionTable - struct containing arguments for intersection function buffers.
- MTLIntersection
Function Descriptor MTLFunctionDescriptor - Apple’s documentation
- MTLIntersection
Function Signature MTLIntersectionFunctionTable - Signature defining what data is provided to an intersection function. The signature must match across the shading language declaration of the intersection function table, intersection functions in the table, and the intersector using the table.
- MTLIntersection
Function Table Descriptor MTLIntersectionFunctionTable - Apple’s documentation
- MTLLanguage
Version MTLLibrary - Apple’s documentation
- MTLLibrary
Error MTLLibrary - NSErrors raised when creating a library.
- MTLLibrary
Optimization Level MTLLibrary - Optimization level for the Metal compiler.
- MTLLibrary
Type MTLLibrary - Apple’s documentation
- MTLLinked
Functions MTLLinkedFunctions - A class to set functions to be linked.
- MTLLoad
Action MTLRenderPass - Apple’s documentation
- MTLLog
Level MTLLogState - The level of the log entry.
- MTLLog
State Descriptor MTLLogState - Apple’s documentation
- MTLLog
State Error MTLLogState - NSErrors raised when creating a logstate.
- MTLLogical
ToPhysical Color Attachment Map MTLRenderPipeline - Allows you to easily specify color attachment remapping from logical to physical indices.
- MTLMap
Indirect Arguments MTLResourceStateCommandEncoder - Structure describing indirect mapping region. This structure is used to populate a buffer for the method ‘MTLResourceStateCommandEncoder updateTextureMapping:indirectBuffer:indirectBufferOffset:’
- MTLMath
Floating Point Functions MTLLibrary - An enum to indicate the default math functions for single precision floating-point
- MTLMath
Mode MTLLibrary - An enum to indicate if the compiler can perform optimizations for floating-point arithmetic that may violate the IEEE 754 standard
- MTLMatrix
Layout MTLAccelerationStructure - Apple’s documentation
- MTLMesh
Render Pipeline Descriptor MTLRenderPipeline - As an alternative to a vertex + fragment shader render pipeline, this render pipeline uses a (object +) mesh + fragment shader for rendering geometry.
- MTLMotion
Border Mode MTLAccelerationStructure - Describes what happens to the object before the first motion key and after the last motion key.
- MTLMotion
Keyframe Data MTLAccelerationStructure - MTLbuffer and description how the data is stored in it.
- MTLMultisample
Depth Resolve Filter MTLRenderPass - Controls the MSAA depth resolve operation. Supported on iOS GPU Family 3 and later.
- MTLMultisample
Stencil Resolve Filter MTLRenderPass - Controls the MSAA stencil resolve operation.
- MTLMutability
MTLPipeline - Specifies whether a buffer will be modified between the time it is bound and a compute or render pipeline is executed in a draw or dispatch.
- MTLOrigin
MTLTypes - Identify a pixel in an image. MTLOrigin is ususally used as the upper-left corner of a region of a texture.
- MTLPacked
Float3 MTLAccelerationStructureTypes - MTLPacked
Float4x3 MTLAccelerationStructureTypes - Apple’s documentation
- MTLPacked
Float Quaternion MTLAccelerationStructureTypes - Apple’s documentation
- MTLPatch
Type MTLLibrary - Apple’s documentation
- MTLPipeline
Buffer Descriptor MTLPipeline - Apple’s documentation
- MTLPipeline
Buffer Descriptor Array MTLPipeline - Apple’s documentation
- MTLPipeline
Option MTLDevice - Controls the creation of the pipeline
- MTLPixel
Format MTLPixelFormat - Apple’s documentation
- MTLPointer
Type MTLArgument - Apple’s documentation
- MTLPrimitive
Acceleration Structure Descriptor MTLAccelerationStructure - Descriptor for a primitive acceleration structure
- MTLPrimitive
Topology Class MTLRenderPipeline - Apple’s documentation
- MTLPrimitive
Type MTLRenderCommandEncoder - Apple’s documentation
- MTLPurgeable
State MTLResource - Options for setPurgeable call.
- MTLQuad
Tessellation Factors Half MTLRenderCommandEncoder - Apple’s documentation
- MTLRasterization
Rate Layer Array MTLRasterizationRate - Mutable array of MTLRasterizationRateLayerDescriptor
- MTLRasterization
Rate Layer Descriptor MTLRasterizationRate - Describes the minimum rasterization rate screen space using two piecewise linear functions.
- MTLRasterization
Rate MapDescriptor MTLRasterizationRate - Describes a MTLRasterizationRateMap containing an arbitrary number of MTLRasterizationRateLayerDescriptor instances.
- MTLRasterization
Rate Sample Array MTLRasterizationRate - A helper object for convient access to samples stored in an array.
- MTLRead
Write Texture Tier MTLDevice - MTLReadWriteTextureTier determines support level for read-write texture formats.
- MTLRegion
MTLTypes - Identify a region in an image or texture.
- MTLRender
Pass Attachment Descriptor MTLRenderPass - Apple’s documentation
- MTLRender
Pass Color Attachment Descriptor MTLRenderPass - Apple’s documentation
- MTLRender
Pass Color Attachment Descriptor Array MTLRenderPass - Apple’s documentation
- MTLRender
Pass Depth Attachment Descriptor MTLRenderPass - Apple’s documentation
- MTLRender
Pass Descriptor MTLRenderPass - MTLRenderPassDescriptor represents a collection of attachments to be used to create a concrete render command encoder
- MTLRender
Pass Sample Buffer Attachment Descriptor MTLRenderPass - Apple’s documentation
- MTLRender
Pass Sample Buffer Attachment Descriptor Array MTLRenderPass - Apple’s documentation
- MTLRender
Pass Stencil Attachment Descriptor MTLRenderPass - Apple’s documentation
- MTLRender
Pipeline Color Attachment Descriptor MTLRenderPipeline - Apple’s documentation
- MTLRender
Pipeline Color Attachment Descriptor Array MTLRenderPipeline - Apple’s documentation
- MTLRender
Pipeline Descriptor MTLRenderPipeline - Apple’s documentation
- MTLRender
Pipeline Functions Descriptor MTLRenderPipeline - Apple’s documentation
- MTLRender
Pipeline Reflection MTLRenderPipeline - Apple’s documentation
- MTLRender
Stages MTLRenderCommandEncoder - Generic render stage enum
- MTLResidency
SetDescriptor MTLResidencySet - Specifies the parameters for MTLResidencySet creation.
- MTLResourceID
MTLTypes - Handle of the GPU resource used for binding resources to argument tables, navigating resource view pools and storing resources in an argument buffer
- MTLResource
Options MTLResource - Apple’s documentation
- MTLResource
State Pass Descriptor MTLResourceStatePass - MTLResourceStatePassDescriptor represents a collection of attachments to be used to create a concrete resourceState command encoder
- MTLResource
State Pass Sample Buffer Attachment Descriptor MTLResourceStatePass - Apple’s documentation
- MTLResource
State Pass Sample Buffer Attachment Descriptor Array MTLResourceStatePass - Apple’s documentation
- MTLResource
Usage MTLCommandEncoder - Describes how a resource will be used by a shader through an argument buffer
- MTLResource
View Pool Descriptor MTLResourceViewPool - Provides parameters for creating a resource view pool.
- MTLSample
Position MTLTypes - Identify a sample within a pixel. Origin is top-left with a range [0,1) for both x and y.
- MTLSampler
Address Mode MTLSampler - Options for what value is returned when a fetch falls outside the bounds of a texture.
- MTLSampler
Border Color MTLSampler - Specify the color value that will be clamped to when the sampler address mode is MTLSamplerAddressModeClampToBorderColor.
- MTLSampler
Descriptor MTLSampler - A mutable descriptor used to configure a sampler. When complete, this can be used to create an immutable MTLSamplerState.
- MTLSampler
MinMag Filter MTLSampler - Options for filtering texels within a mip level.
- MTLSampler
MipFilter MTLSampler - Options for selecting and filtering between mipmap levels
- MTLSampler
Reduction Mode MTLSampler - Configures how the sampler aggregates contributing samples to a final value.
- MTLScissor
Rect MTLRenderCommandEncoder - Apple’s documentation
- MTLShader
Validation MTLPipeline - Apple’s documentation
- MTLShared
Event Handle MTLEvent - Apple’s documentation
- MTLShared
Event Listener MTLEvent - This class provides a simple interface for handling the dispatching of MTLSharedEvent notifications from Metal.
- MTLShared
Texture Handle MTLTexture - Apple’s documentation
- MTLSize
MTLTypes - A set of dimensions to declare the size of an object, such as an image, texture, threadgroup, or grid.
- MTLSize
AndAlign MTLDevice - Represent a memory size and alignment in bytes.
- MTLSparse
Page Size MTLResource - Physical size of sparse resource page in KBs.
- MTLSparse
Texture Mapping Mode MTLResourceStateCommandEncoder - Type of mapping operation for sparse texture
- MTLSparse
Texture Region Alignment Mode MTLDevice - MTLSparseTextureRegionAlignmentMode determines type of alignment used when converting from pixel region to tile region.
- MTLStage
InRegion Indirect Arguments MTLComputeCommandEncoder - Apple’s documentation
- MTLStage
Input Output Descriptor MTLStageInputOutputDescriptor - Apple’s documentation
- MTLStages
MTLCommandEncoder - Describes stages of GPU work.
- MTLStencil
Descriptor MTLDepthStencil - Apple’s documentation
- MTLStencil
Operation MTLDepthStencil - Apple’s documentation
- MTLStep
Function MTLStageInputOutputDescriptor - Apple’s documentation
- MTLStitched
Library Descriptor MTLFunctionStitching - A container for the graphs and functions needed to create the stitched functions described by the graphs.
- MTLStitched
Library Options MTLFunctionStitching - A bitfield of options to create a stitched library
- MTLStorage
Mode MTLResource - Describes location and CPU mapping of MTLTexture.
- MTLStore
Action MTLRenderPass - Apple’s documentation
- MTLStore
Action Options MTLRenderPass - Apple’s documentation
- MTLStruct
Member MTLArgument - Apple’s documentation
- MTLStruct
Type MTLArgument - Apple’s documentation
- MTLTensor
Data Type MTLTensor - The possible data types for the elements of a tensor.
- MTLTensor
Descriptor MTLTensor - A configuration type for creating new tensor instances.
- MTLTensor
Error MTLTensor - The error codes that Metal can raise when you create a tensor.
- MTLTensor
Extents MTLTensor - An array of length matching the rank, holding the dimensions of a tensor.
- MTLTensor
Reference Type MTLArgument - An object that represents a tensor in the shading language in a struct or array.
- MTLTensor
Usage MTLTensor - The type that represents the different contexts for a tensor.
- MTLTessellation
Control Point Index Type MTLRenderPipeline - Apple’s documentation
- MTLTessellation
Factor Format MTLRenderPipeline - Apple’s documentation
- MTLTessellation
Factor Step Function MTLRenderPipeline - Apple’s documentation
- MTLTessellation
Partition Mode MTLRenderPipeline - Apple’s documentation
- MTLTexture
Compression Type MTLTexture - Apple’s documentation
- MTLTexture
Descriptor MTLTexture - Apple’s documentation
- MTLTexture
Reference Type MTLArgument - Apple’s documentation
- MTLTexture
Sparse Tier MTLResource - Enumerates the different support levels for sparse textures.
- MTLTexture
Swizzle MTLTexture - Apple’s documentation
- MTLTexture
Swizzle Channels MTLTexture - Apple’s documentation
- MTLTexture
Type MTLTexture - MTLTextureType describes the dimensionality of each image, and if multiple images are arranged into an array or cube.
- MTLTexture
Usage MTLTexture - MTLTextureUsage declares how the texture will be used over its lifetime (bitwise OR for multiple uses).
- MTLTexture
View Descriptor MTLTexture - Apple’s documentation
- MTLTile
Render Pipeline Color Attachment Descriptor MTLRenderPipeline - Apple’s documentation
- MTLTile
Render Pipeline Color Attachment Descriptor Array MTLRenderPipeline - Apple’s documentation
- MTLTile
Render Pipeline Descriptor MTLRenderPipeline - Apple’s documentation
- MTLTransform
Type MTLAccelerationStructure - Apple’s documentation
- MTLTriangle
Fill Mode MTLRenderCommandEncoder - Apple’s documentation
- MTLTriangle
Tessellation Factors Half MTLRenderCommandEncoder - Apple’s documentation
- MTLType
MTLArgument - Apple’s documentation
- MTLVertex
Amplification View Mapping MTLRenderCommandEncoder - Apple’s documentation
- MTLVertex
Attribute MTLLibrary - Apple’s documentation
- MTLVertex
Attribute Descriptor MTLVertexDescriptor - Apple’s documentation
- MTLVertex
Attribute Descriptor Array MTLVertexDescriptor - Apple’s documentation
- MTLVertex
Buffer Layout Descriptor MTLVertexDescriptor - Apple’s documentation
- MTLVertex
Buffer Layout Descriptor Array MTLVertexDescriptor - Apple’s documentation
- MTLVertex
Descriptor MTLVertexDescriptor - Apple’s documentation
- MTLVertex
Format MTLVertexDescriptor - specifies how the vertex attribute data is laid out in memory.
- MTLVertex
Step Function MTLVertexDescriptor - Apple’s documentation
- MTLViewport
MTLRenderCommandEncoder - Apple’s documentation
- MTLVisibility
Result Mode MTLRenderCommandEncoder - Apple’s documentation
- MTLVisibility
Result Type MTLRenderPass - This enumeration controls if Metal accumulates visibility results between render encoders or resets them.
- MTLVisible
Function Table Descriptor MTLVisibleFunctionTable - Apple’s documentation
- MTLWinding
MTLRenderCommandEncoder - Apple’s documentation
Constants§
- MTLCounter
Dont Sample MTLCounters - MTLCounter
Error Value MTLCounters - MTLResourceCPU
Cache Mode Mask MTLResource - MTLResourceCPU
Cache Mode Shift MTLResource - MTLResource
Hazard Tracking Mode Mask MTLResource - MTLResource
Hazard Tracking Mode Shift MTLResource - MTLResource
Storage Mode Mask MTLResource - MTLResource
Storage Mode Shift MTLResource - MTLTexture
Swizzle Channels Default MTLTexture
Statics§
- MTL4
Command ⚠Queue Error Domain MTL4CommandQueue - Apple’s documentation
- MTLAttribute
Stride Static MTLArgumentEncoder - Apple’s documentation
- MTLBinary
Archive ⚠Domain MTLBinaryArchive - Apple’s documentation
- MTLBuffer
Layout Stride Dynamic MTLVertexDescriptor - when a MTLVertexBufferLayoutDescriptor has its stride set to this value, the stride will be dynamic and must be set explicitly when binding a buffer to a render command encoder.
- MTLCapture
Error ⚠Domain MTLCaptureManager - Apple’s documentation
- MTLCommand
Buffer ⚠Encoder Info Error Key MTLCommandBuffer - Key in the userInfo for MTLCommandBufferError NSErrors. Value is an NSArray of MTLCommandBufferEncoderInfo objects in recorded order if an appropriate MTLCommandBufferErrorOption was set, otherwise the key will not exist in the userInfo dictionary.
- MTLCommand
Buffer ⚠Error Domain MTLCommandBuffer - An error domain for NSError objects produced by MTLCommandBuffer
- MTLCommon
Counter ⚠Clipper Invocations MTLCounters - Apple’s documentation
- MTLCommon
Counter ⚠Clipper Primitives Out MTLCounters - Apple’s documentation
- MTLCommon
Counter ⚠Compute Kernel Invocations MTLCounters - Apple’s documentation
- MTLCommon
Counter ⚠Fragment Cycles MTLCounters - Apple’s documentation
- MTLCommon
Counter ⚠Fragment Invocations MTLCounters - Apple’s documentation
- MTLCommon
Counter ⚠Fragments Passed MTLCounters - Apple’s documentation
- MTLCommon
Counter ⚠Post Tessellation Vertex Cycles MTLCounters - Apple’s documentation
- MTLCommon
Counter ⚠Post Tessellation Vertex Invocations MTLCounters - Apple’s documentation
- MTLCommon
Counter ⚠Render Target Write Cycles MTLCounters - Apple’s documentation
- MTLCommon
Counter ⚠SetStage Utilization MTLCounters - Apple’s documentation
- MTLCommon
Counter ⚠SetStatistic MTLCounters - Apple’s documentation
- MTLCommon
Counter ⚠SetTimestamp MTLCounters - Apple’s documentation
- MTLCommon
Counter ⚠Tessellation Cycles MTLCounters - Apple’s documentation
- MTLCommon
Counter ⚠Tessellation Input Patches MTLCounters - Apple’s documentation
- MTLCommon
Counter ⚠Timestamp MTLCounters - Apple’s documentation
- MTLCommon
Counter ⚠Total Cycles MTLCounters - Apple’s documentation
- MTLCommon
Counter ⚠Vertex Cycles MTLCounters - Apple’s documentation
- MTLCommon
Counter ⚠Vertex Invocations MTLCounters - Apple’s documentation
- MTLCounter
Error ⚠Domain MTLCounters - NSErrors raised when creating a counter sample buffer.
- MTLDevice
Removal ⚠Requested Notification MTLDevice - This notification is posted when the user has requested that applications cease using a particular device. Applications should assume that the device will be removed (terminated) imminently. Additionally, the device will be removed from the internal device array prior to this notification being posted. Applications should immediately begin the process of releasing all resources created on the given device, as well as any references to the device itself.
- MTLDevice
WasAdded ⚠Notification MTLDevice - This notification is posted when a new Metal device is added to the system
- MTLDevice
WasRemoved ⚠Notification MTLDevice - This notification is posted if the device is removed while there are still outstanding references to it, due to either a surprise or forced disconnect by the user. Applications must expect that any attempt to use the device after this point will fail.
- MTLDynamic
Library ⚠Domain MTLDynamicLibrary - Apple’s documentation
- MTLIO
Error ⚠Domain MTLIOCommandQueue - Apple’s documentation
- MTLLibrary
Error ⚠Domain MTLLibrary - NSErrors raised when creating a library.
- MTLLog
State ⚠Error Domain MTLLogState - Apple’s documentation
- MTLTensor
Domain ⚠MTLTensor - An error domain for errors that pertain to creating a tensor.
- NSDevice
Certificationi ⚠Phone Performance Gaming MTLDeviceCertification - Apple’s documentation
- NSProcess
Info ⚠Performance Profile DidChange Notification MTLDeviceCertification - Apple’s documentation
- NSProcess
Performance ⚠Profile Default MTLDeviceCertification - Apple’s documentation
- NSProcess
Performance ⚠Profile Sustained MTLDeviceCertification - Apple’s documentation
Traits§
- MTL4
Archive MTL4Archive - A read-only container that stores pipeline states from a shader compiler.
- MTL4
Argument Table MTL4ArgumentTable - Provides a mechanism to manage and provide resource bindings for buffers, textures, sampler states and other Metal resources.
- MTL4
Binary Function MTL4BinaryFunction - Represents a binary function.
- MTL4
Command Allocator MTL4CommandAllocator - Manages the memory backing the encoding of GPU commands into command buffers.
- MTL4
Command Buffer MTL4CommandBuffer - Records a sequence of GPU commands.
- MTL4
Command Encoder MTL4CommandEncoder - An encoder that writes GPU commands into a command buffer.
- MTL4
Command Queue MTL4CommandQueue - An abstraction representing a command queue that you use commit and synchronize command buffers and to perform other GPU operations.
- MTL4
Commit Feedback MTL4CommitFeedback - Describes an object containing debug information from Metal to your app after completing a workload.
- MTL4
Compiler MTL4Compiler - A abstraction for a pipeline state and shader function compiler.
- MTL4
Compiler Task MTL4CompilerTask - A reference to an asynchronous compilation task that you initiate from a compiler instance.
- MTL4
Compute Command Encoder MTL4CommandEncoderandMTL4ComputeCommandEncoder - Encodes a compute pass and other memory operations into a command buffer.
- MTL4
Counter Heap MTL4Counters - Represents an opaque, driver-controlled section of memory that can store GPU counter data.
- MTL4
Machine Learning Command Encoder MTL4CommandEncoderandMTL4MachineLearningCommandEncoder - Encodes commands for dispatching machine learning networks on Apple silicon.
- MTL4
Machine Learning Pipeline State MTL4MachineLearningPipelineandMTLAllocation - A pipeline state that you can use with machine-learning encoder instances.
- MTL4
Pipeline Data SetSerializer MTL4PipelineDataSetSerializer - A fast-addition container for collecting data during pipeline state creation.
- MTL4
Render Command Encoder MTL4CommandEncoderandMTL4RenderCommandEncoder - Encodes a render pass into a command buffer, including all its draw calls and configuration.
- MTLAcceleration
Structure MTLAccelerationStructureandMTLAllocationandMTLResource - Apple’s documentation
- MTLAcceleration
Structure Command Encoder MTLAccelerationStructureCommandEncoderandMTLCommandEncoder - Apple’s documentation
- MTLAllocation
MTLAllocation - Base class for Metal allocations.
- MTLArgument
Encoder MTLArgumentEncoder - MTLArgumentEncoder encodes buffer, texture, sampler, and constant data into a buffer.
- MTLBinary
Archive MTLBinaryArchive - A container of pipeline state descriptors and their associated compiled code.
- MTLBinding
MTLArgument - Apple’s documentation
- MTLBlit
Command Encoder MTLBlitCommandEncoderandMTLCommandEncoder - A command encoder that performs basic copies and blits between buffers and textures.
- MTLBuffer
MTLAllocationandMTLBufferandMTLResource - A typeless allocation accessible by both the CPU and the GPU (MTLDevice) or by only the GPU when the storage mode is MTLResourceStorageModePrivate.
- MTLBuffer
Binding MTLArgument - Apple’s documentation
- MTLCapture
Scope MTLCaptureScope - Apple’s documentation
- MTLCommand
Buffer MTLCommandBuffer - A serial list of commands for the device to execute.
- MTLCommand
Buffer Encoder Info MTLCommandBuffer - Provides execution status information for a Metal command encoder.
- MTLCommand
Encoder MTLCommandEncoder - MTLCommandEncoder is the common interface for objects that write commands into MTLCommandBuffers.
- MTLCommand
Queue MTLCommandQueue - A serial queue of command buffers to be executed by the device.
- MTLCompute
Command Encoder MTLCommandEncoderandMTLComputeCommandEncoder - A command encoder that writes data parallel compute commands.
- MTLCompute
Pipeline State MTLAllocationandMTLComputePipeline - A handle to compiled code for a compute function.
- MTLCounter
MTLCounters - A descriptor for a single counter.
- MTLCounter
Sample Buffer MTLCounters - The Counter Sample Buffer contains opaque counter samples as well as state needed to request a sample from the API.
- MTLCounter
Set MTLCounters - A collection of MTLCounters that the device can capture in a single pass.
- MTLDepth
Stencil State MTLDepthStencil - Apple’s documentation
- MTLDevice
MTLDevice - MTLDevice represents a processor capable of data parallel computations
- MTLDrawable
MTLDrawable - All “drawable” objects (such as those coming from CAMetalLayer) are expected to conform to this protocol
- MTLDynamic
Library MTLDynamicLibrary - A container for the binary representation of code compiled for a MTLDevice.
- MTLEvent
MTLEvent - Apple’s documentation
- MTLFence
MTLFence - Apple’s documentation
- MTLFunction
MTLLibrary - A handle to intermediate code used as inputs for either a MTLComputePipelineState or a MTLRenderPipelineState.
- MTLFunction
Handle MTLFunctionHandle - Apple’s documentation
- MTLFunction
Log MTLFunctionLog - Apple’s documentation
- MTLFunction
LogDebug Location MTLFunctionLog - Apple’s documentation
- MTLFunction
Stitching Attribute MTLFunctionStitching - An attribute to be applied to the produced stitched function.
- MTLFunction
Stitching Node MTLFunctionStitching - A node used in a graph for stitching.
- MTLHeap
MTLAllocationandMTLHeap - Apple’s documentation
- MTLIO
Command Buffer MTLIOCommandBuffer - represents a list of IO commands for a queue to execute
- MTLIO
Command Queue MTLIOCommandQueue - Represents a queue that schedules command buffers containing command that read from handle objects and write to MTLResource objects.
- MTLIO
File Handle MTLIOCommandQueue - Represents a file (raw or compressed) that can be used as a source for load commands encoded in a MTLIOCommandBuffer.
- MTLIO
Scratch Buffer MTLIOCommandQueue - An extendible protocol that can be used to wrap the buffers vended by a custom allocator. The underlying buffer is used as scratch space for IO commands that need it.
- MTLIO
Scratch Buffer Allocator MTLIOCommandQueue - An extendible protocol that can implement a custom allocator passed to the queue descriptor.
- MTLIndirect
Command Buffer MTLAllocationandMTLIndirectCommandBufferandMTLResource - Apple’s documentation
- MTLIndirect
Compute Command MTLIndirectCommandEncoder - Apple’s documentation
- MTLIndirect
Render Command MTLIndirectCommandEncoder - Apple’s documentation
- MTLIntersection
Function Table MTLAllocationandMTLIntersectionFunctionTableandMTLResource - Apple’s documentation
- MTLLibrary
MTLLibrary - Apple’s documentation
- MTLLog
Container MTLFunctionLog - Apple’s documentation
- MTLLog
State MTLLogState - Apple’s documentation
- MTLObject
Payload Binding MTLArgument - Apple’s documentation
- MTLParallel
Render Command Encoder MTLCommandEncoderandMTLParallelRenderCommandEncoder - The MTLParallelRenderCommandEncoder protocol is designed to allow a single render to texture operation to be efficiently (and safely) broken up across multiple threads.
- MTLRasterization
Rate Map MTLRasterizationRate - Compiled read-only object that determines how variable rasterization rate is applied when rendering.
- MTLRender
Command Encoder MTLCommandEncoderandMTLRenderCommandEncoder - MTLRenderCommandEncoder is a container for graphics rendering state and the code to translate the state into a command format that the device can execute.
- MTLRender
Command Encoder Slice Ext MTLRenderCommandEncoderandMTLCommandEncoder - MTLRender
Pipeline State MTLAllocationandMTLRenderPipeline - MTLRenderPipelineState represents a compiled render pipeline
- MTLResidency
Set MTLResidencySet - A residency set is responsible for managing resource and heap residency and is referenced by a command buffer or command queue in order to ensure that resources and heaps are resident. Resources and heaps are added and removed uncommitted and a subsequent commit call applies all of the changes in bulk.
- MTLResource
MTLAllocationandMTLResource - Common APIs available for MTLBuffer and MTLTexture instances
- MTLResource
State Command Encoder MTLCommandEncoderandMTLResourceStateCommandEncoder - Apple’s documentation
- MTLResource
View Pool MTLResourceViewPool - Contains views over resources of a specific type, and allows you to manage those views.
- MTLSampler
State MTLSampler - An immutable collection of sampler state compiled for a single device.
- MTLShared
Event MTLEvent - Apple’s documentation
- MTLTensor
MTLAllocationandMTLResourceandMTLTensor - A resource representing a multi-dimensional array that you can use with machine learning workloads.
- MTLTensor
Binding MTLArgument - An object that represents a tensor bound to a graphics or compute function or a machine learning function.
- MTLTexture
MTLAllocationandMTLResourceandMTLTexture - MTLTexture represents a collection of 1D, 2D, or 3D images.
- MTLTexture
Binding MTLArgument - Apple’s documentation
- MTLTexture
View Pool MTLResourceViewPoolandMTLTextureViewPool - A pool of lightweight texture views.
- MTLThreadgroup
Binding MTLArgument - Apple’s documentation
- MTLVisible
Function Table MTLAllocationandMTLResourceandMTLVisibleFunctionTable - Apple’s documentation
- NSProcess
InfoNS Device Certification MTLDeviceCertification - Category “NSDeviceCertification” on
NSProcessInfo.
Functions§
- MTLCopy
AllDevices MTLDevice - Returns all Metal devices in the system.
- MTLCopy
AllDevices ⚠With Observer MTLDeviceandblock2 - Returns an NSArray of the current set of available Metal devices and installs a notification handler to be notified of any further changes (additions, removals, etc.). The observer return value is retained by Metal and may be passed to MTLRemoveDeviceObserver() if the application no longer wishes to receive notifications.
- MTLCreate
System Default Device MTLDevice - Returns a reference to the preferred system default Metal device.
- MTLIO
Compression ⚠Context Append Data MTLIOCompressor - Safety
- MTLIO
Compression Context Default Chunk Size MTLIOCompressor - MTLIO
Create ⚠Compression Context MTLDeviceandMTLIOCompressor - Safety
- MTLIO
Flush ⚠AndDestroy Compression Context MTLIOCompressor - Safety
- MTLRemove
Device ⚠Observer MTLDevice - Removes a previously installed observer for device change notifications.
Type Aliases§
- MTL4
Commit Feedback Handler MTL4CommitFeedbackandblock2 - Defines the block signature for a callback Metal invokes to provide your app feedback after completing a workload.
- MTL4
NewBinary Function Completion Handler MTL4BinaryFunctionandMTL4Compilerandblock2 - Provides a signature for a callback block that Metal calls when the compiler finishes a build task for a binary function.
- MTL4
NewMachine Learning Pipeline State Completion Handler MTL4CompilerandMTL4MachineLearningPipelineandMTLAllocationandblock2 - Provides a signature for a callback block that Metal calls when the compiler finishes a build task for a machine learning pipeline state.
- MTLArgument
Access Deprecated MTLArgument - Apple’s documentation
- MTLAutoreleased
Argument Deprecated MTLArgumentandMTLLibrary - Apple’s documentation
- MTLAutoreleased
Compute Pipeline Reflection MTLComputePipelineandMTLLibrary - Apple’s documentation
- MTLAutoreleased
Render Pipeline Reflection MTLLibraryandMTLRenderPipeline - Apple’s documentation
- MTLCommand
Buffer Handler MTLCommandBufferandblock2 - Apple’s documentation
- MTLCommon
Counter MTLCounters - Common counters that, when present, are expected to have similar meanings across different implementations.
- MTLCommon
Counter Set MTLCounters - Common counter set names.
- MTLCoordinate2D
MTLTypes - A floating point coordinate in an abstract 2D space. Refer to location of use for concrete information on the space in which the coordinate exists.
- MTLDevice
Notification Handler MTLDeviceandblock2 - Block signature for device notifications
- MTLDevice
Notification Name MTLDevice - Type for device notifications
- MTLDrawable
Presented Handler MTLDrawableandblock2 - The presented callback function protocol
- MTLGPU
Address MTLGPUAddress - A 64-bit unsigned integer type appropriate for storing GPU addresses.
- MTLIO
Command Buffer Handler MTLIOCommandBufferandblock2 - Apple’s documentation
- MTLIO
Compression Context MTLIOCompressor - Apple’s documentation
- MTLNew
Compute Pipeline State Completion Handler MTLAllocationandMTLComputePipelineandMTLLibraryandblock2 - Apple’s documentation
- MTLNew
Compute Pipeline State With Reflection Completion Handler MTLAllocationandMTLComputePipelineandMTLLibraryandblock2 - Apple’s documentation
- MTLNew
Dynamic Library Completion Handler MTLDynamicLibraryandMTLLibraryandblock2 - Apple’s documentation
- MTLNew
Library Completion Handler MTLLibraryandblock2 - Apple’s documentation
- MTLNew
Render Pipeline State Completion Handler MTLAllocationandMTLLibraryandMTLRenderPipelineandblock2 - Apple’s documentation
- MTLNew
Render Pipeline State With Reflection Completion Handler MTLAllocationandMTLLibraryandMTLRenderPipelineandblock2 - Apple’s documentation
- MTLShared
Event Notification Block MTLEventandblock2 - Apple’s documentation
- MTLTimestamp
MTLDevice - Apple’s documentation
- NSDevice
Certification MTLDeviceCertification - Apple’s documentation
- NSProcess
Performance Profile MTLDeviceCertification - Apple’s documentation