Skip to content
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

update to wgpu-native 24.0.0.2 #673

Merged
merged 48 commits into from
Mar 17, 2025
Merged

update to wgpu-native 24.0.0.2 #673

merged 48 commits into from
Mar 17, 2025

Conversation

Vipitis
Copy link
Contributor

@Vipitis Vipitis commented Feb 21, 2025

Again trying to start the work on this... (in progress and will be draft for a while)
there is a release for 24.0.0.1 but wgpu23 never had a release for wgpu-native.
I am mainly motivated by the inclusion of gfx-rs/wgpu#6755

useful links:

from template (skip upstream and IDL):

  • Run python tools/download_wgpu_native.py --version xx to download the latest webgpu.h and DLL.
  • Run python codegen to apply the automatic patches to the code.
  • It may be necessary to tweak the hparser.py to adjust to new formatting.
  • Diff the report for new differences to take into account.
  • Diff wgpu_native/_api.py to get an idea of what structs and functions have changed.
  • Go through all FIXME comments that were added in _api.py:
    * Apply any necessary changes.
    * Remove the FIXME comment if no further action is needed, or turn into a TODO for later.
  • Run python codegen again to validate that all is well. Repeat the steps above if necessary.
  • Make sure that the tests run and provide full coverage.
  • Make sure that the examples all work.
  • Make sure that pygfx works (again).
  • Update release notes for changes in behavior.

Wrapping up

  • Update pygfx. not needed.
  • Release new wgpu-py.
  • This can be a good moment to deal with certain issues, or perhaps some issues can be closed.

API changes

Nope. The compilation_hints arg got removed, but we did not support that anyway.

@Vipitis
Copy link
Contributor Author

Vipitis commented Feb 22, 2025

made some more progress... will try to keep at it but now run into the surface stuff which gave some trouble last time and is also really OS specific.

It might be worth to automatically generate the code for all these callback and callbackInfo structs or at least add the header info - I haven't tried to look into how the codegen actually works.

@Vipitis
Copy link
Contributor Author

Vipitis commented Feb 23, 2025

more progress for today... got the first examples to run:
image

will hopefully find sometime tomorrow and keep at this pace.

@Vipitis
Copy link
Contributor Author

Vipitis commented Feb 23, 2025

all the examples have passed today, also most tests.
remaining issues with tests: limits for constants, something related to entry points (which changed to the WGPUStringView)

@almarklein
Copy link
Member

Thanks for this amazing piece of work @Vipitis! This was not a small update 😉. I have read through all the changes, and made myself a list to look at some points more closely. I'll just push to this branch.

@almarklein
Copy link
Member

This is ready from my end. I ran the tests, examples, also for pygfx, on MacOS, WIndows, and Linux, and all is looking good!

@almarklein
Copy link
Member

@Vipitis feel free to comment on my changes. Let's not merge this until you're happy too.

@Vipitis
Copy link
Contributor Author

Vipitis commented Mar 14, 2025

@almarklein thanks for the improvements. I followed this closely and it looks good to me!

Regarding the difference between null string and empty string: there is no test that specifically requires the empty string, not sure where this would even be the case. when not specifying an entry point for example you specifically need it to be this null string. Perhaps empty string is more of an output use case for WGPUStringView

For the view usages I branched off my example and will modify it in the next couple of days to test and show it's functionality and then hopefully have it in shadertoy soon.

@almarklein
Copy link
Member

there is no test that specifically requires the empty string, not sure where this would even be the case.

I guess the behavior depends on the case. Thinking of it, maybe it would be cleaner to also use the null-string if no label is provided.

As for the entry_point, if the user sets it to None, it will become the null-string, so this should be fine.

@Vipitis Vipitis changed the title update to wgpu-native 24.0.0.1 update to wgpu-native 24.0.0.2 Mar 16, 2025
@almarklein
Copy link
Member

@Korijn This is ready from our (Jan and me) end 🚀

@Korijn Korijn merged commit 7fb1c53 into pygfx:main Mar 17, 2025
20 checks passed
@Vipitis Vipitis deleted the wgpu24 branch March 17, 2025 08:36
@almarklein
Copy link
Member

Let's make a release real soon. I'll have a quick look a updating idl.

@Vipitis Vipitis mentioned this pull request Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants