Enumeration

MTLResourceUsage

The options that describe how a resource within an argument buffer will be used in a graphics or compute function.

Declaration

typedef enum MTLResourceUsage : NSUInteger {
    ...
} MTLResourceUsage;

Overview

Multiple MTLResourceUsage values may be combined with a bitwise OR (|) if the resource will serve multiple uses over its lifetime. Enabling certain options for certain resources determines whether the Metal driver should convert the resource to another format (for example, whether to decompress a color render target).

Topics

Type Properties

MTLResourceUsageRead

An option that enables reading from the resource.

MTLResourceUsageWrite

An option that enables writing to the resource.

MTLResourceUsageSample

An option that enables sampling from the resource.

See Also

Specifying Resource Usage for Argument Buffers

- useResource:usage:

Specifies that a resource in an argument buffer can be safely used by a compute pass.

Required.

- useResources:count:usage:

Specifies that an array of resources in an argument buffer can be safely used by a compute pass.

Required.

- useHeap:

Specifies that a heap containing resources in an argument buffer can be safely used by a compute pass.

Required.

- useHeaps:count:

Specifies that an array of heaps containing resources in an argument buffer can be safely used by a compute pass.

Required.