Mesa (master): mesa: added VERBOSE_SWAPBUFFERS

Brian Paul brianp at kemper.freedesktop.org
Thu Oct 15 01:08:51 UTC 2009


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

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Oct 14 16:24:35 2009 -0600

mesa: added VERBOSE_SWAPBUFFERS

---

 src/mesa/main/context.c |    2 ++
 src/mesa/main/debug.c   |    3 ++-
 src/mesa/main/mtypes.h  |    3 ++-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 95ff349..ea1ee22 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -173,6 +173,8 @@ GLfloat _mesa_ubyte_to_float_color_tab[256];
 void
 _mesa_notifySwapBuffers(__GLcontext *ctx)
 {
+   if (MESA_VERBOSE & VERBOSE_SWAPBUFFERS)
+      _mesa_debug(ctx, "SwapBuffers\n");
    FLUSH_CURRENT( ctx, 0 );
    if (ctx->Driver.Flush) {
       ctx->Driver.Flush(ctx);
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index 07ed51f..490cc9c 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -175,7 +175,8 @@ static void add_debug_flags( const char *debug )
       { "list",      VERBOSE_DISPLAY_LIST },
       { "lighting",  VERBOSE_LIGHTING },
       { "disassem",  VERBOSE_DISASSEM },
-      { "draw",      VERBOSE_DRAW }
+      { "draw",      VERBOSE_DRAW },
+      { "swap",      VERBOSE_SWAPBUFFERS }
    };
    GLuint i;
 
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 5699db5..988bfe1 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3110,7 +3110,8 @@ enum _verbose
    VERBOSE_PRIMS		= 0x0400,
    VERBOSE_VERTS		= 0x0800,
    VERBOSE_DISASSEM		= 0x1000,
-   VERBOSE_DRAW                 = 0x2000
+   VERBOSE_DRAW                 = 0x2000,
+   VERBOSE_SWAPBUFFERS          = 0x4000
 };
 
 




More information about the mesa-commit mailing list