glsl: Merge precision qualifiers too
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 9 Aug 2013 23:01:04 +0000 (16:01 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 21 Aug 2013 14:43:48 +0000 (07:43 -0700)
We never noticed this before because we previously didn't enfoce GLSL ES
fragement shader requirements that precision be defined.  There may also
have been some interaction here with the addition of
GL_ARB_shading_language_420pack, but it doesn't appear to me that it
added any new bugs (just perhaps uncovered some old ones).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Cc: "9.2" <mesa-stable@lists.freedesktop.org>
src/glsl/ast_type.cpp

index ce6b6a77145bbe7d411fb2decdf06b82fbce95b2..8aabd95f999c59d1039435c93c7423b48f7df53a 100644 (file)
@@ -168,6 +168,9 @@ ast_type_qualifier::merge_qualifier(YYLTYPE *loc,
    if (q.flags.q.explicit_binding)
       this->binding = q.binding;
 
+   if (q.precision != ast_precision_none)
+      this->precision = q.precision;
+
    return true;
 }