Fixes following Piglit test:
        global-scope-binding-qualifier.frag

Signed-off-by: Tapani Pälli <tapani.pa...@intel.com>
---
 src/glsl/glsl_parser.yy | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index f0abeb0..c1bcccc 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -2786,6 +2786,17 @@ layout_defaults:
       if (!state->default_shader_storage_qualifier->merge_qualifier(& @1, 
state, $1)) {
          YYERROR;
       }
+
+      /* From the GLSL 4.50 spec, section 4.4.5:
+       *
+       *     "It is a compile-time error to specify the binding identifier for
+       *     the global scope or for block member declarations."
+       */
+      if (state->default_shader_storage_qualifier->flags.q.explicit_binding) {
+         _mesa_glsl_error(& @1, state,
+                          "binding qualifier cannot be set for default 
layout");
+      }
+
       $$ = NULL;
    }
 
-- 
2.4.3

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to