From: Eric Anholt Date: Tue, 12 Oct 2010 18:36:56 +0000 (-0700) Subject: i965: Fix missing "break;" in i2b/f2b, and missing AND of CMP result. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=080e7aface81e6a055ac61988ca27a88ad70f879;p=mesa.git i965: Fix missing "break;" in i2b/f2b, and missing AND of CMP result. Fixes glsl-fs-i2b. --- 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]));