Instance Method

useHeap:

Adds the resources in a heap to the render pass.

Required.

Declaration

- (void)useHeap:(id<MTLHeap>)heap;

Parameters

heap

A heap that contains resources within an argument buffer.

Discussion

This method makes all the resources in the heap resident for the duration of the render pass and ensures that they're in a format compatible with the graphics function.

Call this method before issuing any draw calls that access the resources in the heap.

You may only read or sample resources within the specified heap. This method ignores render targets (textures that specify a MTLTextureUsageRenderTarget usage option) and writable textures (textures that specify a MTLTextureUsageShaderWrite usage option) within the heap. To use these resources, you must call the useResource:usage: method instead.

See Also

Specifying Resource Usage for Argument Buffers

- useResource:usage:stages:

Adds an untracked resource to the render pass, specifying which render stages need it.

Required.

- useResources:count:usage:stages:

Adds an array of untracked resources to the render pass, specifying which stages need them.

Required.

- useHeap:stages:

Adds the resources in a heap to the render pass, specifying which render stages need them.

Required.

- useHeaps:count:stages:

Adds the resources in an array of heaps to the render pass, specifying which render stages need them.

Required.

- useResource:usage:

Adds an untracked resource to the render pass.

Required.

- useResources:count:usage:

Adds an array of untracked resources to the render pass.

Required.

- useHeaps:count:

Adds the resources in an array of heaps to the render pass.

Required.

MTLResourceUsage

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