Mesa (master): mesa: clean-up fbo debug code

Brian Paul brianp at kemper.freedesktop.org
Wed Sep 16 00:20:18 UTC 2009


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

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Sep 15 17:20:32 2009 -0600

mesa: clean-up fbo debug code

---

 src/mesa/main/fbobject.c |   39 +++++++++++++++++++++++----------------
 1 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 825a230..991577a 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -46,6 +46,10 @@
 #include "texstore.h"
 
 
+/** Set this to 1 to help debug FBO incompleteness problems */
+#define DEBUG_FBO 0
+
+
 /**
  * Notes:
  *
@@ -308,8 +312,8 @@ _mesa_framebuffer_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
 static void
 att_incomplete(const char *msg)
 {
-#if 0
-   _mesa_printf("attachment incomplete: %s\n", msg);
+#if DEBUG_FBO
+   _mesa_debug(NULL, "attachment incomplete: %s\n", msg);
 #else
    (void) msg;
 #endif
@@ -317,6 +321,23 @@ att_incomplete(const char *msg)
 
 
 /**
+ * For debug only.
+ */
+static void
+fbo_incomplete(const char *msg, int index)
+{
+#if DEBUG_FBO
+   _mesa_debug(NULL, "FBO Incomplete: %s [%d]\n", msg, index);
+#else
+   (void) msg;
+   (void) index;
+#endif
+}
+
+
+
+
+/**
  * Test if an attachment point is complete and update its Complete field.
  * \param format if GL_COLOR, this is a color attachment point,
  *               if GL_DEPTH, this is a depth component attachment point,
@@ -468,20 +489,6 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
 
 
 /**
- * Helpful for debugging
- */
-static void
-fbo_incomplete(const char *msg, int index)
-{
-   (void) msg;
-   (void) index;
-   /*
-   _mesa_debug(NULL, "FBO Incomplete: %s [%d]\n", msg, index);
-   */
-}
-
-
-/**
  * Test if the given framebuffer object is complete and update its
  * Status field with the results.
  * Calls the ctx->Driver.ValidateFramebuffer() function to allow the




More information about the mesa-commit mailing list