anv: Enable INTEL_DEBUG_BATCH_FRAME_START/_STOP
authorFelix DeGrood <felix.j.degrood@intel.com>
Mon, 24 Apr 2023 21:00:56 +0000 (21:00 +0000)
committerFelix Degrood <felix.j.degrood@intel.com>
Fri, 28 Apr 2023 04:37:05 +0000 (04:37 +0000)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22564>

src/intel/vulkan/anv_batch_chain.c

index 88254a0..d4793d2 100644 (file)
@@ -1167,8 +1167,13 @@ anv_cmd_buffer_exec_batch_debug(struct anv_queue *queue,
    struct anv_device *device = queue->device;
    const bool has_perf_query = perf_query_pool && perf_query_pass >= 0 &&
                                cmd_buffer_count;
+   uint64_t frame_id = device->debug_frame_desc->frame_id;
+
+   if (!intel_debug_batch_in_range(device->debug_frame_desc->frame_id))
+      return;
+   fprintf(stderr, "Batch for frame %"PRIu64" on queue %d\n",
+      frame_id, (int)(queue - device->queues));
 
-   fprintf(stderr, "Batch on queue %d\n", (int)(queue - device->queues));
    if (cmd_buffer_count) {
       if (has_perf_query) {
          struct anv_bo *pass_batch_bo = perf_query_pool->bo;
@@ -1384,7 +1389,8 @@ anv_queue_submit_simple_batch(struct anv_queue *queue,
       intel_flush_range(batch_bo->map, batch_size);
 #endif
 
-   if (INTEL_DEBUG(DEBUG_BATCH)) {
+   if (INTEL_DEBUG(DEBUG_BATCH) &&
+       intel_debug_batch_in_range(device->debug_frame_desc->frame_id)) {
       intel_print_batch(queue->decoder,
                         batch_bo->map,
                         batch_bo->size,