venus: add no_sparse debug option to disable sparse resource support

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24877>
This commit is contained in:
Yiwei Zhang
2023-08-24 14:56:02 -07:00
committed by Marge Bot
parent d3e796da6b
commit 0d4df682b9
3 changed files with 4 additions and 1 deletions

View File

@@ -32,6 +32,7 @@ static const struct debug_control vn_debug_options[] = {
{ "no_abort", VN_DEBUG_NO_ABORT }, { "no_abort", VN_DEBUG_NO_ABORT },
{ "log_ctx_info", VN_DEBUG_LOG_CTX_INFO }, { "log_ctx_info", VN_DEBUG_LOG_CTX_INFO },
{ "cache", VN_DEBUG_CACHE }, { "cache", VN_DEBUG_CACHE },
{ "no_sparse", VN_DEBUG_NO_SPARSE },
{ NULL, 0 }, { NULL, 0 },
/* clang-format on */ /* clang-format on */
}; };

View File

@@ -104,6 +104,7 @@ enum vn_debug {
VN_DEBUG_NO_ABORT = 1ull << 4, VN_DEBUG_NO_ABORT = 1ull << 4,
VN_DEBUG_LOG_CTX_INFO = 1ull << 5, VN_DEBUG_LOG_CTX_INFO = 1ull << 5,
VN_DEBUG_CACHE = 1ull << 6, VN_DEBUG_CACHE = 1ull << 6,
VN_DEBUG_NO_SPARSE = 1ull << 7,
}; };
enum vn_perf { enum vn_perf {

View File

@@ -795,7 +795,8 @@ vn_physical_device_init_queue_family_properties(
} }
} }
if (sparse_count && non_sparse_only_count + sparse_count == count) if (VN_DEBUG(NO_SPARSE) ||
(sparse_count && non_sparse_only_count + sparse_count == count))
physical_dev->sparse_binding_disabled = true; physical_dev->sparse_binding_disabled = true;
physical_dev->queue_family_properties = props; physical_dev->queue_family_properties = props;