[Piglit] [PATCH] fbo-readpixels: use piglit_get_gl_enum_name() for info/error messages

Brian Paul brianp at vmware.com
Fri Apr 18 11:59:33 PDT 2014


On 04/18/2014 12:52 PM, Eric Anholt wrote:
> 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>
>

Thanks.  Anyone want to review these two from last week:

     swapbuffers-behavior: check if swapbuffers swaps or copies

     normal3b3s-invariance: test GLbyte[3] and GLshort[3] normal vec 
invariance

-Brian



More information about the Piglit mailing list