venus: add VN_PERF_NO_MEMORY_SUBALLOC

Make it easier for memory alignment debugging.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19830>
This commit is contained in:
Yiwei Zhang
2022-11-17 21:37:13 +00:00
committed by Marge Bot
parent bda80458f9
commit ea7c2d3d94
3 changed files with 5 additions and 0 deletions
+1
View File
@@ -38,6 +38,7 @@ static const struct debug_control vn_perf_options[] = {
{ "no_async_queue_submit", VN_PERF_NO_ASYNC_QUEUE_SUBMIT },
{ "no_event_feedback", VN_PERF_NO_EVENT_FEEDBACK },
{ "no_fence_feedback", VN_PERF_NO_FENCE_FEEDBACK },
{ "no_memory_suballoc", VN_PERF_NO_MEMORY_SUBALLOC },
{ NULL, 0 },
/* clang-format on */
};
+1
View File
@@ -109,6 +109,7 @@ enum vn_perf {
VN_PERF_NO_ASYNC_QUEUE_SUBMIT = 1ull << 2,
VN_PERF_NO_EVENT_FEEDBACK = 1ull << 3,
VN_PERF_NO_FENCE_FEEDBACK = 1ull << 4,
VN_PERF_NO_MEMORY_SUBALLOC = 1ull << 5,
};
typedef uint64_t vn_object_id;
+3
View File
@@ -196,6 +196,9 @@ vn_device_memory_should_suballocate(const struct vn_device *dev,
const struct vn_instance *instance = dev->physical_device->instance;
const struct vn_renderer_info *renderer = &instance->renderer->info;
if (VN_PERF(NO_MEMORY_SUBALLOC))
return false;
if (renderer->has_guest_vram)
return false;