From: Kenneth Graunke Date: Thu, 14 Oct 2010 21:31:54 +0000 (-0700) Subject: i965: Add support for ir_unop_round_even via the RNDE instruction. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f157812bbbcf9caac1f84988e738fc9d1e051056;p=mesa.git i965: Add support for ir_unop_round_even via the RNDE instruction. --- diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h index c16613e3df5..7cac4a72e4a 100644 --- a/src/mesa/drivers/dri/i965/brw_eu.h +++ b/src/mesa/drivers/dri/i965/brw_eu.h @@ -820,6 +820,7 @@ ALU2(LINE) ALU2(PLN) ROUND(RNDZ) +ROUND(RNDE) #undef ALU1 #undef ALU2 diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 68c6c47763b..a1fead0a4fa 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -700,6 +700,7 @@ ALU2(PLN) ROUND(RNDZ) +ROUND(RNDE) struct brw_instruction *brw_ADD(struct brw_compile *p, diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index d220c79a8e4..e372f3a13da 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -874,6 +874,9 @@ fs_visitor::visit(ir_expression *ir) case ir_unop_fract: inst = emit(fs_inst(BRW_OPCODE_FRC, this->result, op[0])); break; + case ir_unop_round_even: + emit(fs_inst(BRW_OPCODE_RNDE, this->result, op[0])); + break; case ir_binop_min: inst = emit(fs_inst(BRW_OPCODE_CMP, this->result, op[0], op[1])); @@ -3016,6 +3019,9 @@ fs_visitor::generate_code() case BRW_OPCODE_RNDD: brw_RNDD(p, dst, src[0]); break; + case BRW_OPCODE_RNDE: + brw_RNDE(p, dst, src[0]); + break; case BRW_OPCODE_RNDZ: brw_RNDZ(p, dst, src[0]); break;