<div dir="ltr">On 19 February 2013 10:32, Matt Turner <span dir="ltr"><<a href="mailto:mattst88@gmail.com" target="_blank">mattst88@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Tue, Feb 19, 2013 at 8:44 AM, Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>> wrote:<br>
> Commit 78435fe (ARB_shading_language_packing: Allow some imprecision<br>
> in unpackUnorm4x8) inadvertently introduced a regression to the<br>
> unpackHalf2x16 tests.  In those tests, the "exact" uniform wasn't<br>
> being initialized, resulting in the tests being run in inexact<br>
> fashion.<br>
><br>
> Surprisingly, this actually produced a failure, because inexact<br>
> testing uses "distance(actual, expect) < 0.00001" as the pass/fail<br>
> criterion, and this doesn't work when actual == expect == Infinity<br>
> (because distance(Inf, Inf) == NaN).<br>
><br>
> We always intended to test unpackHalf2x16 in exact fashion anyhow, so<br>
> the fix is to go ahead and initialize the "exact" uniform to 1 for<br>
> this case.<br>
> ---<br>
>  generated_tests/gen_builtin_packing_tests.py | 8 ++++++--<br>
>  1 file changed, 6 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/generated_tests/gen_builtin_packing_tests.py b/generated_tests/gen_builtin_packing_tests.py<br>
> index 706ba1f..5eeea62 100644<br>
> --- a/generated_tests/gen_builtin_packing_tests.py<br>
> +++ b/generated_tests/gen_builtin_packing_tests.py<br>
> @@ -277,7 +277,9 @@ vs_unpack_template = Template(dedent("""\<br>
>      [test]<br>
>      % for io in func.inout_seq:<br>
>      uniform uint func_input ${io.input}<br>
> -    % if not func.exact:<br>
> +    % if func.exact:<br>
> +    uniform int exact 1<br>
> +    % else:<br>
>      uniform int exact ${int(int(io.input[:-1]) in (0x0, 0xffffffff, 0x80808080, 0x81818181))}<br>
>      % endif<br>
>      % for j in range(func.num_valid_outputs):<br>
> @@ -410,7 +412,9 @@ fs_unpack_template = Template(dedent("""\<br>
>      [test]<br>
>      % for io in func.inout_seq:<br>
>      uniform uint func_input ${io.input}<br>
> -    % if not func.exact:<br>
> +    % if func.exact:<br>
> +    uniform int exact 1<br>
> +    % else:<br>
>      uniform int exact ${int(int(io.input[:-1]) in (0x0, 0xffffffff, 0x80808080, 0x81818181))}<br>
>      % endif<br>
>      % for i in range(func.num_valid_outputs):<br>
> --<br>
> 1.8.1.3<br>
><br>
<br>
</div></div>Crap. Sorry for not getting to this.<br></blockquote><div><br></div><div>Not a problem--we're all busy.  Thanks for the review!<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
Reviewed-by: Matt Turner <<a href="mailto:mattst88@gmail.com">mattst88@gmail.com</a>><br>
</blockquote></div><br></div></div>