diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index 5352fe38..45a24b0f 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -76,6 +76,14 @@ static const char * const required_device_extensions[] = VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME, }; +/* In general we don't want to enable Vulkan beta extensions, but make an + * exception for VK_KHR_portability_subset because we draw no real feature from + * it, but it's still useful to be able to develop for MoltenVK without being + * spammed with validation errors. */ +#ifndef VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME +#define VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME "VK_KHR_portability_subset" +#endif + static const struct vkd3d_optional_extension_info optional_device_extensions[] = { /* KHR extensions */ @@ -85,6 +93,7 @@ static const struct vkd3d_optional_extension_info optional_device_extensions[] = VK_EXTENSION(KHR_IMAGE_FORMAT_LIST, KHR_image_format_list), VK_EXTENSION(KHR_MAINTENANCE2, KHR_maintenance2), VK_EXTENSION(KHR_MAINTENANCE3, KHR_maintenance3), + VK_EXTENSION(KHR_PORTABILITY_SUBSET, KHR_portability_subset), VK_EXTENSION(KHR_PUSH_DESCRIPTOR, KHR_push_descriptor), VK_EXTENSION(KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE, KHR_sampler_mirror_clamp_to_edge), VK_EXTENSION(KHR_TIMELINE_SEMAPHORE, KHR_timeline_semaphore), diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 84bdee92..09bbc29a 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -123,6 +123,7 @@ struct vkd3d_vulkan_info bool KHR_image_format_list; bool KHR_maintenance2; bool KHR_maintenance3; + bool KHR_portability_subset; bool KHR_push_descriptor; bool KHR_sampler_mirror_clamp_to_edge; bool KHR_timeline_semaphore;