diff options
author | Jakob Bornecrantz <[email protected]> | 2011-02-20 11:41:32 +0100 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2011-02-21 23:42:53 +0000 |
commit | fe6800a1bbd2f22fc3b3921765491d9ba179c4ff (patch) | |
tree | c37c8f2eee2e8970ccfb0d6bf05cea6e0a2337f3 /src/gallium/drivers | |
parent | 3c74ecf687a7b23d7fcb5436722a3f4892034e0a (diff) |
i915g: Use debug get once options
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/i915/i915_context.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/i915/i915_debug.c | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/gallium/drivers/i915/i915_context.c b/src/gallium/drivers/i915/i915_context.c index 648d0090c9a..78a32340ba7 100644 --- a/src/gallium/drivers/i915/i915_context.c +++ b/src/gallium/drivers/i915/i915_context.c @@ -39,6 +39,9 @@ #include "pipe/p_screen.h" +DEBUG_GET_ONCE_BOOL_OPTION(i915_no_vbuf, "I915_NO_VBUF", FALSE); + + /* * Draw functions */ @@ -144,7 +147,7 @@ i915_create_context(struct pipe_screen *screen, void *priv) */ i915->draw = draw_create(&i915->base); assert(i915->draw); - if (!debug_get_bool_option("I915_NO_VBUF", FALSE)) { + if (!debug_get_option_i915_no_vbuf()) { draw_set_rasterize_stage(i915->draw, i915_draw_vbuf_stage(i915)); } else { draw_set_rasterize_stage(i915->draw, i915_draw_render_stage(i915)); diff --git a/src/gallium/drivers/i915/i915_debug.c b/src/gallium/drivers/i915/i915_debug.c index 845e92cf5c6..8dbd36cc318 100644 --- a/src/gallium/drivers/i915/i915_debug.c +++ b/src/gallium/drivers/i915/i915_debug.c @@ -48,10 +48,13 @@ static const struct debug_named_value debug_options[] = { unsigned i915_debug = 0; 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) { - i915_debug = debug_get_flags_option("I915_DEBUG", debug_options, 0); - i915_tiling = !debug_get_bool_option("I915_NO_TILING", FALSE); + i915_debug = debug_get_option_i915_debug(); + i915_tiling = !debug_get_option_i915_no_tiling(); } |