gpu(native): log a reason for every dropped draw, and count the skipped ones (#531) #621
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/621"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T15:42:35Z.
Refs #531 — the "make the host log a reason for every draw it drops" item. Claimed on the issue.
What this changes
crates/victory-gpu/src/native/glue.rsonly, 26 insertions:make_pipe: whennative_stages(key)isNonethe pipeline was previously refused with no log at all — likely the three reflection/post-pass drawse2945217,456f02b5,a1f08b8bfrom #531. It now callsrefused_translation, which warns once per pipeline key and counts the refusal by reason in the shader stats.make_host_pipe: the two remaining silentPipe::Refusedreturns — a compute pipeline whose stages hold no compute shader, and a guessed graphics pipeline without a vertex stage — now also go throughrefused_translationwith a specific reason.graphics_inner'sPipe::Skippedarm calledwarn_oncedirectly, so those draws were never counted inno_pipeline("native draws so far"). It now callsdropped(...), which warns once, increments the counter, and keeps the reason for the pass trace.a_dropped_draw_is_counted_every_time_and_warned_oncepins thatdropped()counts every drop.The put-off path (frame pipeline budget spent) already logs a counter line plus the generic draw-level reason, so it is unchanged. The rectangle stage-in and
v_cvt_f32_f64parts of #531 stay separate.How it was tested
cargo test --target x86_64-apple-darwin -p victory-gpu --lib -- a_dropped_draw— passes (native mod is x86_64-only, runs under Rosetta)cargo test -p victory-hle -p victory -p victory-gpu -p xtask(host arm64) — greencargo test --target x86_64-apple-darwin -p victory-gpu— green except 2–3 pre-existing Metal GPU tests innative/tests.rsthat flake under parallel Rosetta on this M1 right now; the identical set fails on a cleanupstream/maincheckout at the same moment and each passes in isolation (issue #548 class)cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings— cleancargo xtask policy— 404 files okChecklist
vibe/drop-reason-log-1705acfromupstream/main, pushed to my fork onlyVICTORY_*switches; existing warn/refusal paths onlyNote: the fork's
mainalready carries7fa3a417(warn_drop_pipe, which names the dropped pipeline at each drop path). This PR is complementary, not duplicative: it gives the silentPipe::Refusedreturns arefused_translationreason where no warning fired at all, and makes thePipe::Skippeddraw arm count inno_pipeline.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.