diff options
author | Matt Turner <[email protected]> | 2014-11-21 18:05:40 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-12-01 11:32:52 -0800 |
commit | 933c67877678704c2d1a11b46c2703a3f04178ce (patch) | |
tree | ad5b268870a92f2b38c442497dbe1fb4f0e0322a /src | |
parent | 82811ff17628d978c69dd0c08d4c68069cd482c2 (diff) |
i965: Initialize INTEL_DEBUG once per process.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_debug.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_debug.c b/src/mesa/drivers/dri/i965/intel_debug.c index a283357bcf1..6391cf74ab6 100644 --- a/src/mesa/drivers/dri/i965/intel_debug.c +++ b/src/mesa/drivers/dri/i965/intel_debug.c @@ -32,6 +32,7 @@ #include "brw_context.h" #include "intel_debug.h" #include "utils.h" +#include "util/u_atomic.h" /* for p_atomic_cmpxchg */ uint64_t INTEL_DEBUG = 0; @@ -73,7 +74,9 @@ static const struct dri_debug_control debug_control[] = { void brw_process_intel_debug_variable(struct brw_context *brw) { - INTEL_DEBUG = driParseDebugString(getenv("INTEL_DEBUG"), debug_control); + uint64_t intel_debug = driParseDebugString(getenv("INTEL_DEBUG"), debug_control); + (void) p_atomic_cmpxchg(&INTEL_DEBUG, 0, intel_debug); + if (INTEL_DEBUG & DEBUG_BUFMGR) dri_bufmgr_set_debug(brw->bufmgr, true); |