Re: [Piglit] [PATCH] arb_shader_precision: set tolerance for div/assign-div

2015-02-03 Thread Chris Forbes
Matt, the default if not specified is zero.

2.5 ulps agrees with the spec, so:

Reviewed-by: Chris Forbes 

On Wed, Feb 4, 2015 at 10:58 AM, Matt Turner  wrote:
> On Mon, Feb 2, 2015 at 6:04 AM, Ilia Mirkin  wrote:
>> This makes the relevant tests pass on nvc0.
>>
>> Signed-off-by: Ilia Mirkin 
>> ---
>>  generated_tests/gen_shader_precision_tests.py | 5 -
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/generated_tests/gen_shader_precision_tests.py 
>> b/generated_tests/gen_shader_precision_tests.py
>> index b4664ea..0d24a80 100644
>> --- a/generated_tests/gen_shader_precision_tests.py
>> +++ b/generated_tests/gen_shader_precision_tests.py
>> @@ -58,7 +58,10 @@ tolerances = {'pow': 16.0,
>>'log': 3.0,
>>'log2': 3.0,
>>'sqrt': 3.0,
>> -  'inversesqrt': 2.0}
>> +  'inversesqrt': 2.0,
>> +  'op-div': 2.5,
>> +  'op-assign-div': 2.5,
>> +  }
>
> Let me make sure I understand -- we're not /changing/ the tolerances
> in this patch, we're just adding some missing ones?
>
> If so, what tolerances were the tests using for division?
>
> Also if so,
>
> Reviewed-by: Matt Turner 
> ___
> Piglit mailing list
> Piglit@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] arb_shader_precision: set tolerance for div/assign-div

2015-02-03 Thread Ilia Mirkin
On Tue, Feb 3, 2015 at 4:58 PM, Matt Turner  wrote:
> On Mon, Feb 2, 2015 at 6:04 AM, Ilia Mirkin  wrote:
>> This makes the relevant tests pass on nvc0.
>>
>> Signed-off-by: Ilia Mirkin 
>> ---
>>  generated_tests/gen_shader_precision_tests.py | 5 -
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/generated_tests/gen_shader_precision_tests.py 
>> b/generated_tests/gen_shader_precision_tests.py
>> index b4664ea..0d24a80 100644
>> --- a/generated_tests/gen_shader_precision_tests.py
>> +++ b/generated_tests/gen_shader_precision_tests.py
>> @@ -58,7 +58,10 @@ tolerances = {'pow': 16.0,
>>'log': 3.0,
>>'log2': 3.0,
>>'sqrt': 3.0,
>> -  'inversesqrt': 2.0}
>> +  'inversesqrt': 2.0,
>> +  'op-div': 2.5,
>> +  'op-assign-div': 2.5,
>> +  }
>
> Let me make sure I understand -- we're not /changing/ the tolerances
> in this patch, we're just adding some missing ones?

Right. Well, changing from the default, which was 0.

>
> If so, what tolerances were the tests using for division?

0 (the default). Can't say I _really_ understand what a tolerance of
2.5 ULP's really means, since as I (and the tests) understand it, the
error is always quantifiable in integer numbers of ULPs when the
result uses the same exponent, but that's what the spec says.

>
> Also if so,
>
> Reviewed-by: Matt Turner 

Thanks. This makes nvc0 pass the division ones, but there are
additional problems in many of the remaining tests due to... a number
of factors. The biggest and most annoying one is that the spec allows
a*b+c (and fma!) to act either like fma or like mul+add, at the
implementation's whim. That means that any mul+add can end up with a
ULP or so of error if it ends up being implemented as fma. This can
then get highly compounded with a mat4*mat4, for example. The test
generator has no concept of that, and I don't see a particularly easy
way of teaching it. (Nor what the correct thing to do is.) FWIW it
does not appear that nvc0 has a distinction between a fma that does
intermediate rounding and one that doesn't. I haven't traced the blob
yet though for these specific scenarios (nor will I have time to
anytime soon).

  -ilia
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] arb_shader_precision: set tolerance for div/assign-div

2015-02-03 Thread Matt Turner
On Mon, Feb 2, 2015 at 6:04 AM, Ilia Mirkin  wrote:
> This makes the relevant tests pass on nvc0.
>
> Signed-off-by: Ilia Mirkin 
> ---
>  generated_tests/gen_shader_precision_tests.py | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/generated_tests/gen_shader_precision_tests.py 
> b/generated_tests/gen_shader_precision_tests.py
> index b4664ea..0d24a80 100644
> --- a/generated_tests/gen_shader_precision_tests.py
> +++ b/generated_tests/gen_shader_precision_tests.py
> @@ -58,7 +58,10 @@ tolerances = {'pow': 16.0,
>'log': 3.0,
>'log2': 3.0,
>'sqrt': 3.0,
> -  'inversesqrt': 2.0}
> +  'inversesqrt': 2.0,
> +  'op-div': 2.5,
> +  'op-assign-div': 2.5,
> +  }

Let me make sure I understand -- we're not /changing/ the tolerances
in this patch, we're just adding some missing ones?

If so, what tolerances were the tests using for division?

Also if so,

Reviewed-by: Matt Turner 
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] arb_shader_precision: set tolerance for div/assign-div

2015-02-02 Thread Ilia Mirkin
This makes the relevant tests pass on nvc0.

Signed-off-by: Ilia Mirkin 
---
 generated_tests/gen_shader_precision_tests.py | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/generated_tests/gen_shader_precision_tests.py 
b/generated_tests/gen_shader_precision_tests.py
index b4664ea..0d24a80 100644
--- a/generated_tests/gen_shader_precision_tests.py
+++ b/generated_tests/gen_shader_precision_tests.py
@@ -58,7 +58,10 @@ tolerances = {'pow': 16.0,
   'log': 3.0,
   'log2': 3.0,
   'sqrt': 3.0,
-  'inversesqrt': 2.0}
+  'inversesqrt': 2.0,
+  'op-div': 2.5,
+  'op-assign-div': 2.5,
+  }
 
 trig_builtins = ('sin', 'cos', 'tan', 
  'asin', 'acos', 'atan', 
-- 
2.0.5

___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit