Commit bb953de9 authored by Eleni Maria Stea's avatar Eleni Maria Stea Committed by Samuel Iglesias Gonsálvez
Browse files

radv: consider MESA_VK_VERSION_OVERRIDE when setting the api version



Before setting the physical device API version, we should check if the
MESA_VK_VERSION_OVERRIDE environment variable is set and take it into
account.
Reviewed-by: Bas Nieuwenhuizen's avatarBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset's avatarSamuel Pitoiset <samuel.pitoiset@gmail.com>
parent 9dcf90d7
...@@ -335,9 +335,12 @@ VkResult radv_EnumerateInstanceVersion( ...@@ -335,9 +335,12 @@ VkResult radv_EnumerateInstanceVersion(
uint32_t uint32_t
radv_physical_device_api_version(struct radv_physical_device *dev) radv_physical_device_api_version(struct radv_physical_device *dev)
{ {
uint32_t override = vk_get_version_override();
uint32_t version = VK_MAKE_VERSION(1, 0, 68);
if (dev->rad_info.has_syncobj_wait_for_submit) if (dev->rad_info.has_syncobj_wait_for_submit)
return ${MAX_API_VERSION.c_vk_version()}; version = ${MAX_API_VERSION.c_vk_version()};
return VK_MAKE_VERSION(1, 0, 68);
return override ? MIN2(override, version) : version;
} }
""") """)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment