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.renderdoccmd.renderdoccmd ships beside the RenderDoc Meta Fork executable.| Platform | Location |
|---|---|
Windows | C:\Program Files\RenderDocForMetaQuest\renderdoccmd.exe |
macOS | /Applications/RenderDoc Meta Fork.app/Contents/MacOS/renderdoccmd |
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.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.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.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.--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.--remote-host adb://SERIAL.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 and not -h, because -h is a real option on replay and remoteserver. -? is also accepted as a short form of --help.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.--name=value or --name value. Short options take the form -x value.--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.--device option, if you pass it.ANDROID_SERIAL environment variable.device state that adb devices lists.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.--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.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.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.--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.| Option | Meaning |
|---|---|
-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, 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.| Command | What 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 |
renderdoccmd adb-list
{"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.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.--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.{success, device, package, ident}. Pass ident to adb-capture.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.--intent-args option. The output is {success, device, package, ident, profiling_mode}, with profiling_mode set to true.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.--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-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.{success, captures, ...}, where captures lists the local paths, followed by copy statistics.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.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.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.success, device, capture, measurement_succeeded, samples, and measurement_duration_sec. The frame_time_ms field appears only when the measurement succeeded.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.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%".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.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.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.success, detail_level, device, capture, metric_names, metric_ids, contexts, summary, and health. detail_level is low_overhead, full, or with_metrics.| Command | What 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 |
renderdoccmd capture [options] EXECUTABLE [program arguments]
--executable option. Put the options before the executable. The first positional argument ends option parsing.--wait-for-exit it exits with 0. On failure it exits with the result code. With no executable it exits with 1.renderdoccmd inject --PID PID [options]
--PID: required. The process ID to inject into. The option name is case-sensitive and uses capitals.capture, it exits with the ident.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.--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.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.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.--out or capture file name, exits with 1.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.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.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.| Command | What 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 |
--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.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.adb://, it force-stops the on-device server and starts it in normal mode.--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}.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..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.{success, capture_file, output_file, output_width, output_height, final_frame_eid, final_frame_resource_id, slice, highlights, api_validation_enabled}.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.--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.--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.--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}.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.--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.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.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..rdc file, and nothing persists. A compile failure prints {success:false, event_id, stage, compile_errors} and exits with 0.success, event_id, stage, original_shader_id, replacement_shader_id, and compile_errors, plus output_file or screenshot_error when you pass --output.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.{success, ready, drawcall_count, profiling_mode, drawcall_profile_mode, pil_initialized, applied_replacements}.cmd field. The command writes one JSON line per request. In --profiling mode, screenshot and rt requests are refused unless you use --drawcall-profiling.{"cmd":"quit"}
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.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.