diff --git a/src/vk/vk_common.c b/src/vk/vk_common.c index daa094c..0afd47a 100644 --- a/src/vk/vk_common.c +++ b/src/vk/vk_common.c @@ -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, diff --git a/src/vk/vk_device.c b/src/vk/vk_device.c index 0252343..7b4a372 100644 --- a/src/vk/vk_device.c +++ b/src/vk/vk_device.c @@ -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 };