From 943f4f47e0d69aeed531bf24475f429c1b2ec215 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 10 Apr 2017 13:48:21 -0600 Subject: [PATCH] svga: add DEBUG_SAMPLERS 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 --- src/gallium/drivers/svga/svga_debug.h | 1 + src/gallium/drivers/svga/svga_pipe_sampler.c | 3 ++- src/gallium/drivers/svga/svga_screen.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/svga/svga_debug.h b/src/gallium/drivers/svga/svga_debug.h index 039f79d4e99..3686cc6d9cc 100644 --- a/src/gallium/drivers/svga/svga_debug.h +++ b/src/gallium/drivers/svga/svga_debug.h @@ -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; diff --git a/src/gallium/drivers/svga/svga_pipe_sampler.c b/src/gallium/drivers/svga/svga_pipe_sampler.c index 0c53c1d2645..2e98eb457e0 100644 --- a/src/gallium/drivers/svga/svga_pipe_sampler.c +++ b/src/gallium/drivers/svga/svga_pipe_sampler.c @@ -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"); diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index c3ba6221874..08e09ec3361 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -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 -- 2.30.2