diff options
author | Chad Versace <chad.versace@intel.com> | 2010-10-15 10:05:50 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-10-19 13:17:33 -0700 |
commit | 338ed6ec297d76746b6466c26c307722af965e60 (patch) | |
tree | 3112f1aa934dd6682a179ad68a0a1ab2248cd6f7 | |
parent | c0197ab0af94ed0f3b2d453fb1ee6589f15d8e9c (diff) |
glsl: Implement ast-to-hir for bit-shift-assignment
Implement by adding to ast_expression::hir() these cases:
- ast_ls_assign
- ast_rs_assign
-rw-r--r-- | src/glsl/ast_to_hir.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 5201579414..59401e73f0 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -1146,11 +1146,19 @@ ast_expression::hir(exec_list *instructions, } case ast_ls_assign: - case ast_rs_assign: - _mesa_glsl_error(& loc, state, - "FINISHME: implement bit-shift assignment operators"); - error_emitted = true; + case ast_rs_assign: { + op[0] = this->subexpressions[0]->hir(instructions, state); + op[1] = this->subexpressions[1]->hir(instructions, state); + type = shift_result_type(op[0]->type, op[1]->type, this->oper, state, + &loc); + ir_rvalue *temp_rhs = new(ctx) ir_expression(operations[this->oper], + type, op[0], op[1]); + result = do_assignment(instructions, state, op[0]->clone(ctx, NULL), + temp_rhs, + this->subexpressions[0]->get_location()); + error_emitted = op[0]->type->is_error() || op[1]->type->is_error(); break; + } case ast_and_assign: case ast_xor_assign: |