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

Add WebGPU support #507

Closed
kkoreilly opened this issue Jun 27, 2023 · 6 comments · Fixed by #1112
Closed

Add WebGPU support #507

kkoreilly opened this issue Jun 27, 2023 · 6 comments · Fixed by #1112
Assignees
Labels
approved This feature request will be implemented enhancement A new feature request high priority This issue should be resolved quickly
Milestone

Comments

@kkoreilly
Copy link
Member

Likely through a wrapper on WebGPU using vGPU and GopherJS.

@kkoreilly kkoreilly added the enhancement A new feature request label Jun 27, 2023
@kkoreilly kkoreilly self-assigned this Jun 27, 2023
@kkoreilly
Copy link
Member Author

Web support has been implemented, but we still need WebGPU support for 3D. This will likely not be done in time for v2 because 3D on web is a relatively low-frequency use case and browser support for WebGPU is still about 28% (https://caniuse.com/webgpu).

@kkoreilly
Copy link
Member Author

WebGPU now has much higher support (71.41%), and it seems like the way to go not just for web but also for native platforms, as it will allow us to bypass a ton of Vulkan issues by using https://github.com/rajveermalviya/go-webgpu. We will look into implementing WebGPU now.

@kkoreilly kkoreilly added this to the v0.4 milestone Jul 26, 2024
@kkoreilly kkoreilly added the approved This feature request will be implemented label Jul 26, 2024
@kkoreilly kkoreilly added the high priority This issue should be resolved quickly label Jul 26, 2024
@kkoreilly
Copy link
Member Author

kkoreilly commented Jul 26, 2024

To summarize the situation:

  • There are two existing Go WebGPU packages: https://github.com/rajveermalviya/go-webgpu and https://github.com/mokiat/wasmgpu
  • The first one provides support for WebGPU on all native platforms (macOS, Windows, Linux, iOS, and Android)
  • The second one provides support for WebGPU on the web using syscall/js
  • Therefore, together these two provide all of the WebGPU support we need
  • However, they have slightly different APIs, although they both appear to have the fundamentals intact
  • Additionally, both appear to have some extra dependencies or questionable workspace module management decisions
  • Therefore, we are probably best off forking the first one and implementing a compatible API with build tags for js in the same package based on the second one
  • We could probably merge this back upstream, although it doesn't really appear to be maintained, so we could also just maintain a permanent fork if necessary
  • If we are confident we are moving forward with WebGPU, I can add the js WebGPU package to the native one now as described above (this would fix Q: WebAssemble Target possible? rajveermalviya/go-webgpu#250).

@rcoreilly
Copy link
Member

ok please proceed with that plan. I will continue to develop using go-webgpu for now.

@gedw99
Copy link

gedw99 commented Jul 27, 2024

Safari now has WebGPU support . Finally can go faster.

@kkoreilly
Copy link
Member Author

I filed rajveermalviya/go-webgpu#268, so the main remaining task for basic WebGPU support on all platforms is the wgpu branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved This feature request will be implemented enhancement A new feature request high priority This issue should be resolved quickly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants