Metal Namespace
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The Metal namespace provides GPU-accelerated 3D rendering and data-parallel computation.
Classes
Structs
| Name | Description |
|---|---|
| MTL4BufferRange |
A struct that represents a range of a Metal buffer. |
| MTL4CopySparseBufferMappingOperation |
A container for the arguments for a copy sparse buffer mapping operation. |
| MTL4CopySparseTextureMappingOperation |
A container for the arguments for a copy sparse texture mapping operation. |
| MTL4UpdateSparseBufferMappingOperation |
A container for the arguments for a update sparse buffer mapping operation. |
| MTL4UpdateSparseTextureMappingOperation |
A container for the arguments for a update sparse texture mapping operation. |
| MTLAccelerationStructureSizes | |
| MTLClearColor |
An RGBA color representing a clear pixel. |
| MTLClearValue |
Struct that contains values that are used to clear various buffers and stencils. |
| MTLCoordinate2D | |
| MTLDispatchThreadgroupsIndirectArguments |
Represents the number of threadgroups in each grid dimension for indirectly dispatched threadgroups. |
| MTLDrawIndexedPrimitivesIndirectArguments |
Represents the data layout needed to draw indexed primitives. |
| MTLDrawPatchIndirectArguments | |
| MTLDrawPrimitivesIndirectArguments |
Represents the data layout needed to draw primitives. |
| MTLIndirectCommandBufferExecutionRange | |
| MTLOrigin |
The ___location of a pixel in an image or texture. |
| MTLQuadTessellationFactorsHalf | |
| MTLRegion |
A rectangle of pixels in an image or texture. |
| MTLResourceId | |
| MTLSamplePosition |
A sample position. |
| MTLScissorRect |
The retangle used for the scissor fragment test. |
| MTLSize |
The dimensions of a grid, image, texture, or threadgroup. |
| MTLSizeAndAlign | |
| MTLStageInRegionIndirectArguments | |
| MTLTextureSwizzleChannels | |
| MTLTriangleTessellationFactorsHalf | |
| MTLVertexAmplificationViewMapping | |
| MTLViewport |
Defines the clipping viewport. |
Interfaces
| Name | Description |
|---|---|
| IMTL4Archive |
This interface represents the Objective-C protocol |
| IMTL4ArgumentTable |
This interface represents the Objective-C protocol |
| IMTL4BinaryFunction |
This interface represents the Objective-C protocol |
| IMTL4CommandAllocator |
This interface represents the Objective-C protocol |
| IMTL4CommandBuffer |
This interface represents the Objective-C protocol |
| IMTL4CommandEncoder |
This interface represents the Objective-C protocol |
| IMTL4CommandQueue |
This interface represents the Objective-C protocol |
| IMTL4CommitFeedback |
This interface represents the Objective-C protocol |
| IMTL4Compiler |
This interface represents the Objective-C protocol |
| IMTL4CompilerTask |
This interface represents the Objective-C protocol |
| IMTL4ComputeCommandEncoder |
This interface represents the Objective-C protocol |
| IMTL4CounterHeap |
This interface represents the Objective-C protocol |
| IMTL4MachineLearningCommandEncoder |
This interface represents the Objective-C protocol |
| IMTL4MachineLearningPipelineState |
This interface represents the Objective-C protocol |
| IMTL4PipelineDataSetSerializer |
This interface represents the Objective-C protocol |
| IMTL4RenderCommandEncoder |
This interface represents the Objective-C protocol |
| IMTLAccelerationStructure |
This interface represents the Objective-C protocol |
| IMTLAccelerationStructureCommandEncoder |
This interface represents the Objective-C protocol |
| IMTLAllocation |
This interface represents the Objective-C protocol |
| IMTLArgumentEncoder |
Encodes data into argument buffers. |
| IMTLBinaryArchive |
This interface represents the Objective-C protocol |
| IMTLBinding |
This interface represents the Objective-C protocol |
| IMTLBlitCommandEncoder |
Protocol for writing data into frame buffers. |
| IMTLBuffer |
System protocol for raw data that is accessible in strides. |
| IMTLBufferBinding |
This interface represents the Objective-C protocol |
| IMTLCaptureScope |
Custom capture scope boundary for debugging from Xcode. |
| IMTLCommandBuffer |
Protocol for commands that are run on a GPU |
| IMTLCommandBufferEncoderInfo |
This interface represents the Objective-C protocol |
| IMTLCommandEncoder |
System protocol for enqueuing and writing commands into a buffer. |
| IMTLCommandQueue |
System protocol for objects that can queue command buffers for running on a GPU. |
| IMTLComputeCommandEncoder |
Protocol for encoding and running parallel commands on a GPU. |
| IMTLComputePipelineState |
System protocol that represents a compiled compute program. |
| IMTLCounter |
This interface represents the Objective-C protocol |
| IMTLCounterSampleBuffer |
This interface represents the Objective-C protocol |
| IMTLCounterSet |
This interface represents the Objective-C protocol |
| IMTLDepthStencilState |
System protocol for describing how the depth stencil should interact with the depth buffer during rendering. |
| IMTLDevice |
System protocol for interacting with a single graphics device. |
| IMTLDrawable |
Interface definition for objects that can receive rendering commands. |
| IMTLDynamicLibrary |
This interface represents the Objective-C protocol |
| IMTLEvent |
This interface represents the Objective-C protocol |
| IMTLFence |
This interface represents the Objective-C protocol |
| IMTLFunction |
System protocol for shader functions that are suitable for use on a GPU in a shader or compute function. |
| IMTLFunctionHandle |
This interface represents the Objective-C protocol |
| IMTLFunctionLog |
This interface represents the Objective-C protocol |
| IMTLFunctionLogDebugLocation |
This interface represents the Objective-C protocol |
| IMTLFunctionStitchingAttribute |
This interface represents the Objective-C protocol |
| IMTLFunctionStitchingNode |
This interface represents the Objective-C protocol |
| IMTLHeap |
This interface represents the Objective-C protocol |
| IMTLIndirectCommandBuffer |
This interface represents the Objective-C protocol |
| IMTLIndirectComputeCommand |
This interface represents the Objective-C protocol |
| IMTLIndirectRenderCommand |
This interface represents the Objective-C protocol |
| IMTLIntersectionFunctionTable |
This interface represents the Objective-C protocol |
| IMTLLibrary |
System protocol for libraries of shaders. |
| IMTLLogContainer |
This interface represents the Objective-C protocol |
| IMTLLogState |
This interface represents the Objective-C protocol |
| IMTLObjectPayloadBinding |
This interface represents the Objective-C protocol |
| IMTLParallelRenderCommandEncoder |
System protocol for breaking a single rendering pass into parallel command sets. |
| IMTLRasterizationRateMap |
This interface represents the Objective-C protocol |
| IMTLRenderCommandEncoder |
System protocol for encoding render commands and state into a buffer. |
| IMTLRenderPipelineState |
System protocol for encoding the state of a rendering pipeline. |
| IMTLResidencySet |
This interface represents the Objective-C protocol |
| IMTLResource |
System protocol for for allocated segments of GPU memory. |
| IMTLResourceStateCommandEncoder |
This interface represents the Objective-C protocol |
| IMTLResourceViewPool |
This interface represents the Objective-C protocol |
| IMTLSamplerState |
System protocol the way that shaders or compute kernels will sample textures. |
| IMTLSharedEvent |
This interface represents the Objective-C protocol |
| IMTLTensor |
This interface represents the Objective-C protocol |
| IMTLTensorBinding |
This interface represents the Objective-C protocol |
| IMTLTexture |
System protocol for image data that is used by vertex shaders, fragment shaders, and compute kernels. |
| IMTLTextureBinding |
This interface represents the Objective-C protocol |
| IMTLTextureViewPool |
This interface represents the Objective-C protocol |
| IMTLThreadgroupBinding |
This interface represents the Objective-C protocol |
| IMTLVisibleFunctionTable |
This interface represents the Objective-C protocol |
Enums
| Name | Description |
|---|---|
| MTL4AlphaToCoverageState | |
| MTL4AlphaToOneState | |
| MTL4BinaryFunctionOptions | |
| MTL4BlendState | |
| MTL4CommandQueueError | |
| MTL4CompilerTaskStatus | |
| MTL4CounterHeapType | |
| MTL4IndirectCommandBufferSupportState | |
| MTL4LogicalToPhysicalColorAttachmentMappingState | |
| MTL4PipelineDataSetSerializerConfiguration | |
| MTL4RenderEncoderOptions | |
| MTL4ShaderReflection | |
| MTL4TimestampGranularity | |
| MTL4VisibilityOptions | |
| MTLAccelerationStructureInstanceDescriptorType | |
| MTLAccelerationStructureInstanceOptions | |
| MTLAccelerationStructureRefitOptions | |
| MTLAccelerationStructureUsage | |
| MTLArgumentAccess |
Function access restrictions of argument data in the shader code. |
| MTLArgumentBuffersTier |
Enumerates argument buffer tiers. |
| MTLArgumentType |
The resource type of an argument of a function. |
| MTLAttributeFormat |
Enumerates formats for function attributes. |
| MTLBarrierScope | |
| MTLBinaryArchiveError | |
| MTLBindingAccess | |
| MTLBindingType | |
| MTLBlendFactor |
Argument values for use with MTLBlendOperation. |
| MTLBlendOperation |
How the source and destination values are combined. |
| MTLBlitOption |
Enumerates blitting options. |
| MTLBufferSparseTier | |
| MTLCaptureDestination | |
| MTLCaptureError | |
| MTLColorWriteMask |
Permits or restricts writing to specific color channels. |
| MTLCommandBufferError |
Enumeration of error codes describing why a command buffer has failed. |
| MTLCommandBufferErrorOption | |
| MTLCommandBufferStatus |
The state of the command-buffer state-machine. Enqueued->Committed->Scheduled->Completed. |
| MTLCommandEncoderErrorState | |
| MTLCommonCounter | |
| MTLCompareFunction |
Holds a comparison test. When the comparison test passes, the incoming fragment is compared to the stored data at the specified ___location. |
| MTLCompileSymbolVisibility | |
| MTLCounterSampleBufferError | |
| MTLCounterSamplingPoint | |
| MTLCpuCacheMode |
Enumerates what cache mode is used for CPU mapping of a resource. |
| MTLCullMode |
Enumerates modes for culling and which types of primitives are culled. |
| MTLCurveBasis | |
| MTLCurveEndCaps | |
| MTLCurveType | |
| MTLDataType |
The data type of a function argument, as used in the shader language code. |
| MTLDepthClipMode |
Enumerates values that indicate whether to clip or clamp depth values. |
| MTLDeviceLocation | |
| MTLDispatchType | |
| MTLDynamicLibraryError | |
| MTLFeatureSet |
Enumerates the hardware feature sets that are available on a device. |
| MTLFunctionLogType | |
| MTLFunctionOptions | |
| MTLFunctionType |
The type of a Metal function. |
| MTLGpuFamily | |
| MTLHazardTrackingMode | |
| MTLHeapType | |
| MTLIndexType |
The index type for an index buffer. |
| MTLIndirectCommandType | |
| MTLIntersectionFunctionSignature | |
| MTLIOCommandQueueType | |
| MTLIOCompressionMethod | |
| MTLIOCompressionStatus | |
| MTLIOError | |
| MTLIOPriority | |
| MTLIOStatus | |
| MTLLanguageVersion |
Enumerates Metal shader programming language versions. |
| MTLLibraryError |
Enumerates errors possible in the creation of an MTLLibrary or MTLFunction object. |
| MTLLibraryOptimizationLevel | |
| MTLLibraryType | |
| MTLLoadAction |
An action performed at the start of a rendering pass. |
| MTLLogLevel | |
| MTLLogStateError | |
| MTLMathFloatingPointFunctions | |
| MTLMathMode | |
| MTLMatrixLayout | |
| MTLMotionBorderMode | |
| MTLMultisampleDepthResolveFilter |
Enumerates MSAA dept resolve filter operations. |
| MTLMultisampleStencilResolveFilter | |
| MTLMutability |
Enumerates buffer mutability descriptions. |
| MTLPatchType | |
| MTLPipelineOption |
Options relating to argument information in the creation of a pipeline. |
| MTLPixelFormat |
The format used by pixels, including color, depth, compression technigue, and data type for components. |
| MTLPrimitiveTopologyClass | |
| MTLPrimitiveType |
Enumerates the primitive geometry used for drawing commands. |
| MTLPurgeableState |
The purgeable state of the resource. |
| MTLReadWriteTextureTier | |
| MTLRenderStages | |
| MTLResourceOptions |
Holds options used by buffer and texture objects. |
| MTLResourceUsage |
Enumerates resource usage patterns. |
| MTLSamplerAddressMode |
The wrapping mode. Used when a fetch falls outside the bounds of a texture. |
| MTLSamplerBorderColor | |
| MTLSamplerMinMagFilter |
Options for calculating the pixel value returned within a mipmap level. |
| MTLSamplerMipFilter |
Options for calculating the pixel value returned with multiple mipmap levels. |
| MTLSamplerReductionMode | |
| MTLShaderValidation | |
| MTLSparsePageSize | |
| MTLSparseTextureMappingMode | |
| MTLSparseTextureRegionAlignmentMode | |
| MTLStages | |
| MTLStencilOperation |
What to do if a stencil value passes or fails a comparison test. |
| MTLStepFunction | |
| MTLStitchedLibraryOptions | |
| MTLStorageMode |
Enumerates CPU cache modes for resource mapping. |
| MTLStoreAction |
The action to be performed at the end of a rendering pass. |
| MTLStoreActionOptions |
Enumerates store action options. |
| MTLTensorDataType | |
| MTLTensorError | |
| MTLTensorUsage | |
| MTLTessellationControlPointIndexType | |
| MTLTessellationFactorFormat | |
| MTLTessellationFactorStepFunction | |
| MTLTessellationPartitionMode | |
| MTLTextureCompressionType | |
| MTLTextureSparseTier | |
| MTLTextureSwizzle | |
| MTLTextureType |
The dimensionality of each texture and how multiple images are arranged. |
| MTLTextureUsage |
Enumerates the ways in which a IMTLTexture may be used. |
| MTLTransformType | |
| MTLTriangleFillMode |
How to rasterize triangle and triangle-strip primitives. |
| MTLVertexFormat |
Enumerates vertex data formats (type and number). |
| MTLVertexStepFunction |
The frequency at which the vertex shader function should fetch attribute data. |
| MTLVisibilityResultMode |
Enumerates values that control how and whether to monitor samples that pass depth and stencil tests. |
| MTLVisibilityResultType | |
| MTLWinding |
Vertex winding rule for front-facing primitives. |
| NSDeviceCertification | |
| NSProcessPerformanceProfile | |
Delegates
Remarks
The Metal framework provides low-level control of Graphical Processing Unit (GPU) accelerated rendering and data-parallel computation (GPGPU).
The Metal framework provides low-level access to the GPU. Metal provides precompiled shaders, state objects, and explicit command scheduling. These facilities can be used for either 3D rendering or General-Purpose GPU computation.