feat(gpu,shader): opt-in VirtualDescriptorPager + SLOT_VIEW_MAP (t252) for NVIDIA 1M view heap cap #1297

Open
POMXARK wants to merge 3 commits from upstream-pr/1300 into main
POMXARK commented 2026-11-26 13:05:45 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by POMXARK on 2026-11-26T13:05:45Z.


Ref #1199 (Follow-up Virtual Descriptor Pager Draft PR ported cleanly onto ceb9e1f).

100% opt-in via VICTORY_VIEW_PAGER=1 (auto on PORTABLE_VIEWS capped hosts) or VICTORY_VIEW_PAGER=force — completely inactive by default (VIEW_PAGER = false, shader translation_fingerprint keys cleanly on view_heap_paged()).

Design summary

  • victory-shader (emit/shader.rs, emit/lower.rs, emit/mod.rs): adds root SRV SLOT_VIEW_MAP (t252, SLOT_VIEW_MAP_COUNT = 2^21) and translates RootType::ResourceHeap indices through a bounds-clamped lookup into t252 only when view_heap_paged is enabled.
  • victory-gpu (descriptor/pager.rs, descriptor/host.rs, draw.rs, pipeline/host.rs): preserves direct 1:1 physical slots below count, reserves [count + pool .. null_slot) for disjoint DYNAMIC tables, and pages overflow virtual slots through a Clock Second-Chance VirtualDescriptorPager with view_map updates and made_now lock-free fast-path guarded cleanly (index < self.count).

Verification (Windows 11 + NVIDIA GeForce RTX 5080 on ceb9e1f)

  • cargo test --release -p victory-shader: 220 passed; 0 failed (3 ignored, including paged_resource_heap_emits_valid_dxil_with_view_map_srv DXIL validator check)
  • cargo test --release -p victory-gpu descriptor::: 37 passed; 0 failed (including paged_host_heap_maps_slots_past_portable_views_on_d3d12 and all pager::tests)
<!-- greyfinch-sync:fxceless/victory-fork:issue:5510561786 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1300). Originally posted by [POMXARK](https://github.com/POMXARK) on 2026-11-26T13:05:45Z. --- Ref #1199 (Follow-up Virtual Descriptor Pager Draft PR ported cleanly onto `ceb9e1f`). 100% opt-in via **`VICTORY_VIEW_PAGER=1`** (`auto` on `PORTABLE_VIEWS` capped hosts) or **`VICTORY_VIEW_PAGER=force`** — completely inactive by default (`VIEW_PAGER = false`, shader `translation_fingerprint` keys cleanly on `view_heap_paged()`). ### Design summary - **`victory-shader`** (`emit/shader.rs`, `emit/lower.rs`, `emit/mod.rs`): adds root SRV `SLOT_VIEW_MAP` (`t252`, `SLOT_VIEW_MAP_COUNT = 2^21`) and translates `RootType::ResourceHeap` indices through a bounds-clamped lookup into `t252` only when `view_heap_paged` is enabled. - **`victory-gpu`** (`descriptor/pager.rs`, `descriptor/host.rs`, `draw.rs`, `pipeline/host.rs`): preserves direct `1:1` physical slots below `count`, reserves `[count + pool .. null_slot)` for disjoint `DYNAMIC` tables, and pages overflow virtual slots through a Clock Second-Chance `VirtualDescriptorPager` with `view_map` updates and `made_now` lock-free fast-path guarded cleanly (`index < self.count`). ### Verification (Windows 11 + NVIDIA GeForce RTX 5080 on `ceb9e1f`) - `cargo test --release -p victory-shader`: **`220 passed; 0 failed`** (`3` ignored, including `paged_resource_heap_emits_valid_dxil_with_view_map_srv` DXIL validator check) - `cargo test --release -p victory-gpu descriptor::`: **`37 passed; 0 failed`** (including `paged_host_heap_maps_slots_past_portable_views_on_d3d12` and all `pager::tests`)
POMXARK commented 2026-11-26 19:35:01 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by POMXARK on 2026-11-26T19:35:01Z.


Merged fxceless/victory-fork:main into feat/virtual-descriptor-pager and resolved both merge conflicts (crates/victory-gpu/src/descriptor/host.rs release(id, first, n) + crates/victory-shader/src/emit/mod.rs).

Re-verified on Windows 11 + NVIDIA RTX 5080:

  • cargo check -p victory-gpu -p victory-shader: PASS
  • cargo test --release -p victory-shader: 234 passed; 0 failed (4 ignored)
  • cargo test --release -p victory-gpu descriptor::: 43 passed; 0 failed

Marked Ready for Review.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7201746399 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1300#issuecomment-7201746399). Originally posted by [POMXARK](https://github.com/POMXARK) on 2026-11-26T19:35:01Z. --- Merged `fxceless/victory-fork:main` into `feat/virtual-descriptor-pager` and resolved both merge conflicts (`crates/victory-gpu/src/descriptor/host.rs` `release(id, first, n)` + `crates/victory-shader/src/emit/mod.rs`). Re-verified on **Windows 11 + NVIDIA RTX 5080**: - `cargo check -p victory-gpu -p victory-shader`: **PASS** - `cargo test --release -p victory-shader`: **234 passed; 0 failed** (`4 ignored`) - `cargo test --release -p victory-gpu descriptor::`: **43 passed; 0 failed** Marked Ready for Review.
POMXARK commented 2026-11-27 11:38:07 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by POMXARK on 2026-11-27T11:38:07Z.


Merged upstream main (9a9091d1) and resolved conflicts cleanly (preserving upstream MIRROR_NOT_VIEW, TwinState, and moving the view-map test into lower_tests.rs). Re-verified on Windows release: cargo check -p victory OK, victory-shader 253/253 PASS, victory-gpu -- descriptor:: 43/43 PASS.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7217301087 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1300#issuecomment-7217301087). Originally posted by [POMXARK](https://github.com/POMXARK) on 2026-11-27T11:38:07Z. --- Merged upstream `main` (`9a9091d1`) and resolved conflicts cleanly (preserving upstream `MIRROR_NOT_VIEW`, `TwinState`, and moving the view-map test into `lower_tests.rs`). Re-verified on Windows release: `cargo check -p victory` OK, `victory-shader` 253/253 PASS, `victory-gpu -- descriptor::` 43/43 PASS.
POMXARK commented 2026-11-27 11:38:34 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by POMXARK on 2026-11-27T11:38:34Z.


Merged upstream main (9a9091d1) and resolved conflicts cleanly (preserving upstream MIRROR_NOT_VIEW, LaneState, and moving the view-map test into lower_tests.rs). Re-verified on Windows release: cargo check -p victory OK, victory-shader 253/253 PASS, victory-gpu -- descriptor:: 43/43 PASS.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7217309745 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1300#issuecomment-7217309745). Originally posted by [POMXARK](https://github.com/POMXARK) on 2026-11-27T11:38:34Z. --- Merged upstream `main` (`9a9091d1`) and resolved conflicts cleanly (preserving upstream `MIRROR_NOT_VIEW`, `LaneState`, and moving the view-map test into `lower_tests.rs`). Re-verified on Windows release: `cargo check -p victory` OK, `victory-shader` 253/253 PASS, `victory-gpu -- descriptor::` 43/43 PASS.
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/1300:upstream-pr/1300'
git switch 'upstream-pr/1300'

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/1300'
git switch 'upstream-pr/1300'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1300'
git switch 'upstream-pr/1300'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1300'
git switch 'main'
git merge --squash 'upstream-pr/1300'
git switch 'main'
git merge --ff-only 'upstream-pr/1300'
git switch 'main'
git merge 'upstream-pr/1300'
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!1297
No description provided.