[Piglit] [PATCH] fbo-readpixels: use piglit_get_gl_enum_name() for info/error messages
Eric Anholt
eric at anholt.net
Fri Apr 18 11:52:38 PDT 2014
Brian Paul <brianp at vmware.com> writes:
> ---
> tests/fbo/fbo-readpixels.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/tests/fbo/fbo-readpixels.c b/tests/fbo/fbo-readpixels.c
> index 25c39ef..eb5c971 100644
> --- a/tests/fbo/fbo-readpixels.c
> +++ b/tests/fbo/fbo-readpixels.c
> @@ -74,9 +74,10 @@ test_with_format(GLenum internal_format, GLenum format,
> glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_ALPHA_SIZE,
> &abits);
>
> - printf("testing with format 0x%04x, 0x%04x "
> + printf("testing with format %s, %s "
> "(%d,%d,%d,%d rgba)\n",
> - internal_format, format,
> + piglit_get_gl_enum_name(internal_format),
> + piglit_get_gl_enum_name(format),
> rbits, gbits, bbits, abits);
>
> glGenFramebuffersEXT(1, &fb);
> @@ -90,10 +91,12 @@ test_with_format(GLenum internal_format, GLenum format,
>
> status = glCheckFramebufferStatusEXT (GL_FRAMEBUFFER_EXT);
> if (status != GL_FRAMEBUFFER_COMPLETE_EXT) {
> - fprintf(stderr, "texture for internalformat 0x%04x. "
> - "format 0x%04x is framebuffer "
> - "incomplete (status = 0x%04x)\n",
> - internal_format, format, status);
> + fprintf(stderr, "texture for internalformat %s. "
> + "format %s is framebuffer "
> + "incomplete (status = %s)\n",
> + piglit_get_gl_enum_name(internal_format),
> + piglit_get_gl_enum_name(format),
> + piglit_get_gl_enum_name(status));
> goto done;
> }
Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140418/3f1416c1/attachment-0001.sig>
More information about the Piglit
mailing list