Commit 4a006d69 authored by Seungha Yang's avatar Seungha Yang 🐑

glcontext/egl: Fix build with upstream ANGLE

ANGLE_surface_d3d_render_to_back_buffer extension is only available
with Microsoft fork of ANGLE. Note that Microsoft's ANGLE repository
has been deprecated.
parent d176f67d
Pipeline #109621 passed with stages
in 44 minutes and 58 seconds
......@@ -826,7 +826,7 @@ gst_gl_context_egl_create_context (GstGLContext * context,
window_handle = gst_gl_window_get_window_handle (window);
if (window_handle) {
#if GST_GL_HAVE_WINDOW_WINRT
#if GST_GL_HAVE_WINDOW_WINRT && defined (EGL_ANGLE_SURFACE_RENDER_TO_BACK_BUFFER)
const EGLint attrs[] = {
/* EGL_ANGLE_SURFACE_RENDER_TO_BACK_BUFFER is an optimization that can
* have large performance benefits on mobile devices. */
......@@ -939,7 +939,7 @@ gst_gl_context_egl_activate (GstGLContext * context, gboolean activate)
gst_object_unref (window);
}
if (handle && handle != egl->window_handle) {
#if GST_GL_HAVE_WINDOW_WINRT
#if GST_GL_HAVE_WINDOW_WINRT && defined (EGL_ANGLE_SURFACE_RENDER_TO_BACK_BUFFER)
const EGLint attrs[] = {
/* EGL_ANGLE_SURFACE_RENDER_TO_BACK_BUFFER is an optimization that can
* have large performance benefits on mobile devices. */
......
......@@ -196,11 +196,13 @@ gst_gl_display_egl_get_from_native (GstGLDisplayType type, guintptr display)
* attributes if the hardware supports D3D11 Feature Level 10_0+. */
EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
#ifdef EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER
/* EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER is an optimization
* that can have large performance benefits on mobile devices. Its
* syntax is subject to change, though. Please update your Visual
* Studio templates if you experience compilation issues with it. */
EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, EGL_TRUE,
#endif
/* EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE is an option that
* enables ANGLE to automatically call the IDXGIDevice3::Trim method
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment