-
Notifications
You must be signed in to change notification settings - Fork 571
Metal iOS xcode27.0 b1
Alex Soto edited this page Jun 9, 2026
·
1 revision
#Metal.framework
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunctionDescriptor.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunctionDescriptor.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunctionDescriptor.h 2026-04-18 20:44:31
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunctionDescriptor.h 2026-05-23 02:57:29
@@ -40,7 +40,6 @@
/// Configure the options to use at binary function creation time.
@property (nonatomic) MTL4BinaryFunctionOptions options;
-
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandEncoder.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandEncoder.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandEncoder.h 2026-04-18 19:21:26
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandEncoder.h 2026-05-23 02:57:31
@@ -92,7 +92,8 @@
beforeQueueStages:(MTLStages)beforeQueueStages
visibilityOptions:(MTL4VisibilityOptions)visibilityOptions;
-/// Encodes an intra-pass barrier.
+/// Encodes an intra-pass barrier that instructs the GPU to pause before running stages of subsequent commands until
+/// stages of previous commands complete.
///
/// Encode a barrier that guarantees that any subsequent work you encode in the *current command encoder*,
/// corresponding to `beforeEncoderStages`, doesn't begin until all prior commands in this command encoder,
@@ -104,11 +105,10 @@
/// ``MTLStages/MTLStageBlit`` and ``MTLStages/MTLStageAccelerationStructure``.
///
/// - Parameters:
-/// - afterEncoderStages: ``MTLStages`` mask that represents the stages of work to wait for.
-/// This argument only applies to subsequent work you encode in the current command encoder.
-/// - beforeEncoderStages: ``MTLStages`` mask that represents the stages of work that wait.
-/// This argument only applies to work you encode in the current command encoder prior to
-/// this barrier.
+/// - afterEncoderStages: ``MTLStages`` the stages of the previous commands of this pass that need to complete before
+/// the stages in `beforeEncoderStages` start for subsequent commands you encode in this pass.
+/// - beforeEncoderStages: ``MTLStages`` the stages of the subsequent commands you encode in this pass that wait for
+/// the stages in `afterEncoderStages`, within this pass, to complete.
/// - visibilityOptions: ``MTL4VisibilityOptions`` of the barrier, controlling cache flush behavior.
- (void)barrierAfterEncoderStages:(MTLStages)afterEncoderStages
beforeEncoderStages:(MTLStages)beforeEncoderStages
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandQueue.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandQueue.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandQueue.h 2026-04-18 19:21:27
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandQueue.h 2026-05-23 02:57:31
@@ -39,7 +39,7 @@
MTL4CommandQueueErrorOutOfMemory = 3,
/// Indicates the physical removal of the GPU before the command buffer completed.
- MTL4CommandQueueErrorDeviceRemoved = 4,
+ MTL4CommandQueueErrorDeviceRemoved API_DEPRECATED("MTL4CommandQueueErrorDeviceRemoved cannot occur on Apple Silicon", macos(26.0, 27.0), ios(26.0, 27.0)) = 4,
/// Indicates that the system revokes GPU access because it’s responsible for too many timeouts or hangs.
MTL4CommandQueueErrorAccessRevoked = 5,
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputeCommandEncoder.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputeCommandEncoder.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputeCommandEncoder.h 2026-04-18 19:21:25
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputeCommandEncoder.h 2026-05-24 05:22:20
@@ -119,6 +119,15 @@
/// Encodes a command to execute a series of commands from an indirect command buffer.
///
+/// Use this method to encode the execution of a range of Metal compute commands in the GPU timeline.
+///
+/// - Note: if the `indirectCommandBuffer` parameter references any pipeline state objects, you are responsible
+/// for adding them to a ``MTLResidencySet`` instance in use when you commit the command buffer.
+///
+/// An indirect compute command references a pipeline state when you pass it as an argument to the
+/// command's ``MTLIndirectComputeCommand/setComputePipelineState:`` method during CPU encoding, or
+/// `set_compute_pipeline_state()` during GPU encoding.
+///
/// - Parameters:
/// - indirectCommandBuffer: ``MTLIndirectCommandBuffer`` instance containing the commands to execute.
/// - executionRange: The range of commands to execute.
@@ -128,9 +137,24 @@
/// Encodes an instruction to execute commands from an indirect command buffer, using an indirect buffer for
/// arguments.
///
+/// Use this method to indicate to Metal the span of indices in the command buffer to execute indirectly via an
+/// ``MTLBuffer`` instance you provide in the `indirectRangeBuffer` parameter. This allows you to calculate the
+/// span of commands Metal executes in the GPU timeline, enabling GPU-driven workflows.
+///
+/// Metal requires that the contents of this buffer match the layout of struct ``MTLIndirectCommandBufferExecutionRange``,
+/// which specifies a location and a length within the indirect command buffer. You are responsible for ensuring the
+/// address of this buffer has 4-byte alignment.
+///
/// Use an instance of ``MTLResidencySet`` to mark residency of the indirect buffer that the `indirectRangeBuffer`
/// parameter references.
///
+/// - Note: if the `indirectCommandBuffer` parameter references any pipeline state objects, you are responsible
+/// for adding them to a ``MTLResidencySet`` instance in use when you commit the command buffer.
+///
+/// An indirect compute command references a pipeline state when you pass it as an argument to the
+/// command's ``MTLIndirectComputeCommand/setComputePipelineState:`` method during CPU encoding, or
+/// `set_compute_pipeline_state()` during GPU encoding.
+///
/// - Parameters:
/// - indirectCommandbuffer: ``MTLIndirectCommandBuffer`` instance containing the commands to execute.
/// - indirectRangeBuffer: GPUAddress of a ``MTLBuffer`` containing the execution range. Lay out the data
@@ -426,22 +450,87 @@
destinationOrigin:(MTLOrigin)destinationOrigin
options:(MTLBlitOption)options;
-/// Encodes a command to copy data from a tensor instance into another.
+
+
+/// Encodes a command to copy data from a slice of the data plane of a tensor into a slice of the data plane of
+/// another tensor.
///
-/// If the `sourceTensor` and `destinationTensor` instances are not aliasable, this command applies the correct reshapes
-/// to enable this operation.
+/// If `sourceTensor` and `destinationTensor` are not aliasable, this command applies a reshape operation.
///
+/// Ensure the first dimension of `sourceOrigin`, `sourceDimensions`, `destinationOrigin`,
+/// and `destinationDimensions` is byte aligned.
+///
/// - Parameters:
-/// - sourceTensor: An ``MTLTensor`` instance the command copies data from.
-/// - sourceSlice: The slice of `sourceTensor` from which Metal copies data.
-/// - destinationTensor: An ``MTLTensor`` instance the command copies data to.
-/// - destinationSlice: The slice of `destinationTensor` to which Metal copies data.
+/// - sourceTensor: A tensor instance the method copies data from.
+/// - sourceOrigin: An array of per-dimension offsets that together locate the first element
+/// to copy in `sourceTensor`. Each element in this array corresponds to the dimension at the
+/// same index in `sourceDimensions`. Each offset value represents the number of elements from
+/// the start of that dimension.
+/// - sourceDimensions: An array of per-dimension sizes that together define the extent of the
+/// slice to copy from `sourceTensor`. Each element in this array corresponds to the dimension
+/// at the same index in `sourceOrigin`. Each size value represents the number of elements to
+/// include along that dimension, starting from the corresponding offset in `sourceOrigin`.
+/// - destinationTensor: A tensor instance the method copies data to.
+/// - destinationOrigin: An array of per-dimension offsets that together locate the first element
+/// to write in `destinationTensor`. Each element in this array corresponds to the dimension at
+/// the same index in `destinationDimensions`. Each offset value represents the number of elements
+/// from the start of that dimension.
+/// - destinationDimensions: An array of per-dimension sizes that together define the extent of
+/// the slice to write in `destinationTensor`. Each element in this array corresponds to the
+/// dimension at the same index in `destinationOrigin`. Each size value represents the number of
+/// elements to include along that dimension, starting from the corresponding offset in
+/// `destinationOrigin`.
- (void)copyFromTensor:(id<MTLTensor>)sourceTensor
sourceOrigin:(MTLTensorExtents *)sourceOrigin
sourceDimensions:(MTLTensorExtents *)sourceDimensions
toTensor:(id<MTLTensor>)destinationTensor
destinationOrigin:(MTLTensorExtents *)destinationOrigin
destinationDimensions:(MTLTensorExtents *)destinationDimensions;
+
+
+
+
+/// Encodes a command to copy data from a slice of a plane of a tensor into a slice of a plane of
+/// another tensor.
+///
+/// If `sourceTensor` and `destinationTensor` are not aliasable, this command applies a reshape operation.
+/// For auxiliary planes, specify origin and dimensions in plane coordinates by applying the corresponding auxiliary plane's block
+/// factors.
+///
+/// Ensure the first dimension of `sourceOrigin`, `sourceDimensions`, `destinationOrigin`,
+/// and `destinationDimensions` is byte aligned.
+///
+/// - Parameters:
+/// - sourceTensor: A tensor instance the method copies data from.
+/// - sourceOrigin: An array of per-dimension offsets that together locate the first element
+/// to copy in `sourceTensor`. Each element in this array corresponds to the dimension at the
+/// same index in `sourceDimensions`. Each offset value represents the number of elements from
+/// the start of that dimension.
+/// - sourceDimensions: An array of per-dimension sizes that together define the extent of the
+/// slice to copy from `sourceTensor`. Each element in this array corresponds to the dimension
+/// at the same index in `sourceOrigin`. Each size value represents the number of elements to
+/// include along that dimension, starting from the corresponding offset in `sourceOrigin`.
+/// - sourcePlane: The plane the method copies data from.
+/// - destinationTensor: A tensor instance the method copies data to.
+/// - destinationOrigin: An array of per-dimension offsets that together locate the first element
+/// to write in `destinationTensor`. Each element in this array corresponds to the dimension at
+/// the same index in `destinationDimensions`. Each offset value represents the number of elements
+/// from the start of that dimension.
+/// - destinationDimensions: An array of per-dimension sizes that together define the extent of
+/// the slice to write in `destinationTensor`. Each element in this array corresponds to the
+/// dimension at the same index in `destinationOrigin`. Each size value represents the number of
+/// elements to include along that dimension, starting from the corresponding offset in
+/// `destinationOrigin`.
+/// - destinationPlane: The plane the method copies data to.
+- (void)copyFromTensor:(id<MTLTensor>)sourceTensor
+ sourceOrigin:(MTLTensorExtents *)sourceOrigin
+ sourceDimensions:(MTLTensorExtents *)sourceDimensions
+ sourcePlane:(MTLTensorPlaneType)sourcePlane
+ toTensor:(id<MTLTensor>)destinationTensor
+ destinationOrigin:(MTLTensorExtents *)destinationOrigin
+ destinationDimensions:(MTLTensorExtents *)destinationDimensions
+ destinationPlane:(MTLTensorPlaneType)destinationPlane API_AVAILABLE(macos(27.0), ios(27.0));
+
/// Encodes a command that generates mipmaps for a texture instance from the base mipmap level up to the highest
/// mipmap level.
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h 2026-04-18 20:44:30
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h 2026-05-23 02:57:28
@@ -60,6 +60,7 @@
/// A value indicating whether the pipeline supports Metal indirect command buffers.
@property (readwrite, nonatomic) MTL4IndirectCommandBufferSupportState supportIndirectCommandBuffers;
+
/// Resets the descriptor to its default values.
- (void)reset;
@end
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningPipeline.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningPipeline.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningPipeline.h 2026-04-18 20:44:32
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningPipeline.h 2026-05-23 02:57:30
@@ -23,7 +23,7 @@
@interface MTL4MachineLearningPipelineDescriptor : MTL4PipelineDescriptor
/// Assigns an optional string that helps identify pipeline states you create from this descriptor.
-@property (nullable, copy, nonatomic) NSString *label;
+@property (nullable, copy, nonatomic) NSString* label;
/// Assigns the function that the machine learning pipeline you create from this descriptor executes.
@property (nullable, readwrite, nonatomic, copy) MTL4FunctionDescriptor* machineLearningFunctionDescriptor;
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h 2026-04-18 20:44:33
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h 2026-05-23 02:51:08
@@ -489,6 +489,15 @@
/// Encodes a command that runs a range of commands from an indirect command buffer.
///
+/// Use this method to encode the execution of a range of Metal render commands in the GPU timeline.
+///
+/// - Note: if the `indirectCommandBuffer` parameter references any pipeline state objects, you are responsible
+/// for adding them to a ``MTLResidencySet`` instance in use when you commit the command buffer.
+///
+/// An indirect render command references a pipeline state when you pass it as an argument to the
+/// command's ``MTLIndirectRenderCommand/setRenderPipelineState:`` method during CPU encoding, or
+/// `set_render_pipeline_state()` during GPU encoding.
+///
/// - Parameters:
/// - indirectCommandBuffer: A ``MTLIndirectCommandBuffer`` instance containing other commands that the current command runs.
/// - executionRange: A span of integers that represent the command entries in the buffer that the current command runs.
@@ -507,6 +516,13 @@
///
/// Use an instance of ``MTLResidencySet`` to mark residency of the indirect buffer that the `indirectRangeBuffer`
/// parameter references.
+///
+/// - Note: if the `indirectCommandBuffer` parameter references any pipeline state objects, you are responsible
+/// for adding them to a ``MTLResidencySet`` instance in use when you commit the command buffer.
+///
+/// An indirect render command references a pipeline state when you pass it as an argument to the
+/// command's ``MTLIndirectRenderCommand/setRenderPipelineState:`` method during CPU encoding, or
+/// `set_render_pipeline_state()` during GPU encoding.
///
/// - Parameters:
/// - indirectCommandBuffer: A ``MTLIndirectCommandBuffer`` instance that contains other commands
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h 2026-04-18 20:44:32
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h 2026-05-24 05:22:20
@@ -209,6 +209,21 @@
@end
+/// An auxiliary plane that a shader's tensor argument requires.
+MTL_EXPORT API_AVAILABLE(macos(27.0), ios(27.0))
+@interface MTLTensorAuxiliaryPlaneType : NSObject
+
+/// The data format of all elements in the plane.
+@property (readonly) MTLTensorDataType dataType;
+
+/// The number of data plane elements that correspond to one element in this plane.
+@property (readonly) MTLTensorExtents *blockFactors;
+
+/// The type of information this plane stores.
+@property (readonly) MTLTensorPlaneType planeType;
+
+@end
+
/// An object that represents a tensor in the shading language in a struct or array.
MTL_EXPORT API_AVAILABLE(macos(26.0), ios(26.0))
@interface MTLTensorReferenceType : MTLType
@@ -221,9 +236,19 @@
/// The array of sizes, in elements, one for each dimension of this tensor.
///
-/// Because shader-bound tensors have dynamic extents, the ``MTLTensorExtents/rank`` of `dimensions` corresponds to the rank the shader function specifies, and ``MTLTensorExtents/extentsAtDimensionIndex:`` always returns a value of -1.
+/// For shader-bound tensors with dynamic extents, the ``MTLTensorExtents/rank`` of `dimensions` corresponds to the rank the shader
+/// function specifies, and ``MTLTensorExtents/extentAtDimensionIndex:`` always returns a value of -1.
@property (nullable, readonly) MTLTensorExtents *dimensions;
+
+/// The auxiliary planes that this tensor reference requires.
+///
+/// Returns an array of ``MTLTensorAuxiliaryPlaneType`` objects describing
+/// each auxiliary plane the shader expects. Empty if the tensor has no
+/// auxiliary planes.
+@property (readonly) NSArray<MTLTensorAuxiliaryPlaneType *> *auxiliaryPlanes API_AVAILABLE(macos(27.0), ios(27.0));
+
+
/// A value that represents the read/write permissions of the tensor.
@property (readonly) MTLBindingAccess access;
@@ -314,9 +339,14 @@
/// The array of sizes, in elements, one for each dimension of this tensor.
///
-/// Because shader-bound tensors have dynamic extents, if this tensor is shader bound, the ``MTLTensorExtents/rank`` of `dimensions` corresponds to the rank the shader function specifies, and ``MTLTensorExtents/extentsAtDimensionIndex:`` always returns a value of -1.
-/// In the case of functions used with machine learning pipelines, `dimensions` corresponds to the default shape, if you provide one. Otherwise, it's `nil` in the case of an undefined shape.
+/// For shader-bound tensors with dynamic extents, the ``MTLTensorExtents/rank`` of `dimensions` corresponds to the rank the shader
+/// function specifies, and ``MTLTensorExtents/extentAtDimensionIndex:`` always returns a value of -1.
+///
+/// For machine learning pipelines, `dimensions` corresponds to the default shape, if you provide one. Otherwise, it's `nil` in the case of an undefined shape.
@property (nullable, readonly) MTLTensorExtents *dimensions;
+
+/// An array of the tensor's auxiliary planes.
+@property (readonly) NSArray<MTLTensorAuxiliaryPlaneType *> *auxiliaryPlanes API_AVAILABLE(macos(27.0), ios(27.0));
@end
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h 2026-04-18 19:21:24
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h 2026-05-21 07:06:48
@@ -47,7 +47,7 @@
making any CPU access (either MTLBuffer.contents or -[MTLTexture getBytes:...] and -[MTLTexture replaceRegion:]) produce undefined results. To allow the CPU to see what the device
has written, a CommandBuffer containing this synchronization must be executed. After completion of the CommandBuffer, the CPU can access the contents of the resource safely.
*/
-- (void)synchronizeResource:(id<MTLResource>)resource API_AVAILABLE(macos(10.11), macCatalyst(13.0)) API_UNAVAILABLE(ios);
+- (void)synchronizeResource:(id<MTLResource>)resource API_DEPRECATED("Managed storage has no effect on Apple Silicon, use Shared storage instead", macos(10.11, 27.0), macCatalyst(13.0, 27.0)) API_UNAVAILABLE(ios);
/*!
@method synchronizeTexture:slice:mipmapLevel:
@@ -58,7 +58,7 @@
@discussion
See the discussion of -synchronizeResource. -synchronizeTexture:slice:mipmapLevel performs the same role, except it may flush only a subset of the texture storage, rather than the entire texture.
*/
-- (void)synchronizeTexture:(id<MTLTexture>)texture slice:(NSUInteger)slice level:(NSUInteger)level API_AVAILABLE(macos(10.11), macCatalyst(13.0)) API_UNAVAILABLE(ios);
+- (void)synchronizeTexture:(id<MTLTexture>)texture slice:(NSUInteger)slice level:(NSUInteger)level API_DEPRECATED("Managed storage has no effect on Apple Silicon, use Shared storage instead", macos(10.11, 27.0), macCatalyst(13.0, 27.0)) API_UNAVAILABLE(ios);
/*!
@method copyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:
@@ -261,22 +261,87 @@
destinationBuffer:(id<MTLBuffer>)destinationBuffer
destinationOffset:(NSUInteger)destinationOffset API_AVAILABLE(macos(10.15), ios(14.0));
-/// Encodes a command to copy data from a slice of one tensor into a slice of another tensor.
+
+
+/// Encodes a command to copy data from a slice of the data plane of a tensor into a slice of the data plane of
+/// another tensor.
///
-/// This command applies reshapes if `sourceTensor` and `destinationTensor` are not aliasable.
+/// If `sourceTensor` and `destinationTensor` are not aliasable, this command applies a reshape operation.
+///
+/// Ensure the first dimension of `sourceOrigin`, `sourceDimensions`, `destinationOrigin`,
+/// and `destinationDimensions` is byte aligned.
+///
/// - Parameters:
-/// - sourceTensor: A tensor instance that this command copies data from.
-/// - sourceOrigin: An array of offsets, in elements, to the first element of the slice of `sourceTensor` that this command copies data from.
-/// - sourceDimensions: An array of sizes, in elements, of the slice `sourceTensor` that this command copies data from.
-/// - destinationTensor: A tensor instance that this command copies data to.
-/// - destinationOrigin: An array of offsets, in elements, to the first element of the slice of `destinationTensor` that this command copies data to.
-/// - destinationDimensions: An array of sizes, in elements, of the slice of `destinationTensor` that this command copies data to.
+/// - sourceTensor: A tensor instance the method copies data from.
+/// - sourceOrigin: An array of per-dimension offsets that together locate the first element
+/// to copy in `sourceTensor`. Each element in this array corresponds to the dimension at the
+/// same index in `sourceDimensions`. Each offset value represents the number of elements from
+/// the start of that dimension.
+/// - sourceDimensions: An array of per-dimension sizes that together define the extent of the
+/// slice to copy from `sourceTensor`. Each element in this array corresponds to the dimension
+/// at the same index in `sourceOrigin`. Each size value represents the number of elements to
+/// include along that dimension, starting from the corresponding offset in `sourceOrigin`.
+/// - destinationTensor: A tensor instance the method copies data to.
+/// - destinationOrigin: An array of per-dimension offsets that together locate the first element
+/// to write in `destinationTensor`. Each element in this array corresponds to the dimension at
+/// the same index in `destinationDimensions`. Each offset value represents the number of elements
+/// from the start of that dimension.
+/// - destinationDimensions: An array of per-dimension sizes that together define the extent of
+/// the slice to write in `destinationTensor`. Each element in this array corresponds to the
+/// dimension at the same index in `destinationOrigin`. Each size value represents the number of
+/// elements to include along that dimension, starting from the corresponding offset in
+/// `destinationOrigin`.
- (void)copyFromTensor:(id<MTLTensor>)sourceTensor
sourceOrigin:(MTLTensorExtents *)sourceOrigin
sourceDimensions:(MTLTensorExtents *)sourceDimensions
toTensor:(id<MTLTensor>)destinationTensor
destinationOrigin:(MTLTensorExtents *)destinationOrigin
destinationDimensions:(MTLTensorExtents *)destinationDimensions API_AVAILABLE(macos(26.0), ios(26.0));
+
+
+
+
+/// Encodes a command to copy data from a slice of a plane of a tensor into a slice of a plane of
+/// another tensor.
+///
+/// If `sourceTensor` and `destinationTensor` are not aliasable, this command applies a reshape operation.
+/// For auxiliary planes, specify origin and dimensions in plane coordinates by applying the corresponding auxiliary plane's block
+/// factors.
+///
+/// Ensure the first dimension of `sourceOrigin`, `sourceDimensions`, `destinationOrigin`,
+/// and `destinationDimensions` is byte aligned.
+///
+/// - Parameters:
+/// - sourceTensor: A tensor instance the method copies data from.
+/// - sourceOrigin: An array of per-dimension offsets that together locate the first element
+/// to copy in `sourceTensor`. Each element in this array corresponds to the dimension at the
+/// same index in `sourceDimensions`. Each offset value represents the number of elements from
+/// the start of that dimension.
+/// - sourceDimensions: An array of per-dimension sizes that together define the extent of the
+/// slice to copy from `sourceTensor`. Each element in this array corresponds to the dimension
+/// at the same index in `sourceOrigin`. Each size value represents the number of elements to
+/// include along that dimension, starting from the corresponding offset in `sourceOrigin`.
+/// - sourcePlane: The plane the method copies data from.
+/// - destinationTensor: A tensor instance the method copies data to.
+/// - destinationOrigin: An array of per-dimension offsets that together locate the first element
+/// to write in `destinationTensor`. Each element in this array corresponds to the dimension at
+/// the same index in `destinationDimensions`. Each offset value represents the number of elements
+/// from the start of that dimension.
+/// - destinationDimensions: An array of per-dimension sizes that together define the extent of
+/// the slice to write in `destinationTensor`. Each element in this array corresponds to the
+/// dimension at the same index in `destinationOrigin`. Each size value represents the number of
+/// elements to include along that dimension, starting from the corresponding offset in
+/// `destinationOrigin`.
+/// - destinationPlane: The plane the method copies data to.
+- (void)copyFromTensor:(id<MTLTensor>)sourceTensor
+ sourceOrigin:(MTLTensorExtents *)sourceOrigin
+ sourceDimensions:(MTLTensorExtents *)sourceDimensions
+ sourcePlane:(MTLTensorPlaneType)sourcePlane
+ toTensor:(id<MTLTensor>)destinationTensor
+ destinationOrigin:(MTLTensorExtents *)destinationOrigin
+ destinationDimensions:(MTLTensorExtents *)destinationDimensions
+ destinationPlane:(MTLTensorPlaneType)destinationPlane API_AVAILABLE(macos(27.0), ios(27.0));
+
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h 2026-04-18 19:21:26
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h 2026-05-23 02:57:30
@@ -57,7 +57,7 @@
It is not valid to invoke this method on buffers of other storage modes.
@param range The range of bytes that have been modified.
*/
-- (void)didModifyRange:(NSRange)range API_AVAILABLE(macos(10.11), macCatalyst(13.0)) API_UNAVAILABLE(ios);
+- (void)didModifyRange:(NSRange)range API_DEPRECATED("Managed storage has no effect on Apple Silicon, use Shared storage instead", macos(10.11, 27.0), macCatalyst(13.0, 27.0)) API_UNAVAILABLE(ios);
/*!
@method newTextureWithDescriptor:offset:bytesPerRow:
@@ -65,21 +65,25 @@
*/
- (nullable id <MTLTexture>)newTextureWithDescriptor:(MTLTextureDescriptor*)descriptor offset:(NSUInteger)offset bytesPerRow:(NSUInteger)bytesPerRow API_AVAILABLE(macos(10.13), ios(8.0));
-/// Creates a tensor that shares storage with this buffer.
+/// Creates a single-plane tensor with the specified descriptor that shares storage with this buffer.
///
-/// `offset` must be 0 when ``MTLTensorDescriptor/usage`` contains ``MTLTensorUsage/MTLTensorUsageMachineLearning``.
+/// This method validates the constraints documented on ``MTLTensorDescriptor``,
+/// and additionally requires:
+/// - `offset` is 0 when ``MTLTensorDescriptor/usage`` contains
+/// ``MTLTensorUsage/MTLTensorUsageMachineLearning``.
+/// - `offset` is aligned to 128 bytes if the data plane uses a format
+/// ``MTLTensorDataType``.
+/// - `offset` is aligned to the size of the data type in bytes otherwise.
///
-/// When ``MTLTensorDescriptor/dataType`` is a sub-byte ``MTLTensorDataType``, `offset` must be aligned to 128 bytes.
-/// Although only required for sub-byte types, applying 128-byte alignment for all ``MTLTensorDataType``
-/// values improves performance.
+/// This method doesn't create tensors that contain auxiliary planes. Use
+/// ``MTLDevice/newTensorWithDescriptor:attachments:error:``
+/// instead to create a multi-plane tensor with per-plane buffer backing storage.
///
-/// See ``MTLTensorDescriptor`` for more information.
-///
/// - Parameters:
-/// - descriptor: A description of the properties for the new tensor.
-/// - offset: Offset into the buffer at which the data of the tensor begins.
-/// - error: If an error occurs during creation, Metal populates this parameter to provide you information about it.
-/// - Returns: The created ``MTLTensor`` instance, or `nil` if the function failed.
+/// - descriptor: The tensor descriptor configuring the data plane.
+/// - offset: The byte offset into the buffer where tensor data begins.
+/// - error: On failure, an NSError instance that describes the validation failure.
+/// - Returns: A tensor, or `nil` if validation fails.
- (nullable id <MTLTensor>)newTensorWithDescriptor:(MTLTensorDescriptor *)descriptor
offset:(NSUInteger)offset
error:(__autoreleasing NSError * _Nullable * _Nullable)error API_AVAILABLE(macos(26.0), ios(26.0));
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h 2026-04-19 00:46:16
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h 2026-05-24 05:22:20
@@ -116,7 +116,7 @@
MTLCommandBufferErrorOutOfMemory = 8,
MTLCommandBufferErrorInvalidResource = 9,
MTLCommandBufferErrorMemoryless API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(10.0)) = 10,
- MTLCommandBufferErrorDeviceRemoved API_AVAILABLE(macos(10.13)) API_UNAVAILABLE(ios) = 11,
+ MTLCommandBufferErrorDeviceRemoved API_DEPRECATED("MTLCommandBufferErrorDeviceRemoved cannot occur on Apple Silicon", macos(10.13, 27.0)) API_UNAVAILABLE(ios) = 11,
MTLCommandBufferErrorStackOverflow API_AVAILABLE(macos(12.0), ios(15.0)) = 12,
} API_AVAILABLE(macos(10.11), ios(8.0));
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h 2026-04-18 20:44:33
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h 2026-05-23 02:57:31
@@ -150,6 +150,7 @@
*/
@property(readwrite, nonatomic) MTLSize requiredThreadsPerThreadgroup API_AVAILABLE(macos(26.0), ios(26.0));
+
@end
/*!
@@ -174,17 +175,6 @@
/// 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));
@@ -300,6 +290,8 @@
@abstract The required size of every compute threadgroup.
*/
@property (readonly) MTLSize requiredThreadsPerThreadgroup API_AVAILABLE(macos(26.0), ios(26.0));
+
+
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDataType.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDataType.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDataType.h 2026-04-18 21:58:03
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDataType.h 2026-05-23 02:51:09
@@ -230,7 +230,6 @@
/// Represents a data type corresponding to a machine learning tensor.
MTLDataTypeTensor API_AVAILABLE(macos(26.0), ios(26.0)) = 140,
-
} API_AVAILABLE(macos(10.11), ios(8.0));
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h 2026-04-18 21:58:00
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h 2026-05-23 02:51:05
@@ -199,15 +199,15 @@
MTLGPUFamilyApple9 = 1009,
MTLGPUFamilyApple10 = 1010,
- MTLGPUFamilyMac1 API_DEPRECATED_WITH_REPLACEMENT("MTLGPUFamilyMac2", macos(10.15, 13.0), ios(13.0, 16.0)) = 2001,
- MTLGPUFamilyMac2 = 2002,
+ MTLGPUFamilyMac1 API_DEPRECATED_WITH_REPLACEMENT("MTLGPUFamilyApple7", macos(10.15, 13.0), ios(13.0, 16.0)) = 2001,
+ MTLGPUFamilyMac2 API_DEPRECATED_WITH_REPLACEMENT("MTLGPUFamilyApple7", macos(10.15, 27.0), ios(13.0, 27.0)) = 2002,
- MTLGPUFamilyCommon1 = 3001,
- MTLGPUFamilyCommon2 = 3002,
- MTLGPUFamilyCommon3 = 3003,
+ MTLGPUFamilyCommon1 API_DEPRECATED_WITH_REPLACEMENT("MTLGPUFamilyApple1", macos(10.15, 27.0), ios(13.0, 27.0)) = 3001,
+ MTLGPUFamilyCommon2 API_DEPRECATED_WITH_REPLACEMENT("MTLGPUFamilyApple3", macos(10.15, 27.0), ios(13.0, 27.0)) = 3002,
+ MTLGPUFamilyCommon3 API_DEPRECATED_WITH_REPLACEMENT("MTLGPUFamilyApple5", macos(10.15, 27.0), ios(13.0, 27.0)) = 3003,
- MTLGPUFamilyMacCatalyst1 API_DEPRECATED_WITH_REPLACEMENT("MTLGPUFamilyMac2", macos(10.15, 13.0), ios(13.0, 16.0)) = 4001,
- MTLGPUFamilyMacCatalyst2 API_DEPRECATED_WITH_REPLACEMENT("MTLGPUFamilyMac2", macos(10.15, 13.0), ios(13.0, 16.0)) = 4002,
+ MTLGPUFamilyMacCatalyst1 API_DEPRECATED_WITH_REPLACEMENT("MTLGPUFamilyApple7", macos(10.15, 13.0), ios(13.0, 16.0)) = 4001,
+ MTLGPUFamilyMacCatalyst2 API_DEPRECATED_WITH_REPLACEMENT("MTLGPUFamilyApple7", macos(10.15, 13.0), ios(13.0, 16.0)) = 4002,
MTLGPUFamilyMetal3 API_AVAILABLE(macos(13.0), ios(16.0)) = 5001,
MTLGPUFamilyMetal4 API_AVAILABLE(macos(26.0), ios(26.0)) = 5002,
@@ -436,13 +436,13 @@
@property lowPower
@abstract On systems that support automatic graphics switching, this will return YES for the the low power device.
*/
-@property (readonly, getter=isLowPower) BOOL lowPower API_AVAILABLE(macos(10.11), macCatalyst(13.0)) API_UNAVAILABLE(ios);
+@property (readonly, getter=isLowPower) BOOL lowPower API_DEPRECATED("Not applicable on Apple Silicon", macos(10.11, 27.0), macCatalyst(13.0, 27.0)) API_UNAVAILABLE(ios);
/*!
@property headless
@abstract On systems that include more that one GPU, this will return YES for any device that does not support any displays. Only available on Mac OS X.
*/
-@property (readonly, getter=isHeadless) BOOL headless API_AVAILABLE(macos(10.11), macCatalyst(13.0)) API_UNAVAILABLE(ios);
+@property (readonly, getter=isHeadless) BOOL headless API_DEPRECATED("Not applicable on Apple Silicon", macos(10.11, 27.0), macCatalyst(13.0, 27.0)) API_UNAVAILABLE(ios);
/*!
@property removable
@@ -450,7 +450,7 @@
@discussion If a GPU is is removed without warning, APIs may fail even with good input, even before a notification can get posted informing
the application that the device has been removed.
*/
-@property (readonly, getter=isRemovable) BOOL removable API_AVAILABLE(macos(10.13), macCatalyst(13.0)) API_UNAVAILABLE(ios);
+@property (readonly, getter=isRemovable) BOOL removable API_DEPRECATED("Not applicable on Apple Silicon", macos(10.13, 27.0), macCatalyst(13.0, 27.0)) API_UNAVAILABLE(ios);
/*!
@property hasUnifiedMemory
@@ -473,7 +473,7 @@
@property depth24Stencil8PixelFormatSupported
@abstract If YES, device supports MTLPixelFormatDepth24Unorm_Stencil8.
*/
-@property (readonly, getter=isDepth24Stencil8PixelFormatSupported) BOOL depth24Stencil8PixelFormatSupported API_AVAILABLE(macos(10.11), macCatalyst(13.0)) API_UNAVAILABLE(ios);
+@property (readonly, getter=isDepth24Stencil8PixelFormatSupported) BOOL depth24Stencil8PixelFormatSupported API_DEPRECATED("Never supported on Apple Silicon", macos(10.11, 27.0), macCatalyst(13.0, 27.0)) API_UNAVAILABLE(ios);
/*!
@property readWriteTextureSupport
@@ -1234,14 +1234,35 @@
/// - Returns: The size and alignment required to hold the data of a tensor you create with `descriptor` in a buffer.
- (MTLSizeAndAlign)tensorSizeAndAlignWithDescriptor:(MTLTensorDescriptor *)descriptor API_AVAILABLE(macos(26.0), ios(26.0));
-/// Creates a tensor by allocating new memory.
+/// Creates a tensor with the specified descriptor.
///
+/// This method validates the constraints documented on ``MTLTensorDescriptor``.
+///
/// - Parameters:
-/// - descriptor: A description of the properties for the new tensor.
-/// - error: Metal populates this parameter with information in case an error occurs.
-/// - Returns: A new tensor instance that Metal configures using `descriptor` or `nil` if an error occurred.
+/// - descriptor: The tensor descriptor configuring the data plane and
+/// auxiliary planes.
+/// - error: On failure, an NSError instance that describes the validation failure.
+/// - Returns: A tensor, or `nil` if validation fails.
- (nullable id <MTLTensor>)newTensorWithDescriptor:(MTLTensorDescriptor *)descriptor
error:(__autoreleasing NSError * _Nullable * _Nullable)error API_AVAILABLE(macos(26.0), ios(26.0));
+
+/// Creates a tensor with the specified descriptor and per-plane buffer backing storage.
+///
+/// This method validates the constraints documented on ``MTLTensorDescriptor``
+/// and ``MTLTensorBufferAttachments``, and additionally requires that every
+/// plane configured in `descriptor` (data plane and all auxiliary planes) has
+/// a corresponding entry in `attachments`.
+///
+/// - Parameters:
+/// - descriptor: The tensor descriptor configuring the data plane and
+/// auxiliary planes.
+/// - attachments: The per-plane buffer backing storage. Must not be `nil`.
+/// - error: On failure, an NSError instance that describes the validation failure.
+/// - Returns: A tensor, or `nil` if validation fails.
+-(nullable id<MTLTensor>)newTensorWithDescriptor:(MTLTensorDescriptor *)descriptor
+ attachments:(MTLTensorBufferAttachments *)attachments
+ error:(NSError **)error API_AVAILABLE(macos(27.0), ios(27.0));
+
/*!
@method functionHandleWithFunction:
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h 2026-04-18 19:21:26
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h 2026-05-24 05:22:21
@@ -67,7 +67,7 @@
- (void)setDepthBias:(float)depthBias slopeScale:(float)slopeScale clamp:(float)clamp API_AVAILABLE(macos(26.0), ios(26.0));
- (void)setDepthClipMode:(MTLDepthClipMode)depthClipMode API_AVAILABLE(macos(26.0), ios(26.0));
- (void)setCullMode:(MTLCullMode)cullMode API_AVAILABLE(macos(26.0), ios(26.0));
-- (void)setFrontFacingWinding:(MTLWinding)frontFacingWindning API_AVAILABLE(macos(26.0), ios(26.0));
+- (void)setFrontFacingWinding:(MTLWinding)frontFacingWinding API_AVAILABLE(macos(26.0), ios(26.0));
- (void)setTriangleFillMode:(MTLTriangleFillMode)fillMode API_AVAILABLE(macos(26.0), ios(26.0));
- (void)reset;
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h 2026-04-18 21:58:03
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h 2026-05-24 05:22:21
@@ -221,6 +221,8 @@
(3 << 16) + 2,
MTLLanguageVersion4_0 API_AVAILABLE(macos(26.0), ios(26.0)) =
(4 << 16) + 0,
+ MTLLanguageVersion4_1 API_AVAILABLE(macos(27.0), ios(27.0)) =
+ (4 << 16) + 1,
} API_AVAILABLE(macos(10.11), ios(9.0));
typedef NS_ENUM(NSInteger, MTLLibraryType) {
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h 2026-04-18 20:44:32
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h 2026-05-23 02:57:30
@@ -30,6 +30,7 @@
MTLShaderValidationDisabled = 2,
} API_AVAILABLE(macos(15.0), ios(18.0));
+
MTL_EXPORT API_AVAILABLE(macos(10.13), ios(11.0))
@interface MTLPipelineBufferDescriptor : NSObject <NSCopying>
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h 2026-04-18 19:21:27
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h 2026-05-24 05:22:21
@@ -44,6 +44,7 @@
MTLPixelFormatABGR4Unorm API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(8.0)) = 42,
MTLPixelFormatBGR5A1Unorm API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(8.0)) = 43,
+
/* Normal 32 bit formats */
MTLPixelFormatR32Uint = 53,
@@ -77,6 +78,7 @@
MTLPixelFormatBGR10_XR API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(10.0)) = 554,
MTLPixelFormatBGR10_XR_sRGB API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(10.0)) = 555,
+
/* Normal 64 bit formats */
@@ -93,6 +95,7 @@
MTLPixelFormatBGRA10_XR API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(10.0)) = 552,
MTLPixelFormatBGRA10_XR_sRGB API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(10.0)) = 553,
+
/* Normal 128 bit formats */
MTLPixelFormatRGBA32Uint = 123,
@@ -175,7 +178,6 @@
MTLPixelFormatASTC_12x10_LDR API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(8.0)) = 217,
MTLPixelFormatASTC_12x12_LDR API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(8.0)) = 218,
-
// ASTC HDR (High Dynamic Range) Formats
MTLPixelFormatASTC_4x4_HDR API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0)) = 222,
MTLPixelFormatASTC_5x4_HDR API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0)) = 223,
@@ -191,6 +193,7 @@
MTLPixelFormatASTC_10x10_HDR API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0)) = 234,
MTLPixelFormatASTC_12x10_HDR API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0)) = 235,
MTLPixelFormatASTC_12x12_HDR API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0)) = 236,
+
/*!
@constant MTLPixelFormatGBGR422
@abstract A pixel format where the red and green channels are subsampled horizontally. Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.
@@ -216,11 +219,11 @@
/* Depth Stencil */
- MTLPixelFormatDepth24Unorm_Stencil8 API_AVAILABLE(macos(10.11), macCatalyst(13.0)) API_UNAVAILABLE(ios) = 255,
+ MTLPixelFormatDepth24Unorm_Stencil8 API_DEPRECATED("Use MTLPixelFormatDepth32Float_Stencil8 instead", macos(10.11, 27.0), macCatalyst(13.0, 27.0)) API_UNAVAILABLE(ios) = 255,
MTLPixelFormatDepth32Float_Stencil8 API_AVAILABLE(macos(10.11), ios(9.0)) = 260,
MTLPixelFormatX32_Stencil8 API_AVAILABLE(macos(10.12), ios(10.0)) = 261,
- MTLPixelFormatX24_Stencil8 API_AVAILABLE(macos(10.12), macCatalyst(13.0)) API_UNAVAILABLE(ios) = 262,
+ MTLPixelFormatX24_Stencil8 API_DEPRECATED("Use MTLPixelFormatX32_Stencil8 instead", macos(10.12, 27.0), macCatalyst(13.0, 27.0)) API_UNAVAILABLE(ios) = 262,
MTLPixelFormatUnspecialized API_AVAILABLE(macos(26.0), ios(26.0)) = 263,
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h 2026-04-18 19:21:24
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h 2026-05-24 05:22:20
@@ -355,17 +355,6 @@
/// 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));
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h 2026-04-18 20:44:33
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h 2026-05-24 05:22:22
@@ -82,7 +82,7 @@
typedef NS_ENUM(NSUInteger, MTLStorageMode)
{
MTLStorageModeShared = 0,
- MTLStorageModeManaged API_AVAILABLE(macos(10.11), macCatalyst(13.0)) API_UNAVAILABLE(ios) = 1,
+ MTLStorageModeManaged API_DEPRECATED("Managed storage has no effect on Apple Silicon, use Shared storage instead", macos(10.11, 27.0), macCatalyst(13.0, 27.0)) API_UNAVAILABLE(ios) = 1,
MTLStorageModePrivate = 2,
MTLStorageModeMemoryless API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(10.0)) = 3,
} API_AVAILABLE(macos(10.11), ios(9.0));
@@ -174,7 +174,7 @@
MTLResourceCPUCacheModeWriteCombined = MTLCPUCacheModeWriteCombined << MTLResourceCPUCacheModeShift,
MTLResourceStorageModeShared API_AVAILABLE(macos(10.11), ios(9.0)) = MTLStorageModeShared << MTLResourceStorageModeShift,
- MTLResourceStorageModeManaged API_AVAILABLE(macos(10.11), macCatalyst(13.0)) API_UNAVAILABLE(ios) = MTLStorageModeManaged << MTLResourceStorageModeShift,
+ MTLResourceStorageModeManaged API_DEPRECATED("Managed storage has no effect on Apple Silicon, use Shared storage instead", macos(10.11, 27.0), macCatalyst(13.0, 27.0)) API_UNAVAILABLE(ios) = MTLStorageModeManaged << MTLResourceStorageModeShift,
MTLResourceStorageModePrivate API_AVAILABLE(macos(10.11), ios(9.0)) = MTLStorageModePrivate << MTLResourceStorageModeShift,
MTLResourceStorageModeMemoryless API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(10.0)) = MTLStorageModeMemoryless << MTLResourceStorageModeShift,
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h 2026-04-18 21:58:02
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h 2026-05-23 02:51:08
@@ -18,18 +18,59 @@
/// The possible data types for the elements of a tensor.
typedef NS_ENUM(NSInteger, MTLTensorDataType)
{
+ /// An invalid data type.
MTLTensorDataTypeNone = MTLDataTypeNone,
+
+ /// A single-precision floating point data type.
MTLTensorDataTypeFloat32 = MTLDataTypeFloat,
+
+ /// A half-precision floating point data type.
MTLTensorDataTypeFloat16 = MTLDataTypeHalf,
+
+ /// A 16-bit floating point data type with 8 exponent bits, 7 mantissa bits and 1 sign bit.
MTLTensorDataTypeBFloat16 = MTLDataTypeBFloat,
+
+ /// An 8-bit signed integer data type.
MTLTensorDataTypeInt8 = MTLDataTypeChar,
+
+ /// An 8-bit unsigned integer data type.
MTLTensorDataTypeUInt8 = MTLDataTypeUChar,
+
+ /// A 16-bit signed integer data type.
MTLTensorDataTypeInt16 = MTLDataTypeShort,
+
+ /// A 16-bit unsigned integer data type.
MTLTensorDataTypeUInt16 = MTLDataTypeUShort,
+
+ /// A 32-bit integer data type.
MTLTensorDataTypeInt32 = MTLDataTypeInt,
+
+ /// A 32-bit unsigned integer data type.
MTLTensorDataTypeUInt32 = MTLDataTypeUInt,
+
+ /// A 4-bit signed integer format data type.
MTLTensorDataTypeInt4 API_AVAILABLE(macos(26.4), ios(26.4)) = 143,
+
+ /// A 4-bit unsigned integer format data type.
MTLTensorDataTypeUInt4 API_AVAILABLE(macos(26.4), ios(26.4)) = 144,
+
+ /// An 8-bit floating point format data type with 8 exponent bits.
+ MTLTensorDataTypeFloat8UE8M0 API_AVAILABLE(macos(27.0), ios(27.0)) = 145,
+
+ /// A 2-bit unsigned integer format data type.
+ MTLTensorDataTypeUInt2 API_AVAILABLE(macos(27.0), ios(27.0)) = 149,
+
+ /// A 2-bit signed integer format data type.
+ MTLTensorDataTypeInt2 API_AVAILABLE(macos(27.0), ios(27.0)) = 150,
+
+ /// An 8-bit floating point format data type with 5 exponent bits, 2 mantissa bits and 1 sign bit.
+ MTLTensorDataTypeFloat8E5M2 API_AVAILABLE(macos(27.0), ios(27.0)) = 141,
+
+ /// An 8-bit floating point format data type with 4 exponent bits, 3 mantissa bits and 1 sign bit.
+ MTLTensorDataTypeFloat8E4M3 API_AVAILABLE(macos(27.0), ios(27.0)) = 142,
+
+ /// A 4-bit floating point format data type with 2 exponent bits, 1 mantissa bit and 1 sign bit.
+ MTLTensorDataTypeFloat4E2M1 API_AVAILABLE(macos(27.0), ios(27.0)) = 148,
} API_AVAILABLE(macos(26.0), ios(26.0));
/// The largest rank a tensor can have.
@@ -39,15 +80,15 @@
///
/// Supports rank up to ``MTL_TENSOR_MAX_RANK``.
MTL_EXPORT API_AVAILABLE(macos(26.0), ios(26.0))
-@interface MTLTensorExtents : NSObject
+@interface MTLTensorExtents : NSObject <NSCopying>
/// Creates a new tensor extents with the rank and extent values you provide.
///
-/// Zero rank extents represent scalars. `values` can only be `nil`if `rank` is 0.
+/// Zero rank extents represent scalars. `values` can only be `nil` if `rank` is 0.
/// - Parameters:
/// - rank: the number of dimensions.
/// - values: an array of length `rank` that specifies the size of each dimension. The first dimension is the innermost dimension.
-/// - Returns: Tensor extents with the rank and extent values you provide. Returns `nil` if `rank` exceeds 0 and `values` is nil or if `rank` exceeds ``MTL_TENSOR_MAX_RANK``.
+/// - Returns: Tensor extents with the rank and extent values you provide. Returns `nil` if `rank` exceeds 0 and `values` is `nil` or if `rank` exceeds ``MTL_TENSOR_MAX_RANK``.
- (nullable instancetype)initWithRank:(NSUInteger)rank values:(nullable const NSInteger *)values;
@@ -99,12 +140,86 @@
} API_AVAILABLE(macos(26.0), ios(26.0));
+/// The possible tensor plane types.
+typedef NS_ENUM(NSInteger, MTLTensorPlaneType)
+{
+ /// The data plane. This is the main plane of a tensor. Tensors always have a data plane.
+ MTLTensorPlaneTypeData = 0,
+
+ /// The scale auxiliary plane. Contains scale factors for elements in the data plane.
+ MTLTensorPlaneTypeScales = 1,
+} API_AVAILABLE(macos(27.0), ios(27.0));
+
+/// A configuration for an auxiliary plane in a multi-plane tensor.
+///
+/// Use this descriptor to configure an auxiliary plane's data type and block
+/// factors before attaching it to a ``MTLTensorDescriptor``.
+MTL_EXPORT API_AVAILABLE(macos(27.0), ios(27.0))
+@interface MTLTensorAuxiliaryPlaneDescriptor : NSObject <NSCopying>
+
+/// The data format of all elements in the plane.
+///
+/// The default value of this property is ``MTLTensorDataType/MTLTensorDataTypeFloat8UE8M0``.
+@property (readwrite, nonatomic) MTLTensorDataType dataType;
+
+/// A ``MTLTensorExtents`` instance that describes how many data plane elements correspond to one element in this plane.
+///
+/// The rank of the block factors must match the rank of the tensor's
+/// dimensions.
+///
+/// The first element of the block factors must be 32. All remaining elements
+/// must be 1.
+///
+/// The default value is a 1D block size of width 32.
+@property (readwrite, nonatomic, copy) MTLTensorExtents *blockFactors;
+
+@end
+
+/// A map of auxiliary plane descriptors keyed by plane type.
+///
+/// Use this collection to associate ``MTLTensorPlaneType`` values with
+/// ``MTLTensorAuxiliaryPlaneDescriptor`` configurations, then attach
+/// it to a ``MTLTensorDescriptor`` to create a multi-plane tensor.
+MTL_EXPORT API_AVAILABLE(macos(27.0), ios(27.0))
+@interface MTLTensorAuxiliaryPlaneDescriptorMap : NSObject <NSCopying>
+
+/// Sets the auxiliary plane descriptor for the given plane type.
+///
+/// ``MTLTensorPlaneType/MTLTensorPlaneTypeData`` is not a valid plane type for this method.
+/// The data plane is always present, and you configure it directly on ``MTLTensorDescriptor``.
+///
+/// ``MTLTensorPlaneType/MTLTensorPlaneTypeScales`` auxiliary planes only support
+/// ``MTLTensorDataType/MTLTensorDataTypeFloat8UE8M0`` as a data type.
+///
+/// - Parameters:
+/// - descriptor: The descriptor configuring the auxiliary plane.
+/// - plane: The plane type to associate the descriptor with.
+- (void)setDescriptor:(MTLTensorAuxiliaryPlaneDescriptor *)descriptor
+ forPlane:(MTLTensorPlaneType)plane;
+
+/// Returns the auxiliary plane descriptor for the given plane type, or `nil` if
+/// none has been set.
+///
+/// - Parameters:
+/// - plane: The plane type to look up.
+/// - Returns: The descriptor for the given plane type, or `nil`.
+- (nullable MTLTensorAuxiliaryPlaneDescriptor *)descriptorForPlane:(MTLTensorPlaneType)plane;
+
+/// Empties the map of all its elements.
+-(void)reset;
+
+@end
+
/// A configuration type for creating new tensor instances.
MTL_EXPORT API_AVAILABLE(macos(26.0), ios(26.0))
@interface MTLTensorDescriptor : NSObject <NSCopying>
/// An array of sizes, in elements, one for each dimension of the tensors you create with this descriptor.
///
+/// You are responsible for ensuring `dimensions` meets the following requirements:
+/// - `dimensions[i]` must be greater than 0.
+/// - If ``dataType`` is a format ``MTLTensorDataType``, `dimensions[0]` must be a multiple of 32 elements.
+///
/// The default value of this property is a rank one extents with size one.
@property (readwrite, nonatomic, copy) MTLTensorExtents *dimensions;
@@ -113,12 +228,12 @@
/// You are responsible for ensuring `strides` meets the following requirements:
/// - The first element of `strides` is one.
/// - If ``usage`` contains ``MTLTensorUsage/MTLTensorUsageMachineLearning``, the second element of `strides` is aligned to 64 bytes, and for any `i` larger than one, `strides[i]` is equal to `strides[i-1] * dimensions[i-1]`.
-/// - If ``dataType`` is a sub-byte ``MTLTensorDataType``, for any `i` greater than or equal to 1, `strides[i]` is aligned to 128 bytes. This is not a requirement for non-sub-byte data types, but following this convention improves performance.
+/// - If ``dataType`` is a format ``MTLTensorDataType``, for any `i` greater than or equal to 1, `strides[i]` is aligned to 128 bytes. This is not a requirement for non-format data types, but following this convention improves performance.
///
/// Only set this property when creating tensors from a buffer.
@property (readwrite, nonatomic, copy, nullable) MTLTensorExtents *strides;
-/// A data format for the tensors you create with this descriptor.
+/// The data format of all elements in the data plane.
///
/// The default value of this property is ``MTLTensorDataType/MTLTensorDataTypeFloat32``.
@property (readwrite, nonatomic) MTLTensorDataType dataType;
@@ -130,6 +245,21 @@
/// - ``MTLTensorUsage/MTLTensorUsageCompute``
@property (readwrite, nonatomic) MTLTensorUsage usage;
+
+/// The auxiliary plane configurations for this tensor.
+///
+/// Set this property with a populated ``MTLTensorAuxiliaryPlaneDescriptorMap``
+/// to create a multi-plane tensor. When `nil`, the tensor has only a data plane.
+///
+/// Multi-plane tensors do not support ``MTLTensorUsage/MTLTensorUsageMachineLearning``.
+/// Use ``MTLTensorUsage/MTLTensorUsageCompute`` or ``MTLTensorUsage/MTLTensorUsageRender``.
+///
+/// Multi-plane tensors do not support data types larger than one byte as the data plane type
+///
+/// The default value is `nil`.
+@property (nullable, retain, nonatomic) MTLTensorAuxiliaryPlaneDescriptorMap *auxiliaryPlanes API_AVAILABLE(macos(27.0), ios(27.0));
+
+
/// A packed set of the `storageMode`, `cpuCacheMode` and `hazardTrackingMode` properties.
@property (readwrite, nonatomic) MTLResourceOptions resourceOptions;
@@ -151,6 +281,69 @@
@end
+/// Per-plane buffer backing storage for multi-plane tensor creation.
+///
+/// Use this type to associate each plane of a tensor with a
+/// ``MTLBuffer`` and byte offset, then pass it to the tensor
+/// creation API on ``MTLDevice``.
+MTL_EXPORT API_AVAILABLE(macos(27.0), ios(27.0))
+@interface MTLTensorBufferAttachments : NSObject <NSCopying>
+
+/// Sets the buffer and byte offset to use as backing storage for the given
+/// plane.
+///
+/// The buffer must not be `nil`. The offset must be aligned to 128 bytes if
+/// the plane uses a format ``MTLTensorDataType``, otherwise it must be aligned
+/// to the size of the plane's data type in bytes.
+///
+/// - Parameters:
+/// - buffer: The buffer to back the plane.
+/// - offset: The byte offset into the buffer.
+/// - plane: The plane type to associate the buffer with.
+-(void)setBuffer:(id<MTLBuffer>)buffer
+ offset:(NSUInteger)offset
+ forPlane:(MTLTensorPlaneType)plane;
+
+/// Returns the buffer backing the given plane, or `nil` if none has been set.
+///
+/// - Parameters:
+/// - plane: The plane type to look up.
+/// - Returns: The buffer for the given plane, or `nil`.
+-(nullable id<MTLBuffer>)bufferForPlane:(MTLTensorPlaneType)plane;
+
+/// Returns the byte offset into the buffer for the given plane.
+///
+/// - Parameters:
+/// - plane: The plane type to look up.
+/// - Returns: The byte offset for the given plane.
+-(NSUInteger)offsetForPlane:(MTLTensorPlaneType)plane;
+
+/// Empties the container of all its elements.
+-(void)reset;
+
+@end
+
+/// A type that represents the configuration and storage of an auxiliary plane in a multi-plane tensor.
+MTL_EXPORT API_AVAILABLE(macos(27.0), ios(27.0))
+@protocol MTLTensorAuxiliaryPlane <NSObject>
+
+/// The data format of all elements in the plane.
+@property (readonly) MTLTensorDataType dataType;
+
+/// Describes how many data plane elements correspond to one element in this plane.
+@property (readonly) MTLTensorExtents *blockFactors;
+
+/// The buffer that provides the underlying storage for this plane, or `nil` if no buffer was provided at initialization.
+@property (readonly, nullable) id<MTLBuffer> buffer;
+
+/// Byte offset into `buffer` where this plane's data begins, or 0 if no buffer was provided at initialization.
+@property (readonly) NSUInteger bufferOffset;
+
+/// The type of information this plane stores.
+@property (readonly) MTLTensorPlaneType planeType;
+
+@end
+
/// A resource representing a multi-dimensional array that you can use with machine learning workloads.
MTL_EXTERN API_AVAILABLE(macos(26.0), ios(26.0))
@protocol MTLTensor <MTLResource>
@@ -158,53 +351,181 @@
/// A handle that represents the GPU resource, which you can store in an argument buffer.
@property (readonly) MTLResourceID gpuResourceID;
-/// A buffer instance this tensor shares its storage with or nil if this tensor does not wrap an underlying buffer.
+/// A buffer instance this tensor shares its storage with or `nil` if this tensor does not wrap an underlying buffer.
@property (nullable, readonly) id<MTLBuffer> buffer;
/// An offset, in bytes, into the buffer instance this tensor shares its storage with, or zero if this tensor does not wrap an underlying buffer.
@property (readonly) NSUInteger bufferOffset;
-/// An array of strides, in elements, one for each dimension of this tensor.
+/// An array of strides, in elements, one for each dimension of this tensor, if applicable.
///
-/// This property only applies if this tensor shares its storage with a buffer, otherwise it's nil.
+/// You are responsible for ensuring `strides` meets the following
+/// requirements:
+/// - The first element of `strides` must be 1.
+/// - If ``usage`` contains ``MTLTensorUsage/MTLTensorUsageMachineLearning``,
+/// the second element of `strides` must be aligned to 64 bytes, and for any
+/// `i` larger than 1, `strides[i]` must equal
+/// `strides[i-1] * dimensions[i-1]`.
+/// - If ``dataType`` is a format ``MTLTensorDataType``, for any `i`
+/// greater than or equal to 1, `strides[i]` must be aligned to 128 bytes.
+/// This is not a requirement for non-format data types, but following this
+/// convention improves performance.
+///
+/// This property is non-nil only for tensors created from a buffer.
@property (nullable, readonly) MTLTensorExtents *strides;
/// An array of sizes, in elements, one for each dimension of this tensor.
+///
+/// You are responsible for ensuring `dimensions` meets the following
+/// requirements:
+/// - `dimensions[i]` must be greater than 0.
+/// - If ``dataType`` is a format ``MTLTensorDataType``,
+/// `dimensions[0]` must be a multiple of 32 elements.
+/// - If the tensor has auxiliary planes, each dimension must be evenly
+/// divisible by its corresponding block factor.
+/// - If ``dataType`` is a format ``MTLTensorDataType``, or the tensor has
+/// auxiliary planes, the tensor must have rank 1 or higher.
+///
+/// The default value of this property is a rank one extents with size one.
@property (readonly) MTLTensorExtents *dimensions;
-/// An underlying data format of this tensor.
+/// The underlying data format of the data plane.
@property (readonly) MTLTensorDataType dataType;
/// A set of contexts in which you can use this tensor.
@property (readonly) MTLTensorUsage usage;
-/// Replaces the contents of a slice of this tensor with data you provide.
+
+/// The auxiliary planes of this tensor.
///
+/// Returns an array of ``MTLTensorAuxiliaryPlane`` objects describing each
+/// auxiliary plane configured on this tensor. For single-plane tensors, this
+/// array is empty.
+@property (readonly) NSArray<id<MTLTensorAuxiliaryPlane>> *auxiliaryPlanes API_AVAILABLE(macos(27.0), ios(27.0));
+
+
+
+/// Replaces a slice of the data plane plane of this tensor with data from a pointer you
+/// provide.
+///
+/// Create the tensor with ``MTLResourceOptions/MTLResourceStorageModeShared`` for CPU access via this method.
+/// Strides must be monotonically non-decreasing: for any `i > 0`, `strides[i] >= strides[i-1] * dimensions[i-1]`.
+///
+/// The first dimension of `sliceOrigin` and `sliceDimensions` must be
+/// byte aligned.
+///
/// - Parameters:
-/// - sliceOrigin: An array of offsets, in elements, to the first element of the slice that this method writes data to.
-/// - sliceDimensions: An array of sizes, in elements, of the slice this method writes data to.
-/// - bytes: A pointer to bytes of data that this method copies into the slice you specify with `sliceOrigin` and `sliceDimensions`.
-/// - strides: An array of strides, in elements, that describes the layout of the data in `bytes`. You are responsible for ensuring `strides` meets the following requirements:
-/// - Elements of `strides`are in monotonically non-decreasing order.
-/// - For any `i` larger than zero, `strides[i]` is greater than or equal to `strides[i-1] * dimensions[i-1]`.
+/// - sliceOrigin: An array of per-dimension offsets that together locate the first element
+/// to write to in the tensor. Each element in this array corresponds to the dimension at the
+/// same index in `sliceDimensions`. Each offset value represents the number of elements from
+/// the start of that dimension.
+/// - sliceDimensions: An array of per-dimension sizes that together define the extent of the
+/// slice to write to in the tensor. Each element in this array corresponds to the dimension
+/// at the same index in `sliceOrigin`. Each size value represents the number of elements to
+/// include along that dimension, starting from the corresponding offset in `sliceOrigin`.
+/// - bytes: A pointer to bytes of data to copy into the slice.
+/// - strides: An array of strides, in elements, that describes the layout
+/// of the data in `bytes`.
- (void)replaceSliceOrigin:(MTLTensorExtents *)sliceOrigin
sliceDimensions:(MTLTensorExtents *)sliceDimensions
withBytes:(const void *)bytes
strides:(MTLTensorExtents *)strides;
-/// Copies the data corresponding to a slice of this tensor into a pointer you provide.
+/// Copies data from a slice of the data plane of this tensor into a pointer you
+/// provide.
///
+/// Create the tensor with ``MTLResourceOptions/MTLResourceStorageModeShared`` for CPU access via this method.
+/// Strides must be monotonically non-decreasing: for any `i > 0`, `strides[i] >= strides[i-1] * dimensions[i-1]`.
+///
+/// The first dimension of `sliceOrigin` and `sliceDimensions` must be
+/// byte aligned.
+///
/// - Parameters:
-/// - bytes: A pointer to bytes of data that this method copies into the slice you specify with `sliceOrigin` and `sliceDimensions`.
-/// - strides: An array of strides, in elements, that describes the layout of the data in `bytes`. You are responsible for ensuring `strides` meets the following requirements:
-/// - Elements of `strides`are in monotonically non-decreasing order.
-/// - For any `i` larger than zero, `strides[i]` is greater than or equal to `strides[i-1] * dimensions[i-1]`.
-/// - sliceOrigin: An array of offsets, in elements, to the first element of the slice that this method reads data from.
-/// - sliceDimensions: An array of sizes, in elements, of the slice this method reads data from.
+/// - bytes: A pointer to bytes of data that this method copies the slice
+/// into.
+/// - strides: An array of strides, in elements, that describes the layout
+/// of the data in `bytes`.
+/// - sliceOrigin: An array of per-dimension offsets that together locate the first element
+/// to copy in the tensor. Each element in this array corresponds to the dimension at the
+/// same index in `sliceDimensions`. Each offset value represents the number of elements from
+/// the start of that dimension.
+/// - sliceDimensions: An array of per-dimension sizes that together define the extent of the
+/// slice to copy from the tensor. Each element in this array corresponds to the dimension
+/// at the same index in `sliceOrigin`. Each size value represents the number of elements to
+/// include along that dimension, starting from the corresponding offset in `sliceOrigin`.
- (void)getBytes:(void *)bytes
strides:(MTLTensorExtents *)strides
fromSliceOrigin:(MTLTensorExtents *)sliceOrigin
sliceDimensions:(MTLTensorExtents *)sliceDimensions;
+
+
+
+
+/// Copies data from a slice of a plane of this tensor into a pointer you
+/// provide.
+///
+/// When reading from auxiliary planes, specify `sliceOrigin` and
+/// `sliceDimensions` in plane coordinates by applying the auxiliary plane's
+/// block factors.
+///
+/// Create the tensor with ``MTLResourceOptions/MTLResourceStorageModeShared`` for CPU access via this method.
+/// Strides must be monotonically non-decreasing: for any `i > 0`, `strides[i] >= strides[i-1] * dimensions[i-1]`.
+///
+/// The first dimension of `sliceOrigin` and `sliceDimensions` must be
+/// byte aligned.
+///
+/// - Parameters:
+/// - bytes: A pointer to bytes of data that this method copies the slice
+/// into.
+/// - strides: An array of strides, in elements, that describes the layout
+/// of the data in `bytes`.
+/// - sliceOrigin: An array of per-dimension offsets that together locate the first element
+/// to copy in the tensor. Each element in this array corresponds to the dimension at the
+/// same index in `sliceDimensions`. Each offset value represents the number of elements from
+/// the start of that dimension.
+/// - sliceDimensions: An array of per-dimension sizes that together define the extent of the
+/// slice to copy from the tensor. Each element in this array corresponds to the dimension
+/// at the same index in `sliceOrigin`. Each size value represents the number of elements to
+/// include along that dimension, starting from the corresponding offset in `sliceOrigin`.
+/// - plane: The plane the method reads data from.
+- (void)getBytes:(void *)bytes
+ strides:(MTLTensorExtents *)strides
+ fromSliceOrigin:(MTLTensorExtents *)sliceOrigin
+ sliceDimensions:(MTLTensorExtents *)sliceDimensions
+ plane:(MTLTensorPlaneType)plane API_AVAILABLE(macos(27.0), ios(27.0));
+
+/// Replaces a slice of a plane of this tensor with data from a pointer you
+/// provide.
+///
+/// When writing to auxiliary planes, specify `sliceOrigin` and
+/// `sliceDimensions` in plane coordinates by applying the auxiliary plane's
+/// block factors.
+///
+/// Create the tensor with ``MTLResourceOptions/MTLResourceStorageModeShared`` for CPU access via this method.
+/// Strides must be monotonically non-decreasing: for any `i > 0`, `strides[i] >= strides[i-1] * dimensions[i-1]`.
+///
+/// The first dimension of `sliceOrigin` and `sliceDimensions` must be
+/// byte aligned.
+///
+/// - Parameters:
+/// - sliceOrigin: An array of per-dimension offsets that together locate the first element
+/// to write to in the tensor. Each element in this array corresponds to the dimension at the
+/// same index in `sliceDimensions`. Each offset value represents the number of elements from
+/// the start of that dimension.
+/// - sliceDimensions: An array of per-dimension sizes that together define the extent of the
+/// slice to write to in the tensor. Each element in this array corresponds to the dimension
+/// at the same index in `sliceOrigin`. Each size value represents the number of elements to
+/// include along that dimension, starting from the corresponding offset in `sliceOrigin`.
+/// - plane: The plane the method writes data to.
+/// - bytes: A pointer to bytes of data to copy into the slice.
+/// - strides: An array of strides, in elements, that describes the layout
+/// of the data in `bytes`.
+- (void)replaceSliceOrigin:(MTLTensorExtents *)sliceOrigin
+ sliceDimensions:(MTLTensorExtents *)sliceDimensions
+ plane:(MTLTensorPlaneType)plane
+ withBytes:(const void *)bytes
+ strides:(MTLTensorExtents *)strides API_AVAILABLE(macos(27.0), ios(27.0));
+
@end
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h 2026-04-18 20:44:31
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h 2026-05-21 07:06:48
@@ -298,6 +298,7 @@
*/
@property (readwrite, nonatomic) MTLTextureSwizzleChannels swizzle;
+
@end
@@ -542,6 +543,7 @@
@abstract Query support tier for sparse textures.
*/
@property (readonly) MTLTextureSparseTier sparseTextureTier API_AVAILABLE(macos(26.0), ios(26.0));
+
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h
--- /Applications/Xcode_26.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h 2026-04-18 20:44:32
+++ /Applications/Xcode_27.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h 2026-05-23 02:57:30
@@ -103,6 +103,7 @@
return result;
}
+
/*!
@typedef MTLResourceID
@abstract Handle of the GPU resource used for binding resources to argument tables, navigating resource view pools and storing resources in an argument buffer