venus: add VN_PERF option no_async_buffer_create
authorYiwei Zhang <zzyiwei@chromium.org>
Fri, 22 Apr 2022 21:47:38 +0000 (21:47 +0000)
committerMarge Bot <emma+marge@anholt.net>
Tue, 26 Apr 2022 23:49:59 +0000 (23:49 +0000)
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16110>

src/virtio/vulkan/vn_buffer.c
src/virtio/vulkan/vn_common.c
src/virtio/vulkan/vn_common.h

index 8096a77..2f5d108 100644 (file)
@@ -197,6 +197,9 @@ vn_buffer_cache_get_memory_requirements(
    const VkBufferCreateInfo *create_info,
    struct vn_buffer_memory_requirements *out)
 {
+   if (VN_PERF(NO_ASYNC_BUFFER_CREATE))
+      return false;
+
    if (create_info->size > cache->max_buffer_size)
       return false;
 
index 59792f4..24365c0 100644 (file)
@@ -29,6 +29,7 @@ static const struct debug_control vn_debug_options[] = {
 
 static const struct debug_control vn_perf_options[] = {
    { "no_async_set_alloc", VN_PERF_NO_ASYNC_SET_ALLOC },
+   { "no_async_buffer_create", VN_PERF_NO_ASYNC_BUFFER_CREATE },
    { NULL, 0 },
 };
 
index 39e6488..7fbfafb 100644 (file)
@@ -144,6 +144,7 @@ enum vn_debug {
 
 enum vn_perf {
    VN_PERF_NO_ASYNC_SET_ALLOC = 1ull << 0,
+   VN_PERF_NO_ASYNC_BUFFER_CREATE = 1ull << 1,
 };
 
 typedef uint64_t vn_object_id;