From e01d4c8ff248804b798df130951434ca49015ee5 Mon Sep 17 00:00:00 2001
From: Ethan Lee <[EMAIL REDACTED]>
Date: Wed, 18 Nov 2026 14:58:53 -0500
Subject: [PATCH] gpu: Add a warning log when skipping non-conformant Vulkan
devices
---
src/gpu/vulkan/SDL_gpu_vulkan.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/gpu/vulkan/SDL_gpu_vulkan.c b/src/gpu/vulkan/SDL_gpu_vulkan.c
index fd25d2c520b43..117f33c49deaf 100644
--- a/src/gpu/vulkan/SDL_gpu_vulkan.c
+++ b/src/gpu/vulkan/SDL_gpu_vulkan.c
@@ -12121,8 +12121,8 @@ static bool VULKAN_INTERNAL_GetDeviceRank(
bool isConformant;
VkPhysicalDeviceType deviceType;
+ VkPhysicalDeviceProperties2KHR physicalDeviceProperties;
if (physicalDeviceExtensions->KHR_driver_properties || physicalDeviceExtensions->MSFT_layered_driver) {
- VkPhysicalDeviceProperties2KHR physicalDeviceProperties;
VkPhysicalDeviceDriverPropertiesKHR physicalDeviceDriverProperties = { 0 };
VkPhysicalDeviceLayeredDriverPropertiesMSFT physicalDeviceLayeredDriverProperties = { 0 };
void** ppNext = &physicalDeviceProperties.pNext;
@@ -12172,11 +12172,10 @@ static bool VULKAN_INTERNAL_GetDeviceRank(
deviceType = physicalDeviceProperties.properties.deviceType;
}
} else {
- VkPhysicalDeviceProperties physicalDeviceProperties;
renderer->vkGetPhysicalDeviceProperties(
physicalDevice,
- &physicalDeviceProperties);
- deviceType = physicalDeviceProperties.deviceType;
+ &physicalDeviceProperties.properties);
+ deviceType = physicalDeviceProperties.properties.deviceType;
isConformant = true; // We can't check this, so just assume it's conformant
}
@@ -12195,6 +12194,7 @@ static bool VULKAN_INTERNAL_GetDeviceRank(
* -flibit
*/
if (!isConformant) {
+ SDL_LogWarn(SDL_LOG_CATEGORY_GPU, "Device %s is not Vulkan-conformant, skipping", physicalDeviceProperties.properties.deviceName);
return 0;
}