diff --git a/src/intel/dev/intel_debug.c b/src/intel/dev/intel_debug.c index 6277f36b2ac..70f340eb487 100644 --- a/src/intel/dev/intel_debug.c +++ b/src/intel/dev/intel_debug.c @@ -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; diff --git a/src/intel/dev/intel_debug.h b/src/intel/dev/intel_debug.h index 8a2cca432f4..dde6b15f8d0 100644 --- a/src/intel/dev/intel_debug.h +++ b/src/intel/dev/intel_debug.h @@ -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)))