[Mesa-dev] [PATCH] i965/fs: Don't set the saturate bit on gen4 math send instructions.

Eric Anholt eric at anholt.net
Sat Jul 28 17:55:02 PDT 2012


The saturate bit gets communicated as part of the message descriptor, and
setting it in the instruction somehow trashes the results.

Fixes piglit general/fog-modes and ext_fog_coord-modes.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48628
NOTE: This is a candidate for the 8.0 branch.
---
 src/mesa/drivers/dri/i965/brw_fs_emit.cpp |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
index dc5f3e1..9658d91 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
@@ -237,6 +237,8 @@ fs_visitor::generate_math_gen4(fs_inst *inst,
 
    assert(inst->mlen >= 1);
 
+   brw_set_saturate(p, false);
+
    brw_set_compression_control(p, BRW_COMPRESSION_NONE);
    brw_math(p, dst,
 	    op,
-- 
1.7.10.4



More information about the mesa-dev mailing list