Repository navigation
GPU: heap buffer pass looks only at marked slots; time split and visi… - #523
pug205gti6 wants to merge 1 commit into
Conversation
…t counts in the fps line The pass for shaders that pick buffers by index looked again at every buffer view of the heap (81,000 in the world) every 16 passes and rebuilt every copy's span from all views every pass. Now (heap_pass.rs) a slot is looked at again when its view was written, its view table entry was freed (descriptor::forget, which leaves the record as it was), its record in title memory differs from the one last seen (a 12-byte compare), or it found no host copy (every 16 passes); all slots every 256 passes as a safety net. A copy's span is worked out again only when one of its slots went. VICTORY_HEAP_PASS_FULL=1 brings back the old pass for A/B. The fps line now splits the pass's time: slots looked at, copies refreshed, and the texture side (heap_textures, bounded at 250 ms a pass), with the slots and copies per frame and the mode (marked/full). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> (cherry picked from commit 5a3dfa4)
…t counts in the fps line The pass for shaders that pick buffers by index looked again at every buffer view of the heap (81,000 in the world) every 16 passes and rebuilt every copy's span from all views every pass. Now (heap_pass.rs) a slot is looked at again when its view was written, its view table entry was freed (descriptor::forget, which leaves the record as it was), its record in title memory differs from the one last seen (a 12-byte compare), or it found no host copy (every 16 passes); all slots every 256 passes as a safety net. A copy's span is worked out again only when one of its slots went. VICTORY_HEAP_PASS_FULL=1 brings back the old pass for A/B. The fps line now splits the pass's time: slots looked at, copies refreshed, and the texture side (heap_textures, bounded at 250 ms a pass), with the slots and copies per frame and the mode (marked/full). Port of fxceless#523 (37272ae; PalmVIDev 6a1c0074 is the same change). On this tree the pass also serves the marks of slots shaders store through (crate::heap_marks), so a kept slot records whether its view is an unordered access one (Picked::keep takes the flag, Picked::unordered and Picked::view give it back): every slot kept is asked for its mark every pass, looked at or not, and the ranges declared written come from the kept views. The spans for VICTORY_HEAP_EVERY_LIST are the pass's own. The count and bytes of unordered views are worked out only when the pass logs them. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> (cherry picked from commit 37272ae) Claude-Session: https://claude.ai/code/session_017V7WBDcuSkQXqyyY47pR31
|
Duplicate of #467: @LeonardoS11 opened this patch 41 minutes earlier, and Please continue in #467 so the review history and any test data stay in one place. |
|
Independent verification: PR #523 merges cleanly onto main (310c6eb), adds heap_pass.rs (377 lines) for optimized GPU heap buffer tracking. Build: success (8s). Tests: victory crate passed (1/1); full workspace test timed out at 600s due to Wine environment on Linux running .exe test binaries slowly — tests compiled and ran with no failures in the time they completed. Timeout is environmental, not a code regression. Machine: Arch Linux, kernel 7.3.5-arch1-1, 3x RTX 4090 driver 620.73.04, Proton, AI-assisted. |
…AP_PASS_MARKED=1|alt), and a list can reuse a pipeline's keep and a repeated root view copy (VICTORY_LIST_REUSE=1|alt); both off by default From darkworldhm's snapshot of this fork (which carries fork PR #523 for the first), separated from its other changes by a helper, read against this tree and put behind switches: with a switch unset today's path runs as it did but for reading the switch. The marked pass looks again only at slots whose view was written, whose table entry was freed, whose record differs from the one last seen or that had no host copy (every 16 passes), and at every slot every 256 passes; today every slot is looked at every 16th pass (84,027 slots, 178 ms in run 286) and all spans are rebuilt every pass. Its four unit tests pass. Compiled here; not run in a game. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…AP_PASS_MARKED=1|alt), and a list can reuse a pipeline's keep and a repeated root view copy (VICTORY_LIST_REUSE=1|alt); both off by default From darkworldhm's snapshot of this fork (which carries fork PR fxceless#523 for the first), separated from its other changes by a helper, read against this tree and put behind switches: with a switch unset today's path runs as it did but for reading the switch. The marked pass looks again only at slots whose view was written, whose table entry was freed, whose record differs from the one last seen or that had no host copy (every 16 passes), and at every slot every 256 passes; today every slot is looked at every 16th pass (84,027 slots, 178 ms in run 286) and all spans are rebuilt every pass. Its four unit tests pass. Compiled here; not run in a game. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…t counts in the fps line
The pass for shaders that pick buffers by index looked again at every buffer view of the heap (81,000 in the world) every 16 passes and rebuilt every copy's span from all views every pass. Now (heap_pass.rs) a slot is looked at again when its view was written, its view table entry was freed (descriptor::forget, which leaves the record as it was), its record in title memory differs from the one last seen (a 12-byte compare), or it found no host copy (every 16 passes); all slots every 256 passes as a safety net. A copy's span is worked out again only when one of its slots went. VICTORY_HEAP_PASS_FULL=1 brings back the old pass for A/B.
The fps line now splits the pass's time: slots looked at, copies refreshed, and the texture side (heap_textures, bounded at 250 ms a pass), with the slots and copies per frame and the mode (marked/full).
(cherry picked from commit 5a3dfa4)