WebGL2 examples require WebGPU support on Chrome v124 #5703
Labels
area: documentation
Documentation for crate items, public or private
type: bug
Something isn't working
Description
I've tried to test some examples in https://wgpu.rs/examples/. Since I'm on Linux, WebGPU is disabled by default. What is surprising, is that WebGL2 examples do not work either unless I jump through the hoops of enabling WebGPU.
AFAICT, this happens because Chrome does expose
navigator.gpu
even if WebGPU is disabled, however it will returnnull
forrequestAdapter
.Now, I'm not sure why WebGL2 backend even tries to access
navigator.gpu
, but apparently it does, and crashes when it getsnull
as the result ofrequestAdapter
.Everything works when WebGPU is forcibly on, but the point of WebGL2 is it should work when WebGPU doesn't.
Repro steps
Try to open any example, e.g. https://wgpu.rs/examples/?backend=webgl2&example=hello_triangle, using WebGL2 backend on Google Chrome / Chromium v124 on Linux with WebGPU disabled.
Expected vs observed behavior
Expected: example works
Observed:
Extra materials
None.
Platform
Google Chrome Version 124.0.6367.118 (Official Build) (64-bit)
The text was updated successfully, but these errors were encountered: