useResources(_:usage:)
Makes multiple resources available to the acceleration structure pass.
Declaration
func useResources(_ resources: [any MTLResource], usage: MTLResourceUsage)Parameters
- resources:
An array of resources within an argument buffer.
- usage:
Options that indicate how a GPU function accesses each resource in
resources.
Discussion
This method makes the resources resident for the duration of a compute pass and ensures that they are in a format compatible with the compute function.
Call this method before issuing any dispatch calls that may access the resource. Calling this method again, or calling useHeap(_:), overwrites any previously specified usage options for future dispatch calls within the same compute command encoder.