On Friday, April 17, 2015 07:12:02 PM Jason Ekstrand wrote: > --- > src/mesa/drivers/dri/i965/brw_context.c | 10 +++++++++- > src/mesa/drivers/dri/i965/intel_debug.c | 13 ++----------- > src/mesa/drivers/dri/i965/intel_debug.h | 4 ++-- > src/mesa/drivers/dri/i965/intel_screen.c | 2 ++ > 4 files changed, 15 insertions(+), 14 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_context.c > b/src/mesa/drivers/dri/i965/brw_context.c > index 9d90360..fc36ef7 100644 > --- a/src/mesa/drivers/dri/i965/brw_context.c > +++ b/src/mesa/drivers/dri/i965/brw_context.c > @@ -788,7 +788,15 @@ brwCreateContext(gl_api api, > _mesa_meta_init(ctx); > > brw_process_driconf_options(brw); > - brw_process_intel_debug_variable(brw); > + > + if (INTEL_DEBUG & DEBUG_BUFMGR) > + dri_bufmgr_set_debug(brw->bufmgr, true); > + > + if (INTEL_DEBUG & DEBUG_PERF) > + brw->perf_debug = true; > + > + if (INTEL_DEBUG & DEBUG_AUB) > + drm_intel_bufmgr_gem_set_aub_dump(brw->bufmgr, true);
You may as well just do the dri_bufmgr_set_debug and drm_intel_bufmgr_gem_set_aub_dump at screen creation time - brw->bufmgr is the same as screen->bufmgr. (There's only one bufmgr.) Also, typo in the commit message. > > if (brw->gen >= 8 && !(INTEL_DEBUG & DEBUG_VEC4VS)) > brw->scalar_vs = true; > diff --git a/src/mesa/drivers/dri/i965/intel_debug.c > b/src/mesa/drivers/dri/i965/intel_debug.c > index a5b883c..4899d2c 100644 > --- a/src/mesa/drivers/dri/i965/intel_debug.c > +++ b/src/mesa/drivers/dri/i965/intel_debug.c > @@ -86,25 +86,16 @@ intel_debug_flag_for_shader_stage(gl_shader_stage stage) > } > > void > -brw_process_intel_debug_variable(struct brw_context *brw) > +brw_process_intel_debug_variable(const struct brw_device_info *devinfo) > { > 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); > - > - if ((INTEL_DEBUG & DEBUG_SHADER_TIME) && brw->gen < 7) { > + if ((INTEL_DEBUG & DEBUG_SHADER_TIME) && devinfo->gen < 7) { > fprintf(stderr, > "shader_time debugging requires gen7 (Ivybridge) or > better.\n"); > INTEL_DEBUG &= ~DEBUG_SHADER_TIME; > } > - > - if (INTEL_DEBUG & DEBUG_PERF) > - brw->perf_debug = true; > - > - if (INTEL_DEBUG & DEBUG_AUB) > - drm_intel_bufmgr_gem_set_aub_dump(brw->bufmgr, true); > } > > /** > diff --git a/src/mesa/drivers/dri/i965/intel_debug.h > b/src/mesa/drivers/dri/i965/intel_debug.h > index 807ad98..f9d7d77 100644 > --- a/src/mesa/drivers/dri/i965/intel_debug.h > +++ b/src/mesa/drivers/dri/i965/intel_debug.h > @@ -112,8 +112,8 @@ extern uint64_t INTEL_DEBUG; > > extern uint64_t intel_debug_flag_for_shader_stage(gl_shader_stage stage); > > -struct brw_context; > +struct brw_device_info; > > -extern void brw_process_intel_debug_variable(struct brw_context *brw); > +extern void brw_process_intel_debug_variable(const struct brw_device_info *); > > extern bool brw_env_var_as_boolean(const char *var_name, bool default_value); > diff --git a/src/mesa/drivers/dri/i965/intel_screen.c > b/src/mesa/drivers/dri/i965/intel_screen.c > index 92e638f..727ddaa 100644 > --- a/src/mesa/drivers/dri/i965/intel_screen.c > +++ b/src/mesa/drivers/dri/i965/intel_screen.c > @@ -1369,6 +1369,8 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp) > if (!intelScreen->devinfo) > return false; > > + brw_process_intel_debug_variable(intelScreen->devinfo); > + > intelScreen->hw_must_use_separate_stencil = intelScreen->devinfo->gen >= > 7; > > intelScreen->hw_has_swizzling = intel_detect_swizzling(intelScreen); >
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev