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

Eric Anholt eric at anholt.net
Mon Aug 6 15:10:53 PDT 2012


Kenneth Graunke <kenneth at whitecape.org> writes:

> 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.

You're right.  You're so right I'm replacing this patch with one that's
+6, -44 by removing the saturate arg to brw_maths, but now I need to do
another piglit run on gen4 :(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120806/deb39779/attachment.pgp>


More information about the mesa-dev mailing list