Граф коммитов

11 Коммитов

Автор SHA1 Сообщение Дата
Jamie Madill 3efa290d95 EGL: Auto-generate validation header.
This is a first step towards auto-generating more EGL code. It
includes format handling for all the EGL parameter types, type
reinterpretation for EGL types using the "packed enum" handling,
and code refactoring to support the new consistent validation
entry point pattern.

Bug: angleproject:2621
Change-Id: I2740e82928db311aa934825cbe74bd75bf49c33c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2552976
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2020-11-25 01:49:45 +00:00
Kenneth Russell af72779224 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>
2020-06-12 23:38:22 +00:00
Jonah Ryan-Davis 4b94d7bb4f Split EGL_CHROMIUM_sync_control into EGL_ANGLE_sync_control_rate
eglGetMscRateCHROMIUM was added to EGL_CHROMIUM_sync_control based
on the original extension GLX_OML_sync_control. However, this new
function is not universally implemented. This CL moves it to a new
extension, EGL_ANGLE_sync_control_rate, and renames it to
eglGetMscRateANGLE.

Bug: chromium:1064078
Change-Id: Ia2a29c6776b2b2bf2b98e58ee83b5f141ed01301
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2118154
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
2020-03-31 20:55:48 +00:00
Jonah Ryan-Davis 1a1a1427fd Expose eglGetMscRateCHROMIUM from EGL_CHROMIUM_sync_control
When ANGLE is using the GL backend on GLX, we can expose
eglGetMscRateCHROMIUM via glXGetMscRateOML. Otherwise, this function
should return false.

Bug: chromium:1042393
Change-Id: Id9b308c2217e07ee9860e2869be0e23b7a0c7411
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2017048
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2020-01-27 19:30:45 +00:00
Jamie Madill c898ec1a5e Add EGL GGP extensions.
This CL adds two new extensions:

 * EGL_ANGLE_ggp_stream_descriptor:
    Introduces a new attribute to CreateWindowSurface. Allows the app
    to pass in a stream descriptor to VkCreateSurfaceKHR.
    Mirrors VK_GGP_stream_descriptor_surface.

 * EGL_ANGLE_swap_with_frame_token:
    Introduces a new function 'eglSwapBuffersWithFrameTokenANGLE'. This
    allows the app to pass a GGP frame token down to vkQueuePresentKHR.
    Mirrors VK_GGP_frame_token.

Bug: angleproject:4078
Change-Id: I4313ac4c264e68999905049f661bc64b44f72fab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1897315
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2019-11-05 01:50:17 +00:00
Jonah Ryan-Davis e431aaa15a Rename EGL_ANGLE_workaround_control to EGL_ANGLE_feature_control.
For consistency, call these ANGLE "features", a subset of which may be
workarounds. Also, whether the feature is enabled/disabled should be
publically visible as "status".

Bug: angleproject:1621
Change-Id: I0de90a932fbfe1fc9b59138153d616d29fa7268b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1643410
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2019-06-04 18:51:44 +00:00
Jonah Ryan-Davis 2dd40a44d1 Add eglQueryDisplayAttribANGLE to query workarounds count.
Add eglQueryDisplayAttribANGLE based on eglQueryDisplayAttribEXT to add
behavior for quering the count of all workarounds available. Used
externally to build a list of workarounds.

Bug: angleproject:1621

Change-Id: I793acedc76111fd018600169d58bf5d8cf4a63ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1637817
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-06-03 22:36:28 +00:00
Jonah Ryan-Davis f52f2637ae Add EGL_ANGLE_workaround_control extension.
This extension is used to query strings from an array based on index,
which will be used to query all the information about workarounds in
ANGLE.

Bug: angleproject:1621

Change-Id: I27157f278f7f17c92c8b4fd7753e2a5ecd0528f6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1627723
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-05-29 19:39:42 +00:00
Jamie Madill 4638dc9def Re-land "Load correct libGLESv2 on Linux and Mac."
Re-land fixes build to ensure commit_id is built before libEGL.

libEGL was implicitly loading libGLESv2 on startup. This is bad
because on platforms like Linux and Mac we could sometimes use the
incorrect rpath. This in turn meant we needed workarounds like using
"_angle" extensions to our shared objects to get the correct loading
behaviour.

Fix this by loading libGLESv2 dynamically in libEGL. We build the
loader automatically from egl.xml. The loader itself is lazily
initialized on every EGL entry point call. This is necessary because
on Linux, etc, there is no equivalent to Windows' DLLMain.

We also use an EGL.h with different generation options so we have the
proper function pointer types. A README is included for instructions
on how to regenerate EGL.h.

The entry point generation script is refactored into a helper class
that is used in the loader generator. Also adds the libGLESv2 versions
of the EGL entry points in the DEF file on Windows. This allows them to
be imported properly in 32-bit configurations.

Also fixes up some errors in ANGLE's entry point definitions. Also
includes a clang-format disable rule for the Khronos headers.

This CL will help us to run ANGLE tests against native drivers.

Bug: angleproject:2871
Bug: chromium:915731
Change-Id: I4192a938d1f4117cea1bf1399c98bda7ac25ddab
Reviewed-on: https://chromium-review.googlesource.com/c/1380511
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-12-18 18:54:44 +00:00
Yuly Novikov 175d918a1f Revert "Load correct libGLESv2 on Linux and Mac."
This reverts commit dd815b623e.

Reason for revert: Broke https://luci-milo.appspot.com/p/chromium/builders/luci.chromium.ci/win-rel/8006

Original change's description:
> Load correct libGLESv2 on Linux and Mac.
> 
> libEGL was implicitly loading libGLESv2 on startup. This is bad
> because on platforms like Linux and Mac we could sometimes use the
> incorrect rpath. This in turn meant we needed workarounds like using
> "_angle" extensions to our shared objects to get the correct loading
> behaviour.
> 
> Fix this by loading libGLESv2 dynamically in libEGL. We build the
> loader automatically from egl.xml. The loader itself is lazily
> initialized on every EGL entry point call. This is necessary because
> on Linux, etc, there is no equivalent to Windows' DLLMain.
> 
> We also use an EGL.h with different generation options so we have the
> proper function pointer types. A README is included for instructions
> on how to regenerate EGL.h.
> 
> The entry point generation script is refactored into a helper class
> that is used in the loader generator. Also adds the libGLESv2 versions
> of the EGL entry points in the DEF file on Windows. This allows them to
> be imported properly in 32-bit configurations.
> 
> Also fixes up some errors in ANGLE's entry point definitions. Also
> includes a clang-format disable rule for the Khronos headers.
> 
> This CL will help us to run ANGLE tests against native drivers.
> 
> Bug: angleproject:2871
> Change-Id: Id6ecf969308f17b1be4083538428c9c1a1836572
> Reviewed-on: https://chromium-review.googlesource.com/c/1370725
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>

TBR=ynovikov@chromium.org,geofflang@chromium.org,jmadill@chromium.org

Change-Id: I921b3c45435ab4f05cbc2d1c1172b4185d6257b0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2871
Reviewed-on: https://chromium-review.googlesource.com/c/1378887
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-12-16 19:53:36 +00:00
Jamie Madill dd815b623e Load correct libGLESv2 on Linux and Mac.
libEGL was implicitly loading libGLESv2 on startup. This is bad
because on platforms like Linux and Mac we could sometimes use the
incorrect rpath. This in turn meant we needed workarounds like using
"_angle" extensions to our shared objects to get the correct loading
behaviour.

Fix this by loading libGLESv2 dynamically in libEGL. We build the
loader automatically from egl.xml. The loader itself is lazily
initialized on every EGL entry point call. This is necessary because
on Linux, etc, there is no equivalent to Windows' DLLMain.

We also use an EGL.h with different generation options so we have the
proper function pointer types. A README is included for instructions
on how to regenerate EGL.h.

The entry point generation script is refactored into a helper class
that is used in the loader generator. Also adds the libGLESv2 versions
of the EGL entry points in the DEF file on Windows. This allows them to
be imported properly in 32-bit configurations.

Also fixes up some errors in ANGLE's entry point definitions. Also
includes a clang-format disable rule for the Khronos headers.

This CL will help us to run ANGLE tests against native drivers.

Bug: angleproject:2871
Change-Id: Id6ecf969308f17b1be4083538428c9c1a1836572
Reviewed-on: https://chromium-review.googlesource.com/c/1370725
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-12-16 14:04:28 +00:00