diff options
author | Samuel Pitoiset <[email protected]> | 2018-07-03 12:43:41 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2018-07-09 13:57:01 +0200 |
commit | e8f82b33fbb572dea1c5b645ea3520915061cddc (patch) | |
tree | 7abf6c5611ae56c799c00534cc91e5a020945028 /src/amd | |
parent | 5e5a28d52a8068419ec795843777048236b36bcf (diff) |
radv: add the trace BO to the list when starting a new cmdbuf
That might reduce CPU overhead a little bit when using
RADV_TRACE_FILE.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/vulkan/radv_cmd_buffer.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 4c4ad21288f..9da42fe03e9 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -446,7 +446,6 @@ void radv_cmd_buffer_trace_emit(struct radv_cmd_buffer *cmd_buffer) MAYBE_UNUSED unsigned cdw_max = radeon_check_space(cmd_buffer->device->ws, cmd_buffer->cs, 7); ++cmd_buffer->state.trace_id; - radv_cs_add_buffer(device->ws, cs, device->trace_bo, 8); radv_emit_write_data_packet(cs, va, 1, &cmd_buffer->state.trace_id); radeon_emit(cs, PKT3(PKT3_NOP, 0, 0)); radeon_emit(cs, AC_ENCODE_TRACE_POINT(cmd_buffer->state.trace_id)); @@ -509,7 +508,6 @@ radv_save_pipeline(struct radv_cmd_buffer *cmd_buffer, data[0] = (uintptr_t)pipeline; data[1] = (uintptr_t)pipeline >> 32; - radv_cs_add_buffer(device->ws, cs, device->trace_bo, 8); radv_emit_write_data_packet(cs, va, 2, data); } @@ -551,7 +549,6 @@ radv_save_descriptors(struct radv_cmd_buffer *cmd_buffer, data[i * 2 + 1] = (uintptr_t)set >> 32; } - radv_cs_add_buffer(device->ws, cs, device->trace_bo, 8); radv_emit_write_data_packet(cs, va, MAX_SETS * 2, data); } @@ -2306,8 +2303,14 @@ VkResult radv_BeginCommandBuffer( radv_cmd_buffer_set_subpass(cmd_buffer, subpass, false); } - if (unlikely(cmd_buffer->device->trace_bo)) + if (unlikely(cmd_buffer->device->trace_bo)) { + struct radv_device *device = cmd_buffer->device; + + radv_cs_add_buffer(device->ws, cmd_buffer->cs, + device->trace_bo, 8); + radv_cmd_buffer_trace_emit(cmd_buffer); + } cmd_buffer->status = RADV_CMD_BUFFER_STATUS_RECORDING; |