From 72845d206e692581b6084c56b8d1f3bc689e8a03 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 7 Dec 2010 11:32:50 -0800 Subject: 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. --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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); -- cgit v1.2.3