7 ms·
> it seems WebGPU is doing the same things we've been using WebGL for. Not really the same though, the purpose of WebGPU is exposing a sandboxed GPU hardware d
by kbumsik 7y ago
> it seems WebGPU is doing the same things we've been using WebGL for.
Not really the same though, the purpose of WebGPU is exposing a sandboxed GPU hardware directly to the web, not exposing just a graphical API like WebGL exposes OpenGL variants.
It currently is looking at being SPIR-V compatible. As both Vulkan and OpenCL supports SPIR-V we might use WebGPU for GPGPU in the future.
- shmerl 7y agoGood thing SPIR-V approach prevailed, despite Apple trying to derail it.
- kvark 7y agoThere is no resolution for this question yet, too early to celebrate anything.
- shmerl 7y agoAh, I see, thanks for clarifying. I misread the post then, since it mentioned SPIR-V. Too bad Apple not only refuse to support Vulkan, but try to prevent using SPIR-V as well.
- kvark 7y agoThey just want to make sure we aren't depending on Khronos too much. It's a reasonable thing to want for the group. As for Firefox, the WebGPU implementation uses the infrastructure we have for Vulkan Portability, and so consuming SPIRV is natural.
- pjmlp 7y agoWhat I care about is having a modern shading language not stuck being a C dialect, and good GPGPU debugging. If whatever Apple does forces Khronos to be more innovative, moreso the better. Without CUDA's winning strategy regarding multi-language support, SPIR-V and SYSCL would never had happened.
- deleted 7y ago[deleted]
- pcwalton 7y agoMetal Shading Language is a C++ dialect. HLSL is as much of a C dialect as GLSL is. And I would argue that C++ provides no benefits over C for shading languages. I prefer GLSL to Metal Shading Language.
- pjmlp 7y agoThankfully all proprietary shading languages have moved on from GLSL. Indeed, I really appreciate MSL being a C++ dialect.
- shmerl 7y agoMoved but remained proprietary. So the problem is not solved. Language shouldn't be proprietary to begin with. It's an obsolete and invalid practice from the last century.
- pjmlp 7y agoApparently not, given the monthly occurrence of FOSS projects that decide to go dual license, or even back to proprietary, because this century practice doesn't cover their existence and life responsibilities.
- shmerl 7y agoFor languages? That's a dead end really. That's why whatever Apple will produce will also be dead, as long it's proprietary. Apple is stuck in that mentality and has hard time getting out of it.
- TazeTSchnitzel 7y ago> a modern shading language not stuck being a C dialect SPIR-V allows you to compile from whatever you want, and avoids the hideously complex beast that is C++ needing to be part of the browser's API.
- pjmlp 7y agoGiven the quality of Khronos SDKs and stubborness to C bindings, that might not be a bad thing. As they have learned the hard way with OpenCL, most devs like to be pampered with modern toiling. Heck, it is thanks to Microsoft that we have glTF 2.0, and NVidia for any kind of usable C++ Vulkan bindings.
- shmerl 7y agoUsing C bindings you can plug in any language you want, C ABI is simple. Try that with C++ or anything of the sort, and you'll be in trouble. If you want to improve quality - anyone can contribute and improve, instead of like Apple trying to sabotage and derail.
- edflsafoiewq 7y agoIt's not so easy to contribute to Khronos.
- shmerl 7y agoSurely easier than collaborating with Apple who are extreme lock-in proponents. See for example projects like dxvk, which affected Vulkan spec: * https://www.youtube.com/watch?v=1fU4w2ZGxH4&t=12m21s https://www.youtube.com/watch?v=1fU4w2ZGxH4&t=12m21s * http://jason-blog.jlekstrand.net/2018/10/transform-feedback-is-terrible-so-why.html http://jason-blog.jlekstrand.net/2018/10/transform-feedback-... Good luck for such thing happening with anything Apple related.
- exDM69 7y agoSpec development? No. But for bug reports, debugging and fixing bugs in the shader compiler, validation layers, etc they are pretty responsive to issue reports and pull requests.
- deleted 7y ago[deleted]
- 7y ago
- AlexMax 7y agoDid SPIR-V actually "prevail", or is Apple going to continue implementing WSL regardless of where the standard goes?
- shmerl 7y agoNot sure really. Apparently it's not yet resolved, which means Apple are still trying to derail things.
- gfxgirl 7y agoI'm not entirely convinced spriv is good for webdev. imagine the only way to code in a browser was to use an offline compiler to emit byte code. some people might like that but I'd argue there have been many indirect benefits to having the text version of JavaScript be the default on the web. sure there will be workarounds like building your own DSL to spriv compiler and including it on your page but I'd argue a standard high level text format leads to more collaboration / standardization / interop / knowledge sharing I'm sure others would prefer the web had just started as sandboxed assembly
- shmerl 7y agoSPIR-V already has a lot of collaboration, and will provide natural synergy with non Web use cases, since it's the standard bytecode format for shaders there already. So collaboration argument goes for SPIR-V here. Human readability of the shader shipped from the page is a different argument, and it can have some merit, but the same could be argued against using WebAssembly for instance which is not very human readable in comparison with JavaScript. I don't think it's a strong argument against using it.
- Jasper_ 7y agoI've had enough experience with deploying GLSL on many Android devices and also WebGL to be disillusioned with it. There's no great modern textual shading language out there, GLSL is missing a lot of modern niceities, HLSL isn't really an "independent language" (could talk more about that), and Apple's WHLSL/WSL proposal is drastically underspec'd to the point of hilarity. I think if you want to compile shaders from source, you are free to include your favorite transpiler as WebAssembly, like glslang. That's currently what I'm doing for my WebGPU prototype project.
- tomjakubowski 7y agoAs someone who's only used GLSL of all the shader languages, what are some of the modern features it's missing?
- Jasper_ 7y ago
- deleted 7y ago[deleted]
- Jasper_ 7y agoVulkan and OpenCL use two drastically different profiles of SPIR-V. You cannot just take OpenCL kernels and run them as compute shaders, huge portions of the execution model are different.
- floatboth 7y agoSome googlers are working on OpenCL source to Vulkan-profile-SPIR-V though: https://github.com/google/clspv https://github.com/google/clspv