vello_research: Download CPU-only buffers by copying their contents #2117
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.35) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 175 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.309
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2117"
general
weight: 0.35
DJMcNab
With
use_cpu, the bump allocators are written by CPU shaders and stay on the CPU, butCommand::Downloadlooked up its source as a GPU buffer. With thedebug_layersfeature,render_to_texture_asyncalways downloads the bump allocators, so it failed wheneveruse_cpuwas set, even with no debug layers turned on:with_winitalways enablesdebug_layers, sowith_winit --async-pipeline --use-cpuhit this.For a buffer that only exists on the CPU, this copies its contents into a mapped download buffer. CPU shaders run as they're recorded, so those are the contents a GPU copy would see at that point. I first had it upload the buffer to the GPU and copy it from there, the way indirect dispatches handle CPU buffers. That is one-way, though: a CPU shader that bound the buffer afterwards would panic. Today's downloads all come after the last CPU stage, so that wouldn't trigger, but it would be easy to hit later. It would also have sent the whole line soup (about 40 MB at the default capacity) to the GPU and straight back whenever the validation layer was on.
I checked it headlessly. With this change,
render_to_texture_asyncwithuse_cpuand no layers gives the same image as the GPU shaders. Together with #2115 and #2116, every debug layer works withuse_cpu, including validation, which downloads the line soup.