* 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
According to specs for Device Memory (section 10.2), memory types are
topologically sorted by their property flags so the two-pass memory
type selection is unnecessary.
Co-authored-by: Steve Wooster <s.f.m.wooster@gmail.com>
According to specs for vkGetPhysicalDeviceSurfaceFormatsKHR(), at least
one surface format must be returned, and returned formats must not be
VK_FORMAT_UNDEFINED.
This avoids an obnoxious error when attemting to use `dbg!()` while
debugging the generator.
Unfortunately there seems to be no way to import * except `dbg`, or
shadow `dbg` (using eg. `use nom::{dbg as _nom_dbg, *};`).
It is in some cases necessary to load a specific Vulkan dll/so with a
different name and/or from a different location.
Instead of copying this function to a downstream project (and making the
LoadingError constructor public to retain the same interface), split
Entry::new() such that downstream projects can easily specify and use an
alternate Vulkan implementation.
* Deprecate the DebugMarker and DebugReport extension modules
* Allow deprecated modules only in mod.rs, to suppress clippy warning
Co-authored-by: Apoorva Joshi <apoorva.ramesh.joshi@gmail.com>
* Add ash-window as workspace member
* ash-window: fix repository link
* ash-window: Address CI fmt&clippy issues
* ash-window: Try fix SDL2 CI issues
* ash-window: Remove beryllium example
* Allow the generator to be run from project root dir
* Split vk.rs into multiple files
* Breakup and remove generated vk/prelude.rs
Generator changes:
- No longer convert current dir to a string when checking if the
path ends with 'generator'
- Pass the 'ash/src' dir instead of the 'vk.rs' path
Generated and generated output changes:
- The majority of prelude.rs has been moved to macros.rs
- The pointer chain and Handle are now included in vk.rs
- Platform types has been moved to its own file.
* TimelineSemaphore struct added presenting `VK_KHR_timeline_semaphore` extension.
* Unused import removed.
* Empty newline added.
* TimelineSemaphore extension object now provides functions for work with timeline semaphores.
* Function pointers removed from TimelineSemaphore as no longer needed.
*_khr postfix removed from TimelineSemaphore functions to follow the same code style as in other extensions.
* Tiny code reformatting to fit Rustfmt requirements.
* Another attempt to fit Rustfmt requirements.
* 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>