From: Samuel Pitoiset Date: Tue, 18 Feb 2020 07:30:46 +0000 (+0100) Subject: radv: emit thread trace markers after every draw/dispatch call X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b3ef07db96d181323524788b0ffe0919ec376567;p=mesa.git radv: emit thread trace markers after every draw/dispatch call Thread trace markers (also called events in Radeon GPU Profiler) should be emitted after every draw/dispatch calls to collect data. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index b4fe37824b1..08c7400e820 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -531,6 +531,11 @@ static void radv_cmd_buffer_after_draw(struct radv_cmd_buffer *cmd_buffer, enum radv_cmd_flush_bits flags) { + if (unlikely(cmd_buffer->device->thread_trace_bo)) { + radeon_emit(cmd_buffer->cs, PKT3(PKT3_EVENT_WRITE, 0, 0)); + radeon_emit(cmd_buffer->cs, EVENT_TYPE(V_028A90_THREAD_TRACE_MARKER) | EVENT_INDEX(0)); + } + if (cmd_buffer->device->instance->debug_flags & RADV_DEBUG_SYNC_SHADERS) { assert(flags & (RADV_CMD_FLAG_PS_PARTIAL_FLUSH | RADV_CMD_FLAG_CS_PARTIAL_FLUSH));