Module: Mesa Branch: main Commit: 7dff232c0944744be8f9bc12c613c91961fc7021 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7dff232c0944744be8f9bc12c613c91961fc7021
Author: Lionel Landwerlin <lionel.g.landwer...@intel.com> Date: Tue Nov 21 15:26:05 2023 +0200 intel/ds: add trace of buffer markers Signed-off-by: Lionel Landwerlin <lionel.g.landwer...@intel.com> Reviewed-by: Kenneth Graunke <kenn...@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14924> --- src/intel/ds/intel_driver_ds.cc | 1 + src/intel/ds/intel_driver_ds.h | 2 +- src/intel/ds/intel_tracepoints.py | 4 ++++ src/intel/vulkan/genX_cmd_buffer.c | 4 ++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/intel/ds/intel_driver_ds.cc b/src/intel/ds/intel_driver_ds.cc index 1b2963b6a20..7be037b70b3 100644 --- a/src/intel/ds/intel_driver_ds.cc +++ b/src/intel/ds/intel_driver_ds.cc @@ -427,6 +427,7 @@ CREATE_DUAL_EVENT_CALLBACK(query_clear_blorp, INTEL_DS_QUEUE_STAGE_INTERNAL_OPS) CREATE_DUAL_EVENT_CALLBACK(query_clear_cs, INTEL_DS_QUEUE_STAGE_INTERNAL_OPS) CREATE_DUAL_EVENT_CALLBACK(query_copy_cs, INTEL_DS_QUEUE_STAGE_INTERNAL_OPS) CREATE_DUAL_EVENT_CALLBACK(query_copy_shader, INTEL_DS_QUEUE_STAGE_INTERNAL_OPS) +CREATE_DUAL_EVENT_CALLBACK(write_buffer_marker, INTEL_DS_QUEUE_STAGE_CMD_BUFFER) CREATE_DUAL_EVENT_CALLBACK(rays, INTEL_DS_QUEUE_STAGE_RT) CREATE_DUAL_EVENT_CALLBACK(as_build, INTEL_DS_QUEUE_STAGE_AS) diff --git a/src/intel/ds/intel_driver_ds.h b/src/intel/ds/intel_driver_ds.h index f66e7872d2b..e629ac8a8f4 100644 --- a/src/intel/ds/intel_driver_ds.h +++ b/src/intel/ds/intel_driver_ds.h @@ -115,7 +115,7 @@ struct intel_ds_device { uint64_t event_id; /* Tracepoint name perfetto identifiers for each of the events. */ - uint64_t tracepoint_iids[64]; + uint64_t tracepoint_iids[96]; /* Protects submissions of u_trace data to trace_context */ simple_mtx_t trace_context_mutex; diff --git a/src/intel/ds/intel_tracepoints.py b/src/intel/ds/intel_tracepoints.py index 96b16dfbcaf..65d6a9bedd9 100644 --- a/src/intel/ds/intel_tracepoints.py +++ b/src/intel/ds/intel_tracepoints.py @@ -118,6 +118,10 @@ def define_tracepoints(args): Arg(type='enum isl_format', name='src_fmt', var='src_fmt', c_format='%s', to_prim_type='isl_format_get_short_name({})'), ]) + # vkCmdWriteBufferMarker*, only for Anv + begin_end_tp('write_buffer_marker', + end_pipelined=False) + # Indirect draw generation, only for Anv begin_end_tp('generate_draws') diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 3c0df045dc9..5c83f09aeef 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -8566,6 +8566,8 @@ genX(CmdWriteBufferMarker2AMD)(VkCommandBuffer commandBuffer, #endif ANV_PIPE_END_OF_PIPE_SYNC_BIT; + trace_intel_begin_write_buffer_marker(&cmd_buffer->trace); + anv_add_pending_pipe_bits(cmd_buffer, bits, "write buffer marker"); genX(cmd_buffer_apply_pipe_flushes)(cmd_buffer); @@ -8581,4 +8583,6 @@ genX(CmdWriteBufferMarker2AMD)(VkCommandBuffer commandBuffer, */ mi_store(&b, mi_mem32(anv_address_add(buffer->address, dstOffset)), mi_imm(marker)); + + trace_intel_end_write_buffer_marker(&cmd_buffer->trace); }