mesa: include texture size in error messages
authorBrian Paul <brianp@vmware.com>
Thu, 20 Jul 2017 13:56:03 +0000 (07:56 -0600)
committerBrian Paul <brianp@vmware.com>
Sat, 22 Jul 2017 19:18:56 +0000 (13:18 -0600)
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/mesa/main/teximage.c

index 2132aaee76bfe47d485db484c85a70377aafa3c4..6b31b6a0cdda107e00419ab031856a9d622a6def 100644 (file)
@@ -3007,8 +3007,8 @@ teximage(struct gl_context *ctx, GLboolean compressed, GLuint dims,
 
       if (!dimensionsOK) {
          _mesa_error(ctx, GL_INVALID_VALUE,
-                     "%s%uD(invalid width or height or depth)",
-                     func, dims);
+                     "%s%uD(invalid width=%d or height=%d or depth=%d)",
+                     func, dims, width, height, depth);
          return;
       }
 
@@ -3833,7 +3833,8 @@ copyteximage(struct gl_context *ctx, GLuint dims,
       if (!_mesa_legal_texture_dimensions(ctx, target, level, width, height,
                                           1, border)) {
          _mesa_error(ctx, GL_INVALID_VALUE,
-                     "glCopyTexImage%uD(invalid width or height)", dims);
+                     "glCopyTexImage%uD(invalid width=%d or height=%d)",
+                     dims, width, height);
          return;
       }
    }
@@ -5743,7 +5744,7 @@ texture_image_multisample(struct gl_context *ctx, GLuint dims,
    else {
       if (!dimensionsOK) {
          _mesa_error(ctx, GL_INVALID_VALUE,
-                     "%s(invalid width or height)", func);
+                     "%s(invalid width=%d or height=%d)", func, width, height);
          return;
       }