mesa: put more info in glTexImage GL_OUT_OF_MEMORY error message
authorBrian Paul <brianp@vmware.com>
Fri, 24 Apr 2015 18:56:04 +0000 (12:56 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 24 Apr 2015 20:48:54 +0000 (14:48 -0600)
Give the user some idea about the size of the texture which caused
the GL_OUT_OF_MEMORY error.

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/main/teximage.c

index d07263c59b11ef7271ad999ed50f90263c1e0814..7bc1da7f805b8e5e9f87367c27bbd166b0718a7b 100644 (file)
@@ -3320,7 +3320,9 @@ teximage(struct gl_context *ctx, GLboolean compressed, GLuint dims,
 
       if (!sizeOK) {
          _mesa_error(ctx, GL_OUT_OF_MEMORY,
-                     "glTexImage%uD(image too large)", dims);
+                     "glTexImage%uD(image too large: %d x %d x %d, %s format)",
+                     dims, width, height, depth,
+                     _mesa_lookup_enum_by_nr(internalFormat));
          return;
       }