fbobject: add VERBOSE=api message for renderbuffer storage
authorJordan Justen <jordan.l.justen@intel.com>
Sat, 12 Jan 2013 22:19:30 +0000 (14:19 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Tue, 15 Jan 2013 04:47:02 +0000 (20:47 -0800)
Add API debug trace message for:
 * glRenderbufferStorage
 * glRenderbufferStorageMultisample

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/fbobject.c

index 74b038632d50a326096567fa7ac390bd193136ab..c438268163322ebc4f66a151bc9a8790815094ab 100644 (file)
@@ -1378,13 +1378,28 @@ renderbuffer_storage(GLenum target, GLenum internalFormat,
                      GLsizei width, GLsizei height, GLsizei samples)
 {
    const char *func = samples == NO_SAMPLES ?
-      "glRenderbufferStorage" : "RenderbufferStorageMultisample";
+      "glRenderbufferStorage" : "glRenderbufferStorageMultisample";
    struct gl_renderbuffer *rb;
    GLenum baseFormat;
    GET_CURRENT_CONTEXT(ctx);
 
    ASSERT_OUTSIDE_BEGIN_END(ctx);
 
+   if (MESA_VERBOSE & VERBOSE_API) {
+      if (samples == NO_SAMPLES)
+         _mesa_debug(ctx, "%s(%s, %s, %d, %d)\n",
+                     func,
+                     _mesa_lookup_enum_by_nr(target),
+                     _mesa_lookup_enum_by_nr(internalFormat),
+                     width, height);
+      else
+         _mesa_debug(ctx, "%s(%s, %s, %d, %d, %d)\n",
+                     func,
+                     _mesa_lookup_enum_by_nr(target),
+                     _mesa_lookup_enum_by_nr(internalFormat),
+                     width, height, samples);
+   }
+
    if (target != GL_RENDERBUFFER_EXT) {
       _mesa_error(ctx, GL_INVALID_ENUM, "%s(target)", func);
       return;