Reviewed-by: Roland Scheidegger <srol...@vmware.com>

I suppose we could use a wrapper like for rintf, using sse41 round
instructions directly. However, just for softpipe it doesn't sound like
it would be worth it, noone is really interested in peformance for
softpipe (and noone compiles with sse41 flag anyway).
Pushed, thanks.

Roland


Am 06.06.2016 um 14:55 schrieb Lars Hamre:
> Gentle ping, I would appreciate a Gallium developer's eyes on this.
> 
> Regards,
> Lars Hamre
> 
> On Thu, May 26, 2016 at 6:30 PM, Lars Hamre <cheme...@gmail.com> wrote:
>> Switches to using truncf in micro_trunc.
>>
>> Fixes the following piglit tests (for softpipe):
>>
>> /spec/glsl-1.30/execution/built-in-functions/...
>> fs-trunc-float
>> fs-trunc-vec2
>> fs-trunc-vec3
>> fs-trunc-vec4
>> vs-trunc-float
>> vs-trunc-vec2
>> vs-trunc-vec3
>> vs-trunc-vec4
>>
>> /spec/glsl-1.50/execution/built-in-functions/...
>> gs-trunc-float
>> gs-trunc-vec2
>> gs-trunc-vec3
>> gs-trunc-vec4
>>
>> Signed-off-by: Lars Hamre <cheme...@gmail.com>
>>
>> ---
>>
>> NOTE: someone with access will need to commit this post
>>       review process
>>
>>  src/gallium/auxiliary/tgsi/tgsi_exec.c | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c 
>> b/src/gallium/auxiliary/tgsi/tgsi_exec.c
>> index baf4a89..2ae1482 100644
>> --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
>> +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
>> @@ -676,10 +676,10 @@ static void
>>  micro_trunc(union tgsi_exec_channel *dst,
>>              const union tgsi_exec_channel *src)
>>  {
>> -   dst->f[0] = (float)(int)src->f[0];
>> -   dst->f[1] = (float)(int)src->f[1];
>> -   dst->f[2] = (float)(int)src->f[2];
>> -   dst->f[3] = (float)(int)src->f[3];
>> +   dst->f[0] = truncf(src->f[0]);
>> +   dst->f[1] = truncf(src->f[1]);
>> +   dst->f[2] = truncf(src->f[2]);
>> +   dst->f[3] = truncf(src->f[3]);
>>  }
>>
>>  static void
>> --
>> 2.5.5
>>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to