[Piglit] [PATCH 1/3] arb_get_texture_sub_image: fix expected error when querying a level which hasn't been explicitly defined

Juan A. Suarez Romero jasuarez at igalia.com
Wed Apr 4 11:12:21 UTC 2018


On Wed, 2018-03-28 at 11:15 -0400, Anthony Pesch wrote:
> From: Anthony Pesch <apesch at nvidia.com>
> 
> Change expected error from INVALID_OPERATION to INVALID_VALUE when querying
> a level which hasn't been explicitly defined. This is a valid operation, the
> error set should be due to the requested width and height being greater than
> the default width and height of zero.

I have some doubts with this patch. I've been checking OpenGL 4.5 spec, section
8.11.4 Texture Image Queries, and this is what I found:

"An INVALID_VALUE error is generated if level is negative or larger than the
maximum allowable level."


In this case, level is 4, so we aren't in this case, as the level is not
negative, and it is smaller than the maximum allowable level (15, the
implementation I use).


So really don't know what should be the expected error, INVALID_OPERATION or
INVALID_VALUE.

	
	J.A.



>  tests/spec/arb_get_texture_sub_image/errors.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/spec/arb_get_texture_sub_image/errors.c b/tests/spec/arb_get_texture_sub_image/errors.c
> index 34fec4a95..57875fa6a 100644
> --- a/tests/spec/arb_get_texture_sub_image/errors.c
> +++ b/tests/spec/arb_get_texture_sub_image/errors.c
> @@ -200,7 +200,7 @@ test_invalid_values(void)
>  			     8, 8, 1, /* size */
>  			     GL_RGBA, GL_FLOAT,  /* bad enum */
>  			     sizeof(buffer), buffer);
> -	if (!piglit_check_gl_error(GL_INVALID_OPERATION))
> +	if (!piglit_check_gl_error(GL_INVALID_VALUE))
>  		pass = false;
>  
>  	/* Test getting invalid offset */


More information about the Piglit mailing list