Skip to content

Metal macOS xcode14.0 beta1

Alex Soto edited this page Jun 7, 2022 · 1 revision

#Metal.framework

diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h	2022-02-23 07:57:44.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h	2022-05-31 14:50:43.000000000 -0400
@@ -13,6 +13,7 @@
 #import <Metal/MTLRenderCommandEncoder.h>
 #import <Metal/MTLAccelerationStructureTypes.h>
 #import <Metal/MTLResource.h>
+#import <Metal/MTLStageInputOutputDescriptor.h>
 
 NS_ASSUME_NONNULL_BEGIN
 
@@ -107,6 +108,27 @@
  */
 @property (nonatomic, copy, nullable) NSString* label API_AVAILABLE(macos(12.0), ios(15.0));
 
+/**
+ * @brief Data buffer containing per-primitive data. May be nil.
+ */
+@property (nonatomic, retain, nullable) id <MTLBuffer> primitiveDataBuffer API_AVAILABLE(macos(13.0), ios(16.0));
+
+/**
+ * @brief Primitive data buffer offset in bytes. Must be aligned to the platform's buffer offset alignment. Defaults to 0 bytes.
+ */
+@property (nonatomic) NSUInteger primitiveDataBufferOffset API_AVAILABLE(macos(13.0), ios(16.0));
+
+/**
+ * @brief Stride, in bytes, between per-primitive data in the primitive data buffer. Must be at least primitiveDataElementSize and must be a
+ * multiple of 4 bytes. Defaults to 0 bytes. Assumed to be equal to primitiveDataElementSize if zero.
+ */
+@property (nonatomic) NSUInteger primitiveDataStride API_AVAILABLE(macos(13.0), ios(16.0));
+
+/**
+ * @brief Size, in bytes, of the data for each primitive in the primitive data buffer. Must be at most primitiveDataStride and must be a
+ * multiple of 4 bytes. Defaults to 0 bytes.
+ */
+@property (nonatomic) NSUInteger primitiveDataElementSize API_AVAILABLE(macos(13.0), ios(16.0));
 @end
 
 /**
@@ -176,8 +198,8 @@
 @interface MTLAccelerationStructureTriangleGeometryDescriptor : MTLAccelerationStructureGeometryDescriptor
 
 /**
- * @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.
+ * @brief Vertex buffer containing triangle vertices. Each vertex position must be formatted
+ * according to the vertex format. Must not be nil.
  */
 @property (nonatomic, retain, nullable) id <MTLBuffer> vertexBuffer;
 
@@ -188,8 +210,14 @@
 @property (nonatomic) NSUInteger vertexBufferOffset;
 
 /**
- * @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.
+ * @brief Format type of the vertex buffer.
+ * Defaults to MTLAttributeFormatFloat3 (packed).
+ */
+@property (nonatomic) MTLAttributeFormat vertexFormat API_AVAILABLE(macos(13.0), ios(16.0));
+
+/**
+ * @brief Stride, in bytes, between vertices in the vertex buffer. Must be a multiple of the vertex format data type size and must be aligned to
+ * the vertex format data type's alignment. Defaults to 0, which will result in a stride of the vertex format data size.
  */
 @property (nonatomic) NSUInteger vertexStride;
 
@@ -214,6 +242,17 @@
  */
 @property (nonatomic) NSUInteger triangleCount;
 
+/**
+ * @brief Buffer containing packed float4x3 transformation matrix. Transform is applied to the vertex data when building the acceleration structure. Input vertex buffers are not modified.
+ * When set to nil, transformation matrix is not applied to vertex data.
+ */
+@property (nonatomic, retain, nullable) id<MTLBuffer> transformationMatrixBuffer API_AVAILABLE(macos(13.0), ios(16.0));
+
+/**
+ * @brief Transformation matrix buffer offset. Must be a multiple of 4 bytes. Defaults to 0.
+ */
+@property (nonatomic) NSUInteger transformationMatrixBufferOffset API_AVAILABLE(macos(13.0), ios(16.0));
+
 + (instancetype)descriptor;
 
 @end
@@ -283,8 +322,14 @@
 @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.
+ * @brief Format type of the vertex buffers across all keyframes.
+ * Defaults to MTLAttributeFormatFloat3 (packed).
+ */
+@property (nonatomic) MTLAttributeFormat vertexFormat API_AVAILABLE(macos(13.0), ios(16.0));
+
+/**
+ * @brief Stride, in bytes, between vertices in each keyframe's vertex buffer. Must be a multiple of the vertex format data type size and must be aligned to
+ * the vertex format data type's alignment. Defaults to 0, which will result in a stride of the vertex format data size.
  */
 @property (nonatomic) NSUInteger vertexStride;
 
@@ -309,6 +354,18 @@
  */
 @property (nonatomic) NSUInteger triangleCount;
 
+/**
+ * @brief Buffer containing packed float4x3 transformation matrix. Transform is applied to the vertex data when building the acceleration structure. Input vertex buffers are not modified.
+ * The transformation matrix is applied to all keyframes' vertex data.
+ * When set to nil, transformation matrix is not applied to vertex data.
+ */
+@property (nonatomic, retain, nullable) id<MTLBuffer> transformationMatrixBuffer API_AVAILABLE(macos(13.0), ios(16.0));
+
+/**
+ * @brief Transformation matrix buffer offset. Must be a multiple of 4 bytes. Defaults to 0.
+ */
+@property (nonatomic) NSUInteger transformationMatrixBufferOffset API_AVAILABLE(macos(13.0), ios(16.0));
+
 + (instancetype)descriptor;
 
 @end
@@ -545,6 +602,18 @@
 
 @property (nonatomic, readonly) NSUInteger size;
 
+/*!
+ @property gpuHandle
+ @abstract accessible by the CPU, and used to get the device handle of a resource/object that could be normally passed to the GPU within an argument buffer
+ this will be deleted as the gpuResourceID will replace it
+ */
+@property (readonly) MTLGPUHandle gpuHandle;
+/*!
+ @property gpuResourceID
+ @abstract Accessible by the CPU, it is used to get the handle of a GPU resource that could be normally passed to the GPU
+ */
+@property (readonly) MTLResourceID gpuResourceID API_AVAILABLE(macos(13.0), ios(16.0));
+
 @end
 
 
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h	2022-02-23 07:57:45.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h	2022-05-31 14:50:44.000000000 -0400
@@ -19,6 +19,27 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
+/*!
+ @enum MTLAccelerationStructureRefitOptions
+ @abstract Controls the acceleration structure refit operation
+ */
+typedef NS_OPTIONS(NSUInteger, MTLAccelerationStructureRefitOptions) {
+    /**
+     * @brief Refitting shall result in updated vertex data from the provided geometry descriptor.
+     * If not set, vertex buffers shall be ignored on the geometry descriptor and vertex data previously
+     * encoded shall be copied.
+     */
+    MTLAccelerationStructureRefitOptionVertexData = (1 << 0),
+
+    /**
+     * @brief Refitting shall result in updated per primitive data from the provided geometry descriptor.
+     * If not set, per primitive data buffers shall be ignored on the geometry descriptor and per primitive
+     * data previously encoded shall be copied.
+     */
+    MTLAccelerationStructureRefitOptionPerPrimitiveData = (1 << 1),
+} API_AVAILABLE(macos(13.0), ios(16.0));
+
+
 API_AVAILABLE(macos(11.0), ios(14.0))
 @protocol MTLAccelerationStructureCommandEncoder <MTLCommandEncoder>
 
@@ -80,6 +101,41 @@
                scratchBufferOffset:(NSUInteger)scratchBufferOffset;
 
 /*!
+ * @brief Encode an acceleration structure refit into the command buffer. Refitting can be used to
+ * update the acceleration structure when geometry changes and is much faster than rebuilding from
+ * scratch. However, the quality of the acceleration structure and the subsequent ray tracing
+ * performance will degrade depending on how much the geometry changes.
+ *
+ * Refitting can not be used after certain changes, such as adding or removing geometry. Acceleration
+ * structures can be refit in place by specifying the same source and destination acceleration structures
+ * or by providing a nil destination acceleration structure. If the source and destination acceleration
+ * structures are not the same, they must not overlap in memory.
+ *
+ * The destination acceleration structure must be at least as large as the source acceleration structure,
+ * unless the source acceleration structure has been compacted, in which case the destination acceleration
+ * structure must be at least as large as the compacted size of the source acceleration structure.
+ *
+ * The scratch buffer must be at least the size returned by the accelerationStructureSizesWithDescriptor
+ * method of the MTLDevice.
+ *
+ * @param descriptor                       Object describing the acceleration structure to build
+ * @param sourceAccelerationStructure      Acceleration structure to copy from
+ * @param destinationAccelerationStructure Acceleration structure to copy to
+ * @param scratchBuffer                    Scratch buffer to use while refitting the acceleration
+ *                                         structure. The contents may be overwritten and are undefined
+ *                                         after the refit has started/completed.
+ * @param scratchBufferOffset              Offset into the scratch buffer.
+ * @param options                          Options specifying the elements of the acceleration structure to refit.
+ */
+- (void)refitAccelerationStructure:(id <MTLAccelerationStructure>)sourceAccelerationStructure
+                        descriptor:(MTLAccelerationStructureDescriptor *)descriptor
+                       destination:(nullable id <MTLAccelerationStructure>)destinationAccelerationStructure
+                     scratchBuffer:(id <MTLBuffer>)scratchBuffer
+               scratchBufferOffset:(NSUInteger)scratchBufferOffset
+                           options:(MTLAccelerationStructureRefitOptions)options
+                           API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
  * @brief Copy 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.
@@ -149,7 +205,7 @@
  /*!
  @method updateFence:
  @abstract Update the fence to capture all GPU work so far enqueued by this encoder.
- @discussion The fence is updated at kernel submission to maintain global order and prevent deadlock.
+ @discussion The fence is updated at build submission to maintain global order and prevent deadlock.
  Drivers may delay fence updates until the end of the encoder. Drivers may also wait on fences at the beginning of an encoder. It is therefore illegal to wait on a fence after it has been updated in the same encoder.
  */
 - (void)updateFence:(id <MTLFence>)fence;
@@ -157,7 +213,7 @@
 /*!
  @method waitForFence:
  @abstract Prevent further GPU work until the fence is reached.
- @discussion The fence is evaluated at kernel submision to maintain global order and prevent deadlock.
+ @discussion The fence is evaluated at build submission to maintain global order and prevent deadlock.
  Drivers may delay fence updates until the end of the encoder. Drivers may also wait on fences at the beginning of an encoder. It is therefore illegal to wait on a fence after it has been updated in the same encoder.
  */
 - (void)waitForFence:(id <MTLFence>)fence;
@@ -166,7 +222,7 @@
  * @method useResource:usage:
  * @abstract Declare that a resource may be accessed by the command encoder through an argument buffer
  * 
- * @discussion For tracked MTLResources, this method protects against data hazards. This method must be called before encoding any dispatch commands which may access the resource through an argument buffer.
+ * @discussion For tracked MTLResources, this method protects against data hazards. This method must be called before encoding any acceleration structure commands which may access the resource through an argument buffer.
  * @warning Prior to iOS 13, macOS 10.15, this method does not protect against data hazards. If you are deploying to older versions of macOS or iOS, use fences to ensure data hazards are resolved.
  */
 - (void)useResource:(id <MTLResource>)resource usage:(MTLResourceUsage)usage;
@@ -174,31 +230,31 @@
 /*!
  * @method useResources:count:usage:
  * @abstract Declare that an array of resources may be accessed through an argument buffer by the command encoder
- * @discussion For tracked MTL Resources, this method protects against data hazards. This method must be called before encoding any dispatch commands which may access the resources through an argument buffer.
+ * @discussion For tracked MTL Resources, this method protects against data hazards. This method must be called before encoding any acceleration structure commands which may access the resources through an argument buffer.
  * @warning Prior to iOS 13, macOS 10.15, this method does not protect against data hazards. If you are deploying to older versions of macOS or iOS, use fences to ensure data hazards are resolved.
  */
 - (void)useResources:(const id <MTLResource> __nonnull[__nonnull])resources count:(NSUInteger)count usage:(MTLResourceUsage)usage;
 
 /*!
  * @method useHeap:
- * @abstract Declare that the resources allocated from a heap may be accessed as readonly by the render pass through an argument buffer
- * @discussion For tracked MTLHeaps, this method protects against data hazards. This method must be called before encoding any dispatch commands which may access the resources allocated from the heap through an argument buffer. This method may cause all of the color attachments allocated from the heap to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
+ * @abstract Declare that the resources allocated from a heap may be accessed as readonly by the encoder through an argument buffer
+ * @discussion For tracked MTLHeaps, this method protects against data hazards. This method must be called before encoding any acceleration structure commands which may access the resources allocated from the heap through an argument buffer. This method may cause all of the color attachments allocated from the heap to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
  * @warning Prior to iOS 13, macOS 10.15, this method does not protect against data hazards. If you are deploying to older versions of macOS or iOS, use fences to ensure data hazards are resolved.
  */
 - (void)useHeap:(id <MTLHeap>)heap;
 
 /*!
  * @method useHeaps:count:
- * @abstract Declare that the resources allocated from an array of heaps may be accessed as readonly by the render pass through an argument buffer
- * @discussion For tracked MTLHeaps, this method protects against data hazards. This method must be called before encoding any dispatch commands which may access the resources allocated from the heaps through an argument buffer. This method may cause all of the color attachments allocated from the heaps to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
+ * @abstract Declare that the resources allocated from an array of heaps may be accessed as readonly by the encoder through an argument buffer
+ * @discussion For tracked MTLHeaps, this method protects against data hazards. This method must be called before encoding any acceleration structure commands which may access the resources allocated from the heaps through an argument buffer. This method may cause all of the color attachments allocated from the heaps to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
  * @warning Prior to iOS 13, macOS 10.15, this method does not protect against data hazards. If you are deploying to older versions of macOS or iOS, use fences to ensure data hazards are resolved.
  */
 - (void)useHeaps:(const id <MTLHeap> __nonnull[__nonnull])heaps count:(NSUInteger)count;
 
 /*!
  @method sampleCountersInBuffer:atSampleIndex:withBarrier:
- @abstract Sample hardware counters at this point in the compute encoder and
- store the counter sample into the sample buffer at the specified index.
+ @abstract Sample hardware counters at this point in the acceleration structure
+ encoder and store the counter sample into the sample buffer at the specified index.
  @param sampleBuffer The sample buffer to sample into
  @param sampleIndex The index into the counter buffer to write the sample
  @param barrier Insert a barrier before taking the sample.  Passing
@@ -216,5 +272,73 @@
 
 @end
 
+
+MTL_EXPORT API_AVAILABLE(macos(13.0), ios(16.0))
+@interface MTLAccelerationStructurePassSampleBufferAttachmentDescriptor : NSObject<NSCopying>
+/*!
+@property sampleBuffer
+@abstract The sample buffer to store samples for the acceleration structure pass defined samples.
+If sampleBuffer is non-nil, the sample indices will be used to store samples into
+the sample buffer.  If no sample buffer is provided, no samples will be taken.
+If any of the sample indices are specified as MTLCounterDontSample, no sample
+will be taken for that action.
+*/
+@property (nullable, nonatomic, retain) id<MTLCounterSampleBuffer> sampleBuffer;
+
+/*!
+ @property startOfEncoderSampleIndex
+ @abstract The sample index to use to store the sample taken at the start of
+ command encoder processing.  Setting the value to MTLCounterDontSample will cause
+ this sample to be omitted.
+ @discussion On devices where MTLCounterSamplingPointAtStageBoundary is unsupported,
+ this sample index is invalid and must be set to MTLCounterDontSample or creation of an
+ acceleration structure pass will fail.
+ */
+@property (nonatomic) NSUInteger startOfEncoderSampleIndex;
+/*!
+ @property endOfEncoderSampleIndex
+ @abstract The sample index to use to store the sample taken at the end of
+ command encoder processing.  Setting the value to MTLCounterDontSample will cause
+ this sample to be omitted.
+ @discussion On devices where MTLCounterSamplingPointAtStageBoundary is unsupported,
+ this sample index is invalid and must be set to MTLCounterDontSample or creation of an
+ acceleration structure pass will fail.
+ */
+@property (nonatomic) NSUInteger endOfEncoderSampleIndex;
+@end
+
+MTL_EXPORT API_AVAILABLE(macos(13.0), ios(16.0))
+@interface MTLAccelerationStructurePassSampleBufferAttachmentDescriptorArray : NSObject
+
+/* Individual attachment state access */
+- (MTLAccelerationStructurePassSampleBufferAttachmentDescriptor *)objectAtIndexedSubscript:(NSUInteger)attachmentIndex;
+
+/* This always uses 'copy' semantics.  It is safe to set the attachment state at any legal index to nil, which resets that attachment descriptor state to default values. */
+- (void)setObject:(nullable MTLAccelerationStructurePassSampleBufferAttachmentDescriptor *)attachment atIndexedSubscript:(NSUInteger)attachmentIndex;
+
+@end
+
+/*!
+ @class MTLAccelerationStructurePassDescriptor
+ @abstract MTLAccelerationStructurePassDescriptor represents a collection of attachments to be used to create a concrete acceleration structure encoder.
+ */
+MTL_EXPORT API_AVAILABLE(macos(13.0), ios(16.0))
+@interface MTLAccelerationStructurePassDescriptor : NSObject <NSCopying>
+
+/*!
+ @method accelerationStructurePassDescriptor
+ @abstract Create an autoreleased default acceleration structure pass descriptor
+ */
++ (MTLAccelerationStructurePassDescriptor *)accelerationStructurePassDescriptor;
+
+/*!
+ @property sampleBufferAttachments
+ @abstract An array of sample buffers and associated sample indices.
+ */
+@property (readonly) MTLAccelerationStructurePassSampleBufferAttachmentDescriptorArray * sampleBufferAttachments;
+
+@end
+
+
 NS_ASSUME_NONNULL_END
 
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h	2022-02-23 08:01:11.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h	2022-05-31 15:04:35.000000000 -0400
@@ -8,6 +8,7 @@
 #import <Foundation/Foundation.h>
 #import <Metal/MTLDefines.h>
 #import <Metal/MTLTexture.h>
+#import <Metal/MTLCommandEncoder.h>
 
 
 NS_ASSUME_NONNULL_BEGIN
@@ -128,6 +129,57 @@
 @class MTLArgument;
 
 /*!
+ @enum MTLBindingsType
+ @abstract The type of a resource binding.
+ 
+ @constant MTLBindingTypeBuffer
+ This binding represents a buffer.
+ 
+ @constant MTLBindingTypeThreadgroupMemory
+ This binding represents threadgroup memory.
+ 
+ @constant MTLBindingTypeTexture
+ This binding represents a texture.
+ 
+ @constant MTLBindingTypeSampler
+ This binding represents a sampler.
+ 
+ @constant MTLBindingTypeImageblockData
+ This binding represents an image block data.
+ 
+ @constant MTLBindingTypeImageblock
+ This binding represents an image block.
+  
+ @constant MTLBindingTypeVisibleFunctionTable
+ This binding represents a visible function table object.
+ 
+ @constant MTLBindingTypePrimitiveAccelerationStructure
+ This binding represents a primitive acceleration structure object.
+ 
+ @constant MTLBindingTypeInstanceAccelerationStructure
+ This binding represents an instance acceleration structure object.
+ 
+ @constant MTLBinidngTypeIntersectionFunctionTable
+ This binding represents an intersection function table object.
+ 
+ @constant MTLBindingTypeObjectPayload
+ This binding represents an object payload.
+*/
+typedef NS_ENUM(NSInteger, MTLBindingType) {
+    MTLBindingTypeBuffer = 0,
+    MTLBindingTypeThreadgroupMemory = 1,
+    MTLBindingTypeTexture = 2,
+    MTLBindingTypeSampler = 3,
+    MTLBindingTypeImageblockData = 16,
+    MTLBindingTypeImageblock = 17,
+    MTLBindingTypeVisibleFunctionTable = 24,
+    MTLBindingTypePrimitiveAccelerationStructure = 25,
+    MTLBindingTypeInstanceAccelerationStructure = 26,
+    MTLBindingTypeIntersectionFunctionTable = 27,
+    MTLBindingTypeObjectPayload = 34,
+} API_AVAILABLE(macos(11.0), ios(14.0));
+
+/*!
  @enum MTLArgumentType
  @abstract The type for an input to a MTLRenderPipelineState or a MTLComputePipelineState
  
@@ -156,7 +208,8 @@
     MTLArgumentTypePrimitiveAccelerationStructure API_AVAILABLE(macos(11.0), ios(14.0)) = 25,
     MTLArgumentTypeInstanceAccelerationStructure API_AVAILABLE(macos(11.0), ios(14.0)) = 26,
     MTLArgumentTypeIntersectionFunctionTable API_AVAILABLE(macos(11.0), ios(14.0)) = 27,
-} API_AVAILABLE(macos(10.11), ios(8.0));
+    MTLArgumentTypeObjectPayload API_AVAILABLE(macos(13.0), ios(16.0)) = 34,
+} API_DEPRECATED_WITH_REPLACEMENT("MTLBindingType", macos(10.11, API_TO_BE_DEPRECATED), ios(8.0, API_TO_BE_DEPRECATED));
 
 /*!
  @enum MTLArgumentAccess
@@ -249,7 +302,8 @@
 /*!
  MTLArgument
 */
-MTL_EXPORT API_AVAILABLE(macos(10.11), ios(8.0))
+MTL_EXPORT
+API_DEPRECATED_WITH_REPLACEMENT("MTLBinding", macos(10.11, API_TO_BE_DEPRECATED), ios(8.0, API_TO_BE_DEPRECATED))
 @interface MTLArgument : NSObject
 
 @property (readonly) NSString *name;
@@ -276,6 +330,50 @@
 @property (readonly) BOOL           isDepthTexture API_AVAILABLE(macos(10.12), ios(10.0)); // true for depth textures
 @property (readonly) NSUInteger     arrayLength API_AVAILABLE(macos(10.13), ios(10.0));
 
+// for object payload arguments
+@property (readonly) NSUInteger     objectPayloadAlignment;
+@property (readonly) NSUInteger     objectPayloadDataSize;
+@end
+
+MTL_EXPORT API_AVAILABLE(macos(13.0), ios(16.0))
+@protocol MTLBinding<NSObject>
+@property (readonly) NSString *name;
+@property (readonly) MTLBindingType type;
+@property (readonly) MTLArgumentAccess access;
+@property (readonly) NSUInteger index;
+
+@property (readonly, getter=isUsed) BOOL used;
+@property (readonly, getter=isArgument) BOOL argument;
+@end
+
+MTL_EXPORT API_AVAILABLE(macos(13.0), ios(16.0))
+@protocol MTLBufferBinding<MTLBinding>
+@property (readonly) NSUInteger      bufferAlignment;        // min alignment of starting offset in the buffer
+@property (readonly) NSUInteger      bufferDataSize;         // sizeof(T) for T *argName
+@property (readonly) MTLDataType     bufferDataType;         // MTLDataTypeFloat, MTLDataTypeFloat4, MTLDataTypeStruct, ...
+@property (readonly, nullable) MTLStructType  *bufferStructType;
+@property (readonly, nullable) MTLPointerType *bufferPointerType;
+@end
+
+MTL_EXPORT API_AVAILABLE(macos(13.0), ios(16.0))
+@protocol MTLThreadgroupBinding<MTLBinding>
+@property (readonly) NSUInteger     threadgroupMemoryAlignment;
+@property (readonly) NSUInteger     threadgroupMemoryDataSize; // sizeof(T) for T *argName
+@end
+
+MTL_EXPORT API_AVAILABLE(macos(13.0), ios(16.0))
+@protocol MTLTextureBinding<MTLBinding>
+@property (readonly) MTLTextureType textureType; // texture1D, texture2D...
+@property (readonly) MTLDataType    textureDataType; // half, float, int, or uint.
+@property (readonly, getter=isDepthTexture) BOOL           depthTexture; // true for depth textures
+@property (readonly) NSUInteger     arrayLength;
+@end
+
+MTL_EXPORT API_AVAILABLE(macos(13.0), ios(16.0))
+@protocol MTLObjectPayloadBinding<MTLBinding>
+@property (readonly) NSUInteger      objectPayloadAlignment;        // min alignment of starting offset in the buffer
+@property (readonly) NSUInteger      objectPayloadDataSize;         // sizeof(T) for T *argName
 @end
 
 NS_ASSUME_NONNULL_END
+
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h	2022-02-23 07:57:45.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h	2022-05-31 15:04:36.000000000 -0400
@@ -24,7 +24,7 @@
  * @protocol MTLArgumentEncoder
  * @discussion MTLArgumentEncoder encodes buffer, texture, sampler, and constant data into a buffer.
  */
-API_AVAILABLE(macos(10.13), ios(11.0))
+API_DEPRECATED("Use 'gpuAddress' or 'gpuHandle' instead", macos(10.13, API_TO_BE_DEPRECATED), ios(11.0, API_TO_BE_DEPRECATED))
 @protocol MTLArgumentEncoder <NSObject>
 
 /*!
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h	2022-02-23 10:58:35.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h	2022-05-31 14:53:16.000000000 -0400
@@ -22,6 +22,7 @@
     MTLBinaryArchiveErrorInvalidFile = 1,
     MTLBinaryArchiveErrorUnexpectedElement = 2,
     MTLBinaryArchiveErrorCompilationFailure = 3,
+    MTLBinaryArchiveErrorInternalError = 4,
 } API_AVAILABLE(macos(11.0), ios(14.0));
 
 /*!
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h	2022-02-23 10:58:33.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h	2022-05-31 15:04:34.000000000 -0400
@@ -15,12 +15,9 @@
 #import <Metal/MTLFence.h>
 #import <Metal/MTLRenderPass.h>
 #import <Metal/MTLBlitPass.h>
+#import <Metal/MTLCounters.h>
 
 NS_ASSUME_NONNULL_BEGIN
-/*!
- @header MTLBlitCommandEncoder.h
- @discussion Header file for MTLBlitCommandEncoder
- */
 
 /*!
  @enum MTLBlitOption
@@ -153,7 +150,7 @@
 /*!
  @method waitForFence:
  @abstract Prevent further GPU work until the fence is reached.
- @discussion The fence is evaluated at kernel submision to maintain global order and prevent deadlock.
+ @discussion The fence is evaluated at kernel submission to maintain global order and prevent deadlock.
  Drivers may delay fence updates until the end of the encoder. Drivers may also wait on fences at the beginning of an encoder. It is therefore illegal to wait on a fence after it has been updated in the same encoder.
  */
 - (void)waitForFence:(id <MTLFence>)fence API_AVAILABLE(macos(10.13), ios(10.0));
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitPass.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitPass.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitPass.h	2022-02-23 10:58:36.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitPass.h	2022-05-31 15:04:37.000000000 -0400
@@ -52,7 +52,7 @@
 /* Individual attachment state access */
 - (MTLBlitPassSampleBufferAttachmentDescriptor *)objectAtIndexedSubscript:(NSUInteger)attachmentIndex;
 
-/* This always uses 'copy' semantics.  It is safe to set the attachment state at any legal index to nil, which resets that attachment descriptor state to default vaules. */
+/* This always uses 'copy' semantics.  It is safe to set the attachment state at any legal index to nil, which resets that attachment descriptor state to default values. */
 - (void)setObject:(nullable MTLBlitPassSampleBufferAttachmentDescriptor *)attachment atIndexedSubscript:(NSUInteger)attachmentIndex;
 
 @end
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h	2022-02-23 10:58:35.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h	2022-05-31 15:04:36.000000000 -0400
@@ -11,10 +11,6 @@
 #import <Metal/MTLResource.h>
 
 NS_ASSUME_NONNULL_BEGIN
-/*!
- @header MTLBuffer.h
- @discussion Header file for MTLBuffer
- */
 
 @class MTLTextureDescriptor;
 @protocol MTLTexture;
@@ -95,5 +91,12 @@
  */
 - (nullable id <MTLBuffer>) newRemoteBufferViewForDevice:(id <MTLDevice>)device API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios);
 
+
+/*!
+ @property gpuAddress
+ @abstract Represents the GPU virtual address of a buffer resource
+ */
+@property (readonly) uint64_t gpuAddress API_AVAILABLE(macos(13.0), ios(16.0));
+
 @end
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h	2022-02-23 10:58:34.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h	2022-05-31 15:04:35.000000000 -0400
@@ -26,6 +26,8 @@
 @class MTLComputePassDescriptor;
 @class MTLBlitPassDescriptor;
 @class MTLResourceStatePassDescriptor;
+@class MTLAccelerationStructurePassDescriptor;
+
 /*!
  @enum MTLCommandBufferStatus
  
@@ -106,7 +108,7 @@
     MTLCommandBufferErrorInternal = 1,
     MTLCommandBufferErrorTimeout = 2,
     MTLCommandBufferErrorPageFault = 3,
-    MTLCommandBufferErrorBlacklisted = 4, // Deprecated. Please use MTLCommandBufferErrorAccessRevoked.
+    MTLCommandBufferErrorBlacklisted API_DEPRECATED_WITH_REPLACEMENT("MTLCommandBufferErrorAccessRevoked", macos(10.11, 13.0), ios(8.0, 16.0)) = 4, 
     MTLCommandBufferErrorAccessRevoked = 4,
     MTLCommandBufferErrorNotPermitted = 7,
     MTLCommandBufferErrorOutOfMemory = 8,
@@ -415,6 +417,8 @@
 
 - (nullable id <MTLAccelerationStructureCommandEncoder>)accelerationStructureCommandEncoder API_AVAILABLE(macos(11.0), ios(14.0));
 
+- (id <MTLAccelerationStructureCommandEncoder>)accelerationStructureCommandEncoderWithDescriptor:(MTLAccelerationStructurePassDescriptor *)descriptor API_AVAILABLE(macos(13.0), ios(16.0));
+
 /*!
  @method pushDebugGroup:
  @abstract Push a new named string onto a stack of string labels.
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h	2022-02-23 10:58:35.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h	2022-05-31 15:04:36.000000000 -0400
@@ -18,7 +18,7 @@
 {
 	MTLResourceUsageRead   = 1 << 0,
 	MTLResourceUsageWrite  = 1 << 1,
-	MTLResourceUsageSample = 1 << 2
+	MTLResourceUsageSample API_DEPRECATED_WITH_REPLACEMENT("MTLResourceUsageRead", macos(10.13, 13.0), ios(11.0, 16.0)) = 1 << 2
 } API_AVAILABLE(macos(10.13), ios(11.0));
 
 /*!
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h	2022-02-23 07:57:44.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h	2022-05-31 15:04:34.000000000 -0400
@@ -207,7 +207,7 @@
 /*!
  @method waitForFence:
  @abstract Prevent further GPU work until the fence is reached.
- @discussion The fence is evaluated at kernel submision to maintain global order and prevent deadlock.
+ @discussion The fence is evaluated at kernel submission to maintain global order and prevent deadlock.
  Drivers may delay fence updates until the end of the encoder. Drivers may also wait on fences at the beginning of an encoder. It is therefore illegal to wait on a fence after it has been updated in the same encoder.
  */
 - (void)waitForFence:(id <MTLFence>)fence API_AVAILABLE(macos(10.13), ios(10.0));
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePass.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePass.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePass.h	2022-02-23 10:58:35.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePass.h	2022-05-31 15:04:37.000000000 -0400
@@ -54,7 +54,7 @@
 /* Individual attachment state access */
 - (MTLComputePassSampleBufferAttachmentDescriptor *)objectAtIndexedSubscript:(NSUInteger)attachmentIndex;
 
-/* This always uses 'copy' semantics.  It is safe to set the attachment state at any legal index to nil, which resets that attachment descriptor state to default vaules. */
+/* This always uses 'copy' semantics.  It is safe to set the attachment state at any legal index to nil, which resets that attachment descriptor state to default values. */
 - (void)setObject:(nullable MTLComputePassSampleBufferAttachmentDescriptor *)attachment atIndexedSubscript:(NSUInteger)attachmentIndex;
 
 @end
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h	2022-02-23 07:57:46.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h	2022-05-31 14:50:45.000000000 -0400
@@ -21,8 +21,8 @@
 MTL_EXPORT API_AVAILABLE(macos(10.11), ios(8.0))
 @interface MTLComputePipelineReflection : NSObject
 
-@property (readonly) NSArray <MTLArgument *> *arguments;
-
+@property (nonnull, readonly) NSArray<id<MTLBinding>> *bindings API_AVAILABLE(macos(13.0), ios(16.0));
+@property (readonly) NSArray <MTLArgument *> *arguments API_DEPRECATED_WITH_REPLACEMENT("bindings", macos(10.11, API_TO_BE_DEPRECATED), ios(8.0, API_TO_BE_DEPRECATED));
 
 @end
 
@@ -101,6 +101,7 @@
 @property (readwrite, nullable, nonatomic, copy) NSArray<id<MTLBinaryArchive>> *binaryArchives API_AVAILABLE(macos(11.0), ios(14.0));
 
 
+
 /*!
  @method reset
  @abstract Restore all compute pipeline descriptor properties to their default values.
@@ -186,6 +187,18 @@
  */
 @property (readonly) BOOL supportIndirectCommandBuffers API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0));
 
+/*!
+ @property gpuHandle
+ @abstract accessible by the CPU, and used to get the device handle of a resource/object that could be normally passed to the GPU within an argument buffer
+ this will be deleted as the gpuResourceID will replace it
+ */
+@property (readonly) MTLGPUHandle gpuHandle;
+/*!
+ @property gpuResourceID
+ @abstract Accessible by the CPU, it is used to get the handle of a GPU resource that could be normally passed to the GPU
+ */
+@property (readonly) MTLResourceID gpuResourceID API_AVAILABLE(macos(13.0), ios(16.0));
+
 
 /*!
  @method functionHandleWithFunction:
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCounters.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCounters.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCounters.h	2022-02-23 07:57:46.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCounters.h	2022-06-03 18:08:08.000000000 -0400
@@ -16,7 +16,7 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-#define MTLCounterErrorValue ((uint64_t)-1)
+#define MTLCounterErrorValue ((uint64_t)~0ULL)
 #define MTLCounterDontSample ((NSUInteger)-1)
 
 /*!
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h	2022-02-23 10:58:33.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h	2022-05-31 15:04:34.000000000 -0400
@@ -15,6 +15,7 @@
 #import <IOSurface/IOSurface.h>
 #import <Metal/MTLCounters.h>
 
+
 NS_ASSUME_NONNULL_BEGIN
 @protocol MTLCommandQueue;
 @protocol MTLDevice;
@@ -34,6 +35,7 @@
 @class MTLRasterizationRateMapDescriptor;
 @class MTLTileRenderPipelineDescriptor;
 @class MTLTilePipelineColorAttachmentDescriptor;
+@class MTLMeshRenderPipelineDescriptor;
 @class MTLSamplerDescriptor;
 @class MTLRenderPipelineColorAttachmentDescriptor;
 @class MTLDepthStencilDescriptor;
@@ -67,6 +69,22 @@
 @protocol MTLIntersectionFunctionTable;
 @class MTLIntersectionFunctionTableDescriptor;
 @class MTLStitchedLibraryDescriptor;
+@protocol MTLArgumentEncoder;
+
+@protocol MTLIOFileHandle;
+@protocol MTLIOCommandQueue;
+@class MTLIOCommandQueueDescriptor;
+
+
+typedef NS_ENUM(NSInteger, MTLIOCompressionMethod) {
+    MTLIOCompressionMethodZlib = 0,
+    MTLIOCompressionMethodLZFSE = 1,
+    MTLIOCompressionMethodLZ4 = 2,
+    MTLIOCompressionMethodLZMA = 3,
+    MTLIOCompressionMethodLZBitmap = 4,
+};
+
+
 
 /*!
  @brief Returns a reference to the preferred system default Metal device.
@@ -175,27 +193,30 @@
     
     MTLFeatureSet_tvOS_GPUFamily1_v4 API_AVAILABLE(tvos(12.0)) API_UNAVAILABLE(macos, ios) = 30004,
     MTLFeatureSet_tvOS_GPUFamily2_v2 API_AVAILABLE(tvos(12.0)) API_UNAVAILABLE(macos, ios) = 30005,
-} API_AVAILABLE(macos(10.11), ios(8.0), tvos(9.0));
+} API_DEPRECATED("Use MTLGPUFamily instead", macos(10.11, 13.0), ios(8.0, 16.0), tvos(9.0, 16.0));
 
 typedef NS_ENUM(NSInteger, MTLGPUFamily)
 {
-    MTLGPUFamilyApple1 = 1001,
-    MTLGPUFamilyApple2 = 1002,
-    MTLGPUFamilyApple3 = 1003,
-    MTLGPUFamilyApple4 = 1004,
-    MTLGPUFamilyApple5 = 1005,
-    MTLGPUFamilyApple6 = 1006,
-    MTLGPUFamilyApple7 = 1007,
+    MTLGPUFamilyApple1  = 1001,
+    MTLGPUFamilyApple2  = 1002,
+    MTLGPUFamilyApple3  = 1003,
+    MTLGPUFamilyApple4  = 1004,
+    MTLGPUFamilyApple5  = 1005,
+    MTLGPUFamilyApple6  = 1006,
+    MTLGPUFamilyApple7  = 1007,
+    MTLGPUFamilyApple8  = 1008,
     
-    MTLGPUFamilyMac1 = 2001,
+    MTLGPUFamilyMac1 API_DEPRECATED_WITH_REPLACEMENT("MTLGPUFamilyMac2", macos(10.15, 13.0), ios(13.0, 16.0)) = 2001,
     MTLGPUFamilyMac2 = 2002,
     
     MTLGPUFamilyCommon1 = 3001,
     MTLGPUFamilyCommon2 = 3002,
     MTLGPUFamilyCommon3 = 3003,
     
-    MTLGPUFamilyMacCatalyst1 = 4001,
-    MTLGPUFamilyMacCatalyst2 = 4002,
+    MTLGPUFamilyMacCatalyst1 API_DEPRECATED_WITH_REPLACEMENT("MTLGPUFamilyMac2", macos(10.15, 13.0), ios(13.0, 16.0)) = 4001,
+    MTLGPUFamilyMacCatalyst2 API_DEPRECATED_WITH_REPLACEMENT("MTLGPUFamilyMac2", macos(10.15, 13.0), ios(13.0, 16.0)) = 4002,
+    
+    MTLGPUFamilyMetal3 API_AVAILABLE(macos(13.0), ios(16.0)) = 5001,
 } API_AVAILABLE(macos(10.15), ios(13.0));
 
 /*!
@@ -253,6 +274,17 @@
     MTLSparseTextureRegionAlignmentModeInward    = 1,
 } API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0));
 
+/*!
+ @enum MTLSparsePageSize
+ @abstract Physical size of sparse resource page in KBs.
+ */
+typedef NS_ENUM(NSInteger, MTLSparsePageSize)
+{
+    MTLSparsePageSize16 = 16,
+    MTLSparsePageSize64 = 64,
+    MTLSparsePageSize256 = 256,
+} API_AVAILABLE(macos(13.0), ios(16.0));
+
 /**
  * @brief Describes the memory requirements for an acceleration structure
  */
@@ -377,7 +409,6 @@
 @end
 
 
-
 /*!
  @protocol MTLDevice
  @abstract MTLDevice represents a processor capable of data parallel computations
@@ -399,6 +430,7 @@
 */
 @property (readonly) uint64_t registryID API_AVAILABLE(macos(10.13), ios(11.0)) ;
 
+
 /*!
  @property maxThreadsPerThreadgroup
  @abstract The maximum number of threads along each dimension.
@@ -532,13 +564,14 @@
  @abstract Query device for Barycentric coordinates support; deprecated, use supportsShaderBarycentricCoordinates
  @return BOOL value. If YES, the device barycentric coordinates
  */
-@property(readonly, getter=areBarycentricCoordsSupported) BOOL barycentricCoordsSupported API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios);
+@property(readonly, getter=areBarycentricCoordsSupported) BOOL barycentricCoordsSupported API_DEPRECATED_WITH_REPLACEMENT("supportsShaderBarycentricCoordinates", macos(10.15, 13.0), ios(14.0, 16.0));
+
 /*!
  @property supportsShaderBarycentricCoordinates
  @abstract Query device for Barycentric Coordinates support.
  @return BOOL value. If YES, the device supports barycentric coordinates. If NO, the device does not.
  */
- @property (readonly) BOOL supportsShaderBarycentricCoordinates API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios);
+ @property (readonly) BOOL supportsShaderBarycentricCoordinates API_AVAILABLE(macos(10.15), ios(14.0));
 
 /*!
  @property currentAllocatedSize
@@ -669,7 +702,8 @@
  @method newLibraryWithFile:
  @abstract Load a MTLLibrary from a metallib file.
  */
-- (nullable id <MTLLibrary>)newLibraryWithFile:(NSString *)filepath error:(__autoreleasing NSError **)error;
+- (nullable id <MTLLibrary>)newLibraryWithFile:(NSString *)filepath error:(__autoreleasing NSError **)error
+API_DEPRECATED("Use -newLibraryWithURL:error: instead", macos(10.11, 13.0), ios(8.0, 16.0));
 
 /*!
  @method newLibraryWithURL:
@@ -779,7 +813,7 @@
  @method supportsFeatureSet:
  @abstract Returns TRUE if the feature set is supported by this MTLDevice.
  */
-- (BOOL)supportsFeatureSet:(MTLFeatureSet)featureSet;
+- (BOOL)supportsFeatureSet:(MTLFeatureSet)featureSet API_DEPRECATED("Use supportsFamily instead", macos(10.11, 13.0), ios(8.0, 16.0), tvos(9.0, 16.0));
 
 /*!
  @method supportsFamily:
@@ -821,6 +855,23 @@
 - (void)newRenderPipelineStateWithTileDescriptor:(MTLTileRenderPipelineDescriptor *)descriptor options:(MTLPipelineOption)options completionHandler:(MTLNewRenderPipelineStateWithReflectionCompletionHandler)completionHandler API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5));
 
 /*!
+ @method newRenderPipelineStateWithMeshDescriptor:options:reflection:error:
+ @abstract Create and compile a new MTLRenderPipelineState object synchronously given a MTLMeshRenderPipelineDescriptor.
+ */
+- (nullable id <MTLRenderPipelineState>)newRenderPipelineStateWithMeshDescriptor:(MTLMeshRenderPipelineDescriptor*)descriptor
+                                                                         options:(MTLPipelineOption)options
+                                                                      reflection:(MTLAutoreleasedRenderPipelineReflection * __nullable)reflection
+                                                                           error:(__autoreleasing NSError **)error API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method newRenderPipelineStateWithMeshDescriptor:options:completionHandler:
+ @abstract Create and compile a new MTLRenderPipelineState object asynchronously given a MTLMeshRenderPipelineDescriptor.
+ */
+- (void)newRenderPipelineStateWithMeshDescriptor:(MTLMeshRenderPipelineDescriptor *)descriptor
+                                         options:(MTLPipelineOption)options
+                               completionHandler:(MTLNewRenderPipelineStateWithReflectionCompletionHandler)completionHandler API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
  @property maxThreadgroupMemoryLength
  @abstract The maximum threadgroup memory available, in bytes.
  */
@@ -925,6 +976,42 @@
 
 //Keep around to keep building
 
+
+/*!
+ * @method newIOHandleWithURL:url:error:
+ * @abstract Create and return a handle that points to a raw file on disk. This object can be used by
+ * MTLIOCommandBuffer load commands to source data for MTLResources. If the creation
+ * of the handle fails the return value will be nil and the optional error if passed in will be non-nil
+ * with details of the error.
+ */
+-(nullable id<MTLIOFileHandle>) newIOHandleWithURL:(NSURL *)url
+                                error:(NSError **)error API_AVAILABLE(macos(13.0), ios(16.0));
+
+
+/*!
+ * @method newIOCommandQueueWithDescriptor:descriptor:error:
+ * @abstract Create and return an IO queue. If the creation
+ * of the queue fails the return value will be nil and the optional error if passed in will be non-nil
+ * with details of the error.
+ */
+-(nullable id<MTLIOCommandQueue>) newIOCommandQueueWithDescriptor:(MTLIOCommandQueueDescriptor*)descriptor
+                                            error:(NSError **)error API_AVAILABLE(macos(13.0), ios(16.0));
+
+
+/*!
+ * @method newIOHandleWithURL:url:compressionMethod:error:
+ * @abstract Create and return a handle that points to a compressed file on disk (a file that was
+ * created with MTLIOCompressionContext). This object can be used by
+ * MTLIOCommandBuffer load commands to source data for MTLResources. If the creation
+ * of the handle fails the return value will be nil and the optional error if passed in will be non-nil
+ * with details of the error.
+ */
+-(nullable id<MTLIOFileHandle>) newIOHandleWithURL:(NSURL *)url
+                    compressionMethod:(MTLIOCompressionMethod)compressionMethod
+                                error:(NSError **)error API_AVAILABLE(macos(13.0), ios(16.0));
+
+
+
 /*!
  * @method sparseTileSizeWithTextureType:pixelFormat:sampleCount:
  * @abstract Returns tile size for sparse texture with given type, pixel format and sample count.
@@ -963,6 +1050,22 @@
 @required
 
 
+/*!
+ @property sparseTileSizeInBytesForSparsePageSize
+ @abstract Returns the number of bytes required to map one sparse texture tile for a given MTLSparsePageSize
+ */
+- (NSUInteger) sparseTileSizeInBytesForSparsePageSize:(MTLSparsePageSize)sparsePageSize API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ * @method sparseTileSizeWithTextureType:pixelFormat:sampleCount:sparsePageSize
+ * @abstract Returns tile size for sparse texture with given type, pixel format and sample count.
+ */
+-(MTLSize) sparseTileSizeWithTextureType:(MTLTextureType)textureType
+                             pixelFormat:(MTLPixelFormat)pixelFormat
+                             sampleCount:(NSUInteger)sampleCount
+                          sparsePageSize:(MTLSparsePageSize)sparsePageSize API_AVAILABLE(macos(13.0), ios(16.0));
+
+
 
 @property (readonly) NSUInteger maxBufferLength API_AVAILABLE(macos(10.14), ios(12.0));
 
@@ -1000,6 +1103,9 @@
            gpuTimestamp:(MTLTimestamp *)gpuTimestamp
     API_AVAILABLE(macos(10.15), ios(14.0));
 
+
+-(id<MTLArgumentEncoder>)newArgumentEncoderWithBufferBinding:(id<MTLBufferBinding>)bufferBinding API_AVAILABLE(macos(13.0), ios(16.0));
+
 /*!
  @method supportsCounterSampling:
  @abstract Query device for counter sampling points support.
@@ -1072,6 +1178,22 @@
 - (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));
 
+
+/*!
+ @method heapAccelerationStructureSizeAndAlignWithSize:
+ @abstract Determine the byte size of acceleration structures when sub-allocated from a heap.
+ @discussion This method can be used to help determine the required heap size.
+ */
+- (MTLSizeAndAlign)heapAccelerationStructureSizeAndAlignWithSize:(NSUInteger)size API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method heapAccelerationStructureSizeAndAlignWithDescriptor:
+ @abstract Determine the byte size of acceleration structures when sub-allocated from a heap. This is a convenience method which computes the acceleration structure size based on the descriptor.
+ @discussion This method can be used to help determine the required heap size.
+ */
+- (MTLSizeAndAlign)heapAccelerationStructureSizeAndAlignWithDescriptor:(MTLAccelerationStructureDescriptor *)descriptor API_AVAILABLE(macos(13.0), ios(16.0));
+
+
 /*!
  @property supportsFunctionPointers
  @abstract Query device support for using function pointers from compute pipelines.
@@ -1100,5 +1222,6 @@
  */
 @property (readonly) BOOL supportsPrimitiveMotionBlur API_AVAILABLE(macos(11.0), ios(14.0));
 
+
 @end
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDrawable.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDrawable.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDrawable.h	2022-02-23 10:58:34.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDrawable.h	2022-05-31 15:04:35.000000000 -0400
@@ -14,7 +14,7 @@
 /*!
  @typedef MTLDrawablePresentedHandler
  @abstract The presented callback function protocol
- @disucssion Be careful when you use delta between this presentedTime and previous frame's presentedTime to animate next frame. If the frame was presented using presentAfterMinimumDuration or presentAtTime, the presentedTime might includes delays to meet your specified present time. If you want to measure how much frame you can achieve, use GPUStartTime in the first command buffer of your frame rendering and GPUEndTime of your last frame rendering to calculate the frame interval.
+ @discussion Be careful when you use delta between this presentedTime and previous frame's presentedTime to animate next frame. If the frame was presented using presentAfterMinimumDuration or presentAtTime, the presentedTime might includes delays to meet your specified present time. If you want to measure how much frame you can achieve, use GPUStartTime in the first command buffer of your frame rendering and GPUEndTime of your last frame rendering to calculate the frame interval.
 */
 typedef void (^MTLDrawablePresentedHandler)(id<MTLDrawable>);
 
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionHandle.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionHandle.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionHandle.h	2022-02-23 10:58:34.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionHandle.h	2022-05-31 15:04:35.000000000 -0400
@@ -5,7 +5,6 @@
 //  Copyright © 2020 Apple, Inc. All rights reserved.
 //
 
-
 #import <Foundation/Foundation.h>
 #import <Metal/MTLDefines.h>
 #import <Metal/MTLLibrary.h>
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h	2022-02-23 08:01:11.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h	2022-05-31 14:53:15.000000000 -0400
@@ -11,6 +11,7 @@
 #import <Metal/MTLBuffer.h>
 #import <Metal/MTLTexture.h>
 #import <Metal/MTLTypes.h>
+#import <Metal/MTLAccelerationStructure.h>
 
 NS_ASSUME_NONNULL_BEGIN
 
@@ -62,6 +63,15 @@
  */
 @property (readwrite, nonatomic) MTLCPUCacheMode cpuCacheMode;
 
+
+
+/*!
+ @property sparsePageSize
+ @abstract The sparse page size to use for resources created from the heap.
+ */
+@property (readwrite, nonatomic) MTLSparsePageSize sparsePageSize API_AVAILABLE(macos(13.0), ios(16.0));
+
+
 /*!
  @property hazardTrackingMode
  @abstract Set hazard tracking mode for the heap. The default value is MTLHazardTrackingModeDefault.
@@ -224,6 +234,48 @@
  */
 - (nullable id<MTLTexture>)newTextureWithDescriptor:(MTLTextureDescriptor *)descriptor
                                              offset:(NSUInteger)offset API_AVAILABLE(macos(10.15), ios(13.0));
+
+/*!
+ @method newAccelerationStructureWithSize:
+ @abstract Create a new acceleration structure backed by heap memory.
+ @return The acceleration structure or nil if heap is full. Note that the MTLAccelerationStructure merely represents storage for an acceleration structure. It will still need to be populated via a build, copy, refit, etc.
+ */
+- (nullable id <MTLAccelerationStructure>)newAccelerationStructureWithSize:(NSUInteger)size API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method newAccelerationStructureWithDescriptor:
+ @abstract Create a new acceleration structure backed by heap memory.
+ @discussion This is a convenience method which creates the acceleration structure backed by heap memory. The acceleration structure size is inferred based on the descriptor.
+ @return The acceleration structure or nil if heap is full. Note that the MTLAccelerationStructure merely represents storage for an acceleration structure. It will still need to be populated via a build, copy, refit, etc.
+ */
+- (nullable id <MTLAccelerationStructure>)newAccelerationStructureWithDescriptor:(MTLAccelerationStructureDescriptor *)descriptor API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method newAccelerationStructureWithSize:offset:
+ @abstract Create a new acceleration structure backed by heap memory at the specified placement offset.
+ @discussion This method can only be used when heapType is set to MTLHeapTypePlacement.
+ Use "MTLDevice heapAccelerationStructureSizeAndAlignWithSize:" or "MTLDevice heapAccelerationStructureSizeAndAlignWithDescriptor:" to determine requiredSize and requiredAlignment.
+ Any resources that exist in this heap at overlapping half-open range [offset, offset + requiredSize) are implicitly aliased with the new resource.
+ @param size The requested size of the acceleration structure, in bytes.
+ @param offset The requested offset of the acceleration structure inside the heap, in bytes. Behavior is undefined if "offset + requiredSize > heap.size" or "offset % requiredAlignment != 0".
+ @return The acceleration structure, or nil if the heap is not a placement heap
+ */
+- (nullable id <MTLAccelerationStructure>)newAccelerationStructureWithSize:(NSUInteger)size offset:(NSUInteger)offset API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method newAccelerationStructureWithDescriptor:offset:
+ @abstract Create a new acceleration structure backed by heap memory at the specified placement offset.
+ @discussion This is a convenience method which computes the acceleration structure size based on the descriptor.
+ This method can only be used when heapType is set to MTLHeapTypePlacement.
+ Use "MTLDevice heapAccelerationStructureSizeAndAlignWithSize:" or "MTLDevice heapAccelerationStructureSizeAndAlignWithDescriptor:" to determine requiredSize and requiredAlignment.
+ Any resources that exist in this heap at overlapping half-open range [offset, offset + requiredSize) are implicitly aliased with the new resource.
+ @param descriptor The acceleration structure descriptor
+ @param offset The requested offset of the acceleration structure inside the heap, in bytes. Behavior is undefined if "offset + requiredSize > heap.size" or "offset % requiredAlignment != 0".
+ @return The acceleration structure, or nil if the heap is not a placement heap
+ */
+- (nullable id <MTLAccelerationStructure>)newAccelerationStructureWithDescriptor:(MTLAccelerationStructureDescriptor *)descriptor offset:(NSUInteger)offset API_AVAILABLE(macos(13.0), ios(16.0));
+
+
 @end
 
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandBuffer.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandBuffer.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandBuffer.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandBuffer.h	2022-05-27 23:53:07.000000000 -0400
@@ -0,0 +1,162 @@
+//
+//  MTLIOCommandBuffer.h
+//  Metal
+//
+//  Copyright © 2022 Apple, Inc. All rights reserved.
+//
+
+#import <Metal/MTLDefines.h>
+#import <Metal/MTLDevice.h>
+
+
+
+NS_ASSUME_NONNULL_BEGIN
+
+@protocol MTLIOCommandBuffer;
+@protocol MTLIOFileHandle;
+
+/* Used by MTLIOCommandBuffer to indicate completion status. */
+typedef NS_ENUM(NSInteger, MTLIOStatus) {
+    MTLIOStatusPending = 0,
+    MTLIOStatusCancelled = 1,
+    MTLIOStatusError = 2,
+    MTLIOStatusComplete = 3,
+};
+
+typedef void (^MTLIOCommandBufferHandler)(id<MTLIOCommandBuffer>);
+
+/*!
+ @protocol MTLIOCommandBuffer
+ @abstract represents a list of IO commands for a queue to execute
+*/
+@protocol MTLIOCommandBuffer <NSObject>
+
+/*!
+ @method addCompletedHandler:block:
+ @abstract Add a block to be called when this command buffer has completed execution.
+ */
+- (void) addCompletedHandler:(MTLIOCommandBufferHandler)block;
+
+/*!
+ @method loadBytes:size:sourceHandle:sourceHandleOffset
+ @abstract Encodes a command that loads from a handle
+ and offset into a memory location.
+ */
+- (void) loadBytes:(void *)pointer
+            size:(NSUInteger)size
+            sourceHandle:(id<MTLIOFileHandle>)sourceHandle
+            sourceHandleOffset:(NSUInteger)sourceHandleOffset;
+
+/*!
+ @method loadBuffer:buffer:offset:size:sourceHandle:sourceHandleOffset
+ @abstract Encodes a command that loads from a handle
+ and offset into a buffer and an offset.
+ */
+- (void) loadBuffer:(id<MTLBuffer>)buffer
+            offset:(NSUInteger)offset
+            size:(NSUInteger)size
+            sourceHandle:(id<MTLIOFileHandle>)sourceHandle
+            sourceHandleOffset:(NSUInteger)sourceHandleOffset;
+
+/*!
+ @method loadTexture:texture:slice:level:size:sourceBytesPerRow:sourceBytesPerImage:destinationOrigin:sourceHandle:sourceHandleOffset:
+ @abstract Encodes a command that loads a region from a handle
+ and offset into a texture at a given slice, level and origin.
+ */
+- (void) loadTexture:(id<MTLTexture>)texture
+            slice:(NSUInteger)slice
+            level:(NSUInteger)level
+            size:(MTLSize)size
+            sourceBytesPerRow:(NSUInteger)sourceBytesPerRow
+            sourceBytesPerImage:(NSUInteger)sourceBytesPerImage
+            destinationOrigin:(MTLOrigin)destinationOrigin
+            sourceHandle:(id<MTLIOFileHandle>)sourceHandle
+            sourceHandleOffset:(NSUInteger)sourceHandleOffset;
+/*!
+ @method copyStatusToBuffer:buffer:offset
+ @abstract Encodes a command that writes the status of this commandBuffer upon completion
+ to a buffer at a given offset
+ */
+- (void) copyStatusToBuffer:(id<MTLBuffer>)buffer
+                       offset:(NSUInteger)offset;
+
+/*!
+ @method commit
+ @abstract Commit a command buffer so it can be executed as soon as possible.
+ */
+- (void) commit;
+
+/*!
+ @method waitUntilCompleted
+ @abstract Synchronously wait for this command buffer to complete.
+ */
+- (void) waitUntilCompleted;
+
+/*!
+ @method tryCancel
+ @abstract request a cancellation of an in-flight command buffer.
+ */
+- (void) tryCancel;
+
+/*!
+ @method addBarrier
+ @abstract add a barrier that starts subsequent commands after all
+ the previously encoded commands have completed.
+ */
+- (void) addBarrier;
+
+/*!
+ @method pushDebugGroup:
+ @abstract Push a new named string onto a stack of string labels.
+ */
+- (void)pushDebugGroup:(NSString *)string;
+
+/*!
+ @method popDebugGroup
+ @abstract Pop the latest named string off of the stack.
+ */
+- (void)popDebugGroup;
+
+
+
+/*!
+ @method enqueue
+ @abstract Append this command buffer to the end of its MTLCommandQueue.
+*/
+- (void) enqueue;
+
+/*!
+@method waitForEvent:value:
+@abstract Encodes a command that pauses execution of this command buffer until the specified event reaches a given value.
+*/
+- (void) waitForEvent:(id<MTLSharedEvent>)event value:(uint64_t)value;
+
+/*!
+ @method signalEvent:value:
+ @abstract Encodes a command that signals an event with a given value.
+ */
+- (void) signalEvent:(id<MTLSharedEvent>)event value:(uint64_t)value;
+
+/*!
+ @property label
+ @abstract An optional label for this handle.
+*/
+@property (nullable, copy, atomic) NSString *label;
+
+/*!
+ @property status
+ @abstract status reports the completion status of the MTLIOCommandBuffer, pending, cancelled, error or complete.
+ */
+@property (readonly) MTLIOStatus status;
+
+/*!
+ @property error
+ @abstract If an error occurred during execution, the NSError may contain more details about the problem.
+ */
+@property (nullable, readonly) NSError *error;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandQueue.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandQueue.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandQueue.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandQueue.h	2022-06-03 18:10:25.000000000 -0400
@@ -0,0 +1,188 @@
+//
+//  MTLIOCommandQueue.h
+//  Metal
+//
+//  Copyright © 2022 Apple, Inc. All rights reserved.
+//
+
+#import <Metal/MTLDefines.h>
+#import <Metal/MTLDevice.h>
+
+
+
+NS_ASSUME_NONNULL_BEGIN
+
+@protocol MTLBuffer;
+@protocol MTLIOCommandBuffer;
+
+
+/* Used in MTLIOCommandQueueDescriptor to set the MTLIOQueue priority at creation time. */
+typedef NS_ENUM(NSInteger, MTLIOPriority) {
+    MTLIOPriorityHigh = 0,
+    MTLIOPriorityNormal = 1,
+    MTLIOPriorityLow = 2,
+};
+
+/* Used in MTLIOCommandQueueDescriptor to set the MTLIOQueue type at creation time. */
+typedef NS_ENUM(NSInteger, MTLIOCommandQueueType) {
+    MTLIOCommandQueueTypeConcurrent = 0,
+    MTLIOCommandQueueTypeSerial = 1,
+};
+
+
+API_AVAILABLE(macos(13.0), ios(16.0))
+MTL_EXTERN NSErrorDomain const MTLIOErrorDomain;
+
+/* Used by MTLIOFileHandle creation functions to indicate an error. */
+typedef NS_ERROR_ENUM(MTLIOErrorDomain, MTLIOError) {
+    MTLIOErrorURLInvalid       = 1,
+    MTLIOErrorInternal         = 2,
+};
+
+/*!
+ @protocol MTLIOCommandQueue
+ @abstract Represents a queue that schedules command buffers containing command that
+ read from handle objects and write to MTLResource objects.
+ */
+@protocol MTLIOCommandQueue <NSObject>
+
+
+/*!
+ @method enqueueBarrier
+ @abstract Inserts a barrier that ensures that all commandBuffers commited
+ prior are completed before any commandBuffers after start execution.
+ @discussion A serial commandQueue has implicit barriers between
+ each commandBuffer.
+ */
+- (void) enqueueBarrier;
+
+
+/*!
+ @method commandBuffer
+ @abstract Vends an autoreleased commandBuffer that can be used to
+ encode  commands that read from handle objects and write to MTLResource objects.
+ */
+- (id<MTLIOCommandBuffer>)commandBuffer;
+
+
+/*!
+ @method commandBufferWithUnretainedReferences
+ @abstract Vends an autoreleased commandBuffer that can be used to
+ encode  commands that read from handle objects and write to MTLResource objects.
+ This commandBuffer does not retain objects referenced by the commandBuffer
+ as an optimization.
+ @discussion For correct execution its the application's responsibility to retain
+ objects referenced by commands within the commandBuffer.
+ */
+- (id<MTLIOCommandBuffer>)commandBufferWithUnretainedReferences;
+
+/*!
+ @property label
+ @abstract An optional label for this handle.
+*/
+@property (nullable, copy, atomic) NSString *label;
+
+
+@end
+
+/*!
+ @protocol MTLIOScratchBuffer
+ @abstract An extendible protocol that can be used to wrap the buffers vended by
+ a custom allocator. The underlying buffer is used as scratch space for IO commands
+ that need it.
+ */
+@protocol MTLIOScratchBuffer<NSObject>
+
+@property (readonly) id<MTLBuffer> buffer;
+
+@end
+
+/*!
+ @protocol MTLIOScratchBufferAllocator
+ @abstract An extendible protocol that can implement a custom allocator passed
+ to the queue descriptor.
+ @discussion If provided, the queue will call newScratchBufferWithMinimumSize
+ when it needs scratch storage for IO commands. When the commands that use the memory
+ complete they return the storage by dealloc'ing the MTLIOScratchBuffer objects (where
+ the application can optionally pool the memory for use by future commands.
+ */
+@protocol MTLIOScratchBufferAllocator <NSObject>
+
+/*!
+ @method newScratchBufferWithMinimumSize:minimumSize
+ @abstract This method is called when additional scratch memory is required by a load command.
+ @discussion  Scratch memory is needed for cases where a texture is being copied to. minimumSize
+ is the smallest buffer that will allow the command to execute, however a larger buffer can be provided and
+ susequent commands will be able to use it, thus avoiding the need for an additional callback. Returning nil
+ from the function will result in the load command being skipped and the commandBuffer getting cancelled.
+ */
+
+- (__nullable id<MTLIOScratchBuffer>) newScratchBufferWithMinimumSize:(NSUInteger)minimumSize;
+
+
+- (__nullable id<MTLIOScratchBuffer>) allocateScratchBufferWithMinimumSize:(NSUInteger)minimumSize; // DEPRECATED, remove with rdar://88998213 ([Fast Storage] remove allocateScratchBufferWithMinimumSize from MTLIOCommandQueue.h)
+
+@end
+
+/*!
+ @interface MTLIOCommandQueueDescriptor
+ @abstract Represents a descriptor to create a MTLIOCommandQueue.
+ */
+MTL_EXPORT API_AVAILABLE(macos(13.0), ios(16.0))
+@interface MTLIOCommandQueueDescriptor :  NSObject <NSCopying>
+
+/*!
+ @property maxCommandBufferCount
+ @abstract The maximum number of commandBuffers that can be in flight at a given time for the queue.
+*/
+@property (nonatomic, readwrite) NSUInteger maxCommandBufferCount;
+
+/*!
+ @property priority
+ @abstract The priority of the commands executed by this queue.
+*/
+@property (nonatomic, readwrite) MTLIOPriority priority;
+
+/*!
+ @property type
+ @abstract The type (serial or concurrent) of the queue.
+*/
+@property (nonatomic, readwrite) MTLIOCommandQueueType type;
+
+/*!
+ @property maxCommandsInFlight
+ @abstract The maximum number of IO commands that can be in flight at a given time for the queue.
+ @discussion A zero value defaults to the system dependent maximum value, a smaller number can be
+ provided to bound the utilization of the storage device.
+*/
+@property (nonatomic, readwrite) NSUInteger maxCommandsInFlight;
+
+/*!
+ @property scratchBufferAllocator
+ @abstract An optional property that allows setting a custom allocator for scratch buffers by the queue.
+ @discussion An application can manage scratch buffers manually by implemeting a class  conforming
+ to the MTLIOScratchBufferAllocator protocol and creating an instance that is passed in here.
+*/
+@property (nullable, readwrite, retain) id<MTLIOScratchBufferAllocator> scratchBufferAllocator;
+
+@end
+
+/*!
+ @protocol MTLIOFileHandle
+ @abstract Represents a  file (raw or compressed) that can be used as a source
+ for load commands encoded in a MTLIOCommandBuffer.
+ */
+@protocol MTLIOFileHandle <NSObject>
+
+/*!
+ @property label
+ @abstract An optional label for this handle.
+*/
+@property (nullable, copy, atomic) NSString *label;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+
+
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIOCompressor.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIOCompressor.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIOCompressor.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIOCompressor.h	2022-05-27 23:53:07.000000000 -0400
@@ -0,0 +1,44 @@
+//
+//  MTLIOCompression.h
+//  Metal
+//
+//  Copyright © 2022 Apple, Inc. All rights reserved.
+//
+
+#import <Metal/MTLDefines.h>
+#import <Metal/MTLDevice.h>
+
+
+
+typedef NS_ENUM(NSInteger, MTLIOCompressionStatus) {
+    MTLIOCompressionStatusComplete = 0,
+    MTLIOCompressionStatusError = 1
+};
+
+MTL_EXTERN const size_t kMTLIOCompressionContextDefaultChunkSize;
+
+/*
+ These methods are expected to be used by offline tools that
+ process and generate assets.
+ */
+
+/*
+ @function MTLIOCreateCompressionContext
+ @abstract used to create a context that writes a stream of data to
+ a path using a given codec and chunk size.
+ */
+MTL_EXTERN void* MTLIOCreateCompressionContext(const char* path, MTLIOCompressionMethod type, size_t chunkSize);
+
+/*
+ @function MTLIOCompressionContextAppendData
+ @abstract append data to a compression context.
+ */
+MTL_EXTERN void MTLIOCompressionContextAppendData(void* context, const void* data, size_t size);
+
+/*
+ @function MTLIOFlushAndDestroyCompressionContext
+ @abstract close the compression context and write the pack file.
+ */
+MTL_EXTERN MTLIOCompressionStatus MTLIOFlushAndDestroyCompressionContext(void* context);
+
+
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h	2022-02-23 10:58:35.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h	2022-05-31 14:53:16.000000000 -0400
@@ -77,17 +77,23 @@
 @property (readwrite, nonatomic) NSUInteger maxVertexBufferBindCount;
 
 /*!
- @absract
+ @abstract
  The maximum bind index of fragment argument buffers that can be set per command.
  */
 @property (readwrite, nonatomic) NSUInteger maxFragmentBufferBindCount;
 
 /*!
- @absract
+ @abstract
  The maximum bind index of kernel (or tile) argument buffers that can be set per command.
  */
 @property (readwrite, nonatomic) NSUInteger maxKernelBufferBindCount API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0));
 
+
+/*!
+ @abstract
+ Whether the render or compute commands can use ray tracing. Default value is NO.
+ */
+@property (readwrite, nonatomic) BOOL supportRayTracing API_AVAILABLE(macos(13.0), ios(16.0));
 @end
 
 
@@ -96,6 +102,18 @@
 
 @property (readonly) NSUInteger size;
 
+/*!
+ @property gpuHandle
+ @abstract accessible by the CPU, and used to get the device handle of a resource/object that could be normally passed to the GPU within an argument buffer
+ this will be deleted as the gpuResourceID will replace it
+ */
+@property (readonly) MTLGPUHandle gpuHandle;
+/*!
+ @property gpuResourceID
+ @abstract Accessible by the CPU, it is used to get the handle of a GPU resource that could be normally passed to the GPU
+ */
+@property (readonly) MTLResourceID gpuResourceID API_AVAILABLE(macos(13.0), ios(16.0));
+
 -(void)resetWithRange:(NSRange)range;
 
 - (id <MTLIndirectRenderCommand>)indirectRenderCommandAtIndex:(NSUInteger)commandIndex;
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h	2022-02-23 10:58:35.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h	2022-05-31 15:04:36.000000000 -0400
@@ -5,7 +5,7 @@
 //  Copyright © 2017 Apple, Inc. All rights reserved.
 //
 
-
+#import <Metal/MTLDefines.h>
 #import <Metal/MTLStageInputOutputDescriptor.h>
 #import <Metal/MTLRenderPipeline.h>
 
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h	2022-02-23 10:58:33.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h	2022-05-31 14:53:14.000000000 -0400
@@ -18,7 +18,7 @@
  */
 typedef NS_OPTIONS(NSUInteger, MTLIntersectionFunctionSignature) {
 	/**
-	 * @Brief No signature
+	 * @brief No signature
 	 */
 	MTLIntersectionFunctionSignatureNone = 0,
 
@@ -87,6 +87,18 @@
 - (void)setBuffers:(const id <MTLBuffer> __nullable [__nonnull])buffers offsets:(const NSUInteger [__nonnull])offsets withRange:(NSRange)range;
 
 
+/*!
+ @property gpuHandle
+ @abstract accessible by the CPU, and used to get the device handle of a resource/object that could be normally passed to the GPU within an argument buffer
+ this will be deleted as the gpuResourceID will replace it
+ */
+@property (readonly) MTLGPUHandle gpuHandle;
+/*!
+ @property gpuResourceID
+ @abstract Accessible by the CPU, it is used to get the handle of a GPU resource that could be normally passed to the GPU
+ */
+@property (readonly) MTLResourceID gpuResourceID API_AVAILABLE(macos(13.0), ios(16.0));
+
 - (void)setFunction:(nullable id <MTLFunctionHandle>)function atIndex:(NSUInteger)index;
 - (void)setFunctions:(const id <MTLFunctionHandle> __nullable [__nonnull])functions withRange:(NSRange)range;
 
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h	2022-02-23 10:58:35.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h	2022-05-31 15:04:36.000000000 -0400
@@ -77,6 +77,8 @@
     MTLFunctionTypeKernel = 3,
     MTLFunctionTypeVisible API_AVAILABLE(macos(11.0), ios(14.0)) = 5,
     MTLFunctionTypeIntersection API_AVAILABLE(macos(11.0), ios(14.0)) = 6,
+    MTLFunctionTypeMesh = 7,
+    MTLFunctionTypeObject = 8,
 } API_AVAILABLE(macos(10.11), ios(8.0));
 
 
@@ -179,7 +181,7 @@
 @end
 
 typedef NS_ENUM(NSUInteger, MTLLanguageVersion) {
-    MTLLanguageVersion1_0 API_AVAILABLE(ios(9.0)) API_UNAVAILABLE(macos, macCatalyst) = (1 << 16),
+    MTLLanguageVersion1_0 API_DEPRECATED("Use a newer language standard", ios(16.0, API_TO_BE_DEPRECATED)) = (1 << 16),
     MTLLanguageVersion1_1 API_AVAILABLE(macos(10.11), ios(9.0)) = (1 << 16) + 1,
     MTLLanguageVersion1_2 API_AVAILABLE(macos(10.12), ios(10.0)) = (1 << 16) + 2,
     MTLLanguageVersion2_0 API_AVAILABLE(macos(10.13), ios(11.0)) = (2 << 16),
@@ -187,6 +189,8 @@
     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,
+    MTLLanguageVersion3_0 API_AVAILABLE(macos(13.0), ios(16.0)) =
+    (3 << 16) + 0,
 } API_AVAILABLE(macos(10.11), ios(9.0));
 
 typedef NS_ENUM(NSInteger, MTLLibraryType) {
@@ -194,6 +198,22 @@
     MTLLibraryTypeDynamic = 1,
 } API_AVAILABLE(macos(11.0), ios(14.0));
 
+/*!
+ @enum MTLLibraryOptimizationLevel
+ @abstract Optimization level for the Metal compiler.
+ 
+ @constant MTLLibraryOptimizationLevelDefault
+ Optimize for program performance.
+ 
+ @constant MTLLibraryOptimizationLevelSize
+ Like default, with extra optimizations to reduce code size.
+ */
+typedef NS_ENUM(NSInteger, MTLLibraryOptimizationLevel)
+{
+    MTLLibraryOptimizationLevelDefault = 0,
+    MTLLibraryOptimizationLevelSize = 1,
+} API_AVAILABLE(macos(13.0), ios(16.0));
+
 MTL_EXPORT API_AVAILABLE(macos(10.11), ios(8.0))
 @interface MTLCompileOptions : NSObject <NSCopying>
 
@@ -237,8 +257,8 @@
  This property should be set such that the dynamic library can be found in the file system at the time a pipeline state is created.
  Specify one of:
  - an absolute path to a file from which the dynamic library can be loaded, or
- - a path relative to @executable_path, where @executable_path is substituted with the directory name from which the MTLLibrary containing the MTLFunction entrypoint used to create the pipeline state is loaded, or
- - a path relative to @loader_path, where @loader_path is substituted with the directory name from which the MTLLibrary with the reference to this installName embedded is loaded.
+ - a path relative to \@executable_path, where \@executable_path is substituted with the directory name from which the MTLLibrary containing the MTLFunction entrypoint used to create the pipeline state is loaded, or
+ - a path relative to \@loader_path, where \@loader_path is substituted with the directory name from which the MTLLibrary with the reference to this installName embedded is loaded.
  The first is appropriate for MTLDynamicLibrary written to the file-system using its serializeToURL:error: method on the current device.
  The others are appropriate when the MTLDynamicLibrary is installed as part of a bundle or app, where the absolute path is not known.
  This property is ignored when the type property is not set to MTLLibraryTypeDynamic.
@@ -261,6 +281,13 @@
  @abstract If YES,  set the compiler to compile shaders to preserve invariance.  The default is false.
  */
 @property (readwrite, nonatomic) BOOL preserveInvariance API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0));
+
+/*!
+ @property optimizationLevel
+ @abstract Sets the compiler optimization level.
+ */
+@property (readwrite, nonatomic) MTLLibraryOptimizationLevel optimizationLevel API_AVAILABLE(macos(13.0), ios(16.0));
+
 @end
 
 /*!
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h	2022-02-23 10:58:34.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h	2022-05-31 15:04:35.000000000 -0400
@@ -36,7 +36,7 @@
 /* Individual buffer descriptor access */
 - (MTLPipelineBufferDescriptor *)objectAtIndexedSubscript:(NSUInteger)bufferIndex;
 
-/* This always uses 'copy' semantics. It is safe to set the buffer descriptor at any legal index to nil, which resets that buffer descriptor to default vaules. */
+/* This always uses 'copy' semantics. It is safe to set the buffer descriptor at any legal index to nil, which resets that buffer descriptor to default values. */
 - (void)setObject:(nullable MTLPipelineBufferDescriptor *)buffer atIndexedSubscript:(NSUInteger)bufferIndex;
 
 @end
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h	2022-02-23 10:58:34.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h	2022-05-31 14:53:15.000000000 -0400
@@ -118,6 +118,8 @@
     MTLRenderStageVertex   = (1UL << 0),
     MTLRenderStageFragment = (1UL << 1),
     MTLRenderStageTile API_AVAILABLE(macos(12.0), ios(15.0)) = (1UL << 2),
+    MTLRenderStageObject   = (1UL << 3),
+    MTLRenderStageMesh     = (1UL << 4),
 } API_AVAILABLE(macos(10.13), ios(10.0));
 
 /*!
@@ -218,7 +220,7 @@
  @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));
+- (void)setVertexIntersectionFunctionTables:(const id <MTLIntersectionFunctionTable> __nullable [__nonnull])intersectionFunctionTables withBufferRange:(NSRange)range API_AVAILABLE(macos(12.0), ios(15.0));
 
 /*!
  @method setVertexAccelerationStructure:atBufferIndex:
@@ -375,7 +377,7 @@
  @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));
+- (void)setFragmentIntersectionFunctionTables:(const id <MTLIntersectionFunctionTable> __nullable [__nonnull])intersectionFunctionTables withBufferRange:(NSRange)range API_AVAILABLE(macos(12.0), ios(15.0));
 
 /*!
  @method setFragmentAccelerationStructure:atBufferIndex:
@@ -462,6 +464,183 @@
  */
 - (void)setStencilStoreActionOptions:(MTLStoreActionOptions)storeActionOptions API_AVAILABLE(macos(10.13), ios(11.0));
 
+/* Object Resources */
+
+/*!
+ @method setObjectBytes:length:atIndex:
+ @brief Set the data (by copy) for a given object shader buffer binding point.  This will remove any existing MTLBuffer from the binding point.
+ */
+- (void)setObjectBytes:(const void *)bytes length:(NSUInteger)length atIndex:(NSUInteger)index API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method setObjectBuffer:offset:atIndex:
+ @brief Set a global buffer for all object shaders at the given bind point index.
+ */
+- (void)setObjectBuffer:(nullable id <MTLBuffer>)buffer offset:(NSUInteger)offset atIndex:(NSUInteger)index API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method setObjectBufferOffset:atIndex:
+ @brief Set the offset within the current global buffer for all object shaders at the given bind point index.
+ */
+- (void)setObjectBufferOffset:(NSUInteger)offset atIndex:(NSUInteger)index API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method setObjectBuffers:offsets:withRange:
+ @brief Set an array of global buffers for all object shaders with the given bind point range.
+ */
+- (void)setObjectBuffers:(const id <MTLBuffer> __nullable [__nonnull])buffers offsets:(const NSUInteger [__nonnull])offsets withRange:(NSRange)range API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method setObjectTexture:atIndex:
+ @brief Set a global texture for all object shaders at the given bind point index.
+ */
+- (void)setObjectTexture:(nullable id <MTLTexture>)texture atIndex:(NSUInteger)index API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method setObjectTextures:withRange:
+ @brief Set an array of global textures for all object shaders with the given bind point range.
+ */
+- (void)setObjectTextures:(const id <MTLTexture> __nullable [__nonnull])textures withRange:(NSRange)range API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method setObjectSamplerState:atIndex:
+ @brief Set a global sampler for all object shaders at the given bind point index.
+ */
+- (void)setObjectSamplerState:(nullable id <MTLSamplerState>)sampler atIndex:(NSUInteger)index
+API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method setObjectSamplerStates:withRange:
+ @brief Set an array of global samplers for all object shaders with the given bind point range.
+ */
+- (void)setObjectSamplerStates:(const id <MTLSamplerState> __nullable [__nonnull])samplers withRange:(NSRange)range API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method setObjectSamplerState:lodMinClamp:lodMaxClamp:atIndex:
+ @brief Set a global sampler for all object shaders at the given bind point index.
+ */
+- (void)setObjectSamplerState:(nullable id <MTLSamplerState>)sampler lodMinClamp:(float)lodMinClamp lodMaxClamp:(float)lodMaxClamp atIndex:(NSUInteger)index API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method setObjectSamplerStates:lodMinClamps:lodMaxClamps:withRange:
+ @brief Set an array of global samplers for all object shaders with the given bind point range.
+ */
+- (void)setObjectSamplerStates:(const id <MTLSamplerState> __nullable [__nonnull])samplers lodMinClamps:(const float [__nonnull])lodMinClamps lodMaxClamps:(const float [__nonnull])lodMaxClamps withRange:(NSRange)range API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method setObjectThreadgroupMemoryLength:atIndex:
+ @brief Set the threadgroup memory byte length at the binding point specified by the index for all object shaders.
+ */
+- (void)setObjectThreadgroupMemoryLength:(NSUInteger)length atIndex:(NSUInteger)index API_AVAILABLE(macos(13.0), ios(16.0));
+
+/* Mesh Resources */
+
+/*!
+ @method setMeshBytes:length:atIndex:
+ @brief Set the data (by copy) for a given mesh shader buffer binding point.  This will remove any existing MTLBuffer from the binding point.
+ */
+- (void)setMeshBytes:(const void *)bytes length:(NSUInteger)length atIndex:(NSUInteger)index API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method setMeshBuffer:offset:atIndex:
+ @brief Set a global buffer for all mesh shaders at the given bind point index.
+ */
+- (void)setMeshBuffer:(nullable id <MTLBuffer>)buffer offset:(NSUInteger)offset atIndex:(NSUInteger)index API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method setMeshBufferOffset:atIndex:
+ @brief Set the offset within the current global buffer for all mesh shaders at the given bind point index.
+ */
+- (void)setMeshBufferOffset:(NSUInteger)offset atIndex:(NSUInteger)index API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method setMeshBuffers:offsets:withRange:
+ @brief Set an array of global buffers for all mesh shaders with the given bind point range.
+ */
+- (void)setMeshBuffers:(const id <MTLBuffer> __nullable [__nonnull])buffers offsets:(const NSUInteger [__nonnull])offsets withRange:(NSRange)range API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method setMeshTexture:atIndex:
+ @brief Set a global texture for all mesh shaders at the given bind point index.
+ */
+- (void)setMeshTexture:(nullable id <MTLTexture>)texture atIndex:(NSUInteger)index API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method setMeshTextures:withRange:
+ @brief Set an array of global textures for all mesh shaders with the given bind point range.
+ */
+- (void)setMeshTextures:(const id <MTLTexture> __nullable [__nonnull])textures withRange:(NSRange)range API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method setMeshSamplerState:atIndex:
+ @brief Set a global sampler for all mesh shaders at the given bind point index.
+ */
+- (void)setMeshSamplerState:(nullable id <MTLSamplerState>)sampler atIndex:(NSUInteger)index
+API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method setMeshSamplerStates:withRange:
+ @brief Set an array of global samplers for all mesh shaders with the given bind point range.
+ */
+- (void)setMeshSamplerStates:(const id <MTLSamplerState> __nullable [__nonnull])samplers withRange:(NSRange)range API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method setMeshSamplerState:lodMinClamp:lodMaxClamp:atIndex:
+ @brief Set a global sampler for all mesh shaders at the given bind point index.
+ */
+- (void)setMeshSamplerState:(nullable id <MTLSamplerState>)sampler lodMinClamp:(float)lodMinClamp lodMaxClamp:(float)lodMaxClamp atIndex:(NSUInteger)index API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method setMeshSamplerStates:lodMinClamps:lodMaxClamps:withRange:
+ @brief Set an array of global samplers for all mesh shaders with the given bind point range.
+ */
+- (void)setMeshSamplerStates:(const id <MTLSamplerState> __nullable [__nonnull])samplers lodMinClamps:(const float [__nonnull])lodMinClamps lodMaxClamps:(const float [__nonnull])lodMaxClamps withRange:(NSRange)range API_AVAILABLE(macos(13.0), ios(16.0));
+
+/* Drawing computed geometry using object / mesh shaders */
+
+/*!
+ @method drawMeshThreadgroups:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:
+ @abstract Enqueue a grid of object (if present) or mesh shader threadgroups.
+ @discussion The dimensions of the threadgroups and the grid are specified directly.
+ @param threadgroupsPerGrid The number of threadgroups in the object (if present) or mesh shader grid.
+ @param threadsPerObjectThreadgroup The number of threads in one object shader threadgroup. Ignored if object shader is not present.
+ @param threadsPerMeshThreadgroup The number of threads in one mesh shader threadgroup.
+*/
+- (void)drawMeshThreadgroups:(MTLSize)threadgroupsPerGrid
+ threadsPerObjectThreadgroup:(MTLSize)threadsPerObjectThreadgroup
+   threadsPerMeshThreadgroup:(MTLSize)threadsPerMeshThreadgroup
+API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method drawMeshThreads:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:
+ @abstract Enqueue a grid of object (if present) of mesh shader threadgroups.
+ @discussion The dimensions of the threadgroups and the grid are specified directly.
+ The dimensions of threadsPerGrid does not have to be a multiple of threadsPerThreadgroup for object shaders.
+ For mesh shaders, threadsPerGrid is rounded down to the neareset multiple of threadsPerMeshThreadgroup (in each dimension).
+ @param threadsPerGrid The number of threads in the object (if present) or mesh shader grid
+ @param threadsPerObjectThreadgroup The number of threads in one object shader threadgroup. Ignored if object shader is not present.
+ @param threadsPerMeshThreadgroup The number of threads in one mesh shader threadgroup.
+*/
+- (void)     drawMeshThreads:(MTLSize)threadsPerGrid
+ threadsPerObjectThreadgroup:(MTLSize)threadsPerObjectThreadgroup
+   threadsPerMeshThreadgroup:(MTLSize)threadsPerMeshThreadgroup
+API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @method drawMeshThreadgroupsWithIndirectBuffer:indirectBufferOffset:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:
+ @abstract Enqueue a grid of object (if present) or mesh shader threadgroups.
+ @discussion The dimensions of the threadgroups are specified directly, the dimensions of the grid, in threadgroups, are read from a buffer by the GPU.
+ @param indirectBuffer A buffer object that the device will read the grid size from, see MTLDispatchThreadgroupsIndirectArguments.
+ @param indirectBufferOffset Byte offset within @a indirectBuffer to read arguments from.  @a indirectBufferOffset must be a multiple of 4.
+ @param threadsPerObjectThreadgroup The number of threads in one object shader threadgroup. Ignored if object shader is not present.
+ @param threadsPerMeshThreadgroup The number of threads in one mesh shader threadgroup.
+*/
+- (void)drawMeshThreadgroupsWithIndirectBuffer:(id<MTLBuffer>)indirectBuffer
+                          indirectBufferOffset:(NSUInteger)indirectBufferOffset
+                   threadsPerObjectThreadgroup:(MTLSize)threadsPerObjectThreadgroup
+                     threadsPerMeshThreadgroup:(MTLSize)threadsPerMeshThreadgroup
+API_AVAILABLE(macos(13.0), ios(16.0));
+
 /* Drawing */
 
 /*!
@@ -685,7 +864,7 @@
  @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));
+- (void)setTileIntersectionFunctionTables:(const id <MTLIntersectionFunctionTable> __nullable [__nonnull])intersectionFunctionTables withBufferRange:(NSRange)range API_AVAILABLE(macos(12.0), ios(15.0));
 
 /*!
  @method setTileAccelerationStructure:atBufferIndex:
@@ -714,7 +893,7 @@
      Note that calling useResource does not retain the resource. It is the responsiblity of the user to retain the resource until
      the command buffer has been executed.
  */
-- (void)useResource:(id <MTLResource>)resource usage:(MTLResourceUsage)usage API_AVAILABLE(macos(10.13), ios(11.0));
+- (void)useResource:(id <MTLResource>)resource usage:(MTLResourceUsage)usage API_DEPRECATED_WITH_REPLACEMENT("Use useResource:usage:stages: instead", macos(10.13, 13.0), ios(11.0, 16.0));
 
 /*!
  * @method useResources:count:usage:
@@ -724,12 +903,12 @@
    Note that calling useResources does not retain the resources. It is the responsiblity of the user to retain the resources until
    the command buffer has been executed.
 */
-- (void)useResources:(const id <MTLResource> __nonnull[__nonnull])resources count:(NSUInteger)count usage:(MTLResourceUsage)usage API_AVAILABLE(macos(10.13), ios(11.0));
+- (void)useResources:(const id <MTLResource> __nonnull[__nonnull])resources count:(NSUInteger)count usage:(MTLResourceUsage)usage API_DEPRECATED_WITH_REPLACEMENT("Use useResources:count:usage:stages: instead", macos(10.13, 13.0), ios(11.0, 16.0));
 
 /*!
  * @method useResources:usage:stage
  * @abstract Declare that a resource may be accessed by the render pass through an argument buffer
- * @For hazard tracked resources, this method protects against data hazards. This method must be called before encoding any draw commands which may access the resource through an argument buffer. However, this method may cause color attachments to become decompressed. Therefore, this method should be called until as late as possible within a render command encoder. Declaring a minimal usage (i.e. read-only) may prevent color attachments from becoming decompressed on some devices.
+ * @discussion For hazard tracked resources, this method protects against data hazards. This method must be called before encoding any draw commands which may access the resource through an argument buffer. However, this method may cause color attachments to become decompressed. Therefore, this method should be called until as late as possible within a render command encoder. Declaring a minimal usage (i.e. read-only) may prevent color attachments from becoming decompressed on some devices.
  
     Note that calling useResource does not retain the resource. It is the responsiblity of the user to retain the resource until
     the command buffer has been executed.
@@ -751,24 +930,24 @@
  * @abstract Declare that the resources allocated from a heap may be accessed by the render pass through an argument buffer
  * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resources allocated from the heap through an argument buffer. This method may cause all of the color attachments allocated from the heap to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
  */
-- (void)useHeap:(id <MTLHeap>)heap API_AVAILABLE(macos(10.13), ios(11.0));
+- (void)useHeap:(id <MTLHeap>)heap API_DEPRECATED_WITH_REPLACEMENT("Use useHeap:stages: instead", macos(10.13, 13.0), ios(11.0, 16.0));
 
 /*!
  * @method useHeaps:count:
  * @abstract Declare that the resources allocated from an array of heaps may be accessed by the render pass through an argument buffer
  * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resources allocated from the heaps through an argument buffer. This method may cause all of the color attachments allocated from the heaps to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
  */
-- (void)useHeaps:(const id <MTLHeap> __nonnull[__nonnull])heaps count:(NSUInteger)count API_AVAILABLE(macos(10.13), ios(11.0));
+- (void)useHeaps:(const id <MTLHeap> __nonnull[__nonnull])heaps count:(NSUInteger)count API_DEPRECATED_WITH_REPLACEMENT("Use useHeaps:count:stages: instead", macos(10.13, 13.0), ios(11.0, 16.0));
 
 /*!
- * @method useHeap:stages
+ * @method useHeap:stages:
  * @abstract Declare that the resources allocated from a heap may be accessed by the render pass through an argument buffer
  * @discussion If the heap is tracked, this method protects against hazard tracking; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resources allocated from the heap through an argument buffer. This method may cause all of the color attachments allocated from the heap to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
  */
 - (void)useHeap:(id <MTLHeap>)heap stages:(MTLRenderStages)stages API_AVAILABLE(macos(10.15), ios(13.0));
 
 /*!
- * @method useHeaps:count:stages
+ * @method useHeaps:count:stages:
  * @abstract Declare that the resources allocated from an array of heaps may be accessed by the render pass through an argument buffer
  * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resources allocated from the heaps through an argument buffer. This method may cause all of the color attachments allocated from the heaps to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
  */
@@ -797,14 +976,14 @@
  * @abstract Make stores to memory encoded before the barrier coherent with loads from memory encoded after the barrier.
  * @discussion The barrier makes stores coherent that 1) are to a resource with a type in the given scope, and 2) happen at (or before) the stage given by afterStages. Only affects loads that happen at (or after) the stage given by beforeStages.
  */
--(void)memoryBarrierWithScope:(MTLBarrierScope)scope afterStages:(MTLRenderStages)after beforeStages:(MTLRenderStages)before API_AVAILABLE(macos(10.14), macCatalyst(13.0)) API_UNAVAILABLE(ios);
+-(void)memoryBarrierWithScope:(MTLBarrierScope)scope afterStages:(MTLRenderStages)after beforeStages:(MTLRenderStages)before API_AVAILABLE(macos(10.14), macCatalyst(13.0), ios(16.0));
 
 /*!
  * @method memoryBarrierWithResources:count:afterStages:beforeStages:
  * @abstract Make stores to memory encoded before the barrier coherent with loads from memory encoded after the barrier.
  * @discussion The barrier makes stores coherent that 1) are to resources in given array, and 2) happen at (or before) the stage given by afterStages. Only affects loads that happen at (or after) the stage give by beforeStages.
  */
--(void)memoryBarrierWithResources:(const id<MTLResource> __nonnull[__nonnull])resources count:(NSUInteger)count afterStages:(MTLRenderStages)after beforeStages:(MTLRenderStages)before API_AVAILABLE(macos(10.14), macCatalyst(13.0)) API_UNAVAILABLE(ios);
+-(void)memoryBarrierWithResources:(const id<MTLResource> __nonnull[__nonnull])resources count:(NSUInteger)count afterStages:(MTLRenderStages)after beforeStages:(MTLRenderStages)before API_AVAILABLE(macos(10.14), macCatalyst(13.0), ios(16.0));
 
 
 
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h	2022-02-23 08:01:12.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h	2022-05-31 14:50:45.000000000 -0400
@@ -9,6 +9,16 @@
 #import <Metal/MTLDefines.h>
 
 
+typedef struct
+{
+    double red;
+    double green;
+    double blue;
+    double alpha;
+} MTLClearColor;
+
+MTL_INLINE MTLClearColor MTLClearColorMake(double red, double green, double blue, double alpha);
+
 
 @protocol MTLRasterizationRateMap;
 
@@ -39,16 +49,6 @@
     MTLStoreActionOptionCustomSamplePositions = 1 << 0,
 } API_AVAILABLE(macos(10.13), ios(11.0));
 
-typedef struct
-{
-    double red;
-    double green;
-    double blue;
-    double alpha;
-} MTLClearColor;
-
-MTL_INLINE MTLClearColor MTLClearColorMake(double red, double green, double blue, double alpha);
-
 @protocol MTLTexture;
 @protocol MTLBuffer;
 
@@ -213,7 +213,7 @@
 /* Individual attachment state access */
 - (MTLRenderPassColorAttachmentDescriptor *)objectAtIndexedSubscript:(NSUInteger)attachmentIndex;
 
-/* This always uses 'copy' semantics.  It is safe to set the attachment state at any legal index to nil, which resets that attachment descriptor state to default vaules. */
+/* This always uses 'copy' semantics.  It is safe to set the attachment state at any legal index to nil, which resets that attachment descriptor state to default values. */
 - (void)setObject:(nullable MTLRenderPassColorAttachmentDescriptor *)attachment atIndexedSubscript:(NSUInteger)attachmentIndex;
 
 @end
@@ -273,7 +273,7 @@
 /* Individual attachment state access */
 - (MTLRenderPassSampleBufferAttachmentDescriptor *)objectAtIndexedSubscript:(NSUInteger)attachmentIndex;
 
-/* This always uses 'copy' semantics.  It is safe to set the attachment state at any legal index to nil, which resets that attachment descriptor state to default vaules. */
+/* This always uses 'copy' semantics.  It is safe to set the attachment state at any legal index to nil, which resets that attachment descriptor state to default values. */
 - (void)setObject:(nullable MTLRenderPassSampleBufferAttachmentDescriptor *)attachment atIndexedSubscript:(NSUInteger)attachmentIndex;
 
 @end
@@ -325,14 +325,14 @@
 /*!
  @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.
+ @discussion 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), 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.
+ @discussion 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), tvos(14.5));
 
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h	2022-02-23 07:57:44.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h	2022-05-31 14:50:43.000000000 -0400
@@ -131,9 +131,16 @@
 MTL_EXPORT API_AVAILABLE(macos(10.11), ios(8.0))
 @interface MTLRenderPipelineReflection : NSObject
 
-@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), tvos(14.5));
+@property (nonnull, readonly) NSArray <id<MTLBinding>> *vertexBindings API_AVAILABLE(macos(13.0), ios(16.0));
+@property (nonnull, readonly) NSArray <id<MTLBinding>> *fragmentBindings API_AVAILABLE(macos(13.0), ios(16.0));
+@property (nonnull, readonly) NSArray <id<MTLBinding>> *tileBindings API_AVAILABLE(macos(13.0), ios(16.0));
+@property (nonnull, readonly) NSArray <id<MTLBinding>> *objectBindings API_AVAILABLE(macos(13.0), ios(16.0));
+@property (nonnull, readonly) NSArray <id<MTLBinding>> *meshBindings API_AVAILABLE(macos(13.0), ios(16.0));
+@property (nullable, readonly) NSArray <MTLArgument *> *vertexArguments API_DEPRECATED_WITH_REPLACEMENT("vertexBindings", macos(10.11, API_TO_BE_DEPRECATED), ios(8.0, API_TO_BE_DEPRECATED));
+@property (nullable, readonly) NSArray <MTLArgument *> *fragmentArguments API_DEPRECATED_WITH_REPLACEMENT("fragmentBindings", macos(10.11, API_TO_BE_DEPRECATED), ios(8.0, API_TO_BE_DEPRECATED));
+@property (nullable, readonly) NSArray <MTLArgument *> *tileArguments API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5)) API_DEPRECATED_WITH_REPLACEMENT("tileBindings", macos(11.0, API_TO_BE_DEPRECATED), ios(11.0, API_TO_BE_DEPRECATED));
+@property (nullable, readonly) NSArray <MTLArgument *> *objectArguments API_AVAILABLE(macos(13.0), ios(16.0)) API_DEPRECATED_WITH_REPLACEMENT("objectBindings", macos(13.0, API_TO_BE_DEPRECATED), ios(16.0, API_TO_BE_DEPRECATED));
+@property (nullable, readonly) NSArray <MTLArgument *> *meshArguments API_AVAILABLE(macos(13.0), ios(16.0)) API_DEPRECATED_WITH_REPLACEMENT("meshBindings", macos(13.0, API_TO_BE_DEPRECATED), ios(16.0, API_TO_BE_DEPRECATED));
 @end
 
 MTL_EXPORT API_AVAILABLE(macos(10.11), ios(8.0))
@@ -147,7 +154,7 @@
 @property (nullable, copy, nonatomic) MTLVertexDescriptor *vertexDescriptor;
 
 /* Rasterization and visibility state */
-@property (readwrite, nonatomic) NSUInteger sampleCount; //DEPRECATED - aliases rasterSampleCount property
+@property (readwrite, nonatomic) NSUInteger sampleCount API_DEPRECATED_WITH_REPLACEMENT("rasterSampleCount", macos(10.11, 13.0), ios(8.0, 16.0));
 @property (readwrite, nonatomic) NSUInteger rasterSampleCount;
 @property (readwrite, nonatomic, getter = isAlphaToCoverageEnabled) BOOL alphaToCoverageEnabled;
 @property (readwrite, nonatomic, getter = isAlphaToOneEnabled) BOOL alphaToOneEnabled;
@@ -250,6 +257,7 @@
 API_AVAILABLE(macos(12.0), ios(15.0));
 
 
+
 /*!
  @method reset
  @abstract Restore all pipeline descriptor properties to their default values.
@@ -323,6 +331,53 @@
 
 
 /*!
+ @property maxTotalThreadsPerObjectThreadgroup
+ @abstract The maximum total number of threads that can be in a single object shader threadgroup.
+ @discussion This value is set in MTLMeshRenderPipelineDescriptor.
+ */
+@property (readonly) NSUInteger maxTotalThreadsPerObjectThreadgroup API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @property maxTotalThreadsPerMeshThreadgroup
+ @abstract The maximum total number of threads that can be in a single mesh shader threadgroup.
+ @discussion This value is set in MTLMeshRenderPipelineDescriptor.
+ */
+@property (readonly) NSUInteger maxTotalThreadsPerMeshThreadgroup API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @property objectThreadExecutionWidth
+ @abstract The number of threads in a SIMD group of the object shader.
+ @discussion This value is also available in the shader with the [[threads_per_simdgroup]] attribute.
+ */
+@property (readonly) NSUInteger objectThreadExecutionWidth API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @property meshThreadExecutionWidth
+ @abstract The number of threads in a SIMD group of the mesh shader.
+ @discussion This value is also available in the shader with the [[threads_per_simdgroup]] attribute.
+ */
+@property (readonly) NSUInteger meshThreadExecutionWidth API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @property maxTotalThreadgroupsPerMeshGrid
+ @abstract The maximum total number of threadgroups that can be in a single mesh shader grid.
+ @discussion This value is set in MTLMeshRenderPipelineDescriptor.
+ */
+@property (readonly) NSUInteger maxTotalThreadgroupsPerMeshGrid API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
+ @property gpuHandle
+ @abstract accessible by the CPU, and used to get the device handle of a resource/object that could be normally passed to the GPU within an argument buffer
+ this will be deleted as the gpuResourceID will replace it
+ */
+@property (readonly) MTLGPUHandle gpuHandle;
+/*!
+ @property gpuResourceID
+ @abstract Accessible by the CPU, it is used to get the handle of a GPU resource that could be normally passed to the GPU
+ */
+@property (readonly) MTLResourceID gpuResourceID API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
  @method functionHandleWithFunction:stage:
  @brief Gets the function handle for the specified function on the specified stage of the pipeline.
  */
@@ -354,7 +409,7 @@
 /* Individual attachment state access */
 - (MTLRenderPipelineColorAttachmentDescriptor *)objectAtIndexedSubscript:(NSUInteger)attachmentIndex;
 
-/* This always uses 'copy' semantics.  It is safe to set the attachment state at any legal index to nil, which resets that attachment descriptor state to default vaules. */
+/* This always uses 'copy' semantics.  It is safe to set the attachment state at any legal index to nil, which resets that attachment descriptor state to default values. */
 - (void)setObject:(nullable MTLRenderPipelineColorAttachmentDescriptor *)attachment atIndexedSubscript:(NSUInteger)attachmentIndex;
 
 @end
@@ -374,7 +429,7 @@
 /* Individual tile attachment state access */
 - (MTLTileRenderPipelineColorAttachmentDescriptor*)objectAtIndexedSubscript:(NSUInteger)attachmentIndex;
 
-/* This always uses 'copy' semantics.  It is safe to set the attachment state at any legal index to nil, which resets that attachment descriptor state to default vaules. */
+/* This always uses 'copy' semantics.  It is safe to set the attachment state at any legal index to nil, which resets that attachment descriptor state to default values. */
 - (void)setObject:(MTLTileRenderPipelineColorAttachmentDescriptor*)attachment atIndexedSubscript:(NSUInteger)attachmentIndex;
 
 @end
@@ -457,6 +512,182 @@
 @property (readwrite, nonatomic) NSUInteger maxCallStackDepth
 API_AVAILABLE(macos(12.0), ios(15.0));
 
+
+- (void)reset;
+
+@end
+
+
+/*!
+ @class MTLMeshRenderPipelineDescriptor
+ @discussion As an alternative to a vertex + fragment shader render pipeline, this render pipeline uses a (object +) mesh + fragment shader for rendering geometry.
+ */
+MTL_EXPORT API_AVAILABLE(macos(13.0), ios(16.0))
+@interface MTLMeshRenderPipelineDescriptor : NSObject <NSCopying>
+
+/*!
+ @property label
+ @discussion A name or description provided by the application that will be displayed in debugging tools.
+ The default value is nil.
+ */
+@property (nullable, copy, nonatomic) NSString *label;
+
+/*!
+ @property objectFunction
+ @discussion Optional shader function responsible for determining how many threadgroups of the mesh shader to run, can optionally provide payload data for the mesh stage.
+ If this is nil, no payload data is available to the mesh function, and the draw command determines how many threadgroups of the mesh stage to run.
+ The default value is nil.
+ */
+@property (nullable, readwrite, nonatomic, strong) id <MTLFunction> objectFunction;
+
+/*!
+ @property meshFunction
+ @discussion Shader function responsible for exporting a chunk of geometry per threadgroup for the rasterizer.
+ The default value is nil.
+ */
+@property (nullable, readwrite, nonatomic, strong) id <MTLFunction> meshFunction;
+
+/*!
+ @property fragmentFunction
+ @discussion Like a classical render pipeline, this fragments covered by the rasterized geometry are shaded with this function.
+ The default value is nil. To create a pipeline, you must either set fragmentFunction to non-nil, or set rasterizationEnabled to NO.
+ */
+@property (nullable, readwrite, nonatomic, strong) id <MTLFunction> fragmentFunction;
+
+/*!
+ @property maxTotalThreadsPerObjectThreadgroup
+ @discussion The maximum size of the product of threadsPerObjectThreadgroup that can be used for draws with this pipeline.
+ This information can be used by the optimizer to generate more efficient code, specifically when the specified value does not exceed the thread execution width of the underlying GPU.
+ The default value is 0, which means that the value specified with the [[max_total_threads_per_threadgroup(N)]] specified on objectFunction will be used.
+ When both the [[max_total_threads_per_threadgroup(N)]] attribute and a non-zero value are specified, both values must match.
+ Any value specified cannot exceed the device limit as documented in the "Metal Feature Set Tables" for "Maximum threads per threadgroup".
+ */
+@property (readwrite, nonatomic) NSUInteger maxTotalThreadsPerObjectThreadgroup;
+
+/*!
+ @property maxTotalThreadsPerMeshThreadgroup
+ @discussion The maximum size of the product of threadsPerMeshThreadgroup that can be used for draws with this pipeline.
+ This information can be used by the optimizer to generate more efficient code, specifically when the specified value does not exceed the thread execution width of the underlying GPU.
+ The default value is 0, which means that the value specified with the [[max_total_threads_per_threadgroup(N)]] specified on meshFunction will be used.
+ When both the [[max_total_threads_per_threadgroup(N)]] attribute and a non-zero value are specified, both values must match.
+ Any value specified cannot exceed the device limit as documented in the "Metal Feature Set Tables" for "Maximum threads per threadgroup".
+ */
+@property (readwrite, nonatomic) NSUInteger maxTotalThreadsPerMeshThreadgroup;
+
+/*!
+ @property objectThreadgroupSizeIsMultipleOfThreadExecutionWidth
+ @discussion Set this value to YES when you will only use draws with the product of threadsPerObjectThreadgroup set to a multiple of the objectThreadExecutionWidth of the returned pipeline state.
+ This information can be used by the optimizer to generate more efficient code.
+ The default value is NO.
+ */
+@property (readwrite, nonatomic) BOOL objectThreadgroupSizeIsMultipleOfThreadExecutionWidth;
+
+/*!
+ @property meshThreadgroupSizeIsMultipleOfThreadExecutionWidth
+ @discussion Set this value to YES when you will only use draws with the product of threadsPerMeshThreadgroup set to a multiple of the meshThreadExecutionWidth of the returned pipeline state.
+ This information can be used by the optimizer to generate more efficient code.
+ The default value is NO.
+ */
+@property (readwrite, nonatomic) BOOL meshThreadgroupSizeIsMultipleOfThreadExecutionWidth;
+
+/*!
+ @property payloadMemoryLength
+ @discussion The size, in bytes, of the buffer indicated by [[payload]] in the object and mesh shader.
+ If this value is 0, the size of the dereferenced type declared in the object shader for the buffer is used (space for a single element is assumed for pointers).
+ The default value is 0.
+ */
+@property (readwrite, nonatomic) NSUInteger payloadMemoryLength;
+
+/*!
+ @property maxTotalThreadgroupsPerMeshGrid
+ @discussion The maximum value of the product of vector elements that the object shader may pass to the mesh_grid_properties::set_threadgroups_per_grid built-in function.
+ The default value is 0, which means that the value specified with the [[max_total_threadgroups_per_mesh_grid(N)]] specified on objectFunction will be used.
+ When both the [[max_total_threadgroups_per_mesh_grid(N)]] attribute and a non-zero value are specified, both values must match.
+ Any value specified cannot exceed the device limit as documented in the "Metal Feature Set Tables" for "Maximum threadgroups per mesh grid".
+ Specifying this value is optional; it may be used to improve scheduling of the workload. If neither this value nor the shader attribute are used, the device's maximum supported value is used instead.
+ */
+@property (readwrite, nonatomic) NSUInteger maxTotalThreadgroupsPerMeshGrid;
+
+/*!
+ @property objectBuffers
+ @abstract Provide mutability information on the buffers used by objectFunction.
+ @discussion Specifying these values is optional; it may be used to optimize the shader code.
+ */
+@property (readonly) MTLPipelineBufferDescriptorArray *objectBuffers;
+
+/*!
+ @property meshBuffers
+ @abstract Provide mutability information on the buffers used by meshFunction.
+ @discussion Specifying these values is optional; it may be used to optimize the shader code.
+ */
+@property (readonly) MTLPipelineBufferDescriptorArray *meshBuffers;
+
+/*!
+ @property fragmentBuffers
+ @abstract Provide mutability information on the buffers used by fragmentFunction.
+ @discussion Specifying these values is optional; it may be used to optimize the shader code.
+ */
+@property (readonly) MTLPipelineBufferDescriptorArray *fragmentBuffers;
+
+/*!
+ @property rasterSampleCount
+ @discussion The number of samples per fragment of the render pass in which this pipeline will be used.
+ */
+@property (readwrite, nonatomic) NSUInteger rasterSampleCount;
+
+/*!
+ @property alphaToCoverageEnabled
+ @abstract Whether the alpha value exported by the fragment shader for the first color attachment is converted to a sample mask, which is subsequently AND-ed with the fragments' sample mask
+ @discussion The default value is NO.
+ */
+@property (readwrite, nonatomic, getter = isAlphaToCoverageEnabled) BOOL alphaToCoverageEnabled;
+
+/*!
+ @property alphaToOneEnabled
+ @abstract Whether the alpha value exported by the fragment shader for all color attachments is modified to 1 (after evaluating alphaToCoverage).
+ @discussion The default value is NO.
+ */
+@property (readwrite, nonatomic, getter = isAlphaToOneEnabled) BOOL alphaToOneEnabled;
+
+/*!
+ @property rasterizationEnabled
+ @abstract Whether rasterization is disabled, all primitives are dropped prior to rasterization.
+ @discussion The default value is YES.
+ */
+@property (readwrite, nonatomic, getter = isRasterizationEnabled) BOOL rasterizationEnabled;
+
+/*!
+ @property maxVertexAmplificationCount
+ @abstract The maximum value that can be passed to setVertexAmplificationCount when using this pipeline.
+ @discussion The default value is 1. The value must be supported by the device, which can be checked with supportsVertexAmplificationCount.
+ */
+@property (readwrite, nonatomic) NSUInteger maxVertexAmplificationCount;
+
+/*!
+ @property colorAttachments
+ @abstract Describes the color attachments of the render pass in which this pipeline will be used.
+ */
+@property (readonly) MTLRenderPipelineColorAttachmentDescriptorArray *colorAttachments;
+
+/*!
+ @property depthAttachmentPixelFormat
+ @abstract The pixel format of the depth attachment of the render pass in which this pipeline will be used.
+ @discussion The default value is MTLPixelFormatInvalid; indicating no depth attachment will be used.
+ */
+@property (nonatomic) MTLPixelFormat depthAttachmentPixelFormat;
+
+/*!
+ @property stencilAttachmentPixelFormat
+ @abstract The pixel format of the stencil attachment of the render pass in which this pipeline will be used.
+ @discussion The default value is MTLPixelFormatInvalid; indicating no stencil attachment will be used.
+ */
+@property (nonatomic) MTLPixelFormat stencilAttachmentPixelFormat;
+
+
+/*!
+ @method reset
+ @abstract Restore all mesh pipeline descriptor properties to their default values.
+ */
 - (void)reset;
 
 @end
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h	2022-02-23 07:11:28.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h	2022-05-31 14:50:45.000000000 -0400
@@ -181,8 +181,8 @@
     MTLResourceHazardTrackingModeTracked API_AVAILABLE(macos(10.15), ios(13.0)) = MTLHazardTrackingModeTracked << MTLResourceHazardTrackingModeShift,
     
     // Deprecated spellings
-    MTLResourceOptionCPUCacheModeDefault       = MTLResourceCPUCacheModeDefaultCache,
-    MTLResourceOptionCPUCacheModeWriteCombined = MTLResourceCPUCacheModeWriteCombined,
+    MTLResourceOptionCPUCacheModeDefault       API_DEPRECATED_WITH_REPLACEMENT("MTLResourceCPUCacheModeDefaultCache", macos(10.11, 13.0), ios(8.0, 16.0)) = MTLResourceCPUCacheModeDefaultCache,
+    MTLResourceOptionCPUCacheModeWriteCombined API_DEPRECATED_WITH_REPLACEMENT("MTLResourceCPUCacheModeWriteCombined", macos(10.11, 13.0), ios(8.0, 16.0)) = MTLResourceCPUCacheModeWriteCombined,
 } API_AVAILABLE(macos(10.11), ios(8.0));
 
 @protocol MTLDevice;
@@ -258,7 +258,7 @@
 
 /*!
  @property allocatedSize
- @abstrace The size in bytes occupied by this resource
+ @abstract The size in bytes occupied by this resource
 */
 @property (readonly) NSUInteger allocatedSize API_AVAILABLE(macos(10.13), ios(11.0));
 
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStateCommandEncoder.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStateCommandEncoder.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStateCommandEncoder.h	2022-02-23 10:58:35.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStateCommandEncoder.h	2022-05-31 15:04:36.000000000 -0400
@@ -15,11 +15,6 @@
 #import <Metal/MTLResourceStatePass.h>
 
 NS_ASSUME_NONNULL_BEGIN
-/*!
- @header MTLResourceStateCommandEncoder
- @discussion Header file for MTLResourceStateCommandEncoder
- */
-
 
 /*!
  @enum MTLSparseTextureMappingMode
@@ -103,7 +98,7 @@
 /*!
  @method waitForFence:
  @abstract Prevent further GPU work until the fence is reached.
- @discussion The fence is evaluated at kernel submision to maintain global order and prevent deadlock.
+ @discussion The fence is evaluated at kernel submission to maintain global order and prevent deadlock.
  Drivers may delay fence updates until the end of the encoder. Drivers may also wait on fences at the beginning of an encoder. It is therefore illegal to wait on a fence after it has been updated in the same encoder.
  */
 - (void)waitForFence:(id <MTLFence>)fence API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0));
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h	2022-02-23 10:58:34.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h	2022-05-31 15:04:35.000000000 -0400
@@ -55,7 +55,7 @@
 /* Individual attachment state access */
 - (MTLResourceStatePassSampleBufferAttachmentDescriptor *)objectAtIndexedSubscript:(NSUInteger)attachmentIndex;
 
-/* This always uses 'copy' semantics.  It is safe to set the attachment state at any legal index to nil, which resets that attachment descriptor state to default vaules. */
+/* This always uses 'copy' semantics.  It is safe to set the attachment state at any legal index to nil, which resets that attachment descriptor state to default values. */
 - (void)setObject:(nullable MTLResourceStatePassSampleBufferAttachmentDescriptor *)attachment atIndexedSubscript:(NSUInteger)attachmentIndex;
 
 @end
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h	2022-02-23 10:58:35.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h	2022-05-31 15:04:36.000000000 -0400
@@ -215,5 +215,17 @@
  */
 @property (readonly) id <MTLDevice> device;
 
+/*!
+ @property gpuHandle
+ @abstract accessible by the CPU, and used to get the device handle of a resource/object that could be normally passed to the GPU within an argument buffer
+ this will be deleted as the gpuResourceID will replace it
+ */
+@property (readonly) MTLGPUHandle gpuHandle;
+/*!
+ @property gpuResourceID
+ @abstract Accessible by the CPU, it is used to get the handle of a GPU resource that could be normally passed to the GPU
+ */
+@property (readonly) MTLResourceID gpuResourceID API_AVAILABLE(macos(13.0), ios(16.0));
+
 @end
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h	2022-02-23 07:11:26.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h	2022-05-31 14:50:44.000000000 -0400
@@ -86,6 +86,7 @@
     MTLAttributeFormatShortNormalized API_AVAILABLE(macos(10.13), ios(11.0)) = 52,
     
     MTLAttributeFormatHalf API_AVAILABLE(macos(10.13), ios(11.0)) = 53,
+
     
 } API_AVAILABLE(macos(10.12), ios(10.0));
 
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h	2022-02-23 10:58:33.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h	2022-05-31 15:04:34.000000000 -0400
@@ -103,6 +103,11 @@
     MTLTextureUsagePixelFormatView = 0x0010,
 } API_AVAILABLE(macos(10.11), ios(9.0));
 
+typedef NS_ENUM(NSInteger, MTLTextureCompressionType)
+{
+    MTLTextureCompressionTypeLossless = 0,
+    MTLTextureCompressionTypeLossy = 1,
+} API_AVAILABLE(macos(12.0), ios(15.0));
 
 MTL_EXPORT API_AVAILABLE(macos(10.11), ios(8.0))
 @interface MTLTextureDescriptor : NSObject <NSCopying>
@@ -227,6 +232,19 @@
 @property (readwrite, nonatomic) BOOL allowGPUOptimizedContents API_AVAILABLE(macos(10.14), ios(12.0));
 
 /*!
+ @property compressionType
+ @abstract Controls how the texture contents will be compressed when written to by the GPU. Compression can be used to reduce the bandwidth usage and storage requirements of a texture.
+ @discussion The default compression type is lossless, meaning that no loss of precision will occur when the texture content is modified.
+ Losslessly compressed textures may benefit from reduced bandwidth usage when regions of correlated color values are written, but do not benefit from reduced storage requirements.
+ Enabling lossy compression for textures that can tolerate some precision loss will guarantee both reduced bandwidth usage and reduced storage requirements.
+ The amount of precision loss depends on the color values stored; regions with correlated color values can be represented with limited to no precision loss, whereas regions with unrelated color values suffer more precision loss.
+ Enabling lossy compression requires both storageMode == MTLStorageModePrivate, allowGPUOptimizedContents == YES, and cannot be combined with either MTLTextureUsagePixelFormatView, MTLTextureUsageShaderWrite, MTLTextureType1D(Array) or MTLTextureTypeTextureBuffer.
+ Moreover, not all MTLPixelFormat are supported with lossy compression, verify that the MTLDevice's GPU family supports the lossy compression feature for the pixelFormat requested.
+ Set allowGPUOptimizedContents to NO to opt out of both lossless and lossy compression; such textures do not benefit from either reduced bandwidth usage or reduced storage requirements, but have predictable CPU readback performance.
+ */
+@property (readwrite, nonatomic) MTLTextureCompressionType compressionType API_AVAILABLE(macos(12.0), ios(15.0));
+
+/*!
  @property swizzle
  @abstract Channel swizzle to use when reading or sampling from the texture, the default value is MTLTextureSwizzleChannelsDefault.
  */
@@ -397,6 +415,26 @@
 @property (readonly) BOOL allowGPUOptimizedContents API_AVAILABLE(macos(10.14), ios(12.0));
 
 /*!
+ @property compressionType
+ @abstract Returns the compression type of the texture
+ @discussion See the compressionType property on MTLTextureDescriptor
+ */
+@property (readonly) MTLTextureCompressionType compressionType API_AVAILABLE(macos(12.0), ios(15.0));
+
+
+/*!
+ @property gpuHandle
+ @abstract accessible by the CPU, and used to get the device handle of a resource/object that could be normally passed to the GPU within an argument buffer
+ this will be deleted as the gpuResourceID will replace it
+ */
+@property (readonly) MTLGPUHandle gpuHandle;
+/*!
+ @property gpuResourceID
+ @abstract Accessible by the CPU, it is used to get the handle of a GPU resource that could be normally passed to the GPU
+ */
+@property (readonly) MTLResourceID gpuResourceID API_AVAILABLE(macos(13.0), ios(16.0));
+
+/*!
  @method getBytes:bytesPerRow:bytesPerImage:fromRegion:mipmapLevel:slice:
  @abstract Copies a block of pixels from a texture slice into the application's memory.
  */
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h	2022-02-23 10:58:34.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h	2022-05-31 15:04:36.000000000 -0400
@@ -102,3 +102,23 @@
     MTLCoordinate2D result = {x, y};
     return result;
 } 
+
+/*!
+ @typedef MTLGPUHandle
+ @abstract Accessbile by the CPU, it is used to get the handle of a GPU resource that could be normally passed to the GPU
+ 
+ @discussion
+ A MTLGPUHandle represents a specific GPU resource, mutating this handle is undefined unless the mutation results in the value equalling an already existing handle of the same resource type.
+ */
+typedef uint64_t MTLGPUHandle;
+
+/*!
+ @typedef MTLResourceID
+ @abstract Accessible by the CPU, it is used to get the handle of a GPU resource that could be normally passed to the GPU
+ @discussion
+ A MTLResourceID represents a specific GPU resource, mutating this handle is undefined unless the mutation results in the value equalling an already existing handle of the same resource type.
+ */
+typedef struct MTLResourceID
+{
+    uint64_t _impl;
+} MTLResourceID;
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h	2022-02-23 07:14:18.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h	2022-05-31 15:04:34.000000000 -0400
@@ -86,6 +86,7 @@
     MTLVertexFormatShortNormalized API_AVAILABLE(macos(10.13), ios(11.0)) = 52,
     
     MTLVertexFormatHalf API_AVAILABLE(macos(10.13), ios(11.0)) = 53,
+
     
 } API_AVAILABLE(macos(10.11), ios(8.0));
 
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVisibleFunctionTable.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVisibleFunctionTable.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVisibleFunctionTable.h	2022-02-23 10:58:35.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVisibleFunctionTable.h	2022-05-31 15:04:36.000000000 -0400
@@ -7,7 +7,7 @@
 
 #import <Metal/MTLDefines.h>
 
-
+#import <Metal/MTLTypes.h>
 #import <Metal/MTLResource.h>
 #import <Metal/MTLFunctionHandle.h>
 
@@ -31,6 +31,18 @@
 API_AVAILABLE(macos(11.0), ios(14.0))
 @protocol MTLVisibleFunctionTable <MTLResource>
 
+/*!
+ @property gpuHandle
+ @abstract accessible by the CPU, and used to get the device handle of a resource/object that could be normally passed to the GPU within an argument buffer
+ this will be deleted as the gpuResourceID will replace it
+ */
+@property (readonly) MTLGPUHandle gpuHandle;
+/*!
+ @property gpuResourceID
+ @abstract Accessible by the CPU, it is used to get the handle of a GPU resource that could be normally passed to the GPU
+ */
+@property (readonly) MTLResourceID gpuResourceID API_AVAILABLE(macos(13.0), ios(16.0));
+
 - (void)setFunction:(nullable id <MTLFunctionHandle>)function atIndex:(NSUInteger)index;
 
 - (void)setFunctions:(const id <MTLFunctionHandle> __nullable [__nonnull])functions withRange:(NSRange)range;
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes	2022-02-12 08:02:42.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes	2022-05-26 19:14:07.000000000 -0400
@@ -354,7 +354,16 @@
   SwiftName: ushort
 - Name: MTLVertexFormatUShortNormalized
   SwiftName: ushortNormalized
-
+- Name: MTLIOCompressionMethodZlib
+  SwiftName: zlib
+- Name: MTLIOCompressionMethodLZFSE
+  SwiftName: lzfse
+- Name: MTLIOCompressionMethodLZ4
+  SwiftName: lz4
+- Name: MTLIOCompressionMethodLZMA
+  SwiftName: lzma
+- Name: MTLIOCompressionMethodLZBitmap
+  SwiftName: lzBitmap
 Classes:
 - Name: MTLCaptureManager
   Methods:
@@ -440,6 +449,19 @@
     SwiftPrivate: true
 
 Protocols:
+- Name: MTLIOScratchBufferAllocator
+  Methods:
+  - Selector: 'newScratchBufferWithMinimumSize:'
+    SwiftName: makeScratchBuffer(minimumSize:)
+    MethodKind: Instance
+- Name: MTLIOCommandBuffer
+  Methods:
+  - Selector: 'waitForEvent:value:'
+    SwiftName: waitForEvent(_:value:)
+    MethodKind: Instance
+  - Selector: 'signalEvent:value:'
+    SwiftName: signalEvent(_:value:)
+    MethodKind: Instance
 - Name: MTLBlitCommandEncoder
   Methods:
   - Selector: 'synchronizeResource:'
@@ -533,6 +555,9 @@
   - Selector: 'accelerationStructureCommandEncoder'
     SwiftName: makeAccelerationStructureCommandEncoder()
     MethodKind: Instance
+  - Selector: 'accelerationStructureCommandEncoderWithDescriptor'
+    SwiftName: makeAccelerationStructureCommandEncoder(descriptor:)
+    MethodKind: Instance
   - Selector: 'encodeWaitForEvent:value:'
     SwiftName: encodeWaitForEvent(_:value:)
     MethodKind: Instance
@@ -555,6 +580,14 @@
   - Selector: 'commandBufferWithDescriptor:'
     SwiftName: makeCommandBuffer(descriptor:)
     MethodKind: Instance
+- Name: MTLIOCommandQueue
+  Methods:
+  - Selector: 'commandBuffer'
+    SwiftName: makeCommandBuffer()
+    MethodKind: Instance
+  - Selector: 'commandBufferWithUnretainedReferences'
+    SwiftName: makeCommandBufferWithUnretainedReferences()
+    MethodKind: Instance
 - Name: MTLComputeCommandEncoder
   Methods:
   - Selector: 'setBytes:length:atIndex:'
@@ -723,6 +756,12 @@
   - Selector: 'newRenderPipelineStateWithTileDescriptor:options:completionHandler:'
     SwiftName: makeRenderPipelineState(tileDescriptor:options:completionHandler:)
     MethodKind: Instance
+  - Selector: 'newRenderPipelineStateWithMeshDescriptor:options:completionHandler:'
+    SwiftName: makeRenderPipelineState(descriptor:options:completionHandler:)
+    MethodKind: Instance
+  - Selector: 'newRenderPipelineStateWithMeshDescriptor:options:reflection:error:'
+    SwiftPrivate: true
+    MethodKind: Instance
   - Selector: 'newComputePipelineStateWithFunction:completionHandler:'
     SwiftName: makeComputePipelineState(function:completionHandler:)
     MethodKind: Instance
@@ -834,6 +873,21 @@
   - Selector: 'newAccelerationStructureWithDescriptor:'
     SwiftName: makeAccelerationStructure(descriptor:)
     MethodKind: Instance
+  - Selector: 'heapAccelerationStructureSizeAndAlignWithSize:'
+    SwiftName: heapAccelerationStructureSizeAndAlign(size:)
+    MethodKind: Instance
+  - Selector: 'heapAccelerationStructureSizeAndAlignWithDescriptor:'
+    SwiftName: heapAccelerationStructureSizeAndAlign(descriptor:)
+    MethodKind: Instance
+  - Selector: 'newIOHandleWithURL:error:'
+    SwiftName: makeIOHandle(url:)
+    MethodKind: Instance
+  - Selector: 'newIOHandleWithURL:compressionMethod:error:'
+    SwiftName: makeIOHandle(url:compressionMethod:)
+    MethodKind: Instance
+  - Selector: 'newIOCommandQueueWithDescriptor:error:'
+    SwiftName: makeIOCommandQueue(descriptor:)
+    MethodKind: Instance
 - Name: MTLDrawable
   Methods:
   - Selector: 'presentAtTime:'
@@ -856,6 +910,18 @@
   - Selector: 'newTextureWithDescriptor:offset:'
     SwiftName: makeTexture(descriptor:offset:)
     MethodKind: Instance
+  - Selector: 'newAccelerationStructureWithSize:'
+    SwiftName: makeAccelerationStructure(size:)
+    MethodKind: Instance
+  - Selector: 'newAccelerationStructureWithDescriptor:'
+    SwiftName: makeAccelerationStructure(descriptor:)
+    MethodKind: Instance
+  - Selector: 'newAccelerationStructureWithSize:offset:'
+    SwiftName: makeAccelerationStructure(size:offset:)
+    MethodKind: Instance
+  - Selector: 'newAccelerationStructureWithDescriptor:offset:'
+    SwiftName: makeAccelerationStructure(descriptor:offset:)
+    MethodKind: Instance
 - Name: MTLIndirectArgumentEncoder
   Methods:
   - Selector: 'newIndirectArgumentEncoderForBufferAtIndex:'
@@ -1096,6 +1162,66 @@
   - Selector: 'setTileSamplerStates:lodMinClamps:lodMaxClamps:withRange:'
     MethodKind: Instance
     SwiftPrivate: true
+  - Selector: 'setObjectBytes:length:atIndex:'
+    SwiftName: setObjectBytes(_:length:index:)
+    MethodKind: Instance
+  - Selector: 'setObjectBuffer:offset:atIndex:'
+    SwiftName: setObjectBuffer(_:offset:index:)
+    MethodKind: Instance
+  - Selector: 'setObjectBuffers:offsets:withRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setObjectBufferOffset:atIndex:'
+    SwiftName: setObjectBufferOffset(_:index:)
+    MethodKind: Instance
+  - Selector: 'setObjectTexture:atIndex:'
+    SwiftName: setObjectTexture(_:index:)
+    MethodKind: Instance
+  - Selector: 'setObjectTextures:withRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setObjectSamplerState:atIndex:'
+    SwiftName: setObjectSamplerState(_:index:)
+    MethodKind: Instance
+  - Selector: 'setObjectSamplerStates:withRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setObjectSamplerState:lodMinClamp:lodMaxClamp:atIndex:'
+    SwiftName: setObjectSamplerState(_:lodMinClamp:lodMaxClamp:index:)
+    MethodKind: Instance
+  - Selector: 'setObjectSamplerStates:lodMinClamps:lodMaxClamps:withRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setMeshBytes:length:atIndex:'
+    SwiftName: setMeshBytes(_:length:index:)
+    MethodKind: Instance
+  - Selector: 'setMeshBuffer:offset:atIndex:'
+    SwiftName: setMeshBuffer(_:offset:index:)
+    MethodKind: Instance
+  - Selector: 'setMeshBuffers:offsets:withRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setMeshBufferOffset:atIndex:'
+    SwiftName: setMeshBufferOffset(_:index:)
+    MethodKind: Instance
+  - Selector: 'setMeshTexture:atIndex:'
+    SwiftName: setMeshTexture(_:index:)
+    MethodKind: Instance
+  - Selector: 'setMeshTextures:withRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setMeshSamplerState:atIndex:'
+    SwiftName: setMeshSamplerState(_:index:)
+    MethodKind: Instance
+  - Selector: 'setMeshSamplerStates:withRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setMeshSamplerState:lodMinClamp:lodMaxClamp:atIndex:'
+    SwiftName: setMeshSamplerState(_:lodMinClamp:lodMaxClamp:index:)
+    MethodKind: Instance
+  - Selector: 'setMeshSamplerStates:lodMinClamps:lodMaxClamps:withRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
   - Selector: 'setBlendColorRed:green:blue:alpha:'
     SwiftName: setBlendColor(red:green:blue:alpha:)
     MethodKind: Instance
@@ -1156,6 +1282,18 @@
   - Selector: 'useHeaps:count:'
     MethodKind: Instance
     SwiftPrivate: true
+  - Selector: 'useResource:usage:stages:'
+    SwiftName: useResource(_:usage:stages:)
+    MethodKind: Instance
+  - Selector: 'useResources:count:usage:stages:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'useHeap:stages:'
+    SwiftName: useHeap(_:stages:)
+    MethodKind: Instance
+  - Selector: 'useHeaps:count:stages:'
+    MethodKind: Instance
+    SwiftPrivate: true
   - Selector: 'memoryBarrierWithScope:afterStages:beforeStages:'
     MethodKind: Instance
     SwiftName: memoryBarrier(scope:after:before:)
@@ -1190,6 +1328,18 @@
   - Selector: 'setTileVisibleFunctionTables:withBufferRange:'
     MethodKind: Instance
     SwiftPrivate: true
+  - Selector: 'setObjectVisibleFunctionTable:atBufferIndex:'
+    SwiftName: setObjectVisibleFunctionTable(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setObjectVisibleFunctionTables:withBufferRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setMeshVisibleFunctionTable:atBufferIndex:'
+    SwiftName: setMeshVisibleFunctionTable(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setMeshVisibleFunctionTables:withBufferRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
   - Selector: 'setVertexIntersectionFunctionTable:atBufferIndex:'
     SwiftName: setVertexIntersectionFunctionTable(_:bufferIndex:)
     MethodKind: Instance
@@ -1217,6 +1367,24 @@
   - Selector: 'setTileAccelerationStructure:atBufferIndex:'
     SwiftName: setTileAccelerationStructure(_:bufferIndex:)
     MethodKind: Instance
+  - Selector: 'setObjectIntersectionFunctionTable:atBufferIndex:'
+    SwiftName: setObjectIntersectionFunctionTable(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setObjectIntersectionFunctionTables:withBufferRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setObjectAccelerationStructure:atBufferIndex:'
+    SwiftName: setObjectAccelerationStructure(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setMeshIntersectionFunctionTable:atBufferIndex:'
+    SwiftName: setMeshIntersectionFunctionTable(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setMeshIntersectionFunctionTables:withBufferRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setMeshAccelerationStructure:atBufferIndex:'
+    SwiftName: setMeshAccelerationStructure(_:bufferIndex:)
+    MethodKind: Instance
 - Name: MTLSharedEvent
   Methods:
   - Selector: 'newSharedEventHandle'
@@ -1358,6 +1526,9 @@
   - Selector: 'sampleCountersInBuffer:atSampleIndex:withBarrier:'
     MethodKind: Instance
     SwiftName: sampleCounters(sampleBuffer:sampleIndex:barrier:)
+  - Selector: 'refitAccelerationStructure:descriptor:destination:scratchBuffer:scratchBufferOffset:options:'
+    SwiftName: refit(sourceAccelerationStructure:descriptor:destinationAccelerationStructure:scratchBuffer:scratchBufferOffset:options:)
+    MethodKind: Instance
 - Name: MTLBinaryArchive
   Methods:
   - Selector: 'addComputePipelineFunctionsWithDescriptor:error:'
@@ -1369,6 +1540,9 @@
   - Selector: 'addTileRenderPipelineFunctionsWithDescriptor:error:'
     SwiftName: addTileRenderPipelineFunctions(descriptor:)
     MethodKind: Instance
+  - Selector: 'addMeshRenderPipelineFunctionsWithDescriptor:error:'
+    SwiftName: addMeshRenderPipelineFunctions(descriptor:)
+    MethodKind: Instance
   - Selector: 'addFunctionWithDescriptor:library:error:'
     SwiftName: addFunction(descriptor:library:)
     MethodKind: Instance
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h	2022-02-12 08:24:01.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h	2022-05-27 23:53:07.000000000 -0400
@@ -49,3 +49,6 @@
 #import <Metal/MTLBinaryArchive.h>
 #import <Metal/MTLIntersectionFunctionTable.h>
 #import <Metal/MTLFunctionStitching.h>
+#import <Metal/MTLIOCommandQueue.h>
+#import <Metal/MTLIOCommandBuffer.h>
+#import <Metal/MTLIOCompressor.h>
Clone this wiki locally