Graphics are a core element of any VR experience. When they’re rendered smoothly and consistently, graphics encourage a better user experience and prevent immersion-breaking hiccups.
RenderDoc has been an industry-leading graphics debugger for many years, and with the latest updates, Meta now maintains its own fork of RenderDoc to help you optimize graphics for Meta Quest. The addition of Meta Quest-specific features—namely the availability of low-level GPU profiling data from Meta Quest’s Snapdragon 835, Meta Quest 2’s Snapdragon XR2, and Meta Quest Pro’s Snapdragon XR2+ chips—makes it a tool that should be in every Meta Quest developer’s toolkit. It can be used to optimize apps and experiences and diagnose technical issues that other tools can't. For graphically complex apps that rely on performance, this is an essential tool for optimizing performance to give users the smoothest experience.
To get started with the new
RenderDoc Meta Fork, you’ll first need to uninstall previous versions of RenderDoc for Oculus and download RenderDoc Meta Fork
here.
Below, we dive into some RenderDoc Meta Fork features that can help you optimize your app’s graphics.
Taking and Loading a Capture
The first step towards optimizing your graphics with RenderDoc Meta Fork is taking and loading a capture. Doing so provides a flexible foundation for you to use the features listed below. To learn how to take and load a capture, check out our
documentation.
Render Stage Trace
Due to the Meta Quest GPU’s tiled architecture, the rendering of a surface is divided into bins and then executed in stages. By performing a render stage trace and viewing its output in the Tile Timeline view, you can identify hidden states like the rendering mode of a surface or the number of bins executed.
The top row of the timeline shows each of the surfaces rendered to in succession during the frame. Each block on the first row represents a surface and displays the associated data.
The second row of the timeline shows the active bin. The Render/StoreColor/LoadColor/StoreDS/LoadDS render stages can belong to a bin and have an additional bin row above them if the surface is rendering with binning mode enabled.
The third row of the timeline lists all the render stages for each tile on a given surface. This provides accurate timings (in microseconds) for each render stage, with a color key and label indicating the specific render stage.
To learn more about how to perform a render stage trace, check out our
documentation.
Draw Call Trace
A draw call trace displays
user-selected metrics pertaining to each draw call in the Performance Counter Viewer.
There are currently 50 user-selected metrics available in Renderdoc Meta Fork’s performance counters.
One of the most important metrics is the GPU clock metric. When RenderDoc Meta Fork queries for the Performance Counters, the draw calls are executed one by one without parallelism. For every cycle the GPU is performing an operation due to the draw call, the GPU clock counter will be incremented by one. Draw calls that occupy more bins will naturally have a larger GPU clock metric because bins are processed one at a time. The GPU clock metric is a measure of the draw call latency rather than throughput. In a normal execution environment, the device will employ a variety of latency hiding techniques, which can result in overlap of many operations. Therefore, it’s important to not over-index the GPU Clock metric as the latency hiding techniques can be just as crucial in achieving high performance for your app.
The metrics returned by a draw call trace can give developers an overview of graphics performance in their app when it’s running on a Meta Quest headset and help them isolate issues that could be a target for optimization.
To learn more about how to perform a draw call trace, check out our
documentation.
Retrieve Vulkan Shader Stats
RenderDoc Meta Fork offers access to Meta Quest shader stats through the Vulkan extension KHR_pipeline_executable_properties. RenderDoc Meta Fork implements this extension as a shader disassembly option in the shader module panel, so it's not necessary to write code to retrieve them.
There are currently 18 shader stats available in RenderDoc Meta Fork.
Shaders can be expensive to use when it comes to graphics performance. By accessing Vulkan shader stats, you can get info on the number of instructions and registers and optimize where necessary. Other stats are returned as well, and
our documentation offers guidance on how to improve performance for many of them.
To learn more about how to retrieve Vulkan shader stats, check out our
documentation.
With RenderDoc Meta Fork, you have multiple features at your disposal to debug and optimize your graphics. Understanding how each of these features fit together can improve the quality of your app and provides a framework for optimizing future projects. For more ways to optimize your app with RenderDoc, check out the following documentation: