Skip to content

Conversation

obiwac
Copy link

@obiwac obiwac commented May 2, 2025

See commit f29ebee/PR gfx-rs/wgpu-native#455 for the commit/PR in wgpu-native which updates to v24.0.0.

90% of the work is done and I've got it working on my machine, but there's a few more things I've got to do/sort out upstream in wgpu-native.

To do (notes to self):

  • Get triangle/boids/adapters/cube examples to Work On My Machine™.
  • Update gowebgpu_error_callback_c.
  • I've been manually editing enums.go; what do I have to do for the generated one to work? Nothing, its all working as expected 🎉
  • JS?
  • Is wgpuDeviceCreateShaderModuleSpirV still needed in wgpu-native? Maybe, but fix other issues ffi/wgpu.h: Typo in param name & GLSL shader source struct gfx-rs/wgpu-native#478
  • Should wgpuDevicePoll even take in a WGPUSubmissionIndex const *? Should it not just be WGPUSubmissionIndex? NULL is valid too so no.
  • Update wgpuglfw.
  • Do what I did in 9da7f2f to the other callbacks.
  • In cmd/enums, generate flags (currently being added manually to end of generated file). -> This is probably gonna be pretty difficult, as I don't know if there's an easy way to get the initializer for a declaration with the version of the C frontend package used. This says that it isn't maintained anymore, but that message is from 2020 and v4 seems to be actively maintained. Documentation for this package is really poor though and I can't find a comprehensive migration guide - I have sent an email to the author. Maybe we should just drop this and generate from the source YAML (Generate wgpu.h from yaml gfx-rs/wgpu-native#373).
  • Get compute/capture examples working.

@rcoreilly
Copy link
Member

Wow I didn't realize they made so many changes in 24! Thank you for doing this!! One key thing: we have a strategy for updating the libs for all the platforms that is intended to not bloat the size of the repo every time these are updated, so please do not commit those at this point!

@obiwac
Copy link
Author

obiwac commented May 2, 2025

we have a strategy for updating the libs for all the platforms that is intended to not bloat the size of the repo every time these are updated, so please do not commit those at this point!

Sure thing, I was intending on asking how this was to be done :)

As a side question, I used to depend on https://github.com/rajveermalviya/go-webgpu, can I assume that this repo is its successor?

@rcoreilly
Copy link
Member

Yep we've picked it up -- tried contacting rajveermalviya a few times but no responses, including to a PR to his repo. @kkoreilly added all the js bindings so it works under wasm. I guess he'll need to do that update now?

@rcoreilly rcoreilly changed the base branch from main to v25 August 9, 2025 19:07
@rcoreilly rcoreilly marked this pull request as ready for review August 9, 2025 19:08
Copy link
Member

@rcoreilly rcoreilly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to update to v25 now, grabbing your changes and updating as needed.

@rcoreilly rcoreilly merged commit 3380983 into cogentcore:v25 Aug 9, 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.

2 participants