[Piglit] [PATCH 4/4] vs|fs-sqrt-zero: test sqrt(x) with uniform x=0

Brian Paul brianp at vmware.com
Fri Jul 20 14:08:13 PDT 2012


On 07/20/2012 02:40 PM, Eric Anholt wrote:
> Brian Paul<brianp at vmware.com>  writes:
>
>> Since sqrt(x) is typically implemented with a reciprocal square root, zero
>> is a special case.  Mesa's GLSL->TGSI translator uses a CND instruction to
>> return 0 if x<=0.
>
> Looks like these tests already the issue more generally:
>
> generated_tests/spec/glsl-1.10/execution/built-in-functions/fs-sqrt-float.shader_test
> generated_tests/spec/glsl-1.20/compiler/built-in-functions/sqrt-float.frag
>
> so I think my old sqrt-zero code could just be removed.

OK, sounds good.  I'll take that as a R-b.

-Brian



More information about the Piglit mailing list