mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-08 20:28:32 +09:00
[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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user