Promote Vulkan min version check from debug --> fatal * If a client is attempting to use Skia/Vulkan and is not using the minimum supported driver version (currently 1.1+ for graphite and ganesh), we should fatally abort rather than just having a debug message. Change-Id: Ifb5ffc2bbd9d5ecc70a46ee32615491570720ceb Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1018796 Auto-Submit: Nicolette Prevost <nicolettep@google.com> Reviewed-by: Thomas Smith <thomsmit@google.com> Commit-Queue: Nicolette Prevost <nicolettep@google.com>
diff --git a/src/gpu/vk/VulkanUtilsPriv.cpp b/src/gpu/vk/VulkanUtilsPriv.cpp index fb009d1..af6aeef 100644 --- a/src/gpu/vk/VulkanUtilsPriv.cpp +++ b/src/gpu/vk/VulkanUtilsPriv.cpp
@@ -9,6 +9,7 @@ #include "include/core/SkStream.h" #include "include/gpu/vk/VulkanBackendContext.h" +#include "include/private/base/SkAssert.h" #include "include/private/base/SkDebug.h" #include "include/private/base/SkTFitsIn.h" #include "include/private/base/SkTo.h" @@ -470,7 +471,7 @@ physDevVersion = std::min(physDevVersion, apiVersion); if (instanceVersion < VK_API_VERSION_1_1 || physDevVersion < VK_API_VERSION_1_1) { - SkDebugf("Vulkan 1.1 is required but not available. " + SK_ABORT("Vulkan 1.1 is required but not available. " "Instance version: %#08X, Device version: %#08X", instanceVersion, physDevVersion); return nullptr;
diff --git a/tests/VkPriorityExtensionTest.cpp b/tests/VkPriorityExtensionTest.cpp index 2888964..7833814 100644 --- a/tests/VkPriorityExtensionTest.cpp +++ b/tests/VkPriorityExtensionTest.cpp
@@ -229,8 +229,7 @@ VkPhysicalDeviceFeatures deviceFeatures; grVkGetPhysicalDeviceFeatures(physDev, &deviceFeatures); - // this looks like it would slow things down, - // and we can't depend on it on all platforms + // This looks like it would slow things down and we can't depend on it on all platforms. deviceFeatures.robustBufferAccess = VK_FALSE; float queuePriorities[1] = { 0.0 };