intel: Add env variable to add break point on/before draw

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24308>
This commit is contained in:
Sagar Ghuge 2023-07-19 10:04:49 -07:00 committed by Marge Bot
parent 7a9ee94e1f
commit e5116e00ca
2 changed files with 11 additions and 0 deletions

View file

@ -104,6 +104,7 @@ static const struct debug_control debug_control[] = {
{ "heaps", DEBUG_HEAPS },
{ "isl", DEBUG_ISL },
{ "sparse", DEBUG_SPARSE },
{ "draw_bkp", DEBUG_DRAW_BKP },
{ NULL, 0 }
};
@ -183,6 +184,9 @@ intel_debug_flag_for_shader_stage(gl_shader_stage stage)
static uint64_t intel_debug_batch_frame_start = 0;
static uint64_t intel_debug_batch_frame_stop = -1;
uint32_t intel_debug_bkp_before_draw_count = 0;
uint32_t intel_debug_bkp_after_draw_count = 0;
static void
brw_process_intel_debug_variable_once(void)
{
@ -193,6 +197,10 @@ brw_process_intel_debug_variable_once(void)
intel_debug_batch_frame_stop =
debug_get_num_option("INTEL_DEBUG_BATCH_FRAME_STOP", -1);
intel_debug_bkp_before_draw_count =
debug_get_num_option("INTEL_DEBUG_BKP_BEFORE_DRAW_COUNT", 0);
intel_debug_bkp_after_draw_count =
debug_get_num_option("INTEL_DEBUG_BKP_AFTER_DRAW_COUNT", 0);
if (!(intel_simd & DEBUG_FS_SIMD))
intel_simd |= DEBUG_FS_SIMD;

View file

@ -94,6 +94,7 @@ extern uint64_t intel_debug;
#define DEBUG_HEAPS (1ull << 46)
#define DEBUG_ISL (1ull << 47)
#define DEBUG_SPARSE (1ull << 48)
#define DEBUG_DRAW_BKP (1ull << 49)
#define DEBUG_ANY (~0ull)
@ -106,6 +107,8 @@ extern uint64_t intel_debug;
DEBUG_SPILL_VEC4 | DEBUG_NO_COMPACTION | DEBUG_DO32 | DEBUG_SOFT64)
extern uint64_t intel_simd;
extern uint32_t intel_debug_bkp_before_draw_count;
extern uint32_t intel_debug_bkp_after_draw_count;
#define INTEL_SIMD(type, size) (!!(intel_simd & (DEBUG_ ## type ## _SIMD ## size)))