* generator: Add edegecases for broken Video extension enum variants
* Replace deprecated `make_version()` with `make_api_version()`
* generator: Use the same predicate for push_next and its traits
Some structs turn out to be root structs when their name is not in the
`root_structs` set, even when they themselves extend another struct.
This was already taken care of for `push_next` which is emitted in this
situation, but the trait referenced by `push_next`'s `T` bound is still
relying on the `extends` field to not exist in `vk.xml` at all, leading
to it not being generated despite `push_next` needing it.
Fixes: 215511f ("Implement ExtendXXX for multiple root create infos if
there are more than 1")
* Update Vulkan-Headers to 12.175
* generator: Generate low-level structs with bindgen (for vk_video)
Following [1] a stable release including the fixed commit has been made;
we can now depend on the released crate version again. This also
includes support for all new fields up to Vulkan 1.2.176.
[1]: https://github.com/krolli/vk-parse/issues/18#issuecomment-837815599
* Update Vulkan-Headers to 1.2.169
* generator: Add support for vkFlags64
Since Vulkan-Headers v1.2.170 with VK_KHR_synchronization2 there are now
bitmasks/enums using 64-bits instead of the default 32. vk-parse has
been updated to convey this info though the typedefs for these
enumerations could be parsed as well.
* generator: Insert underscores before trailing type number
Enum types like `VkAccessFlags2KHR` are turned into `VK_ACCESS2` after
demangling and `SHOUTY_SNAKE_CASE` conversion by Heck, but the enum
variants for the type start with `VK_ACCESS_2` (or similar) which fails
the `strip_suffix` and leads to long names to show up.
Inserting an underscore here makes sure the match succeeds.
* Update Vulkan-Headers to 12.170
* Fix clippy::manual_strip
* Fix clippy::comparison_to_empty
* Fix clippy::needless_lifetimes
* generator: Drop unnecessary edgecase for charptr array in builder
* generator: Make array type handling more linear
* prelude: Provide Result -> VkResult<()> conversion
* Add #[must_use] to Result type
* Fix all unchecked vk::Result cases
* generator: Fix typos
* generator: Assert char ptrs have `"null-terminated"` len attribute
* prelude: Provide result_with_success helper for Result -> VKresult
* Cleanup match{success} blocks with SSR
{let $p = $f; match $q { vk::Result::SUCCESS => Ok($r), _ => Err($z), }} ==>> {$f.result_with_success($r)}
* Simplify matching on Result::SUCCESS
Using the following regex replacement:
let err_code =\s*(.*\((\n|[^;])*?\));\s*match err_code \{\s*vk::Result::SUCCESS => Ok\((.*)\),\s*_ => Err\(err_code\),\s*\}
$1.result_with_success($3)
* Simplify intermediate error return
let err_code =\s*(.*\((\n|[^;])*?\));\s*if err_code != vk::Result::SUCCESS \{\s*return Err\(err_code\);\s*\}
$1.result()?;
* Simplify error checking with .result()? and .result_with_success()
* generator: Ignore empty basetype in typedef (forward declaration)
ANativeWindow and AHardwareBuffer were [recently changed] to the
basetype category, but without an actual basetype, consequently failing
the Ident constructor with an empty name.
Since these types are already dealt with in platform_types, and there
doesn't seem to be anything sensical to define them to right now, just
ignore these cases.
[recently changed]: 0c5351f5e9 (diff-0ff049f722e55de41ee15b2c91ef380fL179-R180)
* Suggestion: Allocate data in get_ray_tracing_shader_group_handles
* generator: Update nom to 6.0
* generator: Generalize C expression conversion to TokenStream
* generator: Simplify ReferenceType::to_tokens with quote!
* generator: Refactor to not parse our own stringified token stream
* generator: Deal with pointers to static-sized arrays
* generator: Apply static-sized array pointer to size containing `*`
* generator: setter: Interpret all references as ptr, not just p_/pp_
* generator: quote::* is already imported
* generator: Replace manual fn to_tokens with quote::ToTokens trait impl
* generator: Return str reference from constant_name
* generator: Replace unused to_type_tokens with name_to_tokens
The reference argument was always None; replace it with a direct call to
name_to_tokens.
* generator: setters: Use safe mutable references instead of raw ptrs
* Fix incorrect generation of commands with aliases
* Use alias name instead of the actual cmd name
* Generate vulkan ray-tracing bindings
* Add ray-tracing khr
* High level ray tracing support
* Re-enable nv ray tracing extension (this will break the build)
* Generate aliases for extension enums
* Add missing alias because the parser doesn't provide alias information here
* Fix 'unreachable pattern' warnings
* Fix clippy warning
Co-authored-by: Maik Klein <maikklein@googlemail.com>
* Updated vk-parse and Vulkan-Headers to Vulkan 1.2
* First pass at generating vk.rs
* Support double
* Generate from EnumSpec::Value
* Remove println
* Fix mutable pointer bug
* cargo fmt
* Update document link
* Remove mention of Vulkan 1.2 support for now
* Add clippy::wrong_self_convention