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

Kenneth Graunke kenneth at whitecape.org
Mon Aug 6 11:24:57 PDT 2012


On 07/28/2012 05:55 PM, Eric Anholt wrote:
> 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,

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

The VS backend is probably broken too.  It looks like it's not even
setting the message dsecriptor bits.



More information about the mesa-dev mailing list