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" {}
§Example
Drawing a rotating triangle.
ⓘ
#![deny(unsafe_op_in_unsafe_fn)]
#![allow(clippy::incompatible_msrv)]
#![cfg_attr(not(target_os = "macos"), allow(dead_code, unused))]
use core::{cell::OnceCell, ptr::NonNull};
use objc2::rc::Retained;
use objc2::runtime::ProtocolObject;
use objc2::{define_class, msg_send, DefinedClass, MainThreadMarker, MainThreadOnly};
#[cfg(target_os = "macos")]
use objc2_app_kit::{
NSApplication, NSApplicationActivationPolicy, NSApplicationDelegate, NSBackingStoreType,
NSWindow, NSWindowStyleMask,
};
use objc2_foundation::{
ns_string, NSDate, NSNotification, NSObject, NSObjectProtocol, NSPoint, NSRect, NSSize,
};
use objc2_metal::{
MTLCommandBuffer, MTLCommandEncoder, MTLCommandQueue, MTLCreateSystemDefaultDevice,
MTLDevice as _, MTLLibrary, MTLPackedFloat3, MTLPrimitiveType, MTLRenderCommandEncoder,
MTLRenderPipelineDescriptor, MTLRenderPipelineState,
};
#[cfg(target_os = "macos")]
use objc2_metal_kit::{MTKView, MTKViewDelegate};
#[derive(Copy, Clone)]
#[repr(C)]
struct SceneProperties {
time: f32,
}
#[derive(Copy, Clone)]
#[repr(C)]
struct VertexInput {
position: MTLPackedFloat3,
color: MTLPackedFloat3,
}
macro_rules! idcell {
($name:ident => $this:expr) => {
$this.ivars().$name.set($name).expect(&format!(
"ivar should not already be initialized: `{}`",
stringify!($name)
));
};
($name:ident <= $this:expr) => {
#[rustfmt::skip]
let Some($name) = $this.ivars().$name.get() else {
unreachable!(
"ivar should be initialized: `{}`",
stringify!($name)
)
};
};
}
// The state of our application.
struct Ivars {
start_date: Retained<NSDate>,
command_queue: OnceCell<Retained<ProtocolObject<dyn MTLCommandQueue>>>,
pipeline_state: OnceCell<Retained<ProtocolObject<dyn MTLRenderPipelineState>>>,
#[cfg(target_os = "macos")]
window: OnceCell<Retained<NSWindow>>,
}
define_class!(
// SAFETY:
// - The superclass NSObject does not have any subclassing requirements.
// - `MainThreadOnly` is correct, since this is an application delegate.
// - `Delegate` does not implement `Drop`.
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[name = "Delegate"]
#[ivars = Ivars]
struct Delegate;
unsafe impl NSObjectProtocol for Delegate {}
// define the delegate methods for the `NSApplicationDelegate` protocol
#[cfg(target_os = "macos")]
unsafe impl NSApplicationDelegate for Delegate {
#[unsafe(method(applicationDidFinishLaunching:))]
#[allow(non_snake_case)]
unsafe fn applicationDidFinishLaunching(&self, _notification: &NSNotification) {
let mtm = self.mtm();
// create the app window
let window = {
let content_rect = NSRect::new(NSPoint::new(0., 0.), NSSize::new(768., 768.));
let style = NSWindowStyleMask::Closable
| NSWindowStyleMask::Resizable
| NSWindowStyleMask::Titled;
let backing_store_type = NSBackingStoreType::Buffered;
let flag = false;
unsafe {
NSWindow::initWithContentRect_styleMask_backing_defer(
NSWindow::alloc(mtm),
content_rect,
style,
backing_store_type,
flag,
)
}
};
// get the default device
let device =
MTLCreateSystemDefaultDevice().expect("failed to get default system device");
// create the command queue
let command_queue = device
.newCommandQueue()
.expect("Failed to create a command queue.");
// create the metal view
let mtk_view = {
let frame_rect = window.frame();
unsafe {
MTKView::initWithFrame_device(MTKView::alloc(mtm), frame_rect, Some(&device))
}
};
// create the pipeline descriptor
let pipeline_descriptor = MTLRenderPipelineDescriptor::new();
unsafe {
pipeline_descriptor
.colorAttachments()
.objectAtIndexedSubscript(0)
.setPixelFormat(mtk_view.colorPixelFormat());
}
// compile the shaders
let library = device
.newLibraryWithSource_options_error(
ns_string!(include_str!("triangle.metal")),
None,
)
.expect("Failed to create a library.");
// configure the vertex shader
let vertex_function = library.newFunctionWithName(ns_string!("vertex_main"));
pipeline_descriptor.setVertexFunction(vertex_function.as_deref());
// configure the fragment shader
let fragment_function = library.newFunctionWithName(ns_string!("fragment_main"));
pipeline_descriptor.setFragmentFunction(fragment_function.as_deref());
// create the pipeline state
let pipeline_state = device
.newRenderPipelineStateWithDescriptor_error(&pipeline_descriptor)
.expect("Failed to create a pipeline state.");
// configure the metal view delegate
unsafe {
let object = ProtocolObject::from_ref(self);
mtk_view.setDelegate(Some(object));
}
// configure the window
window.setContentView(Some(&mtk_view));
window.center();
window.setTitle(ns_string!("metal example"));
window.makeKeyAndOrderFront(None);
// initialize the delegate state
idcell!(command_queue => self);
idcell!(pipeline_state => self);
idcell!(window => self);
}
}
// define the delegate methods for the `MTKViewDelegate` protocol
#[cfg(target_os = "macos")] // TODO: Support iOS
unsafe impl MTKViewDelegate for Delegate {
#[unsafe(method(drawInMTKView:))]
#[allow(non_snake_case)]
unsafe fn drawInMTKView(&self, mtk_view: &MTKView) {
idcell!(command_queue <= self);
idcell!(pipeline_state <= self);
// prepare for drawing
let Some(current_drawable) = (unsafe { mtk_view.currentDrawable() }) else {
return;
};
let Some(command_buffer) = command_queue.commandBuffer() else {
return;
};
let Some(pass_descriptor) = (unsafe { mtk_view.currentRenderPassDescriptor() }) else {
return;
};
let Some(encoder) = command_buffer.renderCommandEncoderWithDescriptor(&pass_descriptor)
else {
return;
};
// compute the scene properties
let scene_properties_data = &SceneProperties {
time: unsafe { self.ivars().start_date.timeIntervalSinceNow() } as f32,
};
// write the scene properties to the vertex shader argument buffer at index 0
let scene_properties_bytes = NonNull::from(scene_properties_data);
unsafe {
encoder.setVertexBytes_length_atIndex(
scene_properties_bytes.cast::<core::ffi::c_void>(),
core::mem::size_of_val(scene_properties_data),
0,
)
};
// compute the triangle geometry
let vertex_input_data: &[VertexInput] = &[
VertexInput {
position: MTLPackedFloat3 {
x: -f32::sqrt(3.0) / 4.0,
y: -0.25,
z: 0.,
},
color: MTLPackedFloat3 {
x: 1.,
y: 0.,
z: 0.,
},
},
VertexInput {
position: MTLPackedFloat3 {
x: f32::sqrt(3.0) / 4.0,
y: -0.25,
z: 0.,
},
color: MTLPackedFloat3 {
x: 0.,
y: 1.,
z: 0.,
},
},
VertexInput {
position: MTLPackedFloat3 {
x: 0.,
y: 0.5,
z: 0.,
},
color: MTLPackedFloat3 {
x: 0.,
y: 0.,
z: 1.,
},
},
];
// write the triangle geometry to the vertex shader argument buffer at index 1
let vertex_input_bytes = NonNull::from(vertex_input_data);
unsafe {
encoder.setVertexBytes_length_atIndex(
vertex_input_bytes.cast::<core::ffi::c_void>(),
core::mem::size_of_val(vertex_input_data),
1,
)
};
// configure the encoder with the pipeline and draw the triangle
encoder.setRenderPipelineState(pipeline_state);
unsafe {
encoder.drawPrimitives_vertexStart_vertexCount(MTLPrimitiveType::Triangle, 0, 3)
};
encoder.endEncoding();
// schedule the command buffer for display and commit
command_buffer.presentDrawable(ProtocolObject::from_ref(&*current_drawable));
command_buffer.commit();
}
#[unsafe(method(mtkView:drawableSizeWillChange:))]
#[allow(non_snake_case)]
unsafe fn mtkView_drawableSizeWillChange(&self, _view: &MTKView, _size: NSSize) {
// println!("mtkView_drawableSizeWillChange");
}
}
);
impl Delegate {
fn new(mtm: MainThreadMarker) -> Retained<Self> {
let this = Self::alloc(mtm);
let this = this.set_ivars(Ivars {
start_date: unsafe { NSDate::now() },
command_queue: OnceCell::default(),
pipeline_state: OnceCell::default(),
#[cfg(target_os = "macos")]
window: OnceCell::default(),
});
unsafe { msg_send![super(this), init] }
}
}
#[cfg(target_os = "macos")]
fn main() {
let mtm = MainThreadMarker::new().unwrap();
// configure the app
let app = NSApplication::sharedApplication(mtm);
app.setActivationPolicy(NSApplicationActivationPolicy::Regular);
// configure the application delegate
let delegate = Delegate::new(mtm);
let object = ProtocolObject::from_ref(&*delegate);
app.setDelegate(Some(object));
// run the app
app.run();
}
#[cfg(not(target_os = "macos"))]
fn main() {
panic!("This example is currently only supported on macOS");
}
With the following shader.
ⓘ
#include <metal_stdlib>
struct SceneProperties {
float time;
};
struct VertexInput {
metal::packed_float3 position;
metal::packed_float3 color;
};
struct VertexOutput {
metal::float4 position [[position]];
metal::float4 color;
};
vertex VertexOutput vertex_main(
device const SceneProperties& properties [[buffer(0)]],
device const VertexInput* vertices [[buffer(1)]],
uint vertex_idx [[vertex_id]]
) {
VertexOutput out;
VertexInput in = vertices[vertex_idx];
out.position =
metal::float4(
metal::float2x2(
metal::cos(properties.time), -metal::sin(properties.time),
metal::sin(properties.time), metal::cos(properties.time)
) * in.position.xy,
in.position.z,
1);
out.color = metal::float4(in.color, 1);
return out;
}
fragment metal::float4 fragment_main(VertexOutput in [[stage_in]]) {
return in.color;
}
Structs§
- 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 MTLAccelerationStructure
andMTLAccelerationStructureTypes
- 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 MTLAccelerationStructureCommandEncoder
- 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 MTLAccelerationStructure
andMTLAccelerationStructureTypes
- 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
- 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 MTLArgument
- Apple’s documentation
- 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
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
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 MTLStageInputOutputDescriptor
- Apple’s documentation
- MTLIndirect
Acceleration Structure Instance Descriptor MTLAccelerationStructure
andMTLAccelerationStructureTypes
andMTLTypes
- Apple’s documentation
- MTLIndirect
Acceleration Structure Motion Instance Descriptor MTLAccelerationStructure
andMTLTypes
- 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 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.
- 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 suitable for storing 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
- 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
- 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 MTLDevice
- 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
- 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
- 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
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).
- 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
- 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§
- 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
- 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§
- MTLAcceleration
Structure MTLAccelerationStructure
andMTLAllocation
andMTLResource
- Apple’s documentation
- MTLAcceleration
Structure Command Encoder MTLAccelerationStructureCommandEncoder
andMTLCommandEncoder
- Apple’s documentation
- MTLAllocation
MTLAllocation
- Apple’s documentation
- 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 MTLBlitCommandEncoder
andMTLCommandEncoder
- A command encoder that performs basic copies and blits between buffers and textures.
- MTLBuffer
MTLAllocation
andMTLBuffer
andMTLResource
- 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 MTLCommandEncoder
andMTLComputeCommandEncoder
- A command encoder that writes data parallel compute commands.
- MTLCompute
Pipeline State MTLComputePipeline
- 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
MTLAllocation
andMTLHeap
- 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 MTLAllocation
andMTLIndirectCommandBuffer
andMTLResource
- Apple’s documentation
- MTLIndirect
Compute Command MTLIndirectCommandEncoder
- Apple’s documentation
- MTLIndirect
Render Command MTLIndirectCommandEncoder
- Apple’s documentation
- MTLIntersection
Function Table MTLAllocation
andMTLIntersectionFunctionTable
andMTLResource
- 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 MTLCommandEncoder
andMTLParallelRenderCommandEncoder
- 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 MTLCommandEncoder
andMTLRenderCommandEncoder
- 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 MTLRenderCommandEncoder
andMTLCommandEncoder
- MTLRender
Pipeline State MTLRenderPipeline
- 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
MTLAllocation
andMTLResource
- Common APIs available for MTLBuffer and MTLTexture instances
- MTLResource
State Command Encoder MTLCommandEncoder
andMTLResourceStateCommandEncoder
- Apple’s documentation
- MTLSampler
State MTLSampler
- An immutable collection of sampler state compiled for a single device.
- MTLShared
Event MTLEvent
- Apple’s documentation
- MTLTexture
MTLAllocation
andMTLResource
andMTLTexture
- MTLTexture represents a collection of 1D, 2D, or 3D images.
- MTLTexture
Binding MTLArgument
- Apple’s documentation
- MTLThreadgroup
Binding MTLArgument
- Apple’s documentation
- MTLVisible
Function Table MTLAllocation
andMTLResource
andMTLVisibleFunctionTable
- 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 MTLDevice
andblock2
- 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
- MTLIO
Compression ⚠Context Default Chunk Size MTLIOCompressor
- MTLIO
Create ⚠Compression Context MTLIOCompressor
andMTLDevice
- MTLIO
Flush ⚠AndDestroy Compression Context MTLIOCompressor
- MTLRemove
Device ⚠Observer MTLDevice
- Removes a previously installed observer for device change notifications.
Type Aliases§
- MTLArgument
Access MTLArgument
- Apple’s documentation
- MTLAutoreleased
Argument MTLArgument
andMTLLibrary
- Apple’s documentation
- MTLAutoreleased
Compute Pipeline Reflection MTLComputePipeline
andMTLDevice
- Apple’s documentation
- MTLAutoreleased
Render Pipeline Reflection MTLDevice
andMTLRenderPipeline
- Apple’s documentation
- MTLCommand
Buffer Handler MTLCommandBuffer
andblock2
- 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 MTLDevice
andblock2
- Block signature for device notifications
- MTLDevice
Notification Name MTLDevice
- Type for device notifications
- MTLDrawable
Presented Handler MTLDrawable
andblock2
- The presented callback function protocol
- MTLIO
Command Buffer Handler MTLIOCommandBuffer
andblock2
- Apple’s documentation
- MTLIO
Compression Context MTLIOCompressor
- Apple’s documentation
- MTLNew
Compute Pipeline State Completion Handler MTLComputePipeline
andMTLDevice
andblock2
- Apple’s documentation
- MTLNew
Compute Pipeline State With Reflection Completion Handler MTLComputePipeline
andMTLDevice
andblock2
- Apple’s documentation
- MTLNew
Library Completion Handler MTLDevice
andMTLLibrary
andblock2
- Apple’s documentation
- MTLNew
Render Pipeline State Completion Handler MTLDevice
andMTLRenderPipeline
andblock2
- Apple’s documentation
- MTLNew
Render Pipeline State With Reflection Completion Handler MTLDevice
andMTLRenderPipeline
andblock2
- Apple’s documentation
- MTLShared
Event Notification Block MTLEvent
andblock2
- Apple’s documentation
- MTLTimestamp
MTLDevice
- Apple’s documentation
- NSDevice
Certification MTLDeviceCertification
- Apple’s documentation
- NSProcess
Performance Profile MTLDeviceCertification
- Apple’s documentation