Repository navigation
M4.03
Pre-release
Pre-release
[M4.03] — 2026-10-18
Dead-code texture-reference fix: the corpus verdict moved from 2,567 LOAD /
91 FAIL to 2,637 LOAD / 21 FAIL — zero regressions at the pinned corpus
revision.
Fixed
- Sampled-but-unbound textures behind preprocessor dead code (70 presets:
Mega Bezel NO-REFLECT variants'ReflectionPass, uborder
ambi_temporal_passwrappers, ...): the sampler rewrite ran its
sample-site check on the raw include-resolved text, so a name sampled only
inside conditional blocks the GLSL preprocessor discards
(#ifdef IS_NO_REFLECT_PRESETwraps both the ReflectionPass declaration
and its sampling in NO-REFLECT variants) hard-failed the load although
glslang discards every use.RewriteSamplersnow answers the "is it
sampled?" question on a glslang-preprocessed copy of the stage text — the
exact text and environmentCompilePassfeeds glslang, with no host
defines injected (injecting anything would diverge from the real compile
and could flip dead code live). A name still sampled after preprocessing
remains a hard failure; a dead-sampled orphan declaration drops with a
warning, matching RetroArch. The oracle is computed lazily (at most one
preprocess per stage, only on the old failure path — healthy presets pay
nothing), and a preprocess failure falls back to the raw verdict, which is
the pre-fix behavior.
Tests
test_slang_translatedead-code cases: dead#ifdefand dead#if
shapes (dead declaration + dead sampling; live declaration + dead
sampling) translate with no bindings emitted and drop warnings reported;
the same conditional shape with a live gate still hard-fails with
unknown texture reference.
Changed
corpus/baseline-ledger.txtrefreshed: 2,658 presets → 2,637 loaded /
21 failed. The remaining 21 are not library failures: 6 koko-aio
refs/parameter-only overlays (no passes), 4 Adamant tilde variants
(malformed shader indices), 6 nedi bilateral-variants (vhs.slang samples a
playLUT the preset never declares), 1 crt-super-xbr (InfoCachePass
absent from the mini-chain), 1 append-uborder-koko-ambi (template missing
its appended chain), 1 technicolor + 1 gbc-frontlit (stray-quote malformed
keys), and the corpus's own intentionally-invalid
test/feedback-noncausal.
Full Changelog: M4.02...M4.03