Update library to latest webgpu-native headers
This goes up to https://github.com/webgpu-native/webgpu-headers/commit/6f549cc3409663303b06f50483b9ebf9d1cf19dd Things I didn't do:
- I didn't update the library to make sure "instance dropped" callback error codes are guaranteed to happen, like they seem to be in Dawn.
List of changes (roughly in order of header commits):
- Various enum and struct renames
- Updated callbacks to use the new
*CallbackInfostructs and 2-userdata system. Also updated functions to returnWGPUFuture, though theWGPUFuturething is just stubbed out at the moment as I don't think wgpu-core has the necessary functionality for it.wgpuInstanceWaitAnyisunimplemented!() DepthClipControlmerged intoPrimitiveState, related code simplified.- Updated
depthWriteEnabledto use an optional bool, mostly matters due to added validation. - Add TODOs for missing features (sliced 3D compressed textures)
*Reference()became*AddRef()- Added
unorm10-10-10-2vertex format - Usage field in
TextureViewDescriptor, just used for validation as wgpu-core doesn't allow specifying it anyways. - Removed
maxInterStageShaderComponents - Added
clang_macro_fallback()to bindgen config, since the headers switched to usingUINT32_MAXetc.UINT64_MAXstill doesn't work so I had to manually define those. - Renamed flags enums. Added a conversion helper function to convert them from u64 -> u32 for mapping. (means added direct dependency on bitflags crate)
- Removed device argument from (unimplemented)
wgpuGetProcAddress - Suboptimal surface texture acquisition moved to enum return value, was easy since wgpu-core already returns it like that.
- "Undefined" present mode added, it just selects FIFO.
*EnumerateFeatures()has been replaced with*GetFeatures().- All strings are now passed as
WGPUStringView.
Remaining Windows CI failure is caused by https://github.com/webgpu-native/webgpu-headers/issues/339
For WGPUFuture, we need to have access to submission index (and return that in the future's id). Here is the beginning of an attempt at adding this upstream: https://github.com/gfx-rs/wgpu/pull/6360
FYI I started trying to build upon this PR and upgrade wgpu to my PR that adds submission indices for futures, WIP is here: https://github.com/eliemichel/wgpu-native/tree/eliemichel/2024-10-10-upgrade-wgpu-futures
Ongoing work: I need to figure out what replaced the DynComputePass and DynRenderPass types in newest wgpu.
There is a missing fonction wgpuGetInstanceFeatures on the rust code but describe on yaml as :
- name: get_instance_features
doc: Query the supported instance features
args:
- name: features
doc: The supported instance features
type: struct.instance_features
pointer: mutable
FYI I started trying to build upon this PR and upgrade wgpu
This is now ready, PR: #441
@ygdrasil-io done, thanks for pointing that out. Though note it's not very useful since WaitAny isn't implemented yet.
@rajveermalviya Any specific reason why this PR is on hold? (You not having had time to review it yet is a perfectly fine reason, just trying to figure out if there is a technical blocker I could help with!)
Merged latest commits into #441 and did some extra upgrade of webgpu.h, leading to #445, still hoping for this to get merged!
Closing since the other PR was merged.