~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/intel/dev/intel_debug.c

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
   { "capture-all", DEBUG_CAPTURE_ALL },
102
102
   { "perf-symbol-names", DEBUG_PERF_SYMBOL_NAMES },
103
103
   { "swsb-stall",  DEBUG_SWSB_STALL },
 
104
   { "heaps",       DEBUG_HEAPS },
 
105
   { "isl",         DEBUG_ISL },
104
106
   { NULL,    0 }
105
107
};
106
108
 
177
179
    DEBUG_MS_SIMD32 | \
178
180
    DEBUG_RT_SIMD32)
179
181
 
 
182
static uint64_t intel_debug_batch_frame_start = 0;
 
183
static uint64_t intel_debug_batch_frame_stop = -1;
 
184
 
180
185
static void
181
186
brw_process_intel_debug_variable_once(void)
182
187
{
183
188
   intel_debug = parse_debug_string(getenv("INTEL_DEBUG"), debug_control);
184
189
   intel_simd = parse_debug_string(getenv("INTEL_SIMD_DEBUG"), simd_control);
 
190
   intel_debug_batch_frame_start =
 
191
      debug_get_num_option("INTEL_DEBUG_BATCH_FRAME_START", 0);
 
192
   intel_debug_batch_frame_stop =
 
193
      debug_get_num_option("INTEL_DEBUG_BATCH_FRAME_STOP", -1);
 
194
 
185
195
 
186
196
   if (!(intel_simd & DEBUG_FS_SIMD))
187
197
      intel_simd |=   DEBUG_FS_SIMD;
326
336
 
327
337
   return NULL;
328
338
}
 
339
 
 
340
/**
 
341
 * Check if in valid frame range for batch dumping
 
342
 */
 
343
bool
 
344
intel_debug_batch_in_range(uint64_t frame_id)
 
345
{
 
346
   return frame_id >= intel_debug_batch_frame_start &&
 
347
          frame_id < intel_debug_batch_frame_stop;
 
348
}