@@ -11384,9 +11384,11 @@ static bool VULKAN_INTERNAL_ValidateOptInFeatures(VulkanRenderer *renderer, VkPh
1138411384{
1138511385 bool supportsAllFeatures = true;
1138611386
11387- if (renderer -> desiredApiVersion < VK_API_VERSION_1_1 ) {
11387+ int minorVersion = VK_API_VERSION_MINOR (renderer -> desiredApiVersion );
11388+
11389+ if (minorVersion < 1 ) {
1138811390 supportsAllFeatures &= VULKAN_INTERNAL_ValidateOptInVulkan10Features (& renderer -> desiredVulkan10DeviceFeatures , vk10Features );
11389- } else if (renderer -> desiredApiVersion < VK_API_VERSION_1_2 ) {
11391+ } else if (minorVersion < 2 ) {
1139011392 // Query device features using the pre-1.2 structures
1139111393 VkPhysicalDevice16BitStorageFeatures storage = { 0 };
1139211394 storage .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES ;
@@ -11549,8 +11551,8 @@ static bool VULKAN_INTERNAL_TryAddDeviceFeatures_Vulkan_12_Or_Later(VkPhysicalDe
1154911551 Uint32 apiVersion ,
1155011552 VkBaseOutStructure * src )
1155111553{
11552- SDL_assert ( apiVersion >= VK_API_VERSION_1_2 );
11553-
11554+ int minorVersion = VK_API_VERSION_MINOR ( apiVersion );
11555+ SDL_assert ( apiVersion >= 2 );
1155411556 bool hasAdded = VULKAN_INTERNAL_TryAddDeviceFeatures_Vulkan_11 (dst10 , dst11 , src );
1155511557 if (!hasAdded ) {
1155611558 switch (src -> sType ) {
@@ -11574,7 +11576,7 @@ static bool VULKAN_INTERNAL_TryAddDeviceFeatures_Vulkan_12_Or_Later(VkPhysicalDe
1157411576
1157511577 case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_3_FEATURES :
1157611578 {
11577- if (apiVersion >= VK_API_VERSION_1_3 ) {
11579+ if (minorVersion >= 3 ) {
1157811580 VkPhysicalDeviceVulkan13Features * newFeatures = (VkPhysicalDeviceVulkan13Features * )src ;
1157911581 VULKAN_INTERNAL_AddDeviceFeatures (& dst13 -> robustImageAccess ,
1158011582 & dst13 -> maintenance4 ,
@@ -11619,9 +11621,10 @@ static bool VULKAN_INTERNAL_AddOptInVulkanOptions(SDL_PropertiesID props, Vulkan
1161911621 & features -> robustBufferAccess );
1162011622 }
1162111623
11622- bool supportsHigherLevelFeatures = renderer -> desiredApiVersion > VK_API_VERSION_1_0 ;
11624+ int minorVersion = VK_API_VERSION_MINOR (renderer -> desiredApiVersion );
11625+ bool supportsHigherLevelFeatures = minorVersion > 0 ;
1162311626 if (supportsHigherLevelFeatures && options -> feature_list ) {
11624- if (renderer -> desiredApiVersion < VK_API_VERSION_1_2 ) {
11627+ if (minorVersion < 2 ) {
1162511628 // Iterate through the entire list and combine all requested features
1162611629 VkBaseOutStructure * nextStructure = (VkBaseOutStructure * )options -> feature_list ;
1162711630 while (nextStructure ) {
0 commit comments