[Mesa-dev] [PATCH 2/2] radv: Add more trace points.

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Wed Apr 12 22:09:57 UTC 2017


Most trace points happen after an operation, so add a trace point
at the start of the command buffer.

Furthermore, add one after a CmdUpdateBuffer using CP_DMA as that
didn't emit one yet.

Signed-off-by: Bas Nieuwenhuizen <basni at google.com>
---
 src/amd/vulkan/radv_cmd_buffer.c  | 1 +
 src/amd/vulkan/radv_meta_buffer.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index dbe8bf136c6..377d388a25b 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -1830,6 +1830,7 @@ VkResult radv_BeginCommandBuffer(
 		radv_cmd_buffer_set_subpass(cmd_buffer, subpass, false);
 	}
 
+	radv_cmd_buffer_trace_emit(cmd_buffer);
 	return VK_SUCCESS;
 }
 
diff --git a/src/amd/vulkan/radv_meta_buffer.c b/src/amd/vulkan/radv_meta_buffer.c
index cfa0b9320e2..cb13f2f288f 100644
--- a/src/amd/vulkan/radv_meta_buffer.c
+++ b/src/amd/vulkan/radv_meta_buffer.c
@@ -541,6 +541,8 @@ void radv_CmdUpdateBuffer(
 		radeon_emit(cmd_buffer->cs, va);
 		radeon_emit(cmd_buffer->cs, va >> 32);
 		radeon_emit_array(cmd_buffer->cs, pData, words);
+
+		radv_cmd_buffer_trace_emit(cmd_buffer);
 	} else {
 		uint32_t buf_offset;
 		radv_cmd_buffer_upload_data(cmd_buffer, dataSize, 32, pData, &buf_offset);
-- 
2.12.2



More information about the mesa-dev mailing list