ash/generator
Marijn Suijten 508fc4ff19
generator: Borrow all command names and disentangle "aliases" (#733)
Turns out we were doing the wrong thing for the right reason: the
`aliases` here aren't `vk.xml` aliases: they are renames.  When
generating function pointers for extensions, a list of command
_definitions_ is collected, which can only ever be "root" `command`s.
Extensions typically reference stabilized `command`s under an alias with
the vendor tag suffixed, which the `Fn` struct field name is renamed to
using this `aliases` - now replaced with `rename_commands` - list, while
generating the rest of the "function pointer" command bits using the
"root" `command` (as this mostly pertains the parameters and return
type).  With that explanation it becomes clear why
`generate_extension_commands()` was creating an "alias" mapping from
stabilized name to vendor-suffixed extension name, and calls
`generate_function_pointers()` with that mapping - and a list of
stabilized/root `command`s - rather than passing `cmd_aliases` directly.
(This `cmd_aliases` list exists because the rename always happens in the
root `<commands>` element: extensions then `<require>` the aliased
rather than the stabilized name, so the base for this alias is found
first to look up the base command, and then stored in `rename_commands`
to rename it back to the aliased name).

With improved clarity we can now also borrow the name strings rather
than cloning them in many places.
2023-04-08 21:59:55 +02:00
..
src generator: Borrow all command names and disentangle "aliases" (#733) 2023-04-08 21:59:55 +02:00
Vulkan-Headers@63af1cf1ee Update Vulkan-Headers to 1.3.246 (#723) 2023-04-03 11:12:35 +02:00
Cargo.toml Update Vulkan-Headers to 1.3.246 (#723) 2023-04-03 11:12:35 +02:00