Mesa (master): r300g: optionally log MSAA resources to stderr

Marek Olšák mareko at kemper.freedesktop.org
Wed Jan 9 15:47:36 UTC 2013


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

Author: Marek Olšák <maraeo at gmail.com>
Date:   Wed Jan  9 16:39:18 2013 +0100

r300g: optionally log MSAA resources to stderr

Set: RADEON_DEBUG=msaa

---

 src/gallium/drivers/r300/r300_debug.c   |    1 +
 src/gallium/drivers/r300/r300_screen.h  |    1 +
 src/gallium/drivers/r300/r300_texture.c |    6 ++++++
 3 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_debug.c b/src/gallium/drivers/r300/r300_debug.c
index 9a0052a..5ec2cf9 100644
--- a/src/gallium/drivers/r300/r300_debug.c
+++ b/src/gallium/drivers/r300/r300_debug.c
@@ -42,6 +42,7 @@ static const struct debug_named_value debug_options[] = {
     { "cbzb", DBG_CBZB, "Log fast color clear info" },
     { "hyperz", DBG_HYPERZ, "Log HyperZ info" },
     { "scissor", DBG_SCISSOR, "Log scissor info" },
+    { "msaa", DBG_MSAA, "Log MSAA resources"},
     { "anisohq", DBG_ANISOHQ, "Use high quality anisotropic filtering" },
     { "notiling", DBG_NO_TILING, "Disable tiling" },
     { "noimmd", DBG_NO_IMMD, "Disable immediate mode" },
diff --git a/src/gallium/drivers/r300/r300_screen.h b/src/gallium/drivers/r300/r300_screen.h
index 86bb09c..d2bed8d 100644
--- a/src/gallium/drivers/r300/r300_screen.h
+++ b/src/gallium/drivers/r300/r300_screen.h
@@ -83,6 +83,7 @@ radeon_winsys(struct pipe_screen *screen) {
 #define DBG_HYPERZ      (1 << 11)
 #define DBG_SCISSOR     (1 << 12)
 #define DBG_INFO        (1 << 13)
+#define DBG_MSAA        (1 << 14)
 /* Features. */
 #define DBG_ANISOHQ     (1 << 16)
 #define DBG_NO_TILING   (1 << 17)
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index e18dcf8..4eb9a23 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -1001,6 +1001,12 @@ r300_texture_create_object(struct r300_screen *rscreen,
         }
     }
 
+    if (SCREEN_DBG_ON(rscreen, DBG_MSAA) && base->nr_samples > 1) {
+        fprintf(stderr, "r300: %i MSAA %s buffer created\n",
+                base->nr_samples,
+                util_format_is_depth_or_stencil(base->format) ? "depth" : "color");
+    }
+
     tex->cs_buf = rws->buffer_get_cs_handle(tex->buf);
 
     rws->buffer_set_tiling(tex->buf, NULL,




More information about the mesa-commit mailing list