Bug 1026404 - Disable OES_EGL_image and OES_EGL_image_external on SGX 544 MP devices. r?edwin draft
authorJamie Nicol <jnicol@mozilla.com>
Wed, 26 Oct 2016 15:28:08 +0100
changeset 429822 6cd929d5d1b3642cdf2aaa7138c7e20f22d68258
parent 429594 f9f3cc95d7282f1fd83f66dd74acbcdbfe821915
child 535061 280b243416004102b5de76e7cd34fd330cb138d9
push id33668
push userbmo:jnicol@mozilla.com
push dateWed, 26 Oct 2016 16:06:02 +0000
reviewersedwin
bugs1026404
milestone52.0a1
Bug 1026404 - Disable OES_EGL_image and OES_EGL_image_external on SGX 544 MP devices. r?edwin EGLImageTargetTexture2D crashes on SGX 544 MP GPUs on Kit Kat with either GL_TEXTURE_2D or GL_TEXTURE_EXTERNAL as the texture target. This means that both OES_EGL_image and OES_EGL_image_external extensions do not work and must be avoided. MozReview-Commit-ID: DJmtUL6kexC
gfx/gl/GLContext.cpp
gfx/gl/GLContext.h
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -820,16 +820,17 @@ GLContext::InitWithPrefixImpl(const char
         "Adreno (TM) 305",
         "Adreno (TM) 320",
         "Adreno (TM) 330",
         "Adreno (TM) 420",
         "Mali-400 MP",
         "Mali-450 MP",
         "PowerVR SGX 530",
         "PowerVR SGX 540",
+        "PowerVR SGX 544MP",
         "NVIDIA Tegra",
         "Android Emulator",
         "Gallium 0.4 on llvmpipe",
         "Intel HD Graphics 3000 OpenGL Engine",
         "Microsoft Basic Render Driver",
         "Unknown"
     };
 
@@ -1796,16 +1797,27 @@ GLContext::InitExtensions()
 
         if (Vendor() == GLVendor::Imagination &&
             Renderer() == GLRenderer::SGX540)
         {
             // Bug 980048
             MarkExtensionUnsupported(OES_EGL_sync);
         }
 
+#ifdef MOZ_WIDGET_ANDROID
+        if (Vendor() == GLVendor::Imagination &&
+            Renderer() == GLRenderer::SGX544MP &&
+            AndroidBridge::Bridge()->GetAPIVersion() < 21)
+        {
+            // Bug 1026404
+            MarkExtensionUnsupported(OES_EGL_image);
+            MarkExtensionUnsupported(OES_EGL_image_external);
+        }
+#endif
+
         if (Vendor() == GLVendor::ARM &&
             (Renderer() == GLRenderer::Mali400MP ||
              Renderer() == GLRenderer::Mali450MP))
         {
             // Bug 1264505
             MarkExtensionUnsupported(OES_EGL_image_external);
         }
 
--- a/gfx/gl/GLContext.h
+++ b/gfx/gl/GLContext.h
@@ -175,16 +175,17 @@ enum class GLRenderer {
     AdrenoTM305,
     AdrenoTM320,
     AdrenoTM330,
     AdrenoTM420,
     Mali400MP,
     Mali450MP,
     SGX530,
     SGX540,
+    SGX544MP,
     Tegra,
     AndroidEmulator,
     GalliumLlvmpipe,
     IntelHD3000,
     MicrosoftBasicRenderDriver,
     Other
 };