Metal macOS 10.13 Beta 1 to Beta 2 API Differences

MTLArgument.h
Removed MTLDataTypeIndirectArgument
Removed MTLArgumentTypeIndirectConstant
Removed MTLStructMember.dataTypeDescription
Removed MTLArrayType.elementTypeDescription
Removed MTLPointerType.elementTypeDescription
Removed MTLArgument.dataTypeDescription
MTLArgumentEncoder.h
MTLBuffer.h
Declaration
From- (nonnull id<MTLTexture>)newTextureWithDescriptor:(nonnull MTLTextureDescriptor *)descriptor offset:(NSUInteger)offset bytesPerRow:(NSUInteger)bytesPerRow
To- (nullable id<MTLTexture>)newTextureWithDescriptor:(nonnull MTLTextureDescriptor *)descriptor offset:(NSUInteger)offset bytesPerRow:(NSUInteger)bytesPerRow

MTLCommandBuffer.h
Declaration
From- (nonnull id<MTLBlitCommandEncoder>)blitCommandEncoder
To- (nullable id<MTLBlitCommandEncoder>)blitCommandEncoder

Declaration
From- (nonnull id<MTLRenderCommandEncoder>)renderCommandEncoderWithDescriptor:(nonnull MTLRenderPassDescriptor *)renderPassDescriptor
To- (nullable id<MTLRenderCommandEncoder>)renderCommandEncoderWithDescriptor:(nonnull MTLRenderPassDescriptor *)renderPassDescriptor

Declaration
From- (nonnull id<MTLComputeCommandEncoder>)computeCommandEncoder
To- (nullable id<MTLComputeCommandEncoder>)computeCommandEncoder

Declaration
From- (nonnull id<MTLParallelRenderCommandEncoder>)parallelRenderCommandEncoderWithDescriptor:(nonnull MTLRenderPassDescriptor *)renderPassDescriptor
To- (nullable id<MTLParallelRenderCommandEncoder>)parallelRenderCommandEncoderWithDescriptor:(nonnull MTLRenderPassDescriptor *)renderPassDescriptor

MTLCommandQueue.h
Declaration
From- (nonnull id<MTLCommandBuffer>)commandBuffer
To- (nullable id<MTLCommandBuffer>)commandBuffer

Declaration
From- (nonnull id<MTLCommandBuffer>)commandBufferWithUnretainedReferences
To- (nullable id<MTLCommandBuffer>)commandBufferWithUnretainedReferences

MTLComputeCommandEncoder.h
Declaration
From- (void)useResources:(nullable id<MTLResource> _Nullable const [])resources count:(NSUInteger)count usage:(MTLResourceUsage)usage
To- (void)useResources:(nonnull id<MTLResource> _Nonnull const [])resources count:(NSUInteger)count usage:(MTLResourceUsage)usage

Declaration
From- (void)useHeaps:(nullable id<MTLHeap> _Nullable const [])heaps count:(NSUInteger)count
To- (void)useHeaps:(nonnull id<MTLHeap> _Nonnull const [])heaps count:(NSUInteger)count

MTLComputePipeline.h
Optional
FromOptional
ToRequired

MTLDevice.h
Declaration
FromNSArray<id<MTLDevice>> * _Nonnull MTLCopyAllDevicesWithObserver(id<NSObject> _Nonnull * _Nonnull observer, MTLDeviceNotificationHandler _Nonnull handler)
ToNSArray<id<MTLDevice>> * _Nonnull MTLCopyAllDevicesWithObserver(id<NSObject> _Nullable * _Nonnull observer, MTLDeviceNotificationHandler _Nonnull handler)

Declaration
From@property (readonly, nullable) NSString *name
To@property (readonly, nonnull) NSString *name

Declaration
From- (nonnull id<MTLCommandQueue>)newCommandQueue
To- (nullable id<MTLCommandQueue>)newCommandQueue

Declaration
From- (nonnull id<MTLCommandQueue>)newCommandQueueWithMaxCommandBufferCount:(NSUInteger)maxCommandBufferCount
To- (nullable id<MTLCommandQueue>)newCommandQueueWithMaxCommandBufferCount:(NSUInteger)maxCommandBufferCount

Declaration
From- (nonnull id<MTLHeap>)newHeapWithDescriptor:(nonnull MTLHeapDescriptor *)descriptor
To- (nullable id<MTLHeap>)newHeapWithDescriptor:(nonnull MTLHeapDescriptor *)descriptor

Declaration
From- (nonnull id<MTLBuffer>)newBufferWithLength:(NSUInteger)length options:(MTLResourceOptions)options
To- (nullable id<MTLBuffer>)newBufferWithLength:(NSUInteger)length options:(MTLResourceOptions)options

Declaration
From- (nonnull id<MTLBuffer>)newBufferWithBytes:(nonnull const void *)pointer length:(NSUInteger)length options:(MTLResourceOptions)options
To- (nullable id<MTLBuffer>)newBufferWithBytes:(nonnull const void *)pointer length:(NSUInteger)length options:(MTLResourceOptions)options

Declaration
From- (nonnull id<MTLBuffer>)newBufferWithBytesNoCopy:(nonnull void *)pointer length:(NSUInteger)length options:(MTLResourceOptions)options deallocator:(nullable void (^)(void * _Nonnull, NSUInteger))deallocator
To- (nullable id<MTLBuffer>)newBufferWithBytesNoCopy:(nonnull void *)pointer length:(NSUInteger)length options:(MTLResourceOptions)options deallocator:(nullable void (^)(void * _Nonnull, NSUInteger))deallocator

Declaration
From- (nonnull id<MTLDepthStencilState>)newDepthStencilStateWithDescriptor:(nonnull MTLDepthStencilDescriptor *)descriptor
To- (nullable id<MTLDepthStencilState>)newDepthStencilStateWithDescriptor:(nonnull MTLDepthStencilDescriptor *)descriptor

Declaration
From- (nonnull id<MTLTexture>)newTextureWithDescriptor:(nonnull MTLTextureDescriptor *)descriptor
To- (nullable id<MTLTexture>)newTextureWithDescriptor:(nonnull MTLTextureDescriptor *)descriptor

Declaration
From- (nonnull id<MTLTexture>)newTextureWithDescriptor:(nonnull MTLTextureDescriptor *)descriptor iosurface:(nonnull IOSurfaceRef)iosurface plane:(NSUInteger)plane
To- (nullable id<MTLTexture>)newTextureWithDescriptor:(nonnull MTLTextureDescriptor *)descriptor iosurface:(nonnull IOSurfaceRef)iosurface plane:(NSUInteger)plane

Declaration
From- (nonnull id<MTLSamplerState>)newSamplerStateWithDescriptor:(nonnull MTLSamplerDescriptor *)descriptor
To- (nullable id<MTLSamplerState>)newSamplerStateWithDescriptor:(nonnull MTLSamplerDescriptor *)descriptor

Declaration
From- (nonnull id<MTLFence>)newFence
To- (nullable id<MTLFence>)newFence

Optional
FromOptional
ToRequired

MTLHeap.h
MTLIndirectArgumentEncoder.h
MTLLibrary.h
MTLParallelRenderCommandEncoder.h
Declaration
From- (nonnull id<MTLRenderCommandEncoder>)renderCommandEncoder
To- (nullable id<MTLRenderCommandEncoder>)renderCommandEncoder

MTLRenderCommandEncoder.h
Declaration
From- (void)useResources:(nullable id<MTLResource> _Nullable const [])resources count:(NSUInteger)count usage:(MTLResourceUsage)usage
To- (void)useResources:(nonnull id<MTLResource> _Nonnull const [])resources count:(NSUInteger)count usage:(MTLResourceUsage)usage

Declaration
From- (void)useHeaps:(nullable id<MTLHeap> _Nullable const [])heaps count:(NSUInteger)count
To- (void)useHeaps:(nonnull id<MTLHeap> _Nonnull const [])heaps count:(NSUInteger)count

MTLRenderPipeline.h
MTLResource.h
MTLSampler.h
MTLTexture.h
Declaration
From- (nonnull id<MTLTexture>)newTextureViewWithPixelFormat:(MTLPixelFormat)pixelFormat
To- (nullable id<MTLTexture>)newTextureViewWithPixelFormat:(MTLPixelFormat)pixelFormat

Declaration
From- (nonnull id<MTLTexture>)newTextureViewWithPixelFormat:(MTLPixelFormat)pixelFormat textureType:(MTLTextureType)textureType levels:(NSRange)levelRange slices:(NSRange)sliceRange
To- (nullable id<MTLTexture>)newTextureViewWithPixelFormat:(MTLPixelFormat)pixelFormat textureType:(MTLTextureType)textureType levels:(NSRange)levelRange slices:(NSRange)sliceRange