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

Open
github-bot wants to merge 1 commit from github-bot/gh-523 into main AGit
Owner

@⁠pug205gti6 on GitHub · 2026-11-25 01:58 UTC · original
pug205gti6:pr/467-gpu-heap-buffer → main · +491 −32 · 5 files · 1 commits · open

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

**@⁠pug205gti6** on GitHub · 2026-11-25 01:58 UTC · [original](https://github.com/fxceless/victory-fork/pull/523) `pug205gti6:pr/467-gpu-heap-buffer` → `main` · +491 −32 · 5 files · 1 commits · open …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)
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 <[email protected]>
(cherry picked from commit 5a3dfa42d8e312daca61a83c1566625b254904c5)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:45:20 +00:00
Author
Owner

@⁠Revens2 on GitHub · 2026-11-25 07:36 UTC · original

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.

**@⁠Revens2** on GitHub · 2026-11-25 07:36 UTC · [original](https://github.com/fxceless/victory-fork/pull/523#issuecomment-7156056118) 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.
Author
Owner

@⁠Headache3318 on GitHub · 2026-11-25 08:12 UTC · original

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.

**@⁠Headache3318** on GitHub · 2026-11-25 08:12 UTC · [original](https://github.com/fxceless/victory-fork/pull/523#issuecomment-7156753521) 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 has changes conflicting with the target branch.
  • crates/victory-gpu/src/descriptor.rs
  • crates/victory-gpu/src/draw.rs
  • crates/victory-gpu/src/heap_pass.rs
  • crates/victory-gpu/src/host.rs
  • crates/victory-gpu/src/lib.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/523/head:github-bot/gh-523'
git switch 'github-bot/gh-523'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-523'
git switch 'github-bot/gh-523'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-523'
git switch 'github-bot/gh-523'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-523'
git switch 'main'
git merge --squash 'github-bot/gh-523'
git switch 'main'
git merge --ff-only 'github-bot/gh-523'
git switch 'main'
git merge 'github-bot/gh-523'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.