-
Notifications
You must be signed in to change notification settings - Fork 118
upgrade to wgpu v25 #477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
upgrade to wgpu v25 #477
Conversation
Updated dependencies to wgpu-core, wgpu-types, wgpu-hal, and naga v25.0.1. Applied significant code changes to align with the updated wgpu API, including refactoring device polling, shader module descriptors, and unused features removal. Addressed compatibility issues and added necessary comments for unsupported features.
The js-sys dependency was not used in the project and is unnecessary. Cleaning up unused dependencies simplifies the configuration and reduces potential security risks.
The `js-sys` crate was no longer being used in the project but remained in the dependencies list. This cleanup reduces clutter and ensures the dependency graph remains accurate.
Bumped the WGPU_ANDROID_NDK_VERSION from r27b to r28b to use the latest available version. This ensures the build process stays up-to-date with recent updates and fixes in the Android NDK. No other changes were made to the CI configuration.
Updated CMakeLists.txt files to include the Foundation framework alongside CoreFoundation, QuartzCore, and Metal for macOS. This ensures proper linking and resolves potential dependency issues in macOS builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, some concerns
@@ -296,6 +296,7 @@ pub unsafe fn map_instance_descriptor( | |||
(Some(dxil_path), Some(dxc_path)) => wgt::Dx12Compiler::DynamicDxc { | |||
dxil_path: dxil_path.to_string(), | |||
dxc_path: dxc_path.to_string(), | |||
max_shader_model: wgt::DxcShaderModel::V6_7, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add this as a member in extras
@@ -307,10 +308,12 @@ pub unsafe fn map_instance_descriptor( | |||
backend_options: wgt::BackendOptions { | |||
gl: wgt::GlBackendOptions { | |||
gles_minor_version: map_gles3_minor_version(extras.gles3MinorVersion), | |||
fence_behavior: Default::default(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This as well
// TODO: fix this, UNIFORM_BUFFER_AND_STORAGE_TEXTURE_ARRAY_NON_UNIFORM_INDEXING is not supported anymore https://github.com/gfx-rs/wgpu/issues/4407 | ||
// if features | ||
// .contains(wgt::Features::UNIFORM_BUFFER_AND_STORAGE_TEXTURE_ARRAY_NON_UNIFORM_INDEXING) | ||
// { | ||
// temp.push(native::WGPUNativeFeature_UniformBufferAndStorageTextureArrayNonUniformIndexing); | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you file an issue about fixing these, or include the fix in the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can simply remove it from wgpu.h
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should review all the enumerations at once, as some are commented. Is there already an issue for tacking this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, would be good to review the feature enums 👌 Issue #190 seems related.
// TODO check if we need to check the PollStatus to return true or false | ||
Ok(_) => true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this needs to match if PollStatus == QueueEmpty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we log something when it does not match ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, matches!(poll_status, QueueEmpty)
instead of always true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get it, but should we add a log to explain what is happening when we return false ?
With the new behavior in features, I think we can use a single unconditional dep on wgc with the dx12, gles, vulkan, and metal features. |
Upgrade to wgpu v25 and update the Android NDK version to v28.
I built a version for testing :
https://github.com/ygdrasil-io/wgpu-native/releases/tag/v25.0.0.1