Hash :
af727792
Author :
Date :
2020-06-10T21:55:43
Improve EGL_ANGLE_power_preference on dual-GPU MacBook Pros. Add the ability to release and reacquire the high-power GPU, and to respond to changes in the active GPU. In Chromium, the GPU process can not access the WindowServer. An external process must inform ANGLE that the active GPU has changed, and that ANGLE should switch its internal context to the new GPU. Incorporates a couple of functions from WebKit, used with permission, to effect this GPU switch. A follow-on change in Chromium which uses these new APIs will make the existing dual-GPU tests pass with ANGLE and the passthrough command decoder. Carry forward Chromium's workaround of disabling GPU switching on older MacBook Pros to ensure stability. Document the process of adding new EGL extensions to ANGLE. Bug: chromium:1091824 Change-Id: I499739156e851b493555d4d6e4aef87d8b97fa31 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2240638 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
<?xml version="1.0" encoding="UTF-8"?>
<registry>
<comment>
Copyright 2018 The ANGLE Project Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
egl_angle_ext.xml
Includes data used to auto-generate ANGLE classes.
</comment>
<!-- SECTION: EGL command definitions. -->
<commands namespace="EGL">
<command>
<proto><ptype>EGLDeviceEXT</ptype> <name>eglCreateDeviceANGLE</name></proto>
<param><ptype>EGLint</ptype> <name>device_type</name></param>
<param>void *<name>native_device</name></param>
<param>const <ptype>EGLattrib</ptype> *<name>attrib_list</name></param>
</command>
<command>
<proto><ptype>EGLBoolean</ptype> <name>eglReleaseDeviceANGLE</name></proto>
<param><ptype>EGLDeviceEXT</ptype> <name>device</name></param>
</command>
<command>
<proto><ptype>EGLBoolean</ptype> <name>eglCreateStreamProducerD3DTextureANGLE</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
<param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
<param>const <ptype>EGLAttrib</ptype> *<name>attrib_list</name></param>
</command>
<command>
<proto><ptype>EGLBoolean</ptype> <name>eglStreamPostD3DTextureANGLE</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
<param><ptype>EGLStreamKHR</ptype> <name>stream</name></param>
<param>void *<name>texture</name></param>
<param>const <ptype>EGLAttrib</ptype> *<name>attrib_list</name></param>
</command>
<command>
<proto><ptype>EGLBoolean</ptype> <name>eglGetMscRateANGLE</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
<param><ptype>EGLSurface</ptype> <name>surface</name></param>
<param><ptype>EGLint</ptype> *<name>numerator</name></param>
<param><ptype>EGLint</ptype> *<name>denominator</name></param>
</command>
<command>
<proto><ptype>EGLBoolean</ptype> <name>eglGetSyncValuesCHROMIUM</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
<param><ptype>EGLSurface</ptype> <name>surface</name></param>
<param><ptype>EGLuint64KHR</ptype> *<name>ust</name></param>
<param><ptype>EGLuint64KHR</ptype> *<name>msc</name></param>
<param><ptype>EGLuint64KHR</ptype> *<name>sbc</name></param>
</command>
<command>
<proto><ptype>EGLint</ptype> <name>eglProgramCacheGetAttribANGLE</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
<param><ptype>EGLenum</ptype> <name>attrib</name></param>
</command>
<command>
<proto>void <name>eglProgramCacheQueryANGLE</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
<param><ptype>EGLint</ptype> <name>index</name></param>
<param>void *<name>key</name></param>
<param><ptype>EGLint</ptype> *<name>keysize</name></param>
<param>void *<name>binary</name></param>
<param><ptype>EGLint</ptype> *<name>binarysize</name></param>
</command>
<command>
<proto>void <name>eglProgramCachePopulateANGLE</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
<param>const void *<name>key</name></param>
<param><ptype>EGLint</ptype> <name>keysize</name></param>
<param>const void *<name>binary</name></param>
<param><ptype>EGLint</ptype> <name>binarysize</name></param>
</command>
<command>
<proto><ptype>EGLint</ptype> <name>eglProgramCacheResizeANGLE</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
<param><ptype>EGLint</ptype> <name>limit</name></param>
<param><ptype>EGLint</ptype> <name>mode</name></param>
</command>
<command>
<proto><ptype>const char *</ptype> <name>eglQueryStringiANGLE</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
<param><ptype>EGLint</ptype> <name>name</name></param>
<param><ptype>EGLint</ptype> <name>index</name></param>
</command>
<command>
<proto><ptype>EGLBoolean</ptype> <name>eglDisplayAttribANGLE</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
<param><ptype>EGLint</ptype> <name>attribute</name></param>
<param><ptype>EGLAttrib *</ptype> <name>value</name></param>
</command>
<command>
<proto><pytpe>EGLBoolean</pytpe> <name>eglSwapBuffersWithFrameTokenANGLE</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
<param><ptype>EGLSurface</ptype> <name>surface</name></param>
<param><ptype>EGLFrameTokenANGLE</ptype> <name>frametoken</name></param>
</command>
<command>
<proto><pytpe>void</pytpe> <name>eglReleaseHighPowerGPUANGLE</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
<param><ptype>EGLContext</ptype> <name>ctx</name></param>
</command>
<command>
<proto><pytpe>void</pytpe> <name>eglReacquireHighPowerGPUANGLE</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
<param><ptype>EGLContext</ptype> <name>ctx</name></param>
</command>
<command>
<proto><pytpe>void</pytpe> <name>eglHandleGPUSwitchANGLE</name></proto>
<param><ptype>EGLDisplay</ptype> <name>dpy</name></param>
</command>
</commands>
<!-- SECTION: ANGLE extension interface definitions -->
<extensions>
<extension name="EGL_ANGLE_device_creation" supported="egl">
<require>
<command name="eglCreateDeviceANGLE"/>
<command name="eglReleaseDeviceANGLE"/>
</require>
</extension>
<extension name="EGL_ANGLE_feature_control" supported="egl">
<require>
<command name="eglQueryStringiANGLE"/>
<command name="eglQueryDisplayAttribANGLE"/>
</require>
</extension>
<extension name="EGL_ANGLE_stream_producer_d3d_texture" supported="egl">
<require>
<command name="eglCreateStreamProducerD3DTextureANGLE"/>
<command name="eglStreamPostD3DTextureANGLE"/>
</require>
</extension>
<extension name="EGL_CHROMIUM_sync_control" supported="egl">
<require>
<command name="eglGetSyncValuesCHROMIUM"/>
</require>
</extension>
<extension name="EGL_ANGLE_sync_control_rate" supported="egl">
<require>
<command name="eglGetMscRateANGLE"/>
</require>
</extension>
<extension name="EGL_ANGLE_program_cache_control" supported="egl">
<require>
<command name="eglProgramCacheGetAttribANGLE"/>
<command name="eglProgramCacheQueryANGLE"/>
<command name="eglProgramCachePopulateANGLE"/>
<command name="eglProgramCacheResizeANGLE"/>
</require>
</extension>
<extension name="EGL_ANGLE_swap_with_frame_token" supported="egl">
<require>
<command name="eglSwapBuffersWithFrameTokenANGLE"/>
</require>
</extension>
<extension name="EGL_ANGLE_power_preference" supported="egl">
<require>
<command name="eglReleaseHighPowerGPUANGLE"/>
<command name="eglReacquireHighPowerGPUANGLE"/>
<command name="eglHandleGPUSwitchANGLE"/>
</require>
</extension>
</extensions>
</registry>