-
Notifications
You must be signed in to change notification settings - Fork 507
Metal tvOS xcode15.0 b1
Manuel de la Pena edited this page Nov 1, 2023
·
3 revisions
#Metal.framework https://github.com/xamarin/xamarin-macios/pull/19379
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h 2023-03-09 19:18:19
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h 2023-05-31 05:14:36
@@ -57,7 +57,9 @@
MTLAccelerationStructureInstanceOptionDisableTriangleCulling = (1 << 0),
/**
- * @brief Disable triangle back or front face culling
+ * @brief Override triangle front-facing winding. By default, the winding is
+ * assumed to be clockwise unless overridden by the intersector object. This overrides
+ * the intersector's winding order.
*/
MTLAccelerationStructureInstanceOptionTriangleFrontFacingWindingCounterClockwise = (1 << 1),
@@ -397,6 +399,312 @@
@end
+/**
+ * @brief Curve types
+ */
+typedef NS_ENUM(NSInteger, MTLCurveType) {
+ /**
+ * @brief Curve with a circular cross-section. These curves have the
+ * advantage of having a real 3D shape consistent across different ray
+ * directions, well-defined surface normals, etc. However, they may be
+ * slower to intersect. These curves are ideal for viewing close-up.
+ */
+ MTLCurveTypeRound = 0,
+
+ /**
+ * @brief Curve with a flat cross-section aligned with the ray direction.
+ * These curves may be faster to intersect but do not have a consistent
+ * 3D structure across different rays. These curves are ideal for viewing
+ * at a distance or curves with a small radius such as hair and fur.
+ */
+ MTLCurveTypeFlat = 1,
+} API_AVAILABLE(macos(14.0), ios(17.0));
+
+/**
+ * @brief Basis function to use to interpolate curve control points
+ */
+typedef NS_ENUM(NSInteger, MTLCurveBasis) {
+ /**
+ * @brief B-Spline basis. Each curve segment must have 3 or 4 control
+ * points. Curve segments join with C^(N - 2) continuity, where N is
+ * the number of control points. The curve does not necessarily pass
+ * through the control points without additional control points at the
+ * beginning and end of the curve. Each curve segment can overlap
+ * N-1 control points.
+ */
+ MTLCurveBasisBSpline = 0,
+
+ /**
+ * @brief Catmull-Rom basis. Curves represented in this basis can also be
+ * easily converted to and from the Bézier basis. Each curve segment must
+ * have 4 control points. Each index in the control point index buffer
+ * points to the first of 4 consecutive control points in the control point
+ * buffer.
+ *
+ * The tangent at each control point is given by
+ * (P_(i+1) - P_(i-1)) / 2. Therefore, the curve does not pass through the
+ * first and last control point of each connected sequence of curve
+ * segments. Instead, the first and last control point are used to control
+ * the tangent vector at the beginning and end of the curve.
+ *
+ * Curve segments join with C^1 continuity and the
+ * curve passes through the control points. Each curve segment can overlap
+ * 3 control points.
+ */
+ MTLCurveBasisCatmullRom = 1,
+
+ /**
+ * @brief Linear basis. The curve is made of a sequence of connected line
+ * segments each with 2 control points.
+ */
+ MTLCurveBasisLinear = 2,
+
+ /**
+ * @brief Bezier basis
+ */
+ MTLCurveBasisBezier = 3,
+} API_AVAILABLE(macos(14.0), ios(17.0));
+
+/**
+ * @brief Type of end cap to insert at the beginning and end of each connected
+ * sequence of curve segments.
+ */
+typedef NS_ENUM(NSInteger, MTLCurveEndCaps) {
+ /**
+ * @brief No end caps
+ */
+ MTLCurveEndCapsNone = 0,
+
+ /**
+ * @brief Disk end caps
+ */
+ MTLCurveEndCapsDisk = 1,
+
+ /**
+ * @brief Spherical end caps
+ */
+ MTLCurveEndCapsSphere = 2,
+} API_AVAILABLE(macos(14.0), ios(17.0));
+
+/**
+ * @brief Acceleration structure geometry descriptor describing geometry
+ * made of curve primitives
+ */
+MTL_EXPORT API_AVAILABLE(macos(14.0), ios(17.0))
+@interface MTLAccelerationStructureCurveGeometryDescriptor : MTLAccelerationStructureGeometryDescriptor
+
+/**
+ * @brief Buffer containing curve control points. Each control point must
+ * be of the format specified by the control point format. Must not be
+ * nil when the acceleration structure is built.
+ */
+@property (nonatomic, retain, nullable) id <MTLBuffer> controlPointBuffer;
+
+/**
+ * @brief Control point buffer offset. Must be a multiple of the control
+ * point format's element size and must be aligned to the platform's
+ * buffer offset alignment.
+ */
+@property (nonatomic) NSUInteger controlPointBufferOffset;
+
+/**
+ * @brief Number of control points in the control point buffer
+ */
+@property (nonatomic) NSUInteger controlPointCount;
+
+/**
+ * @brief Stride, in bytes, between control points in the control point
+ * buffer. Must be a multiple of the control point format's element size
+ * and must be at least the control point format's size. Defaults to 0
+ * bytes, indicating that the control points are tightly packed.
+ */
+@property (nonatomic) NSUInteger controlPointStride;
+
+/**
+ * @brief Format of the control points in the control point buffer.
+ * Defaults to MTLAttributeFormatFloat3 (packed).
+ */
+@property (nonatomic) MTLAttributeFormat controlPointFormat;
+
+/**
+ * @brief Buffer containing the curve radius for each control point. Each
+ * radius must be of the type specified by the radius format. Each radius
+ * must be at least zero. Must not be nil when the acceleration structure
+ * is built.
+ */
+@property (nonatomic, retain, nullable) id <MTLBuffer> radiusBuffer;
+
+/**
+ * @brief Radius buffer offset. Must be a multiple of the radius format
+ * size and must be aligned to the platform's buffer offset alignment.
+ */
+@property (nonatomic) NSUInteger radiusBufferOffset;
+
+/**
+ * @brief Format of the radii in the radius buffer. Defaults to
+ * MTLAttributeFormatFloat.
+ */
+@property (nonatomic) MTLAttributeFormat radiusFormat;
+
+/**
+ * @brief Stride, in bytes, between radii in the radius buffer. Must be
+ * a multiple of the radius format size. Defaults to 0 bytes, indicating
+ * that the radii are tightly packed.
+ */
+@property (nonatomic) NSUInteger radiusStride;
+
+/**
+ * Index buffer containing references to control points in the control
+ * point buffer. Must not be nil when the acceleration structure is built.
+ */
+@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 curve segments
+ */
+@property (nonatomic) NSUInteger segmentCount;
+
+/**
+ * @brief Number of control points per curve segment. Must be 2, 3, or 4.
+ */
+@property (nonatomic) NSUInteger segmentControlPointCount;
+
+/**
+ * @brief Curve type. Defaults to MTLCurveTypeRound.
+ */
+@property (nonatomic) MTLCurveType curveType;
+
+/**
+ * @brief Curve basis. Defaults to MTLCurveBasisBSpline.
+ */
+@property (nonatomic) MTLCurveBasis curveBasis;
+
+/**
+ * @brief Type of curve end caps. Defaults to MTLCurveEndCapsNone.
+ */
+@property (nonatomic) MTLCurveEndCaps endCaps;
+
++ (instancetype)descriptor;
+
+@end
+
+/**
+ * @brief Acceleration structure motion geometry descriptor describing
+ * geometry made of curve primitives
+ */
+MTL_EXPORT API_AVAILABLE(macos(14.0), ios(17.0))
+@interface MTLAccelerationStructureMotionCurveGeometryDescriptor : MTLAccelerationStructureGeometryDescriptor
+
+/**
+ * @brief Buffers containing curve control points for each keyframe.
+ * Each control point must be of the format specified by the control
+ * point format. Buffer offsets musts be multiples of the control
+ * point format's element size and must be aligned to the platform's
+ * buffer offset alignment. Must not be nil when the acceleration
+ * structure is built.
+ */
+@property (nonatomic, copy) NSArray <MTLMotionKeyframeData *> *controlPointBuffers;
+
+/**
+ * @brief Number of control points in the control point buffers
+ */
+@property (nonatomic) NSUInteger controlPointCount;
+
+/**
+ * @brief Stride, in bytes, between control points in the control point
+ * buffer. Must be a multiple of the control point format's element size
+ * and must be at least the control point format's size. Defaults to 0
+ * bytes, indicating that the control points are tightly packed.
+ */
+@property (nonatomic) NSUInteger controlPointStride;
+
+/**
+ * @brief Format of the control points in the control point buffer.
+ * Defaults to MTLAttributeFormatFloat3 (packed).
+ */
+@property (nonatomic) MTLAttributeFormat controlPointFormat;
+
+/**
+ * @brief Buffers containing the curve radius for each control point for
+ * each keyframe. Each radius must be of the type specified by the radius
+ * format. Buffer offsets must be multiples of the radius format size
+ * and must be aligned to the platform's buffer offset alignment. Each radius
+ * must be at least zero. Must not be nil when the acceleration structure
+ * is built.
+ */
+@property (nonatomic, copy) NSArray <MTLMotionKeyframeData *> *radiusBuffers;
+
+/**
+ * @brief Format of the radii in the radius buffer. Defaults to
+ * MTLAttributeFormatFloat.
+ */
+@property (nonatomic) MTLAttributeFormat radiusFormat;
+
+/**
+ * @brief Stride, in bytes, between radii in the radius buffer. Must be
+ * a multiple of 4 bytes. Defaults to 4 bytes.
+ */
+@property (nonatomic) NSUInteger radiusStride;
+
+/**
+ * Index buffer containing references to control points in the control
+ * point buffer. Must not 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 curve segments
+ */
+@property (nonatomic) NSUInteger segmentCount;
+
+/**
+ * @brief Number of control points per curve segment. Must be 2, 3, or 4.
+ */
+@property (nonatomic) NSUInteger segmentControlPointCount;
+
+/**
+ * @brief Curve type. Defaults to MTLCurveTypeRound.
+ */
+@property (nonatomic) MTLCurveType curveType;
+
+/**
+ * @brief Curve basis. Defaults to MTLCurveBasisBSpline.
+ */
+@property (nonatomic) MTLCurveBasis curveBasis;
+
+/**
+ * @brief Type of curve end caps. Defaults to MTLCurveEndCapsNone.
+ */
+@property (nonatomic) MTLCurveEndCaps endCaps;
+
++ (instancetype)descriptor;
+
+@end
+
typedef struct {
/**
* @brief Transformation matrix describing how to transform the bottom-level acceleration structure.
@@ -472,6 +780,16 @@
* @brief Instance descriptor with support for motion
*/
MTLAccelerationStructureInstanceDescriptorTypeMotion = 2,
+
+ /**
+ * @brief Instance descriptor with a resource handle for the instanced acceleration structure
+ */
+ MTLAccelerationStructureInstanceDescriptorTypeIndirect API_AVAILABLE(macos(14.0), ios(17.0)) = 3,
+
+ /**
+ * @brief Motion instance descriptor with a resource handle for the instanced acceleration structure.
+ */
+ MTLAccelerationStructureInstanceDescriptorTypeIndirectMotion API_AVAILABLE(macos(14.0), ios(17.0)) = 4,
} API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
typedef struct {
@@ -537,6 +855,101 @@
} MTLAccelerationStructureMotionInstanceDescriptor API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.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 User-assigned instance ID to help identify this instance in an
+ * application-defined way
+ */
+ uint32_t userID;
+
+ /**
+ * @brief Acceleration structure resource handle to use for this instance
+ */
+ MTLResourceID accelerationStructureID;
+} MTLIndirectAccelerationStructureInstanceDescriptor API_AVAILABLE(macos(14.0), ios(17.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 User-assigned instance ID to help identify this instance in an
+ * application-defined way
+ */
+ uint32_t userID;
+
+ /**
+ * @brief Acceleration structure resource handle to use for this instance
+ */
+ MTLResourceID accelerationStructureID;
+
+ /**
+ * @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;
+} MTLIndirectAccelerationStructureMotionInstanceDescriptor API_AVAILABLE(macos(14.0), ios(17.0));
+
/**
* @brief Descriptor for an instance acceleration structure
*/
@@ -592,6 +1005,87 @@
* @brief Number of motion transforms
*/
@property (nonatomic) NSUInteger motionTransformCount API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0));
+
++ (instancetype)descriptor;
+
+@end
+
+/**
+ * @brief Descriptor for an instance acceleration structure built with an indirected buffer of instances.
+ */
+MTL_EXPORT API_AVAILABLE(macos(14.0), ios(17.0))
+@interface MTLIndirectInstanceAccelerationStructureDescriptor : 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 Maximum number of instance descriptors
+ */
+@property (nonatomic) NSUInteger maxInstanceCount;
+
+/**
+ * @brief Buffer containing the instance count as a uint32_t value. Value at build time
+ * must be less than or equal to maxInstanceCount.
+ */
+@property (nonatomic, retain, nullable) id <MTLBuffer> instanceCountBuffer;
+
+/**
+ * @brief Offset into the instance count buffer. Must be a multiple of 4 bytes and must be
+ * aligned to the platform's buffer offset alignment.
+ */
+@property (nonatomic) NSUInteger instanceCountBufferOffset;
+
+/**
+ * @brief Type of instance descriptor in the instance descriptor buffer. Defaults to
+ * MTLAccelerationStructureInstanceDescriptorTypeIndirect. Must be
+ * MTLAccelerationStructureInstanceDescriptorTypeIndirect or
+ * MTLAccelerationStructureInstanceDescriptorTypeIndirectMotion.
+ */
+@property (nonatomic) MTLAccelerationStructureInstanceDescriptorType instanceDescriptorType;
+
+/**
+ * @brief Buffer containing transformation information for motion
+ */
+@property (nonatomic, retain, nullable) id <MTLBuffer> motionTransformBuffer;
+
+/**
+ * @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;
+
+/**
+ * @brief Maximum number of motion transforms
+ */
+@property (nonatomic) NSUInteger maxMotionTransformCount;
+
+/**
+ * @brief Buffer containing the motion transform count as a uint32_t value. Value at build time
+ * must be less than or equal to maxMotionTransformCount.
+ */
+@property (nonatomic, retain, nullable) id <MTLBuffer> motionTransformCountBuffer;
+
+/**
+ * @brief Offset into the motion transform count buffer. Must be a multiple of 4 bytes and must be
+ * aligned to the platform's buffer offset alignment.
+ */
+@property (nonatomic) NSUInteger motionTransformCountBufferOffset;
+ (instancetype)descriptor;
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h 2023-03-04 13:36:36
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h 2023-05-31 05:14:34
@@ -118,6 +118,11 @@
max(-INFINITY, -INFINITY, -INFINITY)
{
}
+
+#ifdef __METAL_VERSION__
+ _MTLAxisAlignedBoundingBox() threadgroup = default;
+#endif
+
_MTLAxisAlignedBoundingBox(MTLPackedFloat3 p)
: min(p),
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h 2023-03-09 19:15:13
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h 2023-05-31 05:14:36
@@ -124,6 +124,10 @@
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,
+ MTLDataTypeBFloat API_AVAILABLE(macos(14.0), ios(17.0)) = 121,
+ MTLDataTypeBFloat2 API_AVAILABLE(macos(14.0), ios(17.0)) = 122,
+ MTLDataTypeBFloat3 API_AVAILABLE(macos(14.0), ios(17.0)) = 123,
+ MTLDataTypeBFloat4 API_AVAILABLE(macos(14.0), ios(17.0)) = 124,
} API_AVAILABLE(macos(10.11), ios(8.0));
@class MTLArgument;
@@ -206,16 +210,19 @@
MTLArgumentTypeImageblock API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(11.0), tvos(14.5)) = 17,
} API_DEPRECATED_WITH_REPLACEMENT("MTLBindingType", macos(10.11, 13.0), ios(8.0, 16.0));
-/*!
- @enum MTLArgumentAccess
-*/
-typedef NS_ENUM(NSUInteger, MTLArgumentAccess) {
- MTLArgumentAccessReadOnly = 0,
- MTLArgumentAccessReadWrite = 1,
- MTLArgumentAccessWriteOnly = 2,
-} API_AVAILABLE(macos(10.11), ios(8.0));
+typedef NS_ENUM(NSUInteger, MTLBindingAccess) {
+ MTLBindingAccessReadOnly = 0,
+ MTLBindingAccessReadWrite = 1,
+ MTLBindingAccessWriteOnly = 2,
+ MTLArgumentAccessReadOnly API_DEPRECATED_WITH_REPLACEMENT("MTLBindingAccessReadOnly", macos(10.13, 14.0), ios(8.0, 17.0)) = MTLBindingAccessReadOnly,
+ MTLArgumentAccessReadWrite API_DEPRECATED_WITH_REPLACEMENT("MTLBindingAccessReadWrite", macos(10.13, 14.0), ios(8.0, 17.0)) = MTLBindingAccessReadWrite,
+ MTLArgumentAccessWriteOnly API_DEPRECATED_WITH_REPLACEMENT("MTLBindingAccessWriteOnly", macos(10.13, 14.0), ios(8.0, 17.0)) = MTLBindingAccessWriteOnly,
+};
+typedef MTLBindingAccess MTLArgumentAccess API_DEPRECATED_WITH_REPLACEMENT("MTLBindingAccess", macos(10.11, 14.0), ios(8.0, 17.0));
+
+
@class MTLStructType;
@class MTLArrayType;
@class MTLTextureReferenceType;
@@ -273,7 +280,7 @@
@interface MTLPointerType : MTLType
@property (readonly) MTLDataType elementType; // MTLDataTypeFloat, MTLDataTypeFloat4, MTLDataTypeStruct, ...
-@property (readonly) MTLArgumentAccess access;
+@property (readonly) MTLBindingAccess access;
@property (readonly) NSUInteger alignment; // min alignment for the element data
@property (readonly) NSUInteger dataSize; // sizeof(T) for T *argName
@@ -289,7 +296,7 @@
@property (readonly) MTLDataType textureDataType; // half, float, int, or uint.
@property (readonly) MTLTextureType textureType; // texture1D, texture2D...
-@property (readonly) MTLArgumentAccess access; // read, write, read-write
+@property (readonly) MTLBindingAccess access; // read, write, read-write
@property (readonly) BOOL isDepthTexture; // true for depth textures
@end
@@ -303,7 +310,7 @@
@property (readonly) NSString *name;
@property (readonly) MTLArgumentType type;
-@property (readonly) MTLArgumentAccess access;
+@property (readonly) MTLBindingAccess access;
@property (readonly) NSUInteger index;
@property (readonly, getter=isActive) BOOL active;
@@ -331,7 +338,7 @@
@protocol MTLBinding<NSObject>
@property (readonly) NSString *name;
@property (readonly) MTLBindingType type;
-@property (readonly) MTLArgumentAccess access;
+@property (readonly) MTLBindingAccess access;
@property (readonly) NSUInteger index;
@property (readonly, getter=isUsed) BOOL used;
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h 2023-03-09 19:15:13
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h 2023-05-31 05:14:36
@@ -20,6 +20,17 @@
@protocol MTLAccelerationStructure;
@protocol MTLIntersectionFunctionTable;
+/*
+ @brief
+ When calling functions with an `attributeStrides:` parameter on a render
+ or compute command encoder, this value must be provided for the binding
+ points that are either not part of the set of MTLBufferLayoutDescriptor,
+ or whose stride values in the descriptor is not set to
+ `MTLBufferLayoutStrideDynamic`
+*/
+API_AVAILABLE(macos(14.0), ios(17.0))
+static const NSUInteger MTLAttributeStrideStatic = NSUIntegerMax;
+
/*!
* @protocol MTLArgumentEncoder
* @discussion MTLArgumentEncoder encodes buffer, texture, sampler, and constant data into a buffer.
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h 2023-03-09 19:18:19
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h 2023-05-31 05:14:36
@@ -77,6 +77,47 @@
*/
- (void)setBuffers:(const id <MTLBuffer> __nullable [__nonnull])buffers offsets:(const NSUInteger [__nonnull])offsets withRange:(NSRange)range;
+/*!
+ @brief
+ sets kernel buffer at specified index with provided offset and stride.
+ only call this when the kernel-buffer is part of the stageInputDescriptor
+ and has set its stride to `MTLBufferLayoutStrideDynamic`
+*/
+- (void) setBuffer:(id<MTLBuffer>)buffer
+ offset:(NSUInteger)offset
+ attributeStride:(NSUInteger)stride
+ atIndex:(NSUInteger)index
+API_AVAILABLE(macos(14.0), ios(17.0));
+/*!
+ @brief
+ sets an array of kernel buffers with provided offsets and strides with the
+ given bind point range. Only call this when at least one buffer is part of
+ the vertexDescriptor, other buffers must set `MTLAttributeStrideStatic`
+*/
+- (void) setBuffers:(const id<MTLBuffer> __nullable [__nonnull])buffers
+ offsets:(const NSUInteger [__nonnull])offsets
+ attributeStrides:(const NSUInteger [__nonnull])strides
+ withRange:(NSRange)range
+API_AVAILABLE(macos(14.0), ios(17.0));
+/*!
+ @brief
+ only call this when the buffer-index is part of the stageInputDescriptor
+ and has set its stride to `MTLBufferLayoutStrideDynamic`
+*/
+- (void) setBufferOffset:(NSUInteger)offset
+ attributeStride:(NSUInteger)stride
+ atIndex:(NSUInteger)index
+API_AVAILABLE(macos(14.0), ios(17.0));
+/*!
+ @brief
+ only call this when the buffer-index is part of the stageInputDescriptor
+ and has set its stride to `MTLBufferLayoutStrideDynamic`
+*/
+- (void)setBytes:(void const *)bytes
+ length:(NSUInteger)length
+ attributeStride:(NSUInteger)stride
+ atIndex:(NSUInteger)index
+API_AVAILABLE(macos(14.0), ios(17.0));
/*!
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h 2023-03-09 19:15:11
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h 2023-05-31 05:14:35
@@ -337,7 +337,7 @@
* @property access
* @abstract Access flags for the argument
*/
-@property (nonatomic) MTLArgumentAccess access;
+@property (nonatomic) MTLBindingAccess access;
/*!
* @property textureType
@@ -357,6 +357,19 @@
/*!
+ @class MTLArchitecture
+ @abstract Contains information about the device's architecture
+ */
+MTL_EXPORT API_AVAILABLE(macos(14.0), ios(17.0))
+@interface MTLArchitecture : NSObject <NSCopying>
+/*!
+ @property name
+ @abstract The device's architecture name.
+ */
+@property (readonly, nonnull) NSString *name;
+@end
+
+/*!
@protocol MTLDevice
@abstract MTLDevice represents a processor capable of data parallel computations
*/
@@ -377,6 +390,11 @@
*/
@property (readonly) uint64_t registryID API_AVAILABLE(macos(10.13), ios(11.0)) ;
+/*!
+ @property architecture
+ @abstract Returns the device's architecture information.
+ */
+@property (nonnull, readonly) MTLArchitecture *architecture API_AVAILABLE(macos(14.0), ios(17.0));
/*!
@property maxThreadsPerThreadgroup
@@ -888,8 +906,8 @@
* of the handle fails the return value will be nil and the optional error if passed in will be non-nil
* with details of the error.
*/
--(nullable id<MTLIOFileHandle>) newIOHandleWithURL:(NSURL *)url
- error:(NSError **)error API_AVAILABLE(macos(13.0), ios(16.0));
+-(nullable id<MTLIOFileHandle>)newIOHandleWithURL:(NSURL *)url
+ error:(NSError **)error API_DEPRECATED_WITH_REPLACEMENT("Use newIOFileHandleWithURL:error: instead", macos(13.0, 14.0), ios(16.0, 17.0));
/*!
@@ -898,8 +916,8 @@
* of the queue fails the return value will be nil and the optional error if passed in will be non-nil
* with details of the error.
*/
--(nullable id<MTLIOCommandQueue>) newIOCommandQueueWithDescriptor:(MTLIOCommandQueueDescriptor*)descriptor
- error:(NSError **)error API_AVAILABLE(macos(13.0), ios(16.0));
+-(nullable id<MTLIOCommandQueue>)newIOCommandQueueWithDescriptor:(MTLIOCommandQueueDescriptor*)descriptor
+ error:(NSError **)error API_AVAILABLE(macos(13.0), ios(16.0));
/*!
@@ -910,9 +928,31 @@
* of the handle fails the return value will be nil and the optional error if passed in will be non-nil
* with details of the error.
*/
--(nullable id<MTLIOFileHandle>) newIOHandleWithURL:(NSURL *)url
- compressionMethod:(MTLIOCompressionMethod)compressionMethod
- error:(NSError **)error API_AVAILABLE(macos(13.0), ios(16.0));
+-(nullable id<MTLIOFileHandle>)newIOHandleWithURL:(NSURL *)url
+ compressionMethod:(MTLIOCompressionMethod)compressionMethod
+ error:(NSError **)error API_DEPRECATED_WITH_REPLACEMENT("Use newIOFileHandleWithURL:compressionMethod:error: instead", macos(13.0, 14.0), ios(16.0, 17.0));
+
+/*!
+ * @method newIOFileHandleWithURL:error:
+ * @abstract Create and return a handle that points to a raw file on disk. This object can be used by
+ * MTLIOCommandBuffer load commands to source data for MTLResources. If the creation
+ * of the handle fails the return value will be nil and the optional error if passed in will be non-nil
+ * with details of the error.
+ */
+-(nullable id<MTLIOFileHandle>)newIOFileHandleWithURL:(NSURL *)url
+ error:(NSError **)error API_AVAILABLE(macos(14.0), ios(17.0));
+
+/*!
+ * @method newIOFileHandleWithURL:compressionMethod:error:
+ * @abstract Create and return a handle that points to a compressed file on disk (a file that was
+ * created with MTLIOCompressionContext). This object can be used by
+ * MTLIOCommandBuffer load commands to source data for MTLResources. If the creation
+ * of the handle fails the return value will be nil and the optional error if passed in will be non-nil
+ * with details of the error.
+ */
+-(nullable id<MTLIOFileHandle>)newIOFileHandleWithURL:(NSURL *)url
+ compressionMethod:(MTLIOCompressionMethod)compressionMethod
+ error:(NSError **)error API_AVAILABLE(macos(14.0), ios(17.0));
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h 2023-03-09 19:15:12
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h 2023-05-31 05:14:36
@@ -24,6 +24,12 @@
* Only supported for `visible` functions.
*/
MTLFunctionOptionCompileToBinary API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0)) = 1 << 0,
+ /**
+ * @brief stores and tracks this function in a MetalScript
+ * This flag is optional and only supported in the context of binary archives.
+ * @discussion This flag is required for inspecting and consuming binary archives with specialized MTLFunctions via the metal-source tool. It is not required for recompilation, nor for storing functions in binary archives. Set this flag only if you intend to use metal-source on a serialized binary archive.
+ */
+ MTLFunctionOptionStoreFunctionInMetalScript API_AVAILABLE(macos(14.0), ios(17.0)) = 1 << 1,
} API_AVAILABLE(macos(11.0), ios(14.0));
MTL_EXPORT API_AVAILABLE(macos(11.0), ios(14.0))
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h 2023-03-09 19:15:13
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h 2023-05-31 05:14:36
@@ -192,7 +192,7 @@
@discussion The requested storage and CPU cache modes must match the storage and CPU cache modes of the heap, with the exception that the requested storage mode can be MTLStorageModeMemoryless.
@return The texture or nil if heap is full.
*/
-- (nullable id <MTLTexture>)newTextureWithDescriptor:(MTLTextureDescriptor *)desc;
+- (nullable id <MTLTexture>)newTextureWithDescriptor:(MTLTextureDescriptor *)descriptor;
/*!
@method setPurgeabilityState:
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h 2023-03-09 19:15:14
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h 2023-05-31 07:32:50
@@ -88,12 +88,30 @@
*/
@property (readwrite, nonatomic) NSUInteger maxKernelBufferBindCount API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0));
+/*!
+ @abstract
+ The maximum bind index of kernel (or tile) threadgroup memory that can be set per command.
+ The default value is 31.
+ */
+@property (readwrite, nonatomic) NSUInteger maxKernelThreadgroupMemoryBindCount API_AVAILABLE(macos(14.0), ios(17.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));
+
+/*!
+ @brief
+ allows binding pipelines that have at least one MTLBufferLayout with a
+ stride of `MTLBufferLayoutStrideDynamic`
+
+ will allow setting attributeStride in `setVertexBuffer` / `setKernelBuffer`
+ calls
+*/
+@property (readwrite, nonatomic) BOOL supportDynamicAttributeStride API_AVAILABLE(macos(14.0), ios(17.0));
+
@end
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h 2023-03-09 19:15:13
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h 2023-06-01 02:01:19
@@ -22,7 +22,19 @@
- (void)setVertexBuffer:(id <MTLBuffer>)buffer offset:(NSUInteger)offset atIndex:(NSUInteger)index;
- (void)setFragmentBuffer:(id <MTLBuffer>)buffer offset:(NSUInteger)offset atIndex:(NSUInteger)index;
+/*!
+ @brief
+ sets vertex buffer at specified index with provided offset and stride.
+ only call this when the buffer-index is part of the vertexDescriptor and
+ has set its stride to `MTLBufferLayoutStrideDynamic`
+*/
+- (void) setVertexBuffer:(nonnull id<MTLBuffer>)buffer
+ offset:(NSUInteger)offset
+ attributeStride:(NSUInteger)stride
+ atIndex:(NSUInteger)index
+API_AVAILABLE(macos(14.0), ios(17.0));
+
- (void) drawPatches:(NSUInteger)numberOfPatchControlPoints patchStart:(NSUInteger)patchStart patchCount:(NSUInteger)patchCount patchIndexBuffer:(nullable id <MTLBuffer>)patchIndexBuffer
patchIndexBufferOffset:(NSUInteger)patchIndexBufferOffset instanceCount:(NSUInteger)instanceCount baseInstance:(NSUInteger)baseInstance
tessellationFactorBuffer:(id <MTLBuffer>)buffer tessellationFactorBufferOffset:(NSUInteger)offset tessellationFactorBufferInstanceStride:(NSUInteger)instanceStride API_AVAILABLE(tvos(14.5));
@@ -49,6 +61,18 @@
- (void)setComputePipelineState:(id <MTLComputePipelineState>)pipelineState API_AVAILABLE(ios(13.0), macos(11.0));
- (void)setKernelBuffer:(id <MTLBuffer>)buffer offset:(NSUInteger)offset atIndex:(NSUInteger)index;
+
+/*!
+ @brief
+ sets kernel buffer at specified index with provided offset and stride.
+ only call this when the buffer-index is part of the stageInputDescriptor
+ and has set its stride to `MTLBufferLayoutStrideDynamic`
+*/
+- (void)setKernelBuffer:(nonnull id<MTLBuffer>)buffer
+ offset:(NSUInteger)offset
+ attributeStride:(NSUInteger)stride
+ atIndex:(NSUInteger)index
+API_AVAILABLE(macos(14.0), ios(17.0));
- (void)concurrentDispatchThreadgroups:(MTLSize)threadgroupsPerGrid
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h 2023-03-09 19:15:12
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h 2023-05-31 05:14:36
@@ -40,7 +40,6 @@
*/
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.
@@ -59,7 +58,11 @@
*/
MTLIntersectionFunctionSignatureExtendedLimits API_AVAILABLE(macos(12.0), ios(15.0), tvos(16.0)) = (1 << 5),
-
+ /**
+ * @brief The intersection functions may be called from intersectors using the
+ * max_levels intersection tag as described in the Metal Shading Language Guide.
+ */
+ MTLIntersectionFunctionSignatureMaxLevels API_AVAILABLE(macos(14.0), ios(17.0)) = (1 << 6),
} 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))
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h 2023-03-09 19:15:14
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h 2023-05-31 05:14:37
@@ -191,6 +191,8 @@
MTLLanguageVersion2_4 API_AVAILABLE(macos(12.0), ios(15.0)) = (2 << 16) + 4,
MTLLanguageVersion3_0 API_AVAILABLE(macos(13.0), ios(16.0)) =
(3 << 16) + 0,
+ MTLLanguageVersion3_1 API_AVAILABLE(macos(14.0), ios(17.0)) =
+ (3 << 16) + 1,
} API_AVAILABLE(macos(10.11), ios(9.0));
typedef NS_ENUM(NSInteger, MTLLibraryType) {
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h 2023-03-09 19:18:20
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h 2023-05-31 05:14:36
@@ -163,6 +163,50 @@
- (void)setVertexBuffers:(const id <MTLBuffer> __nullable [__nonnull])buffers offsets:(const NSUInteger [__nonnull])offsets withRange:(NSRange)range;
/*!
+ @brief
+ sets vertex buffer at specified index with provided offset and stride. Only
+ call this when the buffer-index is part of the vertexDescriptor and has set
+ its stride to `MTLBufferLayoutStrideDynamic`
+*/
+- (void) setVertexBuffer:(nullable id<MTLBuffer>)buffer
+ offset:(NSUInteger)offset
+ attributeStride:(NSUInteger)stride
+ atIndex:(NSUInteger)index
+API_AVAILABLE(macos(14.0), ios(17.0));
+/*!
+ @brief
+ sets an array of vertex buffers with provided offsets and strides with the
+ given bind point range.
+ only call this when at least one buffer is part of the
+ vertexDescriptor, other buffers must set their value relative to the
+ `attributeStrides` array to `MTLAttributeStrideStatic`
+*/
+- (void) setVertexBuffers:(id<MTLBuffer> const __nullable [__nonnull])buffers
+ offsets:(NSUInteger const [__nonnull])offsets
+ attributeStrides:(NSUInteger const [__nonnull])strides
+ withRange:(NSRange)range
+API_AVAILABLE(macos(14.0), ios(17.0));
+/*!
+ @brief
+ only call this when the buffer-index is part of the vertexDescriptor and
+ has set its stride to `MTLBufferLayoutStrideDynamic`
+*/
+- (void) setVertexBufferOffset:(NSUInteger)offset
+ attributeStride:(NSUInteger)stride
+ atIndex:(NSUInteger)index
+API_AVAILABLE(macos(14.0), ios(17.0));
+/*!
+ @brief
+ only call this when the buffer-index is part of the vertexDescriptor and
+ has set its stride to `MTLBufferLayoutStrideDynamic`
+*/
+- (void) setVertexBytes:(void const *)bytes
+ length:(NSUInteger)length
+ attributeStride:(NSUInteger)stride
+ atIndex:(NSUInteger)index
+API_AVAILABLE(macos(14.0), ios(17.0));
+
+/*!
@method setVertexTexture:atIndex:
@brief Set a global texture for all vertex shaders at the given bind point index.
*/
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h 2023-03-09 19:18:20
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h 2023-05-31 05:14:36
@@ -677,6 +677,27 @@
/*!
+ @property objectLinkedFunctions
+ @abstract The set of functions to be linked with the pipeline state and accessed from the object function.
+ @see MTLLinkedFunctions
+ */
+@property (null_resettable, copy, nonatomic) MTLLinkedFunctions *objectLinkedFunctions API_AVAILABLE(macos(14.0), ios(17.0));
+
+/*!
+ @property meshLinkedFunctions
+ @abstract The set of functions to be linked with the pipeline state and accessed from the mesh function.
+ @see MTLLinkedFunctions
+ */
+@property (null_resettable, copy, nonatomic) MTLLinkedFunctions *meshLinkedFunctions API_AVAILABLE(macos(14.0), ios(17.0));
+
+/*!
+ @property fragmentLinkedFunctions
+ @abstract The set of functions to be linked with the pipeline state and accessed from the fragment function.
+ @see MTLLinkedFunctions
+ */
+@property (null_resettable, copy, nonatomic) MTLLinkedFunctions *fragmentLinkedFunctions API_AVAILABLE(macos(14.0), ios(17.0));
+
+/*!
@method reset
@abstract Restore all mesh pipeline descriptor properties to their default values.
*/
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h 2023-03-09 23:54:41
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h 2023-05-31 06:02:41
@@ -7,6 +7,7 @@
#import <Metal/MTLDefines.h>
#import <Metal/MTLDevice.h>
+#import <Metal/MTLVertexDescriptor.h>
@@ -86,6 +87,9 @@
MTLAttributeFormatShortNormalized API_AVAILABLE(macos(10.13), ios(11.0)) = 52,
MTLAttributeFormatHalf API_AVAILABLE(macos(10.13), ios(11.0)) = 53,
+
+ MTLAttributeFormatFloatRG11B10 API_AVAILABLE(macos(14.0), ios(17.0)) = 54,
+ MTLAttributeFormatFloatRGB9E5 API_AVAILABLE(macos(14.0), ios(17.0)) = 55,
} API_AVAILABLE(macos(10.12), ios(10.0));
@@ -112,7 +116,6 @@
MTLStepFunctionThreadPositionInGridXIndexed = 7,
MTLStepFunctionThreadPositionInGridYIndexed = 8,
} API_AVAILABLE(macos(10.12), ios(10.0));
-
MTL_EXPORT API_AVAILABLE(macos(10.12), ios(10.0))
@interface MTLBufferLayoutDescriptor : NSObject <NSCopying>
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h 2023-03-09 19:15:12
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h 2023-05-31 05:14:36
@@ -101,6 +101,7 @@
MTLTextureUsageShaderWrite = 0x0002,
MTLTextureUsageRenderTarget = 0x0004,
MTLTextureUsagePixelFormatView = 0x0010,
+ MTLTextureUsageShaderAtomic API_AVAILABLE(macos(14.0), ios(17.0)) = 0x0020,
} API_AVAILABLE(macos(10.11), ios(9.0));
typedef NS_ENUM(NSInteger, MTLTextureCompressionType)
@@ -238,7 +239,7 @@
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.
+ Enabling lossy compression requires both storageMode == MTLStorageModePrivate, allowGPUOptimizedContents == YES, and cannot be combined with either MTLTextureUsagePixelFormatView, MTLTextureUsageShaderWrite, MTLTextureUsageShaderAtomic, 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.
*/
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h 2023-03-09 19:18:20
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h 2023-05-31 05:14:36
@@ -86,6 +86,9 @@
MTLVertexFormatShortNormalized API_AVAILABLE(macos(10.13), ios(11.0)) = 52,
MTLVertexFormatHalf API_AVAILABLE(macos(10.13), ios(11.0)) = 53,
+
+ MTLVertexFormatFloatRG11B10 API_AVAILABLE(macos(14.0), ios(17.0)) = 54,
+ MTLVertexFormatFloatRGB9E5 API_AVAILABLE(macos(14.0), ios(17.0)) = 55,
} API_AVAILABLE(macos(10.11), ios(8.0));
@@ -97,6 +100,15 @@
MTLVertexStepFunctionPerPatch API_AVAILABLE(macos(10.12), ios(10.0)) = 3,
MTLVertexStepFunctionPerPatchControlPoint API_AVAILABLE(macos(10.12), ios(10.0)) = 4,
} API_AVAILABLE(macos(10.11), ios(8.0));
+
+/*!
+ @brief
+ when a MTLVertexBufferLayoutDescriptor has its stride set to this value,
+ the stride will be dynamic and must be set explicitly when binding a buffer
+ to a render command encoder.
+*/
+API_AVAILABLE(macos(14.0), ios(17.0))
+static const NSUInteger MTLBufferLayoutStrideDynamic = NSUIntegerMax;
MTL_EXPORT API_AVAILABLE(macos(10.11), ios(8.0))
@interface MTLVertexBufferLayoutDescriptor : NSObject <NSCopying>
diff -ruN /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes
--- /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes 2023-02-19 17:11:02
+++ /Applications/Xcode_15.0.0-beta.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes 2023-05-11 18:47:39
@@ -24,12 +24,35 @@
- Name: MTLIOCreateCompressionContext
SwiftPrivate: true
Enumerators:
+- Name: MTLArgumentAccessReadOnly
+ SwiftPrivate: true
+# SwiftName: readOnly
+- Name: MTLArgumentAccessReadWrite
+ SwiftPrivate: true
+# SwiftName: readWrite
+- Name: MTLArgumentAccessWriteOnly
+ SwiftPrivate: true
+# SwiftName: writeOnly
+- Name: MTLBindingAccessReadOnly
+ SwiftName: readOnly
+- Name: MTLBindingAccessReadWrite
+ SwiftName: readWrite
+- Name: MTLBindingAccessWriteOnly
+ SwiftName: writeOnly
- Name: MTLResourceStorageModeShared
SwiftName: storageModeShared
- Name: MTLStorageModeShared
SwiftName: shared
- Name: MTLTextureUsageUnknown
SwiftName: unknown
+- Name: MTLDataTypeBFloat
+ SwiftName: bfloat
+- Name: MTLDataTypeBFloat2
+ SwiftName: bfloat2
+- Name: MTLDataTypeBFloat3
+ SwiftName: bfloat3
+- Name: MTLDataTypeBFloat4
+ SwiftName: bfloat4
- Name: MTLDataTypeUInt
SwiftName: uint
- Name: MTLDataTypeUInt2
@@ -607,6 +630,18 @@
- Selector: 'setBufferOffset:atIndex:'
SwiftName: setBufferOffset(_:index:)
MethodKind: Instance
+ - Selector: 'setBuffer:offset:attributeStride:atIndex:'
+ SwiftName: setBuffer(_:offset:attributeStride:index:)
+ MethodKind: Instance
+ - Selector: 'setBuffers:offsets:attributeStrides:withRange:'
+ MethodKind: Instance
+ SwiftPrivate: true
+ - Selector: 'setBufferOffset:attributeStride:atIndex:'
+ SwiftName: setBufferOffset(offset:attributeStride:index:)
+ MethodKind: Instance
+ - Selector: 'setBytes:length:attributeStride:atIndex:'
+ SwiftName: setBytes(_:length:attributeStride:index:)
+ MethodKind: Instance
- Selector: 'setTexture:atIndex:'
SwiftName: setTexture(_:index:)
MethodKind: Instance
@@ -887,6 +922,12 @@
- Selector: 'heapAccelerationStructureSizeAndAlignWithDescriptor:'
SwiftName: heapAccelerationStructureSizeAndAlign(descriptor:)
MethodKind: Instance
+ - Selector: 'newIOFileHandleWithURL:error:'
+ SwiftName: makeIOFileHandle(url:)
+ MethodKind: Instance
+ - Selector: 'newIOFileHandleWithURL:compressionMethod:error:'
+ SwiftName: makeIOFileHandle(url:compressionMethod:)
+ MethodKind: Instance
- Selector: 'newIOHandleWithURL:error:'
SwiftName: makeIOHandle(url:)
MethodKind: Instance
@@ -1089,6 +1130,18 @@
- Selector: 'setVertexBufferOffset:atIndex:'
SwiftName: setVertexBufferOffset(_:index:)
MethodKind: Instance
+ - Selector: 'setVertexBuffer:offset:attributeStride:atIndex:'
+ SwiftName: setVertexBuffer(_:offset:attributeStride:index:)
+ MethodKind: Instance
+ - Selector: 'setVertexBuffers:offsets:attributeStrides:withRange:'
+ MethodKind: Instance
+ SwiftPrivate: true
+ - Selector: 'setVertexBufferOffset:attributeStride:atIndex:'
+ SwiftName: setVertexBufferOffset(offset:attributeStride:index:)
+ MethodKind: Instance
+ - Selector: 'setVertexBytes:length:attributeStride:atIndex:'
+ SwiftName: setVertexBytes(_:length:attributeStride:index:)
+ MethodKind: Instance
- Selector: 'setVertexTexture:atIndex:'
SwiftName: setVertexTexture(_:index:)
MethodKind: Instance
@@ -1417,6 +1470,9 @@
- Selector: 'setVertexBuffer:offset:atIndex:'
SwiftName: setVertexBuffer(_:offset:at:)
MethodKind: Instance
+ - Selector: 'setVertexBuffer:offset:attributeStride:atIndex:'
+ SwiftName: setVertexBuffer(_:offset:attributeStride:at:)
+ MethodKind: Instance
- Selector: 'setFragmentBuffer:offset:atIndex:'
SwiftName: setFragmentBuffer(_:offset:at:)
MethodKind: Instance
@@ -1427,6 +1483,9 @@
Methods:
- Selector: 'setKernelBuffer:offset:atIndex:'
SwiftName: setKernelBuffer(_:offset:at:)
+ MethodKind: Instance
+ - Selector: 'setKernelBuffer:offset:attributeStride:atIndex:'
+ SwiftName: setKernelBuffer(_:offset:attributeStride:at:)
MethodKind: Instance
- Selector: 'setThreadgroupMemoryLength:atIndex:'
SwiftName: setThreadgroupMemoryLength(_:index:)
- README
- xcode13.0 Binding Status
- xcode13.1 Binding Status
- xcode13.2 Binding Status
- xcode13.3 Binding Status
- xcode13.4 Binding Status
- xcode14.0 Binding Status
- xcode14.1 Binding Status
- xcode14.2 Binding Status
- xcode14.3 Binding Status
- xcode15.0 Binding Status
- xcode15.1 Binding Status
- xcode15.3 Binding Status
- xcode15.4 Binding Status
- xcode16.0 Binding Status