engine icon indicating copy to clipboard operation
engine copied to clipboard

Add support for WebGPU compatibility mode

Open mvaligursky opened this issue 5 months ago • 1 comments

WebGPU Compatibility Mode WebGPU Compatibility mode is a version of WebGPU that, with some limits, can run on older devices. The idea is, if you can make your app run within some extra limits and restrictions then you can request a webgpu compatibility adapter and have your app run in more places. To give some idea what what you can do in compatibility mode, effectively nearly all WebGL2 programs could be converted to run on compatibility mode.

https://developer.chrome.com/blog/new-in-webgpu-139 https://webgpufundamentals.org/webgpu/lessons/webgpu-compatibility-mode.html https://gist.github.com/greggman/0dea9995e33393c546a4c2bd2a12e50e

mvaligursky avatar Aug 11 '25 15:08 mvaligursky

There are several limitations, which basically makes it as WebGL2 in terms of GPU features. I'm wandering, if it is added, and if the engine already uses some features in WebGPU that are not supported by compatibility mode, then it has to fallback to other "compatibility-friendly" implementation path. Which will be a bit more complex code-wide in WebGPU than in WebGL I assume. So there is very little benefit from that perspective.

But, if WebGPU compatibility mode is as performant as WebGL2, and it will be supported everywhere, where WebGL2 is, then it can provide a path for upgrading engine to a single GAPI. This needs a thorough investigation, and ensuring that all hidden obstacles are found, before such a massive move is made.

In terms of engine features design - it will have to be still the same: design feature and make sure if it is not supported by WebGL2 (now) / compatibility mode (in the future), that there is an alternative implementation path to support everyone.

Maksims avatar Aug 11 '25 20:08 Maksims