forked from xamarin/xamarin-macios
-
Notifications
You must be signed in to change notification settings - Fork 1
Metal macOS xcode9 beta2
Vincent Dondain edited this page Jun 21, 2017
·
1 revision
#Metal.framework
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h 2017-05-23 18:40:04.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h 2017-06-10 19:41:50.000000000 -0400
@@ -87,7 +87,6 @@
MTLDataTypeBool3 = 55,
MTLDataTypeBool4 = 56,
- MTLDataTypeIndirectArgument = 57, // Deprecated
MTLDataTypeTexture NS_ENUM_AVAILABLE(10_13, 11_0) = 58,
MTLDataTypeSampler NS_ENUM_AVAILABLE(10_13, 11_0) = 59,
@@ -119,7 +118,6 @@
MTLArgumentTypeThreadgroupMemory= 1,
MTLArgumentTypeTexture = 2,
MTLArgumentTypeSampler = 3,
- MTLArgumentTypeIndirectConstant = 4, // Deprecated
} NS_ENUM_AVAILABLE(10_11, 8_0);
@@ -136,6 +134,8 @@
@class MTLStructType;
@class MTLArrayType;
+@class MTLTextureReferenceType;
+@class MTLPointerType;
NS_CLASS_AVAILABLE(10_13, 11_0)
@interface MTLType : NSObject
@@ -148,12 +148,14 @@
@property (readonly) NSString *name;
@property (readonly) NSUInteger offset;
@property (readonly) MTLDataType dataType;
-@property (readonly) MTLType *dataTypeDescription NS_AVAILABLE(10_13, 11_0);
- (nullable MTLStructType *)structType;
- (nullable MTLArrayType *)arrayType;
-@property (readonly) NSUInteger indirectArgumentIndex NS_AVAILABLE(10_13, 11_0);
+- (nullable MTLTextureReferenceType *)textureReferenceType NS_AVAILABLE(10_13, 11_0);
+- (nullable MTLPointerType *)pointerType NS_AVAILABLE(10_13, 11_0);
+
+@property (readonly) NSUInteger argumentIndex NS_AVAILABLE(10_13, 11_0);
@end
@@ -171,12 +173,14 @@
@interface MTLArrayType : MTLType
@property (readonly) MTLDataType elementType;
-@property (readonly) MTLType *elementTypeDescription NS_AVAILABLE(10_13, 11_0);
+
@property (readonly) NSUInteger arrayLength;
@property (readonly) NSUInteger stride;
-
+@property (readonly) NSUInteger argumentIndexStride NS_AVAILABLE(10_13, 11_0);
- (nullable MTLStructType *)elementStructType;
- (nullable MTLArrayType *)elementArrayType;
+- (nullable MTLTextureReferenceType *)elementTextureReferenceType NS_AVAILABLE(10_13, 11_0);
+- (nullable MTLPointerType *)elementPointerType NS_AVAILABLE(10_13, 11_0);
@end
@@ -185,12 +189,14 @@
@interface MTLPointerType : MTLType
@property (readonly) MTLDataType elementType; // MTLDataTypeFloat, MTLDataTypeFloat4, MTLDataTypeStruct, ...
-@property (readonly) MTLType *elementTypeDescription;
@property (readonly) MTLArgumentAccess access;
@property (readonly) NSUInteger alignment; // min alignment for the element data
@property (readonly) NSUInteger dataSize; // sizeof(T) for T *argName
-@property (readonly) BOOL elementIsIndirectArgumentBuffer NS_AVAILABLE(10_13, 11_0);
+@property (readonly) BOOL elementIsArgumentBuffer NS_AVAILABLE(10_13, 11_0);
+
+- (nullable MTLStructType *)elementStructType NS_AVAILABLE(10_13, 11_0);
+- (nullable MTLArrayType *)elementArrayType NS_AVAILABLE(10_13, 11_0);
@end
@@ -216,7 +222,6 @@
@property (readonly) MTLArgumentAccess access;
@property (readonly) NSUInteger index;
-@property (readonly) MTLType *dataTypeDescription NS_AVAILABLE(10_13, 11_0);
@property (readonly, getter=isActive) BOOL active;
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h 2017-06-10 19:41:50.000000000 -0400
@@ -0,0 +1,118 @@
+//
+// MTLArgumentEncoder.h
+// Metal
+//
+// Copyright (c) 2016 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <Metal/MTLDefines.h>
+
+NS_ASSUME_NONNULL_BEGIN
+@protocol MTLDevice;
+@protocol MTLBuffer;
+@protocol MTLTexture;
+@protocol MTLSamplerState;
+@protocol MTLRenderPipelineState;
+
+/*!
+ * @protocol MTLArgumentEncoder
+ * @discussion MTLArgumentEncoder encodes buffer, texture, sampler, and constant data into a buffer.
+ */
+NS_AVAILABLE(10_13, 11_0)
+@protocol MTLArgumentEncoder <NSObject>
+
+/*!
+ @property device
+ @abstract The device this argument encoder was created against.
+ */
+@property (readonly) id <MTLDevice> device;
+
+/*!
+ @property label
+ @abstract A string to help identify this object.
+ */
+@property (nullable, copy, atomic) NSString *label;
+
+/*!
+ * @property encodedLength
+ * @abstract The number of bytes required to store the encoded resource bindings.
+ */
+@property (readonly) NSUInteger encodedLength;
+
+/*!
+ * @property alignment
+ * @abstract The alignment in bytes required to store the encoded resource bindings.
+ */
+@optional
+@property (readonly) NSUInteger alignment;
+@required
+
+/*!
+ * @method setArgumentBuffer:offset:
+ * @brief Sets the destination buffer and offset at which the arguments will be encoded.
+ */
+- (void)setArgumentBuffer:(id <MTLBuffer>)iargumentBuffer offset:(NSUInteger)offset;
+
+/*!
+ * @method setArgumentBuffer:offset:arrayElement:
+ * @brief Sets the destination buffer, starting offset and specific array element arguments will be encoded into. arrayElement represents
+ the desired element of IAB array targetted by encoding
+ */
+- (void)setArgumentBuffer:(nullable id <MTLBuffer>)argumentBuffer startOffset:(NSUInteger)startOffset arrayElement:(NSUInteger)arrayElement;
+
+/*!
+ * @method setBuffer:offset:atIndex:
+ * @brief Set a buffer at the given bind point index.
+ */
+- (void)setBuffer:(nullable id <MTLBuffer>)buffer offset:(NSUInteger)offset atIndex:(NSUInteger)index;
+
+/*!
+ * @method setBuffers:offsets:withRange:
+ * @brief Set an array of buffers at the given bind point index range.
+ */
+- (void)setBuffers:(const id <MTLBuffer> __nullable [__nonnull])buffers offsets:(const NSUInteger [__nonnull])offsets withRange:(NSRange)range;
+
+/*!
+ * @method setTexture:atIndex:
+ * @brief Set a texture at the given bind point index.
+ */
+- (void)setTexture:(nullable id <MTLTexture>)texture atIndex:(NSUInteger)index;
+
+/*!
+ * @method setTextures:withRange:
+ * @brief Set an array of textures at the given bind point index range.
+ */
+- (void)setTextures:(const id <MTLTexture> __nullable [__nonnull])textures withRange:(NSRange)range;
+
+/*!
+ * @method setSamplerState:atIndex:
+ * @brief Set a sampler at the given bind point index.
+ */
+- (void)setSamplerState:(nullable id <MTLSamplerState>)sampler atIndex:(NSUInteger)index;
+
+/*!
+ * @method setSamplerStates:withRange:
+ * @brief Set an array of samplers at the given bind point index range.
+ */
+- (void)setSamplerStates:(const id <MTLSamplerState> __nullable [__nonnull])samplers withRange:(NSRange)range;
+
+/*!
+ * @method constantDataAtIndex:
+ * @brief Returns a pointer to the constant data at the given bind point index.
+ */
+- (void*)constantDataAtIndex:(NSUInteger)index;
+
+
+/*!
+ * @method newArgumentEncoderForBufferAtIndex:
+ * @brief Returns a pointer to a new MTLArgumentEncoder that can be used to encode the an argument buffer
+ * in the buffer associated with a given index.
+ * Returns nil if the resource at the given index is not an argument buffer.
+ */
+- (nullable id<MTLArgumentEncoder>)newArgumentEncoderForBufferAtIndex:(NSUInteger)index NS_AVAILABLE_MAC(10_13);
+
+@end
+
+NS_ASSUME_NONNULL_END
+
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h 2017-05-23 18:40:04.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h 2017-06-10 19:41:50.000000000 -0400
@@ -65,7 +65,7 @@
@method newTextureWithDescriptor:offset:bytesPerRow:
@abstract Create a 2D texture that shares storage with this buffer.
*/
-- (id <MTLTexture>)newTextureWithDescriptor:(MTLTextureDescriptor*)descriptor offset:(NSUInteger)offset bytesPerRow:(NSUInteger)bytesPerRow NS_AVAILABLE(10_13, 8_0);
+- (nullable id <MTLTexture>)newTextureWithDescriptor:(MTLTextureDescriptor*)descriptor offset:(NSUInteger)offset bytesPerRow:(NSUInteger)bytesPerRow NS_AVAILABLE(10_13, 8_0);
/*!
@method addDebugMarker:range:
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h 2017-05-23 18:40:04.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h 2017-06-10 19:41:50.000000000 -0400
@@ -63,15 +63,33 @@
/*!
@enum MTLCommandBufferError
@abstract Error codes that can be found in MTLCommandBuffer.error
- @constant MTLCommandBufferErrorInternal An internal error that doesn't fit into the other categories. The actual low level error code is encoded in the local description.
- @constant MTLCommandBufferErrorTimeout Execution of this command buffer took too long, execution of this command was interrupted and aborted.
- @constant MTLCommandBufferErrorPageFault Execution of this command buffer generated an unserviceable GPU page fault. This can caused by buffer read write attribute mismatch or out of boundary access.
- @constant MTLCommandBufferErrorBlacklisted Access to this device has been revoked because this client has been responsible for too many timeouts or hangs.
- @constant MTLCommandBufferErrorNotPermitted This process does not have access to use this device.
- @constant MTLCommandBufferErrorOutOfMemory Insufficient memory was available to execute this command buffer.
- @constant MTLCommandBufferErrorInvalidResource The command buffer referenced an invalid resource. This is most commonly caused when the caller deletes a resource before executing a command buffer that refers to it.
- @constant MTLCommandBufferErrorMemoryless One or more internal resources limits reached that prevent using memoryless render pass attachments. See error string for more detail.
- @constant MTLCommandBufferErrorDeviceRemoved The device was physically removed before the command could finish execution
+
+ @constant MTLCommandBufferErrorInternal
+ An internal error that doesn't fit into the other categories. The actual low level error code is encoded in the local description.
+
+ @constant MTLCommandBufferErrorTimeout
+ Execution of this command buffer took too long, execution of this command was interrupted and aborted.
+
+ @constant MTLCommandBufferErrorPageFault
+ Execution of this command buffer generated an unserviceable GPU page fault. This can caused by buffer read write attribute mismatch or out of boundary access.
+
+ @constant MTLCommandBufferErrorBlacklisted
+ Access to this device has been revoked because this client has been responsible for too many timeouts or hangs.
+
+ @constant MTLCommandBufferErrorNotPermitted
+ This process does not have access to use this device.
+
+ @constant MTLCommandBufferErrorOutOfMemory
+ Insufficient memory was available to execute this command buffer.
+
+ @constant MTLCommandBufferErrorInvalidResource
+ The command buffer referenced an invalid resource. This is most commonly caused when the caller deletes a resource before executing a command buffer that refers to it.
+
+ @constant MTLCommandBufferErrorMemoryless
+ One or more internal resources limits reached that prevent using memoryless render pass attachments. See error string for more detail.
+
+ @constant MTLCommandBufferErrorDeviceRemoved
+ The device was physically removed before the command could finish execution
*/
typedef NS_ENUM(NSUInteger, MTLCommandBufferError)
@@ -202,25 +220,25 @@
@method blitCommandEncoder
@abstract returns a blit command encoder to encode into this command buffer.
*/
-- (id <MTLBlitCommandEncoder>)blitCommandEncoder;
+- (nullable id <MTLBlitCommandEncoder>)blitCommandEncoder;
/*!
@method renderCommandEncoderWithDescriptor:
@abstract returns a render command endcoder to encode into this command buffer.
*/
-- (id <MTLRenderCommandEncoder>)renderCommandEncoderWithDescriptor:(MTLRenderPassDescriptor *)renderPassDescriptor;
+- (nullable id <MTLRenderCommandEncoder>)renderCommandEncoderWithDescriptor:(MTLRenderPassDescriptor *)renderPassDescriptor;
/*!
@method computeCommandEncoder
@abstract returns a compute command encoder to encode into this command buffer.
*/
-- (id <MTLComputeCommandEncoder>)computeCommandEncoder;
+- (nullable id <MTLComputeCommandEncoder>)computeCommandEncoder;
/*!
@method parallelRenderCommandEncoderWithDescriptor:
@abstract returns a parallel render pass encoder to encode into this command buffer.
*/
-- (id <MTLParallelRenderCommandEncoder>)parallelRenderCommandEncoderWithDescriptor:(MTLRenderPassDescriptor *)renderPassDescriptor;
+- (nullable id <MTLParallelRenderCommandEncoder>)parallelRenderCommandEncoderWithDescriptor:(MTLRenderPassDescriptor *)renderPassDescriptor;
/*!
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h 2017-05-23 18:40:04.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h 2017-06-10 19:41:50.000000000 -0400
@@ -12,7 +12,7 @@
@protocol MTLDevice;
/*!
- * @brief Describes how a resource will be used by a shader through an indirect argument buffer
+ * @brief Describes how a resource will be used by a shader through an argument buffer
*/
typedef NS_OPTIONS(NSUInteger, MTLResourceUsage)
{
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandQueue.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandQueue.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandQueue.h 2017-05-23 18:40:04.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandQueue.h 2017-06-10 19:41:50.000000000 -0400
@@ -30,14 +30,14 @@
@abstract Returns a new autoreleased command buffer used to encode work into this queue that
maintains strong references to resources used within the command buffer.
*/
-- (id <MTLCommandBuffer>)commandBuffer;
+- (nullable id <MTLCommandBuffer>)commandBuffer;
/*!
@method commandBufferWithUnretainedReferences
@abstract Returns a new autoreleased command buffer used to encode work into this queue that
does not maintain strong references to resources used within the command buffer.
*/
-- (id <MTLCommandBuffer>)commandBufferWithUnretainedReferences;
+- (nullable id <MTLCommandBuffer>)commandBufferWithUnretainedReferences;
/*!
@method insertDebugCaptureBoundary
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h 2017-05-23 18:40:04.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h 2017-06-10 19:41:50.000000000 -0400
@@ -105,6 +105,10 @@
+/*
+ @method setStageInRegion:region:
+ @brief Set the region of the stage_in attributes to apply the compute kernel.
+*/
- (void)setStageInRegion:(MTLRegion)region NS_AVAILABLE(10_12, 10_0);
/*
@@ -146,33 +150,31 @@
/*!
* @method useResource:usage:
- * @abstract Declare that a resource may be accessed by the render pass through an indirect argument buffer
- * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any dispatch commands which may access the resource through an indirect argument buffer. This method may cause color attachments to become decompressed. Declaring a minimal usage (i.e. read-only) may prevent color attachments from becoming decompressed on some devices.
+ * @abstract Declare that a resource may be accessed by the command encoder through an argument buffer
+ * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any dispatch commands which may access the resource through an argument buffer.
*/
- (void)useResource:(id <MTLResource>)resource usage:(MTLResourceUsage)usage NS_AVAILABLE(10_13, 11_0);
/*!
* @method useResources:count:usage:
- * @abstract Declare that an array of resources may be accessed through an indirect argument buffer by the render pass
- * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any dispatch commands which may access the resources through an indirect argument buffer. This method may cause color attachments to become decompressed. Declaring a minimal usage (i.e. read-only) may prevent color attachments from becoming decompressed on some devices.
+ * @abstract Declare that an array of resources may be accessed through an argument buffer by the command encoder
+ * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any dispatch commands which may access the resources through an argument buffer.
*/
-- (void)useResources:(const id <MTLResource> __nullable[__nullable])resources count:(NSUInteger)count usage:(MTLResourceUsage)usage NS_AVAILABLE(10_13, 11_0);
-
-// TODO: useSamplerState?
-
+- (void)useResources:(const id <MTLResource> __nonnull[__nonnull])resources count:(NSUInteger)count usage:(MTLResourceUsage)usage NS_AVAILABLE(10_13, 11_0);
+
/*!
* @method useHeap:
- * @abstract Declare that the resources allocated from a heap may be accessed by the render pass through an indirect argument buffer
- * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any dispatch commands which may access the resources allocated from the heap through an indirect argument buffer. This method may cause all of the color attachments allocated from the heap to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
+ * @abstract Declare that the resources allocated from a heap may be accessed by the render pass through an argument buffer
+ * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any dispatch commands which may access the resources allocated from the heap through an argument buffer. This method may cause all of the color attachments allocated from the heap to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
*/
- (void)useHeap:(id <MTLHeap>)heap NS_AVAILABLE(10_13, 11_0);
/*!
* @method useHeaps:count:
- * @abstract Declare that the resources allocated from an array of heaps may be accessed by the render pass through an indirect argument buffer
- * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any dispatch commands which may access the resources allocated from the heaps through an indirect argument buffer. This method may cause all of the color attachments allocated from the heaps to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
+ * @abstract Declare that the resources allocated from an array of heaps may be accessed by the render pass through an argument buffer
+ * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any dispatch commands which may access the resources allocated from the heaps through an argument buffer. This method may cause all of the color attachments allocated from the heaps to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
*/
-- (void)useHeaps:(const id <MTLHeap> __nullable[__nullable])heaps count:(NSUInteger)count NS_AVAILABLE(10_13, 11_0);
+- (void)useHeaps:(const id <MTLHeap> __nonnull[__nonnull])heaps count:(NSUInteger)count NS_AVAILABLE(10_13, 11_0);
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h 2017-05-23 18:40:04.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h 2017-06-10 19:41:50.000000000 -0400
@@ -48,6 +48,10 @@
*/
@property (nullable, copy, nonatomic) MTLStageInputOutputDescriptor *stageInputDescriptor NS_AVAILABLE(10_12, 10_0);
+/*!
+ @property buffers
+ @abstract Optional properties for each buffer binding used by the compute function.
+ */
@property (readonly) MTLPipelineBufferDescriptorArray *buffers NS_AVAILABLE(10_13, 11_0);
/*!
@@ -87,9 +91,11 @@
@property (readonly) NSUInteger threadExecutionWidth;
-@optional
-@property (readonly) NSUInteger staticThreadgroupMemoryLength NS_AVAILABLE_MAC(10_13);
-@required
+/*!
+ @property staticThreadgroupMemoryLength
+ @abstract The length in bytes of threadgroup memory that is statically allocated.
+ */
+@property (readonly) NSUInteger staticThreadgroupMemoryLength NS_AVAILABLE(10_13, 11_0);
@end
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h 2017-05-23 18:40:04.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h 2017-06-10 19:41:50.000000000 -0400
@@ -6,18 +6,14 @@
//
#import <Availability.h>
-#import <Foundation/NSObjCRuntime.h>
#import <Foundation/Foundation.h>
#import <Metal/MTLDefines.h>
#import <Metal/MTLTypes.h>
#import <Metal/MTLPixelFormat.h>
#import <Metal/MTLResource.h>
#import <Metal/MTLLibrary.h>
-
#import <IOSurface/IOSurface.h>
-
-
NS_ASSUME_NONNULL_BEGIN
@protocol MTLCommandQueue;
@protocol MTLDevice;
@@ -31,8 +27,7 @@
@protocol MTLComputePipelineState;
@protocol MTLHeap;
@protocol MTLFence;
-@protocol MTLIndirectArgumentEncoder;
-
+@protocol MTLArgumentEncoder;
@class MTLSamplerDescriptor;
@class MTLRenderPipelineColorAttachmentDescriptor;
@class MTLDepthStencilDescriptor;
@@ -98,14 +93,13 @@
to be notified of any further changes (additions, removals, etc.). The observer return value is retained by Metal and may be
passed to MTLRemoveDeviceObserver() if the application no longer wishes to receive notifications.
*/
-MTL_EXTERN NSArray <id<MTLDevice>> *MTLCopyAllDevicesWithObserver(id <NSObject> __nonnull * __nonnull observer, MTLDeviceNotificationHandler handler) NS_AVAILABLE_MAC(10_13) NS_RETURNS_RETAINED;
+MTL_EXTERN NSArray <id<MTLDevice>> *MTLCopyAllDevicesWithObserver(id <NSObject> __nullable * __nonnull observer, MTLDeviceNotificationHandler handler) NS_AVAILABLE_MAC(10_13) NS_RETURNS_RETAINED;
/*!
@brief Removes a previously installed observer for device change notifications.
*/
MTL_EXTERN void MTLRemoveDeviceObserver(id <NSObject> observer) NS_AVAILABLE_MAC(10_13);
-
typedef NS_ENUM(NSUInteger, MTLFeatureSet)
{
MTLFeatureSet_iOS_GPUFamily1_v1 NS_ENUM_AVAILABLE_IOS(8_0) __TVOS_UNAVAILABLE = 0,
@@ -159,19 +153,21 @@
*/
typedef NS_ENUM(NSUInteger, MTLReadWriteTextureTier)
{
- MTLReadWriteTextureTier1 = 0,
- MTLReadWriteTextureTier2 = 1,
-} NS_ENUM_AVAILABLE_MAC(10_13);
+ MTLReadWriteTextureTierNone = 0,
+ MTLReadWriteTextureTier1 = 1,
+ MTLReadWriteTextureTier2 = 2,
+} NS_ENUM_AVAILABLE(10_13, 11_0);
/*!
- @enum MTLIndirectArgumentBuffersTier
- @abstract MTLIndirectArgumentBuffersTier determines support level for Indirect Argument Buffers format.
+ @enum MTLArgumentBuffersTier
+ @abstract MTLArgumentBuffersTier determines support level for argument buffers.
*/
-typedef NS_ENUM(NSUInteger, MTLIndirectArgumentBuffersTier)
+typedef NS_ENUM(NSUInteger, MTLArgumentBuffersTier)
{
- MTLIndirectArgumentBuffersTier1 = 0,
- MTLIndirectArgumentBuffersTier2 = 1,
-} NS_ENUM_AVAILABLE_MAC(10_13);
+ MTLArgumentBuffersTier1 = 0,
+ MTLArgumentBuffersTier2 = 1,
+} NS_ENUM_AVAILABLE(10_13, 11_0);
+
/*!
@abstract Represent a memory size and alignment in bytes.
@@ -193,18 +189,19 @@
typedef void (^MTLNewComputePipelineStateCompletionHandler)(id <MTLComputePipelineState> __nullable computePipelineState, NSError * __nullable error);
typedef void (^MTLNewComputePipelineStateWithReflectionCompletionHandler)(id <MTLComputePipelineState> __nullable computePipelineState, MTLComputePipelineReflection * __nullable reflection, NSError * __nullable error);
+
/*!
- * @class MTLIndirectArgumentDescriptor
- * @abstract Represents an indirect shader argument
+ * @class MTLArgumentDescriptor
+ * @abstract Represents a member of an argument buffer
*/
NS_CLASS_AVAILABLE(10_13, 11_0)
-@interface MTLIndirectArgumentDescriptor : NSObject <NSCopying>
+@interface MTLArgumentDescriptor : NSObject <NSCopying>
/*!
- * @method indirectArgumentDescriptor
- * @abstract Create an autoreleased default indirect argument descriptor
+ * @method argumentDescriptor
+ * @abstract Create an autoreleased default argument descriptor
*/
-+ (MTLIndirectArgumentDescriptor *)indirectArgumentDescriptor;
++ (MTLArgumentDescriptor *)argumentDescriptor;
/*!
* @property dataType
@@ -237,8 +234,18 @@
*/
@property (nonatomic) MTLTextureType textureType;
+/*!
+ @property constantBlockAlignment
+ @abstract if set forces the constant block to be aligned to the given alignment
+ @discussion Should only be set on the first constant of the block and is only valid if a corresponding
+ explicit "alignas" is applied to the constant in the metal shader language.
+ */
+@property (nonatomic) NSUInteger constantBlockAlignment;
+
@end
+
+
/*!
@protocol MTLDevice
@abstract MTLDevice represents a processor capable of data parallel computations
@@ -250,7 +257,15 @@
@property name
@abstract The full name of the vendor device.
*/
-@property (nullable, readonly) NSString *name;
+@property (nonnull, readonly) NSString *name;
+
+/*!
+ @property registryID
+ @abstract Returns the IORegistry ID for the Metal device
+ @discussion The registryID value for a Metal device is global to all tasks, and may be used
+ to identify the GPU across task boundaries.
+*/
+@property (readonly) uint64_t registryID NS_AVAILABLE(10_13, 11_0) ;
/*!
@property maxThreadsPerThreadgroup
@@ -298,14 +313,15 @@
@abstract Query support tier for read-write texture formats.
@return MTLReadWriteTextureTier enum value.
*/
-@property (readonly) MTLReadWriteTextureTier readWriteTextureSupport NS_AVAILABLE_MAC(10_13);
+@property (readonly) MTLReadWriteTextureTier readWriteTextureSupport NS_AVAILABLE(10_13, 11_0);
/*!
- @property indirectArgumentBuffersSupport
- @abstract Query support tier for Indirect Argument Buffers.
- @return MTLIndirectArgumentBuffersTier enum value.
+ @property argumentBuffersSupport
+ @abstract Query support tier for Argument Buffers.
+ @return MTLArgumentBuffersTier enum value.
*/
-@property (readonly) MTLIndirectArgumentBuffersTier indirectArgumentBuffersSupport NS_AVAILABLE_MAC(10_13);
+@property (readonly) MTLArgumentBuffersTier argumentBuffersSupport NS_AVAILABLE(10_13, 11_0);
+
/*!
@property rasterOrderGroupsSupported
@@ -315,19 +331,26 @@
@property (readonly, getter=areRasterOrderGroupsSupported) BOOL rasterOrderGroupsSupported NS_AVAILABLE(10_13, 11_0);
@required
+
+/*!
+ @property currentAllocatedSize
+ @abstract The current size in bytes of all resources allocated by this device
+ */
+@property (readonly) NSUInteger currentAllocatedSize NS_AVAILABLE(10_13, 11_0);
+
/*!
@method newCommandQueue
@brief Create and return a new command queue. Command Queues created via this method will only allow up to 64 non-completed command buffers.
@return The new command queue object
*/
-- (id <MTLCommandQueue>)newCommandQueue;
+- (nullable id <MTLCommandQueue>)newCommandQueue;
/*!
@method newCommandQueueWithMaxCommandBufferCount
@brief Create and return a new command queue with a given upper bound on non-completed command buffers.
@return The new command queue object
*/
-- (id <MTLCommandQueue>)newCommandQueueWithMaxCommandBufferCount:(NSUInteger)maxCommandBufferCount;
+- (nullable id <MTLCommandQueue>)newCommandQueueWithMaxCommandBufferCount:(NSUInteger)maxCommandBufferCount;
/*!
@method heapTextureSizeAndAlignWithDescriptor:
@@ -347,37 +370,37 @@
@method newHeapWithDescriptor:
@abstract Create a new heap with the given descriptor.
*/
-- (id <MTLHeap>)newHeapWithDescriptor:(MTLHeapDescriptor *)descriptor NS_AVAILABLE(10_13, 10_0);
+- (nullable id <MTLHeap>)newHeapWithDescriptor:(MTLHeapDescriptor *)descriptor NS_AVAILABLE(10_13, 10_0);
/*!
@method newBufferWithLength:options:
@brief Create a buffer by allocating new memory.
*/
-- (id <MTLBuffer>)newBufferWithLength:(NSUInteger)length options:(MTLResourceOptions)options;
+- (nullable id <MTLBuffer>)newBufferWithLength:(NSUInteger)length options:(MTLResourceOptions)options;
/*!
@method newBufferWithBytes:length:options:
@brief Create a buffer by allocating new memory and specifing the initial contents to be copied into it.
*/
-- (id <MTLBuffer>)newBufferWithBytes:(const void *)pointer length:(NSUInteger)length options:(MTLResourceOptions)options;
+- (nullable id <MTLBuffer>)newBufferWithBytes:(const void *)pointer length:(NSUInteger)length options:(MTLResourceOptions)options;
/*!
@method newBufferWithBytesNoCopy:length:options:deallocator:
@brief Create a buffer by wrapping an existing part of the address space.
*/
-- (id <MTLBuffer>)newBufferWithBytesNoCopy:(void *)pointer length:(NSUInteger)length options:(MTLResourceOptions)options deallocator:(void (^ __nullable)(void *pointer, NSUInteger length))deallocator;
+- (nullable id <MTLBuffer>)newBufferWithBytesNoCopy:(void *)pointer length:(NSUInteger)length options:(MTLResourceOptions)options deallocator:(void (^ __nullable)(void *pointer, NSUInteger length))deallocator;
/*!
@method newDepthStencilStateWithDescriptor:
@brief Create a depth/stencil test state object.
*/
-- (id <MTLDepthStencilState>)newDepthStencilStateWithDescriptor:(MTLDepthStencilDescriptor *)descriptor;
+- (nullable id <MTLDepthStencilState>)newDepthStencilStateWithDescriptor:(MTLDepthStencilDescriptor *)descriptor;
/*!
@method newTextureWithDescriptor:
@abstract Allocate a new texture with privately owned storage.
*/
-- (id <MTLTexture>)newTextureWithDescriptor:(MTLTextureDescriptor *)descriptor;
+- (nullable id <MTLTexture>)newTextureWithDescriptor:(MTLTextureDescriptor *)descriptor;
/*!
@method newTextureWithDescriptor:iosurface:plane
@@ -387,13 +410,13 @@
@param plane The plan within the IOSurface to use.
@return A new texture object.
*/
-- (id <MTLTexture>)newTextureWithDescriptor:(MTLTextureDescriptor *)descriptor iosurface:(IOSurfaceRef)iosurface plane:(NSUInteger)plane NS_AVAILABLE(10_11, 11_0);
+- (nullable id <MTLTexture>)newTextureWithDescriptor:(MTLTextureDescriptor *)descriptor iosurface:(IOSurfaceRef)iosurface plane:(NSUInteger)plane NS_AVAILABLE(10_11, 11_0);
/*!
@method newSamplerStateWithDescriptor:
@abstract Create a new sampler.
*/
-- (id <MTLSamplerState>)newSamplerStateWithDescriptor:(MTLSamplerDescriptor *)descriptor;
+- (nullable id <MTLSamplerState>)newSamplerStateWithDescriptor:(MTLSamplerDescriptor *)descriptor;
/*!
@method newDefaultLibrary
@@ -415,7 +438,6 @@
*/
- (nullable id <MTLLibrary>)newLibraryWithFile:(NSString *)filepath error:(__autoreleasing NSError **)error;
-
/*!
@method newLibraryWithURL:
@abstract Load a MTLLibrary from a metallib file.
@@ -484,7 +506,6 @@
*/
- (void)newComputePipelineStateWithFunction:(id <MTLFunction>)computeFunction completionHandler:(MTLNewComputePipelineStateCompletionHandler)completionHandler;
-
/*!
@method newComputePipelineStateWithDescriptor:options:completionHandler:
@abstract Create and compile a new MTLComputePipelineState object asynchronously.
@@ -507,7 +528,7 @@
@method newFence
@abstract Create a new MTLFence object
*/
-- (id <MTLFence>)newFence NS_AVAILABLE(10_13, 10_0);
+- (nullable id <MTLFence>)newFence NS_AVAILABLE(10_13, 10_0);
/*!
@method supportsFeatureSet:
@@ -528,12 +549,11 @@
*/
- (NSUInteger)minimumLinearTextureAlignmentForPixelFormat:(MTLPixelFormat)format NS_AVAILABLE(10_13, 10_0);
-
-
-@optional
-@property (readonly) NSUInteger maxThreadgroupMemoryLength NS_AVAILABLE_MAC(10_13);
-@required
-
+/*!
+ @property maxThreadgroupMemoryLength
+ @abstract The maximum threadgroup memory available, in bytes.
+ */
+@property (readonly) NSUInteger maxThreadgroupMemoryLength NS_AVAILABLE(10_13, 11_0);
/*!
@property programmableSaplePositionsSupported
@@ -551,12 +571,12 @@
- (void)getDefaultSamplePositions:(MTLSamplePosition *)positions count:(NSUInteger)count NS_AVAILABLE(10_13, 11_0);
-
/*!
- * @method newIndirectArgumentEncoderWithArguments:count:
- * @abstract Creates an indirect argument encoder for an array of indirect argument descriptors which will be encoded sequentially.
+ * @method newArgumentEncoderWithArguments:count:
+ * @abstract Creates an argument encoder for an array of argument descriptors which will be encoded sequentially.
*/
-- (id <MTLIndirectArgumentEncoder>)newIndirectArgumentEncoderWithArguments:(NSArray <MTLIndirectArgumentDescriptor *> *)arguments NS_AVAILABLE(10_13, 11_0);
+- (nullable id <MTLArgumentEncoder>)newArgumentEncoderWithArguments:(NSArray <MTLArgumentDescriptor *> *)arguments NS_AVAILABLE(10_13, 11_0);
+
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h 2017-05-23 18:40:04.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h 2017-06-10 19:41:50.000000000 -0400
@@ -91,6 +91,12 @@
@property (readonly) NSUInteger usedSize;
/*!
+ @property currentAllocatedSize
+ @abstract The size in bytes of the current heap allocation.
+ */
+@property (readonly) NSUInteger currentAllocatedSize NS_AVAILABLE(10_13, 11_0);
+
+/*!
@method maxAvailableSizeWithAlignment:
@abstract The maximum size that can be successfully allocated from the heap in bytes, taking into notice given alignment. Alignment needs to be zero, or power of two.
@discussion Provides a measure of fragmentation within the heap.
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectArgumentEncoder.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectArgumentEncoder.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectArgumentEncoder.h 2017-05-23 18:40:04.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectArgumentEncoder.h 1969-12-31 19:00:00.000000000 -0500
@@ -1,102 +0,0 @@
-//
-// MTLIndirectArgumentEncoder.h
-// Metal
-//
-// Copyright (c) 2016 Apple Inc. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import <Metal/MTLDefines.h>
-
-NS_ASSUME_NONNULL_BEGIN
-@protocol MTLDevice;
-@protocol MTLBuffer;
-@protocol MTLTexture;
-@protocol MTLSamplerState;
-@protocol MTLRenderPipelineState;
-
-/*!
- * @protocol MTLIndirectArgumentEncoder
- * @discussion MTLIndirectArgumentEncoder encodes indirect buffer, texture, sampler, and constant data shader arguments into a format that the device can access.
- */
-NS_AVAILABLE(10_13, 11_0)
-@protocol MTLIndirectArgumentEncoder <NSObject>
-
-/*!
- @property device
- @abstract The device this indirect argument encoder was created against.
- */
-@property (readonly) id <MTLDevice> device;
-
-/*!
- @property label
- @abstract A string to help identify this object.
- */
-@property (nullable, copy, atomic) NSString *label;
-
-/*!
- * @property encodedLength
- * @abstract The number of bytes required to store the encoded resource bindings.
- */
-@property (readonly) NSUInteger encodedLength;
-
-/*!
- * @method setIndirectArgumentBuffer:offset:
- * @brief Sets the destination buffer and offset indirect arguments will be encoded into.
- */
-- (void)setIndirectArgumentBuffer:(id <MTLBuffer>)indirectArgumentBuffer offset:(NSUInteger)offset;
-
-/*!
- * @method setBuffer:offset:atIndex:
- * @brief Set a buffer at the given bind point index.
- */
-- (void)setBuffer:(id <MTLBuffer>)buffer offset:(NSUInteger)offset atIndex:(NSUInteger)index;
-
-/*!
- * @method setBuffers:offsets:withRange:
- * @brief Set an array of buffers at the given bind point index range.
- */
-- (void)setBuffers:(const id <MTLBuffer> __nullable [__nonnull])buffers offsets:(const NSUInteger [__nonnull])offsets withRange:(NSRange)range;
-
-/*!
- * @method setTexture:atIndex:
- * @brief Set a texture at the given bind point index.
- */
-- (void)setTexture:(id <MTLTexture>)texture atIndex:(NSUInteger)index;
-
-/*!
- * @method setTextures:withRange:
- * @brief Set an array of textures at the given bind point index range.
- */
-- (void)setTextures:(const id <MTLTexture> __nullable [__nonnull])textures withRange:(NSRange)range;
-
-/*!
- * @method setSamplerState:atIndex:
- * @brief Set a sampler at the given bind point index.
- */
-- (void)setSamplerState:(id <MTLSamplerState>)sampler atIndex:(NSUInteger)index;
-
-/*!
- * @method setSamplerStates:withRange:
- * @brief Set an array of samplers at the given bind point index range.
- */
-- (void)setSamplerStates:(const id <MTLSamplerState> __nullable [__nonnull])samplers withRange:(NSRange)range;
-
-/*!
- * @method constantDataAtIndex:
- * @brief Returns a pointer to the constant data at the given bind point index.
- */
-- (void*)constantDataAtIndex:(NSUInteger)index;
-
-
-/*!
- * @method newIndirectArgumentEncoderForBufferAtIndex:
- * @brief Returns a pointer to a new MTLIndirectArgumentEncoder that can be used to encode the an indirect argument buffer
- * in the buffer associated with a given index.
- * Returns nil if the resource at the given index is not an indirect argument buffer.
- */
-- (nullable id<MTLIndirectArgumentEncoder>)newIndirectArgumentEncoderForBufferAtIndex:(NSUInteger)index;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h 2017-05-23 18:40:05.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h 2017-06-10 19:41:50.000000000 -0400
@@ -18,7 +18,8 @@
@class MTLCompileOptions;
@class MTLFunctionConstantValues;
-@protocol MTLIndirectArgumentEncoder;
+
+@protocol MTLArgumentEncoder;
typedef __autoreleasing MTLArgument *__nullable MTLAutoreleasedArgument;
@@ -146,19 +147,21 @@
*/
@property (readonly) NSDictionary<NSString *, MTLFunctionConstant *> *functionConstantsDictionary NS_AVAILABLE(10_12, 10_0);
+
/*!
- * @method newIndirectArgumentEncoderWithBufferIndex:
- * @abstract Creates an indirect argument encoder which will encode arguments matching the layout of the indirect argument buffer at the given bind point index.
+ * @method newArgumentEncoderWithBufferIndex:
+ * @abstract Creates an argument encoder which will encode arguments matching the layout of the argument buffer at the given bind point index.
*/
-- (id <MTLIndirectArgumentEncoder>)newIndirectArgumentEncoderWithBufferIndex:(NSUInteger)bufferIndex NS_AVAILABLE(10_13, 11_0);
+- (id <MTLArgumentEncoder>)newArgumentEncoderWithBufferIndex:(NSUInteger)bufferIndex NS_AVAILABLE(10_13, 11_0);
/*!
- * @method newIndirectArgumentEncoderWithBufferIndex:
- * @abstract Creates an indirect argument encoder which will encode arguments matching the layout of the indirect argument buffer at the given bind point index.
+ * @method newArgumentEncoderWithBufferIndex:
+ * @abstract Creates an argument encoder which will encode arguments matching the layout of the argument buffer at the given bind point index.
*/
-- (id <MTLIndirectArgumentEncoder>)newIndirectArgumentEncoderWithBufferIndex:(NSUInteger)bufferIndex
+- (id <MTLArgumentEncoder>)newArgumentEncoderWithBufferIndex:(NSUInteger)bufferIndex
reflection:(MTLAutoreleasedArgument * __nullable)reflection NS_AVAILABLE(10_13, 11_0);
+
@end
typedef NS_ENUM(NSUInteger, MTLLanguageVersion) {
@@ -167,7 +170,6 @@
MTLLanguageVersion1_1 NS_ENUM_AVAILABLE(10_11, 9_0) = (1 << 16) + 1,
MTLLanguageVersion1_2 NS_ENUM_AVAILABLE(10_12, 10_0) = (1 << 16) + 2,
MTLLanguageVersion2_0 NS_ENUM_AVAILABLE(10_13, NA) = (2 << 16),
-
} NS_ENUM_AVAILABLE(10_11, 9_0);
NS_CLASS_AVAILABLE(10_11, 8_0)
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLParallelRenderCommandEncoder.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLParallelRenderCommandEncoder.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLParallelRenderCommandEncoder.h 2017-05-23 18:40:05.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLParallelRenderCommandEncoder.h 2017-06-10 19:41:50.000000000 -0400
@@ -25,7 +25,7 @@
@method renderCommandEncoder
@abstract Return a new autoreleased object that conforms to <MTLRenderCommandEncoder> that may be used to encode on a different thread.
*/
-- (id <MTLRenderCommandEncoder>)renderCommandEncoder;
+- (nullable id <MTLRenderCommandEncoder>)renderCommandEncoder;
/*!
@method setColorStoreAction:atIndex:
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h 2017-05-23 18:40:05.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h 2017-06-10 19:41:50.000000000 -0400
@@ -24,7 +24,7 @@
NS_CLASS_AVAILABLE(10_13, 11_0)
@interface MTLPipelineBufferDescriptor : NSObject <NSCopying>
-/*! Buffer mutability. Defaults to MTLMutabilityDefault: mutable for standard buffers, immutable for indirect argument buffers */
+/*! Buffer mutability. Defaults to MTLMutabilityDefault: mutable for standard buffers, immutable for argument buffers */
@property (nonatomic) MTLMutability mutability;
@end
@@ -39,4 +39,4 @@
@end
-NS_ASSUME_NONNULL_END
\ No newline at end of file
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h 2017-05-23 18:40:05.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h 2017-06-10 19:41:50.000000000 -0400
@@ -489,33 +489,37 @@
/*!
* @method useResource:usage:
- * @abstract Declare that a resource may be accessed by the render pass through an indirect argument buffer
- * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resource through an indirect argument buffer. However, this method may cause color attachments to become decompressed. Therefore, this method should be called until as late as possible within a render command encoder. Declaring a minimal usage (i.e. read-only) may prevent color attachments from becoming decompressed on some devices.
+ * @abstract Declare that a resource may be accessed by the render pass through an argument buffer
+ * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resource through an argument buffer. However, this method may cause color attachments to become decompressed. Therefore, this method should be called until as late as possible within a render command encoder. Declaring a minimal usage (i.e. read-only) may prevent color attachments from becoming decompressed on some devices.
+
+ Note that calling useResource does not retain the resource. It is the responsiblity of the user to retain the resource until
+ the command buffer has been executed.
*/
- (void)useResource:(id <MTLResource>)resource usage:(MTLResourceUsage)usage NS_AVAILABLE(10_13, 11_0);
/*!
* @method useResources:count:usage:
- * @abstract Declare that an array of resources may be accessed through an indirect argument buffer by the render pass
- * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resources through an indirect argument buffer. However, this method may cause color attachments to become decompressed. Therefore, this method should be called until as late as possible within a render command encoder. Declaring a minimal usage (i.e. read-only) may prevent color attachments from becoming decompressed on some devices.
- */
-- (void)useResources:(const id <MTLResource> __nullable[__nullable])resources count:(NSUInteger)count usage:(MTLResourceUsage)usage NS_AVAILABLE(10_13, 11_0);
-
-// TODO: useSamplerState?
-
+ * @abstract Declare that an array of resources may be accessed through an argument buffer by the render pass
+ * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resources through an argument buffer. However, this method may cause color attachments to become decompressed. Therefore, this method should be called until as late as possible within a render command encoder. Declaring a minimal usage (i.e. read-only) may prevent color attachments from becoming decompressed on some devices.
+
+ Note that calling useResources does not retain the resources. It is the responsiblity of the user to retain the resources until
+ the command buffer has been executed.
+*/
+- (void)useResources:(const id <MTLResource> __nonnull[__nonnull])resources count:(NSUInteger)count usage:(MTLResourceUsage)usage NS_AVAILABLE(10_13, 11_0);
+
/*!
* @method useHeap:
- * @abstract Declare that the resources allocated from a heap may be accessed by the render pass through an indirect argument buffer
- * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resources allocated from the heap through an indirect argument buffer. This method may cause all of the color attachments allocated from the heap to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
+ * @abstract Declare that the resources allocated from a heap may be accessed by the render pass through an argument buffer
+ * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resources allocated from the heap through an argument buffer. This method may cause all of the color attachments allocated from the heap to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
*/
- (void)useHeap:(id <MTLHeap>)heap NS_AVAILABLE(10_13, 11_0);
/*!
* @method useHeaps:count:
- * @abstract Declare that the resources allocated from an array of heaps may be accessed by the render pass through an indirect argument buffer
- * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resources allocated from the heaps through an indirect argument buffer. This method may cause all of the color attachments allocated from the heaps to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
+ * @abstract Declare that the resources allocated from an array of heaps may be accessed by the render pass through an argument buffer
+ * @discussion This method does not protect against data hazards; these hazards must be addressed using an MTLFence. This method must be called before encoding any draw commands which may access the resources allocated from the heaps through an argument buffer. This method may cause all of the color attachments allocated from the heaps to become decompressed. Therefore, it is recommended that the useResource:usage: or useResources:count:usage: methods be used for color attachments instead, with a minimal (i.e. read-only) usage.
*/
-- (void)useHeaps:(const id <MTLHeap> __nullable[__nullable])heaps count:(NSUInteger)count NS_AVAILABLE(10_13, 11_0);
+- (void)useHeaps:(const id <MTLHeap> __nonnull[__nonnull])heaps count:(NSUInteger)count NS_AVAILABLE(10_13, 11_0);
@end
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h 2017-05-21 23:53:15.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h 2017-06-10 19:41:50.000000000 -0400
@@ -212,8 +212,6 @@
@property (nonatomic) NSUInteger renderTargetArrayLength NS_AVAILABLE(10_11, NA);
-//cleanup
-
/*!
@method setSamplePositions:count:
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h 2017-05-23 18:40:05.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h 2017-06-10 19:41:50.000000000 -0400
@@ -143,7 +143,8 @@
@property (nullable, copy, nonatomic) MTLVertexDescriptor *vertexDescriptor;
/* Rasterization and visibility state */
-@property (readwrite, nonatomic) NSUInteger sampleCount;
+@property (readwrite, nonatomic) NSUInteger sampleCount; //DEPRECATED - aliases rasterSampleCount property
+@property (readwrite, nonatomic) NSUInteger rasterSampleCount;
@property (readwrite, nonatomic, getter = isAlphaToCoverageEnabled) BOOL alphaToCoverageEnabled;
@property (readwrite, nonatomic, getter = isAlphaToOneEnabled) BOOL alphaToOneEnabled;
@property (readwrite, nonatomic, getter = isRasterizationEnabled) BOOL rasterizationEnabled;
@@ -190,8 +191,6 @@
-
-
@end
NS_CLASS_AVAILABLE(10_11, 8_0)
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h 2017-05-21 23:53:31.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h 2017-06-09 18:54:19.000000000 -0400
@@ -204,6 +204,12 @@
@property (readonly, nullable) id <MTLHeap> heap NS_AVAILABLE(10_13, 10_0);
/*!
+ @property allocatedSize
+ @abstrace The size in bytes occupied by this resource
+*/
+@property (readonly) NSUInteger allocatedSize NS_AVAILABLE(10_13, 11_0);
+
+/*!
@method makeAliasable
@abstract Allow future heap sub-allocations to alias against this resource's memory.
@discussion It is illegal to call this method on a non heap-based resource.
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h 2017-05-21 23:53:16.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h 2017-06-10 19:41:50.000000000 -0400
@@ -184,6 +184,12 @@
@property (nonatomic) MTLCompareFunction compareFunction NS_AVAILABLE(10_11, 9_0);
/*!
+ @property supportArgumentBuffers
+ @abstract true if the sampler can be used inside an argument buffer
+*/
+@property (nonatomic) BOOL supportArgumentBuffers NS_AVAILABLE(10_13, 11_0);
+
+/*!
@property label
@abstract A string to help identify the created object.
*/
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h 2017-05-23 18:40:05.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h 2017-06-10 19:41:51.000000000 -0400
@@ -12,6 +12,8 @@
#import <Metal/MTLTypes.h>
+#import <IOSurface/IOSurface.h>
+
NS_ASSUME_NONNULL_BEGIN
/*!
@enum MTLTextureType
@@ -195,13 +197,13 @@
@property iosurface
@abstract If this texture was created from an IOSurface, this returns a reference to that IOSurface. iosurface is nil if this texture was not created from an IOSurface.
*/
-@property (nullable, readonly) IOSurfaceRef iosurface;
+@property (nullable, readonly) IOSurfaceRef iosurface NS_AVAILABLE(10_11, 11_0);
/*!
@property iosurfacePlane
@abstract If this texture was created from an IOSurface, this returns the plane of the IOSurface from which the texture was created. iosurfacePlane is 0 if this texture was not created from an IOSurface.
*/
-@property (readonly) NSUInteger iosurfacePlane;
+@property (readonly) NSUInteger iosurfacePlane NS_AVAILABLE(10_11, 11_0);
/*!
@property type
@@ -296,13 +298,13 @@
@method newTextureViewWithPixelFormat:
@abstract Create a new texture which shares the same storage as the source texture, but with a different (but compatible) pixel format.
*/
-- (id<MTLTexture>)newTextureViewWithPixelFormat:(MTLPixelFormat)pixelFormat;
+- (nullable id<MTLTexture>)newTextureViewWithPixelFormat:(MTLPixelFormat)pixelFormat;
/*!
@method newTextureViewWithPixelFormat:textureType:levels:slices:
@abstract Create a new texture which shares the same storage as the source texture, but with a different (but compatible) pixel format, texture type, levels and slices.
*/
-- (id<MTLTexture>)newTextureViewWithPixelFormat:(MTLPixelFormat)pixelFormat textureType:(MTLTextureType)textureType levels:(NSRange)levelRange slices:(NSRange)sliceRange NS_AVAILABLE(10_11, 9_0);
+- (nullable id<MTLTexture>)newTextureViewWithPixelFormat:(MTLPixelFormat)pixelFormat textureType:(MTLTextureType)textureType levels:(NSRange)levelRange slices:(NSRange)sliceRange NS_AVAILABLE(10_11, 9_0);
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h 2017-05-23 18:40:05.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h 2017-06-09 20:26:33.000000000 -0400
@@ -73,7 +73,7 @@
MTLVertexFormatInt1010102Normalized = 40,
MTLVertexFormatUInt1010102Normalized = 41,
- MTLVertexFormatUChar4Normalized_BGRA NS_ENUM_AVAILABLE(10_12, 10_0) = 42,
+ MTLVertexFormatUChar4Normalized_BGRA NS_ENUM_AVAILABLE(10_13, 11_0) = 42,
MTLVertexFormatUChar NS_ENUM_AVAILABLE(10_13, 11_0) = 45,
MTLVertexFormatChar NS_ENUM_AVAILABLE(10_13, 11_0) = 46,
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes 2017-05-22 00:22:07.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes 2017-06-10 19:41:48.000000000 -0400
@@ -36,6 +36,14 @@
SwiftName: uchar3
- Name: MTLDataTypeUChar4
SwiftName: uchar4
+- Name: MTLDataTypeRGBA8Unorm_sRGB
+ SwiftName: rgba8Unorm_srgb
+- Name: MTLDataTypeRGB10A2Unorm
+ SwiftName: rgb10a2Unorm
+- Name: MTLDataTypeRG11B10Float
+ SwiftName: rg11b10Float
+- Name: MTLDataTypeRGB9E5Float
+ SwiftName: rgb9e5Float
- Name: MTLPixelFormatRGBA8Unorm_sRGB
SwiftName: rgba8Unorm_srgb
- Name: MTLPixelFormatBGRA8Unorm_sRGB
@@ -516,6 +524,9 @@
- Selector: 'newIndirectArgumentEncoderWithArguments:count:'
SwiftName: makeIndirectArgumentEncoder(arguments:count:)
MethodKind: Instance
+ - Selector: 'newArgumentEncoderWithArguments:count:'
+ SwiftName: makeArgumentEncoder(arguments:count:)
+ MethodKind: Instance
- Name: MTLDrawable
Methods:
- Selector: 'presentAtTime:'
@@ -546,6 +557,20 @@
- Selector: 'setSamplerState:atIndex:'
SwiftName: setSamplerState(_:index:)
MethodKind: Instance
+- Name: MTLArgumentEncoder
+ Methods:
+ - Selector: 'newArgumentEncoderForBufferAtIndex:'
+ SwiftName: makeArgumentEncoderForBuffer(atIndex:)
+ MethodKind: Instance
+ - Selector: 'setBuffer:offset:atIndex:'
+ SwiftName: setBuffer(_:offset:index:)
+ MethodKind: Instance
+ - Selector: 'setTexture:atIndex:'
+ SwiftName: setTexture(_:index:)
+ MethodKind: Instance
+ - Selector: 'setSamplerState:atIndex:'
+ SwiftName: setSamplerState(_:index:)
+ MethodKind: Instance
- Name: MTLLibrary
Methods:
- Selector: 'newFunctionWithName:'
@@ -565,6 +590,12 @@
- Selector: 'newIndirectArgumentEncoderWithBufferIndex:reflection:'
SwiftName: makeIndirectArgumentEncoder(bufferIndex:reflection:)
MethodKind: Instance
+ - Selector: 'newArgumentEncoderWithBufferIndex:'
+ SwiftName: makeArgumentEncoder(bufferIndex:)
+ MethodKind: Instance
+ - Selector: 'newArgumentEncoderWithBufferIndex:reflection:'
+ SwiftName: makeArgumentEncoder(bufferIndex:reflection:)
+ MethodKind: Instance
- Name: MTLParallelRenderCommandEncoder
Methods:
- Selector: 'renderCommandEncoder'
@@ -722,11 +753,104 @@
SwiftName: setConstantValue(_:type:at:)
MethodKind: Instance
Protocols:
+ - Name: MTLBuffer
+ Methods:
+ - Selector: 'newTextureWithDescriptor:offset:bytesPerRow:'
+ SwiftName: makeTexture(descriptor:offset:bytesPerRow:)
+ MethodKind: Instance
+ NullabilityOfRet: N
+ - Name: MTLCommandBuffer
+ Methods:
+ - Selector: 'blitCommandEncoder'
+ SwiftName: makeBlitCommandEncoder()
+ MethodKind: Instance
+ NullabilityOfRet: N
+ - Selector: 'renderCommandEncoderWithDescriptor:'
+ SwiftName: makeRenderCommandEncoder(descriptor:)
+ MethodKind: Instance
+ NullabilityOfRet: N
+ - Selector: 'computeCommandEncoder'
+ SwiftName: makeComputeCommandEncoder()
+ MethodKind: Instance
+ NullabilityOfRet: N
+ - Selector: 'computeCommandEncoderWithParallelExecution'
+ SwiftName: makeComputeCommandEncoderWithParallelExecution()
+ MethodKind: Instance
+ NullabilityOfRet: N
+ - Selector: 'parallelRenderCommandEncoderWithDescriptor:'
+ SwiftName: makeParallelRenderCommandEncoder(descriptor:)
+ MethodKind: Instance
+ NullabilityOfRet: N
+ - Name: MTLCommandQueue
+ Methods:
+ - Selector: 'commandBuffer'
+ SwiftName: makeCommandBuffer()
+ MethodKind: Instance
+ NullabilityOfRet: N
+ - Selector: 'commandBufferWithUnretainedReferences'
+ SwiftName: makeCommandBufferWithUnretainedReferences()
+ MethodKind: Instance
+ NullabilityOfRet: N
- Name: MTLDevice
Methods:
- Selector: 'newDefaultLibrary'
SwiftName: newDefaultLibrary()
MethodKind: Instance
+ - Selector: 'newCommandQueue'
+ SwiftName: makeCommandQueue()
+ MethodKind: Instance
+ NullabilityOfRet: N
+ - Selector: 'newCommandQueueWithMaxCommandBufferCount:'
+ SwiftName: makeCommandQueue(maxCommandBufferCount:)
+ MethodKind: Instance
+ NullabilityOfRet: N
+ - Selector: 'newBufferWithLength:options:'
+ SwiftName: makeBuffer(length:options:)
+ MethodKind: Instance
+ NullabilityOfRet: N
+ - Selector: 'newBufferWithBytes:length:options:'
+ SwiftName: makeBuffer(bytes:length:options:)
+ MethodKind: Instance
+ NullabilityOfRet: N
+ - Selector: 'newBufferWithBytesNoCopy:length:options:deallocator:'
+ SwiftName: makeBuffer(bytesNoCopy:length:options:deallocator:)
+ MethodKind: Instance
+ ResultType: 'id <MTLBuffer> _Nonnull'
+ - Selector: 'newDepthStencilStateWithDescriptor:'
+ SwiftName: makeDepthStencilState(descriptor:)
+ MethodKind: Instance
+ NullabilityOfRet: N
+ - Selector: 'newTextureWithDescriptor:'
+ SwiftName: makeTexture(descriptor:)
+ MethodKind: Instance
+ NullabilityOfRet: N
+ - Selector: 'newTextureWithDescriptor:iosurface:plane:'
+ SwiftName: makeTexture(descriptor:iosurface:plane:)
+ MethodKind: Instance
+ NullabilityOfRet: N
+ - Selector: 'newHeapWithDescriptor:'
+ SwiftName: makeHeap(descriptor:)
+ MethodKind: Instance
+ NullabilityOfRet: N
+ - Selector: 'newFence'
+ SwiftName: makeFence()
+ MethodKind: Instance
+ NullabilityOfRet: N
+ - Selector: 'newSamplerStateWithDescriptor:'
+ SwiftName: makeSamplerState(descriptor:)
+ MethodKind: Instance
+ NullabilityOfRet: N
+ - Selector: 'newIndirectArgumentEncoderWithArguments:count:'
+ SwiftName: makeIndirectArgumentEncoder(arguments:count:)
+ MethodKind: Instance
+ NullabilityOfRet: N
+ - Selector: 'newArgumentEncoderWithArguments:count:'
+ SwiftName: makeArgumentEncoder(arguments:count:)
+ MethodKind: Instance
+ NullabilityOfRet: N
+ Properties:
+ - Name: name
+ Nullability: O
- Name: MTLComputeCommandEncoder
Methods:
- Selector: 'setBytes:length:atIndex:'
@@ -771,8 +895,26 @@
- Selector: 'setSamplerState:atIndex:'
SwiftName: setSamplerState(_:at:)
MethodKind: Instance
+ - Name: MTLArgumentEncoder
+ Methods:
+ - Selector: 'newArgumentEncoderForBufferAtIndex:'
+ SwiftName: makeArgumentEncoderForBuffer(atIndex:)
+ MethodKind: Instance
+ - Selector: 'setBuffer:offset:atIndex:'
+ SwiftName: setBuffer(_:offset:index:)
+ MethodKind: Instance
+ - Selector: 'setTexture:atIndex:'
+ SwiftName: setTexture(_:index:)
+ MethodKind: Instance
+ - Selector: 'setSamplerState:atIndex:'
+ SwiftName: setSamplerState(_:index:)
+ MethodKind: Instance
- Name: MTLParallelRenderCommandEncoder
Methods:
+ - Selector: 'renderCommandEncoder'
+ SwiftName: makeRenderCommandEncoder()
+ MethodKind: Instance
+ NullabilityOfRet: N
- Selector: 'setColorStoreAction:atIndex:'
SwiftName: setColorStoreAction(_:at:)
MethodKind: Instance
@@ -852,4 +994,14 @@
- Selector: 'setThreadgroupMemoryLength:offset:atIndex:'
SwiftName: setThreadgroupMemoryLength(_:offset:at:)
MethodKind: Instance
+ - Name: MTLTexture
+ Methods:
+ - Selector: 'newTextureViewWithPixelFormat:'
+ SwiftName: makeTextureView(pixelFormat:)
+ MethodKind: Instance
+ NullabilityOfRet: N
+ - Selector: 'newTextureViewWithPixelFormat:textureType:levels:slices:'
+ SwiftName: makeTextureView(pixelFormat:textureType:levels:slices:)
+ MethodKind: Instance
+ NullabilityOfRet: N
diff -ruN /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h
--- /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h 2017-05-23 18:40:05.000000000 -0400
+++ /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h 2017-06-10 19:41:51.000000000 -0400
@@ -26,6 +26,6 @@
#import <Metal/MTLSampler.h>
#import <Metal/MTLTexture.h>
#import <Metal/MTLHeap.h>
-#import <Metal/MTLIndirectArgumentEncoder.h>
+#import <Metal/MTLArgumentEncoder.h>
#import <Metal/MTLCaptureManager.h>
#import <Metal/MTLCaptureScope.h>