51906c33
by Francisco Casas at 2026-06-02T20:46:30+02:00
win32u: Enable VK_KHR_external_fence_capabilities in d3dkmt_init_vulkan().
The win32u dll provides NtGdiDdDDIOpenAdapterFromLUID(), which
internally uses get_vulkan_physical_device(), which initializes
the VkPhysicalDeviceIDProperties struct.
This struct is provided by the following extensions:
VK_KHR_external_fence_capabilities, VK_KHR_external_memory_capabilities,
VK_KHR_external_semaphore_capabilities.
However with VK_KHR_external_memory_capabilities we get the following
validation error, which is presumably a bug in the validation layer:
VUID-VkPhysicalDeviceProperties2-pNext-pNext(ERROR
/ SPEC): msgNum: -579609649 - Validation Error: [
VUID-VkPhysicalDeviceProperties2-pNext-pNext ] Object 0:
handle = 0x5555673b5820, type = VK_OBJECT_TYPE_INSTANCE; |
MessageID = 0xdd73dbcf | vkGetPhysicalDeviceProperties2KHR():
pProperties->pNext includes a pointer to a VkStructureType
(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES), but
its parent extension VK_KHR_external_fence_capabilities
has not been enabled. The Vulkan spec states: Each pNext
member of any structure (including this one) in the pNext
chain must be either NULL or a pointer to a valid instance
of VkPhysicalDeviceAccelerationStructurePropertiesKHR,
[...] , or VkPhysicalDeviceVulkan13Properties
(https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/v
kspec.html#VUID-VkPhysicalDeviceProperties2-pNext-pNext)
For this reason we replace VK_KHR_external_memory_capabilities with
VK_KHR_external_fence_capabilities.
ccdaa2b5
by Francisco Casas at 2026-06-02T20:46:39+02:00
wined3d: Enable VK_KHR_external_fence_capabilities when initializing vulkan.
Currently, the vulkan validation layers emit an error for using
VkPhysicalDeviceIDProperties when using VK_API_VERSION_1_0 without
importing any of the instance extensions that implement it, which are
VK_KHR_external_fence_capabilities, VK_KHR_external_memory_capabilities,
and VK_KHR_external_semaphore_capabilities.
VK_KHR_external_memory_capabilities (instance extension) should not be
confused with VK_KHR_external_memory (device extension), this is a
mistake in the current code.
Regardless of this, replacing with VK_KHR_external_memory_capabilities
doesn't fix the error since it seems that there is a bug in the vulkan
validation layer as well, so VK_KHR_external_fence_capabilities is
initialized instead.
This is only needed for VK_API_VERSION_1_0, since it the missing struct
is part of the core functionalities in VK_API_VERSION_1_1.
Fixes: 035dc483881225fb8181f5e4ad85d05ba5c3b989