mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
c38affcded
* All renderdoc code up to this point was written by me, history is available by request
86 lines
4.4 KiB
XML
86 lines
4.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<topic id="32C47E20-0FA2-4F52-B33A-4440EBCCBCE4" revisionNumber="1">
|
|
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<introduction>
|
|
<para>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.</para>
|
|
</introduction>
|
|
<section address="Annotation">
|
|
<title>Annotating resources with names</title>
|
|
<content>
|
|
<para>It is much easier to browse and debug frames when the resources are
|
|
given meaningful names - along with including
|
|
<link xlink:href="8a7568ca-6b2c-4873-b8eb-d1ad2aff9629">debugging information in shaders</link> and
|
|
marking up the frame with
|
|
<link xlink:href="16D2B42E-65B0-40D1-AB91-AD2B156F5DA0">hierarchical user-defined regions</link>.</para>
|
|
<para>The way this is done varies by API. In D3D11 the resource is named in this way:</para>
|
|
|
|
<code language="cpp">
|
|
// 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"));
|
|
</code>
|
|
|
|
<para>When this texture is bound to the pipeline it will be listed like so:</para>
|
|
<mediaLink>
|
|
<caption placement="after" lead="Named Texture">The example texture bound with name displayed.</caption>
|
|
<image xlink:href="NamedTex"/>
|
|
</mediaLink>
|
|
|
|
<para>In a similar way any other resource can be named and this will be useful throughout
|
|
the rest of the analysis.</para>
|
|
</content>
|
|
</section>
|
|
<section address="TextureList">
|
|
<title>Texture list in Texture Viewer</title>
|
|
<content>
|
|
<para>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
|
|
<mediaLinkInline><image xlink:href="page_white_link"/></mediaLinkInline>. When clicked on
|
|
this will open a sidebar on the texture viewer that lists all textures.</para>
|
|
<mediaLink>
|
|
<caption placement="after" lead="Texture list">The sidebar showing the list of textures</caption>
|
|
<image xlink:href="TexList"/>
|
|
</mediaLink>
|
|
<para>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.</para>
|
|
<para>When selecting and opening one of the textures from here, a new tab is opened in
|
|
the texture viewer that follows that texture.</para>
|
|
</content>
|
|
</section>
|
|
<section address="LockedTexture">
|
|
<title>Locked tab of a Texture</title>
|
|
<content>
|
|
<para>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.</para>
|
|
<para>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.</para>
|
|
<mediaLink>
|
|
<caption placement="after" lead="Texture Tabs">Default tab following pipeline slot vs Locked tab.</caption>
|
|
<image xlink:href="CurrentVsLockedTab"/>
|
|
</mediaLink>
|
|
<para>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.</para>
|
|
<para>Opening a texture from the pipeline state viewer
|
|
(<link xlink:href="7A620DF5-332E-44CA-8FD5-9E47A9C4CC3E" />)
|
|
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.</para>
|
|
<mediaLink>
|
|
<caption placement="after" lead="Opening new Tab">Opening a new locked tab for a texture.</caption>
|
|
<image xlink:href="OpenLockedTab"/>
|
|
</mediaLink>
|
|
</content>
|
|
</section>
|
|
<relatedTopics>
|
|
<link xlink:href="2c540574-0b81-4a40-8119-ba0283fddf41" />
|
|
</relatedTopics>
|
|
</developerConceptualDocument>
|
|
</topic>
|