Mesa (master): mesa/copyimage: report INVALID_VALUE for missing cube face

Dave Airlie airlied at kemper.freedesktop.org
Thu Jun 2 20:08:56 UTC 2016


Module: Mesa
Branch: master
Commit: af7bf610cf74c6805f42babbcf85bc88b2b9453d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=af7bf610cf74c6805f42babbcf85bc88b2b9453d

Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Jun  2 14:13:18 2016 +1000

mesa/copyimage: report INVALID_VALUE for missing cube face

The specs says INVALID_VALUE for exceeding dimensions,
which is really what is happening here.

This fixes:
GL45-CTS.copy_image.non_existent_mipmap

Cc: "11.2 12.0" <mesa-stable at lists.freedesktop.org>
Reviewed-by: Antia Puentes <apuentes at igalia.com>
Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/mesa/main/copyimage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/main/copyimage.c b/src/mesa/main/copyimage.c
index 6aa6bcb..7e5df61 100644
--- a/src/mesa/main/copyimage.c
+++ b/src/mesa/main/copyimage.c
@@ -180,7 +180,7 @@ prepare_target(struct gl_context *ctx, GLuint name, GLenum target,
          for (i = 0; i < depth; i++) {
             if (!texObj->Image[z+i][level]) {
                /* missing cube face */
-               _mesa_error(ctx, GL_INVALID_OPERATION,
+               _mesa_error(ctx, GL_INVALID_VALUE,
                            "glCopyImageSubData(missing cube face)");
                return false;
             }




More information about the mesa-commit mailing list