gen_vulkan: fix 64-bit ABI (handles, dup members, bitflags/sTypes)
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.
This commit is contained in:
1 parent
6f6f444beb
commit
920e672d29
8 files changed
+4582
-1613
No files matched your search
+4461
-1607
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user