commit 28f62ab3bb114cf1efb1ab41a2f48c6321e2e8a4
parent 7bcabe02b22c661c043a779cd5f9e96ab8c913b5
Author: Andrew Osmond <aosmond@gmail.com>
Date: Wed, 15 Oct 2025 01:33:35 +0000
Bug 1984293 - Make the wildcard (all) vendor types apply correctly to mixed refresh rate rules. r=gfx-reviewers,lsalzman
There are no GfxDeviceFamily objects for the DeviceFamily::*All enums.
Instead these rule checks rely upon the DeviceVendor being set correctly
in the rule. Unfortunately we missed this for the mixed refresh rate
blocklist rules, which meant we used the default, which applies to all
vendors, regardless of the supplied DeviceFamily enum in the macro for
the individual rule definitions.
As such, this was causing us to apply blocking DirectComposition for
users with a mixed refresh rate on all GPUs, not just NVIDIA.
Differential Revision: https://phabricator.services.mozilla.com/D268634
Diffstat:
2 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/widget/GfxDriverInfo.cpp b/widget/GfxDriverInfo.cpp
@@ -49,8 +49,9 @@ GfxDriverInfo::GfxDriverInfo(
mGpu2(gpu2) {}
GfxDriverInfo::GfxDriverInfo(
- OperatingSystem os, already_AddRefed<const GfxDeviceFamily> devices,
- int32_t feature, int32_t featureStatus, RefreshRateStatus refreshRateStatus,
+ OperatingSystem os, const nsAString& vendor,
+ already_AddRefed<const GfxDeviceFamily> devices, int32_t feature,
+ int32_t featureStatus, RefreshRateStatus refreshRateStatus,
VersionComparisonOp minRefreshRateOp, uint32_t minRefreshRate,
uint32_t minRefreshRateMax, VersionComparisonOp maxRefreshRateOp,
uint32_t maxRefreshRate, uint32_t maxRefreshRateMax, const char* ruleId,
@@ -63,6 +64,7 @@ GfxDriverInfo::GfxDriverInfo(
mMaxRefreshRateMax(maxRefreshRateMax),
mMaxRefreshRateComparisonOp(maxRefreshRateOp),
mRefreshRateStatus(refreshRateStatus),
+ mAdapterVendor(vendor),
mDevices(devices),
mFeature(feature),
mFeatureStatus(featureStatus),
diff --git a/widget/GfxDriverInfo.h b/widget/GfxDriverInfo.h
@@ -51,15 +51,16 @@
DriverVendor::All, devices, feature, featureStatus, driverComparator, \
driverVersion, ruleId)
-#define APPEND_TO_DRIVER_BLOCKLIST_REFRESH_RATE( \
- os, devices, feature, featureStatus, refreshRateStatus, \
- minRefreshRateComparator, minRefreshRate, minRefreshRateMax, \
- maxRefreshRateComparator, maxRefreshRate, maxRefreshRateMax, ruleId, \
- suggestedVersion) \
- sDriverInfo->AppendElement(MakeAndAddRef<GfxDriverInfo>( \
- os, GfxDriverInfo::GetDeviceFamily(devices), feature, featureStatus, \
- refreshRateStatus, minRefreshRateComparator, minRefreshRate, \
- minRefreshRateMax, maxRefreshRateComparator, maxRefreshRate, \
+#define APPEND_TO_DRIVER_BLOCKLIST_REFRESH_RATE( \
+ os, devices, feature, featureStatus, refreshRateStatus, \
+ minRefreshRateComparator, minRefreshRate, minRefreshRateMax, \
+ maxRefreshRateComparator, maxRefreshRate, maxRefreshRateMax, ruleId, \
+ suggestedVersion) \
+ sDriverInfo->AppendElement(MakeAndAddRef<GfxDriverInfo>( \
+ os, (nsAString&)GfxDriverInfo::GetDeviceVendor(devices), \
+ GfxDriverInfo::GetDeviceFamily(devices), feature, featureStatus, \
+ refreshRateStatus, minRefreshRateComparator, minRefreshRate, \
+ minRefreshRateMax, maxRefreshRateComparator, maxRefreshRate, \
maxRefreshRateMax, ruleId, suggestedVersion))
#define APPEND_TO_DRIVER_BLOCKLIST_RANGE_EXT( \
@@ -352,7 +353,7 @@ class GfxDriverInfo final {
bool gpu2 = false);
// For blocking on refresh rates rather than driver versions.
- GfxDriverInfo(OperatingSystem os,
+ GfxDriverInfo(OperatingSystem os, const nsAString& vendor,
already_AddRefed<const GfxDeviceFamily> devices,
int32_t feature, int32_t featureStatus,
RefreshRateStatus refreshRateStatus,