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

# useResources:count:usage:

Specifies that an array of resources in an argument buffer can be safely used by the acceleration structure pass.

```
- (void) useResources:(id<MTLResource> const[]) resources count:(NSUInteger) count usage:(MTLResourceUsage) usage;
```

## Parameters

`resources`

An array of resources within an argument buffer.

`count`

The number of resource elements in `resources`.

`usage`

Options that indicate how a GPU function accesses each resource in `resources`.

## Discussion

This method makes the array of resources resident for the duration of a compute pass and ensures that it’s in a format compatible with the compute function.

Call this method before issuing any dispatch calls that may access the array of resources. 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)