-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Gradient implementation does not work in Wasm #1523
Comments
As you've surmised, this is due to WASM target for wgpu not supporting storage buffers. The idea was to not support gradients for WASM right now, but I agree the app should still compile especially if you are not using gradients. I'll open a PR for a temporary fix for this until a real implementation can be written (or the ability to use storage buffers for WASM target is added to wgpu) where I will just check for a WASM target and not use the gradient pipeline. |
Have a temp fix for this in #1524. Ran In the long term I think we can add a statically sized uniform array variant like we do for the OpenGL side for gradients for a WASM target. |
Thanks @bungoboingo, can confirm that the Wasm version of |
Sorry, just to clarify: you cannot run the |
Can't run it natively using plain old |
Hmm, I can run the |
I checked on a Linux machine and it runs there, so the issue is likely with my Mac's graphics configuration. In any case, Wasm works on both platforms, so I am closing the issue. Would be great for your fix to be integrated back into the master! |
Hi , I had a similar problem on mac `thread 'main' panicked at 'wgpu error: Validation Error Caused by: ', /xxx/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/wgpu-0.14.0/src/backend/direct.rs:2403:5 |
On macos? Is it a m1 or an intel chip? |
Hi Sorry 😅, I provided too little information; OS: Rust: eg: log:
For reference only: I haven't verified it works in Linux or Windows |
Hmm, I'm able to run the example on my Intel mac without problems, very confusing. I'll poke around and see what I can find! |
Is there an existing issue for this?
Is this issue related to iced?
What happened?
Trying to run Iced with
wgpu
compiled inwebgl
mode (e.g. inwasm
or in theintegration_wgpu
example) results in an error`thread 'main' panicked at 'wgpu error: Validation Error
Caused by:
In Device::create_render_pipeline
note: label =
iced_wgpu::triangle::gradient pipeline
Internal error in VERTEX | FRAGMENT | VERTEX_FRAGMENT shader: new_render_pipeline_state: "Compiler encountered an internal error"`
This is related to the new gradient pipeline employing Storage Buffers in a fragment shader (which
webgl
does not support).What is the expected behavior?
I expected the app to compile and run, and either take a performance hit (due to "faking" storage buffers using uniforms or textures) or at least only break when the gradients are actually used. As is, Iced does not compile the
counter
example nor theintegration_wgpu
. It could be that the gradients are now used in some default widgets that causes this.Version
master
Operative System
macOS
Do you have any log output?
No response
The text was updated successfully, but these errors were encountered: