From 101400d4495d3ab6dba4af70782698ef13b3b06c Mon Sep 17 00:00:00 2001 From: Yevhenii Kolesnikov Date: Thu, 16 Jul 2020 15:13:08 +0300 Subject: [PATCH] mesa: change error code of *TextureSubImage* for incorreect target MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit According to the "Errors" list of the OpenGL 4.6 spec, section 8.6 "Alternate Texture Image Specification Commands": An INVALID_OPERATION error is generated by *TextureSubImage* if the effective target of texture does not match the command, as shown in table 8.15. Signed-off-by: Yevhenii Kolesnikov Reviewed-by: Marek Olšák Part-of: --- src/mesa/main/teximage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index decd67147e5..7a74ff25106 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -3703,7 +3703,7 @@ texturesubimage(struct gl_context *ctx, GLuint dims, if (!no_error) { /* check target (proxies not allowed) */ if (!legal_texsubimage_target(ctx, dims, texObj->Target, true)) { - _mesa_error(ctx, GL_INVALID_ENUM, "%s(target=%s)", + _mesa_error(ctx, GL_INVALID_OPERATION, "%s(target=%s)", callerName, _mesa_enum_to_string(texObj->Target)); return; } -- 2.30.2