Mesa (glsl2): glsl2: Don' t try to construct an ir_assignment with an invalid LHS

Ian Romanick idr at kemper.freedesktop.org
Wed Aug 4 23:52:17 UTC 2010


Module: Mesa
Branch: glsl2
Commit: 8e9ce2eb56a087c2544112700ae1abe3f96648dd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8e9ce2eb56a087c2544112700ae1abe3f96648dd

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Tue Aug  3 15:02:35 2010 -0700

glsl2: Don't try to construct an ir_assignment with an invalid LHS

---

 src/glsl/ast_to_hir.cpp |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index b65a323..14c5280 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -555,9 +555,8 @@ do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state,
 						  NULL));
    deref_var = new(ctx) ir_dereference_variable(var);
 
-   instructions->push_tail(new(ctx) ir_assignment(lhs,
-						  deref_var,
-						  NULL));
+   if (!error_emitted)
+      instructions->push_tail(new(ctx) ir_assignment(lhs, deref_var, NULL));
 
    return new(ctx) ir_dereference_variable(var);
 }




More information about the mesa-commit mailing list