Hide VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME for non MoltenVK

VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME is a provisional extension
and must be used with caution.

https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_portability_subset.html
This commit is contained in:
Denis Pauk 2022-07-23 14:41:51 +03:00
parent 8ca794ab68
commit dcb6e9f7d0
2 changed files with 5 additions and 5 deletions

View file

@ -1752,7 +1752,7 @@ qboolean QVk_Init(void)
if (vk_validation->value)
extCount++;
#if defined(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME)
#if defined(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME) && defined(__APPLE__)
extCount++;
#endif
@ -1772,7 +1772,7 @@ qboolean QVk_Init(void)
wantedExtensions[extCount - 1] = VK_EXT_DEBUG_UTILS_EXTENSION_NAME;
}
#if defined(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME)
#if defined(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME) && defined(__APPLE__)
extCount++;
wantedExtensions[extCount - 1] = VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME;
#endif
@ -1789,7 +1789,7 @@ qboolean QVk_Init(void)
.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
.pNext = NULL,
.pApplicationInfo = &appInfo,
#if defined(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME)
#if defined(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME) && defined(__APPLE__)
.flags = VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR,
#endif
.enabledLayerCount = 0,

View file

@ -80,7 +80,7 @@ static void getBestPhysicalDevice(const VkPhysicalDevice *devices, int preferred
// no required extensions? try next device
continue;
#if defined(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME)
#if defined(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME) && defined(__APPLE__)
if (!deviceExtensionsSupported(&devices[i], VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME))
continue;
#endif
@ -237,7 +237,7 @@ static VkResult createLogicalDevice()
const char *deviceExtensions[] = {
VK_KHR_SWAPCHAIN_EXTENSION_NAME,
#if defined(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME)
#if defined(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME) && defined(__APPLE__)
VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME,
#endif
};