Mesa (staging/18.1): glsl: handle error case with ast_post_inc, ast_post_dec
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Aug 10 15:40:38 UTC 2018
Module: Mesa
Branch: staging/18.1
Commit: af8076e1c9b4ce2d830adb91bca474ceb786bd43
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=af8076e1c9b4ce2d830adb91bca474ceb786bd43
Author: Tapani Pälli <tapani.palli at intel.com>
Date: Tue Aug 7 08:20:29 2018 +0300
glsl: handle error case with ast_post_inc, ast_post_dec
Return ir_rvalue::error_value with ast_post_inc, ast_post_dec if
parser error was emitted previously. This way process_array_size
won't see bogus IR generated like with commit 9c676a64273.
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98699
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
(cherry picked from commit 03a5acec687454c7fe227b4bdd2db97d515f1af7)
---
src/compiler/glsl/ast_to_hir.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index 94ce3c45d0..88c70c4050 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -1927,6 +1927,11 @@ ast_expression::do_hir(exec_list *instructions,
error_emitted = op[0]->type->is_error() || op[1]->type->is_error();
+ if (error_emitted) {
+ result = ir_rvalue::error_value(ctx);
+ break;
+ }
+
type = arithmetic_result_type(op[0], op[1], false, state, & loc);
ir_rvalue *temp_rhs;
More information about the mesa-commit
mailing list