[wgpu-hal] Upgrade to ash 0.38#5504
Conversation
09d3daf to
da725f4
Compare
This comment was marked as resolved.
This comment was marked as resolved.
|
@MarijnS95: Do you think you'll be able to attend to this soon? I'm excited to see quite a few duplicate dependencies like |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
I think once merge conflicts are resolved, it is ready to go |
cwfitzgerald
left a comment
There was a problem hiding this comment.
CI is mad, but lets go :)
|
@cwfitzgerald Maybe I broke that with the change in features for It is also a tad unfortunate that local |
|
The cause of this error is now obvious. With this PR there's no direct dependency on $ cargo tree -e features --target x86_64-pc-windows-msvc
...
│ │ ├── wgpu-hal v0.20.0 (/home/marijn/Code/TraverseResearch/wgpu/wgpu-hal)
...
│ │ │ ├── ash feature "default"
│ │ │ │ ├── ash v0.37.3+1.3.251
│ │ │ │ │ └── libloading feature "default"
│ │ │ │ │ └── libloading v0.7.4
│ │ │ │ │ ├── winapi feature "default" (*)
│ │ │ │ │ ├── winapi feature "errhandlingapi"
│ │ │ │ │ │ └── winapi v0.3.9
...So we now have one more explicit feature dependency to list in |
https://github.com/ash-rs/ash/releases/tag/0.38.0 In this release a lot of breaking changes have been made: builder structs are dropped in favour of always having a lifetime parameter available on every raw Vulkan structure (when they contain one or more pointers). This massively contributes to lifetime (and mutable aliasing) safety, but requires significant changes to some uses in `wgpu-hal`. All function pointer loaders for both Vulkan core and extensions have moved into the root of `ash::`, making `ash::vk::` a more pure `sys`-like module. Extensions have their own `ash::<prefix>::<ext>` module to clearly separate and group their items from the core. Besides `NAME` and the usual `*Fn` wrappers, the handwritten `extensions` module is now only available via this path. This to combat the previous inconsistency between `ash::KhrSomeExtFn::name()` vs `ash::extensions::khr::SomeExt::name()`. The Vulkan core clearly splits functions across `device` and `instance` functions, to keep functions that can be loaded without a dispatch-table for a device via `get_device_proc_addr()` apart from instance functions. This concept has now been applied to extension functions, making it possible to load them optimized for a device too (when the shared table would previously include instance functions and require the whole thing to be loaded via `get_instance_proc_addr()`), and in the rare case of 3 hand-written extension wrappers: load instance functions via `get_device_proc_addr()` resulting in `NULL` pointers. Finally, a few new helpers like `_as_slice()` and `_as_c_str()` are available (the former only for statically-sized struct-owned arrays with a length delimiter field) to simplify commonly written patterns.
|
Thanks for the work on this and seeing this through to the end! |
|
No worries, I hope you can all benefit/enjoy the incremental improvements in the latest |
https://github.com/ash-rs/ash/releases/tag/0.38.0
In this release a lot of breaking changes have been made: builder structs are dropped in favour of always having a lifetime parameter available on every raw Vulkan structure (when they contain one or more pointers). This massively contributes to lifetime (and mutable aliasing) safety, but requires significant changes to some uses in
wgpu-hal.All function pointer loaders for both Vulkan core and extensions have moved into the root of
ash::, makingash::vk::a more puresys-like module. Extensions have their ownash::<prefix>::<ext>module to clearly separate and group their items from the core. BesidesNAMEand the usual*Fnwrappers, the handwrittenextensionsmodule is now only available via this path. This to combat the previous inconsistency betweenash::KhrSomeExtFn::name()vsash::extensions::khr::SomeExt::name().The Vulkan core clearly splits functions across
deviceandinstancefunctions, to keep functions that can be loaded without a dispatch-table for a device viaget_device_proc_addr()apart from instance functions. This concept has now been applied to extension functions, making it possible to load them optimized for a device too (when the shared table would previously include instance functions and require the whole thing to be loaded viaget_instance_proc_addr()), and in the rare case of 3 hand-written extension wrappers: load instance functions viaget_device_proc_addr()resulting inNULLpointers.Finally, a few new helpers like
_as_slice()and_as_c_str()are available (the former only for statically-sized struct-owned arrays with a length delimiter field) to simplify commonly written patterns.Connections
Link to the issues addressed by this PR, or dependent PRs in other repositories
#5501
Description
Describe what problem this is solving, and how it's solved.
New crate release of
ashthat users will likely want to start using, especially since it exposes a many more Vulkan extensions (generated against a newer spec) and has significant lifetime-safety improvements and other usability-refactors.Testing
Explain how this change is tested.
cargo r -p wgpu-examplesfor a few of them.Checklist
cargo fmt.cargo clippy. If applicable, add:--target wasm32-unknown-unknown--target wasm32-unknown-emscriptencargo xtask testto run tests.This fails on the
watertest, but also ontrunk. As seen when runningcargo r -p wgpu-examples water, a lot ofSYNC-HAZARD-WRITE-AFTER-WRITEvalidation issues are detected.CHANGELOG.md. See simple instructions inside file.I realize that this is a bit of a sloppy PR with some
TODOs, which I'd like to discuss to find the cleanest way forward :)