diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2014-01-24 10:42:48 -0800 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2014-01-25 16:55:15 -0800 |
commit | 83e9eb81be05d018cf04bfada0f4005145c9f7b8 (patch) | |
tree | fe17e1df52099e7a433abf2a3c77002477de6a22 /src | |
parent | 8c467b825fad9483ada35e5ceac3c9b9a8cbb286 (diff) |
glsl: Rename "expr" to "lhs_expr" in vector_extract munging code.
When processing assignments, we have both an LHS and RHS. At a glance,
"lhs_expr" clearly refers to the LHS, while a generic name like "expr"
is ambiguous.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 6c158e110c0aec5371bea6fc1c14f28b045797b0)
Diffstat (limited to 'src')
-rw-r--r-- | src/glsl/ast_to_hir.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 48c621fe8a8..a81a0518b27 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -739,9 +739,9 @@ do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state, * expression, move it to the RHS as an ir_triop_vector_insert. */ if (lhs->ir_type == ir_type_expression) { - ir_expression *const expr = lhs->as_expression(); + ir_expression *const lhs_expr = lhs->as_expression(); - if (unlikely(expr->operation == ir_binop_vector_extract)) { + if (unlikely(lhs_expr->operation == ir_binop_vector_extract)) { ir_rvalue *new_rhs = validate_assignment(state, lhs_loc, lhs->type, rhs, is_initializer); @@ -750,11 +750,11 @@ do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state, return lhs; } else { rhs = new(ctx) ir_expression(ir_triop_vector_insert, - expr->operands[0]->type, - expr->operands[0], + lhs_expr->operands[0]->type, + lhs_expr->operands[0], new_rhs, - expr->operands[1]); - lhs = expr->operands[0]->clone(ctx, NULL); + lhs_expr->operands[1]); + lhs = lhs_expr->operands[0]->clone(ctx, NULL); } } } |