MTLResource
An allocation of memory accessible to a GPU.
Declaration
protocol MTLResource : MTLAllocationMentioned in
Overview
When you execute commands on the GPU, those commands can only affect memory allocated as MTLResource objects. Only the MTLDevice that created these resources can modify them. Different resource types have different uses. The most common resource types are buffers (MTLBuffer), which are linear allocations of memory, and textures (MTLTexture), which hold structured image data.
Topics
Identifying the resource
Reading memory and storage properties
cpuCacheModestorageModehazardTrackingModeresourceOptionsMTLCPUCacheModeMTLStorageModeMTLHazardTrackingMode