summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl/ast_to_hir.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index cc1bb16bb64..a66ed5ec52b 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -1689,8 +1689,11 @@ ast_expression::do_hir(exec_list *instructions,
/* Break out if operand types were not parsed successfully. */
if ((op[0]->type == glsl_type::error_type ||
- op[1]->type == glsl_type::error_type))
+ op[1]->type == glsl_type::error_type)) {
+ type = glsl_type::error_type;
+ error_emitted = true;
break;
+ }
type = arithmetic_result_type(op[0], op[1],
(this->oper == ast_mul_assign),
@@ -2131,7 +2134,7 @@ ast_expression::do_hir(exec_list *instructions,
}
}
type = NULL; /* use result->type, not type. */
- assert(result != NULL || !needs_rvalue);
+ assert(error_emitted || (result != NULL || !needs_rvalue));
if (result && result->type->is_error() && !error_emitted)
_mesa_glsl_error(& loc, state, "type mismatch");