Fix root-indexed descriptors in rebuilt resource tables #1170

Closed
github-bot wants to merge 1 commit from gh-pr/1170/head into gh-pr/1170/base
Owner

@⁠draggygaggy-maker on GitHub · 2026-11-24 16:19 UTC · original
draggygaggy-maker:fix/root-indexed-descriptor-tables → main · +438 −24 · 10 files · 1 commits · closed without merging

Problem

Fresh descriptor tables are sized using statically listed resources. When a shader selects a descriptor through a root constant, the selected resource may fall outside the rebuilt table or remain unprepared for GPU access.

Solution

  • Track descriptor addresses derived from root constants.
  • Carry root-indexed resource metadata through shader translation and caching.
  • Extend rebuilt tables to include dynamically selected descriptors.
  • Prepare selected resources on both fresh table creation and cache hits.
  • Reject descriptor spans exceeding the available heap range.

Validation

Tested on an NVIDIA RTX 4060 Ti against upstream commit ffe310e.

  • GPU tests: 54 passed, 1 ignored.
  • Shader tests: 120 passed, 1 ignored.
  • Zero test failures.
  • Synthetic GPU readback verifies two independently selected buffer values.
  • Regression coverage includes invalid descriptor spans, cached tables, and the original static-only binding behavior.
  • Asset policy check passed.

Scope

This PR is limited to root-indexed descriptor tracking and rebuilt table binding. It does not include unrelated experimental rendering changes or game assets.

The synthetic regression is resolved. Impact on in-game world rendering has not yet been established.

AI Assistance Disclosure

This contribution was developed with assistance from OpenAI Codex (GPT-6.2 Astra) and ChatGPT through iterative debugging, implementation, code review, and regression testing.

All reported test results were obtained locally on physical hardware. The contribution was isolated from a larger experimental branch and independently tested against upstream main.

**@⁠draggygaggy-maker** on GitHub · 2026-11-24 16:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/1170) `draggygaggy-maker:fix/root-indexed-descriptor-tables` → `main` · +438 −24 · 10 files · 1 commits · closed without merging ## Problem Fresh descriptor tables are sized using statically listed resources. When a shader selects a descriptor through a root constant, the selected resource may fall outside the rebuilt table or remain unprepared for GPU access. ## Solution - Track descriptor addresses derived from root constants. - Carry root-indexed resource metadata through shader translation and caching. - Extend rebuilt tables to include dynamically selected descriptors. - Prepare selected resources on both fresh table creation and cache hits. - Reject descriptor spans exceeding the available heap range. ## Validation Tested on an NVIDIA RTX 4060 Ti against upstream commit `ffe310e`. - GPU tests: 54 passed, 1 ignored. - Shader tests: 120 passed, 1 ignored. - Zero test failures. - Synthetic GPU readback verifies two independently selected buffer values. - Regression coverage includes invalid descriptor spans, cached tables, and the original static-only binding behavior. - Asset policy check passed. ## Scope This PR is limited to root-indexed descriptor tracking and rebuilt table binding. It does not include unrelated experimental rendering changes or game assets. The synthetic regression is resolved. Impact on in-game world rendering has not yet been established. ## AI Assistance Disclosure This contribution was developed with assistance from OpenAI Codex (GPT-6.2 Astra) and ChatGPT through iterative debugging, implementation, code review, and regression testing. All reported test results were obtained locally on physical hardware. The contribution was isolated from a larger experimental branch and independently tested against upstream main.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:22:08 +00:00
github-bot closed this pull request 2026-11-26 04:22:08 +00:00
Author
Owner

@⁠pablogonz12 on GitHub · 2026-11-24 17:27 UTC · original

Setup: Linux, RX 9070 XT, RADV (Mesa 26.3.1), dxil-spirv master, spirv-val 1.3. Your head folded onto a base of origin/main ffe310e plus #1017 (main's host build fails without it: E0425 host_resource), then the four-stage offline check over 768 programs (751-program world dump + 52-program BVH capture, 35 duplicate containers skipped).

translate valid SPIR-V RADV pipeline
base 666 / 768 656 656
your head 666 / 768 656 656

No program gained or lost and the failure table is identical to the base, reason for reason: nothing in this capture reaches the class you handle, so this is a no-regression result only (same 10 SPIR-V validation failures as the base).

Not tested: in-game.

**@⁠pablogonz12** on GitHub · 2026-11-24 17:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/1170#issuecomment-7139222674) Setup: Linux, RX 9070 XT, RADV (Mesa 26.3.1), dxil-spirv master, spirv-val 1.3. Your head folded onto a base of origin/main `ffe310e` plus #1017 (main's host build fails without it: `E0425 host_resource`), then the four-stage offline check over 768 programs (751-program world dump + 52-program BVH capture, 35 duplicate containers skipped). | | translate | valid SPIR-V | RADV pipeline | |---|---|---|---| | base | 666 / 768 | 656 | 656 | | your head | 666 / 768 | 656 | 656 | No program gained or lost and the failure table is identical to the base, reason for reason: nothing in this capture reaches the class you handle, so this is a no-regression result only (same 10 SPIR-V validation failures as the base). Not tested: in-game.
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 18:00 UTC · original

Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 9b1a0fe: cargo test -p victory-gpu -p victory-shader passes, 170 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

**@⁠Zipettte** on GitHub · 2026-11-24 18:00 UTC · [original](https://github.com/Marvisak/VIctory/pull/1170#issuecomment-7140031133) Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 9b1a0fe: `cargo test -p victory-gpu -p victory-shader` passes, 170 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:33 UTC · original

Automated triage for the maintainers. Closing because another open pull request covers the same change.

See #420.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

**@⁠Marvisak** on GitHub · 2026-11-25 00:33 UTC · [original](https://github.com/Marvisak/VIctory/pull/1170#issuecomment-7148638716) Automated triage for the maintainers. Closing because another open pull request covers the same change. See #420. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1170
No description provided.