Usage Patterns

Basic Workflow

rdc open capture.rdc       # start daemon, load capture
rdc info                    # show capture metadata
rdc draws                   # list draw calls (TSV)
rdc pipeline 142            # pipeline state at event 142
rdc shader 142 ps           # pixel shader disassembly
rdc close                   # stop daemon

Piping and Filtering

Default TSV output is designed for Unix pipes:

# Find draw calls with "Triangle" in the name
rdc draws | grep Triangle

# Get just event IDs
rdc draws | cut -f1

# Count draw calls
rdc draws | wc -l

# Sort resources by size
rdc resources --sort size

JSON Mode

Add --json to any command for structured output:

# Pretty-print pipeline state
rdc pipeline 142 --json | jq .

# Extract shader entry point
rdc pipeline 142 --section shader --json | jq '.ps.entryPoint'

# Filter draws by flag
rdc draws --json | jq '.[] | select(.flags | contains("Drawcall"))'

CI / Automation

rdc-cli is designed for CI pipelines and agent-driven workflows:

# Assert a capture has expected draw count
test $(rdc draws | wc -l) -ge 5

# Export all textures for visual regression
for id in $(rdc resources --type texture | cut -f1); do
  rdc texture "$id" -o "textures/$id.png"
done

# Structured output for downstream processing
rdc draws --json > draws.json
rdc pipeline 5 --json > pipeline.json

VFS Browsing

Browse capture data like a filesystem:

# List top-level nodes
rdc ls /

# Browse a specific draw call
rdc ls /draws/142/

# Read shader source directly
rdc cat /draws/142/pipeline/shader/ps

# Show full tree (limited depth)
rdc tree / --depth 2

Search

# Search shader disassembly for a pattern
rdc search "main"

# Filter by shader stage
rdc search "shadowMap" --stage ps

# With context lines
rdc search "textureSample" -C 3

GPU Counters

# List available hardware counters
rdc counters --list

# Fetch counter values for all events
rdc counters

Resource Usage Tracking

# See where a resource is used across the frame
rdc usage 5

# Show all resource usage
rdc usage --all