diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/glsl/ast_type.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/compiler/glsl/ast_type.cpp b/src/compiler/glsl/ast_type.cpp index 6aedeaa62d7..1adb1f4752a 100644 --- a/src/compiler/glsl/ast_type.cpp +++ b/src/compiler/glsl/ast_type.cpp @@ -316,10 +316,8 @@ ast_type_qualifier::merge_qualifier(YYLTYPE *loc, } if (q.flags.q.point_mode) { - if (this->flags.q.point_mode && this->point_mode != q.point_mode) { - _mesa_glsl_error(loc, state, "conflicting point mode used"); - return false; - } + /* Point mode can only be true if the flag is set. */ + assert (!this->flags.q.point_mode || (this->point_mode && q.point_mode)); this->flags.q.point_mode = 1; this->point_mode = q.point_mode; } @@ -582,12 +580,10 @@ ast_type_qualifier::validate_in_qualifier(YYLTYPE *loc, "conflicting ordering specified"); } - if (state->in_qualifier->flags.q.point_mode && this->flags.q.point_mode - && state->in_qualifier->point_mode != this->point_mode) { - r = false; - _mesa_glsl_error(loc, state, - "conflicting point mode specified"); - } + /* Point mode can only be true if the flag is set. */ + assert (!state->in_qualifier->flags.q.point_mode + || !this->flags.q.point_mode + || (state->in_qualifier->point_mode && this->point_mode)); return r; } |