Re:Chrome Ships WebGPU
by orra on Thursday April 06, 2023 @05:42AM
(#35466245)
No SPIR-V was the cost of getting Apple on board.
[ Parent
| on HN ]
Re:Chrome Ships WebGPU
by madeofpalk on Thursday April 06, 2023 @05:56AM
(#35466330)
Getting Apple on board?
Wasn't Apple the originators of the propsal? https://webkit.org/blog/7380/next-generation-3d-graphics-on-... https://webkit.org/wp-content/uploads/webgpu-api-proposal.ht...
Apple has a Khronos allergy, and both SPIRV and GLSL are Khronos standards.
Also the original 3D API proposal from Apple was essentially a 1:1 Javascript shim for Metal, which looked quite different from WebGPU.
Apple also originally proposed a custom shading language which looked like - but wasn't quite - HLSL. Compared to that, WGSL is the saner solution (because translation from and to SPIRV is relatively straightforward).
Mostly caused by how Khronos has managed OpenCL, and ironically Vulkan is slowly adopting HLSL as the main shading language, as they don't plan to invest into improving GLSL any further.
...it's not quite as simple:
http://kvark.github.io/spirv/2021/05/01/spirv-horrors.html
WebGPU would most likely have to create its own subset of SPIRV anyway to fulfill the additional safety and validation requirements of the web platform.