[Piglit] [PATCH 12/13] util/gl: Add functions piglit_test_{min, max}_int64
Eric Anholt
eric at anholt.net
Wed Nov 28 12:40:39 PST 2012
Chad Versace <chad.versace at linux.intel.com> writes:
> The new functions test the min/max value of a token with glGetInteger64v.
>
> Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
> ---
> tests/util/minmax-test.c | 34 ++++++++++++++++++++++++++++++++++
> tests/util/minmax-test.h | 2 ++
> 2 files changed, 36 insertions(+)
>
> diff --git a/tests/util/minmax-test.c b/tests/util/minmax-test.c
> index 2f8e413..4730c70 100644
> --- a/tests/util/minmax-test.c
> +++ b/tests/util/minmax-test.c
> @@ -52,6 +52,18 @@ piglit_report_int(const char *name, GLint limit, GLint val, bool pass)
> }
>
> static void
> +piglit_report_int64(const char *name, GLint64 limit, GLint64 val, bool pass)
> +{
> + if (pass) {
> + printf("%-50s %8ld %8ld\n", name, limit, val);
On 32-bit, you're going to rightly get compile warnings here. Either
use PRId64, or the common hack of %lld and (long long)uint64variable.
Also, lol at formatting 64-bit with %8. But it's to make it usually
line up with the rest, which makes sense.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20121128/f9fe6415/attachment-0001.pgp>
More information about the Piglit
mailing list