venus: implement vn_buffer_get_max_buffer_size
authorYiwei Zhang <zzyiwei@chromium.org>
Mon, 18 Oct 2021 18:03:11 +0000 (18:03 +0000)
committerMarge Bot <eric+marge@anholt.net>
Thu, 28 Oct 2021 00:23:14 +0000 (00:23 +0000)
commita74f2495ca07bb536e8f1caaa8c2a4ed36c10d67
treedb4ddad2dce65b41dab3eda75985015dc36b0ff7
parent13f2e50aee42ff20e4bcf7e40a4b6047d7394096
venus: implement vn_buffer_get_max_buffer_size

This change estimates the max_buffer_size with quick sort. Try to
avoid some traffic upon device creation time, but not worth adding a
buffer simple create api to avoid the extra requirement query traffic
since this is temporary.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13428>
src/virtio/vulkan/vn_buffer.c