diff options
author | Samuel Pitoiset <[email protected]> | 2018-09-26 11:10:58 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2018-09-28 09:08:44 +0200 |
commit | 621e70dd4004f009108337ca0a6c2b990cc4415f (patch) | |
tree | 3acdfa6545efb74fef4b1e48c63b200176436eac | |
parent | 5d6a560a2986c9ab421b3c7904d29bb7bc35e36f (diff) |
radv: adjust the CmdUpdateBuffer threshold for optimal performance
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 <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
-rw-r--r-- | src/amd/vulkan/radv_meta_buffer.c | 2 | ||||
-rw-r--r-- | src/amd/vulkan/radv_private.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_meta_buffer.c b/src/amd/vulkan/radv_meta_buffer.c index f1887e33183..8726d36f5fa 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 a649835959d..15a66bdc1b1 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, |