Mesa (master): r300g: More debug flags.

Corbin Simpson csimpson at kemper.freedesktop.org
Tue Oct 13 07:12:40 UTC 2009


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

Author: Corbin Simpson <MostAwesomeDude at gmail.com>
Date:   Mon Oct 12 21:26:46 2009 -0700

r300g: More debug flags.

---

 src/gallium/drivers/r300/r300_context.h |    2 ++
 src/gallium/drivers/r300/r300_debug.c   |    2 ++
 src/gallium/drivers/r300/r300_surface.c |    9 +++++----
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
index a817459..086633f 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -313,6 +313,8 @@ void r300_init_surface_functions(struct r300_context* r300);
 #define DBG_CS      0x0000008
 #define DBG_DRAW    0x0000010
 #define DBG_SURF    0x0000020
+#define DBG_TEX     0x0000040
+#define DBG_FALL    0x0000080
 /*@}*/
 
 static INLINE boolean DBG_ON(struct r300_context * ctx, unsigned flags)
diff --git a/src/gallium/drivers/r300/r300_debug.c b/src/gallium/drivers/r300/r300_debug.c
index 4a55a0c..bfd4ab0 100644
--- a/src/gallium/drivers/r300/r300_debug.c
+++ b/src/gallium/drivers/r300/r300_debug.c
@@ -38,6 +38,8 @@ static struct debug_option debug_options[] = {
     { "cs", DBG_CS, "Command submissions" },
     { "draw", DBG_DRAW, "Draw and emit" },
     { "surf", DBG_SURF, "Surface drawing" },
+    { "tex", DBG_TEX, "Textures" },
+    { "fall", DBG_FALL, "Fallbacks" },
 
     { "all", ~0, "Convenience option that enables all debug flags" },
 
diff --git a/src/gallium/drivers/r300/r300_surface.c b/src/gallium/drivers/r300/r300_surface.c
index a263b26..d72e734 100644
--- a/src/gallium/drivers/r300/r300_surface.c
+++ b/src/gallium/drivers/r300/r300_surface.c
@@ -116,7 +116,8 @@ static void r300_surface_fill(struct pipe_context* pipe,
     if (!pipe->screen->is_format_supported(pipe->screen, dest->format,
         PIPE_TEXTURE_2D, PIPE_TEXTURE_USAGE_RENDER_TARGET, 0)) {
 fallback:
-        DBG(r300, DBG_SURF, "r300: Falling back on surface clear...\n");
+        DBG(r300, DBG_SURF | DBG_FALL,
+            "r300: Falling back on surface clear...\n");
         util_surface_fill(pipe, dest, x, y, w, h, color);
         return;
     }
@@ -131,7 +132,7 @@ validate:
     if (!r300->winsys->validate(r300->winsys)) {
         r300->context.flush(&r300->context, 0, NULL);
         if (invalid) {
-            DBG(r300, DBG_SURF, "r300: Stuck in validation loop, gonna fallback.");
+            DBG(r300, DBG_SURF | DBG_FALL, "r300: Stuck in validation loop.");
             goto fallback;
         }
         invalid = TRUE;
@@ -254,7 +255,7 @@ static void r300_surface_copy(struct pipe_context* pipe,
             !pipe->screen->is_format_supported(pipe->screen, dest->format,
             PIPE_TEXTURE_2D, PIPE_TEXTURE_USAGE_RENDER_TARGET, 0)) {
 fallback:
-        DBG(r300, DBG_SURF, "r300: Falling back on surface_copy\n");
+        DBG(r300, DBG_SURF | DBG_FALL, "r300: Falling back on surface_copy\n");
         util_surface_copy(pipe, FALSE, dest, destx, desty, src,
                 srcx, srcy, w, h);
         return;
@@ -275,7 +276,7 @@ validate:
     if (!r300->winsys->validate(r300->winsys)) {
         r300->context.flush(&r300->context, 0, NULL);
         if (invalid) {
-            DBG(r300, DBG_SURF, "r300: Stuck in validation loop, gonna fallback.");
+            DBG(r300, DBG_SURF | DBG_FALL, "r300: Stuck in validation loop.");
             goto fallback;
         }
         invalid = TRUE;




More information about the mesa-commit mailing list