gpu: include VICTORY_HW_RT in shader cache key #490

Closed
github-bot wants to merge 1 commit from github-bot/gh-490 into main AGit
Owner

@⁠cerealfordinner on GitHub · 2026-12-04 18:19 UTC · original
cerealfordinner:pr-hwrt-cache-key → main · +7 −0 · 1 files · 1 commits · closed without merging

Include the VICTORY_HW_RT flag in the shader cache key so toggling hardware ray tracing on/off invalidates cached shaders. Without this, switching VICTORY_HW_RT doesn't rebuild cached shaders that may have been compiled for the other mode.

Signed-off-by: cerealfordinner [email protected]

**@⁠cerealfordinner** on GitHub · 2026-12-04 18:19 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/490) `cerealfordinner:pr-hwrt-cache-key` → `main` · +7 −0 · 1 files · 1 commits · closed without merging Include the VICTORY_HW_RT flag in the shader cache key so toggling hardware ray tracing on/off invalidates cached shaders. Without this, switching VICTORY_HW_RT doesn't rebuild cached shaders that may have been compiled for the other mode. Signed-off-by: cerealfordinner <[email protected]>
A run refuses VICTORY_HW_RT=1 on this branch, but `victory shaders` and
`translate --warm` take it and write the cache a run reads. Their
lifted programs went in under the key of the plain ones, so a later run
without the switch would have been given them, with no host structure
to bind.

The switch (and VICTORY_HW_RT_LIFT under it) now goes into the key,
only when on: caches made without it keep their keys.

Measured on one machine (Wine, RADV), the title's 25,694 containers,
on a cache holding the plain translations: `victory shaders` with
VICTORY_HW_RT=1 took 105 s (it translated them), and the one after it
with no switch took 5 s and translated none again (the plain entries
were still there, under their own keys).

Not tested by a unit test: the key reads the environment once per
process. No run.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 18:20:15 +00:00
Author
Owner

@⁠Kal0s-design on GitHub · 2026-12-04 19:08 UTC · original

Tried 33a92e6 on native Windows. It doesn't build on main. cargo check -p victory-gpu stops with E0425 on victory_shader::emit::hw_rt and hw_rt_lift, because neither exists on main. They come from #468 (the hardware ray tracing series, still a draft), and the shader_cache.rs block in #468 is word for word the same as the one added here. So this looks like it belongs to that series and would need it merged first, or the PR based on it.

AI-assisted: yes

**@⁠Kal0s-design** on GitHub · 2026-12-04 19:08 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/490#issuecomment-7421449256) Tried 33a92e6 on native Windows. It doesn't build on main. `cargo check -p victory-gpu` stops with E0425 on `victory_shader::emit::hw_rt` and `hw_rt_lift`, because neither exists on main. They come from #468 (the hardware ray tracing series, still a draft), and the shader_cache.rs block in #468 is word for word the same as the one added here. So this looks like it belongs to that series and would need it merged first, or the PR based on it. AI-assisted: yes
github-bot closed this pull request 2026-12-04 22:03:20 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.