[Mesa-dev] [PATCH 2/2] radv: add the trace BO to the list when starting a new cmdbuf
Dieter Nützel
Dieter at nuetzel-hh.de
Thu Jul 5 02:22:17 UTC 2018
This series bring the anomaly back,
that 'ondemand' is _faster_ than 'performance':
cpupower frequency-set -g ondemand
/home/dieter> smoketest
5905 presents in 5.00014 seconds (FPS: 1180.97)
6101 presents in 5.00115 seconds (FPS: 1219.92)
6020 presents in 5.00038 seconds (FPS: 1203.91)
6021 presents in 5.0002 seconds (FPS: 1204.15)
6005 presents in 5.00013 seconds (FPS: 1200.97)
6023 presents in 5.00005 seconds (FPS: 1204.59)
frames:41278, elapsedms:34411
cpupower frequency-set -g performance
/home/dieter> smoketest
5326 presents in 5.00078 seconds (FPS: 1065.03)
5532 presents in 5.00023 seconds (FPS: 1106.35)
5487 presents in 5.0009 seconds (FPS: 1097.2)
5516 presents in 5.00014 seconds (FPS: 1103.17)
5516 presents in 5.00082 seconds (FPS: 1103.02)
frames:31385, elapsedms:28709
I saw this with and without Dave's TLS patch set.
Apart from that:
Tested-by: Dieter Nützel <Dieter at nuetzel-hh.de>
Dieter
Am 03.07.2018 12:43, schrieb Samuel Pitoiset:
> That might reduce CPU overhead a little bit when using
> RADV_TRACE_FILE.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/amd/vulkan/radv_cmd_buffer.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/src/amd/vulkan/radv_cmd_buffer.c
> b/src/amd/vulkan/radv_cmd_buffer.c
> index 26d9fef314..0a7a3f3fa9 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);
> }
>
> @@ -2300,8 +2297,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;
More information about the mesa-dev
mailing list