vkd3d: Enable VK_KHR_portability_subset if available.

We don't check it, but at least the validation layer does not complain
when using MoltenVK.
This commit is contained in:
Giovanni Mascellani 2024-05-03 23:39:43 +02:00 committed by Henri Verbeet
parent 3254eff328
commit a1a07de8ca
Notes: Henri Verbeet 2024-06-14 00:05:12 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/850
2 changed files with 10 additions and 0 deletions

View File

@ -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),

View File

@ -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;