Mesa (master): i915g: Move debug fields to screen

Jakob Bornecrantz wallbraker at kemper.freedesktop.org
Mon Feb 21 23:54:41 UTC 2011


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

Author: Jakob Bornecrantz <wallbraker at gmail.com>
Date:   Sun Feb 20 12:52:55 2011 +0100

i915g: Move debug fields to screen

---

 src/gallium/drivers/i915/i915_debug.c            |    4 ++--
 src/gallium/drivers/i915/i915_debug.h            |    1 -
 src/gallium/drivers/i915/i915_resource_texture.c |    2 +-
 src/gallium/drivers/i915/i915_screen.h           |    4 ++++
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/i915/i915_debug.c b/src/gallium/drivers/i915/i915_debug.c
index 8dbd36c..d11da83 100644
--- a/src/gallium/drivers/i915/i915_debug.c
+++ b/src/gallium/drivers/i915/i915_debug.c
@@ -51,10 +51,10 @@ boolean i915_tiling = TRUE;
 DEBUG_GET_ONCE_FLAGS_OPTION(i915_debug, "I915_DEBUG", debug_options, 0);
 DEBUG_GET_ONCE_BOOL_OPTION(i915_no_tiling, "I915_NO_TILING", FALSE);
 
-void i915_debug_init(struct i915_screen *screen)
+void i915_debug_init(struct i915_screen *is)
 {
    i915_debug = debug_get_option_i915_debug();
-   i915_tiling = !debug_get_option_i915_no_tiling();
+   is->debug.tiling = !debug_get_option_i915_no_tiling();
 }
 
 
diff --git a/src/gallium/drivers/i915/i915_debug.h b/src/gallium/drivers/i915/i915_debug.h
index 11af766..fa60799 100644
--- a/src/gallium/drivers/i915/i915_debug.h
+++ b/src/gallium/drivers/i915/i915_debug.h
@@ -46,7 +46,6 @@ struct i915_winsys_batchbuffer;
 #define DBG_CONSTANTS 0x20
 
 extern unsigned i915_debug;
-extern boolean i915_tiling;
 
 #ifdef DEBUG
 static INLINE boolean
diff --git a/src/gallium/drivers/i915/i915_resource_texture.c b/src/gallium/drivers/i915/i915_resource_texture.c
index 12790a3..aad5235 100644
--- a/src/gallium/drivers/i915/i915_resource_texture.c
+++ b/src/gallium/drivers/i915/i915_resource_texture.c
@@ -174,7 +174,7 @@ i915_texture_set_image_offset(struct i915_texture *tex,
 static enum i915_winsys_buffer_tile
 i915_texture_tiling(struct i915_screen *is, struct i915_texture *tex)
 {
-   if (!i915_tiling)
+   if (!is->debug.tiling)
       return I915_TILE_NONE;
 
    if (tex->b.b.target == PIPE_TEXTURE_1D)
diff --git a/src/gallium/drivers/i915/i915_screen.h b/src/gallium/drivers/i915/i915_screen.h
index bb4d255..e76e33a 100644
--- a/src/gallium/drivers/i915/i915_screen.h
+++ b/src/gallium/drivers/i915/i915_screen.h
@@ -45,6 +45,10 @@ struct i915_screen
    struct i915_winsys *iws;
 
    boolean is_i945;
+
+   struct {
+      boolean tiling;
+   } debug;
 };
 
 




More information about the mesa-commit mailing list