From: Eric Anholt Date: Tue, 7 Dec 2010 19:32:50 +0000 (-0800) Subject: i965: Handle saturates on gen6 math instructions. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=72845d206e692581b6084c56b8d1f3bc689e8a03;p=mesa.git i965: Handle saturates on gen6 math instructions. We get saturate as an argument to brw_math() instead of as compile state, since that's how the pre-gen6 send instructions work. Fixes fp-ex2-sat. --- diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index c181c314bf4..96aa046b64f 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -1281,6 +1281,7 @@ void brw_math( struct brw_compile *p, * becomes FC[3:0] and ThreadCtrl becomes FC[5:4]. */ insn->header.destreg__conditionalmod = function; + insn->header.saturate = saturate; brw_set_dest(p, insn, dest); brw_set_src0(insn, src); @@ -1371,6 +1372,7 @@ void brw_math_16( struct brw_compile *p, * becomes FC[3:0] and ThreadCtrl becomes FC[5:4]. */ insn->header.destreg__conditionalmod = function; + insn->header.saturate = saturate; brw_set_dest(p, insn, dest); brw_set_src0(insn, src);