Cli Anything Renderdoc

作者 hkuds34f519533bc1無授權條款51K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫2 週前更新

CLI harness for RenderDoc graphics debugger capture analysis

AI 產生的概覽

用於檢查 RenderDoc GPU 畫面擷取的命令列工具,可檢視動作、紋理、著色器與管線狀態。

功能
此技能介紹一個對 RenderDoc .rdc GPU 畫面擷取進行無介面分析的命令列工具。它能檢查擷取中繼資料與縮圖,列出並搜尋動作樹,匯出紋理與著色器,讀取管線狀態與常數緩衝區,列舉資源與網格資料,並取得 GPU 硬體計數器。它也支援 JSON 輸出,以及包含縮圖、輸出目標影像與管線/動作摘要的可攜式預覽組合。
適用情境
當你需要在沒有圖形介面的情況下檢查 RenderDoc 擷取時使用,例如尋找繪製呼叫、匯出紋理或著色器、比較兩個事件的管線狀態,或收集 GPU 計數器資料。它適合消費 JSON 輸出或預覽組合的自動化或代理驅動圖形除錯流程。
執行需求
需要 RenderDoc 安裝提供的 RenderDoc Python 繫結、click>=8.0 與 prompt-toolkit>=3.0,透過 pip install cli-anything-renderdoc 安裝。PYTHONPATH 必須包含 RenderDoc 路徑,RENDERDOC_CAPTURE 可設定預設擷取檔案。此技能不附帶指令碼,僅為說明文件。

RenderDoc CLI Skill

Headless command-line analysis of RenderDoc GPU frame captures (.rdc files).

Capabilities

  • 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

Command Groups

capture

bash
cli-anything-renderdoc -c frame.rdc capture info          # Metadata + sectionscli-anything-renderdoc -c frame.rdc capture thumb -o t.png # Extract thumbnailcli-anything-renderdoc -c frame.rdc capture convert -o out.rdc --format rdc

actions

bash
cli-anything-renderdoc -c frame.rdc actions list           # All actionscli-anything-renderdoc -c frame.rdc actions list --draws-only  # Draw calls onlycli-anything-renderdoc -c frame.rdc actions summary        # Counts by typecli-anything-renderdoc -c frame.rdc actions find "Shadow"  # Search by namecli-anything-renderdoc -c frame.rdc actions get 42         # Single action

textures

bash
cli-anything-renderdoc -c frame.rdc textures listcli-anything-renderdoc -c frame.rdc textures get <id>cli-anything-renderdoc -c frame.rdc textures save <id> -o out.png --format pngcli-anything-renderdoc -c frame.rdc textures save-outputs 42 -o ./renders/cli-anything-renderdoc -c frame.rdc textures pick <id> 100 200

pipeline

bash
cli-anything-renderdoc -c frame.rdc pipeline state 42
# Export shader in human-readable form# Text shaders (GLSL/HLSL) → saved directly# Binary shaders (DXBC/SPIR-V) → embedded source (HLSL/GLSL) or disassemblycli-anything-renderdoc -c frame.rdc pipeline shader-export 42 --stage Fragmentcli-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 overridecli-anything-renderdoc -c a.rdc pipeline diff 100 200 -b b.rdccli-anything-renderdoc -c frame.rdc pipeline diff 100 200              # same capturecli-anything-renderdoc -c a.rdc pipeline diff 100 200 -b b.rdc -o result.jsoncli-anything-renderdoc -c a.rdc pipeline diff 100 200 -b b.rdc --no-compact

resources

bash
cli-anything-renderdoc -c frame.rdc resources listcli-anything-renderdoc -c frame.rdc resources bufferscli-anything-renderdoc -c frame.rdc resources read-buffer <id> --format float32

mesh

bash
cli-anything-renderdoc -c frame.rdc mesh inputs 42 --max-vertices 10cli-anything-renderdoc -c frame.rdc mesh outputs 42

counters

bash
cli-anything-renderdoc -c frame.rdc counters listcli-anything-renderdoc -c frame.rdc counters fetch --ids 1,2,3

Preview Bundles

RenderDoc preview support is for truthful capture inspection rather than live creative preview.

bash
# List preview recipescli-anything-renderdoc -c frame.rdc --json preview recipes
# Capture a preview bundle for the active capture or a specific eventcli-anything-renderdoc -c frame.rdc --json preview capture --recipe quick --event-id 42
# Capture a diff preview bundle for two events or capturescli-anything-renderdoc -c frame.rdc --json preview diff 100 200cli-anything-renderdoc -c a.rdc --json preview diff 100 200 --capture-b b.rdc
# Return the latest existing bundle for the capturecli-anything-renderdoc -c frame.rdc --json preview latest --recipe quick

Typical preview bundle contents:

  • capture thumbnail
  • output-target images
  • pipeline_state.json
  • action_summary.json

Diff bundles additionally include:

  • A/B thumbnails
  • A/B output-target images
  • pipeline_diff.json

RenderDoc does not currently expose live preview sessions. Instead, each capture/diff bundle appends to a stable recipe-level trajectory.json.

Viewer commands:

bash
cli-hub previews inspect /path/to/bundlecli-hub previews html /path/to/bundle -o page.htmlcli-hub previews open /path/to/bundle

JSON Mode

All commands support --json for machine-readable output:

bash
cli-anything-renderdoc -c frame.rdc --json actions summary

Environment Variables

VariableDescription
RENDERDOC_CAPTUREDefault capture file path
PYTHONPATHMust include RenderDoc path

Agent Usage Notes

  • Use pipeline shader-export 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
  • Shader formats by capture API:
    • D3D11 → DXBC binary, exported as embedded HLSL source (.hlsl) or bytecode asm (.dxbc.asm)
    • OpenGL/GLES → GLSL source text (.glsl), already human-readable
    • Vulkan → SPIR-V binary, exported as embedded GLSL source (.glsl) or SPIR-V asm (.spv.asm)
  • Use pipeline diff to compare two events — it writes a JSON file and prints only the path; use -b for a second capture
  • Always specify --json for programmatic consumption
  • Use actions summary first to understand capture complexity
  • Use actions list --draws-only to focus on actual rendering
  • Use preview capture or preview diff when the agent needs a portable, honest inspection bundle rather than raw replay calls alone
  • Read _trajectory_path from preview JSON if you need persistent capture/diff history
  • Use cli-hub previews ... only to inspect/open already-generated bundles
  • 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

來源與署名

來源:hkuds/cli-anything位於skills/cli-anything-renderdoc提交34f5195

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架