Files
Powei Feng d49eb5e111 webgpu: add initial WebGPU support on Emscripten
This commit introduces the initial implementation for WebGPU on the
web via Emscripten. It enables the WebGPU backend in Filament when
compiling for WebAssembly, allowing both WebGL and WebGPU to be
shipped in the same filament.wasm binary.

Major changes:
- Build & CMake: Configured the WASM build to append the linker flag
  `--use-port=emdawnwebgpu` and enable the WebGPU backend alongside WebGL.
- Platform Bridge: Added `WebGPUPlatformWasm`, connecting Filament's
  WebGPU backend to the browser via `emscripten_webgpu_get_device()`.
- JS Bindings: Updated `utilities.js`, `extensions.js`, and `wasmloader.js`
  to support asynchronous WebGPU adapter and device initialization
  (`initWebGPU()`), skipping WebGL initialization when WEBGPU is selected.
- Workarounds: Integrated polyfills for Emscripten Dawn limitations,
  including bypassing buggy pipeline layout bindings for `immediateSize`
  and disabling unsupported WASM features like `TransientAttachments`.
2026-05-01 17:02:08 -07:00
..