Bug 1485441 - Don't enable robust buffer access on Adreno 630 devices r=jgilbert
authorJamie Nicol <jnicol@mozilla.com>
Fri, 12 Oct 2018 15:57:32 +0000
changeset 499344 b2ddfd6799978bd4b8bd2d2c92079d14099a0ac3
parent 499343 e9e765c5d7f7ec8b357f7c120aa153d1b5d18dfc
child 499345 a471f63471541d373a70dbc4676dd0249122e187
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1485441
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1485441 - Don't enable robust buffer access on Adreno 630 devices r=jgilbert It was causing the linking of some shaders to fail. Differential Revision: https://phabricator.services.mozilla.com/D8207
gfx/gl/GLContextProviderEGL.cpp
--- a/gfx/gl/GLContextProviderEGL.cpp
+++ b/gfx/gl/GLContextProviderEGL.cpp
@@ -579,19 +579,26 @@ GLContextEGL::CreateGLContext(CreateCont
     std::vector<EGLint> robustness_attribs;
     std::vector<EGLint> rbab_attribs; // RBAB: Robust Buffer Access Behavior
     if (flags & CreateContextFlags::PREFER_ROBUSTNESS) {
         if (egl->IsExtensionSupported(GLLibraryEGL::EXT_create_context_robustness)) {
             robustness_attribs = required_attribs;
             robustness_attribs.push_back(LOCAL_EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT);
             robustness_attribs.push_back(LOCAL_EGL_LOSE_CONTEXT_ON_RESET_EXT);
 
-            rbab_attribs = robustness_attribs;
-            rbab_attribs.push_back(LOCAL_EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT);
-            rbab_attribs.push_back(LOCAL_EGL_TRUE);
+            // Don't enable robust buffer access on Adreno 630 devices.
+            // It causes the linking of some shaders to fail. See bug 1485441.
+            nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();
+            nsAutoString renderer;
+            gfxInfo->GetAdapterDeviceID(renderer);
+            if (renderer.Find("Adreno (TM) 630") == -1) {
+                rbab_attribs = robustness_attribs;
+                rbab_attribs.push_back(LOCAL_EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT);
+                rbab_attribs.push_back(LOCAL_EGL_TRUE);
+            }
         } else if (egl->IsExtensionSupported(GLLibraryEGL::KHR_create_context)) {
             robustness_attribs = required_attribs;
             robustness_attribs.push_back(LOCAL_EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR);
             robustness_attribs.push_back(LOCAL_EGL_LOSE_CONTEXT_ON_RESET_KHR);
 
             rbab_attribs = robustness_attribs;
             rbab_attribs.push_back(LOCAL_EGL_CONTEXT_FLAGS_KHR);
             rbab_attribs.push_back(LOCAL_EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR);