gallium: Deprecate GETENV. Replace by debug_get_bool_option.
debug_get_bool_option will interpret "n", "no", "0", "f", or "false" as FALSE; and everything else as TRUE. The default value (used when the variable is not set) is received as a parameter.
This commit is contained in:
parent
5f46bf77af
commit
a70684bf25
|
@ -119,8 +119,8 @@ draw_pt_arrays(struct draw_context *draw,
|
|||
|
||||
boolean draw_pt_init( struct draw_context *draw )
|
||||
{
|
||||
draw->pt.test_fse = GETENV("DRAW_FSE") != NULL;
|
||||
draw->pt.no_fse = GETENV("DRAW_NO_FSE") != NULL;
|
||||
draw->pt.test_fse = debug_get_bool_option("DRAW_FSE", FALSE);
|
||||
draw->pt.no_fse = debug_get_bool_option("DRAW_NO_FSE", FALSE);
|
||||
|
||||
draw->pt.front.vcache = draw_pt_vcache( draw );
|
||||
if (!draw->pt.front.vcache)
|
||||
|
|
|
@ -161,7 +161,7 @@ struct pipe_context *i915_create_context( struct pipe_screen *screen,
|
|||
*/
|
||||
i915->draw = draw_create();
|
||||
assert(i915->draw);
|
||||
if (!GETENV("I915_NO_VBUF")) {
|
||||
if (!debug_get_bool_option("I915_NO_VBUF", FALSE)) {
|
||||
draw_set_rasterize_stage(i915->draw, i915_draw_vbuf_stage(i915));
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -129,12 +129,12 @@ softpipe_create( struct pipe_screen *screen,
|
|||
uint i;
|
||||
|
||||
#ifdef PIPE_ARCH_X86
|
||||
softpipe->use_sse = GETENV( "GALLIUM_NOSSE" ) == NULL;
|
||||
softpipe->use_sse = !debug_get_bool_option( "GALLIUM_NOSSE", FALSE );
|
||||
#else
|
||||
softpipe->use_sse = FALSE;
|
||||
#endif
|
||||
|
||||
softpipe->dump_fs = GETENV( "GALLIUM_DUMP_FS" ) != NULL;
|
||||
softpipe->dump_fs = debug_get_bool_option( "GALLIUM_DUMP_FS", FALSE );
|
||||
|
||||
softpipe->pipe.winsys = pipe_winsys;
|
||||
softpipe->pipe.screen = screen;
|
||||
|
|
|
@ -140,8 +140,6 @@ REALLOC( void *old_ptr, unsigned old_size, unsigned new_size )
|
|||
|
||||
#define CALLOC_STRUCT(T) (struct T *) CALLOC(1, sizeof(struct T))
|
||||
|
||||
#define GETENV( X ) debug_get_option( X, NULL )
|
||||
|
||||
|
||||
/**
|
||||
* Return memory on given byte alignment
|
||||
|
|
Loading…
Reference in New Issue