Skip to content

Metal tvOS xcode14.1 rc

Alex Soto edited this page Oct 18, 2022 · 1 revision

#Metal.framework

diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h	2022-10-06 13:22:03.000000000 -0400
@@ -0,0 +1,614 @@
+//
+//  MTLAccelerationStructure.h
+//  Metal
+//
+//  Copyright (c) 2020 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <Metal/MTLDefines.h>
+#import <Metal/MTLTypes.h>
+#import <Metal/MTLArgument.h>
+#import <Metal/MTLStageInputOutputDescriptor.h>
+#import <Metal/MTLRenderCommandEncoder.h>
+#import <Metal/MTLAccelerationStructureTypes.h>
+#import <Metal/MTLResource.h>
+#import <Metal/MTLStageInputOutputDescriptor.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@protocol MTLBuffer;
+@protocol MTLAccelerationStructure;
+
+typedef NS_OPTIONS(NSUInteger, MTLAccelerationStructureUsage) {
+    /**
+     * @brief Default usage
+     */
+    MTLAccelerationStructureUsageNone = 0,
+    
+    /**
+     * @brief Enable refitting for this acceleration structure. Note that this may reduce
+     * acceleration structure quality.
+     */
+    MTLAccelerationStructureUsageRefit = (1 << 0),
+   
+    /**
+     * @brief Prefer building this acceleration structure quickly at the cost of reduced ray
+     * tracing performance.
+     */
+    MTLAccelerationStructureUsagePreferFastBuild = (1 << 1),
+
+    /**
+     * @brief Enable extended limits for this acceleration structure, possibly at the cost of
+     * reduced ray tracing performance.
+     */
+    MTLAccelerationStructureUsageExtendedLimits API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0)) = (1 << 2),
+} API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+typedef NS_OPTIONS(uint32_t, MTLAccelerationStructureInstanceOptions) {
+    /**
+     * @brief No options
+     */
+    MTLAccelerationStructureInstanceOptionNone = 0,
+
+    /**
+     * @brief Disable triangle back or front face culling
+     */
+    MTLAccelerationStructureInstanceOptionDisableTriangleCulling = (1 << 0),
+
+    /**
+     * @brief Disable triangle back or front face culling
+     */
+    MTLAccelerationStructureInstanceOptionTriangleFrontFacingWindingCounterClockwise = (1 << 1),
+
+    /**
+     * @brief Geometry is opaque
+     */
+    MTLAccelerationStructureInstanceOptionOpaque = (1 << 2),
+
+    /**
+     * @brief Geometry is non-opaque
+     */
+    MTLAccelerationStructureInstanceOptionNonOpaque = (1 << 3),
+} API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+/**
+ * @brief Base class for acceleration structure descriptors. Do not use this class directly. Use
+ * one of the derived classes instead.
+ */
+MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
+@interface MTLAccelerationStructureDescriptor : NSObject <NSCopying>
+
+@property (nonatomic) MTLAccelerationStructureUsage usage;
+
+@end
+
+/**
+ * @brief Base class for all geometry descriptors. Do not use this class directly. Use one of the derived
+ * classes instead.
+ */
+MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
+@interface MTLAccelerationStructureGeometryDescriptor : NSObject <NSCopying>
+
+@property (nonatomic) NSUInteger intersectionFunctionTableOffset;
+
+/**
+ * @brief Whether the geometry is opaque
+ */
+@property (nonatomic) BOOL opaque;
+
+/**
+ * @brief Whether intersection functions may be invoked more than once per ray/primitive
+ * intersection. Defaults to YES.
+ */
+@property (nonatomic) BOOL allowDuplicateIntersectionFunctionInvocation;
+
+/**
+ * @brief Label
+ */
+@property (nonatomic, copy, nullable) NSString* label API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.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
+
+/**
+ * @brief Describes what happens to the object before the first motion key and after the last
+ * motion key.
+ */
+typedef NS_ENUM(uint32_t, MTLMotionBorderMode){
+
+    /**
+     * @brief Motion is stopped. (default)
+     */
+    MTLMotionBorderModeClamp = 0,
+
+    /**
+     * @brief Object disappears
+     */
+    MTLMotionBorderModeVanish = 1
+} API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/**
+ * @brief Descriptor for a primitive acceleration structure
+ */
+MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
+@interface MTLPrimitiveAccelerationStructureDescriptor : MTLAccelerationStructureDescriptor
+
+/**
+ * @brief Array of geometry descriptors. If motionKeyframeCount is greater than one all geometryDescriptors
+ * must be motion versions and have motionKeyframeCount of primitive buffers.
+ */
+@property (nonatomic, retain, nullable) NSArray <MTLAccelerationStructureGeometryDescriptor *> * geometryDescriptors;
+
+/**
+ * @brief Motion border mode describing what happens if acceleration structure is sampled before
+ * motionStartTime. If not set defaults to MTLMotionBorderModeClamp.
+ */
+@property (nonatomic) MTLMotionBorderMode motionStartBorderMode API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/**
+ * @brief Motion border mode describing what happens if acceleration structure is sampled after
+ * motionEndTime. If not set defaults to MTLMotionBorderModeClamp.
+ */
+@property (nonatomic) MTLMotionBorderMode motionEndBorderMode API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/**
+ * @brief Motion start time of this geometry. If not set defaults to 0.0f.
+ */
+@property (nonatomic) float motionStartTime API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/**
+ * @brief Motion end time of this geometry. If not set defaults to 1.0f.
+ */
+@property (nonatomic) float motionEndTime API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/**
+ * @brief Motion keyframe count. Is 1 by default which means no motion.
+ */
+@property (nonatomic) NSUInteger motionKeyframeCount API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
++ (instancetype)descriptor;
+
+@end
+
+/**
+ * @brief Descriptor for triangle geometry
+ */
+MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
+@interface MTLAccelerationStructureTriangleGeometryDescriptor : MTLAccelerationStructureGeometryDescriptor
+
+/**
+ * @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;
+
+/**
+ * @brief Vertex buffer offset. Must be a multiple of the vertex stride and must be aligned to the
+ * platform's buffer offset alignment.
+ */
+@property (nonatomic) NSUInteger vertexBufferOffset;
+
+/**
+ * @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;
+
+/**
+ * Optional index buffer containing references to vertices in the vertex buffer. May be nil.
+ */
+@property (nonatomic, retain, nullable) id <MTLBuffer> indexBuffer;
+
+/**
+ * @brief Index buffer offset. Must be a multiple of the index data type size and must be aligned to both
+ * the index data type's alignment and the platform's buffer offset alignment.
+ */
+@property (nonatomic) NSUInteger indexBufferOffset;
+
+/**
+ * @brief Index type
+ */
+@property (nonatomic) MTLIndexType indexType;
+
+/**
+ * @brief Number of triangles
+ */
+@property (nonatomic) NSUInteger triangleCount;
+
+/**
+ * @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
+
+/**
+ * @brief Descriptor for bounding box geometry
+ */
+MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
+@interface MTLAccelerationStructureBoundingBoxGeometryDescriptor : MTLAccelerationStructureGeometryDescriptor
+
+/**
+ * @brief Bounding box buffer containing MTLAxisAlignedBoundingBoxes. Must not be nil.
+ */
+@property (nonatomic, retain, nullable) id <MTLBuffer> boundingBoxBuffer;
+
+/**
+ * @brief Bounding box buffer offset. Must be a multiple of the bounding box stride and must be
+ * aligned to the platform's buffer offset alignment.
+ */
+@property (nonatomic) NSUInteger boundingBoxBufferOffset;
+
+/**
+ * @brief Stride, in bytes, between bounding boxes in the bounding box buffer. Must be at least 24
+ * bytes and must be a multiple of 4 bytes. Defaults to 24 bytes.
+ */
+@property (nonatomic) NSUInteger boundingBoxStride;
+
+/**
+ * @brief Number of bounding boxes
+ */
+@property (nonatomic) NSUInteger boundingBoxCount;
+
++ (instancetype)descriptor;
+
+@end
+
+/**
+ * @brief MTLbuffer and description how the data is stored in it.
+ */
+MTL_EXPORT API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0))
+@interface MTLMotionKeyframeData : NSObject
+
+/**
+ * @brief Buffer containing the data of a single keyframe. Multiple keyframes can be interleaved in one MTLBuffer.
+ */
+@property (nonatomic, retain, nullable) id <MTLBuffer> buffer;
+
+/**
+ * @brief Buffer offset. Must be a multiple of 4 bytes.
+ */
+@property (nonatomic) NSUInteger offset;
+
+
++ (instancetype)data;
+
+@end
+
+/**
+ * @brief Descriptor for motion triangle geometry
+ */
+MTL_EXPORT API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0))
+@interface MTLAccelerationStructureMotionTriangleGeometryDescriptor : MTLAccelerationStructureGeometryDescriptor
+
+/**
+ * @brief Vertex buffer containing triangle vertices similar to what MTLAccelerationStructureTriangleGeometryDescriptor has but array of the values.
+ */
+@property (nonatomic, copy) NSArray <MTLMotionKeyframeData *> * vertexBuffers;
+
+/**
+ * @brief 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;
+
+/**
+ * Optional index buffer containing references to vertices in the vertex buffer. May be nil.
+ */
+@property (nonatomic, retain, nullable) id <MTLBuffer> indexBuffer;
+
+/**
+ * @brief Index buffer offset. Must be a multiple of the index data type size and must be aligned to both
+ * the index data type's alignment and the platform's buffer offset alignment.
+ */
+@property (nonatomic) NSUInteger indexBufferOffset;
+
+/**
+ * @brief Index type
+ */
+@property (nonatomic) MTLIndexType indexType;
+
+/**
+ * @brief Number of triangles
+ */
+@property (nonatomic) NSUInteger triangleCount;
+
+/**
+ * @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
+
+/**
+ * @brief Descriptor for motion bounding box geometry
+ */
+MTL_EXPORT API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0))
+@interface MTLAccelerationStructureMotionBoundingBoxGeometryDescriptor : MTLAccelerationStructureGeometryDescriptor
+
+/**
+ * @brief Bounding box buffer containing MTLAxisAlignedBoundingBoxes similar to what MTLAccelerationStructureBoundingBoxGeometryDescriptor has but array of the values.
+ */
+@property (nonatomic, copy) NSArray <MTLMotionKeyframeData *> * boundingBoxBuffers;
+
+/**
+ * @brief Stride, in bytes, between bounding boxes in the bounding box buffer. Must be at least 24
+ * bytes and must be a multiple of 4 bytes. Defaults to 24 bytes.
+ */
+@property (nonatomic) NSUInteger boundingBoxStride;
+
+/**
+ * @brief Number of bounding boxes
+ */
+@property (nonatomic) NSUInteger boundingBoxCount;
+
++ (instancetype)descriptor;
+
+@end
+
+
+typedef struct {
+    /**
+     * @brief Transformation matrix describing how to transform the bottom-level acceleration structure.
+     */
+    MTLPackedFloat4x3 transformationMatrix;
+
+    /**
+     * @brief Instance options
+     */
+    MTLAccelerationStructureInstanceOptions options;
+    
+    /**
+     * @brief Instance mask used to ignore geometry during ray tracing
+     */
+    uint32_t mask;
+
+    /**
+     * @brief Used to index into intersection function tables
+     */
+    uint32_t intersectionFunctionTableOffset;
+    
+    /**
+     * @brief Acceleration structure index to use for this instance
+     */
+    uint32_t accelerationStructureIndex;
+} MTLAccelerationStructureInstanceDescriptor API_AVAILABLE(macos(11.0), ios(14.0));
+
+typedef struct {
+    /**
+     * @brief Transformation matrix describing how to transform the bottom-level acceleration structure.
+     */
+    MTLPackedFloat4x3 transformationMatrix;
+
+    /**
+     * @brief Instance options
+     */
+    MTLAccelerationStructureInstanceOptions options;
+
+    /**
+     * @brief Instance mask used to ignore geometry during ray tracing
+     */
+    uint32_t mask;
+
+    /**
+     * @brief Used to index into intersection function tables
+     */
+    uint32_t intersectionFunctionTableOffset;
+
+    /**
+     * @brief Acceleration structure index to use for this instance
+     */
+    uint32_t accelerationStructureIndex;
+
+    /**
+     * @brief User-assigned instance ID to help identify this instance in an
+     * application-defined way
+     */
+    uint32_t userID;
+} MTLAccelerationStructureUserIDInstanceDescriptor API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+typedef NS_ENUM(NSUInteger, MTLAccelerationStructureInstanceDescriptorType) {
+    /**
+     * @brief Default instance descriptor: MTLAccelerationStructureInstanceDescriptor
+     */
+    MTLAccelerationStructureInstanceDescriptorTypeDefault = 0,
+
+    /**
+     * @brief Instance descriptor with an added user-ID
+     */
+    MTLAccelerationStructureInstanceDescriptorTypeUserID = 1,
+
+    /**
+     * @brief Instance descriptor with support for motion
+     */
+    MTLAccelerationStructureInstanceDescriptorTypeMotion = 2,
+} API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+typedef struct {
+    /**
+     * @brief Instance options
+     */
+    MTLAccelerationStructureInstanceOptions options;
+
+    /**
+     * @brief Instance mask used to ignore geometry during ray tracing
+     */
+    uint32_t mask;
+
+    /**
+     * @brief Used to index into intersection function tables
+     */
+    uint32_t intersectionFunctionTableOffset;
+
+    /**
+     * @brief Acceleration structure index to use for this instance
+     */
+    uint32_t accelerationStructureIndex;
+
+    /**
+     * @brief User-assigned instance ID to help identify this instance in an
+     * application-defined way
+     */
+    uint32_t userID;
+
+    /**
+     * @brief The index of the first set of transforms describing one keyframe of the animation.
+     * These transforms are stored in a separate buffer and they are uniformly distributed over
+     * time time span of the motion.
+     */
+    uint32_t motionTransformsStartIndex;
+
+    /**
+     * @brief The count of motion transforms belonging to this motion which are stored in consecutive
+     * memory addresses at the separate motionTransforms buffer.
+     */
+    uint32_t motionTransformsCount;
+    /**
+     * @brief Motion border mode describing what happens if acceleration structure is sampled
+     * before motionStartTime
+     */
+    MTLMotionBorderMode motionStartBorderMode;
+
+    /**
+     * @brief Motion border mode describing what happens if acceleration structure is sampled
+     * after motionEndTime
+     */
+    MTLMotionBorderMode motionEndBorderMode;
+
+    /**
+     * @brief Motion start time of this instance
+     */
+    float motionStartTime;
+
+    /**
+     * @brief Motion end time of this instance
+     */
+    float motionEndTime;
+} MTLAccelerationStructureMotionInstanceDescriptor API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+
+/**
+ * @brief Descriptor for an instance acceleration structure
+ */
+MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
+@interface MTLInstanceAccelerationStructureDescriptor : MTLAccelerationStructureDescriptor
+
+/**
+ * @brief Buffer containing instance descriptors of the type specified by the instanceDescriptorType property
+ */
+@property (nonatomic, retain, nullable) id <MTLBuffer> instanceDescriptorBuffer;
+
+/**
+ * @brief Offset into the instance descriptor buffer. Must be a multiple of 64 bytes and must be
+ * aligned to the platform's buffer offset alignment.
+ */
+@property (nonatomic) NSUInteger instanceDescriptorBufferOffset;
+
+/**
+ * @brief Stride, in bytes, between instance descriptors in the instance descriptor buffer. Must
+ * be at least the size of the instance descriptor type and must be a multiple of 4 bytes.
+ * Defaults to the size of the instance descriptor type.
+ */
+@property (nonatomic) NSUInteger instanceDescriptorStride;
+
+/**
+ * @brief Number of instance descriptors
+ */
+@property (nonatomic) NSUInteger instanceCount;
+
+/**
+ * @brief Acceleration structures to be instanced
+ */
+@property (nonatomic, retain, nullable) NSArray <id <MTLAccelerationStructure>> * instancedAccelerationStructures;
+
+/**
+ * @brief Type of instance descriptor in the instance descriptor buffer. Defaults to
+ * MTLAccelerationStructureInstanceDescriptorTypeDefault.
+ */
+@property (nonatomic) MTLAccelerationStructureInstanceDescriptorType instanceDescriptorType API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/**
+ * @brief Buffer containing transformation information for motion
+ */
+@property (nonatomic, retain, nullable) id <MTLBuffer> motionTransformBuffer API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/**
+ * @brief Offset into the instance motion descriptor buffer. Must be a multiple of 64 bytes and
+ * must be aligned to the platform's buffer offset alignment.
+ */
+@property (nonatomic) NSUInteger motionTransformBufferOffset API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/**
+ * @brief Number of motion transforms
+ */
+@property (nonatomic) NSUInteger motionTransformCount API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
++ (instancetype)descriptor;
+
+@end
+
+API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
+@protocol MTLAccelerationStructure <MTLResource>
+
+@property (nonatomic, readonly) NSUInteger size;
+
+/*!
+ @property gpuResourceID
+ @abstract Handle of the GPU resource suitable for storing in an Argument Buffer
+ */
+@property (readonly) MTLResourceID gpuResourceID API_AVAILABLE(macos(13.0), ios(16.0));
+
+@end
+
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h	2022-10-06 13:22:04.000000000 -0400
@@ -0,0 +1,343 @@
+//
+//  MTLAccelerationStructureCommandEncoder.h
+//  Metal
+//
+//  Copyright © 2019 Apple, Inc. All rights reserved.
+
+
+#import <Foundation/Foundation.h>
+#import <Metal/MTLDefines.h>
+#import <Metal/MTLTypes.h>
+#import <Metal/MTLBuffer.h>
+#import <Metal/MTLArgument.h>
+#import <Metal/MTLCommandEncoder.h>
+#import <Metal/MTLFence.h>
+#import <Metal/MTLCommandBuffer.h>
+#import <Metal/MTLAccelerationStructure.h>
+
+
+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), tvos(16.0))
+@protocol MTLAccelerationStructureCommandEncoder <MTLCommandEncoder>
+
+/*!
+ * @brief Encode an acceleration structure build into the command buffer. All bottom-level acceleration
+ * structure builds must have completed before a top-level acceleration structure build may begin. The
+ * resulting acceleration structure will not retain any references to the input vertex buffer, instance buffer, etc.
+ *
+ * The acceleration structure build will not be completed until the command buffer has been committed
+ * and finished executing. However, it is safe to encode ray tracing work against the acceleration
+ * structure as long as the command buffers are scheduled and synchronized such that the command buffer
+ * will have completed by the time the ray tracing starts.
+ *
+ * The acceleration structure and scratch buffer must be at least the size returned by the
+ * [MTLDevice accelerationStructureSizesWithDescriptor:] query.
+ *
+ * @param accelerationStructure Acceleration structure storage to build into
+ * @param descriptor            Object describing the acceleration structure to build
+ * @param scratchBuffer         Scratch buffer to use while building the acceleration structure. The
+ *                              contents may be overwritten and are undefined after the build has
+ *                              started/completed.
+ * @param scratchBufferOffset   Offset into the scratch buffer
+ */
+- (void)buildAccelerationStructure:(id <MTLAccelerationStructure>)accelerationStructure
+                        descriptor:(MTLAccelerationStructureDescriptor *)descriptor
+                     scratchBuffer:(id <MTLBuffer>)scratchBuffer
+               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.
+ */
+- (void)refitAccelerationStructure:(id <MTLAccelerationStructure>)sourceAccelerationStructure
+                        descriptor:(MTLAccelerationStructureDescriptor *)descriptor
+                       destination:(nullable id <MTLAccelerationStructure>)destinationAccelerationStructure
+                     scratchBuffer:(id <MTLBuffer>)scratchBuffer
+               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.
+ *
+ * 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.
+ *
+ * @param sourceAccelerationStructure      Acceleration structure to copy from
+ * @param destinationAccelerationStructure Acceleration structure to copy to
+ */
+- (void)copyAccelerationStructure:(id <MTLAccelerationStructure>)sourceAccelerationStructure
+          toAccelerationStructure:(id <MTLAccelerationStructure>)destinationAccelerationStructure;
+
+/*!
+ * @brief Compute the compacted size for an acceleration structure and write it into a buffer.
+ *
+ * This size is potentially smaller than the source acceleration structure. To perform compaction,
+ * read this size from the buffer once the command buffer has completed and use it to allocate a
+ * smaller acceleration structure. Then create another encoder and call the 
+ * copyAndCompactAccelerationStructure method.
+ *
+ * @param accelerationStructure Source acceleration structure
+ * @param buffer                Destination size buffer. The compacted size will be written as a 32 bit
+ *                              unsigned integer representing the compacted size in bytes.
+ * @param offset                Offset into the size buffer
+ */
+- (void)writeCompactedAccelerationStructureSize:(id <MTLAccelerationStructure>)accelerationStructure
+                                       toBuffer:(id <MTLBuffer>)buffer
+                                         offset:(NSUInteger)offset;
+
+/*!
+ * @brief Compute the compacted size for an acceleration structure and write it into a buffer.
+ *
+ * This size is potentially smaller than the source acceleration structure. To perform compaction,
+ * read this size from the buffer once the command buffer has completed and use it to allocate a
+ * smaller acceleration structure. Then create another encoder and call the 
+ * copyAndCompactAccelerationStructure method.
+ *
+ * @param accelerationStructure Source acceleration structure
+ * @param buffer                Destination size buffer. The compacted size will be written as either
+ *                              a 32 bit or 64 bit value depending on the sizeDataType argument
+ *                              unsigned integer representing the compacted size in bytes.
+ * @param offset                Offset into the size buffer
+ * @param sizeDataType          Data type of the size to write into the buffer. Must be either
+ *                              MTLDataTypeUInt (32 bit) or MTLDataTypeULong (64 bit)
+ */
+- (void)writeCompactedAccelerationStructureSize:(id <MTLAccelerationStructure>)accelerationStructure
+                                       toBuffer:(id <MTLBuffer>)buffer
+                                         offset:(NSUInteger)offset
+                                   sizeDataType:(MTLDataType)sizeDataType API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ * @brief Copy and compact an acceleration structure. The source and destination acceleration structures
+ * must not overlap in memory. If this is a top level acceleration structure, references to bottom level
+ * acceleration structures will be preserved.
+ *
+ * The destination acceleration structure must be at least as large as the compacted size of the source
+ * acceleration structure, which is computed by the writeCompactedAccelerationStructureSize method.
+ *
+ * @param sourceAccelerationStructure      Acceleration structure to copy and compact
+ * @param destinationAccelerationStructure Acceleration structure to copy to
+ */
+- (void)copyAndCompactAccelerationStructure:(id <MTLAccelerationStructure>)sourceAccelerationStructure
+                    toAccelerationStructure:(id <MTLAccelerationStructure>)destinationAccelerationStructure;
+
+ /*!
+ @method updateFence:
+ @abstract Update the fence to capture all GPU work so far enqueued by this encoder.
+ @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;
+
+/*!
+ @method waitForFence:
+ @abstract Prevent further GPU work until the fence is reached.
+ @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;
+
+/*!
+ * @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 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;
+
+/*!
+ * @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 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 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 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 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
+ YES will ensure that all work encoded before this operation in the encoder is
+ complete but does not isolate the work with respect to other encoders.  Passing
+ NO will allow the sample to be taken concurrently with other operations in this
+ encoder.
+ In general, passing YES will lead to more repeatable counter results but
+ may negatively impact performance.  Passing NO will generally be higher performance
+ but counter results may not be repeatable.
+ */
+-(void)sampleCountersInBuffer:(id<MTLCounterSampleBuffer>)sampleBuffer
+                atSampleIndex:(NSUInteger)sampleIndex
+                  withBarrier:(BOOL)barrier API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+@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_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h	2022-09-30 04:04:05.000000000 -0400
@@ -0,0 +1,134 @@
+#ifdef __METAL_VERSION__
+#import <metal_stdlib>
+
+typedef metal::packed_float3 MTLPackedFloat3;
+#else
+#include <math.h>
+#import <Metal/MTLDefines.h>
+
+typedef struct _MTLPackedFloat3 {
+    union {
+        struct {
+            float x;
+            float y;
+            float z;
+        };
+        float elements[3];
+    };
+
+#ifdef __cplusplus
+    _MTLPackedFloat3()
+        : x(0.0f), y(0.0f), z(0.0f)
+    {
+    }
+
+    _MTLPackedFloat3(float x, float y, float z)
+        : x(x), y(y), z(z)
+    {
+    }
+
+    float & operator[](int idx) {
+        return elements[idx];
+    }
+
+    const float & operator[](int idx) const {
+        return elements[idx];
+    }
+#endif
+} MTLPackedFloat3;
+
+MTL_INLINE MTLPackedFloat3 MTLPackedFloat3Make(float x, float y, float z)
+{
+    MTLPackedFloat3 packedFloat3;
+    packedFloat3.x = x;
+    packedFloat3.y = y;
+    packedFloat3.z = z;
+    return packedFloat3;
+}
+
+#endif
+
+typedef struct _MTLPackedFloat4x3 {
+    MTLPackedFloat3 columns[4];
+
+#ifdef __cplusplus
+    _MTLPackedFloat4x3() {
+        columns[0] = MTLPackedFloat3(0.0f, 0.0f, 0.0f);
+        columns[1] = MTLPackedFloat3(0.0f, 0.0f, 0.0f);
+        columns[2] = MTLPackedFloat3(0.0f, 0.0f, 0.0f);
+        columns[3] = MTLPackedFloat3(0.0f, 0.0f, 0.0f);
+    }
+    
+    _MTLPackedFloat4x3(MTLPackedFloat3 column0, MTLPackedFloat3 column1, MTLPackedFloat3 column2, MTLPackedFloat3 column3) {
+        columns[0] = column0;
+        columns[1] = column1;
+        columns[2] = column2;
+        columns[3] = column3;
+    }
+    
+#ifndef __METAL_VERSION__
+    MTLPackedFloat3 & operator[](int idx) {
+        return columns[idx];
+    }
+
+    const MTLPackedFloat3 & operator[](int idx) const {
+        return columns[idx];
+    }
+#else
+    thread MTLPackedFloat3 & operator[](int idx) thread {
+        return columns[idx];
+    }
+
+    const thread MTLPackedFloat3 & operator[](int idx) const thread {
+        return columns[idx];
+    }
+
+    device MTLPackedFloat3 & operator[](int idx) device {
+        return columns[idx];
+    }
+
+    const device MTLPackedFloat3 & operator[](int idx) const device {
+        return columns[idx];
+    }
+
+    const constant MTLPackedFloat3 & operator[](int idx) const constant {
+        return columns[idx];
+    }
+#endif
+#endif
+} MTLPackedFloat4x3;
+
+/**
+ * @brief An axis aligned bounding box with a min and max point
+ */
+typedef struct _MTLAxisAlignedBoundingBox {
+    /**
+     * @brief Minimum point
+     */
+    MTLPackedFloat3 min;
+
+    /**
+     * @brief Maximum point
+     */
+    MTLPackedFloat3 max;
+
+#ifdef __cplusplus
+    _MTLAxisAlignedBoundingBox()
+        : min(INFINITY, INFINITY, INFINITY),
+          max(-INFINITY, -INFINITY, -INFINITY)
+    {
+    }
+
+    _MTLAxisAlignedBoundingBox(MTLPackedFloat3 p)
+        : min(p),
+          max(p)
+    {
+    }
+
+    _MTLAxisAlignedBoundingBox(MTLPackedFloat3 min, MTLPackedFloat3 max)
+        : min(min),
+          max(max)
+    {
+    }
+#endif
+} MTLAxisAlignedBoundingBox;
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h	2022-09-21 16:21:28.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h	2022-10-06 13:22:04.000000000 -0400
@@ -120,6 +120,10 @@
     MTLDataTypeULong2 API_AVAILABLE(macos(12.0), ios(14.0)) = 86,
     MTLDataTypeULong3 API_AVAILABLE(macos(12.0), ios(14.0)) = 87,
     MTLDataTypeULong4 API_AVAILABLE(macos(12.0), ios(14.0)) = 88,
+    MTLDataTypeVisibleFunctionTable API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0)) = 115,
+    MTLDataTypeIntersectionFunctionTable API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0)) = 116,
+    MTLDataTypePrimitiveAccelerationStructure API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0)) = 117,
+    MTLDataTypeInstanceAccelerationStructure API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0)) = 118,
 } API_AVAILABLE(macos(10.11), ios(8.0));
 
 @class MTLArgument;
@@ -357,6 +361,11 @@
 @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_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h	2022-09-21 16:19:40.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h	2022-10-06 13:22:04.000000000 -0400
@@ -16,6 +16,9 @@
 @protocol MTLRenderPipelineState;
 @protocol MTLComputePipelineState;
 @protocol MTLIndirectCommandBuffer;
+@protocol MTLVisibleFunctionTable;
+@protocol MTLAccelerationStructure;
+@protocol MTLIntersectionFunctionTable;
 
 /*!
  * @protocol MTLArgumentEncoder
@@ -140,6 +143,7 @@
  */
 - (void)setIndirectCommandBuffers:(const id <MTLIndirectCommandBuffer> __nullable [__nonnull])buffers withRange:(NSRange)range API_AVAILABLE(macos(10.14), ios(12.0));
 
+- (void)setAccelerationStructure:(nullable id <MTLAccelerationStructure>)accelerationStructure atIndex:(NSUInteger)index  API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
 
 /*!
  * @method newArgumentEncoderForBufferAtIndex:
@@ -152,6 +156,31 @@
 
 
 
+/*!
+ * @method setVisibleFunctionTable:atIndex:
+ * @brief Set a visible function table at the given buffer index
+ */
+- (void)setVisibleFunctionTable:(nullable id <MTLVisibleFunctionTable>)visibleFunctionTable atIndex:(NSUInteger)index API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+/*!
+ * @method setVisibleFunctionTables:withRange:
+ * @brief Set visible function tables at the given buffer index range
+ */
+- (void)setVisibleFunctionTables:(const id <MTLVisibleFunctionTable> __nullable [__nonnull])visibleFunctionTables withRange:(NSRange)range API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+/*!
+ * @method setIntersectionFunctionTable:atIndex:
+ * @brief Set an intersection function table at the given buffer index
+ */
+- (void)setIntersectionFunctionTable:(nullable id <MTLIntersectionFunctionTable>)intersectionFunctionTable atIndex:(NSUInteger)index API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+/*!
+ * @method setIntersectionFunctionTables:withRange:
+ * @brief Set intersection function tables at the given buffer index range
+ */
+- (void)setIntersectionFunctionTables:(const id <MTLIntersectionFunctionTable> __nullable [__nonnull])intersectionFunctionTables withRange:(NSRange)range API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+
 
 @end
 
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h	2022-09-21 16:21:28.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h	2022-10-06 13:23:51.000000000 -0400
@@ -9,6 +9,7 @@
 #import <Metal/MTLDefines.h>
 #import <Metal/MTLTypes.h>
 #import <Metal/MTLCommandEncoder.h>
+#import <Metal/MTLResourceStateCommandEncoder.h>
 #import <Metal/MTLBuffer.h>
 #import <Metal/MTLTexture.h>
 #import <Metal/MTLFence.h>
@@ -155,6 +156,26 @@
 - (void)waitForFence:(id <MTLFence>)fence API_AVAILABLE(macos(10.13), ios(10.0));
 
 
+/*!
+ @method getTextureAccessCounters:region:mipLevel:slice:type:resetCounters:countersBuffer:countersBufferOffset
+ @abstract Copies tile access counters within specified region into provided buffer
+ */
+-(void) getTextureAccessCounters:(id<MTLTexture>)texture
+                          region:(MTLRegion)region
+                        mipLevel:(NSUInteger)mipLevel
+                           slice:(NSUInteger)slice
+                   resetCounters:(BOOL)resetCounters
+                  countersBuffer:(id<MTLBuffer>)countersBuffer
+            countersBufferOffset:(NSUInteger)countersBufferOffset API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
+
+/*!
+ @method resetTextureAccessCounters:region:mipLevel:slice:type:
+ @abstract Resets tile access counters within specified region
+ */
+-(void) resetTextureAccessCounters:(id<MTLTexture>)texture
+                            region:(MTLRegion)region
+                          mipLevel:(NSUInteger)mipLevel
+                             slice:(NSUInteger)slice API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
 
 
 
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h	2022-09-21 16:19:40.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h	2022-10-06 13:22:04.000000000 -0400
@@ -20,9 +20,13 @@
 @protocol MTLCommandBuffer;
 @protocol MTLEvent;
 @protocol MTLLogContainer;
+@protocol MTLResourceStateCommandEncoder;
+@protocol MTLAccelerationStructureCommandEncoder;
 @class MTLRenderPassDescriptor;
 @class MTLComputePassDescriptor;
 @class MTLBlitPassDescriptor;
+@class MTLResourceStatePassDescriptor;
+@class MTLAccelerationStructurePassDescriptor;
 
 /*!
  @enum MTLCommandBufferStatus
@@ -408,8 +412,12 @@
  */
 - (nullable id <MTLParallelRenderCommandEncoder>)parallelRenderCommandEncoderWithDescriptor:(MTLRenderPassDescriptor *)renderPassDescriptor;
 
+- (nullable id<MTLResourceStateCommandEncoder>) resourceStateCommandEncoder API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
+- (nullable id<MTLResourceStateCommandEncoder>) resourceStateCommandEncoderWithDescriptor:(MTLResourceStatePassDescriptor *) resourceStatePassDescriptor API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
 
+- (nullable id <MTLAccelerationStructureCommandEncoder>)accelerationStructureCommandEncoder API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
 
+- (id <MTLAccelerationStructureCommandEncoder>)accelerationStructureCommandEncoderWithDescriptor:(MTLAccelerationStructurePassDescriptor *)descriptor API_AVAILABLE(macos(13.0), ios(16.0));
 
 /*!
  @method pushDebugGroup:
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h	2022-09-21 16:19:39.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h	2022-10-06 13:22:03.000000000 -0400
@@ -21,6 +21,8 @@
 @protocol MTLTexture;
 @protocol MTLComputePipelineState;
 @protocol MTLResource;
+@protocol MTLVisibleFunctionTable;
+@protocol MTLAccelerationStructure;
 
 typedef struct {
     uint32_t threadgroupsPerGrid[3];
@@ -77,6 +79,36 @@
 
 
 
+/*!
+ * @method setVisibleFunctionTable:atBufferIndex:
+ * @brief Set a visible function table at the given buffer index
+ */
+- (void)setVisibleFunctionTable:(nullable id <MTLVisibleFunctionTable>)visibleFunctionTable atBufferIndex:(NSUInteger)bufferIndex API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+/*!
+ * @method setVisibleFunctionTables:withBufferRange:
+ * @brief Set visible function tables at the given buffer index range
+ */
+- (void)setVisibleFunctionTables:(const id <MTLVisibleFunctionTable> __nullable [__nonnull])visibleFunctionTables withBufferRange:(NSRange)range API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+/*!
+ * @method setIntersectionFunctionTable:atBufferIndex:
+ * @brief Set a visible function table at the given buffer index
+ */
+- (void)setIntersectionFunctionTable:(nullable id <MTLIntersectionFunctionTable>)intersectionFunctionTable atBufferIndex:(NSUInteger)bufferIndex API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+/*!
+ * @method setIntersectionFunctionTables:withBufferRange:
+ * @brief Set visible function tables at the given buffer index range
+ */
+- (void)setIntersectionFunctionTables:(const id <MTLIntersectionFunctionTable> __nullable [__nonnull])intersectionFunctionTables withBufferRange:(NSRange)range API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+
+/*!
+ @method setAccelerationStructure:atBufferIndex:
+ @brief Set a global raytracing acceleration structure for all compute kernels at the given buffer bind point index.
+ */
+- (void)setAccelerationStructure:(nullable id <MTLAccelerationStructure>)accelerationStructure atBufferIndex:(NSUInteger)bufferIndex API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
 
 /*!
  @method setTexture:atIndex:
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h	2022-09-21 16:19:40.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h	2022-10-06 13:22:05.000000000 -0400
@@ -119,6 +119,23 @@
 
 
 
+/*!
+ @property supportAddingBinaryFunctions
+ @abstract This flag makes this pipeline support creating a new pipeline by adding binary functions.
+ */
+@property (readwrite, nonatomic) BOOL supportAddingBinaryFunctions
+    API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+
+/*!
+ @property maxCallStackDepth
+ @abstract The maximum depth of the call stack in stack frames from the kernel. Defaults to 1 additional stack frame.
+ */
+@property (readwrite, nonatomic) NSUInteger maxCallStackDepth
+    API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+
+
 @end
 
 /*!
@@ -177,6 +194,32 @@
 @property (readonly) MTLResourceID gpuResourceID API_AVAILABLE(macos(13.0), ios(16.0));
 
 
+/*!
+ @method functionHandleWithFunction:
+ @brief Get the function handle for the specified function from the pipeline state.
+ */
+- (nullable id<MTLFunctionHandle>)functionHandleWithFunction:(id<MTLFunction>)function API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+
+/*!
+ @method newRenderPipelineStateWithAdditionalBinaryFunctions:stage:
+ @brief Allocate a new compute pipeline state by adding binary functions to this pipeline state.
+ */
+- (nullable id <MTLComputePipelineState>)newComputePipelineStateWithAdditionalBinaryFunctions:(nonnull NSArray<id<MTLFunction>> *)functions error:(__autoreleasing NSError **)error API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+/*!
+ @method newVisibleFunctionTableWithDescriptor:
+ @brief Allocate a visible function table for the pipeline with the provided descriptor.
+ */
+- (nullable id<MTLVisibleFunctionTable>)newVisibleFunctionTableWithDescriptor:(MTLVisibleFunctionTableDescriptor * __nonnull)descriptor API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+/*!
+ @method newIntersectionFunctionTableWithDescriptor:
+ @brief Allocate an intersection function table for the pipeline with the provided descriptor.
+ */
+- (nullable id <MTLIntersectionFunctionTable>)newIntersectionFunctionTableWithDescriptor:(MTLIntersectionFunctionTableDescriptor * _Nonnull)descriptor API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+
 @end
 
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h	2022-09-21 16:19:39.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h	2022-10-06 13:22:03.000000000 -0400
@@ -30,8 +30,12 @@
 @protocol MTLHeap;
 @protocol MTLFence;
 @protocol MTLArgumentEncoder;
+@protocol MTLRasterizationRateMap;
+@class MTLRasterizationRateLayerDescriptor;
+@class MTLRasterizationRateMapDescriptor;
 @class MTLTileRenderPipelineDescriptor;
 @class MTLTilePipelineColorAttachmentDescriptor;
+@class MTLMeshRenderPipelineDescriptor;
 @class MTLSamplerDescriptor;
 @class MTLRenderPipelineColorAttachmentDescriptor;
 @class MTLDepthStencilDescriptor;
@@ -57,6 +61,13 @@
 @protocol MTLDynamicLibrary;
 @protocol MTLBinaryArchive;
 @class MTLBinaryArchiveDescriptor;
+@class MTLAccelerationStructureDescriptor;
+@protocol MTLAccelerationStructure;
+@protocol MTLFunctionHandle;
+@protocol MTLVisibleFunctionTable;
+@class MTLVisibleFunctionTableDescriptor;
+@protocol MTLIntersectionFunctionTable;
+@class MTLIntersectionFunctionTableDescriptor;
 @class MTLStitchedLibraryDescriptor;
 @protocol MTLArgumentEncoder;
 
@@ -149,6 +160,9 @@
     MTLGPUFamilyApple3  = 1003,
     MTLGPUFamilyApple4  = 1004,
     MTLGPUFamilyApple5  = 1005,
+    MTLGPUFamilyApple6  = 1006,
+    MTLGPUFamilyApple7  = 1007,
+    MTLGPUFamilyApple8  = 1008,
     
     MTLGPUFamilyMac1 API_DEPRECATED_WITH_REPLACEMENT("MTLGPUFamilyMac2", macos(10.15, 13.0), ios(13.0, 16.0)) = 2001,
     MTLGPUFamilyMac2 = 2002,
@@ -197,8 +211,46 @@
     MTLArgumentBuffersTier2 = 1,
 } API_AVAILABLE(macos(10.13), ios(11.0));
 
+/*!
+ @enum MTLSparseTextureRegionAlignmentMode
+ @abstract MTLSparseTextureRegionAlignmentMode determines type of alignment used when converting from pixel region to tile region.
+ */
+typedef NS_ENUM(NSUInteger, MTLSparseTextureRegionAlignmentMode)
+{
+    MTLSparseTextureRegionAlignmentModeOutward   = 0,
+    MTLSparseTextureRegionAlignmentModeInward    = 1,
+} API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
 
+/*!
+ @enum MTLSparsePageSize
+ @abstract Physical size of sparse resource page in KBs.
+ */
+typedef NS_ENUM(NSInteger, MTLSparsePageSize)
+{
+    MTLSparsePageSize16 = 101,
+    MTLSparsePageSize64 = 102,
+    MTLSparsePageSize256 = 103,
+} API_AVAILABLE(macos(13.0), ios(16.0));
 
+/**
+ * @brief Describes the memory requirements for an acceleration structure
+ */
+typedef struct {
+    /**
+     * @brief The required size, in bytes, of the built acceleration structure
+     */
+    NSUInteger accelerationStructureSize;
+    
+    /**
+     * @brief The required size, in bytes, of the scratch buffer used to build the acceleration structure
+     */
+    NSUInteger buildScratchBufferSize;
+    
+    /**
+     * @brief The required size, in bytes, of the scratch buffer used to refit the acceleration structure
+     */
+    NSUInteger refitScratchBufferSize;
+} MTLAccelerationStructureSizes;
 
 /*!
  @enum MTLCounterSamplingPoint
@@ -401,15 +453,21 @@
  @abstract Query device for 32-bit Float texture filtering support. Specifically, R32Float, RG32Float, and RGBA32Float.
  @return BOOL value. If YES, the device supports filtering 32-bit Float textures. If NO, the device does not.
  */
-@property(readonly) BOOL supports32BitFloatFiltering API_AVAILABLE(macos(11.0)) API_UNAVAILABLE(ios);
+@property(readonly) BOOL supports32BitFloatFiltering API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
 
 /*!
  @property supports32BitMSAA
  @abstract Query device for 32-bit MSAA texture support. Specifically, added support for allocating 32-bit Integer format textures (R32Uint, R32Sint, RG32Uint, RG32Sint, RGBA32Uint, and RGBA32Sint) and resolving 32-bit Float format textures (R32Float, RG32Float, and RGBA32Float).
  @return BOOL value. If YES, the device supports these additional 32-bit MSAA texture capabilities. If NO, the devices does not.
  */
-@property(readonly) BOOL supports32BitMSAA API_AVAILABLE(macos(11.0)) API_UNAVAILABLE(ios);
+@property(readonly) BOOL supports32BitMSAA API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
 
+/*!
+@property supportsQueryTextureLOD
+@abstract Query device for whether it supports the `calculate_clampled_lod` and `calculate_unclamped_lod` Metal shading language functionality.
+@return BOOL value. If YES, the device supports the calculate LOD functionality. If NO, the device does not.
+*/
+@property (readonly) BOOL supportsQueryTextureLOD API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
 
 /*!
  @property supportsBCTextureCompression
@@ -425,6 +483,19 @@
  */
 @property(readonly) BOOL supportsPullModelInterpolation API_AVAILABLE(macos(11.0),ios(14.0));
 
+/*!
+ @property barycentricsSupported
+ @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_DEPRECATED_WITH_REPLACEMENT("supportsShaderBarycentricCoordinates", macos(10.15, 13.0), ios(14.0, 16.0)) API_UNAVAILABLE(tvos);
+
+/*!
+ @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), ios(14.0), tvos(16.0));
 
 /*!
  @property currentAllocatedSize
@@ -708,6 +779,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.
  */
@@ -744,6 +832,21 @@
 - (nullable id <MTLArgumentEncoder>)newArgumentEncoderWithArguments:(NSArray <MTLArgumentDescriptor *> *)arguments API_AVAILABLE(macos(10.13), ios(11.0));
 
 
+/*!
+ @method supportsRasterizationRateMapWithLayerCount:
+ @abstract Query device for variable rasterization rate support with the given number of layers.
+ @param layerCount The number of layers for which to query device support.
+ @return YES if the device supports creation of rendering using a MTLRasterizationRateMap with the given number of layers.
+ */
+-(BOOL)supportsRasterizationRateMapWithLayerCount:(NSUInteger)layerCount API_AVAILABLE(macos(10.15.4), ios(13.0), macCatalyst(13.4), tvos(16.0));
+
+/*!
+ @method newRasterizationRateMapWithDescriptor:
+ @abstract Creates a new variable rasterization rate map with the given descriptor.
+ @discussion If '[self supportsRasterizationRateMapWithLayerCount:descriptor.layerCount]' returns NO, or descriptor.screenSize describes an empty region, the result will always be nil.
+ @return A MTLRasterizationRateMap instance that can be used for rendering on this MTLDevice, or nil if the device does not support the combination of parameters stored in the descriptor.
+ */
+-(nullable id<MTLRasterizationRateMap>)newRasterizationRateMapWithDescriptor:(MTLRasterizationRateMapDescriptor*)descriptor API_AVAILABLE(macos(10.15.4), ios(13.0), macCatalyst(13.4), tvos(16.0));
 
 /*!
  * @method newIndirectCommandBufferWithDescriptor:maxCommandCount:options
@@ -813,8 +916,58 @@
 
 
 
+/*!
+ * @method sparseTileSizeWithTextureType:pixelFormat:sampleCount:
+ * @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 API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
+
+/*!
+ @property sparseTileSizeInBytes
+ @abstract Returns the number of bytes required to map one sparse texture tile.
+ */
+@property (readonly) NSUInteger sparseTileSizeInBytes API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
+
+@optional
+/*!
+ * @method convertSparsePixelRegions:toTileRegions:withTileSize:alignmentMode:numRegions:
+ * @abstract Converts regions in pixels to regions in sparse tiles using specified alignment mode.
+   Tile size can be obtained from tileSizeWithTextureType:pixelFormat:sampleCount: method.
+ */
+-(void) convertSparsePixelRegions:(const MTLRegion[_Nonnull])pixelRegions
+                    toTileRegions:(MTLRegion[_Nonnull])tileRegions
+                     withTileSize:(MTLSize)tileSize
+                    alignmentMode:(MTLSparseTextureRegionAlignmentMode)mode
+                       numRegions:(NSUInteger)numRegions API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
+
+/*!
+ * @method convertSparseTileRegions:toPixelRegions:withTileSize:numRegions:
+ * @abstract Convertes region in sparse tiles to region in pixels
+   Tile size can be obtained from tileSizeWithTextureType:pixelFormat:sampleCount: method.
+ */
+-(void) convertSparseTileRegions:(const MTLRegion[_Nonnull])tileRegions
+                  toPixelRegions:(MTLRegion[_Nonnull])pixelRegions
+                    withTileSize:(MTLSize)tileSize
+                      numRegions:(NSUInteger)numRegions API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
+@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));
 
 
 
@@ -865,6 +1018,13 @@
 */
 - (BOOL)supportsCounterSampling:(MTLCounterSamplingPoint)samplingPoint API_AVAILABLE(macos(11.0), ios(14.0));
 
+/*!
+ @property supportsVertexAmplificationCount:
+ @abstract Query device for vertex amplification support.
+ @param count The amplification count to check
+ @return BOOL value. If YES, the device supports vertex amplification with the given count. If NO, the device does not.
+ */
+- (BOOL)supportsVertexAmplificationCount:(NSUInteger)count API_AVAILABLE(macos(10.15.4), ios(13.0), macCatalyst(13.4), tvos(16.0));
 
 /*!
  @property supportsDynamicLibraries
@@ -910,10 +1070,61 @@
 - (nullable id<MTLBinaryArchive>) newBinaryArchiveWithDescriptor:(MTLBinaryArchiveDescriptor*)descriptor
                                                            error:(NSError**)error API_AVAILABLE(macos(11.0), ios(14.0));
 
+/*!
+@property supportsRaytracing
+@abstract Query device support for using ray tracing from compute pipelines.
+@return BOOL value. If YES, the device supports ray tracing from compute pipelines. If NO, the device does not.
+*/
+@property (readonly) BOOL supportsRaytracing API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+- (MTLAccelerationStructureSizes)accelerationStructureSizesWithDescriptor:(MTLAccelerationStructureDescriptor *)descriptor API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+- (nullable id <MTLAccelerationStructure>)newAccelerationStructureWithSize:(NSUInteger)size API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+- (nullable id <MTLAccelerationStructure>)newAccelerationStructureWithDescriptor:(MTLAccelerationStructureDescriptor *)descriptor API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.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.
+ @return BOOL value. If YES, the device supports function pointers from compute pipelines. If NO, the device does not.
+ */
+@property (readonly) BOOL supportsFunctionPointers API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
 
+/*!
+ @property supportsFunctionPointersFromRender
+ @abstract Query device support for using function pointers from render pipeline stages.
+ @return BOOL value. If YES, the device supports function pointers from render pipeline stages. If NO, the device does not.
+ */
+@property (readonly) BOOL supportsFunctionPointersFromRender API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @property supportsRaytracingFromRender
+ @abstract Query device support for using ray tracing from render pipeline stages.
+ @return BOOL value. If YES, the device supports ray tracing from render pipeline stages. If NO, the device does not.
+ */
+@property (readonly) BOOL supportsRaytracingFromRender API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @property supportsPrimitiveMotionBlur
+ @abstract Query device support for using ray tracing primitive motion blur.
+ @return BOOL value. If YES, the device supports the primitive motion blur api. If NO, the device does not.
+ */
+@property (readonly) BOOL supportsPrimitiveMotionBlur API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
 
 
 @end
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h	2022-09-21 16:19:39.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h	2022-10-06 13:22:04.000000000 -0400
@@ -19,6 +19,11 @@
      */
     MTLFunctionOptionNone = 0,
     
+    /**
+     * @brief Compiles the found function. This enables dynamic linking of this `MTLFunction`.
+     * Only supported for `visible` functions.
+     */
+    MTLFunctionOptionCompileToBinary API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0)) = 1 << 0,
 } API_AVAILABLE(macos(11.0), ios(14.0));
 
 MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0))
@@ -63,4 +68,8 @@
 
 @end
 
+MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
+@interface MTLIntersectionFunctionDescriptor : MTLFunctionDescriptor <NSCopying>
+
+@end
 
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionHandle.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionHandle.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionHandle.h	2022-09-19 04:25:17.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionHandle.h	2022-10-06 13:22:04.000000000 -0400
@@ -7,3 +7,14 @@
 
 #import <Foundation/Foundation.h>
 #import <Metal/MTLDefines.h>
+#import <Metal/MTLLibrary.h>
+
+API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
+@protocol MTLFunctionHandle <NSObject>
+@property (readonly) MTLFunctionType functionType;
+@property (readonly, nonnull) NSString* name;
+@property (readonly, nonnull) id<MTLDevice> device;
+@end
+
+#import <Metal/MTLVisibleFunctionTable.h>
+
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h	2022-09-21 16:21:28.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h	2022-10-06 13:23:51.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
 
@@ -30,6 +31,7 @@
 {
     MTLHeapTypeAutomatic = 0,
     MTLHeapTypePlacement = 1,
+    MTLHeapTypeSparse API_AVAILABLE(macos(11.0), macCatalyst(14.0), tvos(16.0)) = 2 ,
 } API_AVAILABLE(macos(10.15), ios(13.0));
 
 /*!
@@ -64,6 +66,13 @@
 
 
 /*!
+ @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.
  @discussion For heaps, MTLHazardTrackingModeDefault is treated as MTLHazardTrackingModeUntracked.
@@ -226,6 +235,46 @@
 - (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
 
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h	2022-09-21 16:19:40.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h	2022-10-06 13:22:05.000000000 -0400
@@ -89,6 +89,11 @@
 @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
 
 
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h	2022-09-19 04:25:16.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h	2022-10-06 13:22:04.000000000 -0400
@@ -7,3 +7,117 @@
 
 #import <Metal/MTLDefines.h>
 
+
+#import <Metal/MTLResource.h>
+#import <Metal/MTLFunctionHandle.h>
+
+/**
+ * @brief Signature defining what data is provided to an intersection function. The signature
+ * must match across the shading language declaration of the intersection function table,
+ * intersection functions in the table, and the intersector using the table.
+ */
+typedef NS_OPTIONS(NSUInteger, MTLIntersectionFunctionSignature) {
+	/**
+	 * @brief No signature
+	 */
+	MTLIntersectionFunctionSignatureNone = 0,
+
+	/**
+	 * @brief The intersection functions are entitled to read the built-in instance_id as described in
+	 * the Metal Shading Language Guide.
+	 */
+	MTLIntersectionFunctionSignatureInstancing = (1 << 0),
+
+	/**
+	 * @brief The triangle intersection functions are entitled to to read the built-in barycentric_coord
+	 * and front_facing as described in the Metal Shading Language Guide.
+	 */
+	MTLIntersectionFunctionSignatureTriangleData = (1 << 1),
+
+	/**
+	 * @brief The intersection functions are entitled to query world_space_origin and
+	 * world_space_direction as described in the Metal Shading Language Guide.
+	 */
+    MTLIntersectionFunctionSignatureWorldSpaceData = (1 << 2),
+    
+    
+    /**
+     * @brief The intersection functions may be called from intersectors using the
+     * instance_motion intersection tag as described in the Metal Shading Language Guide.
+     */
+    MTLIntersectionFunctionSignatureInstanceMotion API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0)) = (1 << 3),
+    
+    /**
+     * @brief The intersection functions are entitled to query time, motion_start_time,
+     * motion_end_time and key_frame_count as described in the Metal Shading Language Guide.
+     */
+    MTLIntersectionFunctionSignaturePrimitiveMotion API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0)) = (1 << 4),
+    
+    /**
+     * @brief The intersection functions may be called from intersectors using the
+     * extended_limits intersection tag as described in the Metal Shading Language Guide.
+     */
+    MTLIntersectionFunctionSignatureExtendedLimits API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0)) = (1 << 5),
+    
+    
+} MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
+@interface MTLIntersectionFunctionTableDescriptor : NSObject <NSCopying>
+
+/*!
+ @method intersectionFunctionTableDescriptor
+ @abstract Create an autoreleased intersection function table descriptor
+ */
++ (nonnull MTLIntersectionFunctionTableDescriptor *)intersectionFunctionTableDescriptor;
+
+/*!
+* @property functionCount
+* @abstract The number of functions in the table.
+*/
+@property (nonatomic) NSUInteger functionCount;
+
+@end
+
+API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
+@protocol MTLIntersectionFunctionTable <MTLResource>
+
+
+- (void)setBuffer:(nullable id <MTLBuffer>)buffer offset:(NSUInteger)offset atIndex:(NSUInteger)index;
+- (void)setBuffers:(const id <MTLBuffer> __nullable [__nonnull])buffers offsets:(const NSUInteger [__nonnull])offsets withRange:(NSRange)range;
+
+
+/*!
+ @property gpuResourceID
+ @abstract Handle of the GPU resource suitable for storing in an Argument Buffer
+ */
+@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;
+
+/*
+ * @brief Initialize the function at the given index with a triangle intersection function
+ * with the given signature which always accepts ray/triangle intersections. If this method is
+ * not called and an intersection function is not otherwise set at the given index,
+ * ray/triangle intersections will be ignored if a call to the function at the given index
+ * would be required. Ray/triangle intersections are always accepted if an intersection
+ * function table is not provided.
+ */
+- (void)setOpaqueTriangleIntersectionFunctionWithSignature:(MTLIntersectionFunctionSignature)signature atIndex:(NSUInteger)index;
+
+/*
+ * @brief Initialize the function at the given range with a triangle intersection function
+ * with the given signature which always accepts ray/triangle intersections. If this method is
+ * not called and an intersection function is not otherwise set at an index in the given range,
+ * ray/triangle intersections will be ignored if a call to the function at that index
+ * would be required. Ray/triangle intersections are always accepted if an intersection
+ * function table is not provided.
+ */
+- (void)setOpaqueTriangleIntersectionFunctionWithSignature:(MTLIntersectionFunctionSignature)signature withRange:(NSRange)range;
+
+- (void)setVisibleFunctionTable:(nullable id <MTLVisibleFunctionTable>)functionTable atBufferIndex:(NSUInteger)bufferIndex;
+- (void)setVisibleFunctionTables:(const id <MTLVisibleFunctionTable> __nullable [__nonnull])functionTables withBufferRange:(NSRange)bufferRange;
+
+@end
+
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h	2022-09-21 16:19:40.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h	2022-10-06 13:23:52.000000000 -0400
@@ -19,6 +19,7 @@
 @protocol MTLLibrary;
 @class MTLCompileOptions;
 @class MTLFunctionConstantValues;
+@class MTLIntersectionFunctionDescriptor;
 @protocol MTLDynamicLibrary;
 
 
@@ -75,6 +76,9 @@
     MTLFunctionTypeFragment = 2,
     MTLFunctionTypeKernel = 3,
     MTLFunctionTypeVisible API_AVAILABLE(macos(11.0), ios(14.0)) = 5,
+    MTLFunctionTypeIntersection API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0)) = 6,
+    MTLFunctionTypeMesh API_AVAILABLE(macos(13.0), ios(16.0)) = 7,
+    MTLFunctionTypeObject API_AVAILABLE(macos(13.0), ios(16.0)) = 8,
 } API_AVAILABLE(macos(10.11), ios(8.0));
 
 
@@ -167,6 +171,13 @@
 
 
 
+/*!
+ @property options
+ @abstract The options this function was created with.
+ */
+@property (readonly) MTLFunctionOptions options API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+
 @end
 
 typedef NS_ENUM(NSUInteger, MTLLanguageVersion) {
@@ -355,6 +366,23 @@
 
 
 
+/*!
+ @method newIntersectionFunctionWithDescriptor:completionHandler:
+ @abstract Create a new MTLFunction object asynchronously.
+ */
+- (void)newIntersectionFunctionWithDescriptor:(nonnull MTLIntersectionFunctionDescriptor *)descriptor
+                            completionHandler:(void (^)(id<MTLFunction> __nullable function, NSError* __nullable error))completionHandler
+    API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+/*!
+ @method newIntersectionFunctionWithDescriptor:error:
+ @abstract Create  a new MTLFunction object synchronously.
+ */
+- (nullable id <MTLFunction>)newIntersectionFunctionWithDescriptor:(nonnull MTLIntersectionFunctionDescriptor *)descriptor
+                                                             error:(__autoreleasing NSError **)error
+    API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+
 
 /*!
  @property functionNames
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLinkedFunctions.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLinkedFunctions.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLinkedFunctions.h	2022-09-21 16:19:39.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLinkedFunctions.h	2022-10-06 13:22:03.000000000 -0400
@@ -33,6 +33,11 @@
 */
 @property (readwrite, nonatomic, copy, nullable) NSArray<id<MTLFunction>> *functions;
 
+/*!
+* @property binaryFunctions
+* @abstract The array of functions compiled to binary to be linked.
+*/
+@property (readwrite, nonatomic, copy, nullable) NSArray<id<MTLFunction>> *binaryFunctions API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
 
 /*!
 * @property groups
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h	2022-09-21 16:19:41.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h	2022-10-06 13:22:05.000000000 -0400
@@ -176,6 +176,21 @@
     MTLPixelFormatASTC_12x12_LDR        API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(8.0)) = 218,
     
     
+    // ASTC HDR (High Dynamic Range) Formats
+    MTLPixelFormatASTC_4x4_HDR          API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0)) = 222,
+    MTLPixelFormatASTC_5x4_HDR          API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0)) = 223,
+    MTLPixelFormatASTC_5x5_HDR          API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0)) = 224,
+    MTLPixelFormatASTC_6x5_HDR          API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0)) = 225,
+    MTLPixelFormatASTC_6x6_HDR          API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0)) = 226,
+    MTLPixelFormatASTC_8x5_HDR          API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0)) = 228,
+    MTLPixelFormatASTC_8x6_HDR          API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0)) = 229,
+    MTLPixelFormatASTC_8x8_HDR          API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0)) = 230,
+    MTLPixelFormatASTC_10x5_HDR         API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0)) = 231,
+    MTLPixelFormatASTC_10x6_HDR         API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0)) = 232,
+    MTLPixelFormatASTC_10x8_HDR         API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0)) = 233,
+    MTLPixelFormatASTC_10x10_HDR        API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0)) = 234,
+    MTLPixelFormatASTC_12x10_HDR        API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0)) = 235,
+    MTLPixelFormatASTC_12x12_HDR        API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0)) = 236,
     /*!
      @constant MTLPixelFormatGBGR422
      @abstract A pixel format where the red and green channels are subsampled horizontally.  Two pixels are stored in 32 bits, with shared red and blue values, and unique green values.
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRasterizationRate.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRasterizationRate.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRasterizationRate.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRasterizationRate.h	2022-10-06 13:22:03.000000000 -0400
@@ -0,0 +1,323 @@
+//
+//  MTLRasterizationRate.h
+//  Metal
+//
+//  Copyright (c) 2018 Apple, Inc. All rights reserved.
+//
+//  Support for variable rasterization rate
+
+#import <Metal/MTLDevice.h>
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ @interface MTLRasterizationRateSampleArray
+ @abstract A helper object for convient access to samples stored in an array.
+ */
+MTL_EXPORT API_AVAILABLE(macos(10.15.4), ios(13.0), macCatalyst(13.4), tvos(16.0))
+@interface MTLRasterizationRateSampleArray : NSObject
+
+/*!
+ @method objectAtIndexedSubscript:
+ @abstract Retrieves the sample value at the specified index.
+ @return NSNumber instance describing the value of the sample at the specified index, or 0 if the index is out of range.
+ */
+- (NSNumber*)objectAtIndexedSubscript:(NSUInteger)index;
+
+/*!
+ @method setObject:atIndexedSubscript:
+ @abstract Stores a sample value at the specified index.
+ @discussion The value will be converted to a single precision floating point value.
+ */
+- (void)setObject:(NSNumber*)value atIndexedSubscript:(NSUInteger)index;
+@end
+
+/*!
+ @interface MTLRasterizationRateLayerDescriptor
+ @abstract Describes the minimum rasterization rate screen space using two piecewise linear functions.
+ @discussion The two piecewise linear function (PLF) describe the desired rasterization quality on the horizontal and vertical axis separately.
+ Each quality sample in the PLF is stored in an array as single precision floating point value between 0 (lowest quality) and 1 (highest quality).
+ The first sample in the array describes the quality at the top (vertical) or left (horizontal) edge of screen space.
+ The last sample in the array describes the quality at the bottom (vertical) or right (horizontal) edge of screen space.
+ All other samples are spaced equidistant in screen space.
+ MTLRasterizationRateLayerDescriptor instances will be stored inside a MTLRasterizationRateMapDescriptor which in turn is compiled by MTLDevice into a MTLRasterizationRateMap.
+ Because MTLDevice may not support the requested granularity, the provided samples may be rounded up (towards higher quality) during compilation.
+ */
+MTL_EXPORT API_AVAILABLE(macos(10.15.4), ios(13.0), macCatalyst(13.4), tvos(16.0))
+@interface MTLRasterizationRateLayerDescriptor : NSObject <NSCopying>
+
+/*!
+ @method init
+ @abstract Do not use, instead use initWithNumSamples:
+ */
+- (instancetype)init API_UNAVAILABLE(macos, ios);
+
+/*!
+ @method initWithSampleCount:
+ @abstract Initialize a descriptor for a layer with the given number of quality samples on the horizontal and vertical axis.
+ @param sampleCount The width and height components are the number of samples on the horizontal and vertical axis respectively. The depth component is ignored.
+ @discussion All values are initialized to zero.
+ */
+- (instancetype)initWithSampleCount:(MTLSize)sampleCount NS_DESIGNATED_INITIALIZER;
+
+/*!
+ @method initWithSampleCount:horizontal:vertical:
+ @abstract Initialize a descriptor for a layer with the given number of quality samples on the horizontal and vertical axis.
+ @param sampleCount The width and height components are the number of samples on the horizontal and vertical axis respectively. The depth component is ignored.
+ @param horizontal The initial sample values on the horizontal axis. Must point to an array of sampleCount.width elements, of which the values will be copied into the MTLRasterizationRateLayerDescriptor.
+ @param vertical The initial sample values on the vertical axis. Must point to an array of sampleCount.height elements, of which the values will be copied into the MTLRasterizationRateLayerDescriptor.
+ @discussion Use initWithSampleCount: to initialize with zeroes instead.
+ */
+- (instancetype)initWithSampleCount:(MTLSize)sampleCount horizontal:(const float *)horizontal vertical:(const float *)vertical;
+
+/*!
+ @property sampleCount
+ @return The number of quality samples that this descriptor uses to describe its current function, for the horizontal and vertical axis. The depth component of the returned MTLSize is always 0.
+ */
+@property (readonly, nonatomic) MTLSize sampleCount API_AVAILABLE(macos(10.15.4), ios(13.0), macCatalyst(13.4), tvos(16.0));
+
+/*!
+ @property maxSampleCount
+ @return The maximum number of quality samples that this descriptor can use to describe its function, for the horizontal and vertical axis, this is the sampleCount that the descriptor was initialized with. The depth component of the returned MTLSize is always 0.
+ */
+@property (readonly, nonatomic) MTLSize maxSampleCount API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @property horizontalSampleStorage
+ @abstract Provide direct access to the quality samples stored in the descriptor.
+ @return Pointer to the (mutable) storage array for samples on the horizontal axis.
+ @discussion The returned pointer points to the first element of an array of sampleCount.width elements.
+ */
+@property (readonly, nonatomic) float* horizontalSampleStorage;
+
+/*!
+ @property verticalSampleStorage
+ @abstract Provide direct access to the quality samples stored in the descriptor.
+ @return Pointer to the (mutable) storage array for samples on the vertical axis.
+ @discussion The returned pointer points to the first element of an array of sampleCount.height elements.
+ */
+@property (readonly, nonatomic) float* verticalSampleStorage;
+
+/*!
+ @property horizontal
+ @abstract Provide convenient bounds-checked access to the quality samples stored in the descriptor.
+ @return Returns a syntactic sugar helper to get or set sample values on the horizontal axis.
+ */
+@property (readonly, nonatomic) MTLRasterizationRateSampleArray* horizontal;
+
+/*!
+ @property vertical
+ @abstract Provide convenient bounds-checked access to the quality samples stored in the descriptor.
+ @return Returns a syntactic sugar helper to get or set sample values on the vertical axis.
+ */
+@property (readonly, nonatomic) MTLRasterizationRateSampleArray* vertical;
+@end
+
+@interface MTLRasterizationRateLayerDescriptor()
+/*!
+ @property sampleCount
+ @abstract This declaration adds a setter to the previously (prior to macOS 12.0 and iOS 15.0) read-only property.
+ @discussion Setting a value (must be <= maxSampleCount) to allow MTLRasterizationRateLayerDescriptor to be re-used with a different number of samples without having to be recreated.
+ */
+@property (readwrite, nonatomic) MTLSize sampleCount API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+@end
+
+/*!
+ @interface MTLRasterizationRateLayerArray
+ @abstract Mutable array of MTLRasterizationRateLayerDescriptor
+ */
+MTL_EXPORT API_AVAILABLE(macos(10.15.4), ios(13.0), macCatalyst(13.4), tvos(16.0))
+@interface MTLRasterizationRateLayerArray : NSObject
+
+/*!
+ @method objectAtIndexedSubscript:
+ @return The MTLRasterizationRateLayerDescriptor instance for the given layerIndex, or nil if no instance hasn't been set for this index.
+ @discussion Use setObject:atIndexedSubscript: to set the layer
+ */
+- (MTLRasterizationRateLayerDescriptor* _Nullable)objectAtIndexedSubscript:(NSUInteger)layerIndex;
+
+/*!
+ @method setObject:atIndexedSubscript:
+ @abstract Sets the MTLRasterizationRateLayerDescriptor instance for the given layerIndex.
+ @discussion The previous instance at this index will be overwritten.
+ */
+- (void)setObject:(MTLRasterizationRateLayerDescriptor* _Nullable)layer atIndexedSubscript:(NSUInteger)layerIndex;
+
+@end
+
+/*!
+ @interface MTLRasterizationRateMapDescriptor
+ @abstract Describes a MTLRasterizationRateMap containing an arbitrary number of MTLRasterizationRateLayerDescriptor instances.
+ @discussion An MTLRasterizationRateMapDescriptor is compiled into an MTLRasterizationRateMap using MTLDevice.
+ */
+MTL_EXPORT API_AVAILABLE(macos(10.15.4), ios(13.0), macCatalyst(13.4), tvos(16.0))
+@interface MTLRasterizationRateMapDescriptor : NSObject <NSCopying>
+
+/*!
+ @method rasterizationRateMapDescriptorWithScreenSize:
+ @abstract Convenience descriptor creation function without layers
+ @param screenSize The dimensions, in screen space pixels, of the region where variable rasterization is applied. The depth component of MTLSize is ignored.
+ @return A descriptor containing no layers. Add or remove layers using setObject:atIndexedSubscript:.
+ */
++ (MTLRasterizationRateMapDescriptor*)rasterizationRateMapDescriptorWithScreenSize:(MTLSize)screenSize;
+
+/*!
+ @method rasterizationRateMapDescriptorWithScreenSize:layer:
+ @abstract Convenience descriptor creation function for a single layer.
+ @param screenSize The dimensions, in screen space pixels, of the region where variable rasterization is applied. The depth component of MTLSize is ignored.
+ @param layer The single layer describing how the rasterization rate varies in screen space
+ @return A descriptor containing a single layer. Add or remove layers using setObject:atIndexedSubscript:.
+ */
++ (MTLRasterizationRateMapDescriptor*)rasterizationRateMapDescriptorWithScreenSize:(MTLSize)screenSize layer:(MTLRasterizationRateLayerDescriptor * _Nonnull)layer;
+
+/*!
+ @method rasterizationRateMapDescriptorWithScreenSize:layerCount:layers:
+ @abstract Convenience descriptor creation function for an arbitrary amount of layers stored in a C-array.
+ @param screenSize The dimensions, in screen space pixels, of the region where variable rasterization is applied. The depth component of MTLSize is ignored.
+ @param layerCount The number of layers in the descriptor.
+ @param layers An array of pointers to layer descriptors. The array must contain layerCount non-null pointers to MTLRasterizationRateLayerDescriptor instances.
+ @return A descriptor containing all the specified layers. Add or remove layers using setObject:atIndexedSubscript:.
+ @discussion The function copies the array of pointers internally, the caller need not keep the array alive after creating the descriptor.
+ */
++ (MTLRasterizationRateMapDescriptor*)rasterizationRateMapDescriptorWithScreenSize:(MTLSize)screenSize layerCount:(NSUInteger)layerCount layers:(MTLRasterizationRateLayerDescriptor * const  _Nonnull * _Nonnull)layers;
+
+/*!
+ @method layerAtIndex:
+ @return The MTLRasterizationRateLayerDescriptor instance for the given layerIndex, or nil if no instance hasn't been set for this index.
+ @discussion Use setLayer:atIndex: to add or set the layer.
+ Identical to "layers[layerIndex]".
+ */
+- (MTLRasterizationRateLayerDescriptor* _Nullable)layerAtIndex:(NSUInteger)layerIndex;
+
+/*!
+ @method setLayer:atIndex:
+ @abstract Sets the MTLRasterizationRateLayerDescriptor instance for the given layerIndex.
+ @discussion The previous instance at the index, if any, will be overwritten.
+ Set nil to an index to remove the layer at that index from the descriptor.
+ Identical to "layers[layerIndex] = layer".
+ */
+- (void)setLayer:(MTLRasterizationRateLayerDescriptor* _Nullable)layer atIndex:(NSUInteger)layerIndex;
+
+/*!
+ @property layers
+ @return A modifiable array of layers
+ @discussion Accesses the layers currently stored in the descriptor.
+ Syntactic sugar around "layerAtIndex:" and "setLayer:atIndex:"
+ */
+@property (nonatomic, readonly) MTLRasterizationRateLayerArray* layers;
+
+/*!
+ @property screenSize
+ @return The dimensions, in screen space pixels, of the region where variable rasterization is applied.
+ @discussion The region always has its origin at [0, 0].
+ The depth component of MTLSize is ignored.
+ */
+@property (nonatomic) MTLSize screenSize;
+
+/*!
+ @property label
+ @abstract A string to help identify this object.
+ @discussion The default value is nil.
+ */
+@property (nullable, copy, nonatomic) NSString* label;
+
+/*!
+ @property layerCount
+ @return The number of subsequent non-nil layer instances stored in the descriptor, starting at index 0.
+ @discussion This property is modified by setting new layer instances using setLayer:atIndex: or assigning to layers[X]
+ */
+@property (nonatomic, readonly) NSUInteger layerCount;
+
+@end
+
+/*!
+ @protocol MTLRasterizationRateMap
+ @abstract Compiled read-only object that determines how variable rasterization rate is applied when rendering.
+ @discussion A variable rasterization rate map is compiled by MTLDevice from a MTLRasterizationRateMapDescriptor containing one or more MTLRasterizationRateLayerDescriptor.
+ During compilation, the quality samples provided in the MTLRasterizationRateLayerDescriptor may be rounded up to the nearest supported value or granularity, depending on hardware support.
+ However, the compilation will never round values down, so the actual rasterization will always happen at a quality level matching or exceeding the provided quality samples.
+ During rasterization using the MTLRasterizationRateMap the screen space rendering is stored in a smaller area of the framebuffer, such that lower quality regions will not occupy as many texels as higher quality regions.
+ The quality will never exceed 1:1 in any region of screen space.
+ Because a smaller area of the framebuffer is populated, less fragment shader invocations are required to render content, and less bandwidth is consumed to store the shaded values.
+ Use a rasterization rate map to reduce rendering quality in less-important or less-sampled regions of the framebuffer, such as the periphery of a VR/AR display or a far-away cascade of a shadow map.
+ */
+API_AVAILABLE(macos(10.15.4), ios(13.0), macCatalyst(13.4), tvos(16.0))
+@protocol MTLRasterizationRateMap <NSObject>
+
+/*!
+ @property device
+ @return The device on which the rasterization rate map was created
+ */
+@property (readonly) id<MTLDevice> device;
+
+/*!
+ @property label
+ @abstract A string to help identify this object.
+ */
+@property (nullable, readonly) NSString *label;
+
+/*!
+ @property screenSize
+ @return The dimensions, in screen space pixels, of the region where variable rasterization is applied.
+ @discussion The region always has its origin at [0, 0].
+ The depth component of the returned MTLSize is always 0.
+ */
+@property (readonly) MTLSize screenSize;
+
+/*!
+ @property physicalGranularity
+ @return The granularity, in physical pixels, at which variable rasterization rate varies.
+ @discussion Rendering algorithms that use binning or tiling in screen space may want to determine the screen space bin size using this value.
+ The depth component of the returned MTLSize is always 0.
+ */
+@property (readonly) MTLSize physicalGranularity;
+
+/*!
+ @property layerCount
+ @return The number of different configured layers in the rasterization map.
+ @discussion Different render-target layers may target different variable rasterization configurations.
+ The rasterization rate layer for a primitive is selected on the [[render_target_layer_index]].
+ */
+@property (readonly) NSUInteger layerCount;
+
+/*!
+ @property parameterBufferSizeAndAlign
+ @abstract Returns the size and alignment requirements of the parameter buffer for this rate map.
+ @discussion The parameter data can be copied into a buffer with this size and alignment using copyParameterDataToBuffer:offset:
+ */
+@property (readonly) MTLSizeAndAlign parameterBufferSizeAndAlign;
+
+/*!
+ @method copyParameterDataToBuffer:offset:
+ @abstract Copy the parameter data into the provided buffer at the provided offset.
+ @discussion The buffer must have storageMode MTLStorageModeShared, and a size of at least parameterBufferSizeAndAlign.size + offset.
+ The specified offset must be a multiple of parameterBufferSize.align.
+ The buffer can be bound to a shader stage to map screen space to physical fragment space, or vice versa.
+ */
+- (void)copyParameterDataToBuffer:(id<MTLBuffer>)buffer offset:(NSUInteger)offset;
+
+/*!
+ @method getPhysicalSizeForLayer:
+ @abstract The dimensions, in physical fragments, of the area in the render target where variable rasterization is applied
+ @discussion Different configured layers may have a different rasterization rate and may have different size after rendering.
+ The rasterization rate layer for a primitive is selected on the [[render_target_layer_index]].
+ */
+- (MTLSize)physicalSizeForLayer:(NSUInteger)layerIndex;
+
+/*!
+ @method mapScreenToPhysicalCoordinates:forLayer:
+ @abstract Computes where an offset relative to the top-left of screen space, in screen space pixels, would end up in the framebuffer, in physical fragments.
+ The returned value is less-or-equal the input value because the rasterization quality never exceeds 1:1 in any region.
+ */
+- (MTLCoordinate2D)mapScreenToPhysicalCoordinates:(MTLCoordinate2D)screenCoordinates
+                                         forLayer:(NSUInteger)layerIndex;
+
+/*!
+ @method mapPhysicalToScreenCoordinates:forLayer:
+ @abstract Computes where an offset relative to the top-left of the framebuffer, in physical pixels, would end up in screen space, in screen space pixels.
+ The returned value is greater-or-equal the input value because the rasterization quality never exceeds 1:1 in any region.
+ */
+- (MTLCoordinate2D)mapPhysicalToScreenCoordinates:(MTLCoordinate2D)physicalCoordinates
+                                         forLayer:(NSUInteger)layerIndex;
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h	2022-09-21 16:21:28.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h	2022-10-06 13:23:51.000000000 -0400
@@ -83,6 +83,10 @@
     uint32_t baseInstance;
 } MTLDrawIndexedPrimitivesIndirectArguments;
 
+typedef struct {
+    uint32_t viewportArrayIndexOffset;
+    uint32_t renderTargetArrayIndexOffset;
+} MTLVertexAmplificationViewMapping API_AVAILABLE(macos(10.15.4), ios(13.0), macCatalyst(13.4), tvos(16.0));
 
 typedef struct {
     uint32_t patchCount;
@@ -114,6 +118,8 @@
     MTLRenderStageVertex   = (1UL << 0),
     MTLRenderStageFragment = (1UL << 1),
     MTLRenderStageTile API_AVAILABLE(macos(12.0), ios(15.0)) = (1UL << 2),
+    MTLRenderStageObject API_AVAILABLE(macos(13.0), ios(16.0))  = (1UL << 3),
+    MTLRenderStageMesh API_AVAILABLE(macos(13.0), ios(16.0))  = (1UL << 4),
 } API_AVAILABLE(macos(10.13), ios(10.0));
 
 /*!
@@ -192,6 +198,35 @@
  */
 - (void)setVertexSamplerStates:(const id <MTLSamplerState> __nullable [__nonnull])samplers lodMinClamps:(const float [__nonnull])lodMinClamps lodMaxClamps:(const float [__nonnull])lodMaxClamps withRange:(NSRange)range;
 
+/*!
+ @method setVertexVisibleFunctionTable:atBufferIndex:
+ @brief Set a global visible function table for all vertex shaders at the given buffer bind point index.
+ */
+- (void)setVertexVisibleFunctionTable:(nullable id <MTLVisibleFunctionTable>)functionTable atBufferIndex:(NSUInteger)bufferIndex API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @method setVertexVisibleFunctionTables:withBufferRange:
+ @brief Set an array of global visible function tables for all vertex shaders with the given buffer bind point range.
+ */
+- (void)setVertexVisibleFunctionTables:(const id <MTLVisibleFunctionTable> __nullable [__nonnull])functionTables withBufferRange:(NSRange)range API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @method setVertexIntersectionFunctionTable:atBufferIndex:
+ @brief Set a global intersection function table for all vertex shaders at the given buffer bind point index.
+ */
+- (void)setVertexIntersectionFunctionTable:(nullable id <MTLIntersectionFunctionTable>)intersectionFunctionTable atBufferIndex:(NSUInteger)bufferIndex API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @method setVertexIntersectionFunctionTables:withBufferRange:
+ @brief Set an array of global intersection function tables for all vertex shaders with the given buffer bind point range.
+ */
+- (void)setVertexIntersectionFunctionTables:(const id <MTLIntersectionFunctionTable> __nullable [__nonnull])intersectionFunctionTables withBufferRange:(NSRange)range API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @method setVertexAccelerationStructure:atBufferIndex:
+ @brief Set a global acceleration structure for all vertex shaders at the given buffer bind point index.
+ */
+- (void)setVertexAccelerationStructure:(nullable id <MTLAccelerationStructure>)accelerationStructure atBufferIndex:(NSUInteger)bufferIndex API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
 
 /*!
  @method setViewport:
@@ -212,6 +247,14 @@
  */
 - (void)setFrontFacingWinding:(MTLWinding)frontFacingWinding;
 
+/*!
+ @method setVertexAmplificationCount:
+ @brief Specifies the vertex amplification count and associated view mappings for each amplification ID.
+ @param count the amplification count. The maximum value is currently 2.
+ @param viewMappings an array of mapping elements.
+ @discussion Each mapping element describes how to route the corresponding amplification ID to a specific viewport and render target array index by using offsets from the base array index provided by the [[render_target_array_index]] and/or [[viewport_array_index]] output attributes in the vertex shader. This allows a modicum of programmability for each amplified vertex to be routed to a different [[render_target_array_index]] and [[viewport_array_index]] even though these attribytes cannot be amplified themselves.
+ */
+- (void)setVertexAmplificationCount:(NSUInteger)count viewMappings:(nullable const MTLVertexAmplificationViewMapping *)viewMappings API_AVAILABLE(macos(10.15.4), ios(13.0), macCatalyst(13.4), tvos(16.0));
 
 /*!
  @method setCullMode:
@@ -312,6 +355,35 @@
  */
 - (void)setFragmentSamplerStates:(const id <MTLSamplerState> __nullable [__nonnull])samplers lodMinClamps:(const float [__nonnull])lodMinClamps lodMaxClamps:(const float [__nonnull])lodMaxClamps withRange:(NSRange)range;
 
+/*!
+ @method setFragmentVisibleFunctionTable:atBufferIndex:
+ @brief Set a global visible function table for all fragment shaders at the given buffer bind point index.
+ */
+- (void)setFragmentVisibleFunctionTable:(nullable id <MTLVisibleFunctionTable>)functionTable atBufferIndex:(NSUInteger)bufferIndex API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @method setFragmentVisibleFunctionTables:withBufferRange:
+ @brief Set an array of global visible function tables for all fragment shaders with the given buffer bind point range.
+ */
+- (void)setFragmentVisibleFunctionTables:(const id <MTLVisibleFunctionTable> __nullable [__nonnull])functionTables withBufferRange:(NSRange)range API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @method setFragmentIntersectionFunctionTable:atBufferIndex:
+ @brief Set a global intersection function table for all fragment shaders at the given buffer bind point index.
+ */
+- (void)setFragmentIntersectionFunctionTable:(nullable id <MTLIntersectionFunctionTable>)intersectionFunctionTable atBufferIndex:(NSUInteger)bufferIndex API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @method setFragmentIntersectionFunctionTables:withBufferRange:
+ @brief Set an array of global intersection function tables for all fragment shaders with the given buffer bind point range.
+ */
+- (void)setFragmentIntersectionFunctionTables:(const id <MTLIntersectionFunctionTable> __nullable [__nonnull])intersectionFunctionTables withBufferRange:(NSRange)range API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @method setFragmentAccelerationStructure:atBufferIndex:
+ @brief Set a global acceleration structure for all fragment shaders at the given buffer bind point index.
+ */
+- (void)setFragmentAccelerationStructure:(nullable id <MTLAccelerationStructure>)accelerationStructure atBufferIndex:(NSUInteger)bufferIndex API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
 
 /* Constant Blend Color */
 /*!
@@ -392,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 */
 
 /*!
@@ -592,6 +841,36 @@
  */
 - (void)setTileSamplerStates:(const id <MTLSamplerState> __nullable [__nonnull])samplers lodMinClamps:(const float [__nonnull])lodMinClamps lodMaxClamps:(const float [__nonnull])lodMaxClamps withRange:(NSRange)range API_AVAILABLE(ios(11.0), tvos(14.5), macos(11.0), macCatalyst(14.0));
 
+/*!
+ @method setTileVisibleFunctionTable:atBufferIndex:
+ @brief Set a global visible function table for all tile shaders at the given buffer bind point index.
+ */
+- (void)setTileVisibleFunctionTable:(nullable id <MTLVisibleFunctionTable>)functionTable atBufferIndex:(NSUInteger)bufferIndex API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @method setTileVisibleFunctionTables:withBufferRange:
+ @brief Set an array of global visible function tables for all tile shaders with the given buffer bind point range.
+ */
+- (void)setTileVisibleFunctionTables:(const id <MTLVisibleFunctionTable> __nullable [__nonnull])functionTables withBufferRange:(NSRange)range API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @method setTileIntersectionFunctionTable:atBufferIndex:
+ @brief Set a global intersection function table for all tile shaders at the given buffer bind point index.
+ */
+- (void)setTileIntersectionFunctionTable:(nullable id <MTLIntersectionFunctionTable>)intersectionFunctionTable atBufferIndex:(NSUInteger)bufferIndex
+    API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @method setTileIntersectionFunctionTables:withBufferRange:
+ @brief Set an array of global intersection function tables for all tile shaders with the given buffer bind point range.
+ */
+- (void)setTileIntersectionFunctionTables:(const id <MTLIntersectionFunctionTable> __nullable [__nonnull])intersectionFunctionTables withBufferRange:(NSRange)range API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @method setTileAccelerationStructure:atBufferIndex:
+ @brief Set a global acceleration structure for all tile shaders at the given buffer bind point index.
+ */
+- (void)setTileAccelerationStructure:(nullable id <MTLAccelerationStructure>)accelerationStructure atBufferIndex:(NSUInteger)bufferIndex API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
 
 /*!
  @method dispatchThreadsPerTile:
@@ -697,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_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h	2022-09-21 16:19:40.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h	2022-10-06 13:23:52.000000000 -0400
@@ -20,6 +20,7 @@
 MTL_INLINE MTLClearColor MTLClearColorMake(double red, double green, double blue, double alpha);
 
 
+@protocol MTLRasterizationRateMap;
 
 #import <Metal/MTLTypes.h>
 
@@ -373,6 +374,12 @@
 - (NSUInteger)getSamplePositions:(MTLSamplePosition * _Nullable)positions count:(NSUInteger)count API_AVAILABLE(macos(10.13), ios(11.0));
 
 
+/*!
+ @property rasterizationRateMap
+ @abstract The variable rasterization rate map to use when rendering this pass, or nil to not use variable rasterization rate.
+ @discussion The default value is nil. Enabling variable rasterization rate allows for decreasing the rasterization rate in unimportant regions of screen space.
+ */
+@property (nullable, nonatomic, strong) id<MTLRasterizationRateMap> rasterizationRateMap API_AVAILABLE(macos(10.15.4), ios(13.0), macCatalyst(13.4), tvos(16.0));
 
 /*!
  @property sampleBufferAttachments
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h	2022-09-21 16:21:28.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h	2022-10-06 13:23:51.000000000 -0400
@@ -16,6 +16,7 @@
 
 
 #import <Metal/MTLLinkedFunctions.h>
+#import <Metal/MTLFunctionHandle.h>
 
 NS_ASSUME_NONNULL_BEGIN
 @class MTLVertexDescriptor;
@@ -133,6 +134,8 @@
 @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, 13.0), ios(8.0, 16.0));
 @property (nullable, readonly) NSArray <MTLArgument *> *fragmentArguments API_DEPRECATED_WITH_REPLACEMENT("fragmentBindings", macos(10.11, 13.0), ios(8.0, 16.0));
 @property (nullable, readonly) NSArray <MTLArgument *> *tileArguments API_DEPRECATED_WITH_REPLACEMENT("tileBindings", macos(11.0, 13.0), macCatalyst(14.0, 16.0), ios(11.0, 16.0), tvos(14.5, 16.0));
@@ -156,6 +159,7 @@
 @property (readwrite, nonatomic, getter = isRasterizationEnabled) BOOL rasterizationEnabled;
 
 
+@property (readwrite, nonatomic) NSUInteger maxVertexAmplificationCount API_AVAILABLE(macos(10.15.4), ios(13.0), macCatalyst(13.4), tvos(16.0));
 
 @property (readonly) MTLRenderPipelineColorAttachmentDescriptorArray *colorAttachments;
 
@@ -222,6 +226,34 @@
 @property (null_resettable, copy, nonatomic) MTLLinkedFunctions *fragmentLinkedFunctions
     API_AVAILABLE(macos(12.0), ios(15.0));
 
+/*!
+ @property supportAddingVertexBinaryFunctions
+ @abstract This flag makes this pipeline support creating a new pipeline by adding binary functions.
+ */
+@property (readwrite, nonatomic) BOOL supportAddingVertexBinaryFunctions
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @property supportFragmentAddingBinaryFunctions
+ @abstract This flag makes this pipeline support creating a new pipeline by adding binary functions.
+ */
+@property (readwrite, nonatomic) BOOL supportAddingFragmentBinaryFunctions
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @property maxVertexCallStackDepth
+ @abstract The maximum depth of the call stack in stack frames from the shader. Defaults to 1 additional stack frame.
+ */
+@property (readwrite, nonatomic) NSUInteger maxVertexCallStackDepth
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @property maxFragmentCallStackDepth
+ @abstract The maximum depth of the call stack in stack frames from the shader. Defaults to 1 additional stack frame.
+ */
+@property (readwrite, nonatomic) NSUInteger maxFragmentCallStackDepth
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
 
 
 /*!
@@ -232,6 +264,27 @@
 
 @end
 
+MTL_EXPORT API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0))
+@interface MTLRenderPipelineFunctionsDescriptor : NSObject <NSCopying>
+
+/*!
+ @property vertexAdditionalBinaryFunctions
+ @abstract The set of additional binary functions to be accessed from the vertex function in an incrementally created pipeline state.
+ */
+@property (nullable, nonatomic, copy) NSArray<id<MTLFunction>> *vertexAdditionalBinaryFunctions;
+
+/*!
+ @property fragmentAdditionalBinaryFunctions
+ @abstract The set of additional binary functions to be accessed from the fragment function in an incrementally created pipeline state.
+ */
+@property (nullable, nonatomic, copy) NSArray<id<MTLFunction>> *fragmentAdditionalBinaryFunctions;
+
+/*!
+ @property tileAdditionalBinaryFunctions
+ @abstract The set of additional binary functions to be accessed from the tile function in an incrementally created pipeline state.
+ */
+@property (nullable, nonatomic, copy) NSArray<id<MTLFunction>> *tileAdditionalBinaryFunctions;
+@end
 
 /*!
  @protocol MTLRenderPipelineState
@@ -276,11 +329,69 @@
 
 
 /*!
+ @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 gpuResourceID
  @abstract Handle of the GPU resource suitable for storing in an Argument Buffer
  */
 @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.
+ */
+- (nullable id<MTLFunctionHandle>)functionHandleWithFunction:(id<MTLFunction>)function stage:(MTLRenderStages)stage API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @method newVisibleFunctionTableWithDescriptor:stage:
+ @brief Allocate a visible function table for the specified stage of the pipeline with the provided descriptor.
+ */
+- (nullable id<MTLVisibleFunctionTable>)newVisibleFunctionTableWithDescriptor:(MTLVisibleFunctionTableDescriptor * __nonnull)descriptor stage:(MTLRenderStages)stage API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @method newIntersectionFunctionTableWithDescriptor:stage:
+ @brief Allocate an intersection function table for the specified stage of the pipeline with the provided descriptor.
+ */
+- (nullable id <MTLIntersectionFunctionTable>)newIntersectionFunctionTableWithDescriptor:(MTLIntersectionFunctionTableDescriptor * _Nonnull)descriptor stage:(MTLRenderStages)stage API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @method newRenderPipelineStateWithAdditionalBinaryFunctions:error:
+ @brief Allocate a new render pipeline state by adding binary functions for each stage of this pipeline state.
+ */
+- (nullable id <MTLRenderPipelineState>)newRenderPipelineStateWithAdditionalBinaryFunctions:(nonnull MTLRenderPipelineFunctionsDescriptor *)additionalBinaryFunctions error:(__autoreleasing NSError **)error API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
 
 @end
 
@@ -379,6 +490,19 @@
 @property (null_resettable, copy, nonatomic) MTLLinkedFunctions *linkedFunctions
     API_AVAILABLE(macos(12.0), ios(15.0));
 
+/*!
+ @property supportAddingBinaryFunctions
+ @abstract This flag makes this pipeline support creating a new pipeline by adding binary functions.
+ */
+@property (readwrite, nonatomic) BOOL supportAddingBinaryFunctions
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
+/*!
+ @property maxCallStackDepth
+ @abstract The maximum depth of the call stack in stack frames from the tile function. Defaults to 1 additional stack frame.
+ */
+@property (readwrite, nonatomic) NSUInteger maxCallStackDepth
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
 
 
 - (void)reset;
@@ -386,5 +510,179 @@
 @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
+
 
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStateCommandEncoder.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStateCommandEncoder.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStateCommandEncoder.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStateCommandEncoder.h	2022-10-06 13:23:52.000000000 -0400
@@ -0,0 +1,125 @@
+//
+//  MTLResourceStateCommandEncoder.h
+//  Metal
+//
+//  Copyright © 2018 Apple, Inc. All rights reserved.
+
+
+#import <Foundation/Foundation.h>
+#import <Metal/MTLDefines.h>
+#import <Metal/MTLTypes.h>
+#import <Metal/MTLCommandEncoder.h>
+#import <Metal/MTLTexture.h>
+#import <Metal/MTLFence.h>
+#import <Metal/MTLResourceStatePass.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ @enum MTLSparseTextureMappingMode
+ @abstract Type of mapping operation for sparse texture
+ */
+typedef NS_ENUM(NSUInteger, MTLSparseTextureMappingMode)
+{
+    MTLSparseTextureMappingModeMap   = 0,
+    MTLSparseTextureMappingModeUnmap = 1,
+} API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
+
+/*!
+ @enum MTLMapIndirectArguments
+ @abstract Structure describing indirect mapping region. This structure is used to populate a buffer for the method  'MTLResourceStateCommandEncoder updateTextureMapping:indirectBuffer:indirectBufferOffset:'
+ @discussion The correct data format for the buffer used in 'MTLResourceStateCommandEncoder updateTextureMapping:indirectBuffer:indirectBufferOffset: is the following:
+ 
+ struct MTLMapIndirectBufferFormat{
+     uint32_t numMappings;
+     MTLMapIndirectArguments mappings[numMappings];
+ }
+ */
+typedef struct {
+    uint32_t regionOriginX;
+    uint32_t regionOriginY;
+    uint32_t regionOriginZ;
+    uint32_t regionSizeWidth;
+    uint32_t regionSizeHeight;
+    uint32_t regionSizeDepth;
+    uint32_t mipMapLevel;
+    uint32_t sliceId;
+} MTLMapIndirectArguments;
+
+API_AVAILABLE(macos(10.15), ios(13.0), tvos(16.0))
+@protocol MTLResourceStateCommandEncoder <MTLCommandEncoder>
+
+
+/*!
+ @method updateTextureMappings:regions:mipLevels:slices:numRegions:mode:
+ @abstract Updates multiple regions within a sparse texture.
+ */
+-(void) updateTextureMappings:(id<MTLTexture>) texture
+                         mode:(const MTLSparseTextureMappingMode)mode
+                      regions:(const MTLRegion[_Nonnull])regions
+                    mipLevels:(const NSUInteger[_Nonnull])mipLevels
+                       slices:(const NSUInteger[_Nonnull])slices
+                   numRegions:(NSUInteger)numRegions API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
+
+/*!
+ @method updateTextureMapping:region:mipLevel:slice:mode:
+ @abstract Updates mapping for given sparse texture
+ */
+-(void) updateTextureMapping:(id<MTLTexture>) texture
+                        mode:(const MTLSparseTextureMappingMode)mode
+                      region:(const MTLRegion)region
+                    mipLevel:(const NSUInteger)mipLevel
+                       slice:(const NSUInteger)slice API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
+
+/*!
+ @method updateTextureMapping:indirectBuffer:indirectBufferOffset:
+ @abstract Updates mapping for given sparse texture. Updates are driven via a MTLBuffer with the structure format defined by MTLMapIndirectBufferFormat.
+ 
+  struct MTLMapIndirectBufferFormat{
+      uint32_t numMappings;
+      MTLMapIndirectArguments mappings[numMappings]; 
+  }
+ */
+-(void) updateTextureMapping:(id<MTLTexture>) texture
+                        mode:(const MTLSparseTextureMappingMode)mode
+              indirectBuffer:(id<MTLBuffer>)indirectBuffer
+        indirectBufferOffset:(NSUInteger)indirectBufferOffset API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
+
+/*!
+ @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.
+ 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 API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
+
+/*!
+ @method waitForFence:
+ @abstract Prevent further GPU work until the fence is reached.
+ @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), tvos(16.0));
+
+
+/*!
+ @method moveTextureMappingsFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:
+ @abstract Move sparse page mappings from one sparse texture to another from the same heap.
+ @discussion The tile mapping is moved from the source texture only if the destination texture tile is unmapped. The textures must also have matching a texture format,
+ texture type, sample count, usage and resource options.
+ */
+-(void) moveTextureMappingsFromTexture:(id<MTLTexture>) sourceTexture
+                          sourceSlice:(NSUInteger)sourceSlice
+                          sourceLevel:(NSUInteger)sourceLevel
+                         sourceOrigin:(MTLOrigin)sourceOrigin
+                           sourceSize:(MTLSize)sourceSize
+                            toTexture:(id<MTLTexture>) destinationTexture
+                     destinationSlice:(NSUInteger)destinationSlice
+                     destinationLevel:(NSUInteger)destinationLevel
+                     destinationOrigin:(MTLOrigin)destinationOrigin API_AVAILABLE(macos(13.0), ios(16.0));
+
+
+
+@end
+NS_ASSUME_NONNULL_END
+
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h	2022-09-19 04:25:17.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h	2022-10-06 13:22:04.000000000 -0400
@@ -9,3 +9,77 @@
 #import <Metal/MTLDefines.h>
 
 
+#import <Metal/MTLTypes.h>
+
+#import <Metal/MTLCounters.h>
+
+NS_ASSUME_NONNULL_BEGIN
+@protocol MTLDevice;
+
+MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
+@interface MTLResourceStatePassSampleBufferAttachmentDescriptor : NSObject<NSCopying>
+/*!
+@property sampleBuffer
+@abstract The sample buffer to store samples for the resourceState-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 a resourceState 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 a resourceState pass will fail.
+ */
+@property (nonatomic) NSUInteger endOfEncoderSampleIndex;
+
+@end
+
+MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
+@interface MTLResourceStatePassSampleBufferAttachmentDescriptorArray : NSObject
+/* 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 values. */
+- (void)setObject:(nullable MTLResourceStatePassSampleBufferAttachmentDescriptor *)attachment atIndexedSubscript:(NSUInteger)attachmentIndex;
+
+@end
+
+/*!
+ @class MTLResourceStatePassDescriptor
+ @abstract MTLResourceStatePassDescriptor represents a collection of attachments to be used to create a concrete resourceState command encoder
+ */
+MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
+@interface MTLResourceStatePassDescriptor : NSObject <NSCopying>
+
+/*!
+ @method resourceStatePassDescriptor
+ @abstract Create an autoreleased default frame buffer descriptor
+ */
++ (MTLResourceStatePassDescriptor *)resourceStatePassDescriptor;
+
+
+/*!
+ @property sampleBufferAttachments
+ @abstract An array of sample buffers and associated sample indices.
+ */
+@property (readonly) MTLResourceStatePassSampleBufferAttachmentDescriptorArray * sampleBufferAttachments API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h	2022-09-21 16:19:40.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h	2022-10-06 13:23:52.000000000 -0400
@@ -63,11 +63,11 @@
 */
 typedef NS_ENUM(NSUInteger, MTLSamplerAddressMode) {
     MTLSamplerAddressModeClampToEdge = 0,
-    MTLSamplerAddressModeMirrorClampToEdge API_AVAILABLE(macos(10.11)) API_UNAVAILABLE(ios) = 1,
+    MTLSamplerAddressModeMirrorClampToEdge API_AVAILABLE(macos(10.11), ios(14.0), tvos(16.0)) = 1,
     MTLSamplerAddressModeRepeat = 2,
     MTLSamplerAddressModeMirrorRepeat = 3,
     MTLSamplerAddressModeClampToZero = 4,
-    MTLSamplerAddressModeClampToBorderColor API_AVAILABLE(macos(10.12)) API_UNAVAILABLE(ios) = 5,
+    MTLSamplerAddressModeClampToBorderColor API_AVAILABLE(macos(10.12), ios(14.0), tvos(16.0)) = 5,
 } API_AVAILABLE(macos(10.11), ios(8.0));
 
 /*!
@@ -87,7 +87,7 @@
     MTLSamplerBorderColorTransparentBlack = 0,  // {0,0,0,0}
     MTLSamplerBorderColorOpaqueBlack = 1,       // {0,0,0,1}
     MTLSamplerBorderColorOpaqueWhite = 2,       // {1,1,1,1}
-} API_AVAILABLE(macos(10.12)) API_UNAVAILABLE(ios);
+} API_AVAILABLE(macos(10.12), ios(14.0), tvos(16.0));
 
 /*!
  @class MTLSamplerDescriptor
@@ -146,7 +146,7 @@
  @property borderColor
  @abstract Set the color for the MTLSamplerAddressMode to one of the predefined in the MTLSamplerBorderColor enum.
  */
-@property (nonatomic) MTLSamplerBorderColor borderColor API_AVAILABLE(macos(10.12)) API_UNAVAILABLE(ios);
+@property (nonatomic) MTLSamplerBorderColor borderColor API_AVAILABLE(macos(10.12), ios(14.0), tvos(16.0));
 
 /*!
  @property normalizedCoordinates.
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h	2022-09-21 16:19:39.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h	2022-10-06 13:22:03.000000000 -0400
@@ -30,7 +30,7 @@
     MTLTextureTypeCube = 5,
     MTLTextureTypeCubeArray API_AVAILABLE(macos(10.11), ios(11.0)) = 6,
     MTLTextureType3D = 7,
-    MTLTextureType2DMultisampleArray API_AVAILABLE(macos(10.14)) API_UNAVAILABLE(ios) = 8,
+    MTLTextureType2DMultisampleArray API_AVAILABLE(macos(10.14), ios(14.0), tvos(16.0)) = 8,
     MTLTextureTypeTextureBuffer API_AVAILABLE(macos(10.14), ios(12.0)) = 9
 } API_AVAILABLE(macos(10.11), ios(8.0));
 
@@ -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.5), ios(15.0), tvos(16.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.5), ios(15.0), tvos(16.0));
+
+/*!
  @property swizzle
  @abstract Channel swizzle to use when reading or sampling from the texture, the default value is MTLTextureSwizzleChannelsDefault.
  */
@@ -372,6 +390,20 @@
  */
 @property (readonly, getter = isFramebufferOnly) BOOL framebufferOnly;
 
+/*!
+ @property firstMipmapInTail
+ @abstract For sparse textures this property returns index of first mipmap that is packed in tail.
+ Mapping this mipmap level will map all subsequent mipmap levels.
+ */
+@property (readonly) NSUInteger firstMipmapInTail API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
+
+/*!
+ @property tailSizeInBytes
+ @abstract Amount of memory in bytes required to map sparse texture tail.
+ */
+@property (readonly) NSUInteger tailSizeInBytes API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
+
+@property (readonly) BOOL isSparse API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0), tvos(16.0));
 
 /*!
  @property allowGPUOptimizedContents
@@ -380,6 +412,13 @@
  */
 @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.5), ios(15.0), tvos(16.0));
+
 
 /*!
  @property gpuResourceID
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h	2022-09-21 16:19:40.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h	2022-10-06 13:22:04.000000000 -0400
@@ -86,6 +86,22 @@
     return position;
 }
 
+/*!
+ @typedef MTLCoordinate2D
+ @abstract A floating point coordinate in an abstract 2D space.
+ Refer to location of use for concrete information on the space in which the coordinate exists.
+ */
+typedef MTLSamplePosition MTLCoordinate2D;
+
+/*!
+ @function MTLCoordinate2DMake
+ @abstract Convenience function to create a 2D coordinate from 2 values.
+ */
+MTL_INLINE MTLCoordinate2D MTLCoordinate2DMake(float x, float y)
+{
+    MTLCoordinate2D result = {x, y};
+    return result;
+} 
 
 /*!
  @typedef MTLResourceID
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVisibleFunctionTable.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVisibleFunctionTable.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVisibleFunctionTable.h	2022-09-19 04:25:17.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVisibleFunctionTable.h	2022-10-06 13:22:05.000000000 -0400
@@ -7,3 +7,39 @@
 
 #import <Metal/MTLDefines.h>
 
+#import <Metal/MTLTypes.h>
+#import <Metal/MTLResource.h>
+#import <Metal/MTLFunctionHandle.h>
+
+MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
+@interface MTLVisibleFunctionTableDescriptor : NSObject <NSCopying>
+
+/*!
+ @method visibleFunctionTableDescriptor
+ @abstract Create an autoreleased visible function table descriptor
+ */
++ (nonnull MTLVisibleFunctionTableDescriptor *)visibleFunctionTableDescriptor;
+
+/*!
+* @property functionCount
+* @abstract The number of functions in the table.
+*/
+@property (nonatomic) NSUInteger functionCount;
+
+@end
+
+API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0))
+@protocol MTLVisibleFunctionTable <MTLResource>
+
+/*!
+ @property gpuResourceID
+ @abstract Handle of the GPU resource suitable for storing in an Argument Buffer
+ */
+@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;
+
+@end
+
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes	2022-09-09 17:22:33.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes	2022-09-22 15:34:39.000000000 -0400
@@ -232,6 +232,34 @@
   SwiftName: astc_12x10_ldr
 - Name: MTLPixelFormatASTC_12x12_LDR
   SwiftName: astc_12x12_ldr
+- Name: MTLPixelFormatASTC_4x4_HDR          
+  SwiftName: astc_4x4_hdr
+- Name: MTLPixelFormatASTC_5x4_HDR          
+  SwiftName: astc_5x4_hdr
+- Name: MTLPixelFormatASTC_5x5_HDR          
+  SwiftName: astc_5x5_hdr
+- Name: MTLPixelFormatASTC_6x5_HDR          
+  SwiftName: astc_6x5_hdr
+- Name: MTLPixelFormatASTC_6x6_HDR          
+  SwiftName: astc_6x6_hdr
+- Name: MTLPixelFormatASTC_8x5_HDR          
+  SwiftName: astc_8x5_hdr
+- Name: MTLPixelFormatASTC_8x6_HDR          
+  SwiftName: astc_8x6_hdr
+- Name: MTLPixelFormatASTC_8x8_HDR          
+  SwiftName: astc_8x8_hdr
+- Name: MTLPixelFormatASTC_10x5_HDR         
+  SwiftName: astc_10x5_hdr
+- Name: MTLPixelFormatASTC_10x6_HDR         
+  SwiftName: astc_10x6_hdr
+- Name: MTLPixelFormatASTC_10x8_HDR         
+  SwiftName: astc_10x8_hdr
+- Name: MTLPixelFormatASTC_10x10_HDR        
+  SwiftName: astc_10x10_hdr
+- Name: MTLPixelFormatASTC_12x10_HDR        
+  SwiftName: astc_12x10_hdr
+- Name: MTLPixelFormatASTC_12x12_HDR        
+  SwiftName: astc_12x12_hdr
 - Name: MTLTessellationControlPointIndexTypeUInt16
   SwiftName: uint16
 - Name: MTLTessellationControlPointIndexTypeUInt32
@@ -390,6 +418,37 @@
   - Selector: 'getSamplePositions:count:'
     MethodKind: Instance
     SwiftPrivate: true
+- Name: MTLRasterizationRateMapDescriptor
+  Methods:
+  - Selector: 'rasterizationRateMapDescriptorWithScreenSize:layerCount:layers:'
+    MethodKind: Class
+    SwiftPrivate: true
+  - Selector: 'rasterizationRateMapDescriptorWithScreenSize:layer:'
+    MethodKind: Class
+    SwiftPrivate: true
+  - Selector: 'rasterizationRateMapDescriptorWithScreenSize:'
+    MethodKind: Class
+    SwiftPrivate: true
+- Name: MTLRasterizationRateLayerDescriptor
+  Methods:
+  - Selector: 'initWithSampleCount:horizontal:vertical:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  Properties:
+  - Name: 'horizontalSampleStorage'
+    PropertyKind: Instance
+    SwiftPrivate: true
+  - Name: 'verticalSampleStorage'
+    PropertyKind: Instance
+    SwiftPrivate: true
+- Name: MTLRasterizationRateSampleArray
+  Methods:
+  - Selector: 'objectAtIndexedSubscript:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setObject:atIndexedSubscript:'
+    MethodKind: Instance
+    SwiftPrivate: true
 
 Protocols:
 - Name: MTLIOScratchBufferAllocator
@@ -408,6 +467,11 @@
   - Selector: 'copyStatusToBuffer:offset:'
     SwiftName: copyStatus(buffer:offset:)
     MethodKind: Instance
+- Name: MTLResourceStateCommandEncoder
+  Methods:
+  - Selector: 'moveTextureMappingsFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:'
+    SwiftName: moveTextureMappings(sourceTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:destinationTexture:destinationSlice:destinationLevel:destinationOrigin:)
+    MethodKind: Instance
 - Name: MTLBlitCommandEncoder
   Methods:
   - Selector: 'synchronizeResource:'
@@ -484,9 +548,21 @@
   - Selector: 'computeCommandEncoderWithDispatchType:'
     SwiftName: makeComputeCommandEncoder(dispatchType:)
     MethodKind: Instance
+  - Selector: 'resourceStateCommandEncoder'
+    SwiftName: makeResourceStateCommandEncoder()
+    MethodKind: Instance
+  - Selector: 'resourceStateCommandEncoderWithDescriptor'
+    SwiftName: makeResourceStateCommandEncoder(descriptor:)
+    MethodKind: Instance
   - Selector: 'parallelRenderCommandEncoderWithDescriptor:'
     SwiftName: makeParallelRenderCommandEncoder(descriptor:)
     MethodKind: Instance
+  - Selector: 'accelerationStructureCommandEncoder'
+    SwiftName: makeAccelerationStructureCommandEncoder()
+    MethodKind: Instance
+  - Selector: 'accelerationStructureCommandEncoderWithDescriptor:'
+    SwiftName: makeAccelerationStructureCommandEncoder(descriptor:)
+    MethodKind: Instance
   - Selector: 'encodeWaitForEvent:value:'
     SwiftName: encodeWaitForEvent(_:value:)
     MethodKind: Instance
@@ -586,6 +662,21 @@
   - Selector: 'sampleCountersInBuffer:atSampleIndex:withBarrier:'
     MethodKind: Instance
     SwiftName: sampleCounters(sampleBuffer:sampleIndex:barrier:)
+  - Selector: 'setVisibleFunctionTable:atBufferIndex:'
+    SwiftName: setVisibleFunctionTable(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setVisibleFunctionTables:withBufferRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setIntersectionFunctionTable:atBufferIndex:'
+    SwiftName: setIntersectionFunctionTable(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setIntersectionFunctionTables:withBufferRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setAccelerationStructure:atBufferIndex:'
+    SwiftName: setAccelerationStructure(_:bufferIndex:)
+    MethodKind: Instance
   - Selector: 'executeCommandsInBuffer:withRange:'
     MethodKind: Instance
     SwiftPrivate: true
@@ -594,8 +685,32 @@
     SwiftPrivate: true
 - Name: MTLComputePipelineState
   Methods:
+  - Selector: 'functionHandleWithFunction:'
+    SwiftName: functionHandle(function:)
+    MethodKind: Instance
+  - Selector: 'newComputePipelineStateWithAdditionalBinaryFunctions:error:'
+    SwiftName: makeComputePipelineStateWithAdditionalBinaryFunctions(functions:)
+    MethodKind: Instance
+  - Selector: 'newVisibleFunctionTableWithDescriptor:'
+    SwiftName: makeVisibleFunctionTable(descriptor:)
+    MethodKind: Instance
+  - Selector: 'newIntersectionFunctionTableWithDescriptor:'
+    SwiftName: makeIntersectionFunctionTable(descriptor:)
+    MethodKind: Instance
 - Name: MTLRenderPipelineState
   Methods:
+  - Selector: 'functionHandleWithFunction:stage:'
+    SwiftName: functionHandle(function:stage:)
+    MethodKind: Instance
+  - Selector: 'newRenderPipelineStateWithAdditionalBinaryFunctions:error:'
+    SwiftName: makeRenderPipelineState(additionalBinaryFunctions:)
+    MethodKind: Instance
+  - Selector: 'newVisibleFunctionTableWithDescriptor:stage:'
+    SwiftName: makeVisibleFunctionTable(descriptor:stage:)
+    MethodKind: Instance
+  - Selector: 'newIntersectionFunctionTableWithDescriptor:stage:'
+    SwiftName: makeIntersectionFunctionTable(descriptor:stage:)
+    MethodKind: Instance
 - Name: MTLDevice
   Methods:
   - Selector: 'getDefaultSamplePositions:count:'
@@ -646,6 +761,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
@@ -730,6 +851,12 @@
   - Selector: 'newIndirectCommandBufferWithDescriptor:maxCommandCount:options:'
     SwiftName: makeIndirectCommandBuffer(descriptor:maxCommandCount:options:)
     MethodKind: Instance
+  - Selector: 'newRasterizationRateMapWithDescriptor:'
+    MethodKind: Instance
+    SwiftName: makeRasterizationRateMap(descriptor:)
+  - Selector: 'supportsRasterizationRateMapWithLayerCount:'
+    MethodKind: Instance
+    SwiftName: supportsRasterizationRateMap(layerCount:)
   - Selector: 'newCounterSampleBufferWithDescriptor:error:'
     SwiftName: makeCounterSampleBuffer(descriptor:)
     MethodKind: Instance
@@ -745,6 +872,21 @@
   - Selector: 'newBinaryArchiveWithDescriptor:error:'
     SwiftName: makeBinaryArchive(descriptor:)
     MethodKind: Instance
+  - Selector: 'accelerationStructureSizesWithDescriptor:'
+    SwiftName: accelerationStructureSizes(descriptor:)
+    MethodKind: Instance
+  - Selector: 'newAccelerationStructureWithSize:'
+    SwiftName: makeAccelerationStructure(size:)
+    MethodKind: Instance
+  - 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
@@ -754,6 +896,12 @@
   - Selector: 'newIOCommandQueueWithDescriptor:error:'
     SwiftName: makeIOCommandQueue(descriptor:)
     MethodKind: Instance
+  - Selector: 'sparseTileSizeInBytesForSparsePageSize:'
+    SwiftName: sparseTileSizeInBytes(sparsePageSize:)
+    MethodKind: Instance
+  - Selector: 'sparseTileSizeWithTextureType:pixelFormat:sampleCount:sparsePageSize:'
+    SwiftName: sparseTileSize(textureType:pixelFormat:sampleCount:sparsePageSize:)
+    MethodKind: Instance
 - Name: MTLDrawable
   Methods:
   - Selector: 'presentAtTime:'
@@ -776,6 +924,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:'
@@ -832,6 +992,23 @@
     MethodKind: Instance
     SwiftPrivate: true
 
+  - Selector: 'setAccelerationStructure:atIndex:'
+    SwiftName: setAccelerationStructure(_:index:)
+    MethodKind: Instance
+  - Selector: 'setVisibleFunctionTable:atIndex:'
+    SwiftName: setVisibleFunctionTable(_:index:)
+    MethodKind: Instance
+  - Selector: 'setVisibleFunctionTables:withRange:'
+    SwiftName: __setVisibleFunctionTables(_:withBufferRange:)
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setIntersectionFunctionTable:atIndex:'
+    SwiftName: setIntersectionFunctionTable(_:index:)
+    MethodKind: Instance
+  - Selector: 'setIntersectionFunctionTables:withRange:'
+    SwiftName: __setIntersectionFunctionTables(_:withBufferRange:)
+    MethodKind: Instance
+    SwiftPrivate: true
 - Name: MTLLibrary
   Methods:
   - Selector: 'newFunctionWithName:'
@@ -849,6 +1026,12 @@
   - Selector: 'newFunctionWithDescriptor:completionHandler:'
     SwiftName: makeFunction(descriptor:completionHandler:)
     MethodKind: Instance
+  - Selector: 'newIntersectionFunctionWithDescriptor:error:'
+    SwiftName: makeIntersectionFunction(descriptor:)
+    MethodKind: Instance
+  - Selector: 'newIntersectionFunctionWithDescriptor:completionHandler:'
+    SwiftName: makeIntersectionFunction(descriptor:completionHandler:)
+    MethodKind: Instance
 - Name: MTLFunction
   Methods:
   - Selector: 'newArgumentEncoderWithBufferIndex:'
@@ -868,6 +1051,24 @@
   - Selector: 'setColorStoreActionOptions:atIndex:'
     SwiftName: setColorStoreActionOptions(_:index:)
     MethodKind: Instance
+- Name: MTLRasterizationRateMap
+  Properties:
+  - Name: 'parameterBufferSizeAndAlign'
+    PropertyKind: Instance
+    SwiftName: parameterDataSizeAndAlign
+  Methods:
+  - Selector: 'copyParameterDataToBuffer:offset:'
+    MethodKind: Instance
+    SwiftName: copyParameterData(buffer:offset:)
+  - Selector: 'physicalSizeForLayer:'
+    MethodKind: Instance
+    SwiftName: physicalSize(layer:)
+  - Selector: 'mapScreenToPhysicalCoordinates:forLayer:'
+    MethodKind: Instance
+    SwiftName: physicalCoordinates(screenCoordinates:layer:)
+  - Selector: 'mapPhysicalToScreenCoordinates:forLayer:'
+    MethodKind: Instance
+    SwiftName: screenCoordinates(physicalCoordinates:layer:)
 - Name: MTLRenderCommandEncoder
   Methods:
   - Selector: 'setViewports:count:'
@@ -975,6 +1176,72 @@
   - 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: 'setObjectThreadgroupMemoryLength:atIndex:'
+    SwiftName: setObjectThreadgroupMemoryLength(_:index:)
+    MethodKind: Instance
+  - Selector: 'drawMeshThreadgroupsWithIndirectBuffer:indirectBufferOffset:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:'
+    SwiftName: drawMeshThreadgroups(indirectBuffer:indirectBufferOffset:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:)
+    MethodKind: Instance
   - Selector: 'setBlendColorRed:green:blue:alpha:'
     SwiftName: setBlendColor(red:green:blue:alpha:)
     MethodKind: Instance
@@ -1063,6 +1330,51 @@
   - Selector: 'sampleCountersInBuffer:atSampleIndex:withBarrier:'
     MethodKind: Instance
     SwiftName: sampleCounters(sampleBuffer:sampleIndex:barrier:)
+  - Selector: 'setVertexVisibleFunctionTable:atBufferIndex:'
+    SwiftName: setVertexVisibleFunctionTable(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setVertexVisibleFunctionTables:withBufferRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setFragmentVisibleFunctionTable:atBufferIndex:'
+    SwiftName: setFragmentVisibleFunctionTable(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setFragmentVisibleFunctionTables:withBufferRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setTileVisibleFunctionTable:atBufferIndex:'
+    SwiftName: setTileVisibleFunctionTable(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setTileVisibleFunctionTables:withBufferRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setVertexIntersectionFunctionTable:atBufferIndex:'
+    SwiftName: setVertexIntersectionFunctionTable(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setVertexIntersectionFunctionTables:withBufferRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setFragmentIntersectionFunctionTable:atBufferIndex:'
+    SwiftName: setFragmentIntersectionFunctionTable(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setFragmentIntersectionFunctionTables:withBufferRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setTileIntersectionFunctionTable:atBufferIndex:'
+    SwiftName: setTileIntersectionFunctionTable(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setTileIntersectionFunctionTables:withBufferRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setVertexAccelerationStructure:atBufferIndex:'
+    SwiftName: setVertexAccelerationStructure(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setFragmentAccelerationStructure:atBufferIndex:'
+    SwiftName: setFragmentAccelerationStructure(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setTileAccelerationStructure:atBufferIndex:'
+    SwiftName: setTileAccelerationStructure(_:bufferIndex:)
+    MethodKind: Instance
 - Name: MTLSharedEvent
   Methods:
   - Selector: 'newSharedEventHandle'
@@ -1124,9 +1436,84 @@
   - Selector: 'resolveCounterRange:'
     MethodKind: Instance
     SwiftPrivate: true
+- Name: MTLVisibleFunctionTable
+  Methods:
+  - Selector: 'setFunction:atIndex:'
+    SwiftName: setFunction(_:index:)
+    MethodKind: Instance
+  - Selector: 'setFunctions:withRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+- Name: MTLIntersectionFunctionTable
+  Methods:
+  - Selector: 'setFunction:atIndex:'
+    SwiftName: setFunction(_:index:)
+    MethodKind: Instance
+  - Selector: 'setFunctions:withRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setBuffer:offset:atIndex:'
+    SwiftName: setBuffer(_:offset:index:)
+    MethodKind: Instance
+  - Selector: 'setBuffers:offsets:withRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setVisibleFunctionTable:atBufferIndex:'
+    SwiftName: setVisibleFunctionTable(_:bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'setVisibleFunctionTables:withBufferRange:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'setOpaqueTriangleIntersectionFunctionWithSignature:atIndex:'
+    SwiftName: setOpaqueTriangleIntersectionFunction(signature:index:)
+    MethodKind: Instance
+  - Selector: 'setOpaqueTriangleIntersectionFunctionWithSignature:withRange:'
+    SwiftName: setOpaqueTriangleIntersectionFunction(signature:range:)
+    MethodKind: Instance
+- Name: MTLAccelerationStructureCommandEncoder
+  Methods:
+  - Selector: 'buildAccelerationStructure:descriptor:scratchBuffer:scratchBufferOffset:'
+    SwiftName: build(accelerationStructure:descriptor:scratchBuffer:scratchBufferOffset:)
+    MethodKind: Instance
+  - Selector: 'refitAccelerationStructure:descriptor:destination:scratchBuffer:scratchBufferOffset:'
+    SwiftName: refit(sourceAccelerationStructure:descriptor:destinationAccelerationStructure:scratchBuffer:scratchBufferOffset:)
+    MethodKind: Instance
+  - Selector: 'copyAccelerationStructure:toAccelerationStructure:'
+    SwiftName: copy(sourceAccelerationStructure:destinationAccelerationStructure:)
+    MethodKind: Instance
+  - Selector: 'writeCompactedAccelerationStructureSize:toBuffer:offset:'
+    SwiftName: writeCompactedSize(accelerationStructure:buffer:offset:)
+    MethodKind: Instance
+  - Selector: 'writeCompactedAccelerationStructureSize:toBuffer:offset:sizeDataType:'
+    SwiftName: writeCompactedSize(accelerationStructure:buffer:offset:sizeDataType:)
+    MethodKind: Instance
+  - Selector: 'copyAndCompactAccelerationStructure:toAccelerationStructure:'
+    SwiftName: copyAndCompact(sourceAccelerationStructure:destinationAccelerationStructure:)
+    MethodKind: Instance
+  - Selector: 'updateFence:'
+    SwiftName: updateFence(_:)
+    MethodKind: Instance
+  - Selector: 'waitForFence:'
+    SwiftName: waitForFence(_:)
+    MethodKind: Instance
+  - Selector: 'useResource:usage:'
+    SwiftName: useResource(_:usage:)
+    MethodKind: Instance
+  - Selector: 'useResources:count:usage:'
+    MethodKind: Instance
+    SwiftPrivate: true
+  - Selector: 'useHeap:'
+    SwiftName: useHeap(_:)
+    MethodKind: Instance
+  - Selector: 'useHeaps:count:'
+    MethodKind: Instance
+    SwiftPrivate: true
   - 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:'
diff -ruN /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h
--- /Applications/Xcode_14.1.0-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h	2022-09-19 04:25:18.000000000 -0400
+++ /Applications/Xcode_14.1.0-rc.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h	2022-09-30 04:04:05.000000000 -0400
@@ -38,6 +38,9 @@
 #import <Metal/MTLFence.h>
 #import <Metal/MTLEvent.h>
 #import <Metal/MTLFunctionLog.h>
+#import <Metal/MTLResourceStateCommandEncoder.h>
+#import <Metal/MTLAccelerationStructureCommandEncoder.h>
+#import <Metal/MTLRasterizationRate.h>
 #import <Metal/MTLDynamicLibrary.h>
 #import <Metal/MTLFunctionDescriptor.h>
 #import <Metal/MTLLinkedFunctions.h>
Clone this wiki locally