[Piglit] [PATCH] glsl/frexp: fix the incorrect expected values
Marek Olšák
maraeo at gmail.com
Mon Nov 5 21:02:55 UTC 2018
Pushed, thanks!
Marek
On Wed, Oct 31, 2018 at 7:35 AM andrey simiklit <asimiklit.work at gmail.com>
wrote:
> Hello,
>
> Could you please help me with a push.
>
> Thanks,
> Andrii.
>
> On Fri, Oct 26, 2018 at 5:50 PM andrey simiklit <asimiklit.work at gmail.com>
> wrote:
>
>> Hello,
>>
>> Thanks a lot for reviewing.
>>
>> Regards,
>> Andrii.
>>
>> On Fri, Oct 26, 2018 at 3:23 PM Haehnle, Nicolai <Nicolai.Haehnle at amd.com>
>> wrote:
>>
>>> On 24.10.18 14:52, asimiklit.work at gmail.com wrote:
>>> > From: Andrii Simiklit <andrii.simiklit at globallogic.com>
>>> >
>>> > I guess that this test has the incorrect expected values.
>>> > For instance the test expects that exponent for a value 2 will be 1
>>> > But it contradicts to spec because in this case
>>> > the value of 'significand' must be 1.0:
>>> > 2.0 = 1.0 * 2 ^ 1
>>> >
>>> > GLSL spec says (about 'frexp'):
>>> > "Splits x into a floating-point significand in the range
>>> > [0.5, 1.0) and an integral exponent of two, such that:
>>> >
>>> > x = significand * 2 ^ exponent
>>> >
>>> > The significand is returned by the function and the
>>> > exponent is returned in the parameter exp. For a
>>> > floating-point value of zero, the significant and exponent
>>> > are both zero. For a floating-point value that is an
>>> > infinity or is not a number, the results are undefined.
>>>
>>> You're absolutely right. It seems like radeonsi is currently passing
>>> this incorrectly, because a bunch of other things surrounding frexp are
>>> broken.
>>>
>>> The test change is correct.
>>>
>>> Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
>>>
>>> >
>>> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108537
>>> > Signed-off-by: Andrii Simiklit <andrii.simiklit at globallogic.com>
>>> > ---
>>> > .../fs-frexp-dvec4-only-exponent.shader_test | 13
>>> ++++++++++++-
>>> > 1 file changed, 12 insertions(+), 1 deletion(-)
>>> >
>>> > diff --git
>>> a/tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/fs-frexp-dvec4-only-exponent.shader_test
>>> b/tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/fs-frexp-dvec4-only-exponent.shader_test
>>> > index d7dc64032..c4a7555ff 100644
>>> > ---
>>> a/tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/fs-frexp-dvec4-only-exponent.shader_test
>>> > +++
>>> b/tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/fs-frexp-dvec4-only-exponent.shader_test
>>> > @@ -31,7 +31,18 @@ clear color 0 0 0 1
>>> > clear
>>> >
>>> > uniform dvec4 u_in 2 3 4 9
>>> > -uniform ivec4 u_exponent 1 1 2 3
>>> > +
>>> > +# The function frexp() splits each single-precision floating-point
>>> number in
>>> > +# <x> into a binary significand, a floating-point number in the range
>>> [0.5,
>>> > +# 1.0), and an integral exponent of two, such that:
>>> > +#
>>> > +# x = significand * 2 ^ exponent
>>> > +#
>>> > +# 2 = 0.5 * 2^2
>>> > +# 3 = 0.75 * 2^2
>>> > +# 4 = 0.5 * 2^3
>>> > +# 9 = 0.5625 * 2^4
>>> > +uniform ivec4 u_exponent 2 2 3 4
>>> >
>>> > draw rect -1 -1 2 2
>>> > probe all rgba 0 1 0 1
>>> >
>>>
>>> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20181105/1b42aa1f/attachment-0001.html>
More information about the Piglit
mailing list