[Mesa-dev] [PATCH] getteximage: fix returned error value when texture object is not found
Samuel Pitoiset
samuel.pitoiset at gmail.com
Thu Jun 22 12:15:01 UTC 2017
So, you can use _mesa_lookup_texture_err() now (this helper throws a
INVALID_OPERATION error).
Don't you need to also update some piglit tests to reflect that spec change?
On 06/22/2017 01:59 PM, Juan A. Suarez Romero wrote:
> 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 <jasuarez at igalia.com>
> ---
> 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;
> }
>
>
More information about the mesa-dev
mailing list