From dc90d8cc144b6c665df78d61f0b638f6c8c121db 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: (cherry picked from commit 2138d1b9e630b4c481c9d1ff555fb77a71ef78cc) --- .pick_status.json | 2 +- src/mesa/main/teximage.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 0e159e33c3b..4b90690f636 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3298,7 +3298,7 @@ "description": "teximage: return correct desktop GL error for compressedteximage", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 24275c7d947..95d2a301ccd 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; }