native shader cache ignores VICTORY_DEBUG_* and VICTORY_NO_LOCKSTEP: debug switches do nothing on a warm cache #284

Closed
opened 2026-11-27 08:47:26 +00:00 by github-bot · 3 comments
Owner

@⁠maaalrey on GitHub · 2026-11-27 08:44 UTC · original

The native shader cache keys on the translator's sources, the entry encoding, the loop limit and the translation Options. It doesn't key on the switches the translator reads from the environment while it translates: VICTORY_DEBUG_PS, _PS_RED, _VS_PARAM, _VS_POS, _VS_TRI and VICTORY_NO_LOCKSTEP.

  • On a warm cache those switches silently do nothing. A run with VICTORY_DEBUG_PS_RED=1 VICTORY_DEBUG_VS_TRI=1 translated no shader and left every target black.
  • A translation made with a switch is stored under the normal key and served to later runs without it.

Plan: list the switches next to the translator (TRANSLATION_SWITCHES), hash those that are set into the build key next to the loop limit, and add a test that fails when a new VICTORY_ switch read in emit is in no list. I have it ready.

**@⁠maaalrey** on GitHub · 2026-11-27 08:44 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/284) The native shader cache keys on the translator's sources, the entry encoding, the loop limit and the translation `Options`. It doesn't key on the switches the translator reads from the environment while it translates: `VICTORY_DEBUG_PS`, `_PS_RED`, `_VS_PARAM`, `_VS_POS`, `_VS_TRI` and `VICTORY_NO_LOCKSTEP`. - On a warm cache those switches silently do nothing. A run with `VICTORY_DEBUG_PS_RED=1 VICTORY_DEBUG_VS_TRI=1` translated no shader and left every target black. - A translation made with a switch is stored under the normal key and served to later runs without it. Plan: list the switches next to the translator (`TRANSLATION_SWITCHES`), hash those that are set into the build key next to the loop limit, and add a test that fails when a new `VICTORY_` switch read in `emit` is in no list. I have it ready.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 08:47:26 +00:00
Author
Owner

@⁠maaalrey on GitHub · 2026-11-27 08:44 UTC · original

/claim

**@⁠maaalrey** on GitHub · 2026-11-27 08:44 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/284#issuecomment-7213870999) /claim
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-27 08:44 UTC · original

Claimed by @⁠maaalrey. Open a draft pull request with Refs #284 in its description within 24 hours, or the claim expires.

**@⁠github-actions[bot]** on GitHub · 2026-11-27 08:44 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/284#issuecomment-7213874838) Claimed by @⁠maaalrey. Open a draft pull request with `Refs #284` in its description within 24 hours, or the claim expires.
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-27 11:46 UTC · original

Fixed by #285, which is merged into main: the shader cache key now includes the translator's environment switches, so a debug switch can no longer be served a shader built without it. Thank you @⁠maaalrey.

**@⁠LakshanSivakumar** on GitHub · 2026-11-27 11:46 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/284#issuecomment-7217451019) Fixed by #285, which is merged into main: the shader cache key now includes the translator's environment switches, so a debug switch can no longer be served a shader built without it. Thank you @⁠maaalrey.
This discussion has been locked. Commenting is limited to contributors.
No description provided.