Skip to content

Metal macOS xcode9 beta1

Vincent Dondain edited this page Jun 5, 2017 · 2 revisions

#Metal.framework

diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h	2016-09-19 19:04:11.000000000 -0400
+++ /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
@@ -9,6 +9,7 @@
 #import <Metal/MTLDefines.h>
 #import <Metal/MTLTexture.h>
 
+
 NS_ASSUME_NONNULL_BEGIN
 typedef NS_ENUM(NSUInteger, MTLDataType){
     
@@ -85,8 +86,17 @@
     MTLDataTypeBool2 = 54,
     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,
+    MTLDataTypePointer NS_ENUM_AVAILABLE(10_13, 11_0) = 60,
+
 } NS_ENUM_AVAILABLE(10_11, 8_0);
 
+@class MTLArgument;
+
 /*!
  @enum MTLArgumentType
  @abstract The type for an input to a MTLRenderPipelineState or a MTLComputePipelineState
@@ -109,6 +119,7 @@
     MTLArgumentTypeThreadgroupMemory= 1,
     MTLArgumentTypeTexture = 2,
     MTLArgumentTypeSampler = 3,
+    MTLArgumentTypeIndirectConstant = 4, // Deprecated
     
 } NS_ENUM_AVAILABLE(10_11, 8_0);
 
@@ -126,36 +137,72 @@
 @class MTLStructType;
 @class MTLArrayType;
 
+NS_CLASS_AVAILABLE(10_13, 11_0)
+@interface MTLType : NSObject
+@property (readonly) MTLDataType dataType;
+@end
+
 NS_CLASS_AVAILABLE(10_11, 8_0)
 @interface MTLStructMember : NSObject
  
 @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);
+
+
 @end
  
 NS_CLASS_AVAILABLE(10_11, 8_0)
-@interface MTLStructType  : NSObject
+@interface MTLStructType  : MTLType
 
 @property (readonly) NSArray <MTLStructMember *> *members;
 
 - (nullable MTLStructMember *)memberByName:(NSString *)name;
+
 @end
- 
+
 NS_CLASS_AVAILABLE(10_11, 8_0)
-@interface MTLArrayType  : NSObject
- 
-@property (readonly) NSUInteger arrayLength;
- 
+@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;
- 
+
 - (nullable MTLStructType *)elementStructType;
 - (nullable MTLArrayType *)elementArrayType;
+
+
+@end
+
+NS_CLASS_AVAILABLE(10_13, 11_0)
+@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);
+
+@end
+
+NS_CLASS_AVAILABLE(10_13, 11_0)
+@interface MTLTextureReferenceType : MTLType
+
+@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) BOOL isDepthTexture;         // true for depth textures
+
+
 @end
 
 /*!
@@ -169,6 +216,8 @@
 @property (readonly) MTLArgumentAccess access;
 @property (readonly) NSUInteger index;
 
+@property (readonly) MTLType       *dataTypeDescription NS_AVAILABLE(10_13, 11_0);
+
 @property (readonly, getter=isActive) BOOL active;
 
 // for buffer arguments
@@ -177,6 +226,7 @@
 @property (readonly) MTLDataType    bufferDataType; 		// MTLDataTypeFloat, MTLDataTypeFloat4, MTLDataTypeStruct, ...
 @property (readonly) MTLStructType *bufferStructType;
 
+
 // for threadgroup memory arguments
 @property (readonly) NSUInteger     threadgroupMemoryAlignment;
 @property (readonly) NSUInteger     threadgroupMemoryDataSize; // sizeof(T) for T *argName
@@ -184,8 +234,9 @@
 // for texture arguments
 @property (readonly) MTLTextureType textureType; // texture1D, texture2D...
 @property (readonly) MTLDataType    textureDataType; // half, float, int, or uint.
-
 @property (readonly) BOOL           isDepthTexture NS_AVAILABLE(10_12, 10_0); // true for depth textures
+@property (readonly) NSUInteger     arrayLength NS_AVAILABLE(10_13, 10_0);
 
 @end
+
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h	2016-08-01 21:54:08.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h	2017-05-22 00:22:13.000000000 -0400
@@ -7,6 +7,7 @@
 
 #import <Foundation/Foundation.h>
 #import <Metal/MTLDefines.h>
+#import <Metal/MTLTypes.h>
 #import <Metal/MTLCommandEncoder.h>
 #import <Metal/MTLBuffer.h>
 #import <Metal/MTLTexture.h>
@@ -112,7 +113,7 @@
  @discussion The event is updated at kernel submission to maintain global order and prevent deadlock.
  Drivers may delay fence updates until the end of the encoder. Drivers may also wait on fences at the beginning of an encoder. It is therefore illegal to wait on a fence after it has been updated in the same encoder.
  */
-- (void)updateFence:(id <MTLFence>)fence NS_AVAILABLE(NA, 10_0);
+- (void)updateFence:(id <MTLFence>)fence NS_AVAILABLE(10_13, 10_0);
 
 /*!
  @method waitForFence:
@@ -120,7 +121,7 @@
  @discussion The event is evaluated at kernel submision to maintain global order and prevent deadlock.
  Drivers may delay fence updates until the end of the encoder. Drivers may also wait on fences at the beginning of an encoder. It is therefore illegal to wait on a fence after it has been updated in the same encoder.
  */
-- (void)waitForFence:(id <MTLFence>)fence NS_AVAILABLE(NA, 10_0);
+- (void)waitForFence:(id <MTLFence>)fence NS_AVAILABLE(10_13, 10_0);
 
 @end
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h	2016-09-19 19:04:12.000000000 -0400
+++ /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
@@ -22,7 +22,8 @@
 
 /*!
  @protocol MTLBuffer
- @abstract A typeless allocation accessible by both the CPU and the GPU (MTLDevice).
+ @abstract A typeless allocation accessible by both the CPU and the GPU (MTLDevice) or by only the GPU when the storage mode is
+ MTLResourceStorageModePrivate.
  
  @discussion
  Unlike in OpenGL and OpenCL, access to buffers is not synchronized.  The caller may use the CPU to modify the data at any time
@@ -64,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_IOS(8_0);
+- (id <MTLTexture>)newTextureWithDescriptor:(MTLTextureDescriptor*)descriptor offset:(NSUInteger)offset bytesPerRow:(NSUInteger)bytesPerRow NS_AVAILABLE(10_13, 8_0);
 
 /*!
  @method addDebugMarker:range:
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureManager.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureManager.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureManager.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureManager.h	2017-05-23 18:40:04.000000000 -0400
@@ -0,0 +1,60 @@
+//
+//  MTLCaptureManager.h
+//  Metal
+//
+//  Copyright © 2017 Apple, Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <Metal/MTLDefines.h>
+
+
+NS_ASSUME_NONNULL_BEGIN
+
+@protocol MTLCaptureScope;
+@protocol MTLCommandQueue;
+@protocol MTLDevice;
+
+NS_CLASS_AVAILABLE(10_13, 11_0)
+MTL_EXPORT
+@interface MTLCaptureManager : NSObject
+{
+    BOOL _isCapturing;
+    id<MTLCaptureScope> _defaultCaptureScope;
+}
+
+/** Retrieves the shared capture manager for this process. There is only one capture manager per process.
+    The capture manager allows the user to create capture scopes and trigger captures from code.
+    When a capture has been completed, it will be displayed in Xcode and the application will be paused.
+    @remarks: only MTLCommandBuffers created after starting a capture and committed before stopping it are captured. 
+ */
++ (MTLCaptureManager*)sharedCaptureManager;
+
+// Use +[sharedCaptureManager]
+- (instancetype)init NS_UNAVAILABLE;
+
+// Creates a new capture scope for the given capture device
+- (id<MTLCaptureScope>)newCaptureScopeWithDevice:(id<MTLDevice>)device;
+// Creates a new capture scope for the given command queue
+- (id<MTLCaptureScope>)newCaptureScopeWithCommandQueue:(id<MTLCommandQueue>)commandQueue;
+
+// Starts capturing, for all queues of the given device, new MTLCommandBuffer's until -[stopCapture] or Xcode’s stop capture button is pressed
+- (void)startCaptureWithDevice:(id<MTLDevice>)device;
+// Starts capturing, for the given command queue, command buffers that are created after invoking this method and committed before invoking -[stopCapture] or clicking Xcode’s stop capture button.
+- (void)startCaptureWithCommandQueue:(id<MTLCommandQueue>)commandQueue;
+// Start a capture with the given scope: from the scope's begin until its end (or Xcode’s stop capture button is pressed), restricting the capture to the scope's device(s) and, if selected, the scope's command queue
+- (void)startCaptureWithScope:(id<MTLCaptureScope>)captureScope;
+
+// Stops a capture started from startCaptureWithDevice:/startCaptureWithCommandQueue:/startCaptureWithScope: or from Xcode’s capture button
+- (void)stopCapture;
+
+// Default scope to be captured when a capture is initiated from Xcode’s capture button. When nil, it’ll fall back to presentDrawable:, presentDrawable:atTime:, presentDrawable:afterMinimumDuration: in MTLCommandBuffer or present:, present:atTime:, present:afterMinimumDuration: in MTLDrawable.
+@property (nullable, readwrite, strong, atomic) id<MTLCaptureScope> defaultCaptureScope;
+
+// Query if a capture is currently in progress
+@property (readonly) BOOL isCapturing;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureScope.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureScope.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureScope.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureScope.h	2017-05-23 18:40:04.000000000 -0400
@@ -0,0 +1,41 @@
+//
+//  MTLCaptureScope.h
+//  Metal
+//
+//  Copyright © 2017 Apple, Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <Metal/MTLDefines.h>
+
+
+NS_ASSUME_NONNULL_BEGIN
+
+@protocol MTLDevice;
+@protocol MTLCommandQueue;
+
+NS_AVAILABLE(10_13, 11_0)
+@protocol MTLCaptureScope <NSObject>
+
+// Remarks: only MTLCommandBuffers created after -[beginScope] and committed before -[endScope] are captured.
+
+// Marks the begin of the capture scope. Note: This method should be invoked repeatedly per frame.
+- (void)beginScope;
+// Marks the end of the capture scope. Note: This method should be invoked repeatedly per frame.
+- (void)endScope;
+
+/** Scope label
+    @remarks Created capture scopes are listed in Xcode when long-pressing the capture button, performing the capture over the selected scope
+  */
+@property (nullable, copy, atomic) NSString *label;
+
+// Associated device: this scope will capture Metal commands from the associated device
+@property (nonnull, readonly, nonatomic)  id<MTLDevice> device;
+/** If set, this scope will only capture Metal commands from the associated command queue. Defaults to nil (all command queues from the associated device are captured).
+ */
+@property (nullable, readonly, nonatomic) id<MTLCommandQueue> commandQueue;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h	2017-02-28 01:13:15.000000000 -0500
+++ /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
@@ -71,7 +71,9 @@
  @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)
 {
     MTLCommandBufferErrorNone = 0,
@@ -82,7 +84,8 @@
     MTLCommandBufferErrorNotPermitted = 7,
     MTLCommandBufferErrorOutOfMemory = 8,
     MTLCommandBufferErrorInvalidResource = 9,
-    MTLCommandBufferErrorMemoryless NS_AVAILABLE_IOS(10_0) = 10 ,
+    MTLCommandBufferErrorMemoryless NS_AVAILABLE_IOS(10_0) = 10,
+    MTLCommandBufferErrorDeviceRemoved NS_AVAILABLE_MAC(10_13) = 11,
 } NS_ENUM_AVAILABLE(10_11, 8_0);
 
 typedef void (^MTLCommandBufferHandler)(id <MTLCommandBuffer>);
@@ -153,13 +156,15 @@
 /*!
  @method presentDrawable:
  @abstract Add a drawable present that will be invoked when this command buffer has been scheduled for execution.
+ @discussion The submission thread will be lock stepped with present call been serviced by window server
  */
 - (void)presentDrawable:(id <MTLDrawable>)drawable;
 
 /*!
  @method presentDrawable:atTime:
  @abstract Add a drawable present for a specific host time that will be invoked when this command buffer has been scheduled for execution.
- */
+ @discussion The submission thread will be lock stepped with present call been serviced by window server
+*/
 - (void)presentDrawable:(id <MTLDrawable>)drawable atTime:(CFTimeInterval)presentationTime;
 
 
@@ -211,12 +216,25 @@
  */
 - (id <MTLComputeCommandEncoder>)computeCommandEncoder;
 
-
 /*!
  @method parallelRenderCommandEncoderWithDescriptor:
  @abstract returns a parallel render pass encoder to encode into this command buffer.
  */
 - (id <MTLParallelRenderCommandEncoder>)parallelRenderCommandEncoderWithDescriptor:(MTLRenderPassDescriptor *)renderPassDescriptor;
 
+
+/*!
+ @method pushDebugGroup:
+ @abstract Push a new named string onto a stack of string labels.
+ */
+- (void)pushDebugGroup:(NSString *)string NS_AVAILABLE(10_13, 11_0);
+
+/*!
+ @method popDebugGroup
+ @abstract Pop the latest named string off of the stack.
+ */
+- (void)popDebugGroup NS_AVAILABLE(10_13, 11_0);
+
+
 @end
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h	2016-09-19 19:04:12.000000000 -0400
+++ /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
@@ -12,6 +12,16 @@
 @protocol MTLDevice;
 
 /*!
+ * @brief Describes how a resource will be used by a shader through an indirect argument buffer
+ */
+typedef NS_OPTIONS(NSUInteger, MTLResourceUsage)
+{
+	MTLResourceUsageRead   = 1 << 0,
+	MTLResourceUsageWrite  = 1 << 1,
+	MTLResourceUsageSample = 1 << 2
+} NS_ENUM_AVAILABLE(10_13, 11_0);
+
+/*!
  @protocol MTLCommandEncoder
  @abstract MTLCommandEncoder is the common interface for objects that write commands into MTLCommandBuffers.
  */
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLCommandQueue.h	2016-09-19 19:04:13.000000000 -0400
+++ /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
@@ -43,7 +43,7 @@
  @method insertDebugCaptureBoundary
  @abstract Inform Xcode about when debug capture should start and stop.
  */
-- (void)insertDebugCaptureBoundary;
+- (void)insertDebugCaptureBoundary NS_DEPRECATED(10_11, 10_13, 8_0, 11_0, "Use MTLCaptureScope instead");
 
 @end
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h	2016-08-01 21:54:08.000000000 -0400
+++ /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
@@ -24,7 +24,6 @@
     uint32_t threadgroupsPerGrid[3];
 } MTLDispatchThreadgroupsIndirectArguments;
 
-
 /*!
  @protocol MTLComputeCommandEncoder
  @abstract A command encoder that writes data parallel compute commands.
@@ -60,7 +59,7 @@
  @method setBuffers:offsets:withRange:
  @brief Set an array of global buffers for all compute kernels with the given bind point range.
  */
-- (void)setBuffers:(const id <MTLBuffer> __nullable [])buffers offsets:(const NSUInteger [])offsets withRange:(NSRange)range;
+- (void)setBuffers:(const id <MTLBuffer> __nullable [__nullable])buffers offsets:(const NSUInteger [__nonnull])offsets withRange:(NSRange)range;
 
 /*!
  @method setTexture:atIndex:
@@ -122,6 +121,11 @@
  */
 - (void)dispatchThreadgroupsWithIndirectBuffer:(id <MTLBuffer>)indirectBuffer indirectBufferOffset:(NSUInteger)indirectBufferOffset threadsPerThreadgroup:(MTLSize)threadsPerThreadgroup NS_AVAILABLE(10_11, 9_0);
 
+/*
+ @method dispatchThreads:threadsPerThreadgroup:
+ @abstract Enqueue a compute function dispatch.
+ */
+- (void)dispatchThreads:(MTLSize)threadsPerGrid threadsPerThreadgroup:(MTLSize)threadsPerThreadgroup NS_AVAILABLE(10_13, 11_0);
 
 /*!
  @method updateFence:
@@ -129,7 +133,7 @@
  @discussion The event is updated at kernel submission to maintain global order and prevent deadlock.
  Drivers may delay fence updates until the end of the encoder. Drivers may also wait on fences at the beginning of an encoder. It is therefore illegal to wait on a fence after it has been updated in the same encoder.
  */
-- (void)updateFence:(id <MTLFence>)fence NS_AVAILABLE(NA, 10_0);
+- (void)updateFence:(id <MTLFence>)fence NS_AVAILABLE(10_13, 10_0);
 
 /*!
  @method waitForFence:
@@ -137,7 +141,38 @@
  @discussion The event is evaluated at kernel submision to maintain global order and prevent deadlock.
  Drivers may delay fence updates until the end of the encoder. Drivers may also wait on fences at the beginning of an encoder. It is therefore illegal to wait on a fence after it has been updated in the same encoder.
  */
-- (void)waitForFence:(id <MTLFence>)fence NS_AVAILABLE(NA, 10_0);
+- (void)waitForFence:(id <MTLFence>)fence NS_AVAILABLE(10_13, 10_0);
+
+
+/*!
+ * @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.
+ */
+- (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.
+ */
+- (void)useResources:(const id <MTLResource> __nullable[__nullable])resources count:(NSUInteger)count usage:(MTLResourceUsage)usage NS_AVAILABLE(10_13, 11_0);
+
+// TODO: useSamplerState?
+
+/*!
+ * @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.
+ */
+- (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.
+ */
+- (void)useHeaps:(const id <MTLHeap> __nullable[__nullable])heaps count:(NSUInteger)count NS_AVAILABLE(10_13, 11_0);
 
 @end
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h	2016-09-19 19:04:13.000000000 -0400
+++ /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
@@ -9,8 +9,9 @@
 #import <Metal/MTLDevice.h>
 #import <Metal/MTLArgument.h>
 #import <Metal/MTLStageInputOutputDescriptor.h>
-
+#import <Metal/MTLPipeline.h>
 NS_ASSUME_NONNULL_BEGIN
+
 NS_CLASS_AVAILABLE(10_11, 8_0)
 @interface MTLComputePipelineReflection : NSObject
 
@@ -47,6 +48,8 @@
  */
 @property (nullable, copy, nonatomic) MTLStageInputOutputDescriptor *stageInputDescriptor NS_AVAILABLE(10_12, 10_0);
 
+@property (readonly) MTLPipelineBufferDescriptorArray *buffers NS_AVAILABLE(10_13, 11_0);
+
 /*!
  @method reset
  @abstract Restore all compute pipeline descriptor properties to their default values.
@@ -63,6 +66,8 @@
 NS_AVAILABLE(10_11, 8_0)
 @protocol MTLComputePipelineState <NSObject>
 
+@property (nullable, readonly) NSString *label NS_AVAILABLE(10_13, 11_0);
+
 /*!
  @property device
  @abstract The device this resource was created against.  This resource can only be used with this device.
@@ -81,5 +86,12 @@
  */
 @property (readonly) NSUInteger threadExecutionWidth;
 
+
+@optional
+@property (readonly) NSUInteger staticThreadgroupMemoryLength NS_AVAILABLE_MAC(10_13);
+@required
+
+
 @end
+
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDefines.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDefines.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDefines.h	2016-09-19 19:04:14.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDefines.h	2017-05-23 18:40:04.000000000 -0400
@@ -36,4 +36,3 @@
 # endif
 #endif
 
-
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDepthStencil.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDepthStencil.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDepthStencil.h	2016-09-19 19:04:14.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDepthStencil.h	2017-05-23 18:40:04.000000000 -0400
@@ -8,6 +8,7 @@
 #import <Metal/MTLDefines.h>
 #import <Metal/MTLDevice.h>
 
+
 NS_ASSUME_NONNULL_BEGIN
 typedef NS_ENUM(NSUInteger, MTLCompareFunction) {
     MTLCompareFunctionNever = 0,
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h	2016-09-19 19:04:14.000000000 -0400
+++ /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
@@ -6,14 +6,18 @@
 //
 
 #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;
@@ -27,6 +31,7 @@
 @protocol MTLComputePipelineState;
 @protocol MTLHeap;
 @protocol MTLFence;
+@protocol MTLIndirectArgumentEncoder;
 
 @class MTLSamplerDescriptor;
 @class MTLRenderPipelineColorAttachmentDescriptor;
@@ -41,7 +46,6 @@
 @class MTLCommandQueueDescriptor;
 @class MTLHeapDescriptor;
 
-
 /*!
  @brief Returns a reference to the preferred system default Metal device.
  @discussion On Mac OS X systems that support automatic graphics switching, calling
@@ -59,6 +63,49 @@
 */
 MTL_EXTERN NSArray <id<MTLDevice>> *MTLCopyAllDevices(void) NS_AVAILABLE_MAC(10_11) NS_RETURNS_RETAINED;
 
+/*!
+ @brief Type for device notifications
+*/
+typedef NSString *MTLNotificationName NS_EXTENSIBLE_STRING_ENUM NS_AVAILABLE_MAC(10_13);
+
+/*!
+ @brief Block signature for device notifications
+*/
+typedef void (^MTLDeviceNotificationHandler)(id <MTLDevice> device, MTLNotificationName notifyName);
+
+/*!
+ @brief This notification is posted when a new Metal device is added to the system
+*/
+MTL_EXTERN MTLNotificationName const MTLDeviceWasAddedNotification NS_AVAILABLE_MAC(10_13);
+
+/*!
+ @brief This notification is posted when the user has requested that applications cease using a particular device.  Applications
+ should assume that the device will be removed (terminated) imminently.  Additionally, the device will be removed from the internal
+ device array prior to this notification being posted.  Applications should immediately begin the process of releasing all resources
+ created on the given device, as well as any references to the device itself.
+*/
+MTL_EXTERN MTLNotificationName const MTLDeviceRemovalRequestedNotification NS_AVAILABLE_MAC(10_13);
+
+/*!
+ @brief This notification is posted once the device has been removed.  Applications must expect that any attempt to use
+ the device at this point will fail.  This includes creating new device specific objects of any kind.   Also, this notification
+ may be posted without a prior MTLDeviceRemovalRequestedNotification notification in the case of unexpected removal.
+*/
+MTL_EXTERN MTLNotificationName const MTLDeviceWasRemovedNotification NS_AVAILABLE_MAC(10_13);
+
+/*!
+ @brief Returns an NSArray of the current set of available Metal devices and installs a notification handler
+ 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;
+
+/*!
+ @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,
@@ -72,19 +119,28 @@
     MTLFeatureSet_iOS_GPUFamily2_v3 NS_ENUM_AVAILABLE_IOS(10_0) __TVOS_UNAVAILABLE = 6,
     MTLFeatureSet_iOS_GPUFamily3_v2 NS_ENUM_AVAILABLE_IOS(10_0) __TVOS_UNAVAILABLE = 7,
 
-    MTLFeatureSet_OSX_GPUFamily1_v1 NS_ENUM_AVAILABLE_MAC(10_11) = 10000,
+    MTLFeatureSet_iOS_GPUFamily1_v4 NS_ENUM_AVAILABLE_IOS(11_0) __TVOS_UNAVAILABLE = 8,
+    MTLFeatureSet_iOS_GPUFamily2_v4 NS_ENUM_AVAILABLE_IOS(11_0) __TVOS_UNAVAILABLE = 9,
+    MTLFeatureSet_iOS_GPUFamily3_v3 NS_ENUM_AVAILABLE_IOS(11_0) __TVOS_UNAVAILABLE = 10,
+
+    MTLFeatureSet_macOS_GPUFamily1_v1 NS_ENUM_AVAILABLE_MAC(10_11) = 10000,
+    MTLFeatureSet_OSX_GPUFamily1_v1 NS_ENUM_AVAILABLE_MAC(10_11) = MTLFeatureSet_macOS_GPUFamily1_v1, // deprecated
 
-    MTLFeatureSet_OSX_GPUFamily1_v2 NS_ENUM_AVAILABLE_MAC(10_12) = 10001,
-    MTLFeatureSet_OSX_ReadWriteTextureTier2 NS_ENUM_AVAILABLE_MAC(10_12) = 10002,
+    MTLFeatureSet_macOS_GPUFamily1_v2 NS_ENUM_AVAILABLE_MAC(10_12) = 10001,
+    MTLFeatureSet_OSX_GPUFamily1_v2 NS_ENUM_AVAILABLE_MAC(10_12) = MTLFeatureSet_macOS_GPUFamily1_v2, // deprecated
+    MTLFeatureSet_macOS_ReadWriteTextureTier2 NS_ENUM_AVAILABLE_MAC(10_12) = 10002,
+    MTLFeatureSet_OSX_ReadWriteTextureTier2 NS_ENUM_AVAILABLE_MAC(10_12) = MTLFeatureSet_macOS_ReadWriteTextureTier2, // deprecated
 
+    MTLFeatureSet_macOS_GPUFamily1_v3 NS_ENUM_AVAILABLE_MAC(10_13) = 10003,
 
-    MTLFeatureSet_tvOS_GPUFamily1_v1 __TVOS_AVAILABLE(9.0) __IOS_UNAVAILABLE __OSX_UNAVAILABLE = 30000,
 
-    MTLFeatureSet_tvOS_GPUFamily1_v2 __TVOS_AVAILABLE(10.0) __IOS_UNAVAILABLE __OSX_UNAVAILABLE = 30001,
-} NS_ENUM_AVAILABLE(10_11, 8_0) __TVOS_AVAILABLE(9.0);
+    MTLFeatureSet_tvOS_GPUFamily1_v1 __TVOS_AVAILABLE(9_0) __IOS_UNAVAILABLE __OSX_UNAVAILABLE = 30000,
+    MTLFeatureSet_TVOS_GPUFamily1_v1 __TVOS_AVAILABLE(9_0) __IOS_UNAVAILABLE __OSX_UNAVAILABLE = MTLFeatureSet_tvOS_GPUFamily1_v1, // deprecated
 
+    MTLFeatureSet_tvOS_GPUFamily1_v2 __TVOS_AVAILABLE(10_0) __IOS_UNAVAILABLE __OSX_UNAVAILABLE = 30001,
 
-#define MTLFeatureSet_TVOS_GPUFamily1_v1 MTLFeatureSet_tvOS_GPUFamily1_v1
+    MTLFeatureSet_tvOS_GPUFamily1_v3 __TVOS_AVAILABLE(11_0) __IOS_UNAVAILABLE __OSX_UNAVAILABLE = 30002,
+} NS_ENUM_AVAILABLE(10_11, 8_0) __TVOS_AVAILABLE(9_0);
 
 /*!
  @enum MTLPipelineOption
@@ -98,6 +154,26 @@
 } NS_ENUM_AVAILABLE(10_11, 8_0);
 
 /*!
+ @enum MTLReadWriteTextureTier
+ @abstract MTLReadWriteTextureTier determines support level for read-write texture formats.
+ */
+typedef NS_ENUM(NSUInteger, MTLReadWriteTextureTier)
+{
+    MTLReadWriteTextureTier1 = 0,
+    MTLReadWriteTextureTier2 = 1,
+} NS_ENUM_AVAILABLE_MAC(10_13);
+
+/*!
+ @enum MTLIndirectArgumentBuffersTier
+ @abstract MTLIndirectArgumentBuffersTier determines support level for Indirect Argument Buffers format.
+ */
+typedef NS_ENUM(NSUInteger, MTLIndirectArgumentBuffersTier)
+{
+    MTLIndirectArgumentBuffersTier1 = 0,
+    MTLIndirectArgumentBuffersTier2 = 1,
+} NS_ENUM_AVAILABLE_MAC(10_13);
+
+/*!
  @abstract Represent a memory size and alignment in bytes.
  */
 typedef struct {
@@ -118,11 +194,58 @@
 typedef void (^MTLNewComputePipelineStateWithReflectionCompletionHandler)(id <MTLComputePipelineState> __nullable computePipelineState, MTLComputePipelineReflection * __nullable reflection, NSError * __nullable error);
 
 /*!
+ * @class MTLIndirectArgumentDescriptor
+ * @abstract Represents an indirect shader argument
+ */
+NS_CLASS_AVAILABLE(10_13, 11_0)
+@interface MTLIndirectArgumentDescriptor : NSObject <NSCopying>
+
+/*!
+ * @method indirectArgumentDescriptor
+ * @abstract Create an autoreleased default indirect argument descriptor
+ */
++ (MTLIndirectArgumentDescriptor *)indirectArgumentDescriptor;
+
+/*!
+ * @property dataType
+ * @abstract For constants, the data type. Otherwise, MTLDataTypeTexture, MTLDataTypeSampler, or
+ * MTLDataTypePointer.
+ */
+@property (nonatomic) MTLDataType dataType;
+
+/*!
+ * @property index
+ * @abstract The binding point index of the argument
+ */
+@property (nonatomic) NSUInteger index;
+
+/*!
+ * @property arrayLength
+ * @abstract The length of an array of constants, textures, or samplers, or 0 for non-array arguments
+ */
+@property (nonatomic) NSUInteger arrayLength;
+
+/*!
+ * @property access
+ * @abstract Access flags for the argument
+ */
+@property (nonatomic) MTLArgumentAccess access;
+
+/*!
+ * @property textureType
+ * @abstract For texture arguments, the texture type
+ */
+@property (nonatomic) MTLTextureType textureType;
+
+@end
+
+/*!
  @protocol MTLDevice
  @abstract MTLDevice represents a processor capable of data parallel computations
  */
 NS_AVAILABLE(10_11, 8_0)
 @protocol MTLDevice <NSObject>
+
 /*!
  @property name
  @abstract The full name of the vendor device.
@@ -148,6 +271,14 @@
 @property (readonly, getter=isHeadless) BOOL headless NS_AVAILABLE_MAC(10_11);
 
 /*!
+ @property removable
+ @abstract If this GPU is removable, this property will return YES.  
+ @discussion If a GPU is is removed without warning, APIs may fail even with good input, even before a notification can get posted informing
+ the application that the device has been removed.
+ */
+@property (readonly, getter=isRemovable) BOOL removable NS_AVAILABLE_MAC(10_13);
+
+/*!
  @property recommendedMaxWorkingSetSize
  @abstract Returns an approximation of how much memory this device can use with good performance.
  @discussion Performance may be improved by keeping the total size of all resources (texture and buffers)
@@ -161,6 +292,29 @@
  */
 @property (readonly, getter=isDepth24Stencil8PixelFormatSupported) BOOL depth24Stencil8PixelFormatSupported NS_AVAILABLE_MAC(10_11);
 
+@optional
+/*!
+ @property readWriteTextureSupport
+ @abstract Query support tier for read-write texture formats.
+ @return MTLReadWriteTextureTier enum value.
+ */
+@property (readonly) MTLReadWriteTextureTier readWriteTextureSupport NS_AVAILABLE_MAC(10_13);
+
+/*!
+ @property indirectArgumentBuffersSupport
+ @abstract Query support tier for Indirect Argument Buffers.
+ @return MTLIndirectArgumentBuffersTier enum value.
+ */
+@property (readonly) MTLIndirectArgumentBuffersTier indirectArgumentBuffersSupport NS_AVAILABLE_MAC(10_13);
+
+/*!
+ @property rasterOrderGroupsSupported
+ @abstract Query device for raster order groups support.
+ @return BOOL value. If YES, the device supports raster order groups. If NO, the device does not.
+ */
+@property (readonly, getter=areRasterOrderGroupsSupported) BOOL rasterOrderGroupsSupported NS_AVAILABLE(10_13, 11_0);
+@required
+
 /*!
  @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.
@@ -180,20 +334,20 @@
  @abstract Determine the byte size of textures when sub-allocated from a heap.
  @discussion This method can be used to help determine the required heap size.
  */
-- (MTLSizeAndAlign)heapTextureSizeAndAlignWithDescriptor:(MTLTextureDescriptor *)desc NS_AVAILABLE(NA, 10_0);
+- (MTLSizeAndAlign)heapTextureSizeAndAlignWithDescriptor:(MTLTextureDescriptor *)desc NS_AVAILABLE(10_13, 10_0);
 
 /*!
  @method heapBufferSizeAndAlignWithLength:options:
  @abstract Determine the byte size of buffers when sub-allocated from a heap.
  @discussion This method can be used to help determine the required heap size.
  */
-- (MTLSizeAndAlign)heapBufferSizeAndAlignWithLength:(NSUInteger)length options:(MTLResourceOptions)options NS_AVAILABLE(NA, 10_0);
+- (MTLSizeAndAlign)heapBufferSizeAndAlignWithLength:(NSUInteger)length options:(MTLResourceOptions)options NS_AVAILABLE(10_13, 10_0);
 
 /*!
  @method newHeapWithDescriptor:
  @abstract Create a new heap with the given descriptor.
  */
-- (id <MTLHeap>)newHeapWithDescriptor:(MTLHeapDescriptor *)descriptor NS_AVAILABLE(NA, 10_0);
+- (id <MTLHeap>)newHeapWithDescriptor:(MTLHeapDescriptor *)descriptor NS_AVAILABLE(10_13, 10_0);
 
 /*!
  @method newBufferWithLength:options:
@@ -233,7 +387,7 @@
  @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_MAC(10_11);
+- (id <MTLTexture>)newTextureWithDescriptor:(MTLTextureDescriptor *)descriptor iosurface:(IOSurfaceRef)iosurface plane:(NSUInteger)plane NS_AVAILABLE(10_11, 11_0);
 
 /*!
  @method newSamplerStateWithDescriptor:
@@ -261,6 +415,13 @@
  */
 - (nullable id <MTLLibrary>)newLibraryWithFile:(NSString *)filepath error:(__autoreleasing NSError **)error;
 
+
+/*!
+ @method newLibraryWithURL:
+ @abstract Load a MTLLibrary from a metallib file.
+ */
+- (nullable id <MTLLibrary>)newLibraryWithURL:(NSURL *)url error:(__autoreleasing NSError **)error NS_AVAILABLE(10_13, 11_0);
+
 /*!
  @method newLibraryWithData:
  @abstract Load a MTLLibrary from a dispatch_data_t
@@ -346,7 +507,7 @@
  @method newFence
  @abstract Create a new MTLFence object
  */
-- (id <MTLFence>)newFence NS_AVAILABLE(NA, 10_0);
+- (id <MTLFence>)newFence NS_AVAILABLE(10_13, 10_0);
 
 /*!
  @method supportsFeatureSet:
@@ -361,5 +522,43 @@
  */
 - (BOOL)supportsTextureSampleCount:(NSUInteger)sampleCount NS_AVAILABLE(10_11, 9_0);
 
+/*!
+ @method minimumLinearTextureAlignmentForPixelFormat:
+ @abstract Returns the minimum alignment required for offset and rowBytes when creating a linear texture. An error is thrown for queries with invalid pixel formats (depth, stencil, or compressed formats).
+ */
+- (NSUInteger)minimumLinearTextureAlignmentForPixelFormat:(MTLPixelFormat)format NS_AVAILABLE(10_13, 10_0);
+
+
+
+@optional
+@property (readonly) NSUInteger maxThreadgroupMemoryLength NS_AVAILABLE_MAC(10_13);
+@required
+
+
+/*!
+ @property programmableSaplePositionsSupported
+ @abstract Query device for programmable sample position support.
+ @return BOOL value. If YES, the device supports programmable sample positions. If NO, the device does not.
+ */
+@property (readonly, getter=areProgrammableSamplePositionsSupported) BOOL programmableSamplePositionsSupported NS_AVAILABLE(10_13, 11_0);
+
+/*!
+ @method getDefaultSamplePositions:count:
+ @abstract Retrieve the default sample positions.
+ @param positions The destination array for default sample position data.
+ @param count Specifies the sample count for which to retrieve the default positions, the length of the positions array, and must be set to a valid sample count.
+ */
+- (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.
+ */
+- (id <MTLIndirectArgumentEncoder>)newIndirectArgumentEncoderWithArguments:(NSArray <MTLIndirectArgumentDescriptor *> *)arguments NS_AVAILABLE(10_13, 11_0);
+
+
+
 @end
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDrawable.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDrawable.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDrawable.h	2017-02-28 01:13:18.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLDrawable.h	2017-05-23 18:40:04.000000000 -0400
@@ -11,6 +11,12 @@
 NS_ASSUME_NONNULL_BEGIN
 @protocol MTLDrawable;
 
+/*!
+ @typedef MTLDrawablePresentedHandler
+ @abstract The presented callback function protocol
+ @disucssion Be careful when you use delta between this presentedTime and previous frame's presentedTime to animate next frame. If the frame was presented using presentAfterMinimumDuration or presentAtTime, the presentedTime might includes delays to meet your specified present time. If you want to measure how much frame you can achieve, use GPUStartTime in the first command buffer of your frame rendering and GPUEndTime of your last frame rendering to calculate the frame interval.
+*/
+typedef void (^MTLDrawablePresentedHandler)(id<MTLDrawable>);
 
 /*!
  @protocol MTLDrawable
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFence.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFence.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFence.h	2016-09-19 19:04:15.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFence.h	2017-05-23 18:40:04.000000000 -0400
@@ -9,7 +9,7 @@
 #import <Metal/MTLDefines.h>
 #import <Metal/MTLDevice.h>
 
-NS_AVAILABLE(NA, 10_0)
+NS_AVAILABLE(10_13, 10_0)
 @protocol MTLFence <NSObject>
 @property (nonnull, readonly) id <MTLDevice> device;
 
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionConstantValues.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionConstantValues.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionConstantValues.h	2016-09-19 19:04:15.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionConstantValues.h	2017-05-23 18:40:04.000000000 -0400
@@ -9,6 +9,7 @@
 #import <Metal/MTLDefines.h>
 #import <Metal/MTLArgument.h>
 
+
 NS_ASSUME_NONNULL_BEGIN
 
 NS_CLASS_AVAILABLE(10_12, 10_0)
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h	2016-09-19 19:04:16.000000000 -0400
+++ /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
@@ -17,7 +17,7 @@
 /*!
  @class MTLHeapDescriptor
  */
-NS_CLASS_AVAILABLE(NA, 10_0)
+NS_CLASS_AVAILABLE(10_13, 10_0)
 @interface MTLHeapDescriptor : NSObject <NSCopying>
 
 /*!
@@ -48,7 +48,7 @@
 /*!
  @protocol MTLHeap
  */
-NS_AVAILABLE(NA, 10_0)
+NS_AVAILABLE(10_13, 10_0)
 @protocol MTLHeap <NSObject>
 
 /*!
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectArgumentEncoder.h	1969-12-31 19:00:00.000000000 -0500
+++ /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
@@ -0,0 +1,102 @@
+//
+//  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/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h	2016-09-23 20:28:31.000000000 -0400
+++ /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
@@ -10,6 +10,7 @@
 #import <Metal/MTLResource.h>
 #import <Metal/MTLArgument.h>
 
+
 NS_ASSUME_NONNULL_BEGIN
 @protocol MTLDevice;
 @protocol MTLFunction;
@@ -17,6 +18,10 @@
 @class MTLCompileOptions;
 @class MTLFunctionConstantValues;
 
+@protocol MTLIndirectArgumentEncoder;
+
+typedef __autoreleasing MTLArgument *__nullable MTLAutoreleasedArgument;
+
 typedef NS_ENUM(NSUInteger, MTLPatchType) {
     MTLPatchTypeNone = 0,
     MTLPatchTypeTriangle = 1,
@@ -141,6 +146,19 @@
  */
 @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.
+ */
+- (id <MTLIndirectArgumentEncoder>)newIndirectArgumentEncoderWithBufferIndex:(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.
+ */
+- (id <MTLIndirectArgumentEncoder>)newIndirectArgumentEncoderWithBufferIndex:(NSUInteger)bufferIndex
+                                                                  reflection:(MTLAutoreleasedArgument * __nullable)reflection NS_AVAILABLE(10_13, 11_0);
+
 @end
 
 typedef NS_ENUM(NSUInteger, MTLLanguageVersion) {
@@ -148,9 +166,10 @@
     MTLLanguageVersion1_0 NS_ENUM_AVAILABLE(NA, 9_0) = (1 << 16),
     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)
 @interface MTLCompileOptions : NSObject <NSCopying>
 
@@ -199,19 +218,6 @@
     MTLLibraryErrorFileNotFound NS_AVAILABLE(10_12, 10_0) = 6,
 } NS_ENUM_AVAILABLE(10_11, 8_0);
 
-MTL_EXTERN NSString *const MTLRenderPipelineErrorDomain;
-
-/*!
- @enum MTLRenderPipelineError
- @abstract NSErrors raised when creating a pipeline or kernel.
- */
-typedef NS_ENUM(NSUInteger, MTLRenderPipelineError) {
-    MTLRenderPipelineErrorInternal          = 1,    
-    MTLRenderPipelineErrorUnsupported       = 2,
-    MTLRenderPipelineErrorInvalidInput      = 3,
-} NS_ENUM_AVAILABLE(10_11, 8_0);
-
-
 NS_AVAILABLE(10_11, 8_0)
 @protocol MTLLibrary <NSObject>
 
@@ -242,6 +248,7 @@
 - (nullable id <MTLFunction>) newFunctionWithName:(NSString *)name constantValues:(MTLFunctionConstantValues *)constantValues
 					error:(__autoreleasing NSError **)error NS_AVAILABLE(10_12, 10_0);
 
+
 /*!
  @method newFunctionWithName:constantValues:completionHandler:
  @abstract Returns a pointer to a function object obtained by applying the constant values to the named function.
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLParallelRenderCommandEncoder.h	2016-09-19 19:04:17.000000000 -0400
+++ /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
@@ -6,6 +6,7 @@
 //
 
 #import <Metal/MTLDefines.h>
+#import <Metal/MTLTypes.h>
 #import <Metal/MTLRenderPass.h>
 #import <Metal/MTLCommandEncoder.h>
 
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h	1969-12-31 19:00:00.000000000 -0500
+++ /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
@@ -0,0 +1,42 @@
+//
+//  MTLPipeline.h
+//  Metal
+//
+//  Copyright (c) 2017 Apple Inc. All rights reserved.
+//
+
+#import <Metal/MTLDevice.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ * @enum MTLMutability
+ * @abstract Specifies whether a buffer will be modified between the time it is bound and a compute
+ * or render pipeline is executed in a draw or dispatch.
+ */
+typedef NS_ENUM(NSUInteger, MTLMutability)
+{
+    MTLMutabilityDefault   = 0,
+    MTLMutabilityMutable   = 1,
+    MTLMutabilityImmutable = 2,
+} NS_ENUM_AVAILABLE(10_13, 11_0);
+
+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 */
+@property (nonatomic) MTLMutability mutability;
+
+@end
+
+NS_CLASS_AVAILABLE(10_13, 11_0)
+@interface MTLPipelineBufferDescriptorArray : NSObject
+/* Individual buffer descriptor access */
+- (MTLPipelineBufferDescriptor *)objectAtIndexedSubscript:(NSUInteger)bufferIndex;
+
+/* This always uses 'copy' semantics. It is safe to set the buffer descriptor at any legal index to nil, which resets that buffer descriptor to default vaules. */
+- (void)setObject:(nullable MTLPipelineBufferDescriptor *)buffer atIndexedSubscript:(NSUInteger)bufferIndex;
+
+@end
+
+NS_ASSUME_NONNULL_END
\ No newline at end of file
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h	2016-09-19 19:04:17.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h	2017-05-23 18:40:05.000000000 -0400
@@ -8,6 +8,7 @@
 #import <Foundation/Foundation.h>
 #import <Metal/MTLDefines.h>
 
+
 NS_ASSUME_NONNULL_BEGIN
 typedef NS_ENUM(NSUInteger, MTLPixelFormat)
 {
@@ -74,6 +75,8 @@
     MTLPixelFormatRG11B10Float = 92,
     MTLPixelFormatRGB9E5Float = 93,
 
+    MTLPixelFormatBGR10A2Unorm  NS_AVAILABLE(10_13, 11_0) = 94,
+
     MTLPixelFormatBGR10_XR      NS_AVAILABLE_IOS(10_0) = 554,
     MTLPixelFormatBGR10_XR_sRGB NS_AVAILABLE_IOS(10_0) = 555,
 
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h	2016-09-23 20:24:17.000000000 -0400
+++ /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
@@ -7,12 +7,14 @@
 
 #import <Foundation/Foundation.h>
 #import <Metal/MTLDefines.h>
+#import <Metal/MTLTypes.h>
 #import <Metal/MTLCommandEncoder.h>
 #import <Metal/MTLCommandBuffer.h>
 #import <Metal/MTLRenderPass.h>
 #import <Metal/MTLFence.h>
 #import <Metal/MTLStageInputOutputDescriptor.h>
 
+
 NS_ASSUME_NONNULL_BEGIN
 @protocol MTLDevice;
 @protocol MTLFunction;
@@ -81,6 +83,7 @@
     uint32_t baseInstance;
 } MTLDrawIndexedPrimitivesIndirectArguments;
 
+
 typedef struct {
     uint32_t patchCount;
     uint32_t instanceCount;
@@ -109,7 +112,7 @@
 {
     MTLRenderStageVertex   = (1UL << 0),
     MTLRenderStageFragment = (1UL << 1),
-} NS_ENUM_AVAILABLE_IOS(10_0);
+} NS_ENUM_AVAILABLE(10_13, 10_0);
 
 /*!
  @protocol MTLRenderCommandEncoder
@@ -148,7 +151,7 @@
  @method setVertexBuffers:offsets:withRange:
  @brief Set an array of global buffers for all vertex shaders with the given bind point range.
  */
-- (void)setVertexBuffers:(const id <MTLBuffer> __nullable [])buffers offsets:(const NSUInteger [])offsets withRange:(NSRange)range;
+- (void)setVertexBuffers:(const id <MTLBuffer> __nullable [__nullable])buffers offsets:(const NSUInteger [__nullable])offsets withRange:(NSRange)range;
 
 /*!
  @method setVertexTexture:atIndex:
@@ -193,11 +196,18 @@
 - (void)setViewport:(MTLViewport)viewport;
 
 /*!
+ @method setViewports:
+ @brief Specifies an array of viewports, which are used to transform vertices from normalized device coordinates to window coordinates based on [[ viewport_array_index ]] value specified in the vertex shader.
+ */
+- (void)setViewports:(const MTLViewport [__nonnull])viewports count:(NSUInteger)count NS_AVAILABLE(10_13, NA);
+
+/*!
  @method setFrontFacingWinding:
  @brief The winding order of front-facing primitives.
  */
 - (void)setFrontFacingWinding:(MTLWinding)frontFacingWinding;
 
+
 /*!
  @method setCullMode:
  @brief Controls if primitives are culled when front facing, back facing, or not culled at all.
@@ -208,7 +218,7 @@
 @method setDepthClipMode:
 @brief Controls what is done with fragments outside of the near or far planes.
 */
-- (void)setDepthClipMode:(MTLDepthClipMode)depthClipMode NS_AVAILABLE(10_11, NA);
+- (void)setDepthClipMode:(MTLDepthClipMode)depthClipMode NS_AVAILABLE(10_11, 11_0);
 
 /*!
  @method setDepthBias:slopeScale:clamp:
@@ -223,6 +233,12 @@
 - (void)setScissorRect:(MTLScissorRect)rect;
 
 /*!
+ @method setViewports:
+ @brief Specifies an array of rectangles for a fragment scissor test. The specific rectangle used is based on the [[ viewport_array_index ]] value output by the vertex shader. Fragments that lie outside the scissor rectangle are discarded.
+ */
+- (void)setScissorRects:(const MTLScissorRect [__nonnull])scissorRects count:(NSUInteger)count NS_AVAILABLE(10_13, NA);
+
+/*!
  @method setTriangleFillMode:
  @brief Set how to rasterize triangle and triangle strip primitives.
  */
@@ -252,7 +268,7 @@
  @method setFragmentBuffers:offsets:withRange:
  @brief Set an array of global buffers for all fragment shaders with the given bind point range.
  */
-- (void)setFragmentBuffers:(const id <MTLBuffer> __nullable [])buffers offsets:(const NSUInteger [])offset withRange:(NSRange)range;
+- (void)setFragmentBuffers:(const id <MTLBuffer> __nullable [__nullable])buffers offsets:(const NSUInteger [__nullable])offsets withRange:(NSRange)range;
 
 /*!
  @method setFragmentTexture:atIndex:
@@ -448,7 +464,7 @@
  @discussion Unlike <st>updateFence:</st>, this method will update the event when the given stage(s) complete, allowing for commands to overlap in execution.
  On iOS, render command encoder fence updates are always delayed until the end of the encoder.
  */
-- (void)updateFence:(id <MTLFence>)fence afterStages:(MTLRenderStages)stages NS_AVAILABLE_IOS(10_0);
+- (void)updateFence:(id <MTLFence>)fence afterStages:(MTLRenderStages)stages NS_AVAILABLE(10_13, 10_0);
 
 /*!
  @method waitForFence:beforeStages:
@@ -456,7 +472,7 @@
  @discussion Unlike <st>waitForFence:</st>, this method will only block commands assoicated with the given stage(s), allowing for commands to overlap in execution.
  On iOS, render command encoder fence waits always occur the beginning of the encoder.
  */
-- (void)waitForFence:(id <MTLFence>)fence beforeStages:(MTLRenderStages)stages NS_AVAILABLE_IOS(10_0);
+- (void)waitForFence:(id <MTLFence>)fence beforeStages:(MTLRenderStages)stages NS_AVAILABLE(10_13, 10_0);
 
 -(void)setTessellationFactorBuffer:(nullable id <MTLBuffer>)buffer offset:(NSUInteger)offset instanceStride:(NSUInteger)instanceStride NS_AVAILABLE(10_12, 10_0);
 
@@ -470,5 +486,37 @@
 
 -(void)drawIndexedPatches:(NSUInteger)numberOfPatchControlPoints patchIndexBuffer:(nullable id <MTLBuffer>)patchIndexBuffer patchIndexBufferOffset:(NSUInteger)patchIndexBufferOffset controlPointIndexBuffer:(id <MTLBuffer>)controlPointIndexBuffer controlPointIndexBufferOffset:(NSUInteger)controlPointIndexBufferOffset indirectBuffer:(id <MTLBuffer>)indirectBuffer indirectBufferOffset:(NSUInteger)indirectBufferOffset NS_AVAILABLE(10_12, NA);
 
+
+/*!
+ * @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.
+ */
+- (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?
+
+/*!
+ * @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.
+ */
+- (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.
+ */
+- (void)useHeaps:(const id <MTLHeap> __nullable[__nullable])heaps count:(NSUInteger)count NS_AVAILABLE(10_13, 11_0);
+
+
 @end
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h	2016-09-23 20:28:31.000000000 -0400
+++ /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
@@ -8,6 +8,11 @@
 #import <Foundation/Foundation.h>
 #import <Metal/MTLDefines.h>
 
+
+
+
+#import <Metal/MTLTypes.h>
+
 NS_ASSUME_NONNULL_BEGIN
 @protocol MTLDevice;
 
@@ -21,8 +26,9 @@
     MTLStoreActionDontCare = 0,
     MTLStoreActionStore = 1,
     MTLStoreActionMultisampleResolve = 2,
-    MTLStoreActionStoreAndMultisampleResolve NS_ENUM_AVAILABLE(10_12,10_0) = 3,
-    MTLStoreActionUnknown NS_ENUM_AVAILABLE(10_12,10_0) = 4,
+    MTLStoreActionStoreAndMultisampleResolve NS_ENUM_AVAILABLE(10_12, 10_0) = 3,
+    MTLStoreActionUnknown NS_ENUM_AVAILABLE(10_12, 10_0) = 4,
+    MTLStoreActionCustomSampleDepthStore NS_ENUM_AVAILABLE(10_13, 11_0) = 5,
 } NS_ENUM_AVAILABLE(10_11, 8_0);
 
 typedef struct
@@ -146,6 +152,10 @@
 
 @end
 
+
+
+
+
 NS_CLASS_AVAILABLE(10_11, 8_0)
 @interface MTLRenderPassStencilAttachmentDescriptor : MTLRenderPassAttachmentDescriptor
 
@@ -155,8 +165,11 @@
  */
 @property (nonatomic) uint32_t clearStencil;
 
+
 @end
 
+
+
 NS_CLASS_AVAILABLE(10_11, 8_0)
 @interface MTLRenderPassColorAttachmentDescriptorArray : NSObject
 /* Individual attachment state access */
@@ -196,7 +209,29 @@
  @property renderTargetArrayLength:
  @abstract The number of active layers
  */
-@property (nonatomic) NSUInteger renderTargetArrayLength NS_AVAILABLE_MAC(10_11);
+@property (nonatomic) NSUInteger renderTargetArrayLength NS_AVAILABLE(10_11, NA);
+
+
+//cleanup
+
+
+/*!
+ @method setSamplePositions:count:
+ @abstract Configure the custom sample positions, to be used in MSAA rendering (i.e. when sample count > 1).
+ @param positions The source array for custom sample position data.
+ @param count Specifies the length of the positions array, and must be a valid sample count or 0 (to disable custom sample positions).
+ */
+- (void)setSamplePositions:(const MTLSamplePosition * _Nullable)positions count:(NSUInteger)count NS_AVAILABLE(10_13, 11_0);
+
+/*!
+ @method getSamplePositions:count:
+ @abstract Retrieve the previously configured custom sample positions. The positions input array will only be modified when count specifies a length sufficient for the number of previously configured positions.
+ @param positions The destination array for custom sample position data.
+ @param count Specifies the length of the positions array, which must be large enough to hold all configured sample positions.
+ @return The number of previously configured custom sample positions.
+ */
+- (NSUInteger)getSamplePositions:(MTLSamplePosition * _Nullable)positions count:(NSUInteger)count NS_AVAILABLE(10_13, 11_0);
+
 
 @end
 
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h	2016-09-19 19:04:19.000000000 -0400
+++ /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
@@ -12,6 +12,8 @@
 #import <Metal/MTLPixelFormat.h>
 #import <Metal/MTLArgument.h>
 #import <Metal/MTLFunctionConstantValues.h>
+#import <Metal/MTLPipeline.h>
+
 
 NS_ASSUME_NONNULL_BEGIN
 @class MTLVertexDescriptor;
@@ -32,10 +34,10 @@
     MTLBlendFactorOneMinusBlendColor = 12,
     MTLBlendFactorBlendAlpha = 13,
     MTLBlendFactorOneMinusBlendAlpha = 14,
-    MTLBlendFactorSource1Color              NS_AVAILABLE_MAC(10_12) = 15,
-    MTLBlendFactorOneMinusSource1Color      NS_AVAILABLE_MAC(10_12) = 16,
-    MTLBlendFactorSource1Alpha              NS_AVAILABLE_MAC(10_12) = 17,
-    MTLBlendFactorOneMinusSource1Alpha      NS_AVAILABLE_MAC(10_12) = 18,
+    MTLBlendFactorSource1Color              NS_AVAILABLE(10_12, NA) = 15,
+    MTLBlendFactorOneMinusSource1Color      NS_AVAILABLE(10_12, NA) = 16,
+    MTLBlendFactorSource1Alpha              NS_AVAILABLE(10_12, NA) = 17,
+    MTLBlendFactorOneMinusSource1Alpha      NS_AVAILABLE(10_12, NA) = 18,
 } NS_ENUM_AVAILABLE(10_11, 8_0);
 
 typedef NS_ENUM(NSUInteger, MTLBlendOperation) {
@@ -60,7 +62,7 @@
     MTLPrimitiveTopologyClassPoint = 1,
     MTLPrimitiveTopologyClassLine = 2,
     MTLPrimitiveTopologyClassTriangle = 3,
-} NS_ENUM_AVAILABLE_MAC(10_11);
+} NS_ENUM_AVAILABLE(10_11, NA);
 
 typedef NS_ENUM(NSUInteger, MTLTessellationPartitionMode) {
     MTLTessellationPartitionModePow2 = 0,
@@ -128,7 +130,6 @@
 
 @property (nullable, readonly) NSArray <MTLArgument *> *vertexArguments;
 @property (nullable, readonly) NSArray <MTLArgument *> *fragmentArguments;
-
 @end
 
 NS_CLASS_AVAILABLE(10_11, 8_0)
@@ -147,12 +148,14 @@
 @property (readwrite, nonatomic, getter = isAlphaToOneEnabled) BOOL alphaToOneEnabled;
 @property (readwrite, nonatomic, getter = isRasterizationEnabled) BOOL rasterizationEnabled;
 
+
+
 @property (readonly) MTLRenderPipelineColorAttachmentDescriptorArray *colorAttachments;
 
 @property (nonatomic) MTLPixelFormat depthAttachmentPixelFormat;
 @property (nonatomic) MTLPixelFormat stencilAttachmentPixelFormat;
 
-@property (readwrite, nonatomic) MTLPrimitiveTopologyClass inputPrimitiveTopology NS_AVAILABLE_MAC(10_11);
+@property (readwrite, nonatomic) MTLPrimitiveTopologyClass inputPrimitiveTopology NS_AVAILABLE(10_11, NA);
 
 @property (readwrite, nonatomic) MTLTessellationPartitionMode tessellationPartitionMode NS_AVAILABLE(10_12, 10_0);
 @property (readwrite, nonatomic) NSUInteger maxTessellationFactor NS_AVAILABLE(10_12, 10_0);
@@ -162,6 +165,9 @@
 @property (readwrite, nonatomic) MTLTessellationFactorStepFunction tessellationFactorStepFunction NS_AVAILABLE(10_12, 10_0);
 @property (readwrite, nonatomic) MTLWinding tessellationOutputWindingOrder NS_AVAILABLE(10_12, 10_0);
 
+@property (readonly) MTLPipelineBufferDescriptorArray *vertexBuffers NS_AVAILABLE(10_13, 11_0);
+@property (readonly) MTLPipelineBufferDescriptorArray *fragmentBuffers NS_AVAILABLE(10_13, 11_0);
+
 /*!
  @method reset
  @abstract Restore all pipeline descriptor properties to their default values.
@@ -182,6 +188,10 @@
 @property (nullable, readonly) NSString *label;
 @property (readonly) id <MTLDevice> device;
 
+
+
+
+
 @end
 
 NS_CLASS_AVAILABLE(10_11, 8_0)
@@ -196,4 +206,5 @@
 @end
 
 
+
 NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h	2016-09-23 20:28:31.000000000 -0400
+++ /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
@@ -146,7 +146,7 @@
     MTLResourceStorageModePrivate    NS_ENUM_AVAILABLE(10_11, 9_0)  = MTLStorageModePrivate    << MTLResourceStorageModeShift,
     MTLResourceStorageModeMemoryless NS_ENUM_AVAILABLE(NA,    10_0) = MTLStorageModeMemoryless << MTLResourceStorageModeShift,
 
-    MTLResourceHazardTrackingModeUntracked NS_ENUM_AVAILABLE(NA, 10_0) = 0x1UL << MTLResourceHazardTrackingModeShift,
+    MTLResourceHazardTrackingModeUntracked NS_ENUM_AVAILABLE(10_13, 10_0) = 0x1UL << MTLResourceHazardTrackingModeShift,
 
     // Deprecated spellings
     MTLResourceOptionCPUCacheModeDefault       = MTLResourceCPUCacheModeDefaultCache,
@@ -201,7 +201,7 @@
  @abstract The heap from which this resouce was created.
  @discussion Nil when this resource is not backed by a heap.
  */
-@property (readonly, nullable) id <MTLHeap> heap NS_AVAILABLE(NA, 10_0);
+@property (readonly, nullable) id <MTLHeap> heap NS_AVAILABLE(10_13, 10_0);
 
 /*!
  @method makeAliasable
@@ -212,7 +212,7 @@
  from Buffers backed by heap memory has no effect.
  Once a resource is made aliasable, the decision cannot be reverted.
  */
--(void) makeAliasable NS_AVAILABLE(NA, 10_0);
+-(void) makeAliasable NS_AVAILABLE(10_13, 10_0);
 
 /*!
  @method isAliasable
@@ -221,7 +221,7 @@
  If resource is sub-allocated from other resource created on the heap, isAliasable returns 
  aliasing state of that base resource. Also returns NO when storage mode is memoryless.
  */
--(BOOL) isAliasable NS_AVAILABLE(NA, 10_0);
+-(BOOL) isAliasable NS_AVAILABLE(10_13, 10_0);
 
 @end
 
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h	2016-08-01 21:54:09.000000000 -0400
+++ /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
@@ -88,7 +88,7 @@
     MTLSamplerBorderColorTransparentBlack = 0,  // {0,0,0,0}
     MTLSamplerBorderColorOpaqueBlack = 1,       // {0,0,0,1}
     MTLSamplerBorderColorOpaqueWhite = 2,       // {1,1,1,1}
-};
+} NS_AVAILABLE_MAC(10_12);
 
 /*!
  @class MTLSamplerDescriptor
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h	2016-08-01 22:05:06.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h	2017-05-23 18:40:05.000000000 -0400
@@ -8,6 +8,8 @@
 #import <Metal/MTLDefines.h>
 #import <Metal/MTLDevice.h>
 
+
+
 NS_ASSUME_NONNULL_BEGIN
 
 /*
@@ -71,6 +73,19 @@
     MTLAttributeFormatInt1010102Normalized = 40,
     MTLAttributeFormatUInt1010102Normalized = 41,
     
+    MTLAttributeFormatUChar4Normalized_BGRA NS_ENUM_AVAILABLE(10_13, 11_0) = 42,
+    
+    MTLAttributeFormatUChar NS_ENUM_AVAILABLE(10_13, 11_0) = 45,
+    MTLAttributeFormatChar NS_ENUM_AVAILABLE(10_13, 11_0) = 46,
+    MTLAttributeFormatUCharNormalized NS_ENUM_AVAILABLE(10_13, 11_0) = 47,
+    MTLAttributeFormatCharNormalized NS_ENUM_AVAILABLE(10_13, 11_0) = 48,
+    
+    MTLAttributeFormatUShort NS_ENUM_AVAILABLE(10_13, 11_0) = 49,
+    MTLAttributeFormatShort NS_ENUM_AVAILABLE(10_13, 11_0) = 50,
+    MTLAttributeFormatUShortNormalized NS_ENUM_AVAILABLE(10_13, 11_0) = 51,
+    MTLAttributeFormatShortNormalized NS_ENUM_AVAILABLE(10_13, 11_0) = 52,
+    
+    MTLAttributeFormatHalf NS_ENUM_AVAILABLE(10_13, 11_0) = 53,
     
 } NS_ENUM_AVAILABLE(10_12, 10_0);
 
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h	2016-09-19 19:04:20.000000000 -0400
+++ /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
@@ -11,6 +11,7 @@
 #import <Metal/MTLBuffer.h>
 #import <Metal/MTLTypes.h>
 
+
 NS_ASSUME_NONNULL_BEGIN
 /*!
  @enum MTLTextureType
@@ -151,7 +152,7 @@
  @property rootResource
  @abstract The resource this texture was created from. It may be a texture or a buffer. If this texture is not reusing storage of another MTLResource, then nil is returned.
  */
-@property (nullable, readonly) id <MTLResource> rootResource NS_DEPRECATED(10_11, 10_12, 8_0, 10_0);
+@property (nullable, readonly) id <MTLResource> rootResource NS_DEPRECATED(10_11, 10_12, 8_0, 10_0, "Use parentTexture or buffer instead");
 
 /*!
  @property parentTexture
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h	2016-09-19 19:04:20.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h	2017-05-23 18:40:05.000000000 -0400
@@ -5,6 +5,7 @@
 //  Copyright (c) 2014 Apple Inc. All rights reserved.
 //
 
+#import <Foundation/Foundation.h>
 #import <Metal/MTLDefines.h>
 
 /*!
@@ -23,7 +24,7 @@
 
 /*!
  @typedef MTLSize
- @abstract A set of dimensions to declare the size of an object such as a compute kernel work group or grid.
+ @abstract A set of dimensions to declare the size of an object, such as an image, texture, threadgroup, or grid.
  */
 typedef struct {
     NSUInteger width, height, depth;
@@ -70,3 +71,17 @@
     return region;
 }
 
+/*!
+ @struct MTLSamplePosition
+ @abstract Identify a sample within a pixel. Origin is top-left with a range [0,1) for both x and y.
+ */
+
+typedef struct {
+    float x, y;
+} MTLSamplePosition;
+
+MTL_INLINE MTLSamplePosition MTLSamplePositionMake(float x, float y)
+{
+    MTLSamplePosition position = {x, y};
+    return position;
+}
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h	2016-09-19 19:04:21.000000000 -0400
+++ /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
@@ -8,6 +8,7 @@
 #import <Metal/MTLDefines.h>
 #import <Metal/MTLDevice.h>
 
+
 NS_ASSUME_NONNULL_BEGIN
 
 /*!
@@ -72,6 +73,19 @@
     MTLVertexFormatInt1010102Normalized = 40,
     MTLVertexFormatUInt1010102Normalized = 41,
     
+    MTLVertexFormatUChar4Normalized_BGRA NS_ENUM_AVAILABLE(10_12, 10_0) = 42,
+    
+    MTLVertexFormatUChar NS_ENUM_AVAILABLE(10_13, 11_0) = 45,
+    MTLVertexFormatChar NS_ENUM_AVAILABLE(10_13, 11_0) = 46,
+    MTLVertexFormatUCharNormalized NS_ENUM_AVAILABLE(10_13, 11_0) = 47,
+    MTLVertexFormatCharNormalized NS_ENUM_AVAILABLE(10_13, 11_0) = 48,
+    
+    MTLVertexFormatUShort NS_ENUM_AVAILABLE(10_13, 11_0) = 49,
+    MTLVertexFormatShort NS_ENUM_AVAILABLE(10_13, 11_0) = 50,
+    MTLVertexFormatUShortNormalized NS_ENUM_AVAILABLE(10_13, 11_0) = 51,
+    MTLVertexFormatShortNormalized NS_ENUM_AVAILABLE(10_13, 11_0) = 52,
+    
+    MTLVertexFormatHalf NS_ENUM_AVAILABLE(10_13, 11_0) = 53,
     
 } NS_ENUM_AVAILABLE(10_11, 8_0);
 
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.apinotes	1969-12-31 19:00:00.000000000 -0500
+++ /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
@@ -0,0 +1,855 @@
+---
+Name: Metal
+Tags:
+- Name: MTLCommandBufferError
+  NSErrorDomain: MTLCommandBufferErrorDomain
+- Name: MTLLibraryError
+  NSErrorDomain: MTLLibraryErrorDomain
+Enumerators:
+- Name: MTLResourceStorageModeShared
+  SwiftName: storageModeShared
+- Name: MTLStorageModeShared
+  SwiftName: shared
+- Name: MTLTextureUsageUnknown
+  SwiftName: unknown
+- Name: MTLDataTypeUInt
+  SwiftName: uint
+- Name: MTLDataTypeUInt2
+  SwiftName: uint2
+- Name: MTLDataTypeUInt3
+  SwiftName: uint3
+- Name: MTLDataTypeUInt4
+  SwiftName: uint4
+- Name: MTLDataTypeUShort
+  SwiftName: ushort
+- Name: MTLDataTypeUShort2
+  SwiftName: ushort2
+- Name: MTLDataTypeUShort3
+  SwiftName: ushort3
+- Name: MTLDataTypeUShort4
+  SwiftName: ushort4
+- Name: MTLDataTypeUChar
+  SwiftName: uchar
+- Name: MTLDataTypeUChar2
+  SwiftName: uchar2
+- Name: MTLDataTypeUChar3
+  SwiftName: uchar3
+- Name: MTLDataTypeUChar4
+  SwiftName: uchar4
+- Name: MTLPixelFormatRGBA8Unorm_sRGB
+  SwiftName: rgba8Unorm_srgb
+- Name: MTLPixelFormatBGRA8Unorm_sRGB
+  SwiftName: bgra8Unorm_srgb
+- Name: MTLPixelFormatRGB10A2Unorm
+  SwiftName: rgb10a2Unorm
+- Name: MTLPixelFormatRGB10A2Uint
+  SwiftName: rgb10a2Uint
+- Name: MTLPixelFormatRG11B10Float
+  SwiftName: rg11b10Float
+- Name: MTLPixelFormatRGB9E5Float
+  SwiftName: rgb9e5Float
+- Name: MTLPixelFormatBGR10A2Unorm
+  SwiftName: bgr10a2Unorm
+- Name: MTLPixelFormatBC1_RGBA
+  SwiftName: bc1_rgba
+- Name: MTLPixelFormatBC1_RGBA_sRGB
+  SwiftName: bc1_rgba_srgb
+- Name: MTLPixelFormatBC2_RGBA
+  SwiftName: bc2_rgba
+- Name: MTLPixelFormatBC2_RGBA_sRGB
+  SwiftName: bc2_rgba_srgb
+- Name: MTLPixelFormatBC3_RGBA
+  SwiftName: bc3_rgba
+- Name: MTLPixelFormatBC3_RGBA_sRGB
+  SwiftName: bc3_rgba_srgb
+- Name: MTLPixelFormatBC4_RUnorm
+  SwiftName: bc4_rUnorm
+- Name: MTLPixelFormatBC4_RSnorm
+  SwiftName: bc4_rSnorm
+- Name: MTLPixelFormatBC5_RGUnorm
+  SwiftName: bc5_rgUnorm
+- Name: MTLPixelFormatBC5_RGSnorm
+  SwiftName: bc5_rgSnorm
+- Name: MTLPixelFormatBC6H_RGBFloat
+  SwiftName: bc6H_rgbFloat
+- Name: MTLPixelFormatBC6H_RGBUfloat
+  SwiftName: bc6H_rgbuFloat
+- Name: MTLPixelFormatBC7_RGBAUnorm
+  SwiftName: bc7_rgbaUnorm
+- Name: MTLPixelFormatBC7_RGBAUnorm_sRGB
+  SwiftName: bc7_rgbaUnorm_srgb
+- Name: MTLPixelFormatGBGR422
+  SwiftName: gbgr422
+- Name: MTLPixelFormatBGRG422
+  SwiftName: bgrg422
+- Name: MTLPixelFormatDepth24Unorm_Stencil8
+  SwiftName: depth24Unorm_stencil8
+- Name: MTLPixelFormatDepth32Float_Stencil8
+  SwiftName: depth32Float_stencil8
+- Name: MTLPixelFormatX32_Stencil8
+  SwiftName: x32_stencil8
+- Name: MTLPixelFormatX24_Stencil8
+  SwiftName: x24_stencil8
+- Name: MTLPixelFormatR8Unorm_sRGB
+  SwiftName: r8Unorm_srgb
+- Name: MTLPixelFormatRG8Unorm_sRGB
+  SwiftName: rg8Unorm_srgb
+- Name: MTLPixelFormatB5G6R5Unorm
+  SwiftName: b5g6r5Unorm
+- Name: MTLPixelFormatA1BGR5Unorm
+  SwiftName: a1bgr5Unorm
+- Name: MTLPixelFormatBGR10_XR
+  SwiftName: bgr10_xr
+- Name: MTLPixelFormatBGR10_XR_sRGB
+  SwiftName: bgr10_xr_srgb
+- Name: MTLPixelFormatPVRTC_RGB_2BPP
+  SwiftName: pvrtc_rgb_2bpp
+- Name: MTLPixelFormatPVRTC_RGB_2BPP_sRGB
+  SwiftName: pvrtc_rgb_2bpp_srgb
+- Name: MTLPixelFormatPVRTC_RGB_4BPP
+  SwiftName: pvrtc_rgb_4bpp
+- Name: MTLPixelFormatPVRTC_RGB_4BPP_sRGB
+  SwiftName: pvrtc_rgb_4bpp_srgb
+- Name: MTLPixelFormatPVRTC_RGBA_2BPP
+  SwiftName: pvrtc_rgba_2bpp
+- Name: MTLPixelFormatPVRTC_RGBA_2BPP_sRGB
+  SwiftName: pvrtc_rgba_2bpp_srgb
+- Name: MTLPixelFormatPVRTC_RGBA_4BPP
+  SwiftName: pvrtc_rgba_4bpp
+- Name: MTLPixelFormatPVRTC_RGBA_4BPP_sRGB
+  SwiftName: pvrtc_rgba_4bpp_srgb
+- Name: MTLPixelFormatEAC_R11Unorm
+  SwiftName: eac_r11Unorm
+- Name: MTLPixelFormatEAC_R11Snorm
+  SwiftName: eac_r11Snorm
+- Name: MTLPixelFormatEAC_RG11Unorm
+  SwiftName: eac_rg11Unorm
+- Name: MTLPixelFormatEAC_RG11Snorm
+  SwiftName: eac_rg11Snorm
+- Name: MTLPixelFormatEAC_RGBA8
+  SwiftName: eac_rgba8
+- Name: MTLPixelFormatEAC_RGBA8_sRGB
+  SwiftName: eac_rgba8_srgb
+- Name: MTLPixelFormatETC2_RGB8
+  SwiftName: etc2_rgb8
+- Name: MTLPixelFormatETC2_RGB8_sRGB
+  SwiftName: etc2_rgb8_srgb
+- Name: MTLPixelFormatETC2_RGB8A1
+  SwiftName: etc2_rgb8a1
+- Name: MTLPixelFormatETC2_RGB8A1_sRGB
+  SwiftName: etc2_rgb8a1_srgb
+- Name: MTLPixelFormatASTC_4x4_sRGB
+  SwiftName: astc_4x4_srgb
+- Name: MTLPixelFormatASTC_5x4_sRGB
+  SwiftName: astc_5x4_srgb
+- Name: MTLPixelFormatASTC_5x5_sRGB
+  SwiftName: astc_5x5_srgb
+- Name: MTLPixelFormatASTC_6x5_sRGB
+  SwiftName: astc_6x5_srgb
+- Name: MTLPixelFormatASTC_6x6_sRGB
+  SwiftName: astc_6x6_srgb
+- Name: MTLPixelFormatASTC_8x5_sRGB
+  SwiftName: astc_8x5_srgb
+- Name: MTLPixelFormatASTC_8x6_sRGB
+  SwiftName: astc_8x6_srgb
+- Name: MTLPixelFormatASTC_8x8_sRGB
+  SwiftName: astc_8x8_srgb
+- Name: MTLPixelFormatASTC_10x5_sRGB
+  SwiftName: astc_10x5_srgb
+- Name: MTLPixelFormatASTC_10x6_sRGB
+  SwiftName: astc_10x6_srgb
+- Name: MTLPixelFormatASTC_10x8_sRGB
+  SwiftName: astc_10x8_srgb
+- Name: MTLPixelFormatASTC_10x10_sRGB
+  SwiftName: astc_10x10_srgb
+- Name: MTLPixelFormatASTC_12x10_sRGB
+  SwiftName: astc_12x10_srgb
+- Name: MTLPixelFormatASTC_12x12_sRGB
+  SwiftName: astc_12x12_srgb
+- Name: MTLPixelFormatASTC_4x4_LDR
+  SwiftName: astc_4x4_ldr
+- Name: MTLPixelFormatASTC_5x4_LDR
+  SwiftName: astc_5x4_ldr
+- Name: MTLPixelFormatASTC_5x5_LDR
+  SwiftName: astc_5x5_ldr
+- Name: MTLPixelFormatASTC_6x5_LDR
+  SwiftName: astc_6x5_ldr
+- Name: MTLPixelFormatASTC_6x6_LDR
+  SwiftName: astc_6x6_ldr
+- Name: MTLPixelFormatASTC_8x5_LDR
+  SwiftName: astc_8x5_ldr
+- Name: MTLPixelFormatASTC_8x6_LDR
+  SwiftName: astc_8x6_ldr
+- Name: MTLPixelFormatASTC_8x8_LDR
+  SwiftName: astc_8x8_ldr
+- Name: MTLPixelFormatASTC_10x5_LDR
+  SwiftName: astc_10x5_ldr
+- Name: MTLPixelFormatASTC_10x6_LDR
+  SwiftName: astc_10x6_ldr
+- Name: MTLPixelFormatASTC_10x8_LDR
+  SwiftName: astc_10x8_ldr
+- Name: MTLPixelFormatASTC_10x10_LDR
+  SwiftName: astc_10x10_ldr
+- Name: MTLPixelFormatASTC_12x10_LDR
+  SwiftName: astc_12x10_ldr
+- Name: MTLPixelFormatASTC_12x12_LDR
+  SwiftName: astc_12x12_ldr
+- Name: MTLTessellationControlPointIndexTypeUInt16
+  SwiftName: uint16
+- Name: MTLTessellationControlPointIndexTypeUInt32
+  SwiftName: uint32
+- Name: MTLAttributeFormatUChar2
+  SwiftName: uchar2
+- Name: MTLAttributeFormatUChar3
+  SwiftName: uchar3
+- Name: MTLAttributeFormatUChar4
+  SwiftName: uchar4
+- Name: MTLAttributeFormatUChar2Normalized
+  SwiftName: uchar2Normalized
+- Name: MTLAttributeFormatUChar3Normalized
+  SwiftName: uchar3Normalized
+- Name: MTLAttributeFormatUChar4Normalized
+  SwiftName: uchar4Normalized
+- Name: MTLAttributeFormatUShort2
+  SwiftName: ushort2
+- Name: MTLAttributeFormatUShort3
+  SwiftName: ushort3
+- Name: MTLAttributeFormatUShort4
+  SwiftName: ushort4
+- Name: MTLAttributeFormatUShort2Normalized
+  SwiftName: ushort2Normalized
+- Name: MTLAttributeFormatUShort3Normalized
+  SwiftName: ushort3Normalized
+- Name: MTLAttributeFormatUShort4Normalized
+  SwiftName: ushort4Normalized
+- Name: MTLAttributeFormatUInt
+  SwiftName: uint
+- Name: MTLAttributeFormatUInt2
+  SwiftName: uint2
+- Name: MTLAttributeFormatUInt3
+  SwiftName: uint3
+- Name: MTLAttributeFormatUInt4
+  SwiftName: uint4
+- Name: MTLAttributeFormatUInt1010102Normalized
+  SwiftName: uint1010102Normalized
+- Name: MTLAttributeFormatUChar4Normalized_BGRA
+  SwiftName: uchar4Normalized_bgra
+- Name: MTLAttributeFormatUChar
+  SwiftName: uchar
+- Name: MTLAttributeFormatUCharNormalized
+  SwiftName: ucharNormalized
+- Name: MTLAttributeFormatUShort
+  SwiftName: ushort
+- Name: MTLAttributeFormatUShortNormalized
+  SwiftName: ushortNormalized
+- Name: MTLIndexTypeUInt16
+  SwiftName: uint16
+- Name: MTLIndexTypeUInt32
+  SwiftName: uint32
+- Name: MTLVertexFormatUChar2
+  SwiftName: uchar2
+- Name: MTLVertexFormatUChar3
+  SwiftName: uchar3
+- Name: MTLVertexFormatUChar4
+  SwiftName: uchar4
+- Name: MTLVertexFormatUChar2Normalized
+  SwiftName: uchar2Normalized
+- Name: MTLVertexFormatUChar3Normalized
+  SwiftName: uchar3Normalized
+- Name: MTLVertexFormatUChar4Normalized
+  SwiftName: uchar4Normalized
+- Name: MTLVertexFormatUShort2
+  SwiftName: ushort2
+- Name: MTLVertexFormatUShort3
+  SwiftName: ushort3
+- Name: MTLVertexFormatUShort4
+  SwiftName: ushort4
+- Name: MTLVertexFormatUShort2Normalized
+  SwiftName: ushort2Normalized
+- Name: MTLVertexFormatUShort3Normalized
+  SwiftName: ushort3Normalized
+- Name: MTLVertexFormatUShort4Normalized
+  SwiftName: ushort4Normalized
+- Name: MTLVertexFormatUInt
+  SwiftName: uint
+- Name: MTLVertexFormatUInt2
+  SwiftName: uint2
+- Name: MTLVertexFormatUInt3
+  SwiftName: uint3
+- Name: MTLVertexFormatUInt4
+  SwiftName: uint4
+- Name: MTLVertexFormatUInt1010102Normalized
+  SwiftName: uint1010102Normalized
+- Name: MTLVertexFormatUChar4Normalized_BGRA
+  SwiftName: uchar4Normalized_bgra
+- Name: MTLVertexFormatUChar
+  SwiftName: uchar
+- Name: MTLVertexFormatUCharNormalized
+  SwiftName: ucharNormalized
+- Name: MTLVertexFormatUShort
+  SwiftName: ushort
+- Name: MTLVertexFormatUShortNormalized
+  SwiftName: ushortNormalized
+Classes:
+- Name: MTLCaptureManager
+  Methods:
+  - Selector: 'newCaptureScopeWithDevice:'
+    SwiftName: makeCaptureScope(device:)
+    MethodKind: Instance
+  - Selector: 'newCaptureScopeWithCommandQueue:'
+    SwiftName: makeCaptureScope(commandQueue:)
+    MethodKind: Instance
+- Name: MTLFunctionConstantValues
+  Methods:
+  - Selector: 'setConstantValue:type:atIndex:'
+    SwiftName: setConstantValue(_:type:index:)
+    MethodKind: Instance
+- Name: MTLStructType
+  Methods:
+  - Selector: 'memberByName:'
+    SwiftName: memberByName(_:)
+    MethodKind: Instance
+- Name: MTLTextureDescriptor
+  Methods:
+  - Selector: 'texture2DDescriptorWithPixelFormat:width:height:mipmapped:'
+    SwiftName: texture2DDescriptor(pixelFormat:width:height:mipmapped:)
+    MethodKind: Class
+  - Selector: 'textureCubeDescriptorWithPixelFormat:size:mipmapped:'
+    SwiftName: textureCubeDescriptor(pixelFormat:size:mipmapped:)
+    MethodKind: Class
+Protocols:
+- Name: MTLBlitCommandEncoder
+  Methods:
+  - Selector: 'synchronizeResource:'
+    SwiftName: synchronize(resource:)
+    MethodKind: Instance
+  - Selector: 'synchronizeTexture:slice:level:'
+    SwiftName: synchronize(texture:slice:level:)
+    MethodKind: Instance
+  - Selector: 'fillBuffer:range:value:'
+    SwiftName: fill(buffer:range:value:)
+    MethodKind: Instance
+  - Selector: 'updateFence:'
+    SwiftName: updateFence(_:)
+    MethodKind: Instance
+  - Selector: 'waitForFence:'
+    SwiftName: waitForFence(_:)
+    MethodKind: Instance
+- Name: MTLBuffer
+  Methods:
+  - Selector: 'newTextureWithDescriptor:offset:bytesPerRow:'
+    SwiftName: makeTexture(descriptor:offset:bytesPerRow:)
+    MethodKind: Instance
+- Name: MTLCommandBuffer
+  Methods:
+  - Selector: 'blitCommandEncoder'
+    SwiftName: makeBlitCommandEncoder()
+    MethodKind: Instance
+  - Selector: 'renderCommandEncoderWithDescriptor:'
+    SwiftName: makeRenderCommandEncoder(descriptor:)
+    MethodKind: Instance
+  - Selector: 'computeCommandEncoder'
+    SwiftName: makeComputeCommandEncoder()
+    MethodKind: Instance
+  - Selector: 'computeCommandEncoderWithParallelExecution'
+    SwiftName: makeComputeCommandEncoderWithParallelExecution()
+    MethodKind: Instance
+  - Selector: 'parallelRenderCommandEncoderWithDescriptor:'
+    SwiftName: makeParallelRenderCommandEncoder(descriptor:)
+    MethodKind: Instance
+- Name: MTLCommandQueue
+  Methods:
+  - Selector: 'commandBuffer'
+    SwiftName: makeCommandBuffer()
+    MethodKind: Instance
+  - Selector: 'commandBufferWithUnretainedReferences'
+    SwiftName: makeCommandBufferWithUnretainedReferences()
+    MethodKind: Instance
+- Name: MTLComputeCommandEncoder
+  Methods:
+  - Selector: 'setBytes:length:atIndex:'
+    SwiftName: setBytes(_:length:index:)
+    MethodKind: Instance
+  - Selector: 'setBuffer:offset:atIndex:'
+    SwiftName: setBuffer(_:offset:index:)
+    MethodKind: Instance
+  - Selector: 'setBufferOffset:atIndex:'
+    SwiftName: setBufferOffset(_:index:)
+    MethodKind: Instance
+  - Selector: 'setTexture:atIndex:'
+    SwiftName: setTexture(_:index:)
+    MethodKind: Instance
+  - Selector: 'setSamplerState:atIndex:'
+    SwiftName: setSamplerState(_:index:)
+    MethodKind: Instance
+  - Selector: 'setSamplerState:lodMinClamp:lodMaxClamp:atIndex:'
+    SwiftName: setSamplerState(_:lodMinClamp:lodMaxClamp:index:)
+    MethodKind: Instance
+  - Selector: 'setThreadgroupMemoryLength:atIndex:'
+    SwiftName: setThreadgroupMemoryLength(_:index:)
+    MethodKind: Instance
+  - Selector: 'setStageInRegion:'
+    SwiftName: setStageInRegion(_:)
+    MethodKind: Instance
+  - Selector: 'dispatchThreadgroupsWithIndirectBuffer:indirectBufferOffset:threadsPerThreadgroup:'
+    SwiftName: dispatchThreadgroups(indirectBuffer:indirectBufferOffset:threadsPerThreadgroup:)
+    MethodKind: Instance
+  - Selector: 'updateFence:'
+    SwiftName: updateFence(_:)
+    MethodKind: Instance
+  - Selector: 'waitForFence:'
+    SwiftName: waitForFence(_:)
+    MethodKind: Instance
+  - Selector: 'useResource:usage:'
+    SwiftName: useResource(_:usage:)
+    MethodKind: Instance
+  - Selector: 'useResources:count:usage:'
+    SwiftName: useResources(_:count:usage:)
+    MethodKind: Instance
+  - Selector: 'useHeap:'
+    SwiftName: useHeap(_:)
+    MethodKind: Instance
+  - Selector: 'useHeaps:count:'
+    SwiftName: useHeaps(_:count:)
+    MethodKind: Instance
+- Name: MTLDevice
+  Methods:
+  - Selector: 'newDefaultLibraryWithBundle:error:'
+    SwiftName: makeDefaultLibrary(bundle:)
+    MethodKind: Instance
+  - Selector: 'newDefaultLibrary'
+    SwiftName: makeDefaultLibrary()
+    MethodKind: Instance
+  - Selector: 'newLibraryWithFile:error:'
+    SwiftName: makeLibrary(filepath:)
+    MethodKind: Instance
+  - Selector: 'newLibraryWithData:error:'
+    SwiftName: makeLibrary(data:)
+    MethodKind: Instance
+  - Selector: 'newLibraryWithSource:options:error:'
+    SwiftName: makeLibrary(source:options:)
+    MethodKind: Instance
+  - Selector: 'newLibraryWithSource:options:completionHandler:'
+    SwiftName: makeLibrary(source:options:completionHandler:)
+    MethodKind: Instance
+  - Selector: 'newRenderPipelineStateWithDescriptor:completionHandler:'
+    SwiftName: makeRenderPipelineState(descriptor:completionHandler:)
+    MethodKind: Instance
+  - Selector: 'newRenderPipelineStateWithDescriptor:options:completionHandler:'
+    SwiftName: makeRenderPipelineState(descriptor:options:completionHandler:)
+    MethodKind: Instance
+  - Selector: 'newRenderPipelineStateWithDescriptor:error:'
+    SwiftName: makeRenderPipelineState(descriptor:)
+    MethodKind: Instance
+  - Selector: 'newRenderPipelineStateWithDescriptor:options:reflection:error:'
+    SwiftName: makeRenderPipelineState(descriptor:options:reflection:)
+    MethodKind: Instance
+  - Selector: 'newRenderPipelineStateWithTileDescriptor:error:'
+    SwiftName: makeRenderPipelineState(tileDescriptor:)
+    MethodKind: Instance
+  - Selector: 'newRenderPipelineStateWithTileDescriptor:options:reflection:error:'
+    SwiftName: makeRenderPipelineState(tileDescriptor:options:reflection:)
+    MethodKind: Instance
+  - Selector: 'newRenderPipelineStateWithTileDescriptor:completionHandler:'
+    SwiftName: makeRenderPipelineState(tileDescriptor:completionHandler:)
+    MethodKind: Instance
+  - Selector: 'newRenderPipelineStateWithTileDescriptor:options:completionHandler:'
+    SwiftName: makeRenderPipelineState(tileDescriptor:options:completionHandler:)
+    MethodKind: Instance
+  - Selector: 'newComputePipelineStateWithFunction:completionHandler:'
+    SwiftName: makeComputePipelineState(function:completionHandler:)
+    MethodKind: Instance
+  - Selector: 'newComputePipelineStateWithFunction:options:completionHandler:'
+    SwiftName: makeComputePipelineState(function:options:completionHandler:)
+    MethodKind: Instance
+  - Selector: 'newComputePipelineStateWithFunction:error:'
+    SwiftName: makeComputePipelineState(function:)
+    MethodKind: Instance
+  - Selector: 'newComputePipelineStateWithFunction:options:reflection:error:'
+    SwiftName: makeComputePipelineState(function:options:reflection:)
+    MethodKind: Instance
+  - Selector: 'newComputePipelineStateWithDescriptor:options:completionHandler:'
+    SwiftName: makeComputePipelineState(descriptor:options:completionHandler:)
+    MethodKind: Instance
+  - Selector: 'newComputePipelineStateWithDescriptor:options:reflection:error:'
+    SwiftName: makeComputePipelineState(descriptor:options:reflection:)
+    MethodKind: Instance
+  - Selector: 'newCommandQueue'
+    SwiftName: makeCommandQueue()
+    MethodKind: Instance
+  - Selector: 'newCommandQueueWithMaxCommandBufferCount:'
+    SwiftName: makeCommandQueue(maxCommandBufferCount:)
+    MethodKind: Instance
+  - Selector: 'newBufferWithLength:options:'
+    SwiftName: makeBuffer(length:options:)
+    MethodKind: Instance
+  - Selector: 'newBufferWithBytes:length:options:'
+    SwiftName: makeBuffer(bytes:length:options:)
+    MethodKind: Instance
+  - Selector: 'newBufferWithBytesNoCopy:length:options:deallocator:'
+    SwiftName: makeBuffer(bytesNoCopy:length:options:deallocator:)
+    MethodKind: Instance
+  - Selector: 'newDepthStencilStateWithDescriptor:'
+    SwiftName: makeDepthStencilState(descriptor:)
+    MethodKind: Instance
+  - Selector: 'newTextureWithDescriptor:'
+    SwiftName: makeTexture(descriptor:)
+    MethodKind: Instance
+  - Selector: 'newTextureWithDescriptor:iosurface:plane:'
+    SwiftName: makeTexture(descriptor:iosurface:plane:)
+    MethodKind: Instance
+  - Selector: 'newHeapWithDescriptor:'
+    SwiftName: makeHeap(descriptor:)
+    MethodKind: Instance
+  - Selector: 'heapBufferSizeAndAlignWithLength:options:'
+    SwiftName: heapBufferSizeAndAlign(length:options:)
+    MethodKind: Instance
+  - Selector: 'heapTextureSizeAndAlignWithDescriptor:'
+    SwiftName: heapTextureSizeAndAlign(descriptor:)
+    MethodKind: Instance
+  - Selector: 'newFence'
+    SwiftName: makeFence()
+    MethodKind: Instance
+  - Selector: 'newSamplerStateWithDescriptor:'
+    SwiftName: makeSamplerState(descriptor:)
+    MethodKind: Instance
+  - Selector: 'newIndirectArgumentEncoderWithArguments:count:'
+    SwiftName: makeIndirectArgumentEncoder(arguments:count:)
+    MethodKind: Instance
+- Name: MTLDrawable
+  Methods:
+  - Selector: 'presentAtTime:'
+    SwiftName: present(at:)
+    MethodKind: Instance
+- Name: MTLHeap
+  Methods:
+  - Selector: 'maxAvailableSizeWithAlignment:'
+    SwiftName: maxAvailableSize(alignment:)
+    MethodKind: Instance
+  - Selector: 'newBufferWithLength:options:'
+    SwiftName: makeBuffer(length:options:)
+    MethodKind: Instance
+  - Selector: 'newTextureWithDescriptor:'
+    SwiftName: makeTexture(descriptor:)
+    MethodKind: Instance
+- Name: MTLIndirectArgumentEncoder
+  Methods:
+  - Selector: 'newIndirectArgumentEncoderForBufferAtIndex:'
+    SwiftName: makeIndirectArgumentEncoderForBuffer(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:'
+    SwiftName: makeFunction(name:)
+    MethodKind: Instance
+  - Selector: 'newFunctionWithName:constantValues:completionHandler:'
+    SwiftName: makeFunction(name:constantValues:completionHandler:)
+    MethodKind: Instance
+  - Selector: 'newFunctionWithName:constantValues:error:'
+    SwiftName: makeFunction(name:constantValues:)
+    MethodKind: Instance
+- Name: MTLFunction
+  Methods:
+  - Selector: 'newIndirectArgumentEncoderWithBufferIndex:'
+    SwiftName: makeIndirectArgumentEncoder(bufferIndex:)
+    MethodKind: Instance
+  - Selector: 'newIndirectArgumentEncoderWithBufferIndex:reflection:'
+    SwiftName: makeIndirectArgumentEncoder(bufferIndex:reflection:)
+    MethodKind: Instance
+- Name: MTLParallelRenderCommandEncoder
+  Methods:
+  - Selector: 'renderCommandEncoder'
+    SwiftName: makeRenderCommandEncoder()
+    MethodKind: Instance
+  - Selector: 'setColorStoreAction:atIndex:'
+    SwiftName: setColorStoreAction(_:index:)
+    MethodKind: Instance
+- Name: MTLRenderCommandEncoder
+  Methods:
+  - Selector: 'setVertexBytes:length:atIndex:'
+    SwiftName: setVertexBytes(_:length:index:)
+    MethodKind: Instance
+  - Selector: 'setVertexBuffer:offset:atIndex:'
+    SwiftName: setVertexBuffer(_:offset:index:)
+    MethodKind: Instance
+  - Selector: 'setVertexBufferOffset:atIndex:'
+    SwiftName: setVertexBufferOffset(_:index:)
+    MethodKind: Instance
+  - Selector: 'setVertexTexture:atIndex:'
+    SwiftName: setVertexTexture(_:index:)
+    MethodKind: Instance
+  - Selector: 'setVertexSamplerState:atIndex:'
+    SwiftName: setVertexSamplerState(_:index:)
+    MethodKind: Instance
+  - Selector: 'setVertexSamplerState:lodMinClamp:lodMaxClamp:atIndex:'
+    SwiftName: setVertexSamplerState(_:lodMinClamp:lodMaxClamp:index:)
+    MethodKind: Instance
+  - Selector: 'setFragmentBytes:length:atIndex:'
+    SwiftName: setFragmentBytes(_:length:index:)
+    MethodKind: Instance
+  - Selector: 'setFragmentBuffer:offset:atIndex:'
+    SwiftName: setFragmentBuffer(_:offset:index:)
+    MethodKind: Instance
+  - Selector: 'setFragmentBufferOffset:atIndex:'
+    SwiftName: setFragmentBufferOffset(_:index:)
+    MethodKind: Instance
+  - Selector: 'setFragmentTexture:atIndex:'
+    SwiftName: setFragmentTexture(_:index:)
+    MethodKind: Instance
+  - Selector: 'setFragmentSamplerState:atIndex:'
+    SwiftName: setFragmentSamplerState(_:index:)
+    MethodKind: Instance
+  - Selector: 'setFragmentSamplerState:lodMinClamp:lodMaxClamp:atIndex:'
+    SwiftName: setFragmentSamplerState(_:lodMinClamp:lodMaxClamp:index:)
+    MethodKind: Instance
+  - Selector: 'setColorStoreAction:atIndex:'
+    SwiftName: setColorStoreAction(_:index:)
+    MethodKind: Instance
+  - Selector: 'setTileBytes:length:atIndex:'
+    SwiftName: setTileBytes(_:length:index:)
+    MethodKind: Instance
+  - Selector: 'setTileBuffer:offset:atIndex:'
+    SwiftName: setTileBuffer(_:offset:index:)
+    MethodKind: Instance
+  - Selector: 'setTileBufferOffset:atIndex:'
+    SwiftName: setTileBufferOffset(_:index:)
+    MethodKind: Instance
+  - Selector: 'setTileTexture:atIndex:'
+    SwiftName: setTileTexture(_:index:)
+    MethodKind: Instance
+  - Selector: 'setTileSamplerState:atIndex:'
+    SwiftName: setTileSamplerState(_:index:)
+    MethodKind: Instance
+  - Selector: 'setTileSamplerState:lodMinClamp:lodMaxClamp:atIndex:'
+    SwiftName: setTileSamplerState(_:lodMinClamp:lodMaxClamp:index:)
+    MethodKind: Instance
+  - Selector: 'setThreadgroupMemoryLength:offset:atIndex:'
+    SwiftName: setThreadgroupMemoryLength(_:offset:index:)
+    MethodKind: Instance
+  - Selector: 'setBlendColorRed:green:blue:alpha:'
+    SwiftName: setBlendColor(red:green:blue:alpha:)
+    MethodKind: Instance
+  - Selector: 'setStencilFrontReferenceValue:backReferenceValue:'
+    SwiftName: setStencilReferenceValues(front:back:)
+    MethodKind: Instance
+  - Selector: 'drawPatches:patchStart:patchCount:patchIndexBuffer:patchIndexBufferOffset:instanceCount:baseInstance:'
+    SwiftName: drawPatches(numberOfPatchControlPoints:patchStart:patchCount:patchIndexBuffer:patchIndexBufferOffset:instanceCount:baseInstance:)
+    MethodKind: Instance
+  - Selector: 'drawPatches:patchIndexBuffer:patchIndexBufferOffset:indirectBuffer:indirectBufferOffset:'
+    SwiftName: drawPatches(numberOfPatchControlPoints:patchIndexBuffer:patchIndexBufferOffset:indirectBuffer:indirectBufferOffset:)
+    MethodKind: Instance
+  - Selector: 'drawIndexedPatches:patchStart:patchCount:patchIndexBuffer:patchIndexBufferOffset:controlPointIndexBuffer:controlPointIndexBufferOffset:instanceCount:baseInstance:'
+    SwiftName: drawIndexedPatches(numberOfPatchControlPoints:patchStart:patchCount:patchIndexBuffer:patchIndexBufferOffset:controlPointIndexBuffer:controlPointIndexBufferOffset:instanceCount:baseInstance:)
+    MethodKind: Instance
+  - Selector: 'drawIndexedPatches:patchIndexBuffer:patchIndexBufferOffset:controlPointIndexBuffer:controlPointIndexBufferOffset:indirectBuffer:indirectBufferOffset:'
+    SwiftName: drawIndexedPatches(numberOfPatchControlPoints:patchIndexBuffer:patchIndexBufferOffset:controlPointIndexBuffer:controlPointIndexBufferOffset:indirectBuffer:indirectBufferOffset:)
+    MethodKind: Instance
+  - Selector: 'drawPrimitives:vertexStart:vertexCount:instanceCount:baseInstance:'
+    SwiftName: drawPrimitives(type:vertexStart:vertexCount:instanceCount:baseInstance:)
+    MethodKind: Instance
+  - Selector: 'drawPrimitives:vertexStart:vertexCount:instanceCount:'
+    SwiftName: drawPrimitives(type:vertexStart:vertexCount:instanceCount:)
+    MethodKind: Instance
+  - Selector: 'drawPrimitives:vertexStart:vertexCount:'
+    SwiftName: drawPrimitives(type:vertexStart:vertexCount:)
+    MethodKind: Instance
+  - Selector: 'drawPrimitives:indirectBuffer:indirectBufferOffset:'
+    SwiftName: drawPrimitives(type:indirectBuffer:indirectBufferOffset:)
+    MethodKind: Instance
+  - Selector: 'drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount:baseVertex:baseInstance:'
+    SwiftName: drawIndexedPrimitives(type:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount:baseVertex:baseInstance:)
+    MethodKind: Instance
+  - Selector: 'drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount:'
+    SwiftName: drawIndexedPrimitives(type:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount:)
+    MethodKind: Instance
+  - Selector: 'drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:'
+    SwiftName: drawIndexedPrimitives(type:indexCount:indexType:indexBuffer:indexBufferOffset:)
+    MethodKind: Instance
+  - Selector: 'drawIndexedPrimitives:indexType:indexBuffer:indexBufferOffset:indirectBuffer:indirectBufferOffset:'
+    SwiftName: drawIndexedPrimitives(type:indexType:indexBuffer:indexBufferOffset:indirectBuffer:indirectBufferOffset:)
+    MethodKind: Instance
+  - Selector: 'updateFence:afterStages:'
+    SwiftName: updateFence(after:)
+    MethodKind: Instance
+  - Selector: 'waitForFence:beforeStages:'
+    SwiftName: waitForFence(before:)
+    MethodKind: Instance
+  - Selector: 'useResource:usage:'
+    SwiftName: useResource(_:usage:)
+    MethodKind: Instance
+  - Selector: 'useResources:count:usage:'
+    SwiftName: useResources(_:count:usage:)
+    MethodKind: Instance
+  - Selector: 'useHeap:'
+    SwiftName: useHeap(_:)
+    MethodKind: Instance
+  - Selector: 'useHeaps:count:'
+    SwiftName: useHeaps(_:count:)
+    MethodKind: Instance
+- Name: MTLTexture
+  Methods:
+  - Selector: 'newTextureViewWithPixelFormat:'
+    SwiftName: makeTextureView(pixelFormat:)
+    MethodKind: Instance
+  - Selector: 'newTextureViewWithPixelFormat:textureType:levels:slices:'
+    SwiftName: makeTextureView(pixelFormat:textureType:levels:slices:)
+    MethodKind: Instance
+  - Selector: 'replaceRegion:mipmapLevel:withBytes:bytesPerRow:'
+    SwiftName: replace(region:mipmapLevel:withBytes:bytesPerRow:)
+    MethodKind: Instance
+  - Selector: 'replaceRegion:mipmapLevel:slice:withBytes:bytesPerRow:bytesPerImage:'
+    SwiftName: replace(region:mipmapLevel:slice:withBytes:bytesPerRow:bytesPerImage:)
+    MethodKind: Instance
+
+SwiftVersions:
+- Version: 3
+  Enumerators:
+  - Name: MTLAttributeFormatUInt1010102Normalized
+    SwiftName: uInt1010102Normalized
+  Classes:
+  - Name: MTLFunctionConstantValues
+    Methods:
+    - Selector: 'setConstantValue:type:atIndex:'
+      SwiftName: setConstantValue(_:type:at:)
+      MethodKind: Instance
+  Protocols:
+  - Name: MTLDevice
+    Methods:
+    - Selector: 'newDefaultLibrary'
+      SwiftName: newDefaultLibrary()
+      MethodKind: Instance
+  - Name: MTLComputeCommandEncoder
+    Methods:
+    - Selector: 'setBytes:length:atIndex:'
+      SwiftName: setBytes(_:length:at:)
+      MethodKind: Instance
+    - Selector: 'setBuffer:offset:atIndex:'
+      SwiftName: setBuffer(_:offset:at:)
+      MethodKind: Instance
+    - Selector: 'setBufferOffset:atIndex:'
+      SwiftName: setBufferOffset(_:at:)
+      MethodKind: Instance
+    - Selector: 'setBuffers:offsets:withRange:'
+      MethodKind: Instance
+      Parameters:
+      - Position: 0
+        Nullability: U
+      - Position: 1
+        Nullability: U
+    - Selector: 'setTexture:atIndex:'
+      SwiftName: setTexture(_:at:)
+      MethodKind: Instance
+    - Selector: 'setSamplerState:atIndex:'
+      SwiftName: setSamplerState(_:at:)
+      MethodKind: Instance
+    - Selector: 'setSamplerState:lodMinClamp:lodMaxClamp:atIndex:'
+      SwiftName: setSamplerState(_:lodMinClamp:lodMaxClamp:at:)
+      MethodKind: Instance
+    - Selector: 'setThreadgroupMemoryLength:atIndex:'
+      SwiftName: setThreadgroupMemoryLength(_:at:)
+      MethodKind: Instance
+  - Name: MTLIndirectArgumentEncoder
+    Methods:
+    - Selector: 'newIndirectArgumentEncoderForBufferAtIndex:'
+      SwiftName: makeIndirectArgumentEncoderForBuffer(at:)
+      MethodKind: Instance
+    - Selector: 'setBuffer:offset:atIndex:'
+      SwiftName: setBuffer(_:offset:at:)
+      MethodKind: Instance
+    - Selector: 'setTexture:atIndex:'
+      SwiftName: setTexture(_:at:)
+      MethodKind: Instance
+    - Selector: 'setSamplerState:atIndex:'
+      SwiftName: setSamplerState(_:at:)
+      MethodKind: Instance
+  - Name: MTLParallelRenderCommandEncoder
+    Methods:
+    - Selector: 'setColorStoreAction:atIndex:'
+      SwiftName: setColorStoreAction(_:at:)
+      MethodKind: Instance
+  - Name: MTLRenderCommandEncoder
+    Methods:
+    - Selector: 'setVertexBytes:length:atIndex:'
+      SwiftName: setVertexBytes(_:length:at:)
+      MethodKind: Instance
+    - Selector: 'setVertexBuffer:offset:atIndex:'
+      SwiftName: setVertexBuffer(_:offset:at:)
+      MethodKind: Instance
+    - Selector: 'setVertexBuffers:offsets:withRange:'
+      MethodKind: Instance
+      Parameters:
+      - Position: 0
+        Nullability: U
+      - Position: 1
+        Nullability: U
+    - Selector: 'setVertexBufferOffset:atIndex:'
+      SwiftName: setVertexBufferOffset(_:at:)
+      MethodKind: Instance
+    - Selector: 'setVertexTexture:atIndex:'
+      SwiftName: setVertexTexture(_:at:)
+      MethodKind: Instance
+    - Selector: 'setVertexSamplerState:atIndex:'
+      SwiftName: setVertexSamplerState(_:at:)
+      MethodKind: Instance
+    - Selector: 'setVertexSamplerState:lodMinClamp:lodMaxClamp:atIndex:'
+      SwiftName: setVertexSamplerState(_:lodMinClamp:lodMaxClamp:at:)
+      MethodKind: Instance
+    - Selector: 'setFragmentBytes:length:atIndex:'
+      SwiftName: setFragmentBytes(_:length:at:)
+      MethodKind: Instance
+    - Selector: 'setFragmentBuffer:offset:atIndex:'
+      SwiftName: setFragmentBuffer(_:offset:at:)
+      MethodKind: Instance
+    - Selector: 'setFragmentBuffers:offsets:withRange:'
+      MethodKind: Instance
+      Parameters:
+      - Position: 0
+        Nullability: U
+      - Position: 1
+        Nullability: U
+    - Selector: 'setFragmentBufferOffset:atIndex:'
+      SwiftName: setFragmentBufferOffset(_:at:)
+      MethodKind: Instance
+    - Selector: 'setFragmentTexture:atIndex:'
+      SwiftName: setFragmentTexture(_:at:)
+      MethodKind: Instance
+    - Selector: 'setFragmentSamplerState:atIndex:'
+      SwiftName: setFragmentSamplerState(_:at:)
+      MethodKind: Instance
+    - Selector: 'setFragmentSamplerState:lodMinClamp:lodMaxClamp:atIndex:'
+      SwiftName: setFragmentSamplerState(_:lodMinClamp:lodMaxClamp:at:)
+      MethodKind: Instance
+    - Selector: 'setColorStoreAction:atIndex:'
+      SwiftName: setColorStoreAction(_:at:)
+      MethodKind: Instance
+    - Selector: 'setTileBytes:length:atIndex:'
+      SwiftName: setTileBytes(_:length:at:)
+      MethodKind: Instance
+    - Selector: 'setTileBuffer:offset:atIndex:'
+      SwiftName: setTileBuffer(_:offset:at:)
+      MethodKind: Instance
+    - Selector: 'setTileBufferOffset:atIndex:'
+      SwiftName: setTileBufferOffset(_:at:)
+      MethodKind: Instance
+    - Selector: 'setTileTexture:atIndex:'
+      SwiftName: setTileTexture(_:at:)
+      MethodKind: Instance
+    - Selector: 'setTileSamplerState:atIndex:'
+      SwiftName: setTileSamplerState(_:at:)
+      MethodKind: Instance
+    - Selector: 'setTileSamplerState:lodMinClamp:lodMaxClamp:atIndex:'
+      SwiftName: setTileSamplerState(_:lodMinClamp:lodMaxClamp:at:)
+      MethodKind: Instance
+    - Selector: 'setThreadgroupMemoryLength:offset:atIndex:'
+      SwiftName: setThreadgroupMemoryLength(_:offset:at:)
+      MethodKind: Instance
+
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.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
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Metal.framework/Headers/Metal.h	2016-09-19 19:04:21.000000000 -0400
+++ /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
@@ -6,6 +6,7 @@
 //
 
 #import <Metal/MTLDefines.h>
+#import <Metal/MTLTypes.h>
 #import <Metal/MTLBlitCommandEncoder.h>
 #import <Metal/MTLBuffer.h>
 #import <Metal/MTLCommandBuffer.h>
@@ -25,3 +26,6 @@
 #import <Metal/MTLSampler.h>
 #import <Metal/MTLTexture.h>
 #import <Metal/MTLHeap.h>
+#import <Metal/MTLIndirectArgumentEncoder.h>
+#import <Metal/MTLCaptureManager.h>
+#import <Metal/MTLCaptureScope.h>
Clone this wiki locally