From eab622388ffae424209805e13716f6d980f24504 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Thu, 27 Aug 2026 20:07:49 -0400 Subject: [PATCH] [Test] (TranslationCache): pin the two interface-block location-strip flags as L2 key material --- .../ShaderTranspiler/TranslationCacheTest.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/MobileGL/MG_Test/ShaderTranspiler/TranslationCacheTest.cpp b/MobileGL/MG_Test/ShaderTranspiler/TranslationCacheTest.cpp index 6078e1a2..a8863da3 100644 --- a/MobileGL/MG_Test/ShaderTranspiler/TranslationCacheTest.cpp +++ b/MobileGL/MG_Test/ShaderTranspiler/TranslationCacheTest.cpp @@ -1001,6 +1001,20 @@ TEST_F(TranslationCacheTest, L2KeyMovesWithEveryGateThatSteersTheEsslChain) { v.outputBlockRenames = &otherIoBlockRenames; variants.emplace_back("outputBlockRenames(other target)", BuildEsslTranslationKey(v)); } + { // the two arguments to StripIoBlockLocationsForEssl, and separate cases for the same + // reason the rename maps are: a stage strips the blocks it CONSUMES only when the + // producer is in this program and the ones it PRODUCES only when the consumer is, so + // the two directions are independently armed and a key that folded them together + // would serve a fragment stage's ESSL to a vertex stage that needs the opposite. + EsslTranslationKeyInputs v = base; + v.stripInputBlockLocations = true; + variants.emplace_back("stripInputBlockLocations", BuildEsslTranslationKey(v)); + } + { + EsslTranslationKeyInputs v = base; + v.stripOutputBlockLocations = true; + variants.emplace_back("stripOutputBlockLocations", BuildEsslTranslationKey(v)); + } { EsslTranslationKeyInputs v = base; v.enableSpirvValidation = true;