mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-25 12:38:29 +00:00
gpu: Check Vulkan device features for IsDeviceSuitable
This commit is contained in:
@@ -10826,6 +10826,7 @@ static Uint8 VULKAN_INTERNAL_IsDeviceSuitable(
|
|||||||
VkQueueFamilyProperties *queueProps;
|
VkQueueFamilyProperties *queueProps;
|
||||||
bool supportsPresent;
|
bool supportsPresent;
|
||||||
VkPhysicalDeviceProperties deviceProperties;
|
VkPhysicalDeviceProperties deviceProperties;
|
||||||
|
VkPhysicalDeviceFeatures deviceFeatures;
|
||||||
Uint32 i;
|
Uint32 i;
|
||||||
|
|
||||||
const Uint8 *devicePriority = renderer->preferLowPower ? DEVICE_PRIORITY_LOWPOWER : DEVICE_PRIORITY_HIGHPERFORMANCE;
|
const Uint8 *devicePriority = renderer->preferLowPower ? DEVICE_PRIORITY_LOWPOWER : DEVICE_PRIORITY_HIGHPERFORMANCE;
|
||||||
@@ -10852,6 +10853,16 @@ static Uint8 VULKAN_INTERNAL_IsDeviceSuitable(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
renderer->vkGetPhysicalDeviceFeatures(
|
||||||
|
physicalDevice,
|
||||||
|
&deviceFeatures);
|
||||||
|
if (!deviceFeatures.independentBlend ||
|
||||||
|
!deviceFeatures.imageCubeArray ||
|
||||||
|
!deviceFeatures.depthClamp ||
|
||||||
|
!deviceFeatures.shaderClipDistance) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!VULKAN_INTERNAL_CheckDeviceExtensions(
|
if (!VULKAN_INTERNAL_CheckDeviceExtensions(
|
||||||
renderer,
|
renderer,
|
||||||
physicalDevice,
|
physicalDevice,
|
||||||
|
Reference in New Issue
Block a user