[Fix] (MG_Util/ShaderTranspiler): stop stripping precision qualifiers - the strip corrupted "precision highp float;" into invalid syntax; glslang accepts and ignores them natively in 460 core (unblocks ~2000 GL CTS cases per backend)

This commit is contained in:
2026-07-16 01:50:33 -04:00
parent 37a7f35a27
commit 3a40778c4b
2 changed files with 77 additions and 14 deletions
@@ -262,15 +262,8 @@ namespace {
}
void ModernizeLegacyGLSL(MobileGL::ShaderStage stage, MobileGL::String& source) {
RemoveDefineForIdentifier(source, "HIGHP_OR_DEFAULT");
RemoveDefineForIdentifier(source, "MEDIUMP_OR_DEFAULT");
RemoveDefineForIdentifier(source, "LOWP_OR_DEFAULT");
ReplaceIdentifier(source, "HIGHP_OR_DEFAULT", "");
ReplaceIdentifier(source, "MEDIUMP_OR_DEFAULT", "");
ReplaceIdentifier(source, "LOWP_OR_DEFAULT", "");
ReplaceIdentifier(source, "highp", "");
ReplaceIdentifier(source, "mediump", "");
ReplaceIdentifier(source, "lowp", "");
// Precision qualifiers (highp/mediump/lowp and default-precision statements) are legal and
// ignored in the forced "#version 460 core" profile, so glslang handles them natively.
ReplaceIdentifier(source, "texture2D", "texture");
ReplaceIdentifier(source, "texture2DProj", "textureProj");