Skip to content

GPU diagnostics: record per-draw samples on selected capture frames - #829

Open
Harveyweiii wants to merge 1 commit into
fxceless:mainfrom
Harveyweiii:diagnostics/per-draw-samples
Open

Harveyweiii wants to merge 1 commit into
fxceless:mainfrom
Harveyweiii:diagnostics/per-draw-samples

Conversation

@Harveyweiii

Copy link
Copy Markdown

While investigating a dark interior in #12, we could see geometry in the depth buffer but could not tell which individual draws contributed. This adds opt-in D3D12 occlusion counts to the existing frame capture.

Set VICTORY_DRAW_SAMPLES=1, point VICTORY_CAPTURE at an external directory, and select a frame with VICTORY_CAPTURE_FRAMES. Join the draw-query ID in the ops log to the per-frame TSV to see how many samples passed depth and stencil. Indirect commands have one aggregate count. Later draws can overwrite those samples. Sampled submissions use the synchronous path, so these captures should not be used to benchmark frame time.

Verification

Tested against 9376fd6 on Windows with an RTX 4070 Ti SUPER. The synthetic 8 × 8 render target returned 0 samples for an empty draw, 12 for a 3 × 4 scissor, and 64 for full coverage. The same test crosses the 256-query heap boundary and checks the two recording frames' TSV rows.

  • cargo test --locked -p victory-gpu --features diagnostics --lib gpu_reports_empty_scissored_and_full_draws -- --nocapture passed.
  • cargo xtask policy passed (173 files).
  • Local workspace Clippy with warnings as errors still reports the existing sort in draw.rs and unused depth_written field; the default-feature run also reports unused placed_filler_twins. These lines are unchanged by this patch.

Related to #12 for diagnostics. The color issue remains open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant