summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/compiler/glsl/ast.h3
-rw-r--r--src/compiler/glsl/ast_type.cpp17
-rw-r--r--src/compiler/glsl/glsl_parser_extras.cpp2
3 files changed, 9 insertions, 13 deletions
diff --git a/src/compiler/glsl/ast.h b/src/compiler/glsl/ast.h
index d8b425c5981..afe91ea6d32 100644
--- a/src/compiler/glsl/ast.h
+++ b/src/compiler/glsl/ast.h
@@ -377,8 +377,7 @@ public:
bool process_qualifier_constant(struct _mesa_glsl_parse_state *state,
const char *qual_indentifier,
- unsigned *value, bool can_be_zero,
- bool must_match = false);
+ unsigned *value, bool can_be_zero);
void merge_qualifier(ast_layout_expression *l_expr)
{
diff --git a/src/compiler/glsl/ast_type.cpp b/src/compiler/glsl/ast_type.cpp
index dc4f2073fc9..b10ea3b787a 100644
--- a/src/compiler/glsl/ast_type.cpp
+++ b/src/compiler/glsl/ast_type.cpp
@@ -769,8 +769,7 @@ bool
ast_layout_expression::process_qualifier_constant(struct _mesa_glsl_parse_state *state,
const char *qual_indentifier,
unsigned *value,
- bool can_be_zero,
- bool must_match)
+ bool can_be_zero)
{
int min_value = 0;
bool first_pass = true;
@@ -808,14 +807,12 @@ ast_layout_expression::process_qualifier_constant(struct _mesa_glsl_parse_state
* in a single declaration, the last occurrence overrides the
* former occurrence(s)."
*/
- if (!first_pass) {
- if ((must_match || !state->has_420pack()) && *value != const_int->value.u[0]) {
- YYLTYPE loc = const_expression->get_location();
- _mesa_glsl_error(&loc, state, "%s layout qualifier does not "
- "match previous declaration (%d vs %d)",
- qual_indentifier, *value, const_int->value.i[0]);
- return false;
- }
+ if (!state->has_420pack() && !first_pass && *value != const_int->value.u[0]) {
+ YYLTYPE loc = const_expression->get_location();
+ _mesa_glsl_error(&loc, state, "%s layout qualifier does not "
+ "match previous declaration (%d vs %d)",
+ qual_indentifier, *value, const_int->value.i[0]);
+ return false;
} else {
first_pass = false;
*value = const_int->value.u[0];
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index 78f7fe25965..1e0298eb84e 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -1744,7 +1744,7 @@ set_shader_inout_layout(struct gl_shader *shader,
unsigned qual_max_vertices;
if (state->out_qualifier->max_vertices->
process_qualifier_constant(state, "max_vertices",
- &qual_max_vertices, true, true)) {
+ &qual_max_vertices, true)) {
if (qual_max_vertices > state->Const.MaxGeometryOutputVertices) {
YYLTYPE loc = state->out_qualifier->max_vertices->get_location();