Mesa (master): mesa/teximage: report the correct function which triggered the error

Nanley Chery nchery at kemper.freedesktop.org
Wed Aug 12 20:47:06 UTC 2015


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

Author: Nanley Chery <nanley.g.chery at intel.com>
Date:   Fri Aug  7 16:37:47 2015 -0700

mesa/teximage: report the correct function which triggered the error

This function would always report that a dimension or size error occurred
in glTexImage even when it was called from glCompressedTexImage. Replace
the static string with the dynamically determined caller name.

Reviewed-by: Tapani Palli <tapani.palli at intel.com>
Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>

---

 src/mesa/main/teximage.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index fc69387..d35dc12 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -3336,15 +3336,15 @@ teximage(struct gl_context *ctx, GLboolean compressed, GLuint dims,
 
       if (!dimensionsOK) {
          _mesa_error(ctx, GL_INVALID_VALUE,
-                     "glTexImage%uD(invalid width or height or depth)",
-                     dims);
+                     "%s%uD(invalid width or height or depth)",
+                     func, dims);
          return;
       }
 
       if (!sizeOK) {
          _mesa_error(ctx, GL_OUT_OF_MEMORY,
-                     "glTexImage%uD(image too large: %d x %d x %d, %s format)",
-                     dims, width, height, depth,
+                     "%s%uD(image too large: %d x %d x %d, %s format)",
+                     func, dims, width, height, depth,
                      _mesa_enum_to_string(internalFormat));
          return;
       }




More information about the mesa-commit mailing list