Watch: descriptor heap blocks open by 4 KiB part on a write fault, guard tells the parts (VICTORY_GUARD_PARTS) #1853

Open
101Leafy wants to merge 2 commits from upstream-pr/1853 into main
101Leafy commented 2026-11-29 00:46:48 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by 101Leafy on 2026-11-29T00:46:48Z.


Adds VICTORY_GUARD_PARTS, 0 by default, so nothing changes unless it is set. With a value from 1 to 16, a write fault in a guarded block of the descriptor heaps opens only the 4 KiB part it hit, and the guard tells only the open parts as written, so the heap copy reads and compares those parts and not the whole block. Once that many parts of a block are open, the next fault opens the block whole as before. A block with other views also opens whole, because a write through another view would not fault at this one's parts.

On our side the switch was on at 4 parts. It is off here. With all of each opened block told as written, the heap copy looked at 399,360 descriptor slots a frame for about 57,000 changed, read 18.4 MB, and spent 9.7 ms reading and comparing and 17 ms asking. The title writes a few descriptors at a time.

The parts path stays off under VICTORY_FAULT_UNLOCKED, whose faults open whole blocks without the guards' lock and have no notes of parts. Diagnostics builds get five counters for part faults, whole opens, blocks with other views, and the blocks and parts closed again, and the counter array grows to 96. The test that opens a heap block by the part runs with 4 parts.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5546155897 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1853). Originally posted by [101Leafy](https://github.com/101Leafy) on 2026-11-29T00:46:48Z. --- Adds VICTORY_GUARD_PARTS, 0 by default, so nothing changes unless it is set. With a value from 1 to 16, a write fault in a guarded block of the descriptor heaps opens only the 4 KiB part it hit, and the guard tells only the open parts as written, so the heap copy reads and compares those parts and not the whole block. Once that many parts of a block are open, the next fault opens the block whole as before. A block with other views also opens whole, because a write through another view would not fault at this one's parts. On our side the switch was on at 4 parts. It is off here. With all of each opened block told as written, the heap copy looked at 399,360 descriptor slots a frame for about 57,000 changed, read 18.4 MB, and spent 9.7 ms reading and comparing and 17 ms asking. The title writes a few descriptors at a time. The parts path stays off under VICTORY_FAULT_UNLOCKED, whose faults open whole blocks without the guards' lock and have no notes of parts. Diagnostics builds get five counters for part faults, whole opens, blocks with other views, and the blocks and parts closed again, and the counter array grows to 96. The test that opens a heap block by the part runs with 4 parts.
eleboucher commented 2026-11-29 07:36:04 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by eleboucher on 2026-11-29T07:36:04Z.


PC result: RTX 4070 Ti SUPER 16 GB, Ryzen 7 9800X3D, 16 GB RAM, Windows 11, native 1440p, VICTORY_BVH_BUILDER=1 VICTORY_ACTIVATE_RAYS=1, diagnostics build of main 568c5e5d plus this PR and several others (one exe, one switch per run), 10-minute runs, medians after 200 s. Same exe without the switch: 24.3 fps (p10 23.5), preparing 30.6 ms.

With VICTORY_GUARD_PARTS=4: 25.2 fps (p10 23.9), preparing 29.8 ms. About +0.9 fps, near run-to-run noise here (~0.5 fps). No crash or picture problem seen.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7252573307 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1853#issuecomment-7252573307). Originally posted by [eleboucher](https://github.com/eleboucher) on 2026-11-29T07:36:04Z. --- PC result: RTX 4070 Ti SUPER 16 GB, Ryzen 7 9800X3D, 16 GB RAM, Windows 11, native 1440p, `VICTORY_BVH_BUILDER=1 VICTORY_ACTIVATE_RAYS=1`, diagnostics build of main 568c5e5d plus this PR and several others (one exe, one switch per run), 10-minute runs, medians after 200 s. Same exe without the switch: 24.3 fps (p10 23.5), preparing 30.6 ms. With `VICTORY_GUARD_PARTS=4`: 25.2 fps (p10 23.9), preparing 29.8 ms. About +0.9 fps, near run-to-run noise here (~0.5 fps). No crash or picture problem seen.
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/1853:upstream-pr/1853'
git switch 'upstream-pr/1853'

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/1853'
git switch 'upstream-pr/1853'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1853'
git switch 'upstream-pr/1853'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1853'
git switch 'main'
git merge --squash 'upstream-pr/1853'
git switch 'main'
git merge --ff-only 'upstream-pr/1853'
git switch 'main'
git merge 'upstream-pr/1853'
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
trustno1-coder/VIctory-NVIDIA!1853
No description provided.