Commit efb61667 authored by Geoff Lang's avatar Geoff Lang Committed by Commit Bot

Request exact GL context versions from ANGLE.

ANGLE is moving to support the more standard behaviour of returning a context
version that is backwards compatible with the requested version but this new
behaviour conflicts with what Chrome expects with the passthrough command
decoder.

BUG=angleproject:3425

Change-Id: I107b194fe2e3ad8e1707ab55155d6d74ee0b4735
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1602813Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658577}
parent ce69d4d9
......@@ -50,6 +50,11 @@
#define EGL_ROBUST_RESOURCE_INITIALIZATION_ANGLE 0x3453
#endif /* EGL_ANGLE_display_robust_resource_initialization */
#ifndef EGL_ANGLE_create_context_backwards_compatible
#define EGL_ANGLE_create_context_backwards_compatible 1
#define EGL_CONTEXT_OPENGL_BACKWARDS_COMPATIBLE_ANGLE 0x3483
#endif /* EGL_ANGLE_create_context_backwards_compatible */
#ifndef EGL_CONTEXT_PRIORITY_LEVEL_IMG
#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100
#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101
......@@ -183,6 +188,14 @@ bool GLContextEGL::Initialize(GLSurface* compatible_surface,
DCHECK(!attribs.robust_resource_initialization);
}
if (GLSurfaceEGL::HasEGLExtension(
"EGL_ANGLE_create_context_backwards_compatible")) {
// Request a specific context version. The Passthrough command decoder
// relies on the returned context being the exact version it requested.
context_attributes.push_back(EGL_CONTEXT_OPENGL_BACKWARDS_COMPATIBLE_ANGLE);
context_attributes.push_back(EGL_FALSE);
}
// Append final EGL_NONE to signal the context attributes are finished
context_attributes.push_back(EGL_NONE);
context_attributes.push_back(EGL_NONE);
......
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