You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
A common source of confusion I've seen is about wgpu's shader support and their target platform support, e.g. some believe GLSL/SPIR-V shader support will be removed, others believe SPIR-V/GLSL translation is only available on native but not web targets, etc. I might be carrying a set of misconceptions as well. Currently the Learn Wgpu tutorial states,
Note that, at the time of writing this, some WebGPU implementations also support SPIR-V, but it's just a temporary measure during the transition period to WGSL and will be removed
While this is can be true when describing WebGPU implementations in general, wgpu can continue to support more than what is in the WebGPU spec. As I understand it, WGSL, GLSL, and SPIR-V are all supported by wgpu, both on native and web targets, as naga can handle these translations as needed.
Additionally, wgpu::ShaderSource rustdocs could also benefit from mentioning which features need to be enabled. SPIR-V and GLSL require features = ["spirv", "glsl"] respectively. After linking that page, I noticed the type's docs were out of date on the current release, but that appears to have already been fixed by #2315 on master.
Describe the solution you'd like
Add a section in the readme (and rustdocs?) that describes shader support such as the targets targets each work on (native/web), features required, etc. After clarifying, I will open an issue on the Learn Wgpu tutorial to expand on wgpu's shader support specifically.
Additional context
Some cases of potential confusion I've seen in chats in the past month:
wgpu never "supported" glsl, it accepts wgsl and spir-v (on native, if you enable that extension).
My primary concern with sticking to glsl is that learn wgpu (It's a decent reference to remember details) claims that glsl is going to be removed from wgpu soon
im just happy im still on wgpu old enough to still just use GLSL
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
A common source of confusion I've seen is about
wgpu
's shader support and their target platform support, e.g. some believe GLSL/SPIR-V shader support will be removed, others believe SPIR-V/GLSL translation is only available on native but not web targets, etc. I might be carrying a set of misconceptions as well. Currently the Learn Wgpu tutorial states,While this is can be true when describing WebGPU implementations in general,
wgpu
can continue to support more than what is in the WebGPU spec. As I understand it, WGSL, GLSL, and SPIR-V are all supported bywgpu
, both on native and web targets, asnaga
can handle these translations as needed.Additionally,
wgpu::ShaderSource
rustdocs could also benefit from mentioning which features need to be enabled. SPIR-V and GLSL requirefeatures = ["spirv", "glsl"]
respectively. After linking that page, I noticed the type's docs were out of date on the current release, but that appears to have already been fixed by #2315 on master.Describe the solution you'd like
Add a section in the readme (and rustdocs?) that describes shader support such as the targets targets each work on (native/web), features required, etc. After clarifying, I will open an issue on the Learn Wgpu tutorial to expand on
wgpu
's shader support specifically.Additional context
Some cases of potential confusion I've seen in chats in the past month:
The text was updated successfully, but these errors were encountered: