From OpenGL 4.5 spec PDF, section '8.11. Texture Queries', page 236: "An INVALID_VALUE error is generated if texture is not the name of an existing texture object."
Same wording applies to the compressed version. But turns out this is a spec bug, and Khronos is fixing it for the next revisions. The proposal is to return INVALID_OPERATION in these cases. Fixes: GL45-CTS.get_texture_sub_image.errors_test Fixes: 633c959fa (getteximage: Return correct error value when texure object is not found) Signed-off-by: Juan A. Suarez Romero <[email protected]> --- src/mesa/main/texgetimage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index 658b0e5..4d39290 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage.c @@ -1464,7 +1464,7 @@ _mesa_GetTextureSubImage(GLuint texture, GLint level, texObj = _mesa_lookup_texture(ctx, texture); if (!texObj) { - _mesa_error(ctx, GL_INVALID_VALUE, "%s(texture)", caller); + _mesa_error(ctx, GL_INVALID_OPERATION, "%s(texture)", caller); return; } @@ -1782,7 +1782,7 @@ _mesa_GetCompressedTextureSubImage(GLuint texture, GLint level, texObj = _mesa_lookup_texture(ctx, texture); if (!texObj) { - _mesa_error(ctx, GL_INVALID_VALUE, "%s(texture)", caller); + _mesa_error(ctx, GL_INVALID_OPERATION, "%s(texture)", caller); return; } -- 2.9.4 _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
