The generated offsets/sizes were wrong on the 64-bit ABI because of three registry-parsing bugs, which silently broke any struct carrying a handle (swapchain, render pass, framebuffers, ...): - handles: their name lives in a child <name> element, not a `name` attribute (e.g. <type category="handle"><type>VK_DEFINE_HANDLE</type> (<name>VkInstance</name>)</type>), so every handle fell through to the 4-byte default. Read the child element; handles are 8-byte pointers again (VkSwapchainCreateInfoKHR.surface @24, not @20). - duplicated members: vk.xml lists some members once per API variant (api="vulkan" and api="vulkansc"); keep only the default Vulkan ones, else the field is emitted twice and inflates the struct size. - constants: emit bitflags from `bitpos`, extension enums from `offset`+extension `number` (sTypes like ..._SWAPCHAIN_CREATE_INFO_KHR = 1000001000), SPEC_VERSION numerics and EXTENSION_NAME strings from inside <require>, and resolve aliases. Verified against the system Vulkan header: 37 struct sizes/offsets checked, 0 mismatches; suite still 130 green.
7.6 MiB
Executable File
7.6 MiB
Executable File