Branch
Hash :
f422f21a
Author :
Date :
2021-11-09T18:42:15
Reland "Metal: Reintroduce GPU power preference selection code." This reverts commit 67a8cf07a740c5ce3aafd2ad7fddd370451b3525. Reason for revert: Landed Chromium-side dependency: https://chromium-review.googlesource.com/c/chromium/src/+/3271170 Original change's description: > Revert "Metal: Reintroduce GPU power preference selection code." > > This reverts commit 017161701b7dbf70a13f3c180a39e1fa45c27d9f. > > Reason for revert: Blocking roller, please re-land with the fix. > > Original change's description: > > Metal: Reintroduce GPU power preference selection code. > > > > This CL re-introduces the GPU power preference code to > > the metal backend. It also reworks EGLDisplay caching > > in the frontend to cache based on the native display > > as well as the power preference attribute. > > A new extension, EGL_ANGLE_display_power_preference is > > added based on EGL_ANGLE_power_preference. This extension > > is a client extension that allows selection of GPU on > > display creation, similar to how GPUs are selected on > > context creation in EGL_ANGLE_power_preference. > > This CL adds EGLDisplayPowerPreferenceTest and enables it on > > the metal backend. > > > > Bug: angleproject:6143 > > Change-Id: I0a081dcd2e3f18ab365fdd3498ddcb6e2ba35212 > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3231986 > > Reviewed-by: Kenneth Russell <kbr@chromium.org> > > Reviewed-by: Jamie Madill <jmadill@chromium.org> > > Reviewed-by: Gregg Tavares <gman@chromium.org> > > Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> > > TBR=kbr@chromium.org,gman@chromium.org,jonahr@google.com,jmadill@chromium.org,angle-scoped@luci-project-accounts.iam.gserviceaccount.com > > Change-Id: I4f775bf7139253a87b033a30e0da2100b3c1bb02 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: angleproject:6143 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270749 > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> # Not skipping CQ checks because this is a reland. Bug: angleproject:6143 Change-Id: Id9b0a5cbb76e4dea9e2f2da2b1c47a0587dfdaf5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3270970 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
Name
ANGLE_display_power_preference
Name Strings
EGL_ANGLE_display_power_preference
Contributors
Kenneth Russell
Jonah Ryan-Davis
Contacts
Kenneth Russell, Google Inc. (kbr 'at' google.com)
Jonah Ryan-Davis, Google Inc. (jonahr 'at' google.com)
Status
Draft
Version
Version 1, Oct 20, 2021
Number
EGL Extension #??
Extension Type
EGL client extension
Dependencies
This extension is written against the wording of the EGL 1.4
Specification.
Overview
This extension allows selection of the high- or low-power GPU on
dual-GPU systems, specifically on macOS.
New Types
None
New Tokens
Accepted as an attribute name in the <attrib_list> argument to
eglGetPlatformDisplayEXT:
EGL_POWER_PREFERENCE_ANGLE 0x3482
Accepted as an attribute value in the <attrib_list> argument to
eglGetPlatformDisplayEXT:
EGL_LOW_POWER_ANGLE 0x0001
EGL_HIGH_POWER_ANGLE 0x0002
Additions to the EGL 1.4 Specification
Add the following to section 3.7.1 "Creating Rendering Contexts":
EGL_POWER_PREFERENCE_ANGLE indicates whether the display should be
created on the integrated (low-power) or discrete (high-power) GPU
on dual-GPU systems. EGL_POWER_PREFERENCE_ANGLE is only a legal
display creation attribute when the EGL_ANGLE_power_preference
extension is advertised. The valid values for this attribute are
EGL_LOW_POWER_ANGLE and EGL_HIGH_POWER_ANGLE. If this extension is
advertised and this display creation attribute is not specified,
the default value is EGL_LOW_POWER_ANGLE.
Issues
None yet.
Revision History
Rev. Date Author Changes
---- ------------- --------- ----------------------------------------
1 Oct 20, 2021 jonahr Extension based off
EGL_ANGLE_power_preference