venus: add VN_PERF option no_async_buffer_create

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16110>
This commit is contained in:
Yiwei Zhang 2022-04-22 21:47:38 +00:00 committed by Marge Bot
parent f0bfd8afe2
commit 0fc36b11ab
3 changed files with 5 additions and 0 deletions

View File

@ -197,6 +197,9 @@ vn_buffer_cache_get_memory_requirements(
const VkBufferCreateInfo *create_info, const VkBufferCreateInfo *create_info,
struct vn_buffer_memory_requirements *out) struct vn_buffer_memory_requirements *out)
{ {
if (VN_PERF(NO_ASYNC_BUFFER_CREATE))
return false;
if (create_info->size > cache->max_buffer_size) if (create_info->size > cache->max_buffer_size)
return false; return false;

View File

@ -29,6 +29,7 @@ static const struct debug_control vn_debug_options[] = {
static const struct debug_control vn_perf_options[] = { static const struct debug_control vn_perf_options[] = {
{ "no_async_set_alloc", VN_PERF_NO_ASYNC_SET_ALLOC }, { "no_async_set_alloc", VN_PERF_NO_ASYNC_SET_ALLOC },
{ "no_async_buffer_create", VN_PERF_NO_ASYNC_BUFFER_CREATE },
{ NULL, 0 }, { NULL, 0 },
}; };

View File

@ -144,6 +144,7 @@ enum vn_debug {
enum vn_perf { enum vn_perf {
VN_PERF_NO_ASYNC_SET_ALLOC = 1ull << 0, VN_PERF_NO_ASYNC_SET_ALLOC = 1ull << 0,
VN_PERF_NO_ASYNC_BUFFER_CREATE = 1ull << 1,
}; };
typedef uint64_t vn_object_id; typedef uint64_t vn_object_id;