Argument buffer resource preparation commands
Load individual resources and multiple resources within a heap into GPU memory so that they’re available to shaders through argument buffers.
Overview
These methods encode commands that load resources into GPU memory, making them accessible to your shaders through argument buffers. To load an individual resource, call the useResource(_:usage:stages:) method, or another resource-based method. Alternatively, you can load all the resources within a heap by calling the useHeap(_:stages:) method or another heap-based method.
To give shaders write or read/write access to specific resources within a heap, call a resource-based method after the heap-based method. Metal combines usage modes you set for a resource through both heap and resource methods.
For more information, see Improving CPU performance by using argument buffers.