feat(cbuffer): add rdc cbuffer command and cbuffer_raw export (#224)#228
Conversation
Complete the unshipped CLI half of phase2-buffer-decode.
- New daemon handler cbuffer_raw: reflection lookup, GetConstantBlock
descriptor, GetBufferData -> temp file {path,size}. Rejects
non-buffer-backed cbuffers (push/root constants) with a clean
JSON-RPC error; preserves GetConstantBlock version guard.
- New VFS leaf_bin route /draws/<eid>/cbuffer/<set>/<binding>/data.
- New CLI command rdc cbuffer: decoded JSON (cbuffer_decode) by
default, raw export via _export_vfs_path mirroring rdc buffer.
- Unit tests for handler + CLI, GPU integration tests, regenerated
command/skill references.
Passing --raw without an EID silently targeted draw 0 (capture-start), which never has a bound cbuffer and produced a confusing error. Now raises UsageError matching the precedent in export.py rt_cmd. Rename test_eid_omitted_uses_completion_fallback → test_eid_omitted_lets_daemon_default to reflect what the test actually asserts (no eid key in params, daemon uses current event). Add test_raw_without_eid: asserts exit code 2 and "EID" in output.
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (15)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ings (#224) _handle_cbuffer_raw returned a 0-byte file as success when the cbuffer resource was null/unbound, and dumped the entire backing upload heap when the descriptor reported byteSize==0 (D3D12 root CBV). Now: - null/zero cb_resource -> JSON-RPC -32001 'cbuffer not bound at this draw' - byteSize==0 falls back to the reflected ConstantBlock byteSize - both zero -> clean -32001 error; never pass size 0 to GetBufferData --set/--binding help now states Vulkan (descriptor set / binding) vs D3D12 (register space / shader register bN). Regenerated commands-quick-ref.
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Part 2 of #224.
What
New
rdc cbuffercommand to export shader constant/uniform buffer contents at a given event + stage + binding, as decoded JSON or raw bytes — replacing fragile custom RenderDoc Python scripts.Changes
handlers/buffer.py: newcbuffer_rawhandler (reflection lookup →GetConstantBlock(...).descriptor→GetBufferData→ temp file{path,size}), mirroringbuf_raw. Non-buffer-backed cbuffers (push/root constants) return a clean-32602error, not a crash. Existingcbuffer_decodehandler is unmodified.vfs/router.py: newleaf_binroute/draws/<eid>/cbuffer/<set>/<binding>/data→cbuffer_raw, mirroring/buffers/<id>/data.commands/cbuffer.py(new): decoded path reusescbuffer_decode; raw path routes through_export_vfs_path(same flow asrdc buffer --raw).--rawrequires explicit-oand explicit EID (mirrorsrt_cmd).Tests
bufferBacked=Falseclean error, no-adapter, bad binding, no-reflection, version-guard, no-temp-dir.--raw -o,--rawwithout-o/without EID usage errors, no-session.@pytest.mark.gpuVulkan integration tests (vkcube).Verification
Verified on Linux/Vulkan. D3D12 root-constant / register-space behavior cannot be verified on the dev box (Linux replay is Vulkan-only) — reporter verification on a real D3D12 capture is requested before merge.
OpenSpec:
openspec/changes/2026-05-15-issue-224-cbuffer-export/. Completes the unshipped CLI half of the archived2026-02-19-phase2-buffer-decodechange (extended: richer direct command + newcbuffer_rawhandler/route, not a thin VFS wrapper).