Develop

RenderDoc Command-Line Reference

Updated: Oct 26, 2026
renderdoccmd is the command-line tool that ships with RenderDoc Meta Fork. This page lists its commands and options. It covers the commands for capturing and inspecting on a headset, replaying on a computer, and editing shaders.
RenderDoc AI Tools covers the same commands, organized by task. The AI skills that ship with RenderDoc Meta Fork call renderdoccmd.

Run renderdoccmd

renderdoccmd ships beside the RenderDoc Meta Fork executable.
PlatformLocation
Windows
C:\Program Files\RenderDocForMetaQuest\renderdoccmd.exe
macOS
/Applications/RenderDoc Meta Fork.app/Contents/MacOS/renderdoccmd
This page gives the locations for the Windows and macOS installers. On Windows, you can change the install folder in the installer. The installer does not add renderdoccmd to your PATH. To run it by name, add its folder to PATH. RenderDoc AI Tools has the setup commands in its “Make renderdoccmd Reachable” section.
The adb- commands run adb from your PATH, so adb must be on PATH too. The Windows installer ships adb.exe in the plugins\android folder of the install folder. It does not add that folder to PATH either.

Commands that use ADB

A command with the adb- prefix talks to a headset over ADB. You run it on your computer, not on the headset. The prefix names the protocol. It does not mean the command runs on Android, and nothing in the tool limits these commands to one host operating system.
These adb- commands start the RenderDoc server on the device. Before they start it, they force-stop any RenderDoc server that is already running. This applies to adb-launch, adb-launch-profiling, adb-launch-drawcall-profiling, adb-fetch-counters, adb-frame-time, adb-posthoc-analysis, adb-action-time, adb-render-stage-trace, and adb-session. adb-fetch-counters, adb-frame-time, adb-posthoc-analysis, adb-action-time, and adb-render-stage-trace also remove the adb port forwards that RenderDoc made for the device. adb-capture does not force-stop the server. It reuses the running one.
When you pass --remote-host adb://SERIAL, replay-verify, highlight, and highlight-by-resource also force-stop the server and remove the adb port forwards that RenderDoc made for the device. shader-get and shader-replace start the server in normal mode but do not force-stop it.
The other commands on this page run on your computer and do not use ADB, unless you pass --remote-host adb://SERIAL.

Get help and pass options

Run renderdoccmd help, or run renderdoccmd with no arguments, to list the commands with a one-line description each. Run renderdoccmd COMMAND --help to see the options of one command.
Help text goes to stderr. Use --help and not -h, because -h is a real option on replay and remoteserver. -? is also accepted as a short form of --help.
If a command has a required option and you did not pass it, COMMAND --help prints Error: need option: --NAME (or Errors: and one need option: --NAME line for each missing option), then the usage, and exits with 1. For example, renderdoccmd adb-launch --help exits with 1 because --package is missing.
Pass option values as --name=value or --name value. Short options take the form -x value.
In the syntax lines on this page, square brackets mark optional options, and capital letters mark values you replace. The option list under each command is complete, apart from --log-level and the capture options in Common options. The same short option can mean different things on different commands. For example, -f is the input file on convert, the format on thumb, and the data file on embed. Parentheses with a vertical bar, as in (-i RESOURCE_ID | -n NAME), mean you pass exactly one of the options.

Choose a device

Commands that talk to a headset resolve the device in this order:
  1. The --device option, if you pass it.
  2. The ANDROID_SERIAL environment variable.
  3. The only device in the device state that adb devices lists.
With no device attached, the command fails with No ADB device attached; pass --device <serial>. With more than one device attached, the command refuses to pick one and tells you to pass --device SERIAL or set ANDROID_SERIAL.
Required means you must pass --device. The fallbacks above apply only where it is optional.
--device is required on adb-fetch-counters, adb-frame-time, adb-posthoc-analysis, adb-action-time, adb-render-stage-trace, and adb-session. It is optional on adb-launch, adb-launch-profiling, adb-launch-drawcall-profiling, and adb-capture. The commands that take --remote-host resolve the device the same way when you pass adb:// with no serial after it.

Output and exit codes

Every adb- command except adb-session prints one line of JSON to stdout. So do replay-verify, highlight, highlight-by-resource, shader-get, and shader-replace. Progress and diagnostics go to stderr, so you can pipe stdout into a JSON parser. On this page, a shape such as {success, device} lists the fields of the JSON object. An error has this shape:
{"success":false,"error":"MESSAGE"}
capture, inject, replay, convert, thumb, embed, extract, and remoteserver print plain text.
Commands exit with 0 on success and a non-zero code on failure. The adb- commands print the error JSON and exit with 1. These cases break the usual rule:
  • capture and inject exit with the ident of the injected target, a non-zero number, when they succeed, so a non-zero exit is not a failure. capture exits with 0 when you pass --wait-for-exit.
  • thumb exits with 0 even when it cannot open the capture, find the thumbnail, or write the file. A usage error, such as a missing --out or capture file name, exits with 1.
  • shader-replace exits with 0 when the shader fails to compile. Check success in the JSON.
  • replay --remote-host exits with 1 when it cannot connect to the host. It prints an error and exits with 0 when the connection works but the capture fails to open on the host.
  • adb-capture exits with 0 only when every capture copy succeeded.
  • COMMAND --help exits with 1 when a required option is missing, as described in Get help and pass options.
  • help exits with 0. Running with no arguments, or with an unknown command, exits with 2.

Common options

Every command accepts --log-level. It sets the lowest log level printed to the console. The values are debug, log, warning, and error. The default is warning.
--retries sets the connection retry count for the remote host. The default is 20. Each command entry lists it where it applies. On the adb- commands other than adb-session that accept it, the range is 0 to 100. adb-session takes any integer. adb-launch, adb-launch-profiling, adb-launch-drawcall-profiling, and adb-capture do not take --retries.
capture, inject, and adb-launch share these capture options. The options marked flag take no value. The integer options accept 0 to 10000.
OptionMeaning
-d, --working-dir
Sets the working directory of the program, if launched
-c, --capture-file
Sets the file name template for new captures. The frame number is appended automatically
-w, --wait-for-exit
Flag. Waits for the target program to exit before returning
--opt-disallow-vsync
Flag. Disallows the application from enabling vsync
--opt-disallow-fullscreen
Flag. Disallows the application from enabling fullscreen
--opt-api-validation
Flag. Records API debugging events and messages
--opt-api-validation-unmute
Flag. Shows the API debugging output that --opt-api-validation records
--opt-capture-callstacks
Flag. Captures CPU callstacks for API events
--opt-capture-callstacks-only-actions
Flag. When capturing CPU callstacks, captures them only from actions
--opt-delay-for-debugger
Integer, default 0. Waits this many seconds for a debugger to attach
--opt-verify-buffer-access
Flag. Verifies writes to mapped buffers by bounds checking, and initializes buffers to an invalid value if they are uninitialized
--opt-hook-children
Flag. Hooks any system API calls that create child processes
--opt-ref-all-resources
Flag. Includes all live resources, not just those used by a frame
--opt-capture-all-cmd-lists
Flag. In D3D11, records all command lists from application start
--opt-soft-memory-limit
Integer, default 0. Sets a soft memory limit
--opt-capture-resident-cap
Integer, default 0. Sets a Vulkan capture-managed resident cap target in MB
--opt-capture-resident-safety-margin
Integer, default 32. Reserves this many MB as the Vulkan resident-cap safety margin
--opt-capture-resident-max-overshoot
Integer, default 16. Allows this many MB of temporary Vulkan resident-cap overshoot

Capture and measure on a headset

Every command in this section needs a headset connected over ADB. The commands that work on a capture file take it as the named option --capture, not as a positional argument. A typical order is adb-launch, then adb-capture with the ident that adb-launch prints, then the analysis commands on the downloaded capture.
CommandWhat it does
Lists the connected devices
Launches an app with RenderDoc injected
Launches an app with RenderDoc injected, in profiling mode
Launches an app in profiling mode with visual capture
Captures frames from an injected app and copies them to your computer
Fetches per-draw-call GPU metrics for a capture
Measures the GPU frame time of a capture replay on the device
Measures the GPU cost of each draw call by selective replay
Measures GPU time per action
Records a render-stage trace of a capture

adb-list

Lists the connected ADB devices.
renderdoccmd adb-list
The command takes no options of its own. It prints {"success":true,"devices":[...]} with the serial of each device in the device state. If adb is not on PATH, the command fails with an error that asks whether adb is installed and on PATH.

adb-launch

Launches an app with RenderDoc injected. The remote server starts in normal mode.
renderdoccmd adb-launch --package PACKAGE [--device SERIAL] [--activity ACTIVITY] [--intent-args ARGS] [--pair-controllers]
  • --package: required. The Android package name.
  • --device: optional. The device serial. See Choose a device.
  • --activity: the Android activity name.
  • --intent-args: extra arguments appended to the am start command, such as -e key value.
  • --pair-controllers: pairs virtual controllers after the server starts, for headless devices.
The command also accepts the capture options from Common options. It uses the --opt-* options and ignores --working-dir, --capture-file, and --wait-for-exit. With more than one device attached, the command refuses to pick one, even though its help text says it uses the first device.
The output is {success, device, package, ident}. Pass ident to adb-capture.

adb-launch-profiling

Launches an app with RenderDoc injected, with the server in profiling mode.
renderdoccmd adb-launch-profiling --package PACKAGE [--device SERIAL] [--activity ACTIVITY] [--pair-controllers]
  • --package: required. The Android package name.
  • --device: optional. The device serial. See Choose a device.
  • --activity: the Android activity name.
  • --pair-controllers: pairs virtual controllers after the server starts.
The command has no --intent-args option. The output is {success, device, package, ident, profiling_mode}, with profiling_mode set to true.

adb-launch-drawcall-profiling

Launches an app with the server in drawcall profiling mode, which combines profiling with visual capture.
renderdoccmd adb-launch-drawcall-profiling --package PACKAGE [--device SERIAL] [--activity ACTIVITY] [--pair-controllers]
  • --package: required. The Android package name.
  • --device: optional. The device serial. See Choose a device.
  • --activity: the Android activity name.
  • --pair-controllers: pairs virtual controllers after the server starts.
The command has no --intent-args option. The output adds drawcall_profile_mode: {success, device, package, ident, profiling_mode, drawcall_profile_mode}, with both mode fields set to true.

adb-capture

Captures frames from an app that an adb-launch command started, and copies each capture to your computer.
renderdoccmd adb-capture [--device SERIAL] [--ident IDENT] [--frames N] [--frame-number N] [--output-dir DIR] [--host-offload] [--copy-timeout-sec SECONDS] [--copy-retries N]
  • --device: optional. The device serial. Omit it to resolve the device automatically. See Choose a device.
  • --ident: the identifier from adb-launch. The default is 0. Omit it, or pass 0, to pick the injected app when exactly one is present on the device.
  • --frames: the number of frames to capture, from 1 to 10. The default is 1.
  • --frame-number: queues the capture at this app frame number. The default is 0, which captures the next frame immediately.
  • --output-dir: the local folder for downloaded captures. The default is ..
  • --host-offload: tries a host-backed copy first instead of the target-control socket, and falls back to adb pull.
  • --copy-timeout-sec: seconds before a host-offload copy falls back to adb pull, from 1 to 600. The default is 120.
  • --copy-retries: retries for the host-offload copy before the fallback, from 0 to 10. The default is 1.
The command waits up to 300 seconds for the captures. It copies each one to your computer and deletes it from the device. The output is {success, captures, ...}, where captures lists the local paths, followed by copy statistics.

adb-fetch-counters

Fetches per-draw-call GPU metrics from a capture through a drawcall trace.
renderdoccmd adb-fetch-counters --device SERIAL --capture CAPTURE.rdc [--counters NAMES]
  • --device: required. The device serial.
  • --capture: required. The local path to the .rdc file.
  • --counters: a comma-separated list of counter names. The default is empty, which fetches all available drawcall counters. Names must match exactly after the command trims spaces.
  • --retries: the default is 20, from 0 to 100.
The app does not need to be running. The command starts the server in profiling mode and copies the capture to the device. It runs a warm-up trace and discards it, then runs the measured trace. The run takes between 40 and 80 seconds. The command checks logcat and discards the result if the device crashed, hung, or became unreachable, or if the replay reports a fatal error or a lost device.
The output holds success, device, capture, health, crash_info, counters, drawcalls, total_drawcalls, and total_metrics. Each entry in drawcalls has eventId, name, and metrics. Values that are not finite numbers appear as null.

adb-frame-time

Measures the GPU frame time of a capture replay on the device.
renderdoccmd adb-frame-time --device SERIAL --capture CAPTURE.rdc [--samples N]
  • --device: required. The device serial.
  • --capture: required. The local path to the .rdc file.
  • --samples: the number of frame time samples, from 1 to 100. The default is 9.
  • --retries: the default is 20, from 0 to 100.
The command replays the capture on the device in profiling mode. It does not measure the live app. The output holds success, device, capture, measurement_succeeded, samples, and measurement_duration_sec. The frame_time_ms field appears only when the measurement succeeded.

adb-posthoc-analysis

Measures the GPU cost of each draw call by replaying the capture with selected draw calls skipped. For the workflow, see Optimize Draw Calls.
renderdoccmd adb-posthoc-analysis --device SERIAL --capture CAPTURE.rdc [--eids EVENT_IDS] [--samples N]
  • --device: required. The device serial.
  • --capture: required. The local path to the .rdc file.
  • --eids: a comma-separated list of event IDs. The default is empty, which analyzes every skippable action in the capture. The command rejects an event ID that is a marker, pass boundary, dispatch, command buffer boundary, or Present.
  • --samples: the number of replay samples per draw call, from 1 to 100. The default is 9.
  • --retries: the default is 20, from 0 to 100.
The command runs in profiling mode. It replays the capture once per draw call for each sample, plus one reference replay. The command fails with success set to false and exits with 1 if the device crashes, hangs, or becomes unreachable, if the replay reports a fatal error or a lost device, if the reference frame time is not measured, or if any requested draw call is not measured. The failure output also holds measured_drawcalls and unmeasured_eids. The output holds success, device, capture, health, crash_info, params, drawcalls, total_drawcalls, and total_results. Each entry in drawcalls has eventId, name, cost_ms, and cost_percent, and the list is sorted by cost, highest first. cost_percent is a string such as "12.34%".

adb-action-time

Measures the GPU time of each action in a capture. For the workflow, see Optimize Draw Calls.
renderdoccmd adb-action-time --device SERIAL --capture CAPTURE.rdc [--samples N] [--profiling]
  • --device: required. The device serial.
  • --capture: required. The local path to the .rdc file.
  • --samples: the number of counter-fetch passes over the loaded capture, from 1 to 100. The default is 1.
  • --profiling: starts the remote server in profiling mode. The default is normal mode.
  • --retries: the default is 20, from 0 to 100.
On Vulkan, the command fails when the driver lacks VK_QCOM_elapsed_timer_query. It also fails when nothing was measured. The output holds success, profiling_mode, elapsed_timer_query, samples, action_count, sum_us_mean, sum_us_per_sample, per_eid, by_command, and measurement_duration_sec. Each entry in per_eid has eid, command, us_mean, and us.

adb-render-stage-trace

Records a render-stage trace of a capture, grouped into contexts, surfaces, bins, and stages. For the workflow, see Performing a Render Stage Trace.
renderdoccmd adb-render-stage-trace --device SERIAL --capture CAPTURE.rdc [--detailed] [--metrics NAMES]
  • --device: required. The device serial.
  • --capture: required. The local path to the .rdc file.
  • --detailed: uses the full render-stage trace. The default is the low-overhead trace.
  • --metrics: a comma-separated list of per-stage metric names to capture. It implies the detailed trace with metrics. --metrics wins over --detailed.
  • --list-metrics: prints the metric catalogue of the device as JSON and exits without a trace. The output is {success, device, metric_count, metrics}, and each entry has name and description.
  • --retries: the default is 20, from 0 to 100.
The command runs in profiling mode. It fails if the profiling service does not initialize, if no data comes back, or if the device crashes or becomes unreachable. The output holds success, detail_level, device, capture, metric_names, metric_ids, contexts, summary, and health. detail_level is low_overhead, full, or with_metrics.

Replay and convert captures on a computer

These commands run on your computer and print plain text.
CommandWhat it does
Launches an executable with RenderDoc injected
Injects RenderDoc into a running process
Replays a capture and shows the backbuffer in a preview window
Converts a capture between formats
Saves the thumbnail of a capture to an image file
Writes a data section into a capture
Reads a data section out of a capture
Starts a host that listens for remote replays

capture

Launches the given executable to capture. The command runs on your computer and does not use ADB.
renderdoccmd capture [options] EXECUTABLE [program arguments]
The command takes the capture options from Common options and has no --executable option. Put the options before the executable. The first positional argument ends option parsing.
On success, the exit code is the ident of the target, which is non-zero. With --wait-for-exit it exits with 0. On failure it exits with the result code. With no executable it exits with 1.

inject

Injects RenderDoc into a running process.
renderdoccmd inject --PID PID [options]
  • --PID: required. The process ID to inject into. The option name is case-sensitive and uses capitals.
The command also takes the capture options from Common options. Like capture, it exits with the ident.

replay

Replays a capture and shows the backbuffer in a preview window. The capture is a positional argument.
renderdoccmd replay [options] CAPTURE.rdc
  • -w, --width: the preview window width. The default is 1280.
  • -h, --height: the preview window height. The default is 720.
  • -l, --loops: how many times to loop the replay. The default is 0, which loops until you close the window.
  • --remote-host: replays on this host over the network instead of locally.
The command opens a window, so it is not headless. With --remote-host, it connects to the host, copies the capture, and replays there. If the connection fails, it suggests that you run remoteserver and exits with 1. If the connection works but the capture fails to open on the host, it prints an error and exits with 0. Because -h means height here, use --help or -? for help.

convert

Converts between capture formats.
renderdoccmd convert -f INPUT_FILE -o OUTPUT_FILE [-i INPUT_FORMAT] [-c OUTPUT_FORMAT]
  • -f, --filename: the file to convert from. This is a file, not a format.
  • -o, --output: the file to convert to.
  • -i, --input-format: the format of the input file.
  • -c, --convert-format: the format of the output file.
  • --list-formats: prints the list of target formats.
-f and -o are required unless you pass --list-formats. When you omit -i or -c, the command takes the format from the file extension. The library supplies the format list at run time. The command exits with 0 on success and 1 on failure.

thumb

Saves the embedded thumbnail of a capture to disk. The capture is a positional argument.
renderdoccmd thumb --out=FILE [options] CAPTURE.rdc
  • -o, --out: required. The output file name. The option is --out, not --output.
  • -f, --format: the output format, one of jpg, png, bmp, or tga. If you omit it, the command detects the format from the file name.
  • -s, --max-size: the maximum dimension of the thumbnail. The default is 0, which is unlimited.
If the command cannot guess the format, it uses JPG. If it cannot open the capture, find the thumbnail, or write the file, it prints an error and still exits with 0. A usage error, such as a missing --out or capture file name, exits with 1.

embed

Writes an arbitrary data section into a capture. The capture is a positional argument.
renderdoccmd embed -s SECTION -f FILE [options] CAPTURE.rdc
  • -s, --section: required. The embedded section name.
  • -f, --file: required. The file to read the section contents from.
  • -n, --no-clobber: does not overwrite the section if it already exists.
  • --lz4: compresses the data with LZ4.
  • --zstd: compresses the data with Zstandard. If you pass both --zstd and --lz4, --zstd wins.
  • --list-sections: prints a list of known sections.
-s and -f are required even with --list-sections. The command modifies the capture file in place. It exits with 1 on failure.

extract

Reads an arbitrary data section out of a capture. The capture is a positional argument.
renderdoccmd extract -s SECTION -f FILE [options] CAPTURE.rdc
  • -s, --section: required. The embedded section name.
  • -f, --file: required. The file to write the section contents to.
  • -n, --no-clobber: does not overwrite the file if it already exists.
  • --list-sections: prints a list of known sections.
-s and -f are required even with --list-sections. The command exits with 1 on failure.

remoteserver

Starts a server that listens as a host for remote replays. This is the server on your computer, not the server on the headset.
renderdoccmd remoteserver [options]
  • -d, --daemon: goes into the background.
  • -h, --host: the interface to listen on. By default the server listens on all interfaces.
  • -v, --preview: shows a preview window when a replay is active.
  • -p, --port: the port to listen on. The default is 0, which uses the default RenderDoc port.
-h means --host here. Use --help or -? for help.

Inspect captures and replace shaders

CommandWhat it does
Finds a rendering pass by name and saves a screenshot of its output
Paints chosen draw calls in a color
Paints every draw call that binds a resource
Gets the shader source for one stage of a draw call
Replaces the shader of a draw call and replays
These commands open a capture, take it as a positional argument, and print one line of JSON. Each accepts --remote-host to replay on another host, such as adb://SERIAL, and --api-validation to turn on API validation layers during replay. --api-validation has no effect with adb://. --retries defaults to 20.

replay-verify

Opens a capture, finds a rendering pass by name, and saves a screenshot of the output target.
renderdoccmd replay-verify -p PASS_NAME [-o FILE] [-f FORMAT] [-d DRAW_INDEX] [--remote-host adb://SERIAL] CAPTURE.rdc
renderdoccmd replay-verify --list-passes CAPTURE.rdc
  • -p, --pass-name: a case-insensitive substring of the pass name. Required unless you pass --list-passes.
  • -o, --output: the screenshot file path. The default is empty, which saves to CAPTURE_output.FORMAT next to the capture, using the capture name without its extension.
  • -f, --format: jpg, png, or bmp. The default is png.
  • -d, --draw-index: last or a 0-based draw index within the pass. The default is last.
  • -r, --remote-host: replays on a remote host.
  • -l, --list-passes: lists all rendering passes as JSON.
The command finds passes from the begin and end pass markers, and falls back to clear actions. It takes the first pass whose name matches, selects the draw, and saves its first output. It does no image comparison and takes no reference image. With adb://, it force-stops the on-device server and starts it in normal mode.
With --list-passes, the output is {success, passes, total_draws, api_validation_enabled}. Each entry in passes has index, name, draw_count, and has_color_output. A normal run prints {success, capture_file, pass_name, pass_index, pass_draw_count, selected_draw_event_id, selected_draw_name, output_file, output_width, output_height, api_validation_enabled}.

highlight

Renders a capture and paints one or more draw calls in a color you choose.
renderdoccmd highlight -o OUT.tga -e SPEC [-s SLICE] [--remote-host HOST] CAPTURE.rdc
  • -o, --output: required. The output image path. The format is TGA only.
  • -e, --eids: required. A semicolon-separated list of EID or EID:R,G,B[,A] entries. Components run from 0 to 255 and alpha defaults to 255. A bare event ID uses magenta.
  • -s, --slice: the multiview array slice to render. 0 is the left eye and 1 is the right eye. The default is 0.
  • -r, --remote-host: replays on a remote host, such as adb://SERIAL or HOST:PORT.
A .png output path is an error. Any other extension gets .tga appended. The command has no --mode or --event-ids option. A spec looks like 1162:255,0,255;2534:255,128,0,200.
The output is {success, capture_file, output_file, output_width, output_height, final_frame_eid, final_frame_resource_id, slice, highlights, api_validation_enabled}.

highlight-by-resource

Renders a capture and paints every draw call that binds a given resource.
renderdoccmd highlight-by-resource -o OUT.tga (-i RESOURCE_ID | -n NAME) [-c COLOR] [-s SLICE] CAPTURE.rdc
renderdoccmd highlight-by-resource --list-only (-i RESOURCE_ID | -n NAME) CAPTURE.rdc
  • -o, --output: the output image path. Required unless you pass --list-only. The format is TGA only.
  • -i, --resource-id: an exact resource ID, as a 64-bit unsigned integer with an optional ResourceId:: prefix.
  • -n, --resource-name: a case-insensitive substring match against resource debug names.
  • -c, --color: the paint color, as R,G,B[,A] with values from 0 to 255, or as #RRGGBB[AA]. The default is 255,0,255,255, which is magenta.
  • -s, --slice: the multiview array slice. The default is 0.
  • -r, --remote-host: replays on a remote host.
  • -l, --list-only: lists the matched resources and event IDs without rendering. It needs no --output.
You must give one of --resource-id or --resource-name. Use a .tga output path. The help text lists .png, .jpg, and .bmp, but the command saves TGA only and a PNG path fails. Every matched draw call is painted in the one --color.
With --list-only, the output is {success, capture_file, matched_resources, matched_eids, matched_eid_count}. Each entry in matched_resources has resource_id and name.
Without --list-only, the output is {success, capture_file, output_file, output_width, output_height, final_frame_eid, final_frame_resource_id, slice, matched_resources, matched_eid_count, highlights, api_validation_enabled}.

shader-get

Gets the shader source for the shader stage of one draw call.
renderdoccmd shader-get -e EVENT_ID -s STAGE [-n ENCODING] [-o FILE] CAPTURE.rdc
  • -e, --event-id: required. The draw call event ID.
  • -s, --stage: required. One of vs (vertex), ps (pixel or fragment), cs (compute), gs (geometry), hs (hull or tessellation control), ds (domain or tessellation evaluation), ts (task), or ms (mesh).
  • -n, --encoding: the shader encoding you want: spirv, spirvasm, glsl, or hlsl.
  • -r, --remote-host: replays on a remote host.
  • -o, --output: writes the shader source to a file. The source is still embedded in the JSON.
Without --encoding, the command returns the embedded debug source if the shader has one, and the default disassembly otherwise. For glsl or hlsl, the command uses a native disassembly target when the driver has one. Otherwise it returns SPIR-V disassembly and reports the encoding as spirvasm. The spirv encoding returns base64 bytes in source_base64 when the shader is SPIR-V. For any other shader, the command returns the default disassembly and reports the encoding as spirvasm.
The output holds success, event_id, stage, shader_resource_id, encoding, entry_point, original_encoding, source or source_base64, files, available_target_encodings, and available_disassembly_targets. When you pass --output, the output also holds output_file. Without --encoding, encoding is the encoding of the debug source, or disassembly.

shader-replace

Replaces the shader of a draw call with new source, compiles it again, and replays. For the shader override workflow, see Accessing Vulkan Shader Stats.
renderdoccmd shader-replace -e EVENT_ID -s STAGE -n ENCODING -f FILE [-p ENTRY_POINT] [-o SCREENSHOT] CAPTURE.rdc
  • -e, --event-id: required. The draw call event ID.
  • -s, --stage: required. The shader stage, with the same values as shader-get.
  • -n, --encoding: required. The source encoding: spirv, glsl, hlsl, dxbc, dxil, or slang.
  • -f, --source-file: required. The path to the replacement shader source file.
  • -p, --entry-point: the shader entry point name. The default is main.
  • -r, --remote-host: replays on a remote host.
  • -o, --output: saves a screenshot after the second replay to this path.
  • --output-format: the screenshot format, jpg, png, or bmp. The default is png.
The replacement applies to this replay only. The command compiles the source, replaces the shader, replays again, optionally saves a screenshot, and frees the replacement. It does not modify the .rdc file, and nothing persists. A compile failure prints {success:false, event_id, stage, compile_errors} and exits with 0.
On success, the output holds success, event_id, stage, original_shader_id, replacement_shader_id, and compile_errors, plus output_file or screenshot_error when you pass --output.

Interactive session

adb-session

Starts a persistent replay session on a headset. The command reads requests from stdin and writes responses to stdout.
renderdoccmd adb-session --device SERIAL --capture CAPTURE.rdc [--remote-capture PATH] [--retries N] [--profiling] [--drawcall-profiling] [--apply-replacement SPEC]
  • --device: required. The device serial.
  • --capture: required. The path to the .rdc file. It stays required when you pass --remote-capture.
  • --remote-capture: the on-device path to the .rdc file. It skips the copy of the capture to the device.
  • --retries: the default is 20.
  • --profiling: starts the server in profiling mode for GPU counter collection.
  • --drawcall-profiling: starts the server in drawcall profiling mode, which combines profiling with visual capture. It implies --profiling.
  • --apply-replacement: re-applies a shader replacement, written as EID:STAGE:FILE:ENCODING. The command splits the value on colons, so a Windows drive-letter path breaks it. The entry point is always main.
At start-up, the command force-stops the server and starts it in normal, profiling, or drawcall profiling mode. It copies the capture to the device, opens it, and re-applies any replacements. Extra positional arguments after the options are also read as replacements in the same format. Then it prints one ready line: {success, ready, drawcall_count, profiling_mode, drawcall_profile_mode, pil_initialized, applied_replacements}.
After the ready line, the command reads one JSON object per line from stdin. Each object has a cmd field. The command writes one JSON line per request. In --profiling mode, screenshot and rt requests are refused unless you use --drawcall-profiling.
To end the session without a response, send:
{"cmd":"quit"}
The session exits with 0 after quit or at the end of input. It exits with 1 if the replay died. After a fatal replay error, it refuses every queued command.
The session accepts these request names, which are the values of the cmd field: fetch_metrics, screenshot, get_shader, replace_shader, replace_shader_identity, counters_list, list_counters, events, draws, event, draw, info, stats, log, pipeline, render_pass, device_extensions, bindings, shaders, resources, resource, runtime_images, passes, pass_detail, texture, rt, buffer, mesh, mesh_preview, pixel_history, search, snapshot, tex_stats, usage, debug_pixel, debug_vertex, debug_thread, assert_pixel, assert_state, assert_count, assert_clean, assert_image, vfs_ls, vfs_cat, vfs_tree, diff, shader_encodings, get_isa, shader_restore, shader_restore_all, fetch_drawcall_states, get_drawcall_textures, resize_texture, replace_sampler, replace_texture, texture_restore, texture_restore_all, create_buffer_from_data, get_drawcall_geometry, simplify_geometry, geometry_restore, geometry_restore_all, posthoc, frame_time, action_time, render_stage_trace, highlight, highlight_by_resource, health_check, and quit.
This page does not cover the arguments that each request accepts.

See Also