From 2138d1b9e630b4c481c9d1ff555fb77a71ef78cc Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 23 Jul 2021 16:22:33 +1000 Subject: [PATCH] teximage: return correct desktop GL error for compressedteximage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For GL4.6 the spec says to return GL_INVALID_OPERATION for this. Cc: mesa-stable Reviewed-by: Adam Jackson 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 e97753ef459..4f33e34a395 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -2099,7 +2099,7 @@ compressed_texture_error_check(struct gl_context *ctx, GLint dimensions, /* No compressed formats support borders at this time */ if (border != 0) { reason = "border != 0"; - error = GL_INVALID_VALUE; + error = _mesa_is_desktop_gl(ctx) ? GL_INVALID_OPERATION : GL_INVALID_VALUE; goto error; }