useHeaps(_:)
Makes the resources contained in the specified heaps available to the acceleration structure pass.
Declaration
func useHeaps(_ heaps: [any MTLHeap])Parameters
- heaps:
The sets of heap that contain resources to mark as used.
Discussion
This method makes all the resources in multiple heaps resident for the duration of a compute pass and ensures that they’re in a format compatible with the compute function.
Call this method before issuing any dispatch calls that may access the resources in the heap.
You can only read or sample resources in the specified heap. This method ignores render targets (textures that specify a renderTarget usage option) and writable textures (textures that specify a shaderWrite usage option) within the heap. To use these resources, you need to call the useResource(_:usage:) method instead.