mesa: the function name appears to have a gl prefix already
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 24 Apr 2015 23:33:05 +0000 (19:33 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Mon, 27 Apr 2015 16:06:54 +0000 (12:06 -0400)
Currently we're producing errors like

User error: GL_INVALID_OPERATION in glglDeleteProgramsARB(invalid call)

And noop_warn appears to be called with the full function name. Don't
prepend a gl prefix.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/context.c

index f36fb8d..4aaf8b1 100644 (file)
@@ -894,14 +894,14 @@ update_default_objects(struct gl_context *ctx)
  * If there's no current OpenGL context for the calling thread, we can
  * print a message to stderr.
  *
- * \param name  the name of the OpenGL function, without the "gl" prefix
+ * \param name  the name of the OpenGL function
  */
 static void
 nop_handler(const char *name)
 {
    GET_CURRENT_CONTEXT(ctx);
    if (ctx) {
-      _mesa_error(ctx, GL_INVALID_OPERATION, "gl%s(invalid call)", name);
+      _mesa_error(ctx, GL_INVALID_OPERATION, "%s(invalid call)", name);
    }
 #if defined(DEBUG)
    else if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) {