mesa: print unsigned values with %u
authorMatt Turner <mattst88@gmail.com>
Fri, 7 Dec 2012 22:26:04 +0000 (14:26 -0800)
committerMatt Turner <mattst88@gmail.com>
Thu, 13 Dec 2012 17:53:11 +0000 (09:53 -0800)
Otherwise messages say silly things like
   glGetActiveUniformBlockiv(block index -1 >= 0)

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/uniforms.c

index 3f156bf103f85402fa76f87ad0e383e53c1ba477..77b195edbc39d137988d82dcd3d2bdeccdd28a55 100644 (file)
@@ -614,14 +614,14 @@ _mesa_UniformBlockBinding(GLuint program,
 
    if (uniformBlockIndex >= shProg->NumUniformBlocks) {
       _mesa_error(ctx, GL_INVALID_VALUE,
-                 "glUniformBlockBinding(block index %d >= %d)",
+                 "glUniformBlockBinding(block index %u >= %u)",
                  uniformBlockIndex, shProg->NumUniformBlocks);
       return;
    }
 
    if (uniformBlockBinding >= ctx->Const.MaxUniformBufferBindings) {
       _mesa_error(ctx, GL_INVALID_VALUE,
-                 "glUniformBlockBinding(block binding %d >= %d)",
+                 "glUniformBlockBinding(block binding %u >= %u)",
                  uniformBlockBinding, ctx->Const.MaxUniformBufferBindings);
       return;
    }
@@ -667,7 +667,7 @@ _mesa_GetActiveUniformBlockiv(GLuint program,
 
    if (uniformBlockIndex >= shProg->NumUniformBlocks) {
       _mesa_error(ctx, GL_INVALID_VALUE,
-                 "glGetActiveUniformBlockiv(block index %d >= %d)",
+                 "glGetActiveUniformBlockiv(block index %u >= %u)",
                  uniformBlockIndex, shProg->NumUniformBlocks);
       return;
    }
@@ -750,7 +750,7 @@ _mesa_GetActiveUniformBlockName(GLuint program,
 
    if (uniformBlockIndex >= shProg->NumUniformBlocks) {
       _mesa_error(ctx, GL_INVALID_VALUE,
-                 "glGetActiveUniformBlockiv(block index %d >= %d)",
+                 "glGetActiveUniformBlockiv(block index %u >= %u)",
                  uniformBlockIndex, shProg->NumUniformBlocks);
       return;
    }