GPU: a declared write range's new parts are found in one pass over the ranges already declared #1156
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1159"
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 fxceless/victory-fork. Originally posted by fffluffy-dev on 2026-11-25T22:04:19Z.
Shadow::writingfinds the parts of a newly declared write range that no earlier declared range holds (their bytes go into the snapshot). It cut each pending range out in turn, allocating a new list per pending range for every new declaration: for N distinct ranges in a submission that is N(N+1)/2 lists (461,280 for 960 ranges), on the preparing side of every submission that declares shader writes.It now calls the existing
outside(from, to, skip)once with the pending ranges mapped throughinside: one sorted pass, two lists per declaration. The non-empty parts are the same, in the same order; the empty parts the old loop could leave were skipped by every consumer already (from >= to/from < tochecks).Validation (cargo-xwin, x86_64-pc-windows-msvc, tests under Wine): new test
a_new_range_s_parts_are_those_one_cut_at_a_time_gavecompares both on 960 pseudo-random overlapping, repeated, touching and empty ranges (identical parts; 461,280 → 1,920 lists).cargo test -p victory-gpu: 184 passed, 1 failed, 5 ignored; the failure (drvwatch::tests::the_system_takes_the_subscription) and 11 clippy-D warningserrors inresource.rs,fpsbox.rsanddraw.rsare the same on main9c184b3without this change under Wine; this change adds none.cargo xtask policyok. Not measured on a real frame: look atSnapshotUs/ "preparing" on submissions with many declared ranges.AI use: written with Claude Code (Claude Opus 5.5); reviewed and posted with my approval. No game files were used.
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.