[Mesa-dev] [PATCH] mesa: include texture format in glGenerateMipmap error message

Brian Paul brianp at vmware.com
Wed May 4 20:03:42 UTC 2016


---
 src/mesa/main/genmipmap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/genmipmap.c b/src/mesa/main/genmipmap.c
index 1a6ae9a..d917220 100644
--- a/src/mesa/main/genmipmap.c
+++ b/src/mesa/main/genmipmap.c
@@ -139,7 +139,8 @@ _mesa_generate_texture_mipmap(struct gl_context *ctx,
                                                               srcImage->InternalFormat)) {
       _mesa_unlock_texture(ctx, texObj);
       _mesa_error(ctx, GL_INVALID_OPERATION,
-                  "glGenerate%sMipmap(invalid internal format)", suffix);
+                  "glGenerate%sMipmap(invalid internal format %s)", suffix,
+                  _mesa_enum_to_string(srcImage->InternalFormat));
       return;
    }
 
-- 
1.9.1



More information about the mesa-dev mailing list