radv: limit the Vulkan version to 1.1 for Android
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 11 May 2020 08:52:18 +0000 (10:52 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 12 May 2020 08:29:44 +0000 (10:29 +0200)
Vulkan 1.2 seems rejected. This hardcodes the Android version to
1.1.107.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2936
Fixes: 7f5462e349a ("radv: enable Vulkan 1.2")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4985>

src/amd/vulkan/radv_extensions.py

index f181c1333649eb3f07fec4b62855f43ab6958491..4ea75a10d57ba637cdf98985cb151d7fab1f0967 100644 (file)
@@ -452,8 +452,13 @@ 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)
-        version = ${MAX_API_VERSION.c_vk_version()};
+    if (dev->rad_info.has_syncobj_wait_for_submit) {
+        if (ANDROID) {
+            version = VK_MAKE_VERSION(1, 1, 107);
+        } else {
+            version = ${MAX_API_VERSION.c_vk_version()};
+        }
+    }
 
     return override ? MIN2(override, version) : version;
 }