From 2fd5cb713338e91999a036399a4bea4406687ca0 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 14 Oct 2009 16:24:35 -0600 Subject: [PATCH] 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 95ff3495abe..ea1ee228129 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 07ed51f5abe..490cc9c26b7 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 5699db5d4a8..988bfe1e228 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 };