[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Default powerPreference in Chrome



Hi Won,

Yes, it's the expected behavior. On Windows, Chrome and ANGLE don't currently have the ability to select a particular GPU (D3D device, actually). The first device enumerated by the driver - which is the one selected via that control panel setting - is the one that will be used for all of Chrome's work. Allowing Chrome to switch between both GPUs on Windows is a more involved project than it was to make it work on macOS. We hope to work on this next summer.

-Ken


On Mon, Dec 16, 2019 at 8:16 PM Won Chun (won@cbrebuild.com) <public_webgl@khronos.org> wrote:

Ken,

Thanks for the heads up, Ken!

This led me to make some changes and do some testing on various
platforms, and I noticed that on a Win10 hybrid GPU system, the only
way to use the NVIDIA dGPU was from the control panel setting --
powerPreference didn't seem to make a difference. Is this the expected
current behavior? Are you saying that a future version of Chrome will
make the GPU switching work with powerPreference? Or will there always
be some kind of driver shenanigan necessary?

-Won

On 12/11/19, Ken Russell (kbr@google.com) <public_webgl@khronos.org> wrote:
> Dear WebGL community,
>
> A change is forthcoming in the Chrome browser which only affects dual-GPU
> MacBook Pros right now, but may affect dual-GPU Windows laptops in the near
> future.
>
> Chrome used to treat WebGL's "default" powerPreference context creation
> option as "high-performance". In Chrome 80, in order to save battery life
> and improve the user experience on these dual-GPU machines, the default has
> been changed to "low-power". Note that Safari on macOS has had this
> behavior for some time now.
>
> Applications with computationally expensive shaders, complex geometry, or
> which approach peak GPU utilization may want to explicitly specify the
> 'high-performance' powerPreference during WebGL context creation. Note that
> this carries a user experience cost, as switching between the integrated
> and discrete GPUs causes the system to stutter for ~1 second.
>
> Note also that Chrome will deliver context lost notifications more often
> upon GPU switches, when it determines that OpenGL resources couldn't be
> automatically migrated between GPUs. (Multisampled renderbuffers, in
> particular, are subject to this limitation - and this will likely apply to
> all operating systems.) Please use the WEBGL_lose_context extension
> <https://www.khronos.org/registry/webgl/extensions/WEBGL_lose_context/> to
> ensure that your applications are robust to context loss and restored
> events; see Handling Context Loss
> <https://www.khronos.org/webgl/wiki/HandlingContextLost> on the WebGL wiki.
>
> Chrome Canary already contains these changes; please test with it and
> report any bugs on Chromium's issue tracker <http://crbug.com/>. Please
> feel free to directly email me the IDs of any bugs you file to make sure
> they aren't lost.
>
> Thanks,
>
> -Ken
>

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------