svga: add DEBUG_SAMPLERS
authorBrian Paul <brianp@vmware.com>
Mon, 10 Apr 2017 19:48:21 +0000 (13:48 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 26 Apr 2017 17:37:59 +0000 (11:37 -0600)
The debug output in svga_create_sampler_state() was controlled by
DEBUG_VIEWS but that's not consistent with the other debug output for
sampler views.  Create/use a new debug flag just for this.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/gallium/drivers/svga/svga_debug.h
src/gallium/drivers/svga/svga_pipe_sampler.c
src/gallium/drivers/svga/svga_screen.c

index 039f79d..3686cc6 100644 (file)
@@ -45,6 +45,7 @@
 #define DEBUG_QUERY        0x4000
 #define DEBUG_CACHE        0x8000
 #define DEBUG_STREAMOUT    0x10000
+#define DEBUG_SAMPLERS     0x20000
 
 #ifdef DEBUG
 extern int SVGA_DEBUG;
index 0c53c1d..2e98eb4 100644 (file)
@@ -272,7 +272,8 @@ svga_create_sampler_state(struct pipe_context *pipe,
       define_sampler_state_object(svga, cso, sampler);
    }
 
-   SVGA_DBG(DEBUG_VIEWS, "min %u, view(min %u, max %u) lod, mipfilter %s\n",
+   SVGA_DBG(DEBUG_SAMPLERS,
+            "New sampler: min %u, view(min %u, max %u) lod, mipfilter %s\n",
             cso->min_lod, cso->view_min_lod, cso->view_max_lod,
             cso->mipfilter == SVGA3D_TEX_FILTER_NONE ? "SVGA3D_TEX_FILTER_NONE" : "SOMETHING");
 
index c3ba622..08e09ec 100644 (file)
@@ -65,6 +65,7 @@ static const struct debug_named_value svga_debug_flags[] = {
    { "cache",       DEBUG_CACHE, NULL },
    { "streamout",   DEBUG_STREAMOUT, NULL },
    { "query",       DEBUG_QUERY, NULL },
+   { "samplers",    DEBUG_SAMPLERS, NULL },
    DEBUG_NAMED_VALUE_END
 };
 #endif