Optimize Draw Calls
Updated: Oct 26, 2026
Find the most expensive draw calls
Time draw calls in the Event Browser
The Event Browser has an icon-only timer button with the tooltip “Time durations for the actions”. Select the arrow next to the timer button to open the timer dropdown, which has four entries. One entry is checked at a time. Clicking the timer button runs the checked entry.
- Drawcall: Measures the GPU time of each action, such as a draw call or a dispatch. Parent rows show the sum of their children. On Vulkan, this entry uses
VK_QCOM_elapsed_timer_query when the device supports it. Without the extension, Vulkan uses a timestamp fallback that measures a whole bin on a tiled GPU, not a single draw. On OpenGL ES, this entry uses a GL_TIME_ELAPSED query. - RenderPass: Measures the time from the begin to the end of each render pass, not individual draw calls. This entry is greyed out for OpenGL captures.
- Frame: Measures the whole frame and shows one value on the root Frame row.
- PostHoc Analysis: Measures the cost of a draw call to the frame. See the section “Measure the cost of a draw call with PostHoc Analysis”.
The results appear in the Duration column, in the time unit set for the Event Browser.
Drawcall is checked when a capture loads. If you replay a Vulkan capture on a device without VK_QCOM_elapsed_timer_query support, PostHoc Analysis is checked instead. If that device is a headset connected through ADB, Drawcall is also greyed out.
Start with Drawcall to rank draw calls by GPU time. Use PostHoc Analysis when Drawcall is unavailable, or to see how much a draw call adds to the frame time.
Measure the cost of a draw call with PostHoc Analysis
PostHoc Analysis measures the cost of a draw call to the frame. It takes 9 samples per draw call. The value for a draw call is the time of a reference frame minus the time of the frame with that draw call skipped. Values under 80 microseconds show in italic grey and are noise. PostHoc Analysis requires that you open the capture on the Profiling Mode replay context of the device.
Measure the whole frame
A whole-frame run measures every action in the frame except dispatches, markers, passes, Present, and command buffer boundaries.
- In the timer dropdown, select the PostHoc Analysis entry.
- Select nothing, or select a marker, render pass, dispatch, Present, or command buffer boundary.
- Click the timer button.
- In the Post-Hoc Analysis dialog, which warns that PostHoc Analysis “measures the cost of an api call by replaying the scene multiple times”, confirm to continue. You can cancel instead. A progress dialog shows while the analysis runs, and you can cancel from it.
Measure one draw call
- In the timer dropdown, select the PostHoc Analysis entry.
- Select the draw call.
- Click the timer button.
A one-draw run shows no confirmation dialog.
The results go to the Duration column. A whole-frame run also opens the Performance Counter Viewer with an EID column and a PostHoc Analysis column, and you can sort the table by either column. A one-draw run adds its result to the existing Duration values. A whole-frame run clears earlier values first.
The Performance Counter Viewer that PostHoc Analysis opens is separate from the draw call trace described in “Find out why a draw call is slow”. The two use the same window, but the table comes from PostHoc Analysis.
Run the measurements from the command line
From a host computer with the headset connected over ADB, use renderdoccmd adb-posthoc-analysis to get JSON with the cost of each draw call, sorted from most to least costly. Use renderdoccmd adb-action-time to get the GPU time of each action.
adb-posthoc-analysis flags:
--device: The ADB serial of the device.--capture: The path to the capture file.--eids: A comma-separated list of event IDs to measure. The default is every skippable action in the capture.--samples: The number of samples per draw call. The default is 9.--retries: The number of connection retries for the remote server. The default is 20.
adb-action-time flags:
--device: The ADB serial of the device.--capture: The path to the capture file.--samples: The number of samples. The default is 1.--profiling: Starts the remote server in profiling mode. The default is normal mode, which is the mode the Drawcall timer in the Event Browser uses.--retries: The number of connection retries for the remote server. The default is 20.
On Vulkan, adb-action-time fails when the device does not support VK_QCOM_elapsed_timer_query.
renderdoccmd adb-posthoc-analysis --device SERIAL --capture capture.rdc
renderdoccmd adb-action-time --device SERIAL --capture capture.rdc --samples 3
Find out why a draw call is slow
The timers show how long each draw call takes. A draw call trace shows what limits it. Run a draw call trace on the capture, then find the rows for the draw calls you identified by their EID.
Note: Due to a bug in Qualcomm’s drivers, sometimes you will fail to capture Meta VR device-specific counters with the error message “Failed to retrieve drawcall trace results. Received 0 metrics.” If this happens, close RenderDoc Meta Fork, close the app in-headset, and relaunch both, then try again. If you are still getting errors after 2-3 tries, this may indicate API-level errors in your application that require investigation.
To perform a draw call trace, load a capture and select Window > Performance Counter Viewer.
Click the Capture counters button.
Check the desired metrics, then click Sample counters.
After replaying the scene on a Meta VR device, the Performance Counter Viewer displays the draw call metrics results.
The results table in the Performance Counter Viewer displays one row per draw call and one column per selected metric. You can double-click any row to jump to that draw call in the Event Browser and inspect the associated pipeline state, textures, and shaders.
Finding expensive draw calls
Sort the table by the Clocks column (descending) to surface the most expensive draw calls first. You can also sort by % Shaders Busy to identify draws that consume the largest share of GPU shader resources. These high-cost draws are the best candidates for optimization.
The per-draw metrics can help pinpoint what is limiting GPU performance for a given draw call:
- High
% Texture Fetch Stall — The draw is texture-bound. Consider reducing texture resolution, using more aggressive mip levels, or switching to a lighter compression format such as ASTC. - High
% Vertex Fetch Stall — The draw is vertex-bound. Look for overly dense meshes or inefficient vertex formats that can be simplified. - High
Clocks — The draw is generally expensive. Review the associated fragment and vertex shaders for complexity, and check whether the draw can be batched or culled.