Bug 1024256 - Blacklist S3TC extension on OSX 10.9 Intel HD 3000 driver because of buggy glCompressedTexSubImage2D with sub-image update; r=jgilbert
authorDan Glastonbury <dglastonbury@mozilla.com>
Mon, 16 Jun 2014 09:30:04 +1000
changeset 188819 1f78f3fe8475bed92e64e497042cf515746a8b5d
parent 188818 850dc2171ec777e03eee180b1d2748e12bbfbb0a
child 188820 60cbb07392c39b181e26235aa8e716f583f86d0d
push id44918
push userdglastonbury@mozilla.com
push dateMon, 16 Jun 2014 02:34:18 +0000
treeherdermozilla-inbound@1f78f3fe8475 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1024256
milestone33.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 1024256 - Blacklist S3TC extension on OSX 10.9 Intel HD 3000 driver because of buggy glCompressedTexSubImage2D with sub-image update; r=jgilbert
gfx/gl/GLContext.cpp
gfx/gl/GLContext.h
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -580,17 +580,18 @@ GLContext::InitWithPrefix(const char *pr
                 "Adreno 200",
                 "Adreno 205",
                 "Adreno (TM) 205",
                 "Adreno (TM) 320",
                 "PowerVR SGX 530",
                 "PowerVR SGX 540",
                 "NVIDIA Tegra",
                 "Android Emulator",
-                "Gallium 0.4 on llvmpipe"
+                "Gallium 0.4 on llvmpipe",
+                "Intel HD Graphics 3000 OpenGL Engine",
         };
 
         mRenderer = GLRenderer::Other;
         for (size_t i = 0; i < size_t(GLRenderer::Other); ++i) {
             if (DoesStringMatch(glRendererString, rendererMatchStrings[i])) {
                 mRenderer = GLRenderer(i);
                 break;
             }
@@ -1326,16 +1327,30 @@ GLContext::InitExtensions()
         // buggy support for s3tc/dxt1 compressed textures.
         // See Bug 975824.
         MarkExtensionUnsupported(EXT_texture_compression_s3tc);
         MarkExtensionUnsupported(EXT_texture_compression_dxt1);
         MarkExtensionUnsupported(ANGLE_texture_compression_dxt3);
         MarkExtensionUnsupported(ANGLE_texture_compression_dxt5);
     }
 
+#ifdef XP_MACOSX
+    // Bug 1009642: On OSX Mavericks (10.9), the driver for Intel HD
+    // 3000 appears to be buggy WRT updating sub-images of S3TC
+    // textures with glCompressedTexSubImage2D. Works on Intel HD 4000
+    // and Intel HD 5000/Iris that I tested.
+    if (WorkAroundDriverBugs() &&
+        nsCocoaFeatures::OSXVersionMajor() == 10 &&
+        nsCocoaFeatures::OSXVersionMinor() == 9 &&
+        Renderer() == GLRenderer::IntelHD3000)
+    {
+        MarkExtensionUnsupported(EXT_texture_compression_s3tc);
+    }
+#endif
+
 #ifdef DEBUG
     firstRun = false;
 #endif
 }
 
 void
 GLContext::PlatformStartup()
 {
--- a/gfx/gl/GLContext.h
+++ b/gfx/gl/GLContext.h
@@ -140,16 +140,17 @@ MOZ_BEGIN_ENUM_CLASS(GLRenderer)
     Adreno205,
     AdrenoTM205,
     AdrenoTM320,
     SGX530,
     SGX540,
     Tegra,
     AndroidEmulator,
     GalliumLlvmpipe,
+    IntelHD3000,
     Other
 MOZ_END_ENUM_CLASS(GLRenderer)
 
 class GLContext
     : public GLLibraryLoader
     , public GenericAtomicRefCounted
 {
 // -----------------------------------------------------------------------------