[PATCH 2/3] gallium: silence all debug_named_value related warnings

Joakim Sindholt opensource at zhasha.com
Tue Jun 1 11:11:30 PDT 2010


---
 src/gallium/auxiliary/gallivm/lp_bld_init.c |   10 ++--
 src/gallium/drivers/cell/ppu/cell_context.c |   16 ++++----
 src/gallium/drivers/i965/brw_screen.c       |   58 +++++++++++++-------------
 src/gallium/drivers/llvmpipe/lp_screen.c    |   22 +++++-----
 src/gallium/drivers/svga/svga_screen.c      |   30 +++++++-------
 src/gallium/drivers/trace/tr_context.c      |    6 +-
 src/mesa/state_tracker/st_debug.c           |   18 ++++----
 7 files changed, 80 insertions(+), 80 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index e02a451..174e20e 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -37,11 +37,11 @@
 unsigned gallivm_debug = 0;
 
 static const struct debug_named_value lp_bld_debug_flags[] = {
-   { "tgsi",   GALLIVM_DEBUG_TGSI },
-   { "ir",     GALLIVM_DEBUG_IR },
-   { "asm",    GALLIVM_DEBUG_ASM },
-   { "nopt",   GALLIVM_DEBUG_NO_OPT },
-   {NULL, 0}
+   { "tgsi",   GALLIVM_DEBUG_TGSI, NULL },
+   { "ir",     GALLIVM_DEBUG_IR, NULL },
+   { "asm",    GALLIVM_DEBUG_ASM, NULL },
+   { "nopt",   GALLIVM_DEBUG_NO_OPT, NULL },
+   DEBUG_NAMED_VALUE_END
 };
 #endif
 
diff --git a/src/gallium/drivers/cell/ppu/cell_context.c b/src/gallium/drivers/cell/ppu/cell_context.c
index 411f204..143eca8 100644
--- a/src/gallium/drivers/cell/ppu/cell_context.c
+++ b/src/gallium/drivers/cell/ppu/cell_context.c
@@ -88,14 +88,14 @@ cell_draw_create(struct cell_context *cell)
 
 
 static const struct debug_named_value cell_debug_flags[] = {
-   {"checker", CELL_DEBUG_CHECKER},/**< modulate tile clear color by SPU ID */
-   {"asm", CELL_DEBUG_ASM},        /**< dump SPU asm code */
-   {"sync", CELL_DEBUG_SYNC},      /**< SPUs do synchronous DMA */
-   {"fragops", CELL_DEBUG_FRAGMENT_OPS}, /**< SPUs emit fragment ops debug messages*/
-   {"fragopfallback", CELL_DEBUG_FRAGMENT_OP_FALLBACK}, /**< SPUs use reference implementation for fragment ops*/
-   {"cmd", CELL_DEBUG_CMD},       /**< SPUs dump command buffer info */
-   {"cache", CELL_DEBUG_CACHE},   /**< report texture cache stats on exit */
-   {NULL, 0}
+   {"checker", CELL_DEBUG_CHECKER, NULL},/**< modulate tile clear color by SPU ID */
+   {"asm", CELL_DEBUG_ASM, NULL},        /**< dump SPU asm code */
+   {"sync", CELL_DEBUG_SYNC, NULL},      /**< SPUs do synchronous DMA */
+   {"fragops", CELL_DEBUG_FRAGMENT_OPS, NULL}, /**< SPUs emit fragment ops debug messages*/
+   {"fragopfallback", CELL_DEBUG_FRAGMENT_OP_FALLBACK, NULL}, /**< SPUs use reference implementation for fragment ops*/
+   {"cmd", CELL_DEBUG_CMD, NULL},       /**< SPUs dump command buffer info */
+   {"cache", CELL_DEBUG_CACHE, NULL},   /**< report texture cache stats on exit */
+   DEBUG_NAMED_VALUE_END
 };
 
 static unsigned int
diff --git a/src/gallium/drivers/i965/brw_screen.c b/src/gallium/drivers/i965/brw_screen.c
index 7a7b9c1..5a45687 100644
--- a/src/gallium/drivers/i965/brw_screen.c
+++ b/src/gallium/drivers/i965/brw_screen.c
@@ -39,38 +39,38 @@
 
 #ifdef DEBUG
 static const struct debug_named_value debug_names[] = {
-   { "tex",   DEBUG_TEXTURE},
-   { "state", DEBUG_STATE},
-   { "ioctl", DEBUG_IOCTL},
-   { "blit",  DEBUG_BLIT},
-   { "curbe", DEBUG_CURBE},
-   { "fall",  DEBUG_FALLBACKS},
-   { "verb",  DEBUG_VERBOSE},
-   { "bat",   DEBUG_BATCH},
-   { "pix",   DEBUG_PIXEL},
-   { "wins",  DEBUG_WINSYS},
-   { "min",   DEBUG_MIN_URB},
-   { "dis",   DEBUG_DISASSEM},
-   { "sync",  DEBUG_SYNC},
-   { "prim",  DEBUG_PRIMS },
-   { "vert",  DEBUG_VERTS },
-   { "dma",   DEBUG_DMA },
-   { "san",   DEBUG_SANITY },
-   { "sleep", DEBUG_SLEEP },
-   { "stats", DEBUG_STATS },
-   { "sing",  DEBUG_SINGLE_THREAD },
-   { "thre",  DEBUG_SINGLE_THREAD },
-   { "wm",    DEBUG_WM },
-   { "urb",   DEBUG_URB },
-   { "vs",    DEBUG_VS },
-   { NULL,    0 }
+   { "tex",   DEBUG_TEXTURE, NULL },
+   { "state", DEBUG_STATE, NULL },
+   { "ioctl", DEBUG_IOCTL, NULL },
+   { "blit",  DEBUG_BLIT, NULL },
+   { "curbe", DEBUG_CURBE, NULL },
+   { "fall",  DEBUG_FALLBACKS, NULL },
+   { "verb",  DEBUG_VERBOSE, NULL },
+   { "bat",   DEBUG_BATCH, NULL },
+   { "pix",   DEBUG_PIXEL, NULL },
+   { "wins",  DEBUG_WINSYS, NULL },
+   { "min",   DEBUG_MIN_URB, NULL },
+   { "dis",   DEBUG_DISASSEM, NULL },
+   { "sync",  DEBUG_SYNC, NULL },
+   { "prim",  DEBUG_PRIMS, NULL },
+   { "vert",  DEBUG_VERTS, NULL },
+   { "dma",   DEBUG_DMA, NULL },
+   { "san",   DEBUG_SANITY, NULL },
+   { "sleep", DEBUG_SLEEP, NULL },
+   { "stats", DEBUG_STATS, NULL },
+   { "sing",  DEBUG_SINGLE_THREAD, NULL },
+   { "thre",  DEBUG_SINGLE_THREAD, NULL },
+   { "wm",    DEBUG_WM, NULL },
+   { "urb",   DEBUG_URB, NULL },
+   { "vs",    DEBUG_VS, NULL },
+   DEBUG_NAMED_VALUE_END
 };
 
 static const struct debug_named_value dump_names[] = {
-   { "asm",   DUMP_ASM},
-   { "state", DUMP_STATE},
-   { "batch", DUMP_BATCH},
-   { NULL, 0 }
+   { "asm",   DUMP_ASM, NULL },
+   { "state", DUMP_STATE, NULL },
+   { "batch", DUMP_BATCH, NULL },
+   DEBUG_NAMED_VALUE_END
 };
 
 int BRW_DEBUG = 0;
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index 34ad298..98ac11d 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -50,17 +50,17 @@
 int LP_DEBUG = 0;
 
 static const struct debug_named_value lp_debug_flags[] = {
-   { "pipe",   DEBUG_PIPE },
-   { "tgsi",   DEBUG_TGSI },
-   { "tex",    DEBUG_TEX },
-   { "setup",  DEBUG_SETUP },
-   { "rast",   DEBUG_RAST },
-   { "query",  DEBUG_QUERY },
-   { "screen", DEBUG_SCREEN },
-   { "show_tiles",    DEBUG_SHOW_TILES },
-   { "show_subtiles", DEBUG_SHOW_SUBTILES },
-   { "counters", DEBUG_COUNTERS },
-   {NULL, 0}
+   { "pipe",   DEBUG_PIPE, NULL },
+   { "tgsi",   DEBUG_TGSI, NULL },
+   { "tex",    DEBUG_TEX, NULL },
+   { "setup",  DEBUG_SETUP, NULL },
+   { "rast",   DEBUG_RAST, NULL },
+   { "query",  DEBUG_QUERY, NULL },
+   { "screen", DEBUG_SCREEN, NULL },
+   { "show_tiles",    DEBUG_SHOW_TILES, NULL },
+   { "show_subtiles", DEBUG_SHOW_SUBTILES, NULL },
+   { "counters", DEBUG_COUNTERS, NULL },
+   DEBUG_NAMED_VALUE_END
 };
 #endif
 
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index 99b4191..3de04d0 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -43,21 +43,21 @@
 int SVGA_DEBUG = 0;
 
 static const struct debug_named_value svga_debug_flags[] = {
-   { "dma",      DEBUG_DMA },
-   { "tgsi",     DEBUG_TGSI },
-   { "pipe",     DEBUG_PIPE },
-   { "state",    DEBUG_STATE },
-   { "screen",   DEBUG_SCREEN },
-   { "tex",      DEBUG_TEX },
-   { "swtnl",    DEBUG_SWTNL },
-   { "const",    DEBUG_CONSTS },
-   { "viewport", DEBUG_VIEWPORT },
-   { "views",    DEBUG_VIEWS },
-   { "perf",     DEBUG_PERF },
-   { "flush",    DEBUG_FLUSH },
-   { "sync",     DEBUG_SYNC },
-   { "cache",    DEBUG_CACHE },
-   {NULL, 0}
+   { "dma",      DEBUG_DMA, NULL },
+   { "tgsi",     DEBUG_TGSI, NULL },
+   { "pipe",     DEBUG_PIPE, NULL },
+   { "state",    DEBUG_STATE, NULL },
+   { "screen",   DEBUG_SCREEN, NULL },
+   { "tex",      DEBUG_TEX, NULL },
+   { "swtnl",    DEBUG_SWTNL, NULL },
+   { "const",    DEBUG_CONSTS, NULL },
+   { "viewport", DEBUG_VIEWPORT, NULL },
+   { "views",    DEBUG_VIEWS, NULL },
+   { "perf",     DEBUG_PERF, NULL },
+   { "flush",    DEBUG_FLUSH, NULL },
+   { "sync",     DEBUG_SYNC, NULL },
+   { "cache",    DEBUG_CACHE, NULL },
+   DEBUG_NAMED_VALUE_END
 };
 #endif
 
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c
index 5cc244d..344a50b 100644
--- a/src/gallium/drivers/trace/tr_context.c
+++ b/src/gallium/drivers/trace/tr_context.c
@@ -1380,9 +1380,9 @@ trace_context_transfer_inline_write(struct pipe_context *_context,
 
 
 static const struct debug_named_value rbug_blocker_flags[] = {
-   {"before", 1},
-   {"after", 2},
-   {NULL, 0},
+   {"before", 1, NULL},
+   {"after", 2, NULL},
+   DEBUG_NAMED_VALUE_END
 };
 
 struct pipe_context *
diff --git a/src/mesa/state_tracker/st_debug.c b/src/mesa/state_tracker/st_debug.c
index 2da27fc..0b37683 100644
--- a/src/mesa/state_tracker/st_debug.c
+++ b/src/mesa/state_tracker/st_debug.c
@@ -45,15 +45,15 @@
 int ST_DEBUG = 0;
 
 static const struct debug_named_value st_debug_flags[] = {
-   { "mesa",     DEBUG_MESA },
-   { "tgsi",     DEBUG_TGSI },
-   { "constants",DEBUG_CONSTANTS },
-   { "pipe",     DEBUG_PIPE },
-   { "tex",      DEBUG_TEX },
-   { "fallback", DEBUG_FALLBACK },
-   { "screen",   DEBUG_SCREEN },
-   { "query",    DEBUG_QUERY },
-   {NULL, 0}
+   { "mesa",     DEBUG_MESA, NULL },
+   { "tgsi",     DEBUG_TGSI, NULL },
+   { "constants",DEBUG_CONSTANTS, NULL },
+   { "pipe",     DEBUG_PIPE, NULL },
+   { "tex",      DEBUG_TEX, NULL },
+   { "fallback", DEBUG_FALLBACK, NULL },
+   { "screen",   DEBUG_SCREEN, NULL },
+   { "query",    DEBUG_QUERY, NULL },
+   DEBUG_NAMED_VALUE_END
 };
 #endif
 
-- 
1.7.0.1


--=-NxzsPBLS9dtTHoQI6Y/v
Content-Disposition: attachment; filename="0003-r300g-use-util-u_debug.patch"
Content-Type: text/x-patch; name="0003-r300g-use-util-u_debug.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit



More information about the mesa-dev mailing list