Repository navigation
Metal tvOS xcode27.3 b1
Alex Soto edited this page Nov 4, 2026
·
1 revision
#Metal.framework
diff -ruN /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandEncoder.h /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandEncoder.h
--- /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandEncoder.h 2026-10-04 01:29:51
+++ /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandEncoder.h 2026-11-04 09:32:02
@@ -47,9 +47,9 @@
/// Encodes a consumer barrier on work you commit to the same command queue.
///
-/// Encode a barrier that guarantees that any subsequent work you encode in the current command encoder that corresponds
-/// to the `beforeStages` stages doesn't proceed until Metal completes all work prior to the current command encoder
-/// corresponding to the `afterQueueStages` stages, completes.
+/// Encode a barrier that guarantees that any subsequent work you encode in the current command encoder, and future
+/// command encoders on the same command queue, that corresponds to the `beforeStages` stages doesn't proceed until
+/// Metal completes all work prior to the current command encoder corresponding to the `afterQueueStages` stages.
///
/// Metal can reorder the exact point where it applies the barrier, so encode the barrier as close to the command that
/// consumes the resource as possible. Don't use this method for synchronizing resource access within the same pass.
@@ -60,12 +60,76 @@
/// You can specify `afterQueueStages` and `beforeStages` that contain ``MTLStages`` unrelated to the current command
/// encoder.
///
+/// ## Barriers order work
+///
+/// A barrier orders work, not other barriers. Metal doesn't guarantee that two barriers combine through a stage that
+/// they share, unless work in that stage runs between them and both barriers apply to that work. A fence update or a
+/// fence wait in that stage counts as work.
+///
+/// For example, `firstEncoder` and `secondEncoder` are consecutive encoders on the same command queue. The first
+/// barrier makes blit operations wait for dispatch operations, and the second barrier makes dispatch operations
+/// wait for blit operations. However, because no blit operations execute in `firstEncoder` after its barrier,
+/// Metal doesn't guarantee that dispatch operations after the barrier in `secondEncoder`, and in later encoders,
+/// wait for dispatch operations in encoders before `firstEncoder`.
+///
+/// @TabNavigator {
+/// @Tab("Swift") {
+/// ```swift
+/// firstEncoder.barrier(afterQueueStages: .dispatch,
+/// beforeStages: .blit,
+/// visibilityOptions: [])
+/// firstEncoder.endEncoding()
+///
+/// // Metal only synchronizes between these dispatch stages if you encode blit work
+///
+/// secondEncoder.barrier(afterQueueStages: .blit,
+/// beforeStages: .dispatch,
+/// visibilityOptions: [])
+/// secondEncoder.endEncoding()
+/// ```
+/// }
+/// @Tab("Objective-C") {
+/// ```obj-c
+/// [firstEncoder barrierAfterQueueStages:MTLStageDispatch
+/// beforeStages:MTLStageBlit
+/// visibilityOptions:MTL4VisibilityOptionNone];
+/// [firstEncoder endEncoding];
+///
+/// // Metal only synchronizes between these dispatch stages if you encode blit work
+///
+/// [secondEncoder barrierAfterQueueStages:MTLStageBlit
+/// beforeStages:MTLStageDispatch
+/// visibilityOptions:MTL4VisibilityOptionNone];
+/// [secondEncoder endEncoding];
+/// ```
+/// }
+/// @Tab("C++") {
+/// ```cpp
+/// firstEncoder->barrierAfterQueueStages(MTL::StageDispatch,
+/// MTL::StageBlit,
+/// MTL4::VisibilityOptionNone);
+/// firstEncoder->endEncoding();
+///
+/// // Metal only synchronizes between these dispatch stages if you encode blit work
+///
+/// secondEncoder->barrierAfterQueueStages(MTL::StageBlit,
+/// MTL::StageDispatch,
+/// MTL4::VisibilityOptionNone);
+/// secondEncoder->endEncoding();
+/// ```
+/// }
+/// }
+///
+/// To make work in one stage wait for work in another stage, pass both stages to one barrier: the stage to wait for in
+/// `afterQueueStages`, and the stage that waits in `beforeStages`.
+///
/// - Parameters:
/// - afterQueueStages: ``MTLStages`` mask that represents the stages of work to wait for.
/// This argument applies to work corresponding to these stages you
/// encode in prior command encoders, and not for the current encoder.
/// - beforeStages: ``MTLStages`` mask that represents the stages of work that wait.
-/// This argument applies to work you encode in the current command encoder.
+/// This argument applies to work you encode in the current command encoder
+/// and future command encoders on the same command queue.
/// - visibilityOptions: ``MTL4VisibilityOptions`` of the barrier.
- (void)barrierAfterQueueStages:(MTLStages)afterQueueStages
beforeStages:(MTLStages)beforeStages
@@ -80,10 +144,74 @@
/// When calling this method, you can pass any ``MTLStages`` to parameters `afterStages` and `beforeQueueStages`,
/// even stages that don't relate to the current or prior command encoders.
///
+/// ## Barriers order work
+///
+/// A barrier orders work, not other barriers. Metal doesn't guarantee that two barriers combine through a stage that
+/// they share, unless work in that stage runs between them and both barriers apply to that work. A fence update or a
+/// fence wait in that stage counts as work.
+///
+/// For example, `firstEncoder` and `secondEncoder` are consecutive encoders on the same command queue. The first
+/// barrier makes blit operations wait for dispatch operations, and the second barrier makes dispatch operations
+/// wait for blit operations. However, because no blit operations execute in `secondEncoder` before its barrier,
+/// Metal doesn't guarantee that dispatch operations in encoders after `secondEncoder` wait for dispatch operations
+/// before the barrier in `firstEncoder`.
+///
+/// @TabNavigator {
+/// @Tab("Swift") {
+/// ```swift
+/// firstEncoder.barrier(afterStages: .dispatch,
+/// beforeQueueStages: .blit,
+/// visibilityOptions: [])
+/// firstEncoder.endEncoding()
+///
+/// // Metal only synchronizes between these dispatch stages if you encode blit work
+///
+/// secondEncoder.barrier(afterStages: .blit,
+/// beforeQueueStages: .dispatch,
+/// visibilityOptions: [])
+/// secondEncoder.endEncoding()
+/// ```
+/// }
+/// @Tab("Objective-C") {
+/// ```obj-c
+/// [firstEncoder barrierAfterStages:MTLStageDispatch
+/// beforeQueueStages:MTLStageBlit
+/// visibilityOptions:MTL4VisibilityOptionNone];
+/// [firstEncoder endEncoding];
+///
+/// // Metal only synchronizes between these dispatch stages if you encode blit work
+///
+/// [secondEncoder barrierAfterStages:MTLStageBlit
+/// beforeQueueStages:MTLStageDispatch
+/// visibilityOptions:MTL4VisibilityOptionNone];
+/// [secondEncoder endEncoding];
+/// ```
+/// }
+/// @Tab("C++") {
+/// ```cpp
+/// firstEncoder->barrierAfterStages(MTL::StageDispatch,
+/// MTL::StageBlit,
+/// MTL4::VisibilityOptionNone);
+/// firstEncoder->endEncoding();
+///
+/// // Metal only synchronizes between these dispatch stages if you encode blit work
+///
+/// secondEncoder->barrierAfterStages(MTL::StageBlit,
+/// MTL::StageDispatch,
+/// MTL4::VisibilityOptionNone);
+/// secondEncoder->endEncoding();
+/// ```
+/// }
+/// }
+///
+/// To make work in one stage wait for work in another stage, pass both stages to one barrier: the stage to wait for in
+/// `afterStages`, and the stage that waits in `beforeQueueStages`.
+///
/// - Parameters:
/// - afterStages: ``MTLStages`` mask that represents the stages of work to wait for.
/// This argument applies to work corresponding to these stages you encode in
-/// the current command encoder prior to this barrier command.
+/// the current command encoder before this barrier command and in prior command
+/// encoders on the same command queue.
/// - beforeQueueStages: ``MTLStages`` mask that represents the stages of work that need to wait.
/// This argument applies to subsequent encoders and not to work in the current
/// command encoder.
@@ -123,6 +251,15 @@
/// For example, for a ``MTL4ComputeCommandEncoder`` you can provide any combination of ``MTLStages/MTLStageDispatch``,
/// ``MTLStages/MTLStageBlit`` and ``MTLStages/MTLStageAccelerationStructure``.
///
+/// Metal treats a fence update as work occurring in the stages the `afterEncoderStages` parameter references.
+/// Barriers that make work in those stages wait also make the fence update wait.
+///
+/// For example, if you call ``MTL4CommandEncoder/barrierAfterQueueStages:beforeStages:visibilityOptions:``
+/// on a render command encoder, with ``MTLStages/MTLStageDispatch`` in the `afterQueueStages` parameter and
+/// ``MTLStages/MTLStageVertex`` in the `beforeStages` parameter, a later fence update operation after
+/// ``MTLStages/MTLStageVertex`` waits for the dispatch operations that the barrier applies to, even when
+/// the pass has no vertex stage work.
+///
/// - Parameters:
/// - fence: ``MTLFence`` instance to update.
/// - afterEncoderStages: ``MTLStages`` value that represents the stages of work to wait for.
@@ -140,6 +277,14 @@
/// Use parameter `beforeEncoderStages` to pass in a combination of ``MTLStages`` for which this encoder can encode
/// work. For example, for a ``MTL4ComputeCommandEncoder`` you can provide any combination of
/// ``MTLStages/MTLStageDispatch``, ``MTLStages/MTLStageBlit`` and ``MTLStages/MTLStageAccelerationStructure``.
+///
+/// Metal treats a fence wait as work occurring in the stages that correspond to the `beforeEncoderStages` parameter.
+/// Barriers that wait for work in those stages also wait for the fence.
+///
+/// For example, if you encode a wait operation for a fence before ``MTLStages/MTLStageDispatch`` on a
+/// compute command encoder, and then you call ``MTL4CommandEncoder/barrierAfterStages:beforeQueueStages:visibilityOptions:``
+/// with ``MTLStages/MTLStageDispatch`` in `afterStages` and ``MTLStages/MTLStageVertex`` in `beforeQueueStages`, the
+/// vertex work to which the barrier applies waits for the fence, even when the pass has no dispatch operations.
///
/// - Parameters:
/// - fence: ``MTLFence`` instance to wait for.
diff -ruN /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h
--- /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h 2026-10-04 00:55:55
+++ /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h 2026-11-04 09:32:02
@@ -60,8 +60,47 @@
/// A value indicating whether the pipeline supports Metal indirect command buffers.
@property (readwrite, nonatomic) MTL4IndirectCommandBufferSupportState supportIndirectCommandBuffers;
+/// A scheduling strategy for code that blocks across SIMD groups.
+///
+/// Metal resolves scheduling automatically when either this value is
+/// ``MTLForwardProgressUsage/MTLForwardProgressUsageAutomatic`` or the
+/// kernel's `[[forward_progress_usage]]` attribute is `automatic`.
+/// When both are explicit, this property takes priority.
+///
+/// The default value is
+/// ``MTLForwardProgressUsage/MTLForwardProgressUsageAutomatic``.
@property(readwrite, nonatomic) MTLForwardProgressUsage forwardProgressUsage API_AVAILABLE(macos(27.0), ios(27.0));
+
+/// A contention relief strategy the compiler applies to the pipeline.
+///
+/// The contention relief strategy applies to all pipeline functions
+/// except for functions you compile separately which retain the contention
+/// relief they were compiled with.
+///
+/// This property sets the contention relief only for functions with
+/// a `contention_relief` attribute equal to `default`, which includes functions
+/// that don't specify the attribute. Functions you write with the `automatic`
+/// or `none` attribute ignore this property.
+///
+/// The default value is
+/// ``MTLContentionRelief/MTLContentionReliefAutomatic``.
@property(readwrite, nonatomic) MTLContentionRelief contentionRelief API_AVAILABLE(macos(27.0), ios(27.0));
+
+/// A Boolean value that indicates whether Metal tunes the pipeline for
+/// persistent threads.
+///
+/// Set to `true` to tune the pipeline for long-lived kernels with
+/// non-specific grid sizes, such as producer-consumer models. When `true`,
+/// call the resulting ``MTLComputePipelineState`` instance's
+/// ``MTLComputePipelineState/recommendedPersistentThreadgroupsPerGridForThreadsPerThreadgroup:``
+/// method to get the optimal dispatch size.
+///
+/// This property can't be `true` when ``forwardProgressUsage`` is
+/// ``MTLForwardProgressUsage/MTLForwardProgressUsageWeak`` because
+/// it's an invalid configuration which may trigger unpredictable behavior
+/// or an error.
+///
+/// The default value is `false`.
@property(readwrite, nonatomic) BOOL optimizeForPersistentKernel API_AVAILABLE(macos(27.0), ios(27.0));
/// Resets the descriptor to its default values.
diff -ruN /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h
--- /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h 2026-10-04 01:29:01
+++ /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h 2026-11-04 09:32:02
@@ -334,7 +334,7 @@
/// ``MTLIndexType/MTLIndexTypeUInt16``, and aligned to 4 bytes if the format is
/// ``MTLIndexType/MTLIndexTypeUInt32``.
/// - indexBufferLength: An integer that represents the length of `indexBuffer`, in bytes. You are responsible for
-/// ensuring this this size is a multiple of 2 if the `indexType` format is ``MTLIndexType/MTLIndexTypeUInt16``,
+/// ensuring this size is a multiple of 2 if the `indexType` format is ``MTLIndexType/MTLIndexTypeUInt16``,
/// and a multiple of 4 if the format is ``MTLIndexType/MTLIndexTypeUInt32``.
/// If this draw call causes Metal to read indices at or beyond the `indexBufferLength`, Metal
/// continues to execute them assigning a value of `0` to the `vertex_id` attribute.
@@ -367,10 +367,10 @@
/// ``MTLIndexType/MTLIndexTypeUInt16``, and aligned to 4 bytes if the format is
/// ``MTLIndexType/MTLIndexTypeUInt32``.
/// - indexBufferLength: An integer that represents the length of `indexBuffer`, in bytes. You are responsible for
-/// ensuring this this size is a multiple of 2 if the `indexType` format is ``MTLIndexType/MTLIndexTypeUInt16``,
+/// ensuring this size is a multiple of 2 if the `indexType` format is ``MTLIndexType/MTLIndexTypeUInt16``,
/// and a multiple of 4 if the format is ``MTLIndexType/MTLIndexTypeUInt32``.
-/// Metal disregards this value and assigns `0` to the `vertex_id` attribute for all primitives that
-/// require loading indices at a byte offset of `indexBufferLength` or greater.
+/// If this draw call causes Metal to read indices at or beyond the `indexBufferLength`, Metal
+/// continues to execute them assigning a value of `0` to the `vertex_id` attribute.
/// - instanceCount: An integer that represents the number of times the command draws `primitiveType` with `indexCount`
/// vertices.
- (void)drawIndexedPrimitives:(MTLPrimitiveType)primitiveType
@@ -405,15 +405,15 @@
/// ``MTLIndexType/MTLIndexTypeUInt16``, and aligned to 4 bytes if the format is
/// ``MTLIndexType/MTLIndexTypeUInt32``.
/// - indexBufferLength: An integer that represents the length of `indexBuffer`, in bytes. You are responsible for
-/// ensuring this this size is a multiple of 2 if the `indexType` format is ``MTLIndexType/MTLIndexTypeUInt16``,
+/// ensuring this size is a multiple of 2 if the `indexType` format is ``MTLIndexType/MTLIndexTypeUInt16``,
/// and a multiple of 4 if the format is ``MTLIndexType/MTLIndexTypeUInt32``.
/// If this draw call causes Metal to read indices at or beyond the `indexBufferLength`, Metal
-/// continues to execute them assigning a value of `0` to the `vertex_id` attribute.
+/// continues to execute them assigning a value of `baseVertex` to the `vertex_id` attribute.
/// - instanceCount: An integer that represents the number of times the command draws `primitiveType` with `indexCount`
/// vertices.
/// - baseVertex: The lowest value the command passes to your vertex shader functions’s parameter with the `vertex_id`
-/// attribute. Metal disregards this value and assigns `0` to the `vertex_id` attribute for all
-/// primitives that require loading indices at a byte offset of `indexBufferLength` or greater.
+/// attribute. Metal assigns `baseVertex` to the `vertex_id` attribute for all primitives that load
+/// indices at a byte offset of `indexBufferLength` or greater.
/// - baseInstance: The lowest value the command passes to your vertex shader’s parameter with the `instance_id` attribute.
- (void)drawIndexedPrimitives:(MTLPrimitiveType)primitiveType
indexCount:(NSUInteger)indexCount
@@ -453,11 +453,13 @@
/// allowing you to implement a GPU-driven workflow where a compute pipeline state determines the draw arguments.
///
/// Because this is an indexed draw call, Metal interprets the contents of the indirect buffer to match the
-/// layout of struct ``MTLDrawIndexedPrimitivesIndirectArguments``, which includes `indexStart` and `indexCount`
-/// members, denoting a range within the index buffer you provide in the `indexBuffer` parameter.
+/// layout of struct ``MTLDrawIndexedPrimitivesIndirectArguments``, which includes:
+/// - `indexStart` and `indexCount` members, denoting a range within the index buffer you provide in the `indexBuffer` parameter.
+/// The range of indices within the `indexBuffer` form the primitives Metal draws.
+/// - `baseVertex`, the lowest value the command passes to your vertex shader functions’s parameter with the `vertex_id`
+/// attribute. Metal assigns `baseVertex` to the `vertex_id` attribute for all primitives that load indices at a byte offset
+/// of `indexBufferLength` or greater.
///
-/// The range of indices within the `indexBuffer` form the primitives Metal draws.
-///
/// Metal imposes some restrictions on the index buffer's address, which needs to be 2- or 4-byte aligned, and its length
/// in bytes, which needs to be a multiple of 2 or 4, depending on whether the format of the index is
/// ``MTLIndexType/MTLIndexTypeUInt16`` or ``MTLIndexType/MTLIndexTypeUInt32``.
@@ -475,10 +477,11 @@
/// ``MTLIndexType/MTLIndexTypeUInt16``, and aligned to 4 bytes if the format is
/// ``MTLIndexType/MTLIndexTypeUInt32``.
/// - indexBufferLength: An integer that represents the length of `indexBuffer`, in bytes. You are responsible for
-/// ensuring this this size is a multiple of 2 if the `indexType` format is ``MTLIndexType/MTLIndexTypeUInt16``,
+/// ensuring this size is a multiple of 2 if the `indexType` format is ``MTLIndexType/MTLIndexTypeUInt16``,
/// and a multiple of 4 if the format is ``MTLIndexType/MTLIndexTypeUInt32``.
/// If this draw call causes Metal to read indices at or beyond the `indexBufferLength`, Metal
-/// continues to execute them assigning a value of `0` to the `vertex_id` attribute.
+/// continues to execute them assigning a value of ``MTLDrawIndexedPrimitivesIndirectArguments/baseVertex``
+/// to the `vertex_id` attribute.
/// - indirectBuffer: GPUAddress of an ``MTLBuffer`` instance with data that matches the layout of the
/// ``MTLDrawIndexedPrimitivesIndirectArguments`` structure. This address requires 4-byte alignment.
- (void)drawIndexedPrimitives:(MTLPrimitiveType)primitiveType
diff -ruN /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h
--- /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h 2026-10-04 00:55:56
+++ /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h 2026-11-04 09:32:02
@@ -22,58 +22,43 @@
@class MTLArgument;
-/*!
- @enum MTLBindingsType
- @abstract The type of a resource binding.
-
- @constant MTLBindingTypeBuffer
- This binding represents a buffer.
-
- @constant MTLBindingTypeThreadgroupMemory
- This binding represents threadgroup memory.
-
- @constant MTLBindingTypeTexture
- This binding represents a texture.
-
- @constant MTLBindingTypeSampler
- This binding represents a sampler.
-
- @constant MTLBindingTypeImageblockData
- This binding represents an image block data.
-
- @constant MTLBindingTypeImageblock
- This binding represents an image block.
-
- @constant MTLBindingTypeVisibleFunctionTable
- This binding represents a visible function table object.
-
- @constant MTLBindingTypePrimitiveAccelerationStructure
- This binding represents a primitive acceleration structure object.
-
- @constant MTLBindingTypeInstanceAccelerationStructure
- This binding represents an instance acceleration structure object.
-
- @constant MTLBinidngTypeIntersectionFunctionTable
- This binding represents an intersection function table object.
-
- @constant MTLBindingTypeObjectPayload
- This binding represents an object payload.
-
- @constant MTLBindingTypeTensor
- This binding represents a tensor object.
-*/
+/// The kinds of resources that you bind to a shader function or pipeline.
typedef NS_ENUM(NSInteger, MTLBindingType) {
+
+ /// A binding point for a buffer.
MTLBindingTypeBuffer = 0,
+
+ /// A binding point for threadgroup memory.
MTLBindingTypeThreadgroupMemory = 1,
+
+ /// A binding point for a texture.
MTLBindingTypeTexture = 2,
+
+ /// A binding point for a sampler.
MTLBindingTypeSampler = 3,
+
+ /// A binding point for imageblock data.
MTLBindingTypeImageblockData = 16,
+
+ /// A binding point for an imageblock.
MTLBindingTypeImageblock = 17,
+
+ /// A binding point for a visible function table.
MTLBindingTypeVisibleFunctionTable = 24,
+
+ /// A binding point for a primitive acceleration structure.
MTLBindingTypePrimitiveAccelerationStructure = 25,
+
+ /// A binding point for an instance acceleration structure.
MTLBindingTypeInstanceAccelerationStructure = 26,
+
+ /// A binding point for an intersection function table.
MTLBindingTypeIntersectionFunctionTable = 27,
+
+ /// A binding point for an object payload.
MTLBindingTypeObjectPayload = 34,
+
+ /// A binding point for a tensor.
MTLBindingTypeTensor API_AVAILABLE(macos(26.0), ios(26.0)) = 37,
} API_AVAILABLE(macos(11.0), ios(14.0));
@@ -283,32 +268,123 @@
@end
+/// Properties that all bindings share.
+///
+/// A description of one resource that a shader function uses, such as a buffer, texture, or sampler.
+///
+/// To get binding objects for a pipeline state, request binding information when you create the pipeline state:
+/// - For a Metal 3 pipeline state, use ``MTLPipelineOption/MTLPipelineOptionBindingInfo``.
+/// - For a Metal 4 pipeline state, include ``MTL4ShaderReflection/MTL4ShaderReflectionBindingInfo`` in an instance of
+/// ``MTL4PipelineOptions/shaderReflection``.
+///
+/// Then read the bindings from the pipeline reflection object, such as ``MTLComputePipelineReflection/bindings``
+/// or ``MTLRenderPipelineReflection/vertexBindings``.
+///
+/// You obtain the binding objects for a function in a Metal library by calling ``MTLLibrary/reflectionForFunctionWithName:``
+/// to get its reflection data, and accessing its ``MTLFunctionReflection/bindings`` property.
+///
+/// Some kinds of bindings provide more information through a more specific protocol, such as ``MTLBufferBinding``
+/// or ``MTLTextureBinding``. To read that information, check the ``MTLBinding/type`` property first. Then cast the
+/// binding to the protocol for that kind.
MTL_EXPORT API_AVAILABLE(macos(13.0), ios(16.0)) NS_SWIFT_SENDABLE
@protocol MTLBinding<NSObject>
+
+/// The name that identifies the resource.
+///
+/// When a shader function declares the resource, this value is the name of the parameter or the global variable.
+///
+/// For a tensor in a machine learning pipeline, this value is the name of the model input or output.
@property (readonly) NSString *name;
+
+/// The kind of resource that the binding describes.
+///
+/// Check this value before you cast the binding to a more specific protocol, such as ``MTLBufferBinding``.
@property (readonly) MTLBindingType type;
+
+/// The read and write access that the function has to the resource.
+///
+/// The value shows whether the function reads the resource, writes it, or does both. For the list of values, see ``MTLBindingAccess``.
@property (readonly) MTLBindingAccess access;
+
+/// The index that identifies where the resource binds.
+///
+/// When a shader attribute declares the resource, this value is the index in that attribute, such as `n` in
+/// `[[buffer(n)]]` or `[[texture(n)]]`. Each kind of attribute has a separate set of slots.
+///
+/// For a tensor in a machine learning pipeline, this value is the position of the tensor in the pipeline's inputs
+/// and outputs, with the inputs first. For an imageblock or an object payload, this value has no meaning.
@property (readonly) NSUInteger index;
+/// A Boolean value that indicates whether the function code uses the binding.
+///
+/// The value is `YES` when the function uses the binding. The value is `NO` when the function declares the binding but never uses it.
@property (readonly, getter=isUsed) BOOL used;
+
+/// A Boolean value that indicates whether the binding is a parameter of the function.
@property (readonly, getter=isArgument) BOOL argument;
+
@end
+/// A description of a buffer that a shader function uses.
+///
+/// Metal returns an object of this type when the ``MTLBinding/type`` property is ``MTLBindingType/MTLBindingTypeBuffer``.
MTL_EXPORT API_AVAILABLE(macos(13.0), ios(16.0))
@protocol MTLBufferBinding<MTLBinding>
-@property (readonly) NSUInteger bufferAlignment; // min alignment of starting offset in the buffer
-@property (readonly) NSUInteger bufferDataSize; // sizeof(T) for T *argName
-@property (readonly) MTLDataType bufferDataType; // MTLDataTypeFloat, MTLDataTypeFloat4, MTLDataTypeStruct, ...
+
+/// The minimum alignment, in bytes, of the start offset in the buffer.
+///
+/// This value is the alignment of the element type `T` for a parameter such as `device T *argName`.
+@property (readonly) NSUInteger bufferAlignment;
+
+/// The size, in bytes, of each element in the buffer.
+///
+/// This value is `sizeof(T)` for a parameter such as `device T *argName`.
+@property (readonly) NSUInteger bufferDataSize;
+
+/// The data type of each element in the buffer.
+///
+/// For example, the value is ``MTLDataType/MTLDataTypeFloat4`` for a parameter such as `device float4 *argName`.
+/// When the element is a struct, the value is ``MTLDataType/MTLDataTypeStruct``.
+@property (readonly) MTLDataType bufferDataType;
+
+/// The struct layout of each element in the buffer.
+///
+/// The value is `nil` unless both of these conditions are true:
+/// - ``MTLBufferBinding/bufferDataType`` is ``MTLDataType/MTLDataTypeStruct``.
+/// - You request buffer type information when you create the pipeline state.
+///
+/// To request buffer type information:
+/// - For a Metal 3 pipeline state, use ``MTLPipelineOption/MTLPipelineOptionBufferTypeInfo``.
+/// - For a Metal 4 pipeline state, include ``MTL4ShaderReflection/MTL4ShaderReflectionBufferTypeInfo`` in an instance of
+/// ``MTL4PipelineOptions/shaderReflection``.
@property (readonly, nullable) MTLStructType *bufferStructType;
+
+/// An object that describes the properties of the buffer's pointer type.
@property (readonly, nullable) MTLPointerType *bufferPointerType;
+
@end
+/// A description of threadgroup memory that a shader function uses.
+///
+/// Metal returns an object of this type when the ``MTLBinding/type`` property is ``MTLBindingType/MTLBindingTypeThreadgroupMemory``.
MTL_EXPORT API_AVAILABLE(macos(13.0), ios(16.0))
@protocol MTLThreadgroupBinding<MTLBinding>
+
+/// The alignment, in bytes, of each element in threadgroup memory.
+///
+/// This value is the alignment of the element type `T` for a parameter such as `threadgroup T *argName`.
@property (readonly) NSUInteger threadgroupMemoryAlignment;
-@property (readonly) NSUInteger threadgroupMemoryDataSize; // sizeof(T) for T *argName
+
+/// The size, in bytes, of each element in threadgroup memory.
+///
+/// This value is `sizeof(T)` for a parameter such as `threadgroup T *argName`.
+@property (readonly) NSUInteger threadgroupMemoryDataSize;
+
@end
+/// A description of a texture that a shader function uses.
+///
+/// Metal returns an object of this type when the ``MTLBinding/type`` property is ``MTLBindingType/MTLBindingTypeTexture``.
MTL_EXPORT API_AVAILABLE(macos(13.0), ios(16.0))
@protocol MTLTextureBinding<MTLBinding>
@property (readonly) MTLTextureType textureType; // texture1D, texture2D...
@@ -317,13 +393,29 @@
@property (readonly) NSUInteger arrayLength;
@end
+/// A description of the payload that an object function passes to a mesh function.
+///
+/// Metal returns an object of this type when the ``MTLBinding/type`` property is ``MTLBindingType/MTLBindingTypeObjectPayload``.
+///
+/// The payload appears in ``MTLRenderPipelineReflection/objectBindings`` with read-write access when the object function writes into it.
+/// The payload appears in ``MTLRenderPipelineReflection/meshBindings`` with read-only access when the mesh function reads from it.
+/// The ``MTLBinding/index`` property has no meaning for this binding.
MTL_EXPORT API_AVAILABLE(macos(13.0), ios(16.0))
@protocol MTLObjectPayloadBinding<MTLBinding>
-@property (readonly) NSUInteger objectPayloadAlignment; // min alignment of starting offset in the buffer
-@property (readonly) NSUInteger objectPayloadDataSize; // sizeof(T) for T *argName
+
+/// The alignment, in bytes, of the payload type.
+@property (readonly) NSUInteger objectPayloadAlignment;
+
+/// The size, in bytes, of the payload type as the shader declares it.
+///
+/// This value is `sizeof(T)` for the payload type `T`.
+@property (readonly) NSUInteger objectPayloadDataSize;
+
@end
-/// An object that represents a tensor bound to a graphics or compute function or a machine learning function.
+/// A description of a tensor that a shader function or a machine learning pipeline uses.
+///
+/// Metal returns an object of this type when the ``MTLBinding/type`` property is ``MTLBindingType/MTLBindingTypeTensor``.
MTL_EXPORT API_AVAILABLE(macos(26.0), ios(26.0))
@protocol MTLTensorBinding<MTLBinding>
diff -ruN /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h
--- /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h 2026-10-04 00:49:26
+++ /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h 2026-11-04 09:32:02
@@ -102,9 +102,9 @@
/// Encodes a consumer barrier on work you commit to the same command queue.
///
-/// Encode a barrier that guarantees that any subsequent work you encode in the current command encoder that corresponds
-/// to the `beforeStages` stages doesn't proceed until Metal completes all work prior to the current command encoder
-/// corresponding to the `afterQueueStages` stages, completes.
+/// Encode a barrier that guarantees that any subsequent work you encode in the current command encoder, and future
+/// command encoders on the same command queue, that corresponds to the `beforeStages` stages doesn't proceed until
+/// Metal completes all work prior to the current command encoder corresponding to the `afterQueueStages` stages.
///
/// Metal can reorder the exact point where it applies the barrier, so use this method for synchronizing between different passes.
///
@@ -114,12 +114,69 @@
/// You can specify `afterQueueStages` and `beforeStages` that contain ``MTLStages`` unrelated to the current command
/// encoder.
///
+/// ## Barriers order work
+///
+/// A barrier orders work, not other barriers. Metal doesn't guarantee that two barriers combine through a stage that
+/// they share, unless work in that stage runs between them and both barriers apply to that work.
+///
+/// For example, `firstEncoder` and `secondEncoder` are consecutive encoders on the same command queue. The first
+/// barrier makes blit operations wait for dispatch operations, and the second barrier makes dispatch operations
+/// wait for blit operations. However, because no blit operations execute in `firstEncoder` after its barrier,
+/// Metal doesn't guarantee that dispatch operations after the barrier in `secondEncoder`, and in later encoders,
+/// wait for dispatch operations in encoders before `firstEncoder`.
+///
+/// @TabNavigator {
+/// @Tab("Swift") {
+/// ```swift
+/// firstEncoder.barrier(afterQueueStages: .dispatch,
+/// beforeStages: .blit)
+/// firstEncoder.endEncoding()
+///
+/// // Metal only synchronizes between these dispatch stages if you encode blit work
+///
+/// secondEncoder.barrier(afterQueueStages: .blit,
+/// beforeStages: .dispatch)
+/// secondEncoder.endEncoding()
+/// ```
+/// }
+/// @Tab("Objective-C") {
+/// ```obj-c
+/// [firstEncoder barrierAfterQueueStages:MTLStageDispatch
+/// beforeStages:MTLStageBlit];
+/// [firstEncoder endEncoding];
+///
+/// // Metal only synchronizes between these dispatch stages if you encode blit work
+///
+/// [secondEncoder barrierAfterQueueStages:MTLStageBlit
+/// beforeStages:MTLStageDispatch];
+/// [secondEncoder endEncoding];
+/// ```
+/// }
+/// @Tab("C++") {
+/// ```cpp
+/// firstEncoder->barrierAfterQueueStages(MTL::StageDispatch,
+/// MTL::StageBlit);
+/// firstEncoder->endEncoding();
+///
+/// // Metal only synchronizes between these dispatch stages if you encode blit work
+///
+/// secondEncoder->barrierAfterQueueStages(MTL::StageBlit,
+/// MTL::StageDispatch);
+/// secondEncoder->endEncoding();
+/// ```
+/// }
+/// }
+///
+/// To make work in one stage wait for work in another stage, pass both stages to one barrier: the stage to wait for in
+/// `afterQueueStages`, and the stage that waits in `beforeStages`.
+///
/// - Parameters:
/// - afterQueueStages: ``MTLStages`` mask that represents the stages of work to wait for.
/// This argument applies to work corresponding to these stages you
/// encode in prior command encoders, and not for the current encoder.
/// - beforeStages: ``MTLStages`` mask that represents the stages of work that wait.
-/// This argument applies to work you encode in the current command encoder.
+/// This argument applies to work you encode in the current command encoder
+/// and future command encoders on the same command queue.
- (void)barrierAfterQueueStages:(MTLStages)afterQueueStages
beforeStages:(MTLStages)beforeStages
API_AVAILABLE(macos(26.0), ios(26.0));
diff -ruN /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h
--- /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h 2026-10-04 01:29:01
+++ /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h 2026-11-04 09:32:02
@@ -150,11 +150,50 @@
*/
@property(readwrite, nonatomic) MTLSize requiredThreadsPerThreadgroup API_AVAILABLE(macos(26.0), ios(26.0));
-@property(readwrite, nonatomic) MTLForwardProgressUsage forwardProgressUsage API_AVAILABLE(macos(27.0), ios(27.0));
+/// A scheduling strategy for code that blocks across SIMD groups.
+///
+/// Metal resolves scheduling automatically when either this value is
+/// ``MTLForwardProgressUsage/MTLForwardProgressUsageAutomatic`` or the
+/// kernel's `[[forward_progress_usage]]` attribute is `automatic`.
+/// When both are explicit, this property takes priority.
+///
+/// The default value is
+/// ``MTLForwardProgressUsage/MTLForwardProgressUsageAutomatic``.
+@property(readwrite, nonatomic)
+ MTLForwardProgressUsage forwardProgressUsage API_AVAILABLE(macos(27.0), ios(27.0));
+
+/// A contention relief strategy the compiler applies to the pipeline.
+///
+/// The contention relief strategy applies to all pipeline functions
+/// except for functions you compile separately which retain the contention
+/// relief they were compiled with.
+///
+/// This property sets the contention relief only for functions with
+/// a `contention_relief` attribute equal to `default`, which includes functions
+/// that don't specify the attribute. Functions you write with the `automatic`
+/// or `none` attribute ignore this property.
+///
+/// The default value is
+/// ``MTLContentionRelief/MTLContentionReliefAutomatic``.
@property(readwrite, nonatomic) MTLContentionRelief contentionRelief API_AVAILABLE(macos(27.0), ios(27.0));
+
+/// A Boolean value that indicates whether Metal tunes the pipeline for
+/// persistent threads.
+///
+/// Set to `true` to tune the pipeline for long-lived kernels with
+/// non-specific grid sizes, such as producer-consumer models. When `true`,
+/// call the resulting ``MTLComputePipelineState`` instance's
+/// ``MTLComputePipelineState/recommendedPersistentThreadgroupsPerGridForThreadsPerThreadgroup:``
+/// method to get the optimal dispatch size.
+///
+/// This property can't be `true` when ``forwardProgressUsage`` is
+/// ``MTLForwardProgressUsage/MTLForwardProgressUsageWeak`` because
+/// it's an invalid configuration which may trigger unpredictable behavior
+/// or an error.
+///
+/// The default value is `false`.
@property(readwrite, nonatomic) BOOL optimizeForPersistentKernel API_AVAILABLE(macos(27.0), ios(27.0));
-
@end
/*!
@@ -295,7 +334,28 @@
*/
@property (readonly) MTLSize requiredThreadsPerThreadgroup API_AVAILABLE(macos(26.0), ios(26.0));
+/// Returns the number of threadgroups per grid that achieves the best
+/// throughput for a threads-per-threadgroup size.
+///
+/// This method applies to pipelines you create with an
+/// ``MTLComputePipelineDescriptor`` with its
+/// ``MTLComputePipelineDescriptor/optimizeForPersistentKernel`` property equal to `true`.
+///
+/// - Parameter threadsPerThreadgroup: The number of threads in each
+/// threadgroup.
+/// - Returns: The number of threadgroups to dispatch. Pass a threadgroup count
+/// to a dispatch method, such as
+/// ``MTLComputeCommandEncoder/dispatchThreadgroups:threadsPerThreadgroup:``,
+/// whose width, height, and depth product equals this value.
- (NSUInteger)recommendedPersistentThreadgroupsPerGridForThreadsPerThreadgroup:(MTLSize)threadsPerThreadgroup API_AVAILABLE(macos(27.0), ios(27.0));
+
+/// A forward progress strategy the framework applies to the pipeline.
+///
+/// When you create the pipeline with a
+/// ``MTLComputePipelineDescriptor/forwardProgressUsage`` value of
+/// ``MTLForwardProgressUsage/MTLForwardProgressUsageAutomatic``, this property
+/// reflects the usage mode the framework selects.
+/// Otherwise, the property reflects the descriptor's value at the time you create the pipeline.
@property(readonly) MTLForwardProgressUsage forwardProgressUsage API_AVAILABLE(macos(27.0), ios(27.0));
@end
diff -ruN /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h
--- /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h 2026-10-04 00:55:56
+++ /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h 2026-11-04 09:32:02
@@ -30,9 +30,24 @@
MTLShaderValidationDisabled = 2,
} API_AVAILABLE(macos(15.0), ios(18.0));
+/// Options for how a pipeline depends on blocking synchronization across
+/// SIMD groups.
+///
+/// These options tune the GPU scheduler for different synchronization patterns.
typedef NS_ENUM(NSInteger, MTLForwardProgressUsage) {
+ /// Instructs the Metal compiler to decide which forward progress
+ /// mode to apply to the pipeline by analyzing its program.
+ ///
+ /// The implementation uses a conservative detection scheme. Select a specific
+ /// setting if the default detection is insufficient.
MTLForwardProgressUsageAutomatic = 0,
+
+ /// Tunes the pipeline for programs that infrequently impede forward
+ /// progress, such as spin loops or locks.
MTLForwardProgressUsageWeak = 1,
+
+ /// Tunes the pipeline for programs that frequently impede forward
+ /// progress, such as spin loops or locks.
MTLForwardProgressUsageSIMDGroupParallel = 2,
} API_AVAILABLE(macos(27.0), ios(27.0));
diff -ruN /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h
--- /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h 2026-10-04 01:29:51
+++ /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h 2026-11-04 09:32:02
@@ -336,6 +336,12 @@
MTLPixelFormatX32_Stencil8 API_AVAILABLE(macos(10.12), ios(10.0)) = 261,
MTLPixelFormatX24_Stencil8 API_DEPRECATED("Use MTLPixelFormatX32_Stencil8 instead", macos(10.12, 27.0), macCatalyst(13.0, 27.0)) API_UNAVAILABLE(ios) = 262,
+ /// Defers assigning the pixel format.
+ ///
+ /// Assign this format to a color attachment's `pixelFormat` in a render pipeline descriptor to build a pipeline state
+ /// that leaves the attachment's format unresolved. To finalize the format, pass a descriptor that assigns a concrete
+ /// format to ``MTL4Compiler/newRenderPipelineStateBySpecializationWithDescriptor:pipeline:error:``,
+ /// which returns a specialized pipeline state.
MTLPixelFormatUnspecialized API_AVAILABLE(macos(26.0), ios(26.0)) = 263,
} API_AVAILABLE(macos(10.11), ios(8.0));
diff -ruN /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h
--- /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h 2026-10-04 01:28:59
+++ /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h 2026-11-04 09:32:02
@@ -58,7 +58,7 @@
MTLBlendOperationMax = 4,
/// Defers assigning the blend operation.
///
- // Until you specialize this value in the pipeline state, it behaves as `MTLBlendOperationAdd`.
+ /// Until you specialize this value in the pipeline state, it behaves as `MTLBlendOperationAdd`.
MTLBlendOperationUnspecialized API_AVAILABLE(macos(26.0), ios(26.0)) = 5,
} API_AVAILABLE(macos(10.11), ios(8.0));
diff -ruN /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h
--- /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h 2026-10-04 00:55:57
+++ /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h 2026-11-04 09:32:02
@@ -103,11 +103,18 @@
return result;
}
+/// Options that control whether the compiler inserts contention relief.
typedef NS_ENUM(NSInteger, MTLContentionRelief) {
+ /// Adds contention relief when the kernel lacks other forms.
+ ///
+ /// The implementation inserts contention relief when the kernel doesn't
+ /// include other mechanisms, such as `metal::atomic_wait_*` functions or
+ /// explicit calls to `metal::yield_simdgroup`.
MTLContentionReliefAutomatic = 0,
+
+ /// Disables contention relief.
MTLContentionReliefNone = 1,
} API_AVAILABLE(macos(27.0), ios(27.0));
-
/*!
@typedef MTLResourceID