Re: [Piglit] [PATCH] shader_runner: Use %u in "probe atomic counter" scanf calls.

2016-05-31 Thread Jordan Justen
On 2016-05-31 23:00:02, Ilia Mirkin wrote: > On Wed, Jun 1, 2016 at 1:49 AM, Kenneth Graunke wrote: > > On Wednesday, June 1, 2016 1:34:42 AM PDT Ilia Mirkin wrote: > >> Because strtol() truncates the the maximum value of "long", as does > >> scanf apparently. This will make it impossible to test

Re: [Piglit] [PATCH] shader_runner: Use %u in "probe atomic counter" scanf calls.

2016-05-31 Thread Ilia Mirkin
On Wed, Jun 1, 2016 at 1:49 AM, Kenneth Graunke wrote: > On Wednesday, June 1, 2016 1:34:42 AM PDT Ilia Mirkin wrote: >> Because strtol() truncates the the maximum value of "long", as does >> scanf apparently. This will make it impossible to test that a counter >> == -1 though, right? > > Yes, I s

Re: [Piglit] [PATCH] shader_runner: Use %u in "probe atomic counter" scanf calls.

2016-05-31 Thread Kenneth Graunke
On Wednesday, June 1, 2016 1:34:42 AM PDT Ilia Mirkin wrote: > Because strtol() truncates the the maximum value of "long", as does > scanf apparently. This will make it impossible to test that a counter > == -1 though, right? Yes, I suppose it would. But you can always do == 4294967295 instead, a

Re: [Piglit] [PATCH] shader_runner: Use %u in "probe atomic counter" scanf calls.

2016-05-31 Thread Ilia Mirkin
Because strtol() truncates the the maximum value of "long", as does scanf apparently. This will make it impossible to test that a counter == -1 though, right? On Wed, Jun 1, 2016 at 1:02 AM, Kenneth Graunke wrote: > We're trying to compare two unsigned values, so we should use %u. > > For whateve

[Piglit] [PATCH] shader_runner: Use %u in "probe atomic counter" scanf calls.

2016-05-31 Thread Kenneth Graunke
We're trying to compare two unsigned values, so we should use %u. For whatever reason, using %d instead of %u causes tests/spec/arb_compute_shader/execution/atomic-counter.shader_test to read 2147483647 instead of 4294966784 for the expected value which is written directly in the [test] script, bu