-
Notifications
You must be signed in to change notification settings - Fork 558
Metal iOS xcode26.4 b2
Rolf Bjarne Kvinge edited this page Feb 27, 2026
·
1 revision
#Metal.framework
diff -ruN /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningCommandEncoder.h /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningCommandEncoder.h
--- /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningCommandEncoder.h 2025-11-09 04:17:52
+++ /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningCommandEncoder.h 2026-02-16 09:00:56
@@ -36,7 +36,7 @@
/// The argument table provides inputs to all subsequent Machine Learning dispatches.
/// - Parameters:
/// - argumentTable: An argument table to set on the command encoder's Machine Learning stage.
--(void)setArgumentTable:(id <MTL4ArgumentTable>)argumentTable;
+-(void)setArgumentTable:(nullable id <MTL4ArgumentTable>)argumentTable;
/// Dispatches a machine learning network using the current pipeline state and argument table.
///
diff -ruN /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h
--- /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h 2025-11-09 04:04:18
+++ /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h 2026-02-16 09:00:56
@@ -602,7 +602,7 @@
/// - Parameters:
/// - argumentTable: ``MTL4ArgumentTable`` to set.
/// - stages: A ``MTLRenderStages`` bitmask that specifies the shader stages with visibility over the table.
-- (void)setArgumentTable:(id<MTL4ArgumentTable>)argumentTable
+- (void)setArgumentTable:(nullable id<MTL4ArgumentTable>)argumentTable
atStages:(MTLRenderStages)stages;
/// Configures the vertex winding order that determines which face of a geometric primitive is the front one.
diff -ruN /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h
--- /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h 2025-11-09 04:17:50
+++ /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h 2026-02-16 07:15:16
@@ -156,26 +156,26 @@
- (void)waitForFence:(id <MTLFence>)fence API_AVAILABLE(macos(10.13), ios(10.0));
-/*!
- @method getTextureAccessCounters:region:mipLevel:slice:type:resetCounters:countersBuffer:countersBufferOffset
- @abstract Copies tile access counters within specified region into provided buffer
- */
--(void) getTextureAccessCounters:(id<MTLTexture>)texture
- region:(MTLRegion)region
- mipLevel:(NSUInteger)mipLevel
- slice:(NSUInteger)slice
- resetCounters:(BOOL)resetCounters
- countersBuffer:(id<MTLBuffer>)countersBuffer
- countersBufferOffset:(NSUInteger)countersBufferOffset API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
+ /*!
+ @method getTextureAccessCounters:region:mipLevel:slice:type:resetCounters:countersBuffer:countersBufferOffset
+ @abstract Copies tile access counters within specified region into provided buffer
+ */
+ -(void) getTextureAccessCounters:(id<MTLTexture>)texture
+ region:(MTLRegion)region
+ mipLevel:(NSUInteger)mipLevel
+ slice:(NSUInteger)slice
+ resetCounters:(BOOL)resetCounters
+ countersBuffer:(id<MTLBuffer>)countersBuffer
+ countersBufferOffset:(NSUInteger)countersBufferOffset API_DEPRECATED("Access counters are no longer supported in Metal", macos(11.0, 26.4), macCatalyst(14.0, 26.4), ios(13.0, 26.4), tvos(16.0, 26.4));
-/*!
- @method resetTextureAccessCounters:region:mipLevel:slice:type:
- @abstract Resets tile access counters within specified region
- */
--(void) resetTextureAccessCounters:(id<MTLTexture>)texture
- region:(MTLRegion)region
- mipLevel:(NSUInteger)mipLevel
- slice:(NSUInteger)slice API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
+ /*!
+ @method resetTextureAccessCounters:region:mipLevel:slice:type:
+ @abstract Resets tile access counters within specified region
+ */
+ -(void) resetTextureAccessCounters:(id<MTLTexture>)texture
+ region:(MTLRegion)region
+ mipLevel:(NSUInteger)mipLevel
+ slice:(NSUInteger)slice API_DEPRECATED("Access counters are no longer supported in Metal", macos(11.0, 26.4), macCatalyst(14.0, 26.4), ios(13.0, 26.4), tvos(16.0, 26.4));
diff -ruN /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h
--- /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h 2025-11-09 04:04:18
+++ /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h 2026-02-16 09:00:56
@@ -146,7 +146,6 @@
/*!
@property requiredThreadsPerThreadgroup
@abstract Sets the required threads-per-threadgroup during dispatches. The `threadsPerThreadgroup` argument of any dispatch must match this value if it is set.
- Optional, unless the pipeline is going to use CooperativeTensors in which case this must be set.
Setting this to a size of 0 in every dimension disables this property
*/
@property(readwrite, nonatomic) MTLSize requiredThreadsPerThreadgroup API_AVAILABLE(macos(26.0), ios(26.0));
@@ -163,9 +162,31 @@
@property (nullable, readonly) NSString *label API_AVAILABLE(macos(10.13), ios(11.0));
-/// Provides access to this compute pipeline's reflection.
+/// The compute pipeline's reflection information, if available.
///
-/// Reflection is `nil` if you create the pipeline state object directly from the ``MTLDevice`` protocol.
+/// The property is `nil` by default to help reduce your app's memory footprint,
+/// but you can create reflection information when your app needs it.
+///
+/// Create reflection information by building a pipeline from an
+/// ``MTL4Compiler`` instance with the following steps:
+///
+/// 1. Configure the ``MTL4PipelineOptions/shaderReflection`` property of an ``MTL4PipelineOptions`` instance.
+/// 2. Assign that instance to the ``MTL4PipelineDescriptor/options`` property of an ``MTL4PipelineDescriptor`` instance.
+/// 3. Create a compute pipeline state by passing that pipeline descriptor to one of the ``MTL4Compiler`` instance's methods.
+///
+/// During development, the property may contain reflection information without these steps
+/// because a GPU frame capture, Metal API validation layer, or shader validation layer
+/// can request reflection information when you enable them.
+/// You need to request reflection information if your app depends on it
+/// because Metal might not load these layers when you distribute your app.
+
+///
+/// > Tip:
+/// Verify the apps that need reflection information in production by testing them
+/// without a frame capture, Metal API validation layer, or shader validation layer.
+///
+/// The property is `nil` when you create a pipeline state from an``MTLDevice`` instance,
+/// such as with its ``MTLDevice/newComputePipelineStateWithDescriptor:options:completionHandler:`` method.
@property (nullable, readonly) MTLComputePipelineReflection* reflection API_AVAILABLE(macos(26.0), ios(26.0));
/// Gets the function handle for a function this pipeline links at the Metal IR level by name.
@@ -182,7 +203,7 @@
/// - Parameters:
/// - function: A binary function object representing the function binary to find.
///
-/// - Returns: A function handle corresponding to the function if the binary function mathces a function in this
+/// - Returns: A function handle corresponding to the function if the binary function matches a function in this
/// pipeline state, otherwise `nil`.
- (nullable id<MTLFunctionHandle>)functionHandleWithBinaryFunction:(id<MTL4BinaryFunction>)function API_AVAILABLE(macos(26.0), ios(26.0));
diff -ruN /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h
--- /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h 2025-11-09 04:40:11
+++ /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h 2026-02-16 07:21:51
@@ -306,6 +306,21 @@
MTLCounterSamplingPointAtBlitBoundary
} API_AVAILABLE(macos(11.0), ios(14.0));
+
+/// Enumeration of kinds of errors that methods on MTLDevice can produce.
+typedef NS_ENUM(NSInteger, MTLDeviceError)
+{
+ /// Indicates the absence of any problems.
+ MTLDeviceErrorNone = 0,
+
+ /// Indicates the requested feature is not supported by the current device.
+ MTLDeviceErrorNotSupported = 1,
+} API_AVAILABLE(macos(26.4), ios(26.4));
+
+API_AVAILABLE(macos(26.4), ios(26.4))
+MTL_EXTERN NSErrorDomain const MTLDeviceErrorDomain;
+
+
/*!
@abstract Represent a memory size and alignment in bytes.
*/
@@ -1137,6 +1152,8 @@
- (nullable id<MTLBinaryArchive>) newBinaryArchiveWithDescriptor:(MTLBinaryArchiveDescriptor*)descriptor
error:(NSError**)error API_AVAILABLE(macos(11.0), ios(14.0));
+/// A Boolean value that indicates whether the device supports placement sparse resources.
+@property (readonly) BOOL supportsPlacementSparse API_AVAILABLE(macos(26.4), ios(26.4));
/*!
@property supportsRaytracing
@abstract Query device support for using ray tracing from compute pipelines.
diff -ruN /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h
--- /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h 2025-11-09 06:41:50
+++ /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h 2026-02-16 09:13:26
@@ -394,7 +394,6 @@
/*!
@property requiredThreadsPerThreadgroup
@abstract Sets the required threads-per-threadgroup during dispatches. The `threadsPerThreadgroup` argument of any dispatch must match this value if it is set.
- Optional, unless the pipeline is going to use CooperativeTensors in which case this must be set.
Setting this to a size of 0 in every dimension disables this property
*/
@property(readwrite, nonatomic) MTLSize requiredThreadsPerThreadgroup API_AVAILABLE(macos(26.0), ios(26.0));
diff -ruN /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h
--- /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h 2025-11-09 04:40:12
+++ /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h 2026-02-16 09:00:55
@@ -343,9 +343,31 @@
@property (nullable, readonly) NSString *label;
@property (readonly) id <MTLDevice> device;
-/// Obtains a reflection object for this render pipeline.
+/// The render pipeline's reflection information, if available.
///
-/// When you create the pipeline through an ``MTLDevice`` instance, reflection is `nil`.
+/// The property is `nil` by default to help reduce your app's memory footprint,
+/// but you can create reflection information when your app needs it.
+///
+/// Create reflection information by building a pipeline from an
+/// ``MTL4Compiler`` instance with the following steps:
+///
+/// 1. Configure the ``MTL4PipelineOptions/shaderReflection`` property of an ``MTL4PipelineOptions`` instance.
+/// 2. Assign that instance to the ``MTL4PipelineDescriptor/options`` property of an ``MTL4PipelineDescriptor`` instance.
+/// 3. Create a compute pipeline state by passing that pipeline descriptor to one of the ``MTL4Compiler`` instance's methods.
+///
+/// During development, the property may contain reflection information without these steps
+/// because a GPU frame capture, Metal API validation layer, or shader validation layer
+/// can request reflection information when you enable them.
+/// You need to request reflection information if your app depends on it
+/// because Metal might not load these layers when you distribute your app.
+
+///
+/// > Tip:
+/// Verify the apps that need reflection information in production by testing them
+/// without a frame capture, Metal API validation layer, or shader validation layer.
+///
+/// The property is `nil` when you create a pipeline state from an``MTLDevice`` instance,
+/// such as with its ``MTLDevice/newRenderPipelineStateWithDescriptor:error:`` method.
@property (nullable, readonly) MTLRenderPipelineReflection* reflection API_AVAILABLE(macos(26.0), ios(26.0));
/// Obtains a function handle for the a specific function this pipeline links at the Metal IR level.
@@ -647,7 +669,6 @@
/*!
@property requiredThreadsPerThreadgroup
@abstract Sets the required threads-per-threadgroup during tile dispatches. The `threadsPerTile` argument of any tile dispatch must match to this value if it is set.
- Optional, unless the pipeline is going to use CooperativeTensors in which case this must be set.
Setting this to a size of 0 in every dimension disables this property
*/
@property(readwrite, nonatomic) MTLSize requiredThreadsPerThreadgroup API_AVAILABLE(macos(26.0), ios(26.0));
@@ -873,7 +894,6 @@
/*!
@property requiredThreadsPerObjectThreadgroup
@abstract Sets the required object threads-per-threadgroup during mesh draws. The `threadsPerObjectThreadgroup` argument of any draw must match to this value if it is set.
- Optional, unless the pipeline is going to use CooperativeTensors in which case this must be set.
Setting this to a size of 0 in every dimension disables this property
*/
@property (readwrite, nonatomic) MTLSize requiredThreadsPerObjectThreadgroup API_AVAILABLE(macos(26.0), ios(26.0));
@@ -881,7 +901,6 @@
/*!
@property requiredThreadsPerMeshThreadgroup
@abstract Sets the required mesh threads-per-threadgroup during mesh draws. The `threadsPerMeshThreadgroup` argument of any draw must match to this value if it is set.
- Optional, unless the pipeline is going to use CooperativeTensors in which case this must be set.
Setting this to a size of 0 in every dimension disables this property
*/
@property (readwrite, nonatomic) MTLSize requiredThreadsPerMeshThreadgroup API_AVAILABLE(macos(26.0), ios(26.0));
diff -ruN /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h
--- /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h 2025-11-09 04:40:13
+++ /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h 2026-02-16 09:00:56
@@ -28,6 +28,8 @@
MTLTensorDataTypeUInt16 = MTLDataTypeUShort,
MTLTensorDataTypeInt32 = MTLDataTypeInt,
MTLTensorDataTypeUInt32 = MTLDataTypeUInt,
+ MTLTensorDataTypeInt4 API_AVAILABLE(macos(26.4), ios(26.4)) = 143,
+ MTLTensorDataTypeUInt4 API_AVAILABLE(macos(26.4), ios(26.4)) = 144,
} API_AVAILABLE(macos(26.0), ios(26.0));
/// The largest rank a tensor can have.
diff -ruN /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes
--- /Applications/Xcode_26.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes 2025-10-31 18:05:29
+++ /Applications/Xcode_26.4.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes 2026-02-12 16:23:01
@@ -15,6 +15,8 @@
NSErrorDomain: MTL4CommandQueueErrorDomain
- Name: MTLTensorError
NSErrorDomain: MTLTensorDomain
+- Name: MTLDeviceError
+ NSErrorDomain: MTLDeviceErrorDomain
Globals:
- Name: MTLDeviceWasAddedNotification
SwiftName: wasAdded