venus: add VN_CS_ENCODER_STORAGE_SHMEM_POOL for VkCommandBuffer
It suballocates from a shmem pool owned by vn_instance. The goals are to speed up shmem allocations for VkCommandBuffer and to reduce the number of BOs. Both are crucial when shmems are HOST3D BOs, because they require roundtrips to the renderer to allocate and they take up KVM memslots. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Ryan Neph <ryanneph@google.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14179>
This commit is contained in:
@@ -561,7 +561,7 @@ vn_AllocateCommandBuffers(VkDevice device,
|
||||
|
||||
cmd->state = VN_COMMAND_BUFFER_STATE_INITIAL;
|
||||
vn_cs_encoder_init(&cmd->cs, dev->instance,
|
||||
VN_CS_ENCODER_STORAGE_SHMEM_ARRAY, 16 * 1024);
|
||||
VN_CS_ENCODER_STORAGE_SHMEM_POOL, 16 * 1024);
|
||||
|
||||
VkCommandBuffer cmd_handle = vn_command_buffer_to_handle(cmd);
|
||||
pCommandBuffers[i] = cmd_handle;
|
||||
|
||||
Reference in New Issue
Block a user