diff options
author | Eric Anholt <[email protected]> | 2010-10-12 11:36:56 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-10-12 13:07:40 -0700 |
commit | 080e7aface81e6a055ac61988ca27a88ad70f879 (patch) | |
tree | e032c79a88a23f375ca5a3c96f9458af7b8881b5 /src | |
parent | 9fea9e5e2115bcb52435648d2ef753638733d7d9 (diff) |
i965: Fix missing "break;" in i2b/f2b, and missing AND of CMP result.
Fixes glsl-fs-i2b.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index fd041b8bbd5..5e5d17504b7 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -854,8 +854,6 @@ fs_visitor::visit(ir_expression *ir) case ir_unop_i2f: case ir_unop_b2f: case ir_unop_b2i: - emit(fs_inst(BRW_OPCODE_MOV, this->result, op[0])); - break; case ir_unop_f2i: emit(fs_inst(BRW_OPCODE_MOV, this->result, op[0])); break; @@ -863,6 +861,9 @@ fs_visitor::visit(ir_expression *ir) case ir_unop_i2b: inst = emit(fs_inst(BRW_OPCODE_CMP, this->result, op[0], fs_reg(0.0f))); inst->conditional_mod = BRW_CONDITIONAL_NZ; + inst = emit(fs_inst(BRW_OPCODE_AND, this->result, + this->result, fs_reg(1))); + break; case ir_unop_trunc: emit(fs_inst(BRW_OPCODE_RNDD, this->result, op[0])); |