Skip to content

Metal iOS xcode13.0 beta1

Manuel de la Pena edited this page Sep 29, 2021 · 3 revisions

#Metal.framework https://github.com/xamarin/xamarin-macios/pull/12875

diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h	2021-03-16 08:45:51.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h	2021-06-02 12:45:24.000000000 -0400
@@ -14,6 +14,7 @@
 #import <Metal/MTLAccelerationStructureTypes.h>
 #import <Metal/MTLResource.h>
 
+NS_ASSUME_NONNULL_BEGIN
 
 @protocol MTLBuffer;
 @protocol MTLAccelerationStructure;
@@ -35,6 +36,12 @@
      * tracing performance.
      */
     MTLAccelerationStructureUsagePreferFastBuild = (1 << 1),
+
+    /**
+     * @brief Enable extended limits for this acceleration structure, possibly at the cost of
+     * reduced ray tracing performance.
+     */
+    MTLAccelerationStructureUsageExtendedLimits API_AVAILABLE(macos(12.0), ios(15.0)) = (1 << 2),
 } API_AVAILABLE(macos(11.0), ios(14.0));
 
 typedef NS_OPTIONS(uint32_t, MTLAccelerationStructureInstanceOptions) {
@@ -95,20 +102,70 @@
  */
 @property (nonatomic) BOOL allowDuplicateIntersectionFunctionInvocation;
 
+/**
+ * @brief Label
+ */
+@property (nonatomic, retain, nullable) NSString* label API_AVAILABLE(macos(12.0), ios(15.0));
+
 @end
 
 /**
+ * @brief Describes what happens to the object before the first motion key and after the last
+ * motion key.
+ */
+typedef NS_ENUM(uint32_t, MTLMotionBorderMode){
+
+    /**
+     * @brief Motion is stopped. (default)
+     */
+    MTLMotionBorderModeClamp = 0,
+
+    /**
+     * @brief Object disappears
+     */
+    MTLMotionBorderModeVanish = 1
+} API_AVAILABLE(macos(12.0), ios(15.0));
+
+/**
  * @brief Descriptor for a primitive acceleration structure
  */
 MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0))
 @interface MTLPrimitiveAccelerationStructureDescriptor : MTLAccelerationStructureDescriptor
 
 /**
- * @brief Array of geometry descriptors
+ * @brief Array of geometry descriptors. If motionKeyframeCount is greater than one all geometryDescriptors
+ * must be motion versions and have motionKeyframeCount of primitive buffers.
+ */
+@property (nonatomic, retain, nullable) NSArray <MTLAccelerationStructureGeometryDescriptor *> * geometryDescriptors;
+
+/**
+ * @brief Motion border mode describing what happens if acceleration structure is sampled before
+ * motionStartTime. If not set defaults to MTLMotionBorderModeClamp.
+ */
+@property (nonatomic) MTLMotionBorderMode motionStartBorderMode API_AVAILABLE(macos(12.0), ios(15.0));
+
+/**
+ * @brief Motion border mode describing what happens if acceleration structure is sampled after
+ * motionEndTime. If not set defaults to MTLMotionBorderModeClamp.
+ */
+@property (nonatomic) MTLMotionBorderMode motionEndBorderMode API_AVAILABLE(macos(12.0), ios(15.0));
+
+/**
+ * @brief Motion start time of this geometry. If not set defaults to 0.0f.
  */
-@property (nonatomic, retain) NSArray <MTLAccelerationStructureGeometryDescriptor *> * _Nullable geometryDescriptors;
+@property (nonatomic) float motionStartTime API_AVAILABLE(macos(12.0), ios(15.0));
 
-+ (_Nonnull instancetype)descriptor;
+/**
+ * @brief Motion end time of this geometry. If not set defaults to 1.0f.
+ */
+@property (nonatomic) float motionEndTime API_AVAILABLE(macos(12.0), ios(15.0));
+
+/**
+ * @brief Motion keyframe count. Is 1 by default which means no motion.
+ */
+@property (nonatomic) NSUInteger motionKeyframeCount API_AVAILABLE(macos(12.0), ios(15.0));
+
++ (instancetype)descriptor;
 
 @end
 
@@ -122,7 +179,7 @@
  * @brief Vertex buffer containing triangle vertices. Each vertex must consist of three 32-bit floats
  * encoding X, Y, and Z position. Must not be nil.
  */
-@property (nonatomic, retain) id <MTLBuffer> _Nullable vertexBuffer;
+@property (nonatomic, retain, nullable) id <MTLBuffer> vertexBuffer;
 
 /**
  * @brief Vertex buffer offset. Must be a multiple of the vertex stride and must be aligned to the
@@ -139,7 +196,7 @@
 /**
  * Optional index buffer containing references to vertices in the vertex buffer. May be nil.
  */
-@property (nonatomic, retain) id <MTLBuffer> _Nullable indexBuffer;
+@property (nonatomic, retain, nullable) id <MTLBuffer> indexBuffer;
 
 /**
  * @brief Index buffer offset. Must be a multiple of the index data type size and must be aligned to both
@@ -157,7 +214,7 @@
  */
 @property (nonatomic) NSUInteger triangleCount;
 
-+ (_Nonnull instancetype)descriptor;
++ (instancetype)descriptor;
 
 @end
 
@@ -170,7 +227,7 @@
 /**
  * @brief Bounding box buffer containing MTLAxisAlignedBoundingBoxes. Must not be nil.
  */
-@property (nonatomic, retain) id <MTLBuffer> _Nullable boundingBoxBuffer;
+@property (nonatomic, retain, nullable) id <MTLBuffer> boundingBoxBuffer;
 
 /**
  * @brief Bounding box buffer offset. Must be a multiple of the bounding box stride and must be
@@ -189,10 +246,100 @@
  */
 @property (nonatomic) NSUInteger boundingBoxCount;
 
-+ (_Nonnull instancetype)descriptor;
++ (instancetype)descriptor;
+
+@end
+
+/**
+ * @brief MTLbuffer and description how the data is stored in it.
+ */
+MTL_EXPORT API_AVAILABLE(macos(12.0), ios(15.0))
+@interface MTLMotionKeyframeData : NSObject
+
+/**
+ * @brief Buffer containing the data of a single keyframe. Multiple keyframes can be interleaved in one MTLBuffer.
+ */
+@property (nonatomic, retain, nullable) id <MTLBuffer> buffer;
+
+/**
+ * @brief Buffer offset. Must be a multiple of 4 bytes.
+ */
+@property (nonatomic) NSUInteger offset;
+
+
++ (instancetype)data;
+
+@end
+
+/**
+ * @brief Descriptor for motion triangle geometry
+ */
+MTL_EXPORT API_AVAILABLE(macos(12.0), ios(15.0))
+@interface MTLAccelerationStructureMotionTriangleGeometryDescriptor : MTLAccelerationStructureGeometryDescriptor
+
+/**
+ * @brief Vertex buffer containing triangle vertices similar to what MTLAccelerationStructureTriangleGeometryDescriptor has but array of the values.
+ */
+@property (nonatomic, copy) NSArray <MTLMotionKeyframeData *> * vertexBuffers;
+
+/**
+ * @brief Stride, in bytes, between vertices in the vertex buffer. Must be at least 12 bytes and must be a
+ * multiple of 4 bytes. Defaults to 12 bytes.
+ */
+@property (nonatomic) NSUInteger vertexStride;
+
+/**
+ * Optional index buffer containing references to vertices in the vertex buffer. May be nil.
+ */
+@property (nonatomic, retain, nullable) id <MTLBuffer> indexBuffer;
+
+/**
+ * @brief Index buffer offset. Must be a multiple of the index data type size and must be aligned to both
+ * the index data type's alignment and the platform's buffer offset alignment.
+ */
+@property (nonatomic) NSUInteger indexBufferOffset;
+
+/**
+ * @brief Index type
+ */
+@property (nonatomic) MTLIndexType indexType;
+
+/**
+ * @brief Number of triangles
+ */
+@property (nonatomic) NSUInteger triangleCount;
+
++ (instancetype)descriptor;
+
+@end
+
+/**
+ * @brief Descriptor for motion bounding box geometry
+ */
+MTL_EXPORT API_AVAILABLE(macos(12.0), ios(15.0))
+@interface MTLAccelerationStructureMotionBoundingBoxGeometryDescriptor : MTLAccelerationStructureGeometryDescriptor
+
+/**
+ * @brief Bounding box buffer containing MTLAxisAlignedBoundingBoxes similar to what MTLAccelerationStructureBoundingBoxGeometryDescriptor has but array of the values.
+ */
+@property (nonatomic, copy) NSArray <MTLMotionKeyframeData *> * boundingBoxBuffers;
+
+/**
+ * @brief Stride, in bytes, between bounding boxes in the bounding box buffer. Must be at least 24
+ * bytes and must be a multiple of 4 bytes. Defaults to 24 bytes.
+ */
+@property (nonatomic) NSUInteger boundingBoxStride;
+
+/**
+ * @brief Number of bounding boxes
+ */
+@property (nonatomic) NSUInteger boundingBoxCount;
+
++ (instancetype)descriptor;
 
 @end
 
+
 typedef struct {
     /**
      * @brief Transformation matrix describing how to transform the bottom-level acceleration structure.
@@ -218,7 +365,120 @@
      * @brief Acceleration structure index to use for this instance
      */
     uint32_t accelerationStructureIndex;
-} MTLAccelerationStructureInstanceDescriptor;
+} MTLAccelerationStructureInstanceDescriptor API_AVAILABLE(macos(11.0), ios(14.0));
+
+typedef struct {
+    /**
+     * @brief Transformation matrix describing how to transform the bottom-level acceleration structure.
+     */
+    MTLPackedFloat4x3 transformationMatrix;
+
+    /**
+     * @brief Instance options
+     */
+    MTLAccelerationStructureInstanceOptions options;
+
+    /**
+     * @brief Instance mask used to ignore geometry during ray tracing
+     */
+    uint32_t mask;
+
+    /**
+     * @brief Used to index into intersection function tables
+     */
+    uint32_t intersectionFunctionTableOffset;
+
+    /**
+     * @brief Acceleration structure index to use for this instance
+     */
+    uint32_t accelerationStructureIndex;
+
+    /**
+     * @brief User-assigned instance ID to help identify this instance in an
+     * application-defined way
+     */
+    uint32_t userID;
+} MTLAccelerationStructureUserIDInstanceDescriptor API_AVAILABLE(macos(12.0), ios(15.0));
+
+typedef NS_ENUM(NSUInteger, MTLAccelerationStructureInstanceDescriptorType) {
+    /**
+     * @brief Default instance descriptor: MTLAccelerationStructureInstanceDescriptor
+     */
+    MTLAccelerationStructureInstanceDescriptorTypeDefault = 0,
+
+    /**
+     * @brief Instance descriptor with an added user-ID
+     */
+    MTLAccelerationStructureInstanceDescriptorTypeUserID = 1,
+
+    /**
+     * @brief Instance descriptor with support for motion
+     */
+    MTLAccelerationStructureInstanceDescriptorTypeMotion = 2,
+} API_AVAILABLE(macos(12.0), ios(15.0));
+
+typedef struct {
+    /**
+     * @brief Instance options
+     */
+    MTLAccelerationStructureInstanceOptions options;
+
+    /**
+     * @brief Instance mask used to ignore geometry during ray tracing
+     */
+    uint32_t mask;
+
+    /**
+     * @brief Used to index into intersection function tables
+     */
+    uint32_t intersectionFunctionTableOffset;
+
+    /**
+     * @brief Acceleration structure index to use for this instance
+     */
+    uint32_t accelerationStructureIndex;
+
+    /**
+     * @brief User-assigned instance ID to help identify this instance in an
+     * application-defined way
+     */
+    uint32_t userID;
+
+    /**
+     * @brief The index of the first set of transforms describing one keyframe of the animation.
+     * These transforms are stored in a separate buffer and they are uniformly distributed over
+     * time time span of the motion.
+     */
+    uint32_t motionTransformsStartIndex;
+
+    /**
+     * @brief The count of motion transforms belonging to this motion which are stored in consecutive
+     * memory addresses at the separate motionTransforms buffer.
+     */
+    uint32_t motionTransformsCount;
+    /**
+     * @brief Motion border mode describing what happens if acceleration structure is sampled
+     * before motionStartTime
+     */
+    MTLMotionBorderMode motionStartBorderMode;
+
+    /**
+     * @brief Motion border mode describing what happens if acceleration structure is sampled
+     * after motionEndTime
+     */
+    MTLMotionBorderMode motionEndBorderMode;
+
+    /**
+     * @brief Motion start time of this instance
+     */
+    float motionStartTime;
+
+    /**
+     * @brief Motion end time of this instance
+     */
+    float motionEndTime;
+} MTLAccelerationStructureMotionInstanceDescriptor API_AVAILABLE(macos(12.0), ios(15.0));
+
 
 /**
  * @brief Descriptor for an instance acceleration structure
@@ -227,9 +487,9 @@
 @interface MTLInstanceAccelerationStructureDescriptor : MTLAccelerationStructureDescriptor
 
 /**
- * @brief Buffer containing MTLAccelerationStructureInstanceDescriptors
+ * @brief Buffer containing instance descriptors of the type specified by the instanceDescriptorType property
  */
-@property (nonatomic, retain) id <MTLBuffer> _Nullable instanceDescriptorBuffer;
+@property (nonatomic, retain, nullable) id <MTLBuffer> instanceDescriptorBuffer;
 
 /**
  * @brief Offset into the instance descriptor buffer. Must be a multiple of 64 bytes and must be
@@ -239,7 +499,8 @@
 
 /**
  * @brief Stride, in bytes, between instance descriptors in the instance descriptor buffer. Must
- * be at least 64 bytes and must be a multiple of 4 bytes. Defaults to 64 bytes.
+ * be at least the size of the instance descriptor type and must be a multiple of 4 bytes.
+ * Defaults to the size of the instance descriptor type.
  */
 @property (nonatomic) NSUInteger instanceDescriptorStride;
 
@@ -251,9 +512,31 @@
 /**
  * @brief Acceleration structures to be instanced
  */
-@property (nonatomic, retain) NSArray <id <MTLAccelerationStructure>> * _Nullable instancedAccelerationStructures;
+@property (nonatomic, retain, nullable) NSArray <id <MTLAccelerationStructure>> * instancedAccelerationStructures;
+
+/**
+ * @brief Type of instance descriptor in the instance descriptor buffer. Defaults to
+ * MTLAccelerationStructureInstanceDescriptorTypeDefault.
+ */
+@property (nonatomic) MTLAccelerationStructureInstanceDescriptorType instanceDescriptorType API_AVAILABLE(macos(12.0), ios(15.0));
+
+/**
+ * @brief Buffer containing transformation information for motion
+ */
+@property (nonatomic, retain, nullable) id <MTLBuffer> motionTransformBuffer API_AVAILABLE(macos(12.0), ios(15.0));
+
+/**
+ * @brief Offset into the instance motion descriptor buffer. Must be a multiple of 64 bytes and
+ * must be aligned to the platform's buffer offset alignment.
+ */
+@property (nonatomic) NSUInteger motionTransformBufferOffset API_AVAILABLE(macos(12.0), ios(15.0));
+
+/**
+ * @brief Number of motion transforms
+ */
+@property (nonatomic) NSUInteger motionTransformCount API_AVAILABLE(macos(12.0), ios(15.0));
 
-+ (_Nonnull instancetype)descriptor;
++ (instancetype)descriptor;
 
 @end
 
@@ -264,3 +547,5 @@
 
 @end
 
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h	2021-03-16 09:55:39.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h	2021-06-02 12:45:26.000000000 -0400
@@ -24,10 +24,8 @@
 
 /*!
  * @brief Encode an acceleration structure build into the command buffer. All bottom-level acceleration
- * structure builds must have completed before a top-level acceleration structure build may begin. Note
- * that this requires the use of fences and multiple acceleration structure encoders if the acceleration
- * structures are allocated from heaps. The resulting acceleration structure will not retain any
- * references to the input vertex buffer, instance buffer, etc.
+ * structure builds must have completed before a top-level acceleration structure build may begin. The
+ * resulting acceleration structure will not retain any references to the input vertex buffer, instance buffer, etc.
  *
  * The acceleration structure build will not be completed until the command buffer has been committed
  * and finished executing. However, it is safe to encode ray tracing work against the acceleration
@@ -114,6 +112,27 @@
                                          offset:(NSUInteger)offset;
 
 /*!
+ * @brief Compute the compacted size for an acceleration structure and write it into a buffer.
+ *
+ * This size is potentially smaller than the source acceleration structure. To perform compaction,
+ * read this size from the buffer once the command buffer has completed and use it to allocate a
+ * smaller acceleration structure. Then create another encoder and call the 
+ * copyAndCompactAccelerationStructure method.
+ *
+ * @param accelerationStructure Source acceleration structure
+ * @param buffer                Destination size buffer. The compacted size will be written as either
+ *                              a 32 bit or 64 bit value depending on the sizeDataType argument
+ *                              unsigned integer representing the compacted size in bytes.
+ * @param offset                Offset into the size buffer
+ * @param sizeDataType          Data type of the size to write into the buffer. Must be either
+ *                              MTLDataTypeUInt (32 bit) or MTLDataTypeULong (64 bit)
+ */
+- (void)writeCompactedAccelerationStructureSize:(id <MTLAccelerationStructure>)accelerationStructure
+                                       toBuffer:(id <MTLBuffer>)buffer
+                                         offset:(NSUInteger)offset
+                                   sizeDataType:(MTLDataType)sizeDataType API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
  * @brief Copy and compact an acceleration structure. The source and destination acceleration structures
  * must not overlap in memory. If this is a top level acceleration structure, references to bottom level
  * acceleration structures will be preserved.
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h	2021-03-16 08:41:35.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h	2021-05-22 08:07:48.000000000 -0400
@@ -4,6 +4,7 @@
 typedef metal::packed_float3 MTLPackedFloat3;
 #else
 #include <math.h>
+#import <Metal/MTLDefines.h>
 
 typedef struct _MTLPackedFloat3 {
     union {
@@ -35,6 +36,16 @@
     }
 #endif
 } MTLPackedFloat3;
+
+MTL_INLINE MTLPackedFloat3 MTLPackedFloat3Make(float x, float y, float z)
+{
+    MTLPackedFloat3 packedFloat3;
+    packedFloat3.x = x;
+    packedFloat3.y = y;
+    packedFloat3.z = z;
+    return packedFloat3;
+}
+
 #endif
 
 typedef struct _MTLPackedFloat4x3 {
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h	2021-03-16 08:48:44.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h	2021-06-02 12:45:26.000000000 -0400
@@ -91,25 +91,34 @@
     MTLDataTypeSampler API_AVAILABLE(macos(10.13), ios(11.0)) = 59,
     MTLDataTypePointer API_AVAILABLE(macos(10.13), ios(11.0)) = 60,
 
-    MTLDataTypeR8Unorm         API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos) = 62,
-    MTLDataTypeR8Snorm         API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos) = 63,
-    MTLDataTypeR16Unorm        API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos) = 64,
-    MTLDataTypeR16Snorm        API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos) = 65,
-    MTLDataTypeRG8Unorm        API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos) = 66,
-    MTLDataTypeRG8Snorm        API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos) = 67,
-    MTLDataTypeRG16Unorm       API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos) = 68,
-    MTLDataTypeRG16Snorm       API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos) = 69,
-    MTLDataTypeRGBA8Unorm      API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos) = 70,
-    MTLDataTypeRGBA8Unorm_sRGB API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos) = 71,
-    MTLDataTypeRGBA8Snorm      API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos) = 72,
-    MTLDataTypeRGBA16Unorm     API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos) = 73,
-    MTLDataTypeRGBA16Snorm     API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos) = 74,
-    MTLDataTypeRGB10A2Unorm    API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos) = 75,
-    MTLDataTypeRG11B10Float    API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos) = 76,
-    MTLDataTypeRGB9E5Float     API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos) = 77,
+    MTLDataTypeR8Unorm         API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5)) = 62,
+    MTLDataTypeR8Snorm         API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5)) = 63,
+    MTLDataTypeR16Unorm        API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5)) = 64,
+    MTLDataTypeR16Snorm        API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5)) = 65,
+    MTLDataTypeRG8Unorm        API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5)) = 66,
+    MTLDataTypeRG8Snorm        API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5)) = 67,
+    MTLDataTypeRG16Unorm       API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5)) = 68,
+    MTLDataTypeRG16Snorm       API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5)) = 69,
+    MTLDataTypeRGBA8Unorm      API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5)) = 70,
+    MTLDataTypeRGBA8Unorm_sRGB API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5)) = 71,
+    MTLDataTypeRGBA8Snorm      API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5)) = 72,
+    MTLDataTypeRGBA16Unorm     API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5)) = 73,
+    MTLDataTypeRGBA16Snorm     API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5)) = 74,
+    MTLDataTypeRGB10A2Unorm    API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5)) = 75,
+    MTLDataTypeRG11B10Float    API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5)) = 76,
+    MTLDataTypeRGB9E5Float     API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5)) = 77,
     MTLDataTypeRenderPipeline  API_AVAILABLE(macos(10.14), ios(13.0)) = 78,
-    MTLDataTypeComputePipeline API_AVAILABLE(ios(13.0),macos(11.0)) = 79,
+    MTLDataTypeComputePipeline API_AVAILABLE(ios(13.0), macos(11.0)) = 79,
     MTLDataTypeIndirectCommandBuffer   API_AVAILABLE(macos(10.14), ios(12.0)) = 80,
+    MTLDataTypeLong  API_AVAILABLE(macos(12.0), ios(14.0)) = 81,
+    MTLDataTypeLong2 API_AVAILABLE(macos(12.0), ios(14.0)) = 82,
+    MTLDataTypeLong3 API_AVAILABLE(macos(12.0), ios(14.0)) = 83,
+    MTLDataTypeLong4 API_AVAILABLE(macos(12.0), ios(14.0)) = 84,
+
+    MTLDataTypeULong  API_AVAILABLE(macos(12.0), ios(14.0)) = 85,
+    MTLDataTypeULong2 API_AVAILABLE(macos(12.0), ios(14.0)) = 86,
+    MTLDataTypeULong3 API_AVAILABLE(macos(12.0), ios(14.0)) = 87,
+    MTLDataTypeULong4 API_AVAILABLE(macos(12.0), ios(14.0)) = 88,
     MTLDataTypeVisibleFunctionTable API_AVAILABLE(macos(11.0), ios(14.0)) = 115,
     MTLDataTypeIntersectionFunctionTable API_AVAILABLE(macos(11.0), ios(14.0)) = 116,
     MTLDataTypePrimitiveAccelerationStructure API_AVAILABLE(macos(11.0), ios(14.0)) = 117,
@@ -141,8 +150,8 @@
     MTLArgumentTypeTexture = 2,
     MTLArgumentTypeSampler = 3,
 
-    MTLArgumentTypeImageblockData API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos)     = 16,
-    MTLArgumentTypeImageblock API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos)         = 17,
+    MTLArgumentTypeImageblockData API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5))     = 16,
+    MTLArgumentTypeImageblock API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5))         = 17,
     MTLArgumentTypeVisibleFunctionTable API_AVAILABLE(macos(11.0), ios(14.0)) = 24,
     MTLArgumentTypePrimitiveAccelerationStructure API_AVAILABLE(macos(11.0), ios(14.0)) = 25,
     MTLArgumentTypeInstanceAccelerationStructure API_AVAILABLE(macos(11.0), ios(14.0)) = 26,
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h	2021-03-16 08:48:44.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h	2021-06-02 12:48:25.000000000 -0400
@@ -123,13 +123,13 @@
  * @method setComputePipelineState:atIndex
  * @brief Sets a compute pipeline state at a given bind point index
  */
-- (void)setComputePipelineState:(nullable id <MTLComputePipelineState>)pipeline atIndex:(NSUInteger)index API_AVAILABLE(ios(13.0),macos(11.0));
+- (void)setComputePipelineState:(nullable id <MTLComputePipelineState>)pipeline atIndex:(NSUInteger)index API_AVAILABLE(ios(13.0), macos(11.0));
 
 /*!
  * @method setComputePipelineStates:withRange
  * @brief Set an array of compute pipeline states at a given bind point index range
  */
-- (void)setComputePipelineStates:(const id <MTLComputePipelineState> __nullable [__nonnull])pipelines withRange:(NSRange)range API_AVAILABLE(ios(13.0),macos(11.0));
+- (void)setComputePipelineStates:(const id <MTLComputePipelineState> __nullable [__nonnull])pipelines withRange:(NSRange)range API_AVAILABLE(ios(13.0), macos(11.0));
 
 /*!
  * @method setIndirectCommandBuffer:atIndex
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h	2021-03-16 08:45:53.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h	2021-06-02 12:48:25.000000000 -0400
@@ -96,7 +96,7 @@
  @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) addTileRenderPipelineFunctionsWithDescriptor:(MTLTileRenderPipelineDescriptor*)descriptor error:(NSError**)error;
+- (BOOL) addTileRenderPipelineFunctionsWithDescriptor:(MTLTileRenderPipelineDescriptor*)descriptor error:(NSError**)error API_AVAILABLE(tvos(14.5));
 
 /*!
  @method serializeToURL:error:
@@ -108,6 +108,16 @@
  */
 - (BOOL) serializeToURL:(NSURL*)url error:(NSError**)error;
 
+/*!
+ @method addFunctionWithDescriptor:library:error:
+ @abstract Add a `visible` or `intersection` function to the archive.
+ @param descriptor The descriptor from which the function will be added.
+ @param library Library of functions to add the function from.
+ @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. Other possible errors can be file access or I/O related.
+ @return Whether or not the addition succeeded. Functions referenced multiple times are silently accepted.
+ */
+- (BOOL) addFunctionWithDescriptor:(MTLFunctionDescriptor *)descriptor library:(id<MTLLibrary>)library error:(NSError **)error API_AVAILABLE(macos(12.0), ios(15.0));
+
 @end
 
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h	2021-03-16 08:45:51.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h	2021-06-02 12:48:23.000000000 -0400
@@ -105,7 +105,6 @@
  */
 - (void)fillBuffer:(id<MTLBuffer>)buffer range:(NSRange)range value:(uint8_t)value;
 
-
 /*!
  @method copyFromTexture:sourceSlice:sourceLevel:toTexture:destinationSlice:destinationLevel:sliceCount:levelCount:
  @abstract Copy whole surfaces between textures.
@@ -209,10 +208,10 @@
 
 
 /*!
- @method resetCommandsInBuffer:buffer:withRange:
+ @method resetCommandsInBuffer:withRange:
  @abstract reset commands in a indirect command buffer using the GPU
  */
-- (void) resetCommandsInBuffer: (id<MTLIndirectCommandBuffer>)buffer withRange:(NSRange)range API_AVAILABLE(macos(10.14), ios(12.0));
+- (void) resetCommandsInBuffer:(id<MTLIndirectCommandBuffer>)buffer withRange:(NSRange)range API_AVAILABLE(macos(10.14), ios(12.0));
 
 /*!
  @method copyIndirectCommandBuffer:source:sourceRange:destination:destinationIndex
@@ -222,7 +221,7 @@
                       destination:(id <MTLIndirectCommandBuffer>)destination destinationIndex:(NSUInteger)destinationIndex API_AVAILABLE(macos(10.14), ios(12.0));
 
 /*!
- @method optimizeIndirectCommandBuffer:indirectCommandBuffer:range:
+ @method optimizeIndirectCommandBuffer:withRange:
  @abstract Optimizes a subset of the texture data to ensure the best possible performance when accessing content on the CPU at the expense of GPU-access performance.
  */
 - (void)optimizeIndirectCommandBuffer:(id <MTLIndirectCommandBuffer>)indirectCommandBuffer withRange:(NSRange)range API_AVAILABLE(macos(10.14), ios(12.0));
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitPass.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitPass.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitPass.h	2021-03-16 08:48:45.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitPass.h	2021-06-02 12:48:26.000000000 -0400
@@ -10,13 +10,11 @@
 
 #import <Metal/MTLTypes.h>
 
+#import <Metal/MTLCounters.h>
+
 NS_ASSUME_NONNULL_BEGIN
 @protocol MTLDevice;
 
-@protocol MTLCounterSampleBuffer;
-#define MTLCounterDontSample ((NSUInteger)-1)
-#define MTLMaxBlitPassSampleBuffers 4
-
 MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0))
 @interface MTLBlitPassSampleBufferAttachmentDescriptor : NSObject<NSCopying>
 /*!
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h	2021-03-16 08:48:43.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h	2021-06-02 12:48:24.000000000 -0400
@@ -78,7 +78,7 @@
  @constant MTLCommandBufferErrorPageFault
  Execution of this command buffer generated an unserviceable GPU page fault. This can caused by buffer read write attribute mismatch or out of boundary access.
  
- @constant MTLCommandBufferErrorBlacklisted
+ @constant MTLCommandBufferErrorAccessRevoked
  Access to this device has been revoked because this client has been responsible for too many timeouts or hangs.
  
  @constant MTLCommandBufferErrorNotPermitted
@@ -95,6 +95,9 @@
  
  @constant MTLCommandBufferErrorDeviceRemoved
  The device was physically removed before the command could finish execution
+
+ @constant MTLCommandBufferErrorStackOverflow
+ Execution of the command buffer was stopped due to Stack Overflow Exception. [MTLComputePipelineDescriptor maxCallStackDepth] setting needs to be checked.
  */
 
 typedef NS_ENUM(NSUInteger, MTLCommandBufferError)
@@ -103,12 +106,14 @@
     MTLCommandBufferErrorInternal = 1,
     MTLCommandBufferErrorTimeout = 2,
     MTLCommandBufferErrorPageFault = 3,
-    MTLCommandBufferErrorBlacklisted = 4,
+    MTLCommandBufferErrorBlacklisted = 4, // Deprecated. Please use MTLCommandBufferErrorAccessRevoked.
+    MTLCommandBufferErrorAccessRevoked = 4,
     MTLCommandBufferErrorNotPermitted = 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,
+    MTLCommandBufferErrorStackOverflow API_AVAILABLE(macos(12.0), ios(15.0)) = 12,
 } API_AVAILABLE(macos(10.11), ios(8.0));
 
 /*!
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h	2021-03-16 08:45:51.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h	2021-06-02 12:48:23.000000000 -0400
@@ -159,7 +159,7 @@
  @method setImageblockWidth:height:
  @brief Set imageblock sizes.
  */
-- (void)setImageblockWidth:(NSUInteger)width height:(NSUInteger)height API_AVAILABLE(ios(11.0), macos(11.0), macCatalyst(14.0)) API_UNAVAILABLE(tvos);
+- (void)setImageblockWidth:(NSUInteger)width height:(NSUInteger)height API_AVAILABLE(ios(11.0), macos(11.0), macCatalyst(14.0), tvos(14.5));
 
 /*
  @method setStageInRegion:region:
@@ -194,7 +194,7 @@
  @abstract Enqueue a compute function dispatch using an arbitrarily-sized grid.
  @discussion threadsPerGrid does not have to be a multiple of the  threadGroup size
  */
-- (void)dispatchThreads:(MTLSize)threadsPerGrid threadsPerThreadgroup:(MTLSize)threadsPerThreadgroup API_AVAILABLE(macos(10.13), ios(11.0)) API_UNAVAILABLE(tvos);
+- (void)dispatchThreads:(MTLSize)threadsPerGrid threadsPerThreadgroup:(MTLSize)threadsPerThreadgroup API_AVAILABLE(macos(10.13), ios(11.0), tvos(14.5));
 
 /*!
  @method updateFence:
@@ -252,7 +252,7 @@
  * @abstract Execute commands in the buffer within the range specified.
  * @discussion The same indirect command buffer may be executed any number of times within the same encoder.
  */
-- (void)executeCommandsInBuffer:(id<MTLIndirectCommandBuffer>)indirectCommandBuffer withRange:(NSRange)executionRange API_AVAILABLE(ios(13.0),macos(11.0));
+- (void)executeCommandsInBuffer:(id<MTLIndirectCommandBuffer>)indirectCommandBuffer withRange:(NSRange)executionRange API_AVAILABLE(ios(13.0), macos(11.0));
 
 /*!
  * @method executeCommandsInBuffer:indirectBuffer:indirectBufferOffset:
@@ -261,7 +261,7 @@
  * @param indirectBufferOffset The byte offset within indirectBuffer where the execution range parameter is located. Must be a multiple of 4 bytes.
  * @discussion The same indirect command buffer may be executed any number of times within the same encoder.
  */
-- (void)executeCommandsInBuffer:(id<MTLIndirectCommandBuffer>)indirectCommandbuffer indirectBuffer:(id<MTLBuffer>)indirectRangeBuffer indirectBufferOffset:(NSUInteger)indirectBufferOffset API_AVAILABLE(ios(13.0),macos(11.0));
+- (void)executeCommandsInBuffer:(id<MTLIndirectCommandBuffer>)indirectCommandbuffer indirectBuffer:(id<MTLBuffer>)indirectRangeBuffer indirectBufferOffset:(NSUInteger)indirectBufferOffset API_AVAILABLE(ios(13.0), macos(11.0));
 
 
 
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePass.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePass.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePass.h	2021-03-16 08:48:45.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePass.h	2021-06-02 12:48:26.000000000 -0400
@@ -11,13 +11,12 @@
 
 #import <Metal/MTLTypes.h>
 #import <Metal/MTLCommandBuffer.h>
+
+#import <Metal/MTLCounters.h>
+
 NS_ASSUME_NONNULL_BEGIN
 @protocol MTLDevice;
 
-@protocol MTLCounterSampleBuffer;
-#define MTLCounterDontSample ((NSUInteger)-1)
-#define MTLMaxComputePassSampleBuffers 4
-
 MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0))
 @interface MTLComputePassSampleBufferAttachmentDescriptor : NSObject<NSCopying>
 /*!
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h	2021-03-16 08:48:45.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h	2021-06-02 11:08:14.000000000 -0400
@@ -70,7 +70,7 @@
  @property supportIndirectCommandBuffers
  @abstract This flag makes this pipeline usable with indirect command buffers.
  */
-@property (readwrite, nonatomic) BOOL supportIndirectCommandBuffers API_AVAILABLE(ios(13.0),macos(11.0));
+@property (readwrite, nonatomic) BOOL supportIndirectCommandBuffers API_AVAILABLE(ios(13.0), macos(11.0));
 
 /*!
  @property insertLibraries
@@ -80,7 +80,17 @@
  It can also be used to provide dynamic libraries that are dynamically created (for example, from source) that have no stable installName that can be used to automatically load from the file system.
  @see MTLDynamicLibrary
  */
-@property (readwrite, nullable, nonatomic, copy) NSArray<id<MTLDynamicLibrary>>* insertLibraries API_AVAILABLE(macos(11.0), ios(14.0));
+@property (readwrite, nullable, nonatomic, copy) NSArray<id<MTLDynamicLibrary>>* insertLibraries API_DEPRECATED_WITH_REPLACEMENT("Use preloadedLibraries instead.", macos(11.0, 12.0), ios(14.0, 15.0));
+
+/*!
+ @property preloadedLibraries
+ @abstract The set of MTLDynamicLibrary to use to resolve external symbols before considering symbols from dependent MTLDynamicLibrary.
+ @discussion Typical workflows use the libraries property of MTLCompileOptions to record dependent libraries at compile time without having to use preloadedLibraries.
+ This property can be used to override symbols from dependent libraries for experimentation or evaluating alternative implementations.
+ It can also be used to provide dynamic libraries that are dynamically created (for example, from source) that have no stable installName that can be used to automatically load from the file system.
+ @see MTLDynamicLibrary
+ */
+@property (readwrite, nonnull, nonatomic, copy) NSArray<id<MTLDynamicLibrary>>* preloadedLibraries API_AVAILABLE(macos(12.0), ios(15.0));
 
 /*!
  @property binaryArchives
@@ -98,6 +108,11 @@
 - (void)reset;
 
 
+/*!
+ @property linkedFunctions
+ @abstract The set of functions to be linked with the pipeline state and accessed from the compute function. 
+ @see MTLLinkedFunctions
+ */
 @property (nullable, copy, nonatomic) MTLLinkedFunctions *linkedFunctions
     API_AVAILABLE(macos(11.0), ios(14.0));
 
@@ -162,24 +177,39 @@
  @method imageblockMemoryLengthForDimensions:
  @brief Returns imageblock memory length for given image block dimensions.
  */
-- (NSUInteger)imageblockMemoryLengthForDimensions:(MTLSize)imageblockDimensions API_AVAILABLE(ios(11.0), macos(11.0), macCatalyst(14.0)) API_UNAVAILABLE(tvos);
+- (NSUInteger)imageblockMemoryLengthForDimensions:(MTLSize)imageblockDimensions API_AVAILABLE(ios(11.0), macos(11.0), macCatalyst(14.0), tvos(14.5));
 
 
 /*!
  @property supportIndirectCommandBuffers
  @abstract Tells whether this pipeline state is usable through an Indirect Command Buffer.
  */
-@property (readonly) BOOL supportIndirectCommandBuffers API_AVAILABLE(ios(13.0),macos(11.0));
+@property (readonly) BOOL supportIndirectCommandBuffers API_AVAILABLE(ios(13.0), macos(11.0));
 
 
+/*!
+ @method functionHandleWithFunction:
+ @brief Get the function handle for the specified function from the pipeline state.
+ */
 - (nullable id<MTLFunctionHandle>)functionHandleWithFunction:(id<MTLFunction>)function API_AVAILABLE(macos(11.0), ios(14.0));
 
 
-
+/*!
+ @method newRenderPipelineStateWithAdditionalBinaryFunctions:stage:
+ @brief Allocate a new compute pipeline state by adding binary functions to this pipeline state.
+ */
 - (nullable id <MTLComputePipelineState>)newComputePipelineStateWithAdditionalBinaryFunctions:(nonnull NSArray<id<MTLFunction>> *)functions error:(__autoreleasing NSError **)error API_AVAILABLE(macos(11.0), ios(14.0));
 
+/*!
+ @method newVisibleFunctionTableWithDescriptor:
+ @brief Allocate a visible function table for the pipeline with the provided descriptor.
+ */
 - (nullable id<MTLVisibleFunctionTable>)newVisibleFunctionTableWithDescriptor:(MTLVisibleFunctionTableDescriptor * __nonnull)descriptor API_AVAILABLE(macos(11.0), ios(14.0));
 
+/*!
+ @method newIntersectionFunctionTableWithDescriptor:
+ @brief Allocate an intersection function table for the pipeline with the provided descriptor.
+ */
 - (nullable id <MTLIntersectionFunctionTable>)newIntersectionFunctionTableWithDescriptor:(MTLIntersectionFunctionTableDescriptor * _Nonnull)descriptor API_AVAILABLE(macos(11.0), ios(14.0));
 
 
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCounters.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCounters.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCounters.h	2021-03-16 09:55:41.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCounters.h	2021-06-02 05:36:29.000000000 -0400
@@ -17,6 +17,7 @@
 NS_ASSUME_NONNULL_BEGIN
 
 #define MTLCounterErrorValue ((uint64_t)-1)
+#define MTLCounterDontSample ((NSUInteger)-1)
 
 /*!
  @enum MTLCommonCounter
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h	2021-03-16 08:48:42.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h	2021-06-02 12:48:23.000000000 -0400
@@ -66,6 +66,7 @@
 @class MTLVisibleFunctionTableDescriptor;
 @protocol MTLIntersectionFunctionTable;
 @class MTLIntersectionFunctionTableDescriptor;
+@class MTLStitchedLibraryDescriptor;
 
 /*!
  @brief Returns a reference to the preferred system default Metal device.
@@ -260,10 +261,10 @@
 typedef void (^MTLNewLibraryCompletionHandler)(id <MTLLibrary> __nullable library, NSError * __nullable error);
 
 typedef void (^MTLNewRenderPipelineStateCompletionHandler)(id <MTLRenderPipelineState> __nullable renderPipelineState, NSError * __nullable error);
-typedef void (^MTLNewRenderPipelineStateWithReflectionCompletionHandler)(id <MTLRenderPipelineState> __nullable renderPipelineState, MTLRenderPipelineReflection * __nullable reflection, NSError * __nullable error);
+typedef void (^MTLNewRenderPipelineStateWithReflectionCompletionHandler)(id <MTLRenderPipelineState> __nullable renderPipelineState, MTLRenderPipelineReflection * _Nullable_result reflection, NSError * __nullable error);
 
 typedef void (^MTLNewComputePipelineStateCompletionHandler)(id <MTLComputePipelineState> __nullable computePipelineState, NSError * __nullable error);
-typedef void (^MTLNewComputePipelineStateWithReflectionCompletionHandler)(id <MTLComputePipelineState> __nullable computePipelineState, MTLComputePipelineReflection * __nullable reflection, NSError * __nullable error);
+typedef void (^MTLNewComputePipelineStateWithReflectionCompletionHandler)(id <MTLComputePipelineState> __nullable computePipelineState, MTLComputePipelineReflection * _Nullable_result reflection, NSError * __nullable error);
 
 
 /*!
@@ -619,6 +620,12 @@
 - (void)newLibraryWithSource:(NSString *)source options:(nullable MTLCompileOptions *)options completionHandler:(MTLNewLibraryCompletionHandler)completionHandler;
 
 /*!
+ @method newLibraryWithDescriptor:error:
+ @abstract Returns a library generated using the graphs in the descriptor.
+ */
+- (nullable id <MTLLibrary>)newLibraryWithDescriptor:(MTLStitchedLibraryDescriptor *)descriptor error:(__autoreleasing NSError **)error API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
  @method newRenderPipelineStateWithDescriptor:error:
  @abstract Create and compile a new MTLRenderPipelineState object synchronously.
  */
@@ -720,14 +727,14 @@
  @method newRenderPipelineStateWithTileDescriptor:options:reflection:error:
  @abstract Create and compile a new MTLRenderPipelineState object synchronously given a MTLTileRenderPipelineDescriptor.
  */
-- (nullable id <MTLRenderPipelineState>)newRenderPipelineStateWithTileDescriptor:(MTLTileRenderPipelineDescriptor*)descriptor options:(MTLPipelineOption)options reflection:(MTLAutoreleasedRenderPipelineReflection * __nullable)reflection error:(__autoreleasing NSError **)error API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+- (nullable id <MTLRenderPipelineState>)newRenderPipelineStateWithTileDescriptor:(MTLTileRenderPipelineDescriptor*)descriptor options:(MTLPipelineOption)options reflection:(MTLAutoreleasedRenderPipelineReflection * __nullable)reflection error:(__autoreleasing NSError **)error API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 
 /*!
  @method newRenderPipelineStateWithTileDescriptor:options:completionHandler:
  @abstract Create and compile a new MTLRenderPipelineState object asynchronously given a MTLTileRenderPipelineDescriptor.
  */
-- (void)newRenderPipelineStateWithTileDescriptor:(MTLTileRenderPipelineDescriptor *)descriptor options:(MTLPipelineOption)options completionHandler:(MTLNewRenderPipelineStateWithReflectionCompletionHandler)completionHandler API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+- (void)newRenderPipelineStateWithTileDescriptor:(MTLTileRenderPipelineDescriptor *)descriptor options:(MTLPipelineOption)options completionHandler:(MTLNewRenderPipelineStateWithReflectionCompletionHandler)completionHandler API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 /*!
  @property maxThreadgroupMemoryLength
@@ -908,12 +915,19 @@
 
 /*!
  @property supportsDynamicLibraries
- @abstract Query device support for compiling dynamic libraries.
- @return BOOL value. If YES, the device supports compiling dynamic libraries. If NO, the devices does not.
+ @abstract Query device support for creating and using dynamic libraries in a compute pipeline.
+ @return BOOL value. If YES, the device supports creating and using dynamic libraries in a compute pipeline. If NO, the device does not.
  */
 @property(readonly) BOOL supportsDynamicLibraries API_AVAILABLE(macos(11.0), ios(14.0));
 
 /*!
+ @property supportsRenderDynamicLibraries
+ @abstract Query device support for creating and using dynamic libraries in render pipeline stages.
+ @return BOOL value. If YES, the device supports creating and using dynamic libraries in render pipeline stages. If NO, the device does not.
+ */
+@property (readonly) BOOL supportsRenderDynamicLibraries API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
  @method newDynamicLibrary:error:
  @abstract Creates a MTLDynamicLibrary by compiling the code in a MTLLibrary.
  @see MTLDynamicLibrary
@@ -943,6 +957,11 @@
 - (nullable id<MTLBinaryArchive>) newBinaryArchiveWithDescriptor:(MTLBinaryArchiveDescriptor*)descriptor
                                                            error:(NSError**)error API_AVAILABLE(macos(11.0), ios(14.0));
 
+/*!
+@property supportsRaytracing
+@abstract Query device support for using ray tracing from compute pipelines.
+@return BOOL value. If YES, the device supports ray tracing from compute pipelines. If NO, the device does not.
+*/
 @property (readonly) BOOL supportsRaytracing API_AVAILABLE(macos(11.0), ios(14.0));
 
 - (MTLAccelerationStructureSizes)accelerationStructureSizesWithDescriptor:(MTLAccelerationStructureDescriptor *)descriptor API_AVAILABLE(macos(11.0), ios(14.0));
@@ -950,8 +969,26 @@
 - (nullable id <MTLAccelerationStructure>)newAccelerationStructureWithSize:(NSUInteger)size API_AVAILABLE(macos(11.0), ios(14.0));
 - (nullable id <MTLAccelerationStructure>)newAccelerationStructureWithDescriptor:(MTLAccelerationStructureDescriptor *)descriptor API_AVAILABLE(macos(11.0), ios(14.0));
 
+/*!
+ @property supportsFunctionPointers
+ @abstract Query device support for using function pointers from compute pipelines.
+ @return BOOL value. If YES, the device supports function pointers from compute pipelines. If NO, the device does not.
+ */
 @property (readonly) BOOL supportsFunctionPointers API_AVAILABLE(macos(11.0), ios(14.0));
 
+/*!
+ @property supportsFunctionPointersFromRender
+ @abstract Query device support for using function pointers from render pipeline stages.
+ @return BOOL value. If YES, the device supports function pointers from render pipeline stages. If NO, the device does not.
+ */
+@property (readonly) BOOL supportsFunctionPointersFromRender API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @property supportsRaytracingFromRender
+ @abstract Query device support for using ray tracing from render pipeline stages.
+ @return BOOL value. If YES, the device supports ray tracing from render pipeline stages. If NO, the device does not.
+ */
+@property (readonly) BOOL supportsRaytracingFromRender API_AVAILABLE(macos(12.0), ios(15.0));
 
 @end
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDynamicLibrary.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDynamicLibrary.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDynamicLibrary.h	2021-03-16 08:48:43.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDynamicLibrary.h	2021-06-02 12:48:24.000000000 -0400
@@ -34,12 +34,12 @@
  Otherwise, as a fallback, the MTLLibrary contents used to create the MTLDynamicLibrary are compiled for the current device similar to path #1 above.
  This path may also be taken if the driver for the current device has been updated or has otherwise become incompatible with the compiled code.
  Either way, if a MTLDynamicLibrary is successfully created, it contains compiled code for the current device.
- That code may be used via MTLComputePipelineDescriptor .insertLibraries to allow the code to be loaded into a MTLComputePipelineState
+ That code may be used via MTLComputePipelineDescriptor .preloadedLibraries to allow the code to be loaded into a MTLComputePipelineState
  It may also be used as an argument to MTLCompileOptions .libraries so that another MTLLibrary is linked against the code in this MTLDynamicLibrary.
  Such library dependencies are encoded into the resulting MTLLibrary by embedding the install name of the MTLDynamicLibrary.
  When creating a MTLComputePipelineState from a function in that MTLLibrary, the embedded install names are used to load MTLDynamicLibrary instances via path #2 (possibly falling back to #1 as well).
  If an embedded install name could not be used to load a MTLDynamicLibrary from the path indicated by the install name, the creation of the MTLComputePipelineState fails.
- The set of both the implictly loaded MTLDynamicLibrary and the MTLDynamicLibrary specified with .insertLibraries are used to resolve any unresolved symbols in the source MTLLibrary (or in other MTLDynamicLibrary).
+ The set of both the implictly loaded MTLDynamicLibrary and the MTLDynamicLibrary specified with .preloadedLibraries are used to resolve any unresolved symbols in the source MTLLibrary (or in other MTLDynamicLibrary).
  If any unresolved symbols remain after searching the set, the creation of the MTLComputePipelineState fails.
  Otherwise, the MTLComputePipelineState creation succeeds, and the set of MTLDynamicLibraries used are retained by the MTLComputePipelineState.
  */
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h	2021-03-16 08:48:43.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h	2021-06-02 12:48:24.000000000 -0400
@@ -11,6 +11,7 @@
 #import <Metal/MTLArgument.h>
 #import <Metal/MTLFunctionConstantValues.h>
 
+@protocol MTLBinaryArchive;
 
 typedef NS_OPTIONS(NSUInteger, MTLFunctionOptions) {
     /**
@@ -58,6 +59,12 @@
 */
 @property (nonatomic) MTLFunctionOptions options;
 
+/*!
+@property binaryArchives
+@abstract The array of archives to be searched.
+@discussion Binary archives to be searched for precompiled functions during the compilation of this function.
+*/
+@property (readwrite, nullable, nonatomic, copy) NSArray<id<MTLBinaryArchive>> *binaryArchives API_AVAILABLE(macos(12.0), ios(15.0));
 
 @end
 
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionLog.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionLog.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionLog.h	2021-03-16 08:48:43.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionLog.h	2021-06-02 12:48:24.000000000 -0400
@@ -5,9 +5,6 @@
 //  Copyright © 2020 Apple, Inc. All rights reserved.
 //
 
-#ifndef MTLFunctionLog_h
-#define MTLFunctionLog_h
-
 #import <Metal/MTLTypes.h>
 
 @protocol MTLFunction;
@@ -38,7 +35,3 @@
 @property (readonly, nullable, nonatomic) id<MTLFunctionLogDebugLocation> debugLocation;
 @end
 
-
-
-
-#endif /* MTLFunctionLog_h */
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionStitching.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionStitching.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionStitching.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionStitching.h	2021-06-02 12:48:25.000000000 -0400
@@ -0,0 +1,96 @@
+//
+//  MTLFunctionStitching.h
+//  Framework
+//
+//  Copyright © 2021 Apple, Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <Metal/MTLDefines.h>
+#import <Metal/MTLResource.h>
+#import <Metal/MTLArgument.h>
+
+
+#import <Metal/MTLFunctionDescriptor.h>
+
+@protocol MTLFunction;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ @protocol MTLFunctionStitchingAttribute
+ @abstract An attribute to be applied to the produced stitched function.
+*/
+API_AVAILABLE(macos(12.0), ios(15.0))
+@protocol MTLFunctionStitchingAttribute <NSObject>
+@end
+
+/*!
+ @interface MTLFunctionStitchingAttributeAlwaysInline
+ @abstract Applies the `__attribute__((always_inline))` attribute to the produced stitched function.
+ */
+MTL_EXPORT API_AVAILABLE(macos(12.0), ios(15.0))
+@interface MTLFunctionStitchingAttributeAlwaysInline : NSObject<MTLFunctionStitchingAttribute>
+@end
+
+/*!
+ @protocol MTLFunctionStitchingNode
+ @abstract A node used in a graph for stitching.
+*/
+API_AVAILABLE(macos(12.0), ios(15.0))
+@protocol MTLFunctionStitchingNode <NSObject, NSCopying>
+@end
+
+/*!
+ @interface MTLFunctionStitchingInputNode
+ @abstract An indexed input node of the produced stitched function.
+ */
+MTL_EXPORT API_AVAILABLE(macos(12.0), ios(15.0))
+@interface MTLFunctionStitchingInputNode : NSObject<MTLFunctionStitchingNode>
+@property (readwrite, nonatomic) NSUInteger argumentIndex;
+- (instancetype)initWithArgumentIndex:(NSUInteger)argument;
+@end
+
+/*!
+ @interface MTLFunctionStitchingFunctionNode
+ @abstract A function node that calls the specified function with arguments and ordering determined by data and control dependencies.
+ */
+MTL_EXPORT API_AVAILABLE(macos(12.0), ios(15.0))
+@interface MTLFunctionStitchingFunctionNode : NSObject<MTLFunctionStitchingNode>
+@property (readwrite, copy, nonnull, nonatomic) NSString* name;
+@property (readwrite, copy, nonnull, nonatomic) NSArray<id<MTLFunctionStitchingNode>>* arguments;
+@property (readwrite, copy, nonnull, nonatomic) NSArray<MTLFunctionStitchingFunctionNode *>* controlDependencies;
+- (instancetype)initWithName:(nonnull NSString*)name
+                   arguments:(nonnull NSArray<id<MTLFunctionStitchingNode>>*)arguments
+         controlDependencies:(nonnull NSArray<MTLFunctionStitchingFunctionNode *>*)controlDependencies;
+@end
+
+/*!
+ @interface MTLFunctionStitchingGraph
+ @abstract A function graph that describes a directed acyclic graph.
+ @discussion The return value of the output node will be used as the return value for the final stitched graph.
+ */
+MTL_EXPORT API_AVAILABLE(macos(12.0), ios(15.0))
+@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, copy, nonnull, nonatomic) NSArray<id<MTLFunctionStitchingAttribute>>* attributes;
+- (instancetype)initWithFunctionName:(nonnull NSString*)functionName
+                               nodes:(nonnull NSArray<MTLFunctionStitchingFunctionNode *>*)nodes
+                          outputNode:(nullable MTLFunctionStitchingFunctionNode*)outputNode
+                          attributes:(nonnull NSArray<id<MTLFunctionStitchingAttribute>>*)attributes;
+@end
+
+/*!
+ @interface MTLStitchedLibraryDescriptor
+ @abstract A container for the graphs and functions needed to create the stitched functions described by the graphs.
+ */
+MTL_EXPORT API_AVAILABLE(macos(12.0), ios(15.0))
+@interface MTLStitchedLibraryDescriptor : NSObject<NSCopying>
+@property (readwrite, copy, nonnull, nonatomic) NSArray<MTLFunctionStitchingGraph *>* functionGraphs;
+@property (readwrite, copy, nonnull, nonatomic) NSArray<id<MTLFunction>>* functions;
+@end
+
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h	2021-03-16 08:48:44.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h	2021-06-02 12:48:25.000000000 -0400
@@ -19,12 +19,12 @@
 typedef NS_OPTIONS(NSUInteger, MTLIndirectCommandType) {
     MTLIndirectCommandTypeDraw                = (1 << 0),
     MTLIndirectCommandTypeDrawIndexed         = (1 << 1),
-    MTLIndirectCommandTypeDrawPatches         API_UNAVAILABLE(tvos) = (1 << 2),
-    MTLIndirectCommandTypeDrawIndexedPatches  API_UNAVAILABLE(tvos) = (1 << 3) ,
+    MTLIndirectCommandTypeDrawPatches         API_AVAILABLE(tvos(14.5)) = (1 << 2),
+    MTLIndirectCommandTypeDrawIndexedPatches  API_AVAILABLE(tvos(14.5)) = (1 << 3) ,
 
-    MTLIndirectCommandTypeConcurrentDispatch  API_AVAILABLE(ios(13.0),macos(11.0)) = (1 << 5), /* Dispatch threadgroups with concurrent execution */
+    MTLIndirectCommandTypeConcurrentDispatch  API_AVAILABLE(ios(13.0), macos(11.0)) = (1 << 5), /* Dispatch threadgroups with concurrent execution */
 
-     MTLIndirectCommandTypeConcurrentDispatchThreads  API_AVAILABLE(ios(13.0),macos(11.0)) = (1 << 6), /* Dispatch threads with concurrent execution */
+    MTLIndirectCommandTypeConcurrentDispatchThreads  API_AVAILABLE(ios(13.0), macos(11.0)) = (1 << 6), /* Dispatch threads with concurrent execution */
 } API_AVAILABLE(macos(10.14), ios(12.0));
 
 
@@ -86,8 +86,7 @@
  @absract
  The maximum bind index of kernel (or tile) argument buffers that can be set per command.
  */
-@property (readwrite, nonatomic) NSUInteger maxKernelBufferBindCount API_AVAILABLE(ios(13.0),macos(11.0));
-
+@property (readwrite, nonatomic) NSUInteger maxKernelBufferBindCount API_AVAILABLE(ios(13.0), macos(11.0));
 
 @end
 
@@ -100,7 +99,7 @@
 -(void)resetWithRange:(NSRange)range;
 
 - (id <MTLIndirectRenderCommand>)indirectRenderCommandAtIndex:(NSUInteger)commandIndex;
-- (id <MTLIndirectComputeCommand>)indirectComputeCommandAtIndex:(NSUInteger)commandIndex API_AVAILABLE(ios(13.0),macos(11.0));
+- (id <MTLIndirectComputeCommand>)indirectComputeCommandAtIndex:(NSUInteger)commandIndex API_AVAILABLE(ios(13.0), macos(11.0));
 
 @end
 
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h	2021-03-16 08:48:44.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h	2021-06-02 12:48:25.000000000 -0400
@@ -25,7 +25,7 @@
 
 - (void)        drawPatches:(NSUInteger)numberOfPatchControlPoints patchStart:(NSUInteger)patchStart patchCount:(NSUInteger)patchCount patchIndexBuffer:(nullable id <MTLBuffer>)patchIndexBuffer
      patchIndexBufferOffset:(NSUInteger)patchIndexBufferOffset instanceCount:(NSUInteger)instanceCount baseInstance:(NSUInteger)baseInstance
-   tessellationFactorBuffer:(id <MTLBuffer>)buffer tessellationFactorBufferOffset:(NSUInteger)offset tessellationFactorBufferInstanceStride:(NSUInteger)instanceStride API_UNAVAILABLE(tvos);
+   tessellationFactorBuffer:(id <MTLBuffer>)buffer tessellationFactorBufferOffset:(NSUInteger)offset tessellationFactorBufferInstanceStride:(NSUInteger)instanceStride API_AVAILABLE(tvos(14.5));
 
 
 
@@ -33,19 +33,20 @@
     patchIndexBufferOffset:(NSUInteger)patchIndexBufferOffset controlPointIndexBuffer:(id <MTLBuffer>)controlPointIndexBuffer
 controlPointIndexBufferOffset:(NSUInteger)controlPointIndexBufferOffset instanceCount:(NSUInteger)instanceCount
               baseInstance:(NSUInteger)baseInstance tessellationFactorBuffer:(id <MTLBuffer>)buffer
-tessellationFactorBufferOffset:(NSUInteger)offset tessellationFactorBufferInstanceStride:(NSUInteger)instanceStride API_UNAVAILABLE(tvos);
+tessellationFactorBufferOffset:(NSUInteger)offset tessellationFactorBufferInstanceStride:(NSUInteger)instanceStride API_AVAILABLE(tvos(14.5));
 
 - (void)drawPrimitives:(MTLPrimitiveType)primitiveType vertexStart:(NSUInteger)vertexStart vertexCount:(NSUInteger)vertexCount instanceCount:(NSUInteger)instanceCount baseInstance:(NSUInteger)baseInstance;
 - (void)drawIndexedPrimitives:(MTLPrimitiveType)primitiveType indexCount:(NSUInteger)indexCount indexType:(MTLIndexType)indexType indexBuffer:(id <MTLBuffer>)indexBuffer indexBufferOffset:(NSUInteger)indexBufferOffset instanceCount:(NSUInteger)instanceCount baseVertex:(NSInteger)baseVertex baseInstance:(NSUInteger)baseInstance;
 
+
 - (void)reset;
 
 
 @end
 
-API_AVAILABLE(ios(13.0),macos(11.0))
+API_AVAILABLE(ios(13.0), macos(11.0))
 @protocol MTLIndirectComputeCommand <NSObject>
-- (void)setComputePipelineState:(id <MTLComputePipelineState>)pipelineState API_AVAILABLE(ios(13.0),macos(11.0));
+- (void)setComputePipelineState:(id <MTLComputePipelineState>)pipelineState API_AVAILABLE(ios(13.0), macos(11.0));
 
 - (void)setKernelBuffer:(id <MTLBuffer>)buffer offset:(NSUInteger)offset atIndex:(NSUInteger)index;
 
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h	2021-03-16 08:45:53.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h	2021-06-02 12:48:26.000000000 -0400
@@ -186,7 +186,7 @@
     MTLLanguageVersion2_1 API_AVAILABLE(macos(10.14), ios(12.0)) = (2 << 16) + 1,
     MTLLanguageVersion2_2 API_AVAILABLE(macos(10.15), ios(13.0)) = (2 << 16) + 2,
     MTLLanguageVersion2_3 API_AVAILABLE(macos(11.0), ios(14.0)) = (2 << 16) + 3,
-
+    MTLLanguageVersion2_4 API_AVAILABLE(macos(12.0), ios(15.0)) = (2 << 16) + 4,
 } API_AVAILABLE(macos(10.11), ios(9.0));
 
 typedef NS_ENUM(NSInteger, MTLLibraryType) {
@@ -251,7 +251,7 @@
  @abstract A set of MTLDynamicLibrary instances to link against.
  The installName of the provided MTLDynamicLibrary is embedded into the compilation result.
  When a function from the resulting MTLLibrary is used (either as an MTLFunction, or as an to create a pipeline state, the embedded install names are used to automatically load the MTLDynamicLibrary instances.
- This property can be null if no libraries should be automatically loaded, either because the MTLLibrary has no external dependencies, or because you will use insertLibraries to specify the libraries to use at pipeline creation time.
+ This property can be null if no libraries should be automatically loaded, either because the MTLLibrary has no external dependencies, or because you will use preloadedLibraries to specify the libraries to use at pipeline creation time.
 */
 @property (readwrite, nullable, copy, nonatomic) NSArray<id<MTLDynamicLibrary>> *libraries API_AVAILABLE(macos(11.0), ios(14.0));
 
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLinkedFunctions.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLinkedFunctions.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLinkedFunctions.h	2021-03-16 08:48:42.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLinkedFunctions.h	2021-06-02 12:48:23.000000000 -0400
@@ -13,7 +13,12 @@
 
 @protocol MTLFunction;
 
-MTL_EXTERN API_AVAILABLE(macos(11.0), ios(14.0))
+/*!
+ @class MTLLinkedFunctions
+ @abstract A class to set functions to be linked.
+ @discussion All functions set on this object must have unique names.
+ */
+MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0))
 @interface MTLLinkedFunctions : NSObject <NSCopying>
 
 /*!
@@ -41,5 +46,13 @@
 */
 @property (readwrite, nonatomic, copy, nullable) NSDictionary<NSString*, NSArray<id<MTLFunction>>*> *groups;
 
+/*!
+@property privateFunctions
+@abstract The array of functions to be AIR linked.
+@discussion These functions are not exported by the pipeline state as MTLFunctionHandle objects.
+ Function pointer support is not required to link private functions.
+*/
+@property (readwrite, nonatomic, copy, nullable) NSArray<id<MTLFunction>> *privateFunctions API_AVAILABLE(macos(12.0), ios(15.0));
+
 @end
 
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRasterizationRate.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRasterizationRate.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRasterizationRate.h	2021-03-16 08:48:42.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRasterizationRate.h	2021-06-02 12:48:23.000000000 -0400
@@ -71,9 +71,15 @@
 
 /*!
  @property sampleCount
- @return The number of quality samples that this descriptor contains, for the horizontal and vertical axis. The depth component of the returned MTLSize is always 0.
+ @return The number of quality samples that this descriptor uses to describe its current function, for the horizontal and vertical axis. The depth component of the returned MTLSize is always 0.
  */
-@property (readonly, nonatomic) MTLSize sampleCount;
+@property (readonly, nonatomic) MTLSize sampleCount API_AVAILABLE(macos(10.15.4), ios(13.0), macCatalyst(13.4));
+
+/*!
+ @property maxSampleCount
+ @return The maximum number of quality samples that this descriptor can use to describe its function, for the horizontal and vertical axis, this is the sampleCount that the descriptor was initialized with. The depth component of the returned MTLSize is always 0.
+ */
+@property (readonly, nonatomic) MTLSize maxSampleCount API_AVAILABLE(macos(12.0), ios(15.0));
 
 /*!
  @property horizontalSampleStorage
@@ -106,6 +112,15 @@
 @property (readonly, nonatomic) MTLRasterizationRateSampleArray* vertical;
 @end
 
+@interface MTLRasterizationRateLayerDescriptor()
+/*!
+ @property sampleCount
+ @abstract This declaration adds a setter to the previously (prior to macOS 12.0 and iOS 15.0) read-only property.
+ @discussion Setting a value (must be <= maxSampleCount) to allow MTLRasterizationRateLayerDescriptor to be re-used with a different number of samples without having to be recreated.
+ */
+@property (readwrite, nonatomic) MTLSize sampleCount API_AVAILABLE(macos(12.0), ios(15.0));
+@end
+
 /*!
  @interface MTLRasterizationRateLayerArray
  @abstract Mutable array of MTLRasterizationRateLayerDescriptor
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h	2021-03-16 08:48:43.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h	2021-06-02 12:45:25.000000000 -0400
@@ -108,7 +108,8 @@
 } MTLTriangleTessellationFactorsHalf;
 
 /*!
- @abstract Points at which a fence may be waited on or signaled.
+ @abstract Generic render stage enum
+ @brief Can also be used for points at which a fence may be waited on or signaled.
  @constant MTLRenderStageVertex   All vertex work prior to rasterization has completed.
  @constant MTLRenderStageFragment All rendering work has completed.
  */
@@ -116,6 +117,7 @@
 {
     MTLRenderStageVertex   = (1UL << 0),
     MTLRenderStageFragment = (1UL << 1),
+    MTLRenderStageTile API_AVAILABLE(macos(12.0), ios(15.0)) = (1UL << 2),
 } API_AVAILABLE(macos(10.13), ios(10.0));
 
 /*!
@@ -195,6 +197,36 @@
 - (void)setVertexSamplerStates:(const id <MTLSamplerState> __nullable [__nonnull])samplers lodMinClamps:(const float [__nonnull])lodMinClamps lodMaxClamps:(const float [__nonnull])lodMaxClamps withRange:(NSRange)range;
 
 /*!
+ @method setVertexVisibleFunctionTable:atBufferIndex:
+ @brief Set a global visible function table for all vertex shaders at the given buffer bind point index.
+ */
+- (void)setVertexVisibleFunctionTable:(nullable id <MTLVisibleFunctionTable>)functionTable atBufferIndex:(NSUInteger)bufferIndex API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @method setVertexVisibleFunctionTables:withBufferRange:
+ @brief Set an array of global visible function tables for all vertex shaders with the given buffer bind point range.
+ */
+- (void)setVertexVisibleFunctionTables:(const id <MTLVisibleFunctionTable> __nullable [__nonnull])functionTables withBufferRange:(NSRange)range API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @method setVertexIntersectionFunctionTable:atBufferIndex:
+ @brief Set a global intersection function table for all vertex shaders at the given buffer bind point index.
+ */
+- (void)setVertexIntersectionFunctionTable:(nullable id <MTLIntersectionFunctionTable>)intersectionFunctionTable atBufferIndex:(NSUInteger)bufferIndex API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @method setVertexIntersectionFunctionTables:withBufferRange:
+ @brief Set an array of global intersection function tables for all vertex shaders with the given buffer bind point range.
+ */
+- (void)setVertexIntersectionFunctionTables:(const id <MTLIntersectionFunctionTable> __nullable [__nonnull])intersectionFunctionTable withBufferRange:(NSRange)range API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @method setVertexAccelerationStructure:atBufferIndex:
+ @brief Set a global acceleration structure for all vertex shaders at the given buffer bind point index.
+ */
+- (void)setVertexAccelerationStructure:(nullable id <MTLAccelerationStructure>)accelerationStructure atBufferIndex:(NSUInteger)bufferIndex API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
  @method setViewport:
  @brief Set the viewport, which is used to transform vertexes from normalized device coordinates to window coordinates.  Fragments that lie outside of the viewport are clipped, and optionally clamped for fragments outside of znear/zfar.
  */
@@ -205,7 +237,7 @@
  @method setViewports:
  @brief Specifies an array of viewports, which are used to transform vertices from normalized device coordinates to window coordinates based on [[ viewport_array_index ]] value specified in the vertex shader.
  */
-- (void)setViewports:(const MTLViewport [__nonnull])viewports count:(NSUInteger)count API_AVAILABLE(macos(10.13), ios(12.0)) API_UNAVAILABLE(tvos);
+- (void)setViewports:(const MTLViewport [__nonnull])viewports count:(NSUInteger)count API_AVAILABLE(macos(10.13), ios(12.0), tvos(14.5));
 
 /*!
  @method setFrontFacingWinding:
@@ -251,7 +283,7 @@
  @method setScissorRects:
  @brief Specifies an array of rectangles for a fragment scissor test. The specific rectangle used is based on the [[ viewport_array_index ]] value output by the vertex shader. Fragments that lie outside the scissor rectangle are discarded.
  */
-- (void)setScissorRects:(const MTLScissorRect [__nonnull])scissorRects count:(NSUInteger)count API_AVAILABLE(macos(10.13), ios(12.0)) API_UNAVAILABLE(tvos);
+- (void)setScissorRects:(const MTLScissorRect [__nonnull])scissorRects count:(NSUInteger)count API_AVAILABLE(macos(10.13), ios(12.0), tvos(14.5));
 
 /*!
  @method setTriangleFillMode:
@@ -321,6 +353,35 @@
  */
 - (void)setFragmentSamplerStates:(const id <MTLSamplerState> __nullable [__nonnull])samplers lodMinClamps:(const float [__nonnull])lodMinClamps lodMaxClamps:(const float [__nonnull])lodMaxClamps withRange:(NSRange)range;
 
+/*!
+ @method setFragmentVisibleFunctionTable:atBufferIndex:
+ @brief Set a global visible function table for all fragment shaders at the given buffer bind point index.
+ */
+- (void)setFragmentVisibleFunctionTable:(nullable id <MTLVisibleFunctionTable>)functionTable atBufferIndex:(NSUInteger)bufferIndex API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @method setFragmentVisibleFunctionTables:withBufferRange:
+ @brief Set an array of global visible function tables for all fragment shaders with the given buffer bind point range.
+ */
+- (void)setFragmentVisibleFunctionTables:(const id <MTLVisibleFunctionTable> __nullable [__nonnull])functionTables withBufferRange:(NSRange)range API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @method setFragmentIntersectionFunctionTable:atBufferIndex:
+ @brief Set a global intersection function table for all fragment shaders at the given buffer bind point index.
+ */
+- (void)setFragmentIntersectionFunctionTable:(nullable id <MTLIntersectionFunctionTable>)intersectionFunctionTable atBufferIndex:(NSUInteger)bufferIndex API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @method setFragmentIntersectionFunctionTables:withBufferRange:
+ @brief Set an array of global intersection function tables for all fragment shaders with the given buffer bind point range.
+ */
+- (void)setFragmentIntersectionFunctionTables:(const id <MTLIntersectionFunctionTable> __nullable [__nonnull])intersectionFunctionTable withBufferRange:(NSRange)range API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @method setFragmentAccelerationStructure:atBufferIndex:
+ @brief Set a global acceleration structure for all fragment shaders at the given buffer bind point index.
+ */
+- (void)setFragmentAccelerationStructure:(nullable id <MTLAccelerationStructure>)accelerationStructure atBufferIndex:(NSUInteger)bufferIndex API_AVAILABLE(macos(12.0), ios(15.0));
 
 /* Constant Blend Color */
 /*!
@@ -519,24 +580,24 @@
 
 -(void)drawPatches:(NSUInteger)numberOfPatchControlPoints patchStart:(NSUInteger)patchStart patchCount:(NSUInteger)patchCount patchIndexBuffer:(nullable id <MTLBuffer>)patchIndexBuffer patchIndexBufferOffset:(NSUInteger)patchIndexBufferOffset instanceCount:(NSUInteger)instanceCount baseInstance:(NSUInteger)baseInstance API_AVAILABLE(macos(10.12), ios(10.0));
 
--(void)drawPatches:(NSUInteger)numberOfPatchControlPoints patchIndexBuffer:(nullable id <MTLBuffer>)patchIndexBuffer patchIndexBufferOffset:(NSUInteger)patchIndexBufferOffset indirectBuffer:(id <MTLBuffer>)indirectBuffer indirectBufferOffset:(NSUInteger)indirectBufferOffset API_AVAILABLE(macos(10.12), ios(12.0)) API_UNAVAILABLE(tvos);
+-(void)drawPatches:(NSUInteger)numberOfPatchControlPoints patchIndexBuffer:(nullable id <MTLBuffer>)patchIndexBuffer patchIndexBufferOffset:(NSUInteger)patchIndexBufferOffset indirectBuffer:(id <MTLBuffer>)indirectBuffer indirectBufferOffset:(NSUInteger)indirectBufferOffset API_AVAILABLE(macos(10.12), ios(12.0), tvos(14.5));
 
 -(void)drawIndexedPatches:(NSUInteger)numberOfPatchControlPoints patchStart:(NSUInteger)patchStart patchCount:(NSUInteger)patchCount patchIndexBuffer:(nullable id <MTLBuffer>)patchIndexBuffer patchIndexBufferOffset:(NSUInteger)patchIndexBufferOffset controlPointIndexBuffer:(id <MTLBuffer>)controlPointIndexBuffer controlPointIndexBufferOffset:(NSUInteger)controlPointIndexBufferOffset instanceCount:(NSUInteger)instanceCount baseInstance:(NSUInteger)baseInstance API_AVAILABLE(macos(10.12), ios(10.0));
 
--(void)drawIndexedPatches:(NSUInteger)numberOfPatchControlPoints patchIndexBuffer:(nullable id <MTLBuffer>)patchIndexBuffer patchIndexBufferOffset:(NSUInteger)patchIndexBufferOffset controlPointIndexBuffer:(id <MTLBuffer>)controlPointIndexBuffer controlPointIndexBufferOffset:(NSUInteger)controlPointIndexBufferOffset indirectBuffer:(id <MTLBuffer>)indirectBuffer indirectBufferOffset:(NSUInteger)indirectBufferOffset API_AVAILABLE(macos(10.12), ios(12.0)) API_UNAVAILABLE(tvos);
+-(void)drawIndexedPatches:(NSUInteger)numberOfPatchControlPoints patchIndexBuffer:(nullable id <MTLBuffer>)patchIndexBuffer patchIndexBufferOffset:(NSUInteger)patchIndexBufferOffset controlPointIndexBuffer:(id <MTLBuffer>)controlPointIndexBuffer controlPointIndexBufferOffset:(NSUInteger)controlPointIndexBufferOffset indirectBuffer:(id <MTLBuffer>)indirectBuffer indirectBufferOffset:(NSUInteger)indirectBufferOffset API_AVAILABLE(macos(10.12), ios(12.0), tvos(14.5));
 
 /*!
  @property tileWidth:
  @abstract The width of the tile for this render pass.
  */
-@property (readonly) NSUInteger tileWidth API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+@property (readonly) NSUInteger tileWidth API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 
 /*!
  @property tileHeight:
  @abstract The height of the tile for this render pass.
  */
-@property (readonly) NSUInteger tileHeight API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+@property (readonly) NSUInteger tileHeight API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 /* Tile Resources */
 
@@ -544,74 +605,105 @@
  @method setTileBytes:length:atIndex:
  @brief Set the data (by copy) for a given tile buffer binding point.  This will remove any existing MTLBuffer from the binding point.
  */
-- (void)setTileBytes:(const void *)bytes length:(NSUInteger)length atIndex:(NSUInteger)index API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+- (void)setTileBytes:(const void *)bytes length:(NSUInteger)length atIndex:(NSUInteger)index API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 /*!
  @method setTileBuffer:offset:atIndex:
  @brief Set a global buffer for all tile shaders at the given bind point index.
  */
-- (void)setTileBuffer:(nullable id <MTLBuffer>)buffer offset:(NSUInteger)offset atIndex:(NSUInteger)index API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+- (void)setTileBuffer:(nullable id <MTLBuffer>)buffer offset:(NSUInteger)offset atIndex:(NSUInteger)index API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 /*!
  @method setTileBufferOffset:atIndex:
  @brief Set the offset within the current global buffer for all tile shaders at the given bind point index.
  */
-- (void)setTileBufferOffset:(NSUInteger)offset atIndex:(NSUInteger)index API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+- (void)setTileBufferOffset:(NSUInteger)offset atIndex:(NSUInteger)index API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 /*!
  @method setTileBuffers:offsets:withRange:
  @brief Set an array of global buffers for all tile shaders with the given bind point range.
  */
-- (void)setTileBuffers:(const id <MTLBuffer> __nullable [__nonnull])buffers offsets:(const NSUInteger [__nonnull])offsets withRange:(NSRange)range API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+- (void)setTileBuffers:(const id <MTLBuffer> __nullable [__nonnull])buffers offsets:(const NSUInteger [__nonnull])offsets withRange:(NSRange)range API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 /*!
  @method setTileTexture:atIndex:
  @brief Set a global texture for all tile shaders at the given bind point index.
  */
-- (void)setTileTexture:(nullable id <MTLTexture>)texture atIndex:(NSUInteger)index API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+- (void)setTileTexture:(nullable id <MTLTexture>)texture atIndex:(NSUInteger)index API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 /*!
  @method setTileTextures:withRange:
  @brief Set an array of global textures for all tile shaders with the given bind point range.
  */
-- (void)setTileTextures:(const id <MTLTexture> __nullable [__nonnull])textures withRange:(NSRange)range API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+- (void)setTileTextures:(const id <MTLTexture> __nullable [__nonnull])textures withRange:(NSRange)range API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 /*!
  @method setTileSamplerState:atIndex:
  @brief Set a global sampler for all tile shaders at the given bind point index.
  */
-- (void)setTileSamplerState:(nullable id <MTLSamplerState>)sampler atIndex:(NSUInteger)index API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+- (void)setTileSamplerState:(nullable id <MTLSamplerState>)sampler atIndex:(NSUInteger)index API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 /*!
  @method setTileSamplerStates:withRange:
  @brief Set an array of global samplers for all fragment shaders with the given bind point range.
  */
-- (void)setTileSamplerStates:(const id <MTLSamplerState> __nullable [__nonnull])samplers withRange:(NSRange)range API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+- (void)setTileSamplerStates:(const id <MTLSamplerState> __nullable [__nonnull])samplers withRange:(NSRange)range API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 /*!
  @method setTileSamplerState:lodMinClamp:lodMaxClamp:atIndex:
  @brief Set a global sampler for all tile shaders at the given bind point index.
  */
-- (void)setTileSamplerState:(nullable id <MTLSamplerState>)sampler lodMinClamp:(float)lodMinClamp lodMaxClamp:(float)lodMaxClamp atIndex:(NSUInteger)index API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+- (void)setTileSamplerState:(nullable id <MTLSamplerState>)sampler lodMinClamp:(float)lodMinClamp lodMaxClamp:(float)lodMaxClamp atIndex:(NSUInteger)index API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 
 /*!
  @method setTileSamplerStates:lodMinClamps:lodMaxClamps:withRange:
  @brief Set an array of global samplers for all tile shaders with the given bind point range.
  */
-- (void)setTileSamplerStates:(const id <MTLSamplerState> __nullable [__nonnull])samplers lodMinClamps:(const float [__nonnull])lodMinClamps lodMaxClamps:(const float [__nonnull])lodMaxClamps withRange:(NSRange)range API_AVAILABLE(ios(11.0), macos(11.0), macCatalyst(14.0)) API_UNAVAILABLE(tvos);
+- (void)setTileSamplerStates:(const id <MTLSamplerState> __nullable [__nonnull])samplers lodMinClamps:(const float [__nonnull])lodMinClamps lodMaxClamps:(const float [__nonnull])lodMaxClamps withRange:(NSRange)range API_AVAILABLE(ios(11.0), tvos(14.5), macos(11.0), macCatalyst(14.0));
+
+/*!
+ @method setTileVisibleFunctionTable:atBufferIndex:
+ @brief Set a global visible function table for all tile shaders at the given buffer bind point index.
+ */
+- (void)setTileVisibleFunctionTable:(nullable id <MTLVisibleFunctionTable>)functionTable atBufferIndex:(NSUInteger)bufferIndex API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @method setTileVisibleFunctionTables:withBufferRange:
+ @brief Set an array of global visible function tables for all tile shaders with the given buffer bind point range.
+ */
+- (void)setTileVisibleFunctionTables:(const id <MTLVisibleFunctionTable> __nullable [__nonnull])functionTables withBufferRange:(NSRange)range API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @method setTileIntersectionFunctionTable:atBufferIndex:
+ @brief Set a global intersection function table for all tile shaders at the given buffer bind point index.
+ */
+- (void)setTileIntersectionFunctionTable:(nullable id <MTLIntersectionFunctionTable>)intersectionFunctionTable atBufferIndex:(NSUInteger)bufferIndex
+    API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @method setTileIntersectionFunctionTables:withBufferRange:
+ @brief Set an array of global intersection function tables for all tile shaders with the given buffer bind point range.
+ */
+- (void)setTileIntersectionFunctionTables:(const id <MTLIntersectionFunctionTable> __nullable [__nonnull])intersectionFunctionTable withBufferRange:(NSRange)range API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @method setTileAccelerationStructure:atBufferIndex:
+ @brief Set a global acceleration structure for all tile shaders at the given buffer bind point index.
+ */
+- (void)setTileAccelerationStructure:(nullable id <MTLAccelerationStructure>)accelerationStructure atBufferIndex:(NSUInteger)bufferIndex API_AVAILABLE(macos(12.0), ios(15.0));
 
 /*!
  @method dispatchThreadsPerTile:
  @brief dispatch threads to perform a mid-render compute operation.
  */
-- (void)dispatchThreadsPerTile:(MTLSize)threadsPerTile API_AVAILABLE(macos(11.0), macCatalyst(14.0)) API_UNAVAILABLE(tvos);
+- (void)dispatchThreadsPerTile:(MTLSize)threadsPerTile API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 /*!
  @method setThreadgroupMemoryLength:offset:atIndex:
  @brief Set the size of the threadgroup memory argument at the given bind point index and offset.
  */
-- (void)setThreadgroupMemoryLength:(NSUInteger)length offset:(NSUInteger)offset atIndex:(NSUInteger)index API_AVAILABLE(macos(11.0), macCatalyst(14.0)) API_UNAVAILABLE(tvos);
+- (void)setThreadgroupMemoryLength:(NSUInteger)length offset:(NSUInteger)offset atIndex:(NSUInteger)index API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 
 /*!
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h	2021-03-16 09:55:40.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h	2021-06-02 12:45:26.000000000 -0400
@@ -14,13 +14,11 @@
 
 #import <Metal/MTLTypes.h>
 
+#import <Metal/MTLCounters.h>
+
 NS_ASSUME_NONNULL_BEGIN
 @protocol MTLDevice;
 
-@protocol MTLCounterSampleBuffer;
-#define MTLCounterDontSample ((NSUInteger)-1)
-#define MTLMaxRenderPassSampleBuffers 4
-
 typedef NS_ENUM(NSUInteger, MTLLoadAction) {
     MTLLoadActionDontCare = 0,
     MTLLoadActionLoad = 1,
@@ -187,7 +185,7 @@
      @abstract The stencil sample corresponding to whichever depth sample is selected by the depth resolve filter. If depth resolve is not enabled, the stencil sample is chosen based on what a depth resolve filter would have selected.
      */
     MTLMultisampleStencilResolveFilterDepthResolvedSample   = 1,
-} API_AVAILABLE(macos(10.14), ios(12.0)) API_UNAVAILABLE(tvos);
+} API_AVAILABLE(macos(10.14), ios(12.0), tvos(14.5));
 
 
 
@@ -204,7 +202,7 @@
  @property stencilResolveFilter
  @abstract The filter to be used for stencil multisample resolve. Defaults to MTLMultisampleStencilResolveFilterSample0.
  */
-@property (nonatomic) MTLMultisampleStencilResolveFilter stencilResolveFilter API_AVAILABLE(macos(10.14), ios(12.0)) API_UNAVAILABLE(tvos);
+@property (nonatomic) MTLMultisampleStencilResolveFilter stencilResolveFilter API_AVAILABLE(macos(10.14), ios(12.0), tvos(14.5));
 
 @end
 
@@ -309,54 +307,54 @@
  @property renderTargetArrayLength:
  @abstract The number of active layers
  */
-@property (nonatomic) NSUInteger renderTargetArrayLength API_AVAILABLE(macos(10.11), ios(12.0)) API_UNAVAILABLE(tvos);
+@property (nonatomic) NSUInteger renderTargetArrayLength API_AVAILABLE(macos(10.11), ios(12.0), tvos(14.5));
 
 
 /*!
  @property imageblockSampleLength:
  @abstract The per sample size in bytes of the largest explicit imageblock layout in the renderPass.
  */
-@property (nonatomic) NSUInteger imageblockSampleLength API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+@property (nonatomic) NSUInteger imageblockSampleLength API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 /*!
  @property threadgroupMemoryLength:
  @abstract The per tile size in bytes of the persistent threadgroup memory allocation.
  */
-@property (nonatomic) NSUInteger threadgroupMemoryLength API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+@property (nonatomic) NSUInteger threadgroupMemoryLength API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 /*!
  @property tileWidth:
  @abstract The width in pixels of the tile.
  @discssion Defaults to 0. Zero means Metal chooses a width that fits within the local memory.
  */
-@property (nonatomic) NSUInteger tileWidth API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+@property (nonatomic) NSUInteger tileWidth API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 /*!
  @property tileHeight:
  @abstract The height in pixels of the tile.
  @discssion Defaults to 0. Zero means Metal chooses a height that fits within the local memory.
  */
-@property (nonatomic) NSUInteger tileHeight API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+@property (nonatomic) NSUInteger tileHeight API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 /*!
  @property defaultRasterSampleCount:
  @abstract The raster sample count for the render pass when no attachments are given.
  */
-@property (nonatomic) NSUInteger defaultRasterSampleCount API_AVAILABLE(ios(11.0), macos(10.15), macCatalyst(13.0)) API_UNAVAILABLE(tvos);
+@property (nonatomic) NSUInteger defaultRasterSampleCount API_AVAILABLE(ios(11.0), tvos(14.5), macos(10.15), macCatalyst(13.0));
 
 /*!
  @property renderTargetWidth:
  @abstract The width in pixels to constrain the render target to.
  @discussion Defaults to 0. If non-zero the value must be smaller than or equal to the minimum width of all attachments.
  */
-@property (nonatomic) NSUInteger renderTargetWidth API_AVAILABLE(ios(11.0), macos(10.15), macCatalyst(13.0)) API_UNAVAILABLE(tvos);
+@property (nonatomic) NSUInteger renderTargetWidth API_AVAILABLE(ios(11.0), tvos(14.5), macos(10.15), macCatalyst(13.0));
 
 /*!
  @property renderTargetHeight:
  @abstract The height in pixels to constrain the render target to.
  @discussion Defaults to 0. If non-zero the value must be smaller than or equal to the minimum height of all attachments.
  */
-@property (nonatomic) NSUInteger renderTargetHeight API_AVAILABLE(ios(11.0), macos(10.15), macCatalyst(13.0)) API_UNAVAILABLE(tvos);
+@property (nonatomic) NSUInteger renderTargetHeight API_AVAILABLE(ios(11.0), tvos(14.5), macos(10.15), macCatalyst(13.0));
 
 /*!
  @method setSamplePositions:count:
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h	2021-03-16 08:45:51.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h	2021-06-02 12:48:24.000000000 -0400
@@ -15,6 +15,9 @@
 #import <Metal/MTLPipeline.h>
 
 
+#import <Metal/MTLLinkedFunctions.h>
+#import <Metal/MTLFunctionHandle.h>
+
 NS_ASSUME_NONNULL_BEGIN
 @class MTLVertexDescriptor;
 
@@ -130,7 +133,7 @@
 
 @property (nullable, readonly) NSArray <MTLArgument *> *vertexArguments;
 @property (nullable, readonly) NSArray <MTLArgument *> *fragmentArguments;
-@property (nullable, readonly) NSArray <MTLArgument *> *tileArguments API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+@property (nullable, readonly) NSArray <MTLArgument *> *tileArguments API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 @end
 
 MTL_EXPORT API_AVAILABLE(macos(10.11), ios(8.0))
@@ -158,7 +161,7 @@
 @property (nonatomic) MTLPixelFormat depthAttachmentPixelFormat;
 @property (nonatomic) MTLPixelFormat stencilAttachmentPixelFormat;
 
-@property (readwrite, nonatomic) MTLPrimitiveTopologyClass inputPrimitiveTopology API_AVAILABLE(macos(10.11), ios(12.0)) API_UNAVAILABLE(tvos);
+@property (readwrite, nonatomic) MTLPrimitiveTopologyClass inputPrimitiveTopology API_AVAILABLE(macos(10.11), ios(12.0), tvos(14.5));
 
 @property (readwrite, nonatomic) MTLTessellationPartitionMode tessellationPartitionMode API_AVAILABLE(macos(10.12), ios(10.0));
 @property (readwrite, nonatomic) NSUInteger maxTessellationFactor API_AVAILABLE(macos(10.12), ios(10.0));
@@ -181,6 +184,72 @@
  */
 @property (readwrite, nullable, nonatomic, copy) NSArray<id<MTLBinaryArchive>> *binaryArchives API_AVAILABLE(macos(11.0), ios(14.0));
 
+
+/*!
+ @property vertexPreloadedLibraries
+ @abstract The set of MTLDynamicLibrary to use to resolve external symbols for the vertexFunction before considering symbols from dependent MTLDynamicLibrary.
+ @discussion Typical workflows use the libraries property of MTLCompileOptions to record dependent libraries at compile time without having to use vertexPreloadedLibraries.
+ This property can be used to override symbols from dependent libraries for experimentation or evaluating alternative implementations.
+ It can also be used to provide dynamic libraries that are dynamically created (for example, from source) that have no stable installName that can be used to automatically load from the file system.
+ @see MTLDynamicLibrary
+ */
+@property (readwrite, nonnull, nonatomic, copy) NSArray<id<MTLDynamicLibrary>>* vertexPreloadedLibraries API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @property fragmentPreloadedLibraries
+ @abstract The set of MTLDynamicLibrary to use to resolve external symbols for the fragmentFunction before considering symbols from dependent MTLDynamicLibrary.
+ @discussion Typical workflows use the libraries property of MTLCompileOptions to record dependent libraries at compile time without having to use fragmentPreloadedLibraries.
+ This property can be used to override symbols from dependent libraries for experimentation or evaluating alternative implementations.
+ It can also be used to provide dynamic libraries that are dynamically created (for example, from source) that have no stable installName that can be used to automatically load from the file system.
+ @see MTLDynamicLibrary
+ */
+@property (readwrite, nonnull, nonatomic, copy) NSArray<id<MTLDynamicLibrary>>* fragmentPreloadedLibraries API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @property vertexLinkedFunctions
+ @abstract The set of functions to be linked with the pipeline state and accessed from the vertex function.
+ @see MTLLinkedFunctions
+ */
+@property (null_resettable, copy, nonatomic) MTLLinkedFunctions *vertexLinkedFunctions
+    API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @property fragmentLinkedFunctions
+ @abstract The set of functions to be linked with the pipeline state and accessed from the fragment function.
+ @see MTLLinkedFunctions
+ */
+@property (null_resettable, copy, nonatomic) MTLLinkedFunctions *fragmentLinkedFunctions
+    API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @property supportAddingVertexBinaryFunctions
+ @abstract This flag makes this pipeline support creating a new pipeline by adding binary functions.
+ */
+@property (readwrite, nonatomic) BOOL supportAddingVertexBinaryFunctions
+API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @property supportFragmentAddingBinaryFunctions
+ @abstract This flag makes this pipeline support creating a new pipeline by adding binary functions.
+ */
+@property (readwrite, nonatomic) BOOL supportAddingFragmentBinaryFunctions
+API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @property maxVertexCallStackDepth
+ @abstract The maximum depth of the call stack in stack frames from the shader. Defaults to 1 additional stack frame.
+ */
+@property (readwrite, nonatomic) NSUInteger maxVertexCallStackDepth
+API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @property maxFragmentCallStackDepth
+ @abstract The maximum depth of the call stack in stack frames from the shader. Defaults to 1 additional stack frame.
+ */
+@property (readwrite, nonatomic) NSUInteger maxFragmentCallStackDepth
+API_AVAILABLE(macos(12.0), ios(15.0));
+
+
 /*!
  @method reset
  @abstract Restore all pipeline descriptor properties to their default values.
@@ -189,6 +258,28 @@
 
 @end
 
+MTL_EXPORT API_AVAILABLE(macos(12.0), ios(15.0))
+@interface MTLRenderPipelineFunctionsDescriptor : NSObject <NSCopying>
+
+/*!
+ @property vertexAdditionalBinaryFunctions
+ @abstract The set of additional binary functions to be accessed from the vertex function in an incrementally created pipeline state.
+ */
+@property (nullable, nonatomic, copy) NSArray<id<MTLFunction>> *vertexAdditionalBinaryFunctions;
+
+/*!
+ @property fragmentAdditionalBinaryFunctions
+ @abstract The set of additional binary functions to be accessed from the fragment function in an incrementally created pipeline state.
+ */
+@property (nullable, nonatomic, copy) NSArray<id<MTLFunction>> *fragmentAdditionalBinaryFunctions;
+
+/*!
+ @property tileAdditionalBinaryFunctions
+ @abstract The set of additional binary functions to be accessed from the tile function in an incrementally created pipeline state.
+ */
+@property (nullable, nonatomic, copy) NSArray<id<MTLFunction>> *tileAdditionalBinaryFunctions;
+@end
+
 /*!
  @protocol MTLRenderPipelineState
  @abstract MTLRenderPipelineState represents a compiled render pipeline
@@ -203,15 +294,15 @@
 
 /*!
  @property maxTotalThreadsPerThreadgroup
- @abstract The maximum total number of threads that can be in a single threadgroup.
+ @abstract The maximum total number of threads that can be in a single tile shader threadgroup.
  */
-@property (readonly) NSUInteger maxTotalThreadsPerThreadgroup API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+@property (readonly) NSUInteger maxTotalThreadsPerThreadgroup API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 /*!
  @property threadgroupSizeMatchesTileSize
- @abstract Returns true when the pipeline state requires a threadgroup size equal to the tile size
+ @abstract Returns true when the pipeline state requires a tile shader threadgroup size equal to the tile size
  */
-@property (readonly) BOOL threadgroupSizeMatchesTileSize API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+@property (readonly) BOOL threadgroupSizeMatchesTileSize API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 
 
@@ -219,17 +310,42 @@
  @property imageblockSampleLength
  @brief Returns imageblock memory length used by a single sample when rendered using this pipeline.
  */
-@property (readonly) NSUInteger imageblockSampleLength API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+@property (readonly) NSUInteger imageblockSampleLength API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 /*!
  @method imageblockMemoryLengthForDimensions:sampleCount:
  @brief Returns imageblock memory length for given image block dimensions. Dimensions must be valid tile dimensions.
  */
-- (NSUInteger)imageblockMemoryLengthForDimensions:(MTLSize)imageblockDimensions API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos);
+- (NSUInteger)imageblockMemoryLengthForDimensions:(MTLSize)imageblockDimensions API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 
 @property (readonly) BOOL supportIndirectCommandBuffers API_AVAILABLE(macos(10.14), ios(12.0));
 
+
+/*!
+ @method functionHandleWithFunction:stage:
+ @brief Gets the function handle for the specified function on the specified stage of the pipeline.
+ */
+- (nullable id<MTLFunctionHandle>)functionHandleWithFunction:(id<MTLFunction>)function stage:(MTLRenderStages)stage API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @method newVisibleFunctionTableWithDescriptor:stage:
+ @brief Allocate a visible function table for the specified stage of the pipeline with the provided descriptor.
+ */
+- (nullable id<MTLVisibleFunctionTable>)newVisibleFunctionTableWithDescriptor:(MTLVisibleFunctionTableDescriptor * __nonnull)descriptor stage:(MTLRenderStages)stage API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @method newIntersectionFunctionTableWithDescriptor:stage:
+ @brief Allocate an intersection function table for the specified stage of the pipeline with the provided descriptor.
+ */
+- (nullable id <MTLIntersectionFunctionTable>)newIntersectionFunctionTableWithDescriptor:(MTLIntersectionFunctionTableDescriptor * _Nonnull)descriptor stage:(MTLRenderStages)stage API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @method newRenderPipelineStateWithAdditionalBinaryFunctions:error:
+ @brief Allocate a new render pipeline state by adding binary functions for each stage of this pipeline state.
+ */
+- (nullable id <MTLRenderPipelineState>)newRenderPipelineStateWithAdditionalBinaryFunctions:(nonnull MTLRenderPipelineFunctionsDescriptor *)additionalBinaryFunctions error:(__autoreleasing NSError **)error API_AVAILABLE(macos(12.0), ios(15.0));
+
 @end
 
 MTL_EXPORT API_AVAILABLE(macos(10.11), ios(8.0))
@@ -244,7 +360,7 @@
 @end
 
 
-MTL_EXPORT API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos)
+MTL_EXPORT API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5))
 @interface MTLTileRenderPipelineColorAttachmentDescriptor : NSObject <NSCopying>
 
 /*! Pixel format.  Defaults to MTLPixelFormatInvalid */
@@ -252,7 +368,7 @@
 
 @end
 
-MTL_EXPORT API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos)
+MTL_EXPORT API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5))
 @interface MTLTileRenderPipelineColorAttachmentDescriptorArray : NSObject
 
 /* Individual tile attachment state access */
@@ -263,7 +379,7 @@
 
 @end
 
-MTL_EXPORT API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0)) API_UNAVAILABLE(tvos)
+MTL_EXPORT API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5))
 @interface MTLTileRenderPipelineDescriptor : NSObject <NSCopying>
 
 /*!
@@ -308,10 +424,42 @@
  */
 @property (readwrite, nullable, nonatomic, copy) NSArray<id<MTLBinaryArchive>> *binaryArchives API_AVAILABLE(macos(11.0), ios(14.0));
 
+
+/*!
+ @property preloadedLibraries
+ @abstract The set of MTLDynamicLibrary to use to resolve external symbols before considering symbols from dependent MTLDynamicLibrary.
+ @discussion Typical workflows use the libraries property of MTLCompileOptions to record dependent libraries at compile time without having to use preloadedLibraries.
+ This property can be used to override symbols from dependent libraries for experimentation or evaluating alternative implementations.
+ It can also be used to provide dynamic libraries that are dynamically created (for example, from source) that have no stable installName that can be used to automatically load from the file system.
+ @see MTLDynamicLibrary
+ */
+@property (readwrite, nonnull, nonatomic, copy) NSArray<id<MTLDynamicLibrary>>* preloadedLibraries API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @property linkedFunctions
+ @abstract The set of functions to be linked with the pipeline state and accessed from the tile function.
+ @see MTLLinkedFunctions
+ */
+@property (null_resettable, copy, nonatomic) MTLLinkedFunctions *linkedFunctions
+    API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @property supportAddingBinaryFunctions
+ @abstract This flag makes this pipeline support creating a new pipeline by adding binary functions.
+ */
+@property (readwrite, nonatomic) BOOL supportAddingBinaryFunctions
+API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
+ @property maxCallStackDepth
+ @abstract The maximum depth of the call stack in stack frames from the tile function. Defaults to 1 additional stack frame.
+ */
+@property (readwrite, nonatomic) NSUInteger maxCallStackDepth
+API_AVAILABLE(macos(12.0), ios(15.0));
+
 - (void)reset;
 
 @end
 
 
-
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h	2021-03-16 08:48:43.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h	2021-06-02 12:48:24.000000000 -0400
@@ -11,13 +11,11 @@
 
 #import <Metal/MTLTypes.h>
 
+#import <Metal/MTLCounters.h>
+
 NS_ASSUME_NONNULL_BEGIN
 @protocol MTLDevice;
 
-@protocol MTLCounterSampleBuffer;
-#define MTLCounterDontSample ((NSUInteger)-1)
-#define MTLMaxResourceStatePassSampleBuffers 4
-
 MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0))
 @interface MTLResourceStatePassSampleBufferAttachmentDescriptor : NSObject<NSCopying>
 /*!
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h	2021-03-16 08:48:43.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h	2021-06-02 12:48:23.000000000 -0400
@@ -103,6 +103,7 @@
     MTLTextureUsagePixelFormatView = 0x0010,
 } API_AVAILABLE(macos(10.11), ios(9.0));
 
+
 MTL_EXPORT API_AVAILABLE(macos(10.11), ios(8.0))
 @interface MTLTextureDescriptor : NSObject <NSCopying>
 
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes	2021-03-16 03:42:34.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes	2021-05-22 07:59:04.000000000 -0400
@@ -52,6 +52,14 @@
   SwiftName: uchar3
 - Name: MTLDataTypeUChar4
   SwiftName: uchar4
+- Name: MTLDataTypeULong
+  SwiftName: ulong
+- Name: MTLDataTypeULong2
+  SwiftName: ulong2
+- Name: MTLDataTypeULong3
+  SwiftName: ulong3
+- Name: MTLDataTypeULong4
+  SwiftName: ulong4
 - Name: MTLDataTypeRGBA8Unorm_sRGB
   SwiftName: rgba8Unorm_srgb
 - Name: MTLDataTypeRGB10A2Unorm
@@ -646,6 +654,20 @@
   - Selector: 'newIntersectionFunctionTableWithDescriptor:'
     SwiftName: makeIntersectionFunctionTable(descriptor:)
     MethodKind: Instance
+- Name: MTLRenderPipelineState
+  Methods:
+  - Selector: 'functionHandleWithFunction:stage:'
+    SwiftName: functionHandle(function:stage:)
+    MethodKind: Instance
+  - Selector: 'newRenderPipelineStateWithAdditionalBinaryFunctions:error:'
+    SwiftName: makeRenderPipelineState(additionalBinaryFunctions:)
+    MethodKind: Instance
+  - Selector: 'newVisibleFunctionTableWithDescriptor:stage:'
+    SwiftName: makeVisibleFunctionTable(descriptor:stage:)
+    MethodKind: Instance
+  - Selector: 'newIntersectionFunctionTableWithDescriptor:stage:'
+    SwiftName: makeIntersectionFunctionTable(descriptor:stage:)
+    MethodKind: Instance
 - Name: MTLDevice
   Methods:
   - Selector: 'getDefaultSamplePositions:count:'
@@ -672,6 +694,9 @@
   - Selector: 'newLibraryWithSource:options:completionHandler:'
     SwiftName: makeLibrary(source:options:completionHandler:)
     MethodKind: Instance
+  - Selector: 'newLibraryWithDescriptor:error:'
+    SwiftName: makeLibrary(descriptor:)
+    MethodKind: Instance
   - Selector: 'newRenderPipelineStateWithDescriptor:completionHandler:'
     SwiftName: makeRenderPipelineState(descriptor:completionHandler:)
     MethodKind: Instance
@@ -1139,6 +1164,51 @@
   - Selector: 'sampleCountersInBuffer:atSampleIndex:withBarrier:'
     MethodKind: Instance
     SwiftName: sampleCounters(sampleBuffer:sampleIndex:barrier:)
+  - Selector: 'setVertexVisibleFunctionTable:atBufferIndex:'
+    SwiftName: setVertexVisibleFunctionTable(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setVertexVisibleFunctionTables:withBufferRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setFragmentVisibleFunctionTable:atBufferIndex:'
+    SwiftName: setFragmentVisibleFunctionTable(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setFragmentVisibleFunctionTables:withBufferRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setTileVisibleFunctionTable:atBufferIndex:'
+    SwiftName: setTileVisibleFunctionTable(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setTileVisibleFunctionTables:withBufferRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setVertexIntersectionFunctionTable:atBufferIndex:'
+    SwiftName: setVertexIntersectionFunctionTable(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setVertexIntersectionFunctionTables:withBufferRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setFragmentIntersectionFunctionTable:atBufferIndex:'
+    SwiftName: setFragmentIntersectionFunctionTable(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setFragmentIntersectionFunctionTables:withBufferRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setTileIntersectionFunctionTable:atBufferIndex:'
+    SwiftName: setTileIntersectionFunctionTable(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setTileIntersectionFunctionTables:withBufferRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setVertexAccelerationStructure:atBufferIndex:'
+    SwiftName: setVertexAccelerationStructure(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setFragmentAccelerationStructure:atBufferIndex:'
+    SwiftName: setFragmentAccelerationStructure(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setTileAccelerationStructure:atBufferIndex:'
+    SwiftName: setTileAccelerationStructure(_:bufferIndex:)
+    MethodKind: Instance
 - Name: MTLSharedEvent
   Methods:
   - Selector: 'newSharedEventHandle'
@@ -1248,6 +1318,9 @@
   - Selector: 'writeCompactedAccelerationStructureSize:toBuffer:offset:'
     SwiftName: writeCompactedSize(accelerationStructure:buffer:offset:)
     MethodKind: Instance
+  - Selector: 'writeCompactedAccelerationStructureSize:toBuffer:offset:sizeDataType:'
+    SwiftName: writeCompactedSize(accelerationStructure:buffer:offset:sizeDataType:)
+    MethodKind: Instance
   - Selector: 'copyAndCompactAccelerationStructure:toAccelerationStructure:'
     SwiftName: copyAndCompact(sourceAccelerationStructure:destinationAccelerationStructure:)
     MethodKind: Instance
@@ -1283,6 +1356,9 @@
   - Selector: 'addTileRenderPipelineFunctionsWithDescriptor:error:'
     SwiftName: addTileRenderPipelineFunctions(descriptor:)
     MethodKind: Instance
+  - Selector: 'addFunctionWithDescriptor:library:error:'
+    SwiftName: addFunction(descriptor:library:)
+    MethodKind: Instance
 
 SwiftVersions:
 - Version: 3
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h	2021-03-16 08:41:35.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h	2021-05-22 08:07:48.000000000 -0400
@@ -47,4 +47,5 @@
 #import <Metal/MTLFunctionHandle.h>
 #import <Metal/MTLVisibleFunctionTable.h>
 #import <Metal/MTLBinaryArchive.h>
-#import <Metal/MTLIntersectionFunctionTable.h>
\ No newline at end of file
+#import <Metal/MTLIntersectionFunctionTable.h>
+#import <Metal/MTLFunctionStitching.h>
Clone this wiki locally