gpu: select direct-heap root-signature flags from shader features #58

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

@⁠battledogegames-design on GitHub · 2026-11-26 00:39 UTC · original
battledogegames-design:gpu/root19-direct-heap-flags → main · +113 −7 · 1 files · 1 commits · open

The host currently requests both direct-indexing flags for every translated pipeline. This change reads the final shader containers, including cache hits, and combines their SFI0 requirements across stages. Direct resource-heap access requests the resource flag, direct sampler-heap access requests the sampler flag, and pipelines using neither request neither. Missing, malformed, conflicting, or unrecognized metadata retains both flags. The input-assembler flag is preserved, and the failure diagnostic includes the attempted heap flags.

Thanks to itsonewi for tracing the serializer diagnostic in #19 and to the hardware reporters in #12 and #4. Whether this restores the dropped RX 6600 dispatch remains unverified on affected hardware.

On Windows with Rust 1.98.1, the locked victory-gpu target compiled and the focused native regression passed. Synthetic WARP tests covered explicit bindings, each direct heap, both heaps, and a graphics pipeline with requirements split across stages. Successful compute dispatches returned the expected bytes.

Twenty other pipeline tests passed. On the same Windows runner, the depth-bounds test failed twice on the unmodified base and twice with the patch, reading 255 instead of 0 each time. Target Clippy with warnings denied also failed on both revisions with matching diagnostics and source locations. The validation workflows finished red. The comparison found no patch-specific failure in either check.

Native build and pipeline tests · Controlled comparison and Clippy

**@⁠battledogegames-design** on GitHub · 2026-11-26 00:39 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/58) `battledogegames-design:gpu/root19-direct-heap-flags` → `main` · +113 −7 · 1 files · 1 commits · open The host currently requests both direct-indexing flags for every translated pipeline. This change reads the final shader containers, including cache hits, and combines their SFI0 requirements across stages. Direct resource-heap access requests the resource flag, direct sampler-heap access requests the sampler flag, and pipelines using neither request neither. Missing, malformed, conflicting, or unrecognized metadata retains both flags. The input-assembler flag is preserved, and the failure diagnostic includes the attempted heap flags. Thanks to itsonewi for tracing the serializer diagnostic in #19 and to the hardware reporters in #12 and #4. Whether this restores the dropped RX 6600 dispatch remains unverified on affected hardware. On Windows with Rust 1.98.1, the locked victory-gpu target compiled and the focused native regression passed. Synthetic WARP tests covered explicit bindings, each direct heap, both heaps, and a graphics pipeline with requirements split across stages. Successful compute dispatches returned the expected bytes. Twenty other pipeline tests passed. On the same Windows runner, the depth-bounds test failed twice on the unmodified base and twice with the patch, reading 255 instead of 0 each time. Target Clippy with warnings denied also failed on both revisions with matching diagnostics and source locations. The validation workflows finished red. The comparison found no patch-specific failure in either check. [Native build and pipeline tests](https://github.com/battledogegames-design/VIctory-7900XTX/actions/runs/45728020310) · [Controlled comparison and Clippy](https://github.com/battledogegames-design/VIctory-7900XTX/actions/runs/45728879336)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:31:39 +00:00
Author
Owner

@⁠spook40 on GitHub · 2026-11-26 00:46 UTC · original

Tested PR #58 on NVIDIA GeForce RTX 3060 Ti (8 GB VRAM) (pr-58 branch, diag profile with --features diagnostics, VICTORY_TEXTURE_MAX=512):

  • In-game & pacing: Ran without crashing (last logged first bind at frame 1766 before shutdown via title did not finish suspending in time; ending the title), averaging 2.0 fps (499.1 ms/frame, 191.0 ms preparing, 46.6 ms copying back) with 3301 draws/frame.
  • Drops & descriptors: Saw 3620 dropped indirect calls/frame and 1102 dropped without a host pipeline (597 being made), with 15551 dynamic descriptor tables asked/frame (4159 refused, 79.3 ms searching) and card memory at 7491 MB / 7066 MB budget.
  • Pipeline cache: Saved a 345331406-byte host pipeline library (early=2667, made=1177, loaded=735, started_early=2507).

AI-assisted with Gemini.

**@⁠spook40** on GitHub · 2026-11-26 00:46 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/58#issuecomment-7179101467) Tested PR #58 on **NVIDIA GeForce RTX 3060 Ti (8 GB VRAM)** (`pr-58` branch, `diag` profile with `--features diagnostics`, `VICTORY_TEXTURE_MAX=512`): * **In-game & pacing:** Ran without crashing (last logged `first bind` at frame `1766` before shutdown via `title did not finish suspending in time; ending the title`), averaging `2.0 fps` (`499.1 ms/frame`, `191.0 ms` preparing, `46.6 ms` copying back) with `3301 draws/frame`. * **Drops & descriptors:** Saw `3620` dropped indirect calls/frame and `1102` dropped without a host pipeline (`597` being made), with `15551` dynamic descriptor tables asked/frame (`4159` refused, `79.3 ms` searching) and card memory at `7491 MB` / `7066 MB` budget. * **Pipeline cache:** Saved a `345331406`-byte host pipeline library (`early=2667`, `made=1177`, `loaded=735`, `started_early=2507`). AI-assisted with Gemini.
Author
Owner

@⁠MoonYueya on GitHub · 2026-11-26 05:28 UTC · original

Tested on an RTX 3080 10 GB, driver 32.0.16.1742, Ryzen 7 7700, 31.1 GB RAM, Windows 11 26300, merged into MoonYueya/VIctory-Kira a3de053 on top of e2a28ec together with the other open NVIDIA PRs (#47 #48 #24 #23 #78 #42 #66 #18 #10 #4 #58 #17).

  • cargo test --workspace --locked --no-fail-fast -- --test-threads=1: 936 passed, 0 failed, 45 ignored after this PR was merged (never below the count before it; the branch started at 923).
  • No root signature was refused in any run.
  • With everything merged, three unattended runs reached the world with no device removal, panic or untranslated shader.

What this does not show: the PR was not run in the game on its own, so this is unit tests plus a combined run, not an in-game verification of this PR by itself; nothing here is about picture quality.

AI-assisted.

**@⁠MoonYueya** on GitHub · 2026-11-26 05:28 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/58#issuecomment-7183520524) Tested on an RTX 3080 10 GB, driver 32.0.16.1742, Ryzen 7 7700, 31.1 GB RAM, Windows 11 26300, merged into [MoonYueya/VIctory-Kira](https://github.com/MoonYueya/VIctory-Kira) `a3de053` on top of `e2a28ec` together with the other open NVIDIA PRs (#47 #48 #24 #23 #78 #42 #66 #18 #10 #4 #58 #17). - `cargo test --workspace --locked --no-fail-fast -- --test-threads=1`: **936 passed, 0 failed, 45 ignored** after this PR was merged (never below the count before it; the branch started at 923). - No root signature was refused in any run. - With everything merged, three unattended runs reached the world with no device removal, panic or untranslated shader. What this does **not** show: the PR was not run in the game on its own, so this is unit tests plus a combined run, not an in-game verification of this PR by itself; nothing here is about picture quality. *AI-assisted.*
Author
Owner

@⁠avatarmanz on GitHub · 2026-11-26 07:36 UTC · original

Left open: narrower root-signature flags change every pipeline's root signature (and its library key) on AMD; needs an in-game check first.

**@⁠avatarmanz** on GitHub · 2026-11-26 07:36 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/58#issuecomment-7185637547) Left open: narrower root-signature flags change every pipeline's root signature (and its library key) on AMD; needs an in-game check first.
Author
Owner

@⁠battledogegames-design on GitHub · 2026-11-26 12:04 UTC · original

RX 6800 XT root-signature cache validation

I tested the pipeline-library concern on a physical Radeon RX 6800 XT using VIctory’s current key function, the same explicitly bound compute shader and bindings, and fresh processes.

  • The original 0xC00 signature created and stored its pipeline, then loaded it in a subsequent process.
  • The narrowed 0x000 signature produced a different key in the same library. It missed once, rebuilt and stored successfully, then loaded in a subsequent process.
  • The original entry remained loadable afterward. All five compute dispatches returned the expected readbacks.

A separate physical-AMD matrix matched 20/20 expected pipeline-creation outcomes, including missing-flag rejection. All nine successful compute dispatches produced correct readbacks. This establishes cache-key separation and warm reuse for the tested compute pipeline. Graphics testing reached pipeline creation only, and I didn’t capture the exact driver build.

Could an AMD tester compare A (unmodified main) with B (the same main plus only PR #58) using the same GPU, driver, game build, scene, and settings? Suggested sequence: A cold → B cold → B warm → A warm, with separate caches for A and B and each revision retaining its own cache for its warm run.

Matched-scene screenshots, root-signature serialization and pipeline-creation errors, dropped shader hashes, device removals, and actual pipeline made/loaded counts would help. Opening the library file alone does not demonstrate a successful pipeline load.

The PR remains unchanged pending the in-game comparison. RX 6600 dispatch recovery is still unverified.

**@⁠battledogegames-design** on GitHub · 2026-11-26 12:04 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/58#issuecomment-7191535934) ### RX 6800 XT root-signature cache validation I tested the pipeline-library concern on a physical Radeon RX 6800 XT using VIctory’s current key function, the same explicitly bound compute shader and bindings, and fresh processes. - The original `0xC00` signature created and stored its pipeline, then loaded it in a subsequent process. - The narrowed `0x000` signature produced a different key in the same library. It missed once, rebuilt and stored successfully, then loaded in a subsequent process. - The original entry remained loadable afterward. All five compute dispatches returned the expected readbacks. A separate physical-AMD matrix matched **20/20** expected pipeline-creation outcomes, including missing-flag rejection. All nine successful compute dispatches produced correct readbacks. This establishes cache-key separation and warm reuse for the tested compute pipeline. Graphics testing reached pipeline creation only, and I didn’t capture the exact driver build. Could an AMD tester compare **A (unmodified main)** with **B (the same main plus only PR #58)** using the same GPU, driver, game build, scene, and settings? Suggested sequence: **A cold → B cold → B warm → A warm**, with separate caches for A and B and each revision retaining its own cache for its warm run. Matched-scene screenshots, root-signature serialization and pipeline-creation errors, dropped shader hashes, device removals, and actual pipeline `made`/`loaded` counts would help. Opening the library file alone does not demonstrate a successful pipeline load. The PR remains unchanged pending the in-game comparison. RX 6600 dispatch recovery is still unverified.
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-26 19:54 UTC · original

I checked the final bytecode cached by two independent 720p cold starts on a 7900 XT (RADV 26.3.1). In the first cache, 2,011 of 2,840 shader stages requested only the resource heap, 745 requested both heaps, and 84 requested neither. The second cache had 2,005 / 738 / 85 respectively. Every entry had a single readable SFI0. For compute alone that was 798 resource-only, 327 both and 4 neither on the first boot.

These are per-stage counts. A graphics signature takes the union across its stages. I’ve queued an in-game comparison that changes only the flag selection on the same executable and starts with empty caches on each run. The counts establish how often the change could apply here. The frame time and picture still need testing.

**@⁠UwUCammie** on GitHub · 2026-11-26 19:54 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/58#issuecomment-7202090922) I checked the final bytecode cached by two independent 720p cold starts on a 7900 XT (RADV 26.3.1). In the first cache, 2,011 of 2,840 shader stages requested only the resource heap, 745 requested both heaps, and 84 requested neither. The second cache had 2,005 / 738 / 85 respectively. Every entry had a single readable SFI0. For compute alone that was 798 resource-only, 327 both and 4 neither on the first boot. These are per-stage counts. A graphics signature takes the union across its stages. I’ve queued an in-game comparison that changes only the flag selection on the same executable and starts with empty caches on each run. The counts establish how often the change could apply here. The frame time and picture still need testing.
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-26 21:56 UTC · original

I finished the cold comparison on the RX 7900 XT with RADV 26.3.1. Selective flags gave 2,305 presents in 300 seconds (7.68 FPS), against 2,350 (7.83 FPS) with them off. P99 fell from 3.06 s to 2.61 s, but the longest stall was still about 11.5 s. Time in gaps over 100 ms was 209.82 s on and 210.34 s off.

Both boots used the same executable and inputs, five empty graphics caches, no story save, and a 1280×720 scene. The opening was at different shots by 235 s, so I wouldn't draw a per-scene conclusion. I don't see a cold-start FPS gain in this pair. Measurements and cache counts

**@⁠UwUCammie** on GitHub · 2026-11-26 21:56 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/58#issuecomment-7204213839) I finished the cold comparison on the RX 7900 XT with RADV 26.3.1. Selective flags gave 2,305 presents in 300 seconds (7.68 FPS), against 2,350 (7.83 FPS) with them off. P99 fell from 3.06 s to 2.61 s, but the longest stall was still about 11.5 s. Time in gaps over 100 ms was 209.82 s on and 210.34 s off. Both boots used the same executable and inputs, five empty graphics caches, no story save, and a 1280×720 scene. The opening was at different shots by 235 s, so I wouldn't draw a per-scene conclusion. I don't see a cold-start FPS gain in this pair. [Measurements and cache counts](https://github.com/UwUCammie/victory-amd/blob/a48b9ec5/benchmarks/README.md)
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

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