Bug 224337 - [Metal-ANGLE] Support GPU power preferences, select low-power GPU by default.
Summary: [Metal-ANGLE] Support GPU power preferences, select low-power GPU by default.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-08 13:00 PDT by Kyle Piddington
Modified: 2021-04-09 03:27 PDT (History)
7 users (show)

See Also:


Attachments
Patch (6.58 KB, patch)
2021-04-08 13:01 PDT, Kyle Piddington
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Piddington 2021-04-08 13:00:29 PDT
[Metal-ANGLE] Support GPU power preferences, select low-power GPU by default.
Comment 1 Kyle Piddington 2021-04-08 13:01:28 PDT
Created attachment 425537 [details]
Patch
Comment 2 EWS Watchlist 2021-04-08 13:02:16 PDT
Note that there are important steps to take when updating ANGLE. See https://trac.webkit.org/wiki/UpdatingANGLE
Comment 3 Jon Lee 2021-04-08 15:27:13 PDT
rdar://75823830
Comment 4 Dean Jackson 2021-04-08 15:43:41 PDT
Comment on attachment 425537 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=425537&action=review

> Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/DisplayMtl.mm:278
> +    //TODO: External GPU support. Do we prefer high power / low bandwidth for general WebGL applications?
> +    //      Can we support hot-swapping in GPU's?

This is a good question. I would assume that if someone has an external GPU they want to use it. And it is likely that their display is running through it or, even if it's a laptop, they are using it as the primary display. So we should probably use any external GPU before even checking for the low-power/high-power flag. But this doesn't need to be fixed now.
Comment 5 EWS 2021-04-08 15:54:27 PDT
Committed r275685 (236319@main): <https://commits.webkit.org/236319@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 425537 [details].
Comment 6 Kimmo Kinnunen 2021-04-09 03:27:08 PDT
Comment on attachment 425537 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=425537&action=review

> Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/DisplayMtl.mm:432
> +    outExtensions->powerPreference = true;

This is not really correct, I don't think the implementation supports the methods defined in the extension..