diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_debug.c | 13 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_debug.h | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_debug.c b/src/mesa/drivers/dri/i965/intel_debug.c index 013602c4abe..0cb7aef3231 100644 --- a/src/mesa/drivers/dri/i965/intel_debug.c +++ b/src/mesa/drivers/dri/i965/intel_debug.c @@ -72,6 +72,19 @@ static const struct dri_debug_control debug_control[] = { { NULL, 0 } }; +uint64_t +intel_debug_flag_for_shader_stage(gl_shader_stage stage) +{ + int flags[] = { + [MESA_SHADER_VERTEX] = DEBUG_VS, + [MESA_SHADER_GEOMETRY] = DEBUG_GS, + [MESA_SHADER_FRAGMENT] = DEBUG_WM, + [MESA_SHADER_COMPUTE] = 0, /* no debug flag yet */ + }; + STATIC_ASSERT(MESA_SHADER_STAGES == 4); + return flags[stage]; +} + void brw_process_intel_debug_variable(struct brw_context *brw) { diff --git a/src/mesa/drivers/dri/i965/intel_debug.h b/src/mesa/drivers/dri/i965/intel_debug.h index 01b4dcfd3fe..ed879aba8d3 100644 --- a/src/mesa/drivers/dri/i965/intel_debug.h +++ b/src/mesa/drivers/dri/i965/intel_debug.h @@ -110,6 +110,8 @@ extern uint64_t INTEL_DEBUG; } \ } while (0) +extern uint64_t intel_debug_flag_for_shader_stage(gl_shader_stage stage); + struct brw_context; extern void brw_process_intel_debug_variable(struct brw_context *brw); |