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@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12032>
(cherry picked from commit 2138d1b9e6)
This commit is contained in:
Dave Airlie 2021-07-23 16:22:33 +10:00 committed by Dylan Baker
parent cb9df156a6
commit f2a07762df
2 changed files with 2 additions and 2 deletions

View file

@ -112,7 +112,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
},

View file

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