summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_extensions.py
diff options
context:
space:
mode:
authorEleni Maria Stea <[email protected]>2019-04-29 09:00:17 +0200
committerSamuel Iglesias Gonsálvez <[email protected]>2019-04-29 09:00:51 +0200
commitbb953de96c769618db649b0bb735a5cce3934460 (patch)
tree6cd24b4b5ceaec25b5f3e23f39e5496a8588d4b2 /src/amd/vulkan/radv_extensions.py
parent9dcf90d7ba966cba904266209087a87ea9c018b9 (diff)
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 <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_extensions.py')
-rw-r--r--src/amd/vulkan/radv_extensions.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_extensions.py b/src/amd/vulkan/radv_extensions.py
index d56d64b2dcb..23e76bfcc11 100644
--- a/src/amd/vulkan/radv_extensions.py
+++ b/src/amd/vulkan/radv_extensions.py
@@ -335,9 +335,12 @@ VkResult radv_EnumerateInstanceVersion(
uint32_t
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)
- return ${MAX_API_VERSION.c_vk_version()};
- return VK_MAKE_VERSION(1, 0, 68);
+ version = ${MAX_API_VERSION.c_vk_version()};
+
+ return override ? MIN2(override, version) : version;
}
""")