[Piglit] [PATCH] glean/tdepthstencil: Print what error was expected

Eric Anholt eric at anholt.net
Tue Jan 29 18:41:19 PST 2013


Matt Turner <mattst88 at gmail.com> writes:

Thy all seem to already print what error was expected, though not what
was generated.

>  	glDrawPixels(1, 1, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT_24_8_EXT, p);
> -	if (glGetError() != GL_INVALID_OPERATION) {
> -		sprintf(errorMsg,
> -			"glDrawPixels(GL_DEPTH_COMPONENT, GL_UNSIGNED_INT_24_8_EXT)"
> -			" failed to generate GL_INVALID_OPERATION.");
> +	if (!piglit_check_gl_error(GL_INVALID_ENUM)) {
>  		return false;

Looks like the expected error got changed here.

>  	glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_INT_24_8_EXT, p);
> -	if (glGetError() != GL_INVALID_OPERATION) {
> -		sprintf(errorMsg,
> -			"glReadPixels(GL_STENCIL_INDEX, GL_UNSIGNED_INT_24_8_EXT)"
> -			" failed to generate GL_INVALID_OPERATION.");
> +	if (!piglit_check_gl_error(GL_INVALID_ENUM)) {
>  		return false;

and here.
-------------- 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/20130130/99cbe6a1/attachment.pgp>


More information about the Piglit mailing list