Metal iOS 10.3 to 11.0 API Differences

MTLArgument.h
Added MTLType
Modified MTLStructType
Superclass
FromNSObject
ToMTLType

Modified MTLArrayType
Superclass
FromNSObject
ToMTLType

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

MTLCaptureManager.h
MTLCaptureScope.h
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

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

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

AvailabilityDeprecation Message
FromAvailablenone
ToDeprecatedUse MTLCaptureScope instead

MTLComputeCommandEncoder.h
Declaration
From- (void)setBuffers:(id<MTLBuffer> _Nullable const [])buffers offsets:(const NSUInteger [])offsets withRange:(NSRange)range
To- (void)setBuffers:(nonnull id<MTLBuffer> _Nullable const [])buffers offsets:(nonnull const NSUInteger [])offsets withRange:(NSRange)range

Declaration
From- (void)setTextures:(nullable id<MTLTexture> _Nullable const [])textures withRange:(NSRange)range
To- (void)setTextures:(nonnull id<MTLTexture> _Nullable const [])textures withRange:(NSRange)range

Declaration
From- (void)setSamplerStates:(nullable id<MTLSamplerState> _Nullable const [])samplers withRange:(NSRange)range
To- (void)setSamplerStates:(nonnull id<MTLSamplerState> _Nullable const [])samplers withRange:(NSRange)range

Declaration
From- (void)setSamplerStates:(nullable id<MTLSamplerState> _Nullable const [])samplers lodMinClamps:(nullable const float [])lodMinClamps lodMaxClamps:(nullable const float [])lodMaxClamps withRange:(NSRange)range
To- (void)setSamplerStates:(nonnull id<MTLSamplerState> _Nullable const [])samplers lodMinClamps:(nonnull const float [])lodMinClamps lodMaxClamps:(nonnull const float [])lodMaxClamps withRange:(NSRange)range

MTLComputePipeline.h
MTLDevice.h
Removed #def MTLFeatureSet_TVOS_GPUFamily1_v1
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<MTLSamplerState>)newSamplerStateWithDescriptor:(nonnull MTLSamplerDescriptor *)descriptor
To- (nullable id<MTLSamplerState>)newSamplerStateWithDescriptor:(nonnull MTLSamplerDescriptor *)descriptor

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

MTLHeap.h
MTLLibrary.h
Removed MTLRenderPipelineErrorDomain
Removed MTLRenderPipelineError
Removed MTLRenderPipelineErrorInternal
Removed MTLRenderPipelineErrorUnsupported
Removed MTLRenderPipelineErrorInvalidInput
MTLParallelRenderCommandEncoder.h
Declaration
From- (nonnull id<MTLRenderCommandEncoder>)renderCommandEncoder
To- (nullable id<MTLRenderCommandEncoder>)renderCommandEncoder

MTLPipeline.h
MTLPixelFormat.h
MTLRenderCommandEncoder.h
Declaration
From- (void)setVertexBuffers:(id<MTLBuffer> _Nullable const [])buffers offsets:(const NSUInteger [])offsets withRange:(NSRange)range
To- (void)setVertexBuffers:(nonnull id<MTLBuffer> _Nullable const [])buffers offsets:(nonnull const NSUInteger [])offsets withRange:(NSRange)range

Declaration
From- (void)setVertexTextures:(nullable id<MTLTexture> _Nullable const [])textures withRange:(NSRange)range
To- (void)setVertexTextures:(nonnull id<MTLTexture> _Nullable const [])textures withRange:(NSRange)range

Declaration
From- (void)setVertexSamplerStates:(nullable id<MTLSamplerState> _Nullable const [])samplers withRange:(NSRange)range
To- (void)setVertexSamplerStates:(nonnull id<MTLSamplerState> _Nullable const [])samplers withRange:(NSRange)range

Declaration
From- (void)setVertexSamplerStates:(nullable id<MTLSamplerState> _Nullable const [])samplers lodMinClamps:(nullable const float [])lodMinClamps lodMaxClamps:(nullable const float [])lodMaxClamps withRange:(NSRange)range
To- (void)setVertexSamplerStates:(nonnull id<MTLSamplerState> _Nullable const [])samplers lodMinClamps:(nonnull const float [])lodMinClamps lodMaxClamps:(nonnull const float [])lodMaxClamps withRange:(NSRange)range

Declaration
From- (void)setFragmentBuffers:(id<MTLBuffer> _Nullable const [])buffers offsets:(const NSUInteger [])offset withRange:(NSRange)range
To- (void)setFragmentBuffers:(nonnull id<MTLBuffer> _Nullable const [])buffers offsets:(nonnull const NSUInteger [])offsets withRange:(NSRange)range

Declaration
From- (void)setFragmentTextures:(nullable id<MTLTexture> _Nullable const [])textures withRange:(NSRange)range
To- (void)setFragmentTextures:(nonnull id<MTLTexture> _Nullable const [])textures withRange:(NSRange)range

Declaration
From- (void)setFragmentSamplerStates:(nullable id<MTLSamplerState> _Nullable const [])samplers withRange:(NSRange)range
To- (void)setFragmentSamplerStates:(nonnull id<MTLSamplerState> _Nullable const [])samplers withRange:(NSRange)range

Declaration
From- (void)setFragmentSamplerStates:(nullable id<MTLSamplerState> _Nullable const [])samplers lodMinClamps:(nullable const float [])lodMinClamps lodMaxClamps:(nullable const float [])lodMaxClamps withRange:(NSRange)range
To- (void)setFragmentSamplerStates:(nonnull id<MTLSamplerState> _Nullable const [])samplers lodMinClamps:(nonnull const float [])lodMinClamps lodMaxClamps:(nonnull const float [])lodMaxClamps withRange:(NSRange)range

MTLRenderPass.h
MTLRenderPipeline.h
MTLResource.h
MTLSampler.h
MTLStageInputOutputDescriptor.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

MTLTypes.h
MTLVertexDescriptor.h