Mesa (main): teximage: return correct desktop GL error for compressedteximage

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Jul 25 21:13:53 UTC 2021


Module: Mesa
Branch: main
Commit: 2138d1b9e630b4c481c9d1ff555fb77a71ef78cc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2138d1b9e630b4c481c9d1ff555fb77a71ef78cc

Author: Dave Airlie <airlied at redhat.com>
Date:   Fri Jul 23 16:22:33 2021 +1000

teximage: return correct desktop GL error for compressedteximage

For GL4.6 the spec says to return GL_INVALID_OPERATION for this.

Cc: mesa-stable
Reviewed-by: Adam Jackson <ajax at redhat.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12032>

---

 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;
    }
 



More information about the mesa-commit mailing list