GPU: heap buffer pass looks only at marked slots; time split and visi… #523

Open
pug205gti6 wants to merge 1 commit from upstream-pr/523 into main
pug205gti6 commented 2026-11-25 01:58:50 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by pug205gti6 on 2026-11-25T01:58:50Z.


…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 5a3dfa42d8)

<!-- greyfinch-sync:fxceless/victory-fork:issue:6595390399 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/523). Originally posted by [pug205gti6](https://github.com/pug205gti6) on 2026-11-25T01:58:50Z. --- …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 5a3dfa42d8e312daca61a83c1566625b254904c5)
Revens2 commented 2026-11-25 08:09:01 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Revens2 on 2026-11-25T07:36:45Z.


Duplicate of #467: @LeonardoS11 opened this patch 41 minutes earlier, and gh pr diff returns the same bytes for both (+491/-32 on 5 file(s), same title).

Please continue in #467 so the review history and any test data stay in one place.
Thanks.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7156056118 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/523#issuecomment-7156056118). Originally posted by [Revens2](https://github.com/Revens2) on 2026-11-25T07:36:45Z. --- Duplicate of #467: @LeonardoS11 opened this patch 41 minutes earlier, and `gh pr diff` returns the same bytes for both (+491/-32 on 5 file(s), same title). Please continue in #467 so the review history and any test data stay in one place. Thanks.
Headache3318 commented 2026-11-25 09:08:48 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Headache3318 on 2026-11-25T08:12:59Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7156753521 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/523#issuecomment-7156753521). Originally posted by [Headache3318](https://github.com/Headache3318) on 2026-11-25T08:12:59Z. --- 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.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/523:upstream-pr/523'
git switch 'upstream-pr/523'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/523'
git switch 'upstream-pr/523'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/523'
git switch 'upstream-pr/523'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/523'
git switch 'main'
git merge --squash 'upstream-pr/523'
git switch 'main'
git merge --ff-only 'upstream-pr/523'
git switch 'main'
git merge 'upstream-pr/523'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork!523
No description provided.