You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Include shader-lowering switches in cache identity - #112
VICTORY_FIRST_HALF and VICTORY_FIRSTLANE_OWN affect shader translation but were absent from disk-cache identity. A translation produced under one setting could be reused under another, including bypassing a refusal.
Include both settings in the cache switches. For FIRST_HALF, four warm CLI processes toggling 0/1/0/1 each translated two synthetic programs; cache entries accumulated 2/4/4/4 instead of baseline 2/2. A synthetic pixel program refused with the setting at 0 and emitted DXIL at 1. For FIRSTLANE_OWN, fresh processes using unset/1/0/1 created 1/2/3/3 entries, confirming isolation and repeat reuse.
Pinned Rust 1.98.1: both workspace Clippy configurations and asset policy passed; serial workspace tests: 683 passed, 0 failed, 12 ignored with CI's software-adapter setting. No gameplay run.
Thanks to @retrope13 for independently testing the PR and identifying the missing FIRSTLANE_OWN switch. GPT-6.2 Astra implemented and tested the changes.
Independent hardware-GPU Windows verification and env-var audit of #112 (83a49c66) against main (64bd58f5): both Clippy configs, shader_cache tests (debug + release), and full real-GPU workspace suite pass with 0 failures — plus one sibling missing switch spotted in lower.rs.
Diff & Env-Var Audit (crates/victory-shader/ vs. crates/victory-gpu/src/shader_cache.rs:81-90)
Confirmed "VICTORY_FIRST_HALF" (lower.rs:1543) is cleanly hashed by raw var_os value in shader_cache::build().
Sibling missing switch found — VICTORY_FIRSTLANE_OWN (crates/victory-shader/src/emit/lower.rs:7683): Auditing every std::env::var* in crates/victory-shader/ turned up one remaining translation-affecting switch that is not in shader_cache.rs:81-90:
With VICTORY_FIRSTLANE_OWN=1, lower.rs:7683-7684 takes the host wave's own first lane (return int(self, mine)) and caches DXIL.
With VICTORY_FIRSTLANE_OWN unset or 0, lower.rs:7687 refuses translation (Err("a first-lane read where not every lane runs")).
Without "VICTORY_FIRSTLANE_OWN" in shader_cache.rs:81-90, a shader cached under =1 can still be served on a later run with it unset (bypassing the refusal, same class of issue as VICTORY_FIRST_HALF).
All other translation-affecting switches in crates/victory-shader/ (VICTORY_SHADER_LOOP_LIMIT, VICTORY_GROUP_SYNC, VICTORY_RAY_TRACING / VICTORY_AMBIENT_FALLBACK, VICTORY_SHADER_OPT, VICTORY_WAVE_*, VICTORY_F16_NEAREST, VICTORY_STRICT_JOINS, VICTORY_MESH_OUTPUT_STRICT) are accounted for in shader_cache::build(), and the capture probes bypass the cache in host_shader().
Not Tested
Live retail gameplay runs, AMD GPUs, and the 12 #[ignore] tests.
AI disclosure: Antigravity (Gemini 4 Neon, High) ran the checks, audited all victory-shader env switches, and drafted this report.
Thanks @retrope13 for the independent hardware run and for finding VICTORY_FIRSTLANE_OWN. Confirmed: it changes the first-lane lowering/refusal path and was missing from the key. Pushed 8669c76 to include it.
Fresh CLI processes with the setting unset / 1 / 0 / 1 produced 1 / 2 / 3 / 3 cache entries, confirming isolation and repeat reuse. Targeted shader-cache tests, both workspace Clippy configurations and asset policy passed; the full serial workspace suite passed with 683 passed and 12 ignored using the CI software-adapter setting. No gameplay run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
VICTORY_FIRST_HALFandVICTORY_FIRSTLANE_OWNaffect shader translation but were absent from disk-cache identity. A translation produced under one setting could be reused under another, including bypassing a refusal.Include both settings in the cache switches. For
FIRST_HALF, four warm CLI processes toggling 0/1/0/1 each translated two synthetic programs; cache entries accumulated 2/4/4/4 instead of baseline 2/2. A synthetic pixel program refused with the setting at 0 and emitted DXIL at 1. ForFIRSTLANE_OWN, fresh processes using unset/1/0/1 created 1/2/3/3 entries, confirming isolation and repeat reuse.Pinned Rust 1.98.1: both workspace Clippy configurations and asset policy passed; serial workspace tests: 683 passed, 0 failed, 12 ignored with CI's software-adapter setting. No gameplay run.
Thanks to @retrope13 for independently testing the PR and identifying the missing
FIRSTLANE_OWNswitch. GPT-6.2 Astra implemented and tested the changes.