Repository navigation
Conversation
|
Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at AI-assisted (Claude Code). |
catminou4
left a comment
There was a problem hiding this comment.
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
Indexed copyback ranges (docs+gpu): perf work on the copyback path, pairs with #1816's delivered-bytes accounting.
|
Automated triage for the maintainers. Needs rebase. This PR no longer merges cleanly into From the earlier needs-work note, still open: a number from a real frame showing the linear scan costs something (range counts or before/after copy-back ms), a descriptive PR title, and rustfmt on Generated by Claude Code |
58d3b08 to
5466200
Compare
Keep small and lightly queried lists linear; defer sorting until 32 full-scan equivalents. Release the declaration guard before copying pages. Add adaptive transition and reference-equivalence tests. Threshold is a heuristic motivated by the synthetic Windows benchmark, not an in-game measurement.
|
Reviewed and verified Code review
Verification (Windows 11, RTX 5090 + WARP)
|
A list records a root UAV's range for every draw or dispatch that binds it (`Map::precise`), many copies of a few ranges, and after its run every page its shaders marked was compared with all of them. In the prison scene that search was 13 % of the submitting thread's samples (perf, two runs), 95-97 % of the after-run closure's own time. The ranges are now sorted and merged in place when the list's run is over (the bytes they cover stay the same, so a list that runs again searches the merged list), and each page is looked up with a binary search: of disjoint ranges in order, only the last one starting before the page's end can overlap it. The closure falls to 0.2 % of the thread. A test compares the search with the linear one over random, duplicated, touching and empty ranges. Upstream PR Marvisak#1869 does the same with an index of its own.
|
In-game numbers for the linear search this PR replaces, since the description says native benchmarks are pending. The search shows up as I tested the same idea in a smaller form on our branch: sort the ranges and merge overlapping or touching ones in Either version removes it; no need to change yours for this. Happy to share ours if a smaller diff helps. AI-assisted (Claude Code). No game data attached. |
A list records a root UAV's range for every draw or dispatch that binds it (`Map::precise`), many copies of a few ranges, and after its run every page its shaders marked was compared with all of them. In the prison scene that search was 13 % of the submitting thread's samples (perf, two runs), 95-97 % of the after-run closure's own time. The ranges are now sorted and merged in place when the list's run is over (the bytes they cover stay the same, so a list that runs again searches the merged list), and each page is looked up with a binary search: of disjoint ranges in order, only the last one starting before the page's end can overlap it. The closure falls to 0.2 % of the thread. A test compares the search with the linear one over random, duplicated, touching and empty ranges. Upstream PR Marvisak#1869 does the same with an index of its own.
Replace linear precise UAV range scans with a sorted prefix-maximum interval index and binary search. Synthetic lookup comparisons reduced from 6,292,480 to 45,058, excluding index construction. Independently verified with 102,464 JavaScript model queries and 131,072 native C queries, zero mismatches. Four Rust tests included. Native Rust and GPU benchmarks pending. Complementary to #1865. AI-assisted (ChatGPT).