This page documents how to annotate your resources with user-friendly names to make it easier to follow use of them throughout the frame, as well as the functions for finding and following textures by name rather than by usage.

# Annotating resources with names

It is much easier to browse and debug frames when the resources are given meaningful names - along with including debugging information in shaders and marking up the frame with hierarchical user-defined regions.

The way this is done varies by API. In D3D11 the resource is named in this way:

// Creating an example resource - a 2D Texture. ID3D11Texture2D *tex2d = NULL; d3dDevice->CreateTexture2D(&descriptor, NULL, &tex2d);

// Give the buffer a useful name tex2d->SetPrivateData(WKPDID_D3DDebugObjectName, "Example Texture", sizeof("Example Texture"));

When this texture is bound to the pipeline it will be listed like so:

The example texture bound with name displayed.

In a similar way any other resource can be named and this will be useful throughout the rest of the analysis.

# Texture list in Texture Viewer

In the texture viewer you can open a filterable list of all textures in the capture. This can be opened with the texture list icon . When clicked on this will open a sidebar on the texture viewer that lists all textures.

The sidebar showing the list of textures

This list of textures can be filtered by a custom string which will narrow the list of textures displayed, or simply by their creation flags as either a render target or a texture.

When selecting and opening one of the textures from here, a new tab is opened in the texture viewer that follows that texture.

# Locked tab of a Texture

By default the tab open in the texture viewer follows whichever pipeline slot is currently selected. When a new event is selected this tab can display a new texture if the contents of that slot has changed.

If you want to follow a particular texture even as it becomes unbound or moves from output to input and vice versa, you can open a new locked tab that will stay consistently on this texture.

Default tab following pipeline slot vs Locked tab.

This can be done by locating the texture by name as above, then clicking on the entry in the list. This will open up a new tab for this texture which will not change regardless of the current pipeline state, or current event.

Opening a texture from the pipeline state viewer () will also open a new locked tab for the texture in question. You can also open a new locked tab by right clicking on the texture thumbnail while it is currently bound.

Opening a new locked tab for a texture.