MTLDevice

Undocumented in source but is binding to Objective-C. You might be able to learn more by searching the web for its name.

Members

Functions

newBuffer
MTLBuffer newBuffer(NSUInteger length, MTLResourceOptions options)

Creates a buffer the method clears with zero values, length is size in bytes.

newBuffer
MTLBuffer newBuffer(const(void)* pointer, NSUInteger length, MTLResourceOptions options)

Allocates a new buffer of a given length and initializes its contents by copying existing data into it.

newCommandQueue
MTLCommandQueue newCommandQueue()

Creates a queue you use to submit rendering and computation commands to a GPU.

newCommandQueue
MTLCommandQueue newCommandQueue(NSUInteger maxCommandBufferCount)

Creates a queue you use to submit rendering and computation commands to a GPU that has a fixed number of uncompleted command buffers.

newDefaultLibrary
MTLLibrary newDefaultLibrary()

Creates a Metal library instance that contains the functions from your app’s default Metal library.

newIOCommandQueueWithDescriptor
MTLIOCommandQueue newIOCommandQueueWithDescriptor(MTLIOCommandQueueDescriptor descriptor, NSError* error)

Creates an input/output command queue you use to submit commands that load assets from the file system into GPU resources or system memory.

newLibraryWithSource
MTLLibrary newLibraryWithSource(NSString source, MTLCompileOptions options, NSError* error)

Synchronously creates a Metal library instance by compiling the functions in a source string.

newRenderPipelineStateWithDescriptor
MTLRenderPipelineState newRenderPipelineStateWithDescriptor(MTLRenderPipelineDescriptor descriptor, NSError* error)

Synchronously creates a render pipeline state.

newSamplerStateWithDescriptor
MTLSamplerState newSamplerStateWithDescriptor(MTLSamplerDescriptor descriptor)

Creates a sampler state instance.

newTextureWithDescriptor
MTLTexture newTextureWithDescriptor(MTLTextureDescriptor descriptor)

Creates a new texture instance.

supportsTextureSampleCount
BOOL supportsTextureSampleCount(NSUInteger sampleCount)

Returns a Boolean value that indicates whether the GPU can sample a texture with a specific number of sample points.

Meta