projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
91a8276
)
glsl: Disallow float literals with the 'f' suffix but no point or exponent
author
Neil Roberts
<neil@linux.intel.com>
Wed, 26 Nov 2014 17:15:01 +0000
(17:15 +0000)
committer
Neil Roberts
<neil@linux.intel.com>
Thu, 27 Nov 2014 11:43:17 +0000
(11:43 +0000)
According to the GLSL spec float literals like â1fâ shouldn't be allowed
without adding a decimal point or an exponent. Apparently the AMD driver also
disallows this so it seems unlikely that anything would be relying on it.
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/glsl_lexer.ll
patch
|
blob
|
history
diff --git
a/src/glsl/glsl_lexer.ll
b/src/glsl/glsl_lexer.ll
index ad6d32f9bc0c89b9b83174af62d4ca48df41c173..419a07b1daf8c92fc256b8084df5bc67974aec80 100644
(file)
--- a/
src/glsl/glsl_lexer.ll
+++ b/
src/glsl/glsl_lexer.ll
@@
-466,10
+466,6
@@
layout {
yylval->real = _mesa_strtof(yytext, NULL);
return FLOATCONSTANT;
}
-[0-9]+[fF] {
- yylval->real = _mesa_strtof(yytext, NULL);
- return FLOATCONSTANT;
- }
true {
yylval->n = 1;