[Fix] (ShaderTranspiler): key translation cache L1 on the front-end environment only, not backend identity

This commit is contained in:
Swung0x48
2026-08-20 11:30:31 -04:00
parent 5fecfa42f6
commit 93f1106ba4
7 changed files with 208 additions and 9 deletions
@@ -518,7 +518,10 @@ namespace MobileGL::MG_State::GLState {
if (!ShaderTranslationCacheEnabled()) return {};
SpirvTranslationKeyInputs keyInputs;
keyInputs.envFingerprint = env.fingerprint;
// The FRONT-END fingerprint, not env.fingerprint: L1 must be shared by two contexts
// on different GPUs whenever glslang would produce the same thing for them. See the
// classification on CompileEnv::frontendFingerprint.
keyInputs.frontendFingerprint = env.frontendFingerprint;
// Always 0 on both production parse paths (ShaderCompileTask::RunCompilePipeline and
// ClaimParsedShader's re-parse). In the key regardless, so that a future non-zero
// value cannot alias a module parsed without it.