diff options
author | Samuel Pitoiset <[email protected]> | 2020-02-18 08:30:46 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2020-02-28 08:11:02 +0100 |
commit | b3ef07db96d181323524788b0ffe0919ec376567 (patch) | |
tree | 62c4735e27c12cca04f7cbcbd256ad027883062d /src/amd/vulkan | |
parent | 768d4f0551e38bd688e3e551d5276ceff5d2316b (diff) |
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 <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3900>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r-- | src/amd/vulkan/radv_cmd_buffer.c | 5 |
1 files changed, 5 insertions, 0 deletions
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)); |