diff options
author | Anthony Pesch <apesch@nvidia.com> | 2018-04-11 09:45:07 -0700 |
---|---|---|
committer | Juan A. Suarez Romero <jasuarez@igalia.com> | 2018-04-11 19:21:25 +0200 |
commit | f2a0ebb4bab771983eb2f5afefa60adb78767382 (patch) | |
tree | 9c42056bd3bd0ce49c601ba6d14c3377d30f8a2c /tests/spec/arb_get_texture_sub_image | |
parent | 45e115f293fd6acc0c9647cf2d3b76be78819ba5 (diff) |
arb_get_texture_sub_image: fix expected error when querying a level which hasn't been explicitly defined
Change expected error from INVALID_OPERATION to INVALID_VALUE when querying a
level which hasn't been explicitly defined. The level is valid, however, the
level hasn't been explicitly defined so it should have a default width and
height of 0, making the 8x8 query produce an INVALID_VALUE.
>From the OpenGL 4.6 spec, 8.22 Texture State and Proxy State:
"Each initial texture image is null. It has zero width, height, and depth,
internal format RGBA, or R8 for buffer textures, component sizes set to zero and
component types set to NONE, the compressed flag set to FALSE, a zero compressed
size, and the bound buffer object name is zero."
>From the GetTextureSubImage errors in 8.11.4:
"An INVALID_VALUE error is generated if xoffset + width is greater than the
texture’s width, yoffset + height is greater than the texture’s height, or
zoffset + depth is greater than the texture’s depth."
Reviewed-by: Arthur Huillet <ahuillet@nvidia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Diffstat (limited to 'tests/spec/arb_get_texture_sub_image')
-rw-r--r-- | tests/spec/arb_get_texture_sub_image/errors.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 */ |