From 61c209095c6926839294a5bc99263b8d88918e2f Mon Sep 17 00:00:00 2001 From: Felix DeGrood Date: Mon, 24 Apr 2023 21:00:56 +0000 Subject: [PATCH] anv: Enable INTEL_DEBUG_BATCH_FRAME_START/_STOP Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/vulkan/anv_batch_chain.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c index 88254a0..d4793d2 100644 --- a/src/intel/vulkan/anv_batch_chain.c +++ b/src/intel/vulkan/anv_batch_chain.c @@ -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, -- 2.7.4