WebGL2 vs WebGPU support

375 views
Skip to first unread message

Ivan Popelyshev

unread,
Apr 13, 2023, 7:26:58 AM4/13/23
to WebGL Dev List
Hello! I think its time to start another real productive discussion.

I'm asking question from regular gamedev perspective:

Suppose we have a device where WebGL2 works fine. What's probability that WebGPU works there too?

Ivan.

Leonid Petrunya

unread,
Apr 13, 2023, 9:59:14 AM4/13/23
to WebGL Dev List
I think that first of all it is necessary to destroy the planetary evil in the face of Russia.

четверг, 13 апреля 2023 г. в 14:26:58 UTC+3, ivan.po...@gmail.com:

Brandon Jones

unread,
Apr 13, 2023, 12:37:15 PM4/13/23
to webgl-d...@googlegroups.com
The top comment on this WebGPU issue is typically kept up-to-date with WebGPU's support targets. I don't know what % of WebGL 2-capable devices that represents, but it should be a relatively high number. We certainly aren't targeting only the latest and greatest hardware.

As a quick anecdote, the entire Pixel lineup of devices (2016+) should support WebGPU once it's released on Android, but a Nexus 5X that I was testing on (2015) didn't have all the required Vulkan extensions, so it missed the cut. Sorry to any of you out there still sporting those little hand warmers. :)

--Brandon


--
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-lis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/webgl-dev-list/13140c13-9746-4827-b431-336748af5554n%40googlegroups.com.

Leonid Petrunya

unread,
Apr 13, 2023, 2:01:59 PM4/13/23
to webgl-d...@googlegroups.com
WebGPU? I don't even think about switching to WebGL2. I write programs for WebGL1. The main problem is not in technology, but in the crooked brains of programmers ;)

чт, 13 апр. 2023 г. в 19:37, 'Brandon Jones' via WebGL Dev List <webgl-d...@googlegroups.com>:

Nick Cooper

unread,
Apr 13, 2023, 7:40:27 PM4/13/23
to webgl-d...@googlegroups.com
One issue we run into with WebGL2, which I suspect will be "worse" with WebGPU - is laptops. Both OSX/Win Chrome will choose the lower-powered integrated GPU by default and don't respect the option for a high-performance GPU. Many laptops (esp gaming ones) in our experience are dual-GPU and this makes them in-effect unusable.

Does WebGPU change the device selection logic?

Currently our work-around is educate users [and maybe in future Electron] about the appropriate flag to force the high powered GPU at the process level.

Thanks,

Nick.

Kelsey Gilbert

unread,
Apr 13, 2023, 7:52:06 PM4/13/23
to webgl-d...@googlegroups.com
If a browser doesn’t want to let you use the dgpu, it won’t let you, and choice of API is unlikely to change that. I think you should follow up with Chrome about not being able to use the dgpu where available though!

Nick Cooper

unread,
Apr 13, 2023, 8:03:30 PM4/13/23
to webgl-d...@googlegroups.com
My point was more that the availability of it doesn't imply you should nessecarily use it as it isn't clear the igpu would be as capable. 

But yeah understood on chrome team,

Nick. 

Brandon Jones

unread,
Apr 13, 2023, 10:11:45 PM4/13/23
to webgl-d...@googlegroups.com
WebGPU allows you to supply a "high-performance" or "low-power" hint during the adapter (GPU) request. The browser still has leeway to select whichever GPU it feels is best, so it's not a guarantee, but in Chrome at least we try to respect it unless something prevents that.

Nick Cooper

unread,
Apr 13, 2023, 11:21:52 PM4/13/23
to webgl-d...@googlegroups.com
At least current chrome always chooses low FYI. Irrespective of preference. 

Brandon Jones

unread,
Apr 13, 2023, 11:39:03 PM4/13/23
to webgl-d...@googlegroups.com
That sounds either like a bug or something that has specifically been blocked on the hardware you are using. I know that in the past some laptops with nvidia GPUs were configured to force the browser to run on the integrated GPU to save battery. I thought they stopped shipping that configuration, but it's worth double checking on your hardware.

Nick Cooper

unread,
Apr 13, 2023, 11:43:14 PM4/13/23
to webgl-d...@googlegroups.com

Ken Russell

unread,
Apr 18, 2023, 1:15:11 AM4/18/23
to webgl-d...@googlegroups.com
Nick, the current situation is as follows:

- Dual Intel/AMD MacBook Pros are the only configuration where Chrome currently has the ability to select the high-performance GPU. The Chrome team is working to expand this support to Windows.

- On Chrome Stable/Beta/Dev on macOS, where ANGLE's OpenGL backend is still in use, { powerPreference: 'high-performance' } should select the AMD GPU. I've just confirmed this is working on a 2018 MacBook Pro with shadertoy.com, which always uses the high-performance GPU when it's available.

- On ANGLE's Metal backend, which may be randomly chosen on Chrome Canary, dual-GPU support is almost done - but the final bugs are being ironed out in crbug.com/1421053 .

If you are seeing different behavior, then please create a minimized test case, file a bug on crbug.com, and include both the test case and the contents of about:gpu from your machine. Post the bug ID here when it's filed.

Finally, everyone - please keep conversations respectful and on-topic. I appreciate the fact that there's a huge amount of stress in the world right now, but this mailing list is specifically a space for respectfully coming together as colleagues to discuss the WebGL API.

-Ken



Message has been deleted

Oleksandr Popov

unread,
Apr 19, 2023, 3:10:30 AM4/19/23
to WebGL Dev List
On Windows 10 it is possible to switch GPU on OS level per application. Please note that it will always use selected GPU for any kind of hardware acceleration, not just WebGL/WebGPU. To test stuff I assigned Chrome executable to use GeForce 3060 and laptop fans spun up even when watching Youtube. So you may want to switch it back from discrete to integrated GPU after testing.

Nick Cooper

unread,
Apr 19, 2023, 8:47:02 AM4/19/23
to webgl-d...@googlegroups.com
Thanks for the summary, it matches exactly our experience (is what I was mentioning above)

Nick. 

Reply all
Reply to author
Forward
0 new messages