Hacker News new | ask | show | jobs
by mistercow 567 days ago
I think there is a compelling reason to have WGSL as a separate language (but maybe not sufficiently compelling): WebGPU is a lowest common denominator which can only have features which are in the intersection of its target platforms, and so WGSL has no “dead syntax” to memorize. If the language spec says it’s there, you can use it, and you won’t find examples online of code that just won’t work in WebGPU because of missing features.

Of course, the f16 extension immediately weakens that, and demonstrates that this situation probably won’t last.

1 comments

It must not last, because any API that is the common denominator between 10 year old mobile SOCs and current year high end desktop GPUs is doomed to do injustice to either platform.
The only way for it to last would be for browsers to compile into some kind of compatibility layer for newer GPU features on older hardware, but that’s probably going to be extremely tough to do in some cases without killing performance on the older platforms, particularly if those features relate to things like synchronization.
Newer mobile GPUs worth a damn pretty much have the same feature set as desktop.

Except texture formats in case of Mali and Exynos w/ RDNA. But QCOM (since quite a while) and Apple (E17+) have a unified set there including BC7 support.

So perhaps split things into profiles, with a more modern profile where the only thing varying is texture format support.