-
Notifications
You must be signed in to change notification settings - Fork 518
Metal iOS xcode16.0 b1
Rolf Bjarne Kvinge edited this page Jul 12, 2024
·
3 revisions
#Metal.framework https://github.com/xamarin/xamarin-macios/pull/20895
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h 2024-04-19 08:55:56
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h 2024-05-30 10:43:32
@@ -74,6 +74,18 @@
MTLAccelerationStructureInstanceOptionNonOpaque = (1 << 3),
} API_AVAILABLE(macos(11.0), ios(14.0));
+typedef NS_ENUM(NSInteger, MTLMatrixLayout) {
+ /**
+ * @brief Column-major order
+ */
+ MTLMatrixLayoutColumnMajor = 0,
+
+ /**
+ * @brief Row-major order
+ */
+ MTLMatrixLayoutRowMajor = 1,
+} API_AVAILABLE(macos(15.0), ios(18.0));
+
/**
* @brief Base class for acceleration structure descriptors. Do not use this class directly. Use
* one of the derived classes instead.
@@ -255,6 +267,11 @@
*/
@property (nonatomic) NSUInteger transformationMatrixBufferOffset API_AVAILABLE(macos(13.0), ios(16.0));
+/**
+ * @brief Matrix layout for the transformation matrix in the transformation
+ * matrix buffer. Defaults to MTLMatrixLayoutColumnMajor.
+ */
+@property (nonatomic) MTLMatrixLayout transformationMatrixLayout API_AVAILABLE(macos(15.0), ios(18.0));
+ (instancetype)descriptor;
@end
@@ -368,6 +385,11 @@
*/
@property (nonatomic) NSUInteger transformationMatrixBufferOffset API_AVAILABLE(macos(13.0), ios(16.0));
+/**
+ * @brief Matrix layout for the transformation matrix in the transformation
+ * matrix buffer. Defaults to MTLMatrixLayoutColumnMajor.
+ */
+@property (nonatomic) MTLMatrixLayout transformationMatrixLayout API_AVAILABLE(macos(15.0), ios(18.0));
+ (instancetype)descriptor;
@end
@@ -950,6 +972,21 @@
float motionEndTime;
} MTLIndirectAccelerationStructureMotionInstanceDescriptor API_AVAILABLE(macos(14.0), ios(17.0));
+typedef NS_ENUM(NSInteger, MTLTransformType) {
+ /**
+ * @brief A tightly packed matrix with 4 columns and 3 rows. The full transform is assumed
+ * to be a 4x4 matrix with the last row being (0, 0, 0, 1).
+ */
+ MTLTransformTypePackedFloat4x3 = 0,
+
+ /**
+ * @brief A transformation represented by individual components such as translation and
+ * rotation. The rotation is represented by a quaternion, allowing for correct motion
+ * interpolation.
+ */
+ MTLTransformTypeComponent = 1,
+} API_AVAILABLE(macos(15.0), ios(18.0));
+
/**
* @brief Descriptor for an instance acceleration structure
*/
@@ -1006,6 +1043,24 @@
*/
@property (nonatomic) NSUInteger motionTransformCount API_AVAILABLE(macos(12.0), ios(15.0));
+/**
+ * Matrix layout of the transformation matrices in the instance descriptors
+ * in the instance descriptor buffer and the transformation matrices in the
+ * transformation matrix buffer. Defaults to MTLMatrixLayoutColumnMajor.
+ */
+@property (nonatomic) MTLMatrixLayout instanceTransformationMatrixLayout API_AVAILABLE(macos(15.0), ios(18.0));
+
+/**
+ * @brief Type of motion transforms. Defaults to MTLTransformTypePackedFloat4x3.
+ */
+@property (nonatomic) MTLTransformType motionTransformType API_AVAILABLE(macos(15.0), ios(18.0));
+
+/**
+ * @brief Motion transform stride. Defaults to 0, indicating that transforms are tightly packed according to the
+ * motion transform type.
+ */
+@property (nonatomic) NSUInteger motionTransformStride API_AVAILABLE(macos(15.0), ios(18.0));
+
+ (instancetype)descriptor;
@end
@@ -1086,6 +1141,24 @@
* aligned to the platform's buffer offset alignment.
*/
@property (nonatomic) NSUInteger motionTransformCountBufferOffset;
+
+/**
+ * Matrix layout of the transformation matrices in the instance descriptors
+ * in the instance descriptor buffer and the transformation matrices in the
+ * transformation matrix buffer. Defaults to MTLMatrixLayoutColumnMajor.
+ */
+@property (nonatomic) MTLMatrixLayout instanceTransformationMatrixLayout API_AVAILABLE(macos(15.0), ios(18.0));
+
+/**
+ * @brief Type of motion transforms. Defaults to MTLTransformTypePackedFloat4x3.
+ */
+@property (nonatomic) MTLTransformType motionTransformType API_AVAILABLE(macos(15.0), ios(18.0));
+
+/**
+ * @brief Motion transform stride. Defaults to 0, indicating that transforms are tightly packed according to the
+ * motion transform type.
+ */
+@property (nonatomic) NSUInteger motionTransformStride API_AVAILABLE(macos(15.0), ios(18.0));
+ (instancetype)descriptor;
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h 2024-04-19 09:55:17
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h 2024-05-30 16:35:22
@@ -2,6 +2,7 @@
#import <metal_stdlib>
typedef metal::packed_float3 MTLPackedFloat3;
+typedef metal::packed_float4 MTLPackedFloatQuaternion;
#else
#include <math.h>
#import <Metal/MTLDefines.h>
@@ -46,8 +47,49 @@
return packedFloat3;
}
+typedef struct MTLPackedFloatQuaternion {
+ float x;
+ float y;
+ float z;
+ float w;
+
+#ifdef __cplusplus
+ MTLPackedFloatQuaternion()
+ : x(0.0f), y(0.0f), z(0.0f), w(1.0f)
+ {
+ }
+
+ MTLPackedFloatQuaternion(float x, float y, float z, float w)
+ : x(x), y(y), z(z), w(w)
+ {
+ }
+
+ float & operator[](int idx) {
+ float *elements = &x;
+
+ return elements[idx];
+ }
+
+ const float & operator[](int idx) const {
+ const float *elements = &x;
+
+ return elements[idx];
+ }
#endif
+} MTLPackedFloatQuaternion;
+MTL_INLINE MTLPackedFloatQuaternion MTLPackedFloatQuaternionMake(float x, float y, float z, float w)
+{
+ MTLPackedFloatQuaternion packedQuaternion;
+ packedQuaternion.x = x;
+ packedQuaternion.y = y;
+ packedQuaternion.z = z;
+ packedQuaternion.w = w;
+ return packedQuaternion;
+}
+
+#endif
+
typedef struct _MTLPackedFloat4x3 {
MTLPackedFloat3 columns[4];
@@ -137,3 +179,38 @@
}
#endif
} MTLAxisAlignedBoundingBox;
+
+/**
+ * @brief A transformation represented by individual components such as translation and
+ * rotation. The rotation is represented by a quaternion, allowing for correct motion
+ * interpolation.
+ */
+typedef struct {
+ /**
+ * @brief The scale of the instance applied before rotation alongside shear and pivot
+ */
+ MTLPackedFloat3 scale;
+
+ /**
+ * @brief The shear of the instance applied before rotation alongside scale and pivot
+ */
+ MTLPackedFloat3 shear;
+
+ /**
+ * @brief Translation applied before rotation alongside scale and shear. Allows
+ * rotation to pivot around a point.
+ */
+ MTLPackedFloat3 pivot;
+
+ /**
+ * @brief The rotation of the instance as a normalized quaternion. Applied after scale,
+ * shear, and pivot and before translation
+ */
+ MTLPackedFloatQuaternion rotation;
+
+ /**
+ * @brief The translation of the instance. Applied after rotation. Typically contains
+ * the composition of object translation and the inverse of the pivot translation.
+ */
+ MTLPackedFloat3 translation;
+} MTLComponentTransform;
\ No newline at end of file
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAllocation.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAllocation.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAllocation.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAllocation.h 2024-05-30 12:28:40
@@ -0,0 +1,16 @@
+//
+// MTLAllocation.h
+// Metal
+//
+// Copyright (c) 2024 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <Metal/MTLDefines.h>
+
+
+API_AVAILABLE(macos(15.0), ios(18.0))
+@protocol MTLAllocation <NSObject>
+@property (readonly) NSUInteger allocatedSize API_AVAILABLE(macos(15.0), ios(18.0));
+@end
+
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h 2024-04-19 09:55:20
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h 2024-05-30 10:43:33
@@ -100,6 +100,24 @@
- (BOOL) addTileRenderPipelineFunctionsWithDescriptor:(MTLTileRenderPipelineDescriptor*)descriptor error:(NSError**)error API_AVAILABLE(tvos(14.5));
/*!
+ @method addMeshRenderPipelineFunctionsWithDescriptor:error:
+ @abstract Add the function(s) from a mesh render pipeline state to the archive.
+ @param descriptor The descriptor from which function(s) will be added.
+ @param error If the function fails, this will be set to describe the failure. This can be (but is not required to be) an error from the MTLBinaryArchiveDomain domain.
+ @return Whether or not the addition succeeded. Functions referenced multiple times are silently accepted.
+ */
+- (BOOL) addMeshRenderPipelineFunctionsWithDescriptor:(MTLMeshRenderPipelineDescriptor*)descriptor error:(NSError**)error API_AVAILABLE(macos(15.0), ios(18.0));
+
+
+/*!
+ @method addLibraryWithDescriptor:error:
+ @abstract Add the function(s) from a stitched library to the archive.
+ @param descriptor The stitched library descriptor from which function(s) will be added.
+ @param error If the function fails, this will be set to describe the failure. This can be (but is not required to be) an error from the MTLBinaryArchiveDomain domain.
+ @return Whether or not the addition succeeded. Functions referenced multiple times are silently accepted.
+ */
+- (BOOL) addLibraryWithDescriptor:(MTLStitchedLibraryDescriptor *)descriptor error:(NSError **)error API_AVAILABLE(macos(15.0), ios(18.0));
+/*!
@method serializeToURL:error:
@abstract Write the contents of a MTLBinaryArchive to a file.
@discussion Persisting the archive to a file allows opening the archive on a subsequent instance of the app, making available the contents without recompiling.
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h 2024-04-19 08:23:51
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h 2024-05-30 10:43:32
@@ -183,6 +185,13 @@
*/
@property (readwrite, nonatomic) MTLCommandBufferErrorOption errorOptions;
+/*!
+ @property logState
+ @abstract Contains information related to shader logging.
+*/
+@property (readwrite, nonatomic, nullable, retain) id<MTLLogState> logState
+ API_AVAILABLE(macos(15.0), ios(18.0));
+
@end // MTLCommandBufferDescriptor
/*!
@@ -431,6 +440,19 @@
*/
- (void)popDebugGroup API_AVAILABLE(macos(10.13), ios(11.0));
+/*!
+ @method useResidencySet
+ @abstract Marks the residency set as part of the current command buffer execution. This ensures that the residency set is resident during execution of the command buffer.
+ */
+- (void)useResidencySet:(id <MTLResidencySet>)residencySet
+ API_AVAILABLE(macos(15.0), ios(18.0));
+/*!
+ @method useResidencySets
+ @abstract Marks the residency sets as part of the current command buffer execution. This ensures that the residency sets are resident during execution of the command buffer.
+ */
+- (void)useResidencySets:(const id <MTLResidencySet> _Nonnull[_Nonnull])residencySets
+ count:(NSUInteger)count
+ API_AVAILABLE(macos(15.0), ios(18.0));
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandQueue.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandQueue.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandQueue.h 2024-04-19 09:55:20
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandQueue.h 2024-05-30 12:28:40
@@ -53,6 +54,49 @@
*/
- (void)insertDebugCaptureBoundary API_DEPRECATED("Use MTLCaptureScope instead", macos(10.11, 10.13), ios(8.0, 11.0));
+/*!
+ @method addResidencySet
+ @abstract Marks the residency set as part of the command queue execution. This ensures that the residency set is resident during execution of all the command buffers within the queue.
+ */
+- (void)addResidencySet:(id <MTLResidencySet>)residencySet
+ API_AVAILABLE(macos(15.0), ios(18.0));
+/*!
+ @method addResidencySets
+ @abstract Marks the residency sets as part of the command queue execution. This ensures that the residency sets are resident during execution of all the command buffers within the queue.
+ */
+- (void)addResidencySets:(const id <MTLResidencySet> _Nonnull[_Nonnull])residencySets
+ count:(NSUInteger)count
+ API_AVAILABLE(macos(15.0), ios(18.0));
+
+/*!
+ @method removeResidencySet
+ @abstract Removes the residency set from the command queue execution. This ensures that only the remaining residency sets are resident during execution of all the command buffers within the queue.
+ */
+- (void)removeResidencySet:(id <MTLResidencySet>)residencySet
+ API_AVAILABLE(macos(15.0), ios(18.0));
+
+/*!
+ @method removeResidencySets
+ @abstract Removes the residency sets from the command queue execution. This ensures that only the remaining residency sets are resident during execution of all the command buffers within the queue.
+ */
+- (void)removeResidencySets:(const id <MTLResidencySet> _Nonnull[_Nonnull])residencySets
+ count:(NSUInteger)count
+API_AVAILABLE(macos(15.0), ios(18.0));
+
@end
+MTL_EXPORT API_AVAILABLE(macos(15.0), ios(18.0))
+@interface MTLCommandQueueDescriptor : NSObject <NSCopying>
+/*!
+ @property maxCommandBufferCount
+ @ Specify upper bound on uncompleted command buffers that may be enqueued on this queue
+ */
+@property (readwrite, nonatomic) NSUInteger maxCommandBufferCount;
+
+/*!
+ @property logState
+ @ Specify the MTLLogState to enable shader logging
+ */
+@property (readwrite, nonatomic, nullable, retain) id<MTLLogState> logState;
+@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h 2024-04-19 08:55:58
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h 2024-05-30 09:46:55
@@ -136,6 +136,13 @@
+/*!
+ @property shaderValidation
+ @abstract Toggle that determines whether Metal Shader Validation should be enabled or disabled for the pipeline.
+ @discussion The value can be overridden using `MTL_SHADER_VALIDATION_ENABLE_PIPELINES` or `MTL_SHADER_VALIDATION_DISABLE_PIPELINES` Environment Variables.
+ */
+@property (readwrite, nonatomic) MTLShaderValidation shaderValidation API_AVAILABLE(macos(15.0), ios(18.0));
+
@end
/*!
@@ -220,6 +227,11 @@
- (nullable id <MTLIntersectionFunctionTable>)newIntersectionFunctionTableWithDescriptor:(MTLIntersectionFunctionTableDescriptor * _Nonnull)descriptor API_AVAILABLE(macos(11.0), ios(14.0));
+/*!
+ @property shaderValidation
+ @abstract Current state of Shader Validation for the pipeline.
+ */
+@property (readonly, nonatomic) MTLShaderValidation shaderValidation API_AVAILABLE(macos(15.0), ios(18.0));
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h 2024-04-19 09:55:19
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h 2024-05-30 12:28:39
@@ -97,11 +100,10 @@
/*!
@brief Returns all Metal devices in the system.
- @discussion This API will not cause the system to switch devices and leaves the
- decision about which GPU to use up to the application based on whatever criteria
- it deems appropriate.
+ @discussion On macOS and macCatalyst, this API will not cause the system to switch devices and leaves the decision about which GPU to use up to the application based on whatever criteria it deems appropriate.
+ On iOS, tvOS and visionOS, this API returns an array containing the same device that MTLCreateSystemDefaultDevice would have returned, or an empty array if it would have failed.
*/
-MTL_EXTERN NSArray <id<MTLDevice>> *MTLCopyAllDevices(void) API_AVAILABLE(macos(10.11), macCatalyst(13.0)) API_UNAVAILABLE(ios) NS_RETURNS_RETAINED;
+MTL_EXTERN NSArray <id<MTLDevice>> *MTLCopyAllDevices(void) API_AVAILABLE(macos(10.11), macCatalyst(13.0), ios(18.0)) NS_RETURNS_RETAINED;
typedef NS_ENUM(NSUInteger, MTLFeatureSet)
{
@@ -184,7 +186,8 @@
typedef NS_OPTIONS(NSUInteger, MTLPipelineOption)
{
MTLPipelineOptionNone = 0,
- MTLPipelineOptionArgumentInfo = 1 << 0,
+ MTLPipelineOptionArgumentInfo API_DEPRECATED_WITH_REPLACEMENT("MTLPipelineOptionBindingInfo", macos(10.11, 13.0), ios(8.0, 16.0)) = 1 << 0,
+ MTLPipelineOptionBindingInfo = 1 << 0,
MTLPipelineOptionBufferTypeInfo = 1 << 1,
MTLPipelineOptionFailOnBinaryArchiveMiss API_AVAILABLE(macos(11.0), ios(14.0)) = 1 << 2,
} API_AVAILABLE(macos(10.11), ios(8.0));
@@ -523,6 +526,12 @@
/*!
+ @method newLogStateWithDescriptor
+ @abstract This method will create a new MTLLogState.
+ */
+- (nullable id <MTLLogState>) newLogStateWithDescriptor:(MTLLogStateDescriptor* _Nonnull) descriptor error:(__autoreleasing NSError* _Nullable *)error API_AVAILABLE(macos(15.0), ios(18.0));
+
+/*!
@method newCommandQueue
@brief Create and return a new command queue. Command Queues created via this method will only allow up to 64 non-completed command buffers.
@return The new command queue object
@@ -537,6 +546,12 @@
- (nullable id <MTLCommandQueue>)newCommandQueueWithMaxCommandBufferCount:(NSUInteger)maxCommandBufferCount;
/*!
+ @method newCommandQueueWithDescriptor:
+ @brief Create a MTLCommandQueue according to MTLCommandQueueDescriptor.
+ */
+- (nullable id <MTLCommandQueue>)newCommandQueueWithDescriptor:(MTLCommandQueueDescriptor *)descriptor API_AVAILABLE(macos(15.0), ios(18.0));
+
+/*!
@method heapTextureSizeAndAlignWithDescriptor:
@abstract Determine the byte size of textures when sub-allocated from a heap.
@discussion This method can be used to help determine the required heap size.
@@ -1165,6 +1180,15 @@
*/
@property (readonly) BOOL supportsPrimitiveMotionBlur API_AVAILABLE(macos(11.0), ios(14.0));
+
+
+/*!
+ @method newResidencySetWithDescriptor
+ @abstract Creates a new residency set with a descriptor.
+ */
+- (nullable id<MTLResidencySet>) newResidencySetWithDescriptor:(MTLResidencySetDescriptor *)desc
+ error:(NSError *__nullable*)error
+ API_AVAILABLE(macos(15.0), ios(18.0));
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDeviceCertification.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDeviceCertification.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDeviceCertification.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDeviceCertification.h 2024-05-30 12:28:40
@@ -0,0 +1,29 @@
+//
+// MTLDeviceCertification.h
+// Metal
+//
+// Copyright (c) 2014-2024 Apple Inc. All rights reserved.
+//
+
+#import <Metal/MTLDefines.h>
+#import <Foundation/Foundation.h>
+
+
+typedef NSInteger NSDeviceCertification NS_TYPED_ENUM API_AVAILABLE(ios(18.0), macos(15.0));
+API_AVAILABLE(ios(18.0), macos(15.0)) extern NSDeviceCertification const NSDeviceCertificationiPhonePerformanceGaming;
+
+typedef NSInteger NSProcessPerformanceProfile NS_TYPED_ENUM API_AVAILABLE(ios(18.0), macos(15.0));
+API_AVAILABLE(ios(18.0), macos(15.0)) extern NSProcessPerformanceProfile const NSProcessPerformanceProfileDefault;
+API_AVAILABLE(ios(18.0), macos(15.0)) extern NSProcessPerformanceProfile const NSProcessPerformanceProfileSustained;
+
+API_AVAILABLE(ios(18.0), macos(15.0)) extern const NSNotificationName NSProcessInfoPerformanceProfileDidChangeNotification;
+
+API_AVAILABLE(ios(18.0), macos(15.0))
+@interface NSProcessInfo (NSDeviceCertification)
+
+- (BOOL)isDeviceCertifiedFor:(NSDeviceCertification)performanceTier;
+
+- (BOOL)hasPerformanceProfile:(NSProcessPerformanceProfile)performanceProfile;
+
+@end
+
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h 2024-04-19 09:55:19
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h 2024-05-30 12:28:40
@@ -30,6 +30,12 @@
* @discussion This flag is required for inspecting and consuming binary archives with specialized MTLFunctions via the metal-source tool. It is not required for recompilation, nor for storing functions in binary archives. Set this flag only if you intend to use metal-source on a serialized binary archive.
*/
MTLFunctionOptionStoreFunctionInMetalScript API_AVAILABLE(macos(14.0), ios(17.0)) = 1 << 1,
+ /**
+ * @brief Function creation fails (i.e nil is returned) if:
+ * - A lookup binary archive has been specified
+ * - The function has not been found in the archive
+ */
+ MTLFunctionOptionFailOnBinaryArchiveMiss API_AVAILABLE(macos(15.0), ios(18.0)) = 1 << 2,
} API_AVAILABLE(macos(11.0), ios(14.0));
MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0))
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionLog.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionLog.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionLog.h 2024-04-19 09:55:19
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionLog.h 2024-05-30 12:28:40
@@ -16,7 +16,7 @@
};
API_AVAILABLE(macos(11.0), ios(14.0))
-@protocol MTLLogContainer <NSFastEnumeration>
+@protocol MTLLogContainer <NSObject, NSFastEnumeration>
@end
API_AVAILABLE(macos(11.0), ios(14.0))
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionStitching.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionStitching.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionStitching.h 2024-04-19 09:55:20
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionStitching.h 2024-05-30 16:35:25
@@ -18,6 +18,28 @@
NS_ASSUME_NONNULL_BEGIN
/*!
+ @abstract
+ A bitfield of options to create a stitched library
+ */
+typedef NS_OPTIONS(NSUInteger, MTLStitchedLibraryOptions)
+{
+ MTLStitchedLibraryOptionNone = 0,
+
+ /**
+ * @brief Library creation fails (i.e nil is returned) if:
+ * - A lookup binary archive has been specified
+ * - The library has not been found in the archive
+ */
+ MTLStitchedLibraryOptionFailOnBinaryArchiveMiss = 1 << 0,
+ /**
+ * @brief stores and tracks this library in a MetalScript
+ * This flag is optional and only supported in the context of binary archives.
+ * @discussion This flag is required for inspecting and consuming binary archives with stitched libraries via the metal-source tool. It is not required for recompilation, nor for storing stitched libraries in binary archives. Set this flag only if you intend to use metal-source on a serialized binary archive.
+ */
+ MTLStitchedLibraryOptionStoreLibraryInMetalScript = 1 << 1,
+} API_AVAILABLE(macos(15.0), ios(18.0));
+
+/*!
@protocol MTLFunctionStitchingAttribute
@abstract An attribute to be applied to the produced stitched function.
*/
@@ -74,7 +96,7 @@
@interface MTLFunctionStitchingGraph : NSObject<NSCopying>
@property (readwrite, copy, nonnull, nonatomic) NSString* functionName;
@property (readwrite, copy, nonnull, nonatomic) NSArray<MTLFunctionStitchingFunctionNode *>* nodes;
-@property (readwrite, copy, nullable, nonatomic) MTLFunctionStitchingFunctionNode* outputNode;
+@property (readwrite, retain, nullable, nonatomic) MTLFunctionStitchingFunctionNode* outputNode;
@property (readwrite, copy, nonnull, nonatomic) NSArray<id<MTLFunctionStitchingAttribute>>* attributes;
- (instancetype)initWithFunctionName:(nonnull NSString*)functionName
nodes:(nonnull NSArray<MTLFunctionStitchingFunctionNode *>*)nodes
@@ -90,6 +112,19 @@
@interface MTLStitchedLibraryDescriptor : NSObject<NSCopying>
@property (readwrite, copy, nonnull, nonatomic) NSArray<MTLFunctionStitchingGraph *>* functionGraphs;
@property (readwrite, copy, nonnull, nonatomic) NSArray<id<MTLFunction>>* functions;
+
+/*!
+@property binaryArchives
+@abstract The array of archives to be searched.
+@discussion Binary archives to be searched for precompiled stitched libraries during the compilation of this library.
+*/
+@property (readwrite, copy, nonnull, nonatomic) NSArray<id<MTLBinaryArchive>>* binaryArchives API_AVAILABLE(macos(15.0), ios(18.0));
+
+/*!
+* @property options
+* @abstract The options to use for this new MTLLibrary.
+*/
+@property (readwrite, nonatomic) MTLStitchedLibraryOptions options API_AVAILABLE(macos(15.0), ios(18.0));
@end
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h 2024-04-08 11:21:58
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h 2024-05-30 10:43:33
@@ -105,7 +106,7 @@
@protocol MTLHeap
*/
API_AVAILABLE(macos(10.13), ios(10.0))
-@protocol MTLHeap <NSObject>
+@protocol MTLHeap <MTLAllocation>
/*!
@property label
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h 2024-04-08 11:21:59
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h 2024-05-30 10:43:33
@@ -193,6 +193,8 @@
(3 << 16) + 0,
MTLLanguageVersion3_1 API_AVAILABLE(macos(14.0), ios(17.0)) =
(3 << 16) + 1,
+ MTLLanguageVersion3_2 API_AVAILABLE(macos(15.0), ios(18.0)) =
+ (3 << 16) + 2,
} API_AVAILABLE(macos(10.11), ios(9.0));
typedef NS_ENUM(NSInteger, MTLLibraryType) {
@@ -223,6 +225,42 @@
MTLCompileSymbolVisibilityHidden = 1,
} API_AVAILABLE(macos(13.3), ios(16.4));
+/*!
+ @enum MTLMathMode
+ @abstract An enum to indicate if the compiler can perform optimizations for floating-point arithmetic that may violate the IEEE 754 standard
+
+ @constant MTLMathModeSafe
+ Disables unsafe floating-point optimizations
+
+ @constant MTLMathModeRelaxed
+ Allows aggressive, unsafe floating-point optimizations but preserves infs and nans
+
+ @constant MTLMathModeFast
+ Allows aggressive, unsafe floating-point optimizations
+ */
+typedef NS_ENUM(NSInteger, MTLMathMode)
+{
+ MTLMathModeSafe = 0,
+ MTLMathModeRelaxed = 1,
+ MTLMathModeFast = 2,
+};
+
+/*!
+ @enum MTLMathFloatingPointFunctions
+ @abstract An enum to indicate the default math functions for single precision floating-point
+
+ @constant MTLMathFloatingPointFunctionsFast
+ Sets the default math functions for single precision floating-point to the corresponding functions in `metal::fast` namespace
+
+ @constant MTLMathFloatingPointFunctionsPrecise
+ Sets the default math functions for single precision floating-point to the corresponding functions in 'metal::precise' namespace
+ */
+typedef NS_ENUM(NSInteger, MTLMathFloatingPointFunctions)
+{
+ MTLMathFloatingPointFunctionsFast = 0,
+ MTLMathFloatingPointFunctionsPrecise = 1,
+};
+
MTL_EXPORT API_AVAILABLE(macos(10.11), ios(8.0))
@interface MTLCompileOptions : NSObject <NSCopying>
@@ -241,8 +279,20 @@
@property fastMathEnabled
@abstract If YES, enables the compiler to perform optimizations for floating-point arithmetic that may violate the IEEE 754 standard. It also enables the high precision variant of math functions for single precision floating-point scalar and vector types. fastMathEnabled defaults to YES.
*/
-@property (readwrite, nonatomic) BOOL fastMathEnabled;
+@property (readwrite, nonatomic) BOOL fastMathEnabled API_DEPRECATED("Use mathMode instead", macos(10.11, 15.0), ios(8.0, 18.0));
+ /*!
+ @property mathMode
+ @abstract Sets the floating-point arithmetic optimizations. Default depends on the language standard version.
+ */
+@property (readwrite, nonatomic) MTLMathMode mathMode API_AVAILABLE(macos(15.0), ios(18.0));
+
+ /*!
+ @property mathFloatingPointFunctions
+ @abstract Sets the default math functions for single precision floating-point. Default is `MTLMathFloatingPointFunctionsFast`.
+ */
+@property (nonatomic) MTLMathFloatingPointFunctions mathFloatingPointFunctions API_AVAILABLE(macos(15.0), ios(18.0));
+
/*!
@property languageVersion
@abstract set the metal language version used to interpret the source.
@@ -315,6 +365,11 @@
*/
@property (readwrite, nonatomic) NSUInteger maxTotalThreadsPerThreadgroup API_AVAILABLE(macos(13.3), ios(16.4));
+/*!
+ @property enableLogging
+ @abstract If YES, set the compiler to enable any logging in the shader. The default is false.
+ */
+@property (readwrite, nonatomic) BOOL enableLogging API_AVAILABLE(macos(15.0), ios(18.0));
@end
/*!
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLogState.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLogState.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLogState.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLogState.h 2024-05-30 12:28:40
@@ -0,0 +1,66 @@
+//
+// MTLLogState.h
+// Metal
+//
+// Copyright © 2024 Apple, Inc. All rights reserved.
+//
+
+#import <Metal/MTLDefines.h>
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+/*!
+ * @enum MTLLogLevel
+ *
+ * @abstract
+ * The level of the log entry.
+ */
+
+typedef NS_ENUM(NSInteger, MTLLogLevel)
+{
+ MTLLogLevelUndefined,
+ MTLLogLevelDebug, // A log level that captures diagnostic information.
+ MTLLogLevelInfo, // The log level that captures additional information.
+ MTLLogLevelNotice, // The log level that captures notifications.
+ MTLLogLevelError, // The log level that captures errors.
+ MTLLogLevelFault, // The log level that captures fault information.
+}
+API_AVAILABLE(macos(15.0), ios(18.0));
+
+API_AVAILABLE(macos(15.0), ios(18.0))
+@protocol MTLLogState <NSObject>
+/*!
+@method addLogHandler
+@abstract addLogHandler is a way to add one or more function blocks to handle log message output.
+Here, developers can create custom filter or add their own ways to obtain logged messages.
+In absence of logHandler, all the log messages will go through default handler
+ */
+- (void)addLogHandler:(void(^)(NSString* __nullable subSystem, NSString* __nullable category, MTLLogLevel logLevel, NSString* message))block;
+@end
+
+MTL_EXPORT API_AVAILABLE(macos(15.0), ios(18.0))
+@interface MTLLogStateDescriptor : NSObject <NSCopying>
+/*!
+@abstract level indicates the minimum level of the logs that will be printed.
+@description All the logs with level less than given level will be skipped on the GPU Side.
+ */
+@property (assign, readwrite) MTLLogLevel level;
+
+/*!
+ * @abstract bufferSize indicates the size of the buffer where GPU will store the logging content from shaders. Minimum value is 1KB
+ */
+@property (assign, readwrite) NSInteger bufferSize;
+@end
+
+API_AVAILABLE(macos(15.0), ios(18.0))
+MTL_EXTERN NSErrorDomain const MTLLogStateErrorDomain;
+/*!
+ @enum
+ @abstract NSErrors raised when creating a logstate.
+ */
+typedef NS_ENUM(NSUInteger, MTLLogStateError) {
+ MTLLogStateErrorInvalidSize = 1,
+ MTLLogStateErrorInvalid = 2
+} API_AVAILABLE(macos(15.0), ios(18.0));
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h 2024-04-19 09:55:19
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h 2024-05-30 12:28:40
@@ -23,6 +23,13 @@
} API_AVAILABLE(macos(10.13), ios(11.0));
+typedef NS_ENUM(NSInteger, MTLShaderValidation)
+{
+ MTLShaderValidationDefault = 0,
+ MTLShaderValidationEnabled = 1,
+ 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_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h 2024-04-19 08:23:52
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h 2024-05-30 09:14:47
@@ -122,14 +122,14 @@
MTLPixelFormatBC7_RGBAUnorm_sRGB API_AVAILABLE(macos(10.11), macCatalyst(13.0), ios(16.4)) = 153,
/* PVRTC */
- MTLPixelFormatPVRTC_RGB_2BPP API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(8.0)) = 160,
- MTLPixelFormatPVRTC_RGB_2BPP_sRGB API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(8.0)) = 161,
- MTLPixelFormatPVRTC_RGB_4BPP API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(8.0)) = 162,
- MTLPixelFormatPVRTC_RGB_4BPP_sRGB API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(8.0)) = 163,
- MTLPixelFormatPVRTC_RGBA_2BPP API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(8.0)) = 164,
- MTLPixelFormatPVRTC_RGBA_2BPP_sRGB API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(8.0)) = 165,
- MTLPixelFormatPVRTC_RGBA_4BPP API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(8.0)) = 166,
- MTLPixelFormatPVRTC_RGBA_4BPP_sRGB API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(8.0)) = 167,
+ MTLPixelFormatPVRTC_RGB_2BPP API_DEPRECATED("Usage of ASTC/ETC2/BC formats is recommended instead.", macos(11.0,15.0), macCatalyst(14.0,18.0), ios(8.0,18.0)) = 160,
+ MTLPixelFormatPVRTC_RGB_2BPP_sRGB API_DEPRECATED("Usage of ASTC/ETC2/BC formats is recommended instead.", macos(11.0,15.0), macCatalyst(14.0,18.0), ios(8.0,18.0)) = 161,
+ MTLPixelFormatPVRTC_RGB_4BPP API_DEPRECATED("Usage of ASTC/ETC2/BC formats is recommended instead.", macos(11.0,15.0), macCatalyst(14.0,18.0), ios(8.0,18.0)) = 162,
+ MTLPixelFormatPVRTC_RGB_4BPP_sRGB API_DEPRECATED("Usage of ASTC/ETC2/BC formats is recommended instead.", macos(11.0,15.0), macCatalyst(14.0,18.0), ios(8.0,18.0)) = 163,
+ MTLPixelFormatPVRTC_RGBA_2BPP API_DEPRECATED("Usage of ASTC/ETC2/BC formats is recommended instead.", macos(11.0,15.0), macCatalyst(14.0,18.0), ios(8.0,18.0)) = 164,
+ MTLPixelFormatPVRTC_RGBA_2BPP_sRGB API_DEPRECATED("Usage of ASTC/ETC2/BC formats is recommended instead.", macos(11.0,15.0), macCatalyst(14.0,18.0), ios(8.0,18.0)) = 165,
+ MTLPixelFormatPVRTC_RGBA_4BPP API_DEPRECATED("Usage of ASTC/ETC2/BC formats is recommended instead.", macos(11.0,15.0), macCatalyst(14.0,18.0), ios(8.0,18.0)) = 166,
+ MTLPixelFormatPVRTC_RGBA_4BPP_sRGB API_DEPRECATED("Usage of ASTC/ETC2/BC formats is recommended instead.", macos(11.0,15.0), macCatalyst(14.0,18.0), ios(8.0,18.0)) = 167,
/* ETC2 */
MTLPixelFormatEAC_R11Unorm API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(8.0)) = 170,
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h 2024-04-19 08:23:51
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h 2024-05-30 12:28:40
@@ -262,6 +262,13 @@
*/
- (void)reset;
+/*!
+ @property shaderValidation
+ @abstract Toggle that determines whether Metal Shader Validation should be enabled or disabled for the pipeline.
+ @discussion The value can be overridden using `MTL_SHADER_VALIDATION_ENABLE_PIPELINES` or `MTL_SHADER_VALIDATION_DISABLE_PIPELINES` Environment Variables.
+ */
+@property (readwrite, nonatomic) MTLShaderValidation shaderValidation API_AVAILABLE(macos(15.0), ios(18.0));
+
@end
MTL_EXPORT API_AVAILABLE(macos(12.0), ios(15.0))
@@ -393,6 +400,12 @@
*/
- (nullable id <MTLRenderPipelineState>)newRenderPipelineStateWithAdditionalBinaryFunctions:(nonnull MTLRenderPipelineFunctionsDescriptor *)additionalBinaryFunctions error:(__autoreleasing NSError **)error API_AVAILABLE(macos(12.0), ios(15.0));
+/*!
+ @property shaderValidation
+ @abstract Current state of Shader Validation for the pipeline.
+ */
+@property (readonly, nonatomic) MTLShaderValidation shaderValidation API_AVAILABLE(macos(15.0), ios(18.0));
+
@end
MTL_EXPORT API_AVAILABLE(macos(10.11), ios(8.0))
@@ -507,6 +520,13 @@
- (void)reset;
+/*!
+ @property shaderValidation
+ @abstract Toggle that determines whether Metal Shader Validation should be enabled or disabled for the pipeline.
+ @discussion The value can be overridden using `MTL_SHADER_VALIDATION_ENABLE_PIPELINES` or `MTL_SHADER_VALIDATION_DISABLE_PIPELINES` Environment Variables.
+ */
+@property (readwrite, nonatomic) MTLShaderValidation shaderValidation API_AVAILABLE(macos(15.0), ios(18.0));
+
@end
@@ -682,7 +702,15 @@
*/
@property (readwrite, nonatomic) BOOL supportIndirectCommandBuffers API_AVAILABLE(macos(14.0), ios(17.0));
+/*!
+ @property binaryArchives
+ @abstract The set of MTLBinaryArchive to search for compiled code when creating the pipeline state.
+ @discussion Accelerate pipeline state creation by providing archives of compiled code such that no compilation needs to happen on the fast path.
+ @see MTLBinaryArchive
+ */
+@property (readwrite, nullable, nonatomic, copy) NSArray<id<MTLBinaryArchive>> *binaryArchives API_AVAILABLE(macos(15.0), ios(18.0));
+
/*!
@property objectLinkedFunctions
@abstract The set of functions to be linked with the pipeline state and accessed from the object function.
@@ -709,6 +737,13 @@
@abstract Restore all mesh pipeline descriptor properties to their default values.
*/
- (void)reset;
+
+/*!
+ @property shaderValidation
+ @abstract Toggle that determines whether Metal Shader Validation should be enabled or disabled for the pipeline.
+ @discussion The value can be overridden using `MTL_SHADER_VALIDATION_ENABLE_PIPELINES` or `MTL_SHADER_VALIDATION_DISABLE_PIPELINES` Environment Variables.
+ */
+@property (readwrite, nonatomic) MTLShaderValidation shaderValidation API_AVAILABLE(macos(15.0), ios(18.0));
@end
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResidencySet.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResidencySet.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResidencySet.h 1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResidencySet.h 2024-05-30 12:28:39
@@ -0,0 +1,141 @@
+//
+// MTLResidencySet.h
+// Framework
+//
+// Copyright © 2023 Apple, Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <Metal/MTLDefines.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@protocol MTLDevice;
+@protocol MTLAllocation;
+@protocol MTLResource;
+@protocol MTLHeap;
+
+/*!
+ @interface MTLResidencySetDescriptor
+ @abstract Specifies the parameters for MTLResidencySet creation.
+ */
+API_AVAILABLE(macos(15.0), ios(18.0))
+@interface MTLResidencySetDescriptor : NSObject<NSCopying>
+/*!
+ @property label
+ @abstract An optional label for the MTLResidencySet.
+ */
+@property (nullable, copy, nonatomic) NSString *label;
+
+/*!
+ @property initialCapacity
+ @abstract If non-zero, defines the number of allocations for which to initialize the internal arrays. Defaults to zero.
+ */
+@property (nonatomic) NSUInteger initialCapacity;
+
+
+@end
+
+/*!
+ @protocol MTLResidencySet
+ @abstract A residency set is responsible for managing resource and heap residency and is referenced
+ by a command buffer or command queue in order to ensure that resources and heaps are resident.
+ Resources and heaps are added and removed uncommitted and a subsequent commit call applies all
+ of the changes in bulk.
+ */
+API_AVAILABLE(macos(15.0), ios(18.0))
+@protocol MTLResidencySet <NSObject>
+/*!
+ @property device
+ @abstract The device that created the residency set
+ */
+@property (readonly) id<MTLDevice> _Nonnull device;
+
+/*!
+ @property label
+ @abstract The label specified at creation.
+ */
+@property (readonly, nullable) NSString* label;
+
+/*!
+ @property allocatedSize
+ @abstract The memory footprint of the set in bytes at the last commit operation. This may include internal allocations as well.
+ */
+@property (readonly) uint64_t allocatedSize;
+
+/*!
+ @method requestResidency
+ @abstract Requests that the set and all the committed resources and heaps are made resident.
+ */
+- (void)requestResidency;
+
+/*!
+ @method endResidency
+ @abstract Requests that the set and all the committed resources and heaps are made non-resident.
+*/
+- (void)endResidency;
+
+/*!
+ @method addAllocation
+ @abstract Adds one allocation to the set, leaving it uncommitted until commit is called.
+ */
+- (void)addAllocation:(id<MTLAllocation>)allocation;
+
+/*!
+ @method addAllocations
+ @abstract Adds allocations to the set, leaving them uncommitted until commit is called.
+ */
+- (void)addAllocations:(const id<MTLAllocation> _Nonnull[_Nonnull])allocations
+ count:(NSUInteger)count;
+
+/*!
+ @method removeAllocation
+ @abstract Marks an allocation to be removed from the set on the next commit call.
+ */
+- (void)removeAllocation:(id<MTLAllocation>)allocation;
+
+/*!
+ @method removeAllocations
+ @abstract Marks allocations to be removed from the set on the next commit call.
+ */
+- (void)removeAllocations:(const id<MTLAllocation> _Nonnull[_Nonnull])allocations
+ count:(NSUInteger)count;
+
+/*!
+ @method removeAllAllocations
+ @abstract Marks all allocations to be removed from the set on the next commit call.
+ */
+- (void)removeAllAllocations;
+
+/*!
+ @method containsAllocation
+ @abstract Returns a boolean indicating whether the allocation is present in the set or not.
+ @discussion This check includes non-committed allocations in the set.
+ */
+- (BOOL)containsAllocation:(id<MTLAllocation>)anAllocation;
+
+/*!
+ @property allAllocations
+ @abstract Array of all allocations associated with the set.
+ @discussion This property includes non-committed allocations in the set.
+ */
+@property (readonly, copy, nonnull) NSArray<id<MTLAllocation>> *allAllocations;
+
+/*!
+ @property allocationCount
+ @abstract Returns the current number of unique allocations present in the set.
+ @discussion This property includes non-committed allocations in the set.
+ */
+@property (readonly) NSUInteger allocationCount;
+
+/*!
+ @method commit
+ @abstract Commits any pending adds/removes.
+ @discussion If the residency set is resident, this will try to make added resources and heaps resident instantly, and make removed resources and heaps non-resident.
+ */
+- (void)commit;
+
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h 2024-04-08 11:21:59
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h 2024-05-30 12:28:41
@@ -195,7 +196,7 @@
@abstract Common APIs available for MTLBuffer and MTLTexture instances
*/
API_AVAILABLE(macos(10.11), ios(8.0))
-@protocol MTLResource <NSObject>
+@protocol MTLResource <MTLAllocation>
/*!
@property label
- README
- xcode13.0 Binding Status
- xcode13.1 Binding Status
- xcode13.2 Binding Status
- xcode13.3 Binding Status
- xcode13.4 Binding Status
- xcode14.0 Binding Status
- xcode14.1 Binding Status
- xcode14.2 Binding Status
- xcode14.3 Binding Status
- xcode15.0 Binding Status
- xcode15.1 Binding Status
- xcode15.3 Binding Status
- xcode15.4 Binding Status
- xcode16.0 Binding Status
- xcode16.1 Binding Status
- xcode16.2 Binding Status