mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-19 01:40:43 +01:00
intel/debug: Control start/stop frame of batch debug
When using INTEL_DEBUG=bat, INTEL_DEBUG_BATCH_FRAME_START and INTEL_DEBUG_BATCH_FRAME_STOP can limit dumping of batches for particular frame ranges. Batch dumps are huge. Smart filtering allows debugging of single frames during game play. Initial commit to debug infrastructure. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22564>
This commit is contained in:
parent
65c3d1869d
commit
015eecde47
2 changed files with 20 additions and 0 deletions
|
|
@ -177,11 +177,19 @@ intel_debug_flag_for_shader_stage(gl_shader_stage stage)
|
|||
DEBUG_MS_SIMD32 | \
|
||||
DEBUG_RT_SIMD32)
|
||||
|
||||
static uint64_t intel_debug_batch_frame_start = 0;
|
||||
static uint64_t intel_debug_batch_frame_stop = -1;
|
||||
|
||||
static void
|
||||
brw_process_intel_debug_variable_once(void)
|
||||
{
|
||||
intel_debug = parse_debug_string(getenv("INTEL_DEBUG"), debug_control);
|
||||
intel_simd = parse_debug_string(getenv("INTEL_SIMD_DEBUG"), simd_control);
|
||||
intel_debug_batch_frame_start =
|
||||
debug_get_num_option("INTEL_DEBUG_BATCH_FRAME_START", 0);
|
||||
intel_debug_batch_frame_stop =
|
||||
debug_get_num_option("INTEL_DEBUG_BATCH_FRAME_STOP", -1);
|
||||
|
||||
|
||||
if (!(intel_simd & DEBUG_FS_SIMD))
|
||||
intel_simd |= DEBUG_FS_SIMD;
|
||||
|
|
@ -326,3 +334,13 @@ intel_debug_get_identifier_block(void *_buffer,
|
|||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if in valid frame range for batch dumping
|
||||
*/
|
||||
bool
|
||||
intel_debug_batch_in_range(uint64_t frame_id)
|
||||
{
|
||||
return frame_id >= intel_debug_batch_frame_start &&
|
||||
frame_id < intel_debug_batch_frame_stop;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -197,6 +197,8 @@ extern void *intel_debug_get_identifier_block(void *buffer,
|
|||
uint32_t buffer_size,
|
||||
enum intel_debug_block_type type);
|
||||
|
||||
bool intel_debug_batch_in_range(uint64_t frame_id);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue