Vulkan.NET icon indicating copy to clipboard operation
Vulkan.NET copied to clipboard

Missing VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT

Open tourist1584970446 opened this issue 7 months ago • 0 comments

It knows VkSurfaceFullScreenExclusiveWin32InfoEXT but it does not have VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT in VkStructures?

see https://registry.khronos.org/vulkan/specs/latest/man/html/VkStructureType.html

 // Provided by VK_KHR_win32_surface with VK_EXT_full_screen_exclusive
VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT = 1000255001,

At first I thought the problem was that it's not handling enums that don't provide a value, only an offset. But you already seem to be handling that.

<extension name="VK_EXT_full_screen_exclusive" number="256" type="device" author="EXT" depends="(VK_KHR_get_physical_device_properties2,VK_VERSION_1_1)+VK_KHR_surface+VK_KHR_get_surface_capabilities2+VK_KHR_swapchain" platform="win32" contact="James Jones @cubanismo" supported="vulkan" ratified="vulkan" nofeatures="true">
            <require>
                <enum value="4"                                             name="VK_EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION"/>
                <enum value="&quot;VK_EXT_full_screen_exclusive&quot;"      name="VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME"/>
                <enum offset="0" extends="VkStructureType"                  name="VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT"/>
                <enum offset="2" extends="VkStructureType"                  name="VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT"/>
                <enum offset="0" extends="VkResult" dir="-"                 name="VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT"/>
                <type name="VkFullScreenExclusiveEXT"/>
                <type name="VkSurfaceFullScreenExclusiveInfoEXT"/>
                <type name="VkSurfaceCapabilitiesFullScreenExclusiveEXT"/>
                <command name="vkGetPhysicalDeviceSurfacePresentModes2EXT"/>
                <command name="vkAcquireFullScreenExclusiveModeEXT"/>
                <command name="vkReleaseFullScreenExclusiveModeEXT"/>
            </require>
            <require depends="VK_KHR_win32_surface">
                <enum offset="1" extends="VkStructureType"                  name="VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT"/>
                <type name="VkSurfaceFullScreenExclusiveWin32InfoEXT"/>
            </require>
            <require depends="VK_KHR_device_group,VK_VERSION_1_1">
                <command name="vkGetDeviceGroupSurfacePresentModes2EXT"/>
            </require>
        </extension>

Your code to handle these:

        public static ExtensionDefinition FromXML(XElement elem)
        {
            ExtensionDefinition extension = new ExtensionDefinition();
            extension.Name = elem.Attribute("name").Value;
            extension.Number = int.Parse(elem.Attribute("number").Value);
            extension.Type = elem.Attribute("type")?.Value;
            extension.Requires = elem.Attribute("requires")?.Value.Split(',');
            extension.Author = elem.Attribute("author")?.Value;
            extension.Contact = elem.Attribute("contact")?.Value;
            extension.Platform = elem.Attribute("platform")?.Value;
            extension.Supported = elem.Attribute("supported")?.Value;
            extension.IsProvisional = elem.Attribute("provisional")?.Value == "true";
            extension.Comment = elem.Attribute("comment")?.Value;
            string sortString = elem.Attribute("sortorder")?.Value;
            if (sortString != null)
            {
                extension.SortOrder = int.Parse(sortString);
            }

            var requires = elem.Element("require"); // <!-- problem is here, you are not processing the other require elements when there are multiplke.
            if (requires != null)
            {
                var enums = requires.Elements("enum");
                foreach (var e in enums)
                {

Added pull request

tourist1584970446 avatar Jun 08 '25 17:06 tourist1584970446