[Fix] (ShaderTranspiler): keep arrays-of-arrays illegal below GLSL 430

The legacy-shader retry that retargets a failed parse to #version 460 also
re-legalized multidimensional arrays, which every desktop driver rejects
below 430 and KHR-GL33.shaders.arrays.invalid.* requires to fail. Skip the
retry when the original failure is glslang's arrays-of-arrays error; other
legacy rescues (e.g. layout(binding=...)) keep working.

KHR-GL33.shaders.arrays.invalid.multidimensional_array* now report the
required compile failure (4 cases).
This commit is contained in:
BZLZHH
2026-07-31 15:51:40 -04:00
parent eb76686c1e
commit 1bb736c57e
@@ -225,6 +225,13 @@ namespace MobileGL {
// using e.g. layout(binding=...) without the matching #extension line compiles on real
// drivers but is rejected here. Retry once at 460 before reporting failure; a genuinely
// broken shader fails both attempts and keeps its original diagnostics.
//
// Arrays of arrays are the exception: every desktop driver rejects them below 430
// (the GL33 CTS requires the compile failure), so re-legalizing them at 460 would
// trade a conformance failure for no real-world shader gain.
if (result.error().log.find("arrays of arrays") != String::npos) {
return result;
}
String retrySource = source;
if (!MG_Util::ShaderTranspiler::RetargetLegacyVersionDirectiveTo460(retrySource)) {
return result;