diff options
author | Matt Turner <[email protected]> | 2016-04-20 12:29:23 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2016-04-21 10:33:08 -0700 |
commit | 1bc983cd649af10d87500ceda37d7a36aa3741a6 (patch) | |
tree | c3ae2b1f3833099fe4a7771e3ef93354e8d5a948 | |
parent | 33565d67641142a68d537023e181b6dcd587e551 (diff) |
glsl: Relax GLSL 1.10 float suffix error to a warning.
Float suffixes are allowed in all subsequent GLSL specifications, and
it's obvious what the user meant if they specify one. Accept it with a
warning to avoid breaking applications, like Planeshift (although it
looks like between 0.6.1 and 0.6.3 they might have removed the suffixes
from their shaders).
Reviewed-by: Lars Hamre <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r-- | src/compiler/glsl/glsl_lexer.ll | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/glsl/glsl_lexer.ll b/src/compiler/glsl/glsl_lexer.ll index 6b1ef1717e5..8a562cbcb00 100644 --- a/src/compiler/glsl/glsl_lexer.ll +++ b/src/compiler/glsl/glsl_lexer.ll @@ -476,8 +476,8 @@ layout { char suffix = yytext[strlen(yytext) - 1]; if (!state->is_version(120, 300) && (suffix == 'f' || suffix == 'F')) { - _mesa_glsl_error(yylloc, state, - "Float suffixes are invalid in GLSL 1.10"); + _mesa_glsl_warning(yylloc, state, + "Float suffixes are invalid in GLSL 1.10"); } yylval->real = _mesa_strtof(yytext, NULL); return FLOATCONSTANT; |