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

WebGPU support? #6381

Closed
DolphinIQ opened this issue Mar 1, 2023 · 13 comments
Closed

WebGPU support? #6381

DolphinIQ opened this issue Mar 1, 2023 · 13 comments

Comments

@DolphinIQ
Copy link

Describe the problem

Hello, I love this project!

WebGPU is a new graphics API for complex rendering and compute, using hardware acceleration. Use cases include demanding 3D games and acceleration of scientific calculations. It is meant to supersede WebGL and allows developers to create more advanced applications thanks to new optimizations and features (for example Compute Shaders, which are not available in WebGL2).

Does Tauri allow enabling WebGPU support? According to MicrosoftEdge/WebView2Feedback#2233 WebView2 WebGPU support on Windows is up to date, but I was unable to find any information about how to enable it on a Tauri window/project.

I come from WebGL browser world and WebGPU is currently only accessible through flags. Theoretically I shouldn't have to worry about experimental features, since my app will be running my safe code only. I would love to be able to build next gen desktop graphics applications with Tauri & WebGPU.

Describe the solution you'd like

I would like to be able to enable experimental features, such as WebGPU. One option would be to allow the user to pass in flags like "enable-unsafe-webgpu".

Alternatives considered

No response

Additional context

No response

@FabianLars
Copy link
Member

The webgpu flag is only available in the non-stable webview2 channels which we currently have no plans to support (the webview bindings crate doesn't support them either fwiw).
Once it is also available in the stable channel you could use the api introduced here #5799 (will be part of 1.3) to set the flag.

Note that this would still be Windows-only. The Linux and macOS webviews have no setting to enable flags like these.

@FabianLars FabianLars closed this as not planned Won't fix, can't repro, duplicate, stale Mar 1, 2023
@FabianLars
Copy link
Member

FabianLars commented Mar 1, 2023

stop, wait! i was wrong, gimme a second 🤣

Edit: Yeah sorry, if you inject --enable-unsafe-webgpu via the above mentioned additionalBrowserArgs config it works in the stable channel too:
grafik

Still, this is windows only!

@DolphinIQ
Copy link
Author

Thank you @FabianLars for a great quick answer! That is awesome. Do we know when is Tauri 1.3 coming?

@FabianLars
Copy link
Member

relatively soon-ish. It's currently in an internal audit, no idea how far that progressed already. My guess would be sometime this month (prob soon after Lucas returns from his vacation 😅 )

@nothingismagick
Copy link
Member

Would be really great to document this addition.

@AathifMahir
Copy link

Awesome work!

Will be looking to contribute Tauri on Windows Side Pretty soon, Haven't had a chance to look through the source code will look into it in my spare time and let's see how we can improve Tauri on Windows.

@nischalj10
Copy link

any plans yet of mac/ linux support?

@FabianLars
Copy link
Member

We have no control over that (as long as we're "stuck" with the OS webviews). Safari added it to their TP version in December so i would expect that it's not that far off. No idea about Linux though.

@xpluscal
Copy link

xpluscal commented Sep 6, 2024

Heyhey, any updates on this topic?

@brandon-lb
Copy link

WebGPU works now behind a flag. I haven't used Tauri yet, but would it be safe to assume it's good to use here?

@FabianLars
Copy link
Member

If you're also talking about macOS, then no. You can't enable feature flags in WKWebView to our knowledge.

@brandon-lb
Copy link

I was able to compile Webkit using these instructions, and enable WebGPU. It doesn't make sense to me how this isn't possible (not saying it is, I just don't understand).

Regardless, thanks for your quick response

@FabianLars
Copy link
Member

We're not shipping webkit with the app but isntead rely on the existing system version. So if you tell your users to all do that, or i guess better yet, ship it with your app (obviously increasing the app size by quite a lot) then it's possible of course, it's just not something we support directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants