jgrulich / rpms / firefox

Forked from rpms/firefox 4 years ago
Clone
61879d2
diff -up firefox-101.0/gfx/thebes/gfxPlatformGtk.cpp.D147874.diff firefox-101.0/gfx/thebes/gfxPlatformGtk.cpp
61879d2
--- firefox-101.0/gfx/thebes/gfxPlatformGtk.cpp.D147874.diff	2022-05-27 01:16:54.000000000 +0200
61879d2
+++ firefox-101.0/gfx/thebes/gfxPlatformGtk.cpp	2022-06-07 11:16:03.791419558 +0200
61879d2
@@ -233,13 +233,7 @@ void gfxPlatformGtk::InitDmabufConfig()
61879d2
 void gfxPlatformGtk::InitVAAPIConfig() {
61879d2
   FeatureState& feature = gfxConfig::GetFeature(Feature::VAAPI);
61879d2
 #ifdef MOZ_WAYLAND
61879d2
-  feature.DisableByDefault(FeatureStatus::Disabled,
61879d2
-                           "VAAPI is disabled by default",
61879d2
-                           "FEATURE_VAAPI_DISABLED"_ns);
61879d2
-
61879d2
-  if (StaticPrefs::media_ffmpeg_vaapi_enabled()) {
61879d2
-    feature.UserForceEnable("Force enabled by pref");
61879d2
-  }
61879d2
+  feature.EnableByDefault();
61879d2
 
61879d2
   nsCString failureId;
61879d2
   int32_t status;
61879d2
@@ -253,6 +247,10 @@ void gfxPlatformGtk::InitVAAPIConfig() {
61879d2
                     failureId);
61879d2
   }
61879d2
 
61879d2
+  if (StaticPrefs::media_ffmpeg_vaapi_enabled()) {
61879d2
+    feature.UserForceEnable("Force enabled by pref");
61879d2
+  }
61879d2
+
61879d2
   if (!gfxVars::UseEGL()) {
61879d2
     feature.ForceDisable(FeatureStatus::Unavailable, "Requires EGL",
61879d2
                          "FEATURE_FAILURE_REQUIRES_EGL"_ns);
61879d2
diff -up firefox-101.0/widget/gtk/GfxInfo.cpp.D147874.diff firefox-101.0/widget/gtk/GfxInfo.cpp
61879d2
--- firefox-101.0/widget/gtk/GfxInfo.cpp.D147874.diff	2022-05-27 01:17:06.000000000 +0200
61879d2
+++ firefox-101.0/widget/gtk/GfxInfo.cpp	2022-06-07 09:52:54.416701418 +0200
61879d2
@@ -843,6 +843,31 @@ const nsTArray<GfxDriverInfo>& GfxInfo::
61879d2
         V(495, 44, 0, 0), "FEATURE_FAILURE_NO_GBM", "495.44.0");
61879d2
 
61879d2
     ////////////////////////////////////
61879d2
+    // FEATURE_VAAPI
61879d2
+    APPEND_TO_DRIVER_BLOCKLIST_EXT(
61879d2
+        OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All,
61879d2
+        DesktopEnvironment::All, WindowProtocol::All, DriverVendor::MesaAll,
61879d2
+        DeviceFamily::All, nsIGfxInfo::FEATURE_VAAPI,
61879d2
+        nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION, DRIVER_LESS_THAN,
61879d2
+        V(21, 0, 0, 0), "FEATURE_ROLLOUT_VAAPI_MESA", "Mesa 21.0.0.0");
61879d2
+
61879d2
+    // Disable on all NVIDIA hardware
61879d2
+    APPEND_TO_DRIVER_BLOCKLIST_EXT(
61879d2
+        OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All,
61879d2
+        DesktopEnvironment::All, WindowProtocol::All, DriverVendor::All,
61879d2
+        DeviceFamily::NvidiaAll, nsIGfxInfo::FEATURE_VAAPI,
61879d2
+        nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED,
61879d2
+        V(0, 0, 0, 0), "FEATURE_FAILURE_VAAPI_NO_LINUX_NVIDIA", "");
61879d2
+
61879d2
+    // Disable on all AMD devices not using Mesa.
61879d2
+    APPEND_TO_DRIVER_BLOCKLIST_EXT(
61879d2
+        OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All,
61879d2
+        DesktopEnvironment::All, WindowProtocol::All, DriverVendor::NonMesaAll,
61879d2
+        DeviceFamily::AtiAll, nsIGfxInfo::FEATURE_VAAPI,
61879d2
+        nsIGfxInfo::FEATURE_BLOCKED_DEVICE, DRIVER_COMPARISON_IGNORED,
61879d2
+        V(0, 0, 0, 0), "FEATURE_FAILURE_VAAPI_NO_LINUX_AMD", "");
61879d2
+
61879d2
+    ////////////////////////////////////
61879d2
     // FEATURE_WEBRENDER_PARTIAL_PRESENT
61879d2
     APPEND_TO_DRIVER_BLOCKLIST_EXT(
61879d2
         OperatingSystem::Linux, ScreenSizeStatus::All, BatteryStatus::All,