[Mesa-dev] [PATCH] radv: adjust the CmdUpdateBuffer threshold for optimal performance
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Thu Sep 27 06:30:59 UTC 2018
Huh, this even seems an improvement on Raven, at least for "VRAM".
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
On Wed, Sep 26, 2018 at 11:09 AM Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
>
> According to my benchmark results, it appears that we should
> reduce the threshold to 1024.
>
> BEFORE:
> 1 KB: 68.656000 ms
> 2 KB: 118.368000 ms
>
> AFTER:
> 1 KB: 31.760000 ms
> 2 KB: 29.840000 ms
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/amd/vulkan/radv_meta_buffer.c | 2 +-
> src/amd/vulkan/radv_private.h | 2 ++
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/amd/vulkan/radv_meta_buffer.c b/src/amd/vulkan/radv_meta_buffer.c
> index f1887e3318..8726d36f5f 100644
> --- a/src/amd/vulkan/radv_meta_buffer.c
> +++ b/src/amd/vulkan/radv_meta_buffer.c
> @@ -513,7 +513,7 @@ void radv_CmdUpdateBuffer(
> if (!dataSize)
> return;
>
> - if (dataSize < RADV_BUFFER_OPS_CS_THRESHOLD) {
> + if (dataSize < RADV_BUFFER_UPDATE_THRESHOLD) {
> si_emit_cache_flush(cmd_buffer);
>
> radv_cs_add_buffer(cmd_buffer->device->ws, cmd_buffer->cs, dst_buffer->bo);
> diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h
> index a649835959..15a66bdc1b 100644
> --- a/src/amd/vulkan/radv_private.h
> +++ b/src/amd/vulkan/radv_private.h
> @@ -108,6 +108,8 @@ typedef uint32_t xcb_window_t;
> */
> #define RADV_BUFFER_OPS_CS_THRESHOLD 4096
>
> +#define RADV_BUFFER_UPDATE_THRESHOLD 1024
> +
> enum radv_mem_heap {
> RADV_MEM_HEAP_VRAM,
> RADV_MEM_HEAP_VRAM_CPU_ACCESS,
> --
> 2.19.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list