Bug 1371190 - (Rebase)Bug 1364169 - on ANGLE context creation asks for robustness but does not get it draft
authorSamuel Vargas <svargas@mozilla.com>
Thu, 11 May 2017 11:31:24 -0700
changeset 673345 6577897c8f49ce491bd1d37fc25a56eeb56a0049
parent 673344 10450d063b5773d11ac6d9ed6e1deea1f6069cbd
child 673346 e6b2dbcd1f86b77f25cf7f005c998a2a03675c6a
child 674752 3af17dc71c7f6830241ec0c088419489ebe1dde0
push id82540
push userbmo:cleu@mozilla.com
push dateMon, 02 Oct 2017 10:12:46 +0000
bugs1371190, 1364169
milestone58.0a1
Bug 1371190 - (Rebase)Bug 1364169 - on ANGLE context creation asks for robustness but does not get it
gfx/angle/src/libANGLE/Context.cpp
--- a/gfx/angle/src/libANGLE/Context.cpp
+++ b/gfx/angle/src/libANGLE/Context.cpp
@@ -158,18 +158,26 @@ EGLint GetClientMinorVersion(const egl::
 
 gl::Version GetClientVersion(const egl::AttributeMap &attribs)
 {
     return gl::Version(GetClientMajorVersion(attribs), GetClientMinorVersion(attribs));
 }
 
 GLenum GetResetStrategy(const egl::AttributeMap &attribs)
 {
-    EGLAttrib attrib = attribs.get(EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT,
-                                   EGL_NO_RESET_NOTIFICATION_EXT);
+    EGLAttrib attrib = attribs.get(EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR, 0);
+    if (!attrib)
+    {
+        attrib = attribs.get(EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT, 0);
+    }
+    if (!attrib)
+    {
+        attrib = EGL_NO_RESET_NOTIFICATION;
+    }
+
     switch (attrib)
     {
         case EGL_NO_RESET_NOTIFICATION:
             return GL_NO_RESET_NOTIFICATION_EXT;
         case EGL_LOSE_CONTEXT_ON_RESET:
             return GL_LOSE_CONTEXT_ON_RESET_EXT;
         default:
             UNREACHABLE();