diff options
| author | 2024-04-30 19:44:18 +0000 | |
|---|---|---|
| committer | 2024-04-30 19:44:18 +0000 | |
| commit | f4cec08046f669955317dc75fd549a703946c5c0 (patch) | |
| tree | 059802f0124d1b59505f313311d56ec5c0eee40a | |
| parent | f5b12d6aade8fd58522d1cc1216431e49b90be57 (diff) | |
| parent | 3f9eb6d90e46f55efedd769a53c6104d1671971b (diff) | |
Merge "Log insufficient VK API versions in VulkanInterface::init" into main
| -rw-r--r-- | libs/renderengine/skia/VulkanInterface.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/libs/renderengine/skia/VulkanInterface.cpp b/libs/renderengine/skia/VulkanInterface.cpp index 21d553cbcb..fc16c5626d 100644 --- a/libs/renderengine/skia/VulkanInterface.cpp +++ b/libs/renderengine/skia/VulkanInterface.cpp @@ -244,7 +244,9 @@ void VulkanInterface::init(bool protectedContent) { VK_CHECK(vkEnumerateInstanceVersion(&instanceVersion)); if (instanceVersion < VK_MAKE_VERSION(1, 1, 0)) { - return; + BAIL("Vulkan instance API version %" PRIu32 ".%" PRIu32 ".%" PRIu32 " < 1.1.0", + VK_VERSION_MAJOR(instanceVersion), VK_VERSION_MINOR(instanceVersion), + VK_VERSION_PATCH(instanceVersion)); } const VkApplicationInfo appInfo = { @@ -323,8 +325,11 @@ void VulkanInterface::init(bool protectedContent) { } vkGetPhysicalDeviceProperties2(physicalDevice, &physDevProps); - if (physDevProps.properties.apiVersion < VK_MAKE_VERSION(1, 1, 0)) { - BAIL("Could not find a Vulkan 1.1+ physical device"); + const uint32_t physicalDeviceApiVersion = physDevProps.properties.apiVersion; + if (physicalDeviceApiVersion < VK_MAKE_VERSION(1, 1, 0)) { + BAIL("Vulkan physical device API version %" PRIu32 ".%" PRIu32 ".%" PRIu32 " < 1.1.0", + VK_VERSION_MAJOR(physicalDeviceApiVersion), VK_VERSION_MINOR(physicalDeviceApiVersion), + VK_VERSION_PATCH(physicalDeviceApiVersion)); } // Check for syncfd support. Bail if we cannot both import and export them. @@ -539,7 +544,7 @@ void VulkanInterface::init(bool protectedContent) { mDevice = device; mQueue = graphicsQueue; mQueueIndex = graphicsQueueIndex; - mApiVersion = physDevProps.properties.apiVersion; + mApiVersion = physicalDeviceApiVersion; // grExtensions already constructed // feature pointers already constructed mGrGetProc = sGetProc; |