<div dir="ltr"><div>Hello,</div><div><br></div><div>Could you please help me with a push.</div><div><br></div><div>Thanks,</div><div>Andrii.<br></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Oct 26, 2018 at 5:50 PM andrey simiklit <<a href="mailto:asimiklit.work@gmail.com">asimiklit.work@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello,</div><div><br></div><div>Thanks a lot for reviewing.</div><div><br></div><div>Regards,<br></div>Andrii.<br></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Oct 26, 2018 at 3:23 PM Haehnle, Nicolai <<a href="mailto:Nicolai.Haehnle@amd.com" target="_blank">Nicolai.Haehnle@amd.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 24.10.18 14:52, <a href="mailto:asimiklit.work@gmail.com" target="_blank">asimiklit.work@gmail.com</a> wrote:<br>
> From: Andrii Simiklit <<a href="mailto:andrii.simiklit@globallogic.com" target="_blank">andrii.simiklit@globallogic.com</a>><br>
> <br>
> I guess that this test has the incorrect expected values.<br>
> For instance the test expects that exponent for a value 2 will be 1<br>
> But it contradicts to spec because in this case<br>
> the value of 'significand' must be 1.0:<br>
> 2.0 = 1.0 * 2 ^ 1<br>
> <br>
> GLSL spec says (about 'frexp'):<br>
>    "Splits x into a floating-point significand in the range<br>
>     [0.5, 1.0) and an integral exponent of two, such that:<br>
> <br>
>        x = significand * 2 ^ exponent<br>
> <br>
>     The significand is returned by the function and the<br>
>     exponent is returned in the parameter exp. For a<br>
>     floating-point value of zero, the significant and exponent<br>
>     are both zero. For a floating-point value that is an<br>
>     infinity or is not a number, the results are undefined.<br>
<br>
You're absolutely right. It seems like radeonsi is currently passing <br>
this incorrectly, because a bunch of other things surrounding frexp are <br>
broken.<br>
<br>
The test change is correct.<br>
<br>
Reviewed-by: Nicolai Hähnle <<a href="mailto:nicolai.haehnle@amd.com" target="_blank">nicolai.haehnle@amd.com</a>><br>
<br>
> <br>
> Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=108537" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=108537</a><br>
> Signed-off-by: Andrii Simiklit <<a href="mailto:andrii.simiklit@globallogic.com" target="_blank">andrii.simiklit@globallogic.com</a>><br>
> ---<br>
>   .../fs-frexp-dvec4-only-exponent.shader_test        | 13 ++++++++++++-<br>
>   1 file changed, 12 insertions(+), 1 deletion(-)<br>
> <br>
> 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<br>
> index d7dc64032..c4a7555ff 100644<br>
> --- a/tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/fs-frexp-dvec4-only-exponent.shader_test<br>
> +++ b/tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/fs-frexp-dvec4-only-exponent.shader_test<br>
> @@ -31,7 +31,18 @@ clear color 0 0 0 1<br>
>   clear<br>
>   <br>
>   uniform dvec4 u_in 2 3 4 9<br>
> -uniform ivec4 u_exponent 1 1 2 3<br>
> +<br>
> +# The function frexp() splits each single-precision floating-point number in<br>
> +# <x> into a binary significand, a floating-point number in the range [0.5,<br>
> +# 1.0), and an integral exponent of two, such that:<br>
> +#<br>
> +#    x = significand * 2 ^ exponent<br>
> +#<br>
> +# 2 = 0.5 * 2^2<br>
> +# 3 = 0.75 * 2^2<br>
> +# 4 = 0.5 * 2^3<br>
> +# 9 = 0.5625 * 2^4<br>
> +uniform ivec4 u_exponent 2 2 3 4<br>
>   <br>
>   draw rect -1 -1 2 2<br>
>   probe all rgba 0 1 0 1<br>
> <br>
<br>
</blockquote></div>
</blockquote></div></div>