---
title: Inspecting the bound resources for a command
framework: xcode
role: article
role_heading: Article
path: xcode/inspecting-the-bound-resources-for-a-command
---

# Inspecting the bound resources for a command

Discover issues by examining the bound resources at any point in an encoder.

## Overview

Overview Metal’s render and compute encoders allow you to set pipeline states, bind resources, specify parameters, and encode GPU commands. The Bound Resources viewer helps you determine the bound resources at any point in an encoder.

Inspect bound resources The Bound Resources viewer displays the current set of bound resources in the encoder. You can double-click a resource row to further inspect that resource.

For a render pass, the Bound Resources viewer groups the resources in the following sections: Render Pipeline: The specified render pipeline state. Execute Indirect: The indirect command buffer (ICB) that the command executes from. Vertex/Object/Mesh/Tile/Fragment Stage: The resources in the corresponding stage. In addition, it includes the shader function. For the vertex and the mesh stage, it also includes the index buffer and output geometry. Attachments: The attachment textures. Indirect: The used indirect resources and those from the same heap. To use a resource, call useResource(_:usage:stages:) or useHeap(_:stages:). For a compute pass, the Bound Resources viewer groups the resources in the following sections: Compute Pipeline: The specified compute pipeline state. Execute Indirect: The indirect command buffer (ICB) that the command executes from. Compute: The resources in the compute pass. Indirect: The used indirect resources and those from the same heap. To use a resource, call useResource(_:usage:), useResources(_:usage:), useHeap(_:), or useHeaps(_:). The Bound Resources viewer includes the following information for all resource types:  |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |  For textures, you can add the following columns:  |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |  For buffers, you can add the following columns:  |  |   |  |   |  |  For functions, you can add the Library column to show the library that the app uses to create the function. Improve your Metal workload with Insights Click the Insights button in the bottom right corner to open a popover of recommendations for the bound resources.

Inspect resources that the shaders access The shaders don’t necessarily access every bound resource in a draw command or compute dispatch. This is very common in bindless workflows where shaders access only a small set of resources from a large heap. The Bound Resources viewer provides a top-level filter for resources that the shaders actually access. To apply the filter, click the Accessed button above the table to view only the accessed resources.

Limit your scope with filters Use the filter field at the bottom of the Bound Resources viewer to adjust the filtering criteria by typing filter terms into it. The table shows the related resources that match the filter terms. You can also click the filter button to add filters for specific kinds of resources or for the used indirect resources. When there are two or more filter terms, you can click the filter button to choose whether to match any or all of the terms. For any filter term, you can click it to choose to include or exclude resources that match the term.

## See Also

### Metal command analysis

- [Inspecting the geometry of a draw command](xcode/inspecting-the-geometry-of-a-draw-command.md)
- [Inspecting the attachments of a draw command](xcode/inspecting-the-attachments-of-a-draw-command.md)
- [Debugging the shaders within a draw command or compute dispatch](xcode/debugging-the-shaders-within-a-draw-command-or-compute-dispatch.md)
- [Analyzing draw command and compute dispatch performance with GPU counters](xcode/analyzing-draw-command-and-compute-dispatch-performance-with-gpu-counters.md)
- [Analyzing draw command and compute dispatch performance with pipeline statistics](xcode/analyzing-draw-command-and-compute-dispatch-performance-with-pipeline-statistics.md)
