<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: -",
    "macOS: 11.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLAccelerationStructureCommandEncoder/useResources(_:usage:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "s:So38MTLAccelerationStructureCommandEncoderP5MetalE12useResources_5usageySaySo11MTLResource_pG_So0I5UsageVtF"
  },
  "title" : "useResources(_:usage:)"
}
-->

# useResources(_:usage:)

Makes multiple resources available to the acceleration structure pass.

```
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(_:)`](/documentation/Metal/MTLComputeCommandEncoder/useHeap(_:)), overwrites any previously specified usage options for future dispatch calls within the same compute command encoder.

> Note:
> You can track resource access and dependency hazards with ``doc://com.apple.metal/documentation/Metal/MTLFence`` instances.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)