summaryrefslogtreecommitdiff
path: root/D149238.diff
blob: e89c1bf38ef2012112c3365be89b47f996a87a9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
diff -up firefox-102.0/gfx/config/gfxVars.h.D149238.diff firefox-102.0/gfx/config/gfxVars.h
--- firefox-102.0/gfx/config/gfxVars.h.D149238.diff	2022-06-23 09:08:47.000000000 +0200
+++ firefox-102.0/gfx/config/gfxVars.h	2022-06-28 16:40:54.130895063 +0200
@@ -91,7 +91,8 @@ class gfxVarReceiver;
   _(AllowWebGPU, bool, false)                                      \
   _(UseVP8HwDecode, bool, false)                                   \
   _(UseVP9HwDecode, bool, false)                                   \
-  _(HwDecodedVideoZeroCopy, bool, false)
+  _(HwDecodedVideoZeroCopy, bool, false)                           \
+  _(UseDMABufSurfaceExport, bool, true)
 
 /* Add new entries above this line. */
 
diff -up firefox-102.0/gfx/thebes/gfxPlatform.cpp.D149238.diff firefox-102.0/gfx/thebes/gfxPlatform.cpp
--- firefox-102.0/gfx/thebes/gfxPlatform.cpp.D149238.diff	2022-06-23 09:08:47.000000000 +0200
+++ firefox-102.0/gfx/thebes/gfxPlatform.cpp	2022-06-28 16:40:54.130895063 +0200
@@ -2861,6 +2861,17 @@ void gfxPlatform::InitWebGLConfig() {
       gfxVars::SetAllowEglRbab(false);
     }
   }
+
+  if (kIsWayland || kIsX11) {
+    // Disable EGL_MESA_image_dma_buf_export on mesa/radeonsi due to
+    // https://gitlab.freedesktop.org/mesa/mesa/-/issues/6666
+    nsString adapterDriverVendor;
+    gfxInfo->GetAdapterDriverVendor(adapterDriverVendor);
+    if (adapterDriverVendor.Find("mesa") != -1 &&
+        adapterDriverVendor.Find("radeonsi") != -1) {
+      gfxVars::SetUseDMABufSurfaceExport(false);
+    }
+  }
 }
 
 void gfxPlatform::InitWebGPUConfig() {
bgstack15