cli-anything-renderdoc
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRenderDoc CLI Skill
RenderDoc CLI工具
Headless command-line analysis of RenderDoc GPU frame captures ( files).
.rdc对RenderDoc GPU帧捕获文件(文件)进行无界面命令行分析。
.rdcCapabilities
功能
- Capture inspection: metadata, sections, thumbnails, format conversion
- Action tree: list/search/filter draw calls, clears, dispatches, markers
- Texture operations: list, inspect, export (PNG/JPG/DDS/HDR/EXR), pixel picking
- Pipeline state: full shader/RT/viewport state at any event
- Shader analysis: export shader in human-readable form (HLSL/GLSL/disasm), constant buffer readback
- Resource inspection: buffer/texture enumeration, raw data reading
- Mesh data: vertex shader input/output decoding
- GPU counters: enumerate and fetch hardware performance counters
- 捕获检查:元数据、片段、缩略图、格式转换
- 动作树:列出/搜索/筛选绘制调用、清除操作、调度任务、标记
- 纹理操作:列出、检查、导出(PNG/JPG/DDS/HDR/EXR)、像素拾取
- 管线状态:任意事件的完整着色器/渲染目标/视口状态
- 着色器分析:以人类可读形式导出着色器(HLSL/GLSL/反汇编)、常量缓冲区回读
- 资源检查:缓冲区/纹理枚举、原始数据读取
- 网格数据:顶点着色器输入/输出解码
- GPU计数器:枚举并获取硬件性能计数器
Command Groups
命令组
capture
capture
bash
cli-anything-renderdoc -c frame.rdc capture info # Metadata + sections
cli-anything-renderdoc -c frame.rdc capture thumb -o t.png # Extract thumbnail
cli-anything-renderdoc -c frame.rdc capture convert -o out.rdc --format rdcbash
cli-anything-renderdoc -c frame.rdc capture info # 元数据 + 片段
cli-anything-renderdoc -c frame.rdc capture thumb -o t.png # 提取缩略图
cli-anything-renderdoc -c frame.rdc capture convert -o out.rdc --format rdcactions
actions
bash
cli-anything-renderdoc -c frame.rdc actions list # All actions
cli-anything-renderdoc -c frame.rdc actions list --draws-only # Draw calls only
cli-anything-renderdoc -c frame.rdc actions summary # Counts by type
cli-anything-renderdoc -c frame.rdc actions find "Shadow" # Search by name
cli-anything-renderdoc -c frame.rdc actions get 42 # Single actionbash
cli-anything-renderdoc -c frame.rdc actions list # 所有动作
cli-anything-renderdoc -c frame.rdc actions list --draws-only # 仅绘制调用
cli-anything-renderdoc -c frame.rdc actions summary # 按类型统计数量
cli-anything-renderdoc -c frame.rdc actions find "Shadow" # 按名称搜索
cli-anything-renderdoc -c frame.rdc actions get 42 # 获取单个动作textures
textures
bash
cli-anything-renderdoc -c frame.rdc textures list
cli-anything-renderdoc -c frame.rdc textures get <id>
cli-anything-renderdoc -c frame.rdc textures save <id> -o out.png --format png
cli-anything-renderdoc -c frame.rdc textures save-outputs 42 -o ./renders/
cli-anything-renderdoc -c frame.rdc textures pick <id> 100 200bash
cli-anything-renderdoc -c frame.rdc textures list
cli-anything-renderdoc -c frame.rdc textures get <id>
cli-anything-renderdoc -c frame.rdc textures save <id> -o out.png --format png
cli-anything-renderdoc -c frame.rdc textures save-outputs 42 -o ./renders/
cli-anything-renderdoc -c frame.rdc textures pick <id> 100 200pipeline
pipeline
bash
cli-anything-renderdoc -c frame.rdc pipeline state 42bash
cli-anything-renderdoc -c frame.rdc pipeline state 42Export shader in human-readable form
以人类可读形式导出着色器
Text shaders (GLSL/HLSL) → saved directly
文本着色器(GLSL/HLSL)→ 直接保存
Binary shaders (DXBC/SPIR-V) → embedded source (HLSL/GLSL) or disassembly
二进制着色器(DXBC/SPIR-V)→ 嵌入的源代码(HLSL/GLSL)或反汇编代码
cli-anything-renderdoc -c frame.rdc pipeline shader-export 42 --stage Fragment
cli-anything-renderdoc -c frame.rdc pipeline shader-export 42 --stage Vertex -o ./shaders/
cli-anything-renderdoc -c frame.rdc pipeline cbuffer 42 --stage Vertex --index 0
cli-anything-renderdoc -c frame.rdc pipeline shader-export 42 --stage Fragment
cli-anything-renderdoc -c frame.rdc pipeline shader-export 42 --stage Vertex -o ./shaders/
cli-anything-renderdoc -c frame.rdc pipeline cbuffer 42 --stage Vertex --index 0
Compare pipeline state between two events
比较两个事件之间的管线状态
Default output: same directory as the capture file ; use -o to override
默认输出:捕获文件所在的同一目录;使用 -o 覆盖路径
cli-anything-renderdoc -c a.rdc pipeline diff 100 200 -b b.rdc
cli-anything-renderdoc -c frame.rdc pipeline diff 100 200 # same capture
cli-anything-renderdoc -c a.rdc pipeline diff 100 200 -b b.rdc -o result.json
cli-anything-renderdoc -c a.rdc pipeline diff 100 200 -b b.rdc --no-compact
undefinedcli-anything-renderdoc -c a.rdc pipeline diff 100 200 -b b.rdc
cli-anything-renderdoc -c frame.rdc pipeline diff 100 200 # 同一捕获文件
cli-anything-renderdoc -c a.rdc pipeline diff 100 200 -b b.rdc -o result.json
cli-anything-renderdoc -c a.rdc pipeline diff 100 200 -b b.rdc --no-compact
undefinedresources
resources
bash
cli-anything-renderdoc -c frame.rdc resources list
cli-anything-renderdoc -c frame.rdc resources buffers
cli-anything-renderdoc -c frame.rdc resources read-buffer <id> --format float32bash
cli-anything-renderdoc -c frame.rdc resources list
cli-anything-renderdoc -c frame.rdc resources buffers
cli-anything-renderdoc -c frame.rdc resources read-buffer <id> --format float32mesh
mesh
bash
cli-anything-renderdoc -c frame.rdc mesh inputs 42 --max-vertices 10
cli-anything-renderdoc -c frame.rdc mesh outputs 42bash
cli-anything-renderdoc -c frame.rdc mesh inputs 42 --max-vertices 10
cli-anything-renderdoc -c frame.rdc mesh outputs 42counters
counters
bash
cli-anything-renderdoc -c frame.rdc counters list
cli-anything-renderdoc -c frame.rdc counters fetch --ids 1,2,3bash
cli-anything-renderdoc -c frame.rdc counters list
cli-anything-renderdoc -c frame.rdc counters fetch --ids 1,2,3JSON Mode
JSON模式
All commands support for machine-readable output:
--jsonbash
cli-anything-renderdoc -c frame.rdc --json actions summary所有命令都支持 参数以生成机器可读的输出:
--jsonbash
cli-anything-renderdoc -c frame.rdc --json actions summaryEnvironment Variables
环境变量
| Variable | Description |
|---|---|
| Default capture file path |
| Must include RenderDoc path |
| 变量名 | 描述 |
|---|---|
| 默认捕获文件路径 |
| 必须包含RenderDoc的路径 |
Agent Usage Notes
Agent使用注意事项
- Use to extract shaders — for binary shaders (DXBC/SPIR-V) it auto-exports embedded HLSL/GLSL source or falls back to disassembly; for text shaders (GLSL/HLSL) it saves the raw source directly
pipeline shader-export - Shader formats by capture API:
- D3D11 → DXBC binary, exported as embedded HLSL source () or bytecode asm (
.hlsl).dxbc.asm - OpenGL/GLES → GLSL source text (), already human-readable
.glsl - Vulkan → SPIR-V binary, exported as embedded GLSL source () or SPIR-V asm (
.glsl).spv.asm
- D3D11 → DXBC binary, exported as embedded HLSL source (
- Use to compare two events — it writes a JSON file and prints only the path; use
pipeline difffor a second capture-b - Always specify for programmatic consumption
--json - Use first to understand capture complexity
actions summary - Use to focus on actual rendering
actions list --draws-only - Pipeline state requires an event ID from the action list
- Texture save supports: png, jpg, bmp, tga, hdr, exr, dds
- Buffer data can be decoded as hex, float32, uint32, or raw bytes
- 使用提取着色器——对于二进制着色器(DXBC/SPIR-V),它会自动导出嵌入的HLSL/GLSL源代码,若失败则回退到反汇编;对于文本着色器(GLSL/HLSL),它会直接保存原始源代码
pipeline shader-export - 按捕获API划分的着色器格式:
- D3D11 → DXBC二进制,导出为嵌入的HLSL源代码()或字节码汇编(
.hlsl).dxbc.asm - OpenGL/GLES → GLSL源代码文本(),本身已具备可读性
.glsl - Vulkan → SPIR-V二进制,导出为嵌入的GLSL源代码()或SPIR-V汇编(
.glsl).spv.asm
- D3D11 → DXBC二进制,导出为嵌入的HLSL源代码(
- 使用比较两个事件——它会写入一个JSON文件并仅打印路径;使用
pipeline diff参数指定第二个捕获文件-b - 程序调用时始终指定参数
--json - 先使用了解捕获内容的复杂度
actions summary - 使用聚焦于实际渲染操作
actions list --draws-only - 管线状态需要来自动作列表的事件ID
- 纹理保存支持的格式:png、jpg、bmp、tga、hdr、exr、dds
- 缓冲区数据可解码为十六进制、float32、uint32或原始字节