When compiling, we have a gl_shader_stage (MESA_SHADER_*) enum, and want
to know whether debugging is enabled for that stage. This allows us to
easily translate it into the corresponding debug flag.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
{ 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)
{
} \
} 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);