When I run webgl content on my laptop, the content uses the built-in intel GPU (to the max!), rather than using the dedicated GPU. Is there anyway to force the use of the dedicated GPU from the website side?
(You can force through power and nvidia settings a certain GPU to be fully used by a web browser, but that is not ideal for end users to have to do)
This was with 2019.4.24, will check on it thanks - edit: seems different, can it be done on 2019 LTS?
This was previously a big stopping block with webgl, along with Mac Safari complaining about energy use! - though they may have changed that now.
Agreed, the documentation is not quite general here. The name âwebglContextAttributesâ there maps to the official WebGL specification and its âwebglContextAttributesâ field at WebGL Specification . So it should be possible to configure any context attribute field from there.
Itâs an old issue, but I found that on Windows laptops by default it wonât let apps decide the GPU to run on (and defaults to the integrated one instead of the dedicated one), so these changes didnât have any effect for me.
You need to go to Windows Settings > System > Display > Graphics, press Add desktop app, and find your browser executable (in my case C:/Program Files/Mozilla Firefox/firefox.exe) once you add it, expand itâs options and set GPU performance to the High Performance (and name of your GPU in brackets).
Also for Firefox specifically you might need to navigate to a page about:config and set webgl.enable-privileged-extensions flag to true.
P.S. Remember to restart the browser after these changes.