Separate shader cache entries for native RT closest-hit modes #2

Open
yualk wants to merge 1 commit from upstream-pr/2 into main
yualk commented 2026-11-28 13:59:24 +00:00 (Migrated from github.com)

Imported from maren-halv/VIctory-DXR. Originally posted by yualk on 2026-11-28T13:59:24Z.


Problem

VICTORY_NATIVE_RT_TWO_PASS changes closest-hit RayQuery lowering but was not part of the runtime shader translation key. Runs that share a cache can therefore pick up the other mode's translation. The existing state-machine and front/back keys cover different switches.

Change

Key the effective closest-hit bit only in native RT mode. Unset and explicit 1 share an entry, 0 has its own, and raster mode does not split on this flag. No lowering, shader format, or cache migration changes. The build fingerprint includes this file, so existing cache entries rebuild once under the new translator fingerprint.

Verification

On Windows MSVC (Rust 1.98.1), cargo test --profile diag --locked --offline -p victory-gpu --lib shader_cache::tests:: -- --test-threads=1 passed 6 tests. The regression uses one actual disk cache in six fresh processes and checks hit/miss behavior and returned payloads. No title, device, or performance claims.

AI-assisted.

<!-- greyfinch-sync:maren-halv/VIctory-DXR:issue:5540879943 --> Imported from [maren-halv/VIctory-DXR](https://github.com/maren-halv/VIctory-Fast/pull/2). Originally posted by [yualk](https://github.com/yualk) on 2026-11-28T13:59:24Z. --- ## Problem `VICTORY_NATIVE_RT_TWO_PASS` changes closest-hit RayQuery lowering but was not part of the runtime shader translation key. Runs that share a cache can therefore pick up the other mode's translation. The existing state-machine and front/back keys cover different switches. ## Change Key the effective closest-hit bit only in native RT mode. Unset and explicit `1` share an entry, `0` has its own, and raster mode does not split on this flag. No lowering, shader format, or cache migration changes. The build fingerprint includes this file, so existing cache entries rebuild once under the new translator fingerprint. ## Verification On Windows MSVC (Rust 1.98.1), `cargo test --profile diag --locked --offline -p victory-gpu --lib shader_cache::tests:: -- --test-threads=1` passed **6 tests**. The regression uses one actual disk cache in six fresh processes and checks hit/miss behavior and returned payloads. No title, device, or performance claims. AI-assisted.
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/2:upstream-pr/2'
git switch 'upstream-pr/2'

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/2'
git switch 'upstream-pr/2'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2'
git switch 'upstream-pr/2'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2'
git switch 'main'
git merge --squash 'upstream-pr/2'
git switch 'main'
git merge --ff-only 'upstream-pr/2'
git switch 'main'
git merge 'upstream-pr/2'
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
maren-halv/VIctory-Fast!2
No description provided.