Backed out changeset e602ff8fea83 (bug 1689064) for assertion failures in gfxFeature.cpp. CLOSED TREE

This commit is contained in:
Brindusan Cristian 2021-02-11 13:28:24 +02:00
parent e97cf43b8c
commit 8859fc3907
8 changed files with 22 additions and 105 deletions

View File

@ -38,8 +38,6 @@ void gfxConfigManager::Init() {
StaticPrefs::layers_gpu_process_allow_software_AtStartup();
mWrPartialPresent =
StaticPrefs::gfx_webrender_max_partial_present_rects_AtStartup() > 0;
mWrOptimizedShaders =
StaticPrefs::gfx_webrender_use_optimized_shaders_AtStartup();
#ifdef XP_WIN
mWrForceAngle = StaticPrefs::gfx_webrender_force_angle_AtStartup();
mWrForceAngleNoGPUProcess = StaticPrefs::
@ -78,8 +76,6 @@ void gfxConfigManager::Init() {
mFeatureWrAngle = &gfxConfig::GetFeature(Feature::WEBRENDER_ANGLE);
mFeatureWrDComp = &gfxConfig::GetFeature(Feature::WEBRENDER_DCOMP_PRESENT);
mFeatureWrPartial = &gfxConfig::GetFeature(Feature::WEBRENDER_PARTIAL);
mFeatureWrOptimizedShaders =
&gfxConfig::GetFeature(Feature::WEBRENDER_OPTIMIZED_SHADERS);
mFeatureWrSoftware = &gfxConfig::GetFeature(Feature::WEBRENDER_SOFTWARE);
mFeatureHwCompositing = &gfxConfig::GetFeature(Feature::HW_COMPOSITING);
@ -407,18 +403,6 @@ void gfxConfigManager::ConfigureWebRender() {
}
}
}
mFeatureWrOptimizedShaders->EnableByDefault();
if (!mWrOptimizedShaders) {
mFeatureWrOptimizedShaders->UserDisable("User disabled via pref",
"FEATURE_FAILURE_PREF_DISABLED"_ns);
} else if (!mFeatureWr->IsEnabled()) {
mFeatureWrOptimizedShaders->ForceDisable(FeatureStatus::Unavailable,
"WebRender disabled",
"FEATURE_FAILURE_WR_DISABLED"_ns);
}
ConfigureFromBlocklist(nsIGfxInfo::FEATURE_WEBRENDER_OPTIMIZED_SHADERS,
mFeatureWrOptimizedShaders);
}
} // namespace gfx

View File

@ -24,7 +24,6 @@ class gfxConfigManager {
mFeatureWrAngle(nullptr),
mFeatureWrDComp(nullptr),
mFeatureWrPartial(nullptr),
mFeatureWrOptimizedShaders(nullptr),
mFeatureWrSoftware(nullptr),
mFeatureHwCompositing(nullptr),
mFeatureD3D11HwAngle(nullptr),
@ -38,7 +37,6 @@ class gfxConfigManager {
mWrDCompWinEnabled(false),
mWrCompositorDCompRequired(false),
mWrPartialPresent(false),
mWrOptimizedShaders(false),
mGPUProcessAllowSoftware(false),
mXRenderEnabled(false),
mWrEnvForceEnabled(false),
@ -67,7 +65,6 @@ class gfxConfigManager {
FeatureState* mFeatureWrAngle;
FeatureState* mFeatureWrDComp;
FeatureState* mFeatureWrPartial;
FeatureState* mFeatureWrOptimizedShaders;
FeatureState* mFeatureWrSoftware;
FeatureState* mFeatureHwCompositing;
@ -87,7 +84,6 @@ class gfxConfigManager {
bool mWrDCompWinEnabled;
bool mWrCompositorDCompRequired;
bool mWrPartialPresent;
bool mWrOptimizedShaders;
bool mGPUProcessAllowSoftware;
bool mXRenderEnabled;

View File

@ -16,25 +16,24 @@
namespace mozilla {
namespace gfx {
#define GFX_FEATURE_MAP(_) \
/* Name, Type, Description */ \
_(HW_COMPOSITING, Feature, "Compositing") \
_(D3D11_COMPOSITING, Feature, "Direct3D11 Compositing") \
_(OPENGL_COMPOSITING, Feature, "OpenGL Compositing") \
_(DIRECT2D, Feature, "Direct2D") \
_(D3D11_HW_ANGLE, Feature, "Direct3D11 hardware ANGLE") \
_(DIRECT_DRAW, Feature, "DirectDraw") \
_(GPU_PROCESS, Feature, "GPU Process") \
_(WEBRENDER, Feature, "WebRender") \
_(WEBRENDER_QUALIFIED, Feature, "WebRender qualified") \
_(WEBRENDER_COMPOSITOR, Feature, "WebRender native compositor") \
_(WEBRENDER_PARTIAL, Feature, "WebRender partial present") \
_(WEBRENDER_OPTIMIZED_SHADERS, Feature, "WebRender optimized shaders") \
_(WEBRENDER_ANGLE, Feature, "WebRender ANGLE") \
_(WEBRENDER_DCOMP_PRESENT, Feature, "WebRender DirectComposition") \
_(WEBRENDER_SOFTWARE, Feature, "WebRender software fallback") \
_(OMTP, Feature, "Off Main Thread Painting") \
_(WEBGPU, Feature, "WebGPU") \
#define GFX_FEATURE_MAP(_) \
/* Name, Type, Description */ \
_(HW_COMPOSITING, Feature, "Compositing") \
_(D3D11_COMPOSITING, Feature, "Direct3D11 Compositing") \
_(OPENGL_COMPOSITING, Feature, "OpenGL Compositing") \
_(DIRECT2D, Feature, "Direct2D") \
_(D3D11_HW_ANGLE, Feature, "Direct3D11 hardware ANGLE") \
_(DIRECT_DRAW, Feature, "DirectDraw") \
_(GPU_PROCESS, Feature, "GPU Process") \
_(WEBRENDER, Feature, "WebRender") \
_(WEBRENDER_QUALIFIED, Feature, "WebRender qualified") \
_(WEBRENDER_COMPOSITOR, Feature, "WebRender native compositor") \
_(WEBRENDER_PARTIAL, Feature, "WebRender partial present") \
_(WEBRENDER_ANGLE, Feature, "WebRender ANGLE") \
_(WEBRENDER_DCOMP_PRESENT, Feature, "WebRender DirectComposition") \
_(WEBRENDER_SOFTWARE, Feature, "WebRender software fallback") \
_(OMTP, Feature, "Off Main Thread Painting") \
_(WEBGPU, Feature, "WebGPU") \
/* Add new entries above this comment */
enum class Feature : uint32_t {

View File

@ -22,7 +22,6 @@ class MockGfxInfo final : public nsIGfxInfo {
int32_t mStatusWr;
int32_t mStatusWrCompositor;
int32_t mStatusWrSoftware;
int32_t mStatusWrOptimizedShaders;
int32_t mMaxRefreshRate;
bool mHasMixedRefreshRate;
Maybe<bool> mHasBattery;
@ -34,7 +33,6 @@ class MockGfxInfo final : public nsIGfxInfo {
: mStatusWr(nsIGfxInfo::FEATURE_ALLOW_ALWAYS),
mStatusWrCompositor(nsIGfxInfo::FEATURE_STATUS_OK),
mStatusWrSoftware(nsIGfxInfo::FEATURE_DENIED),
mStatusWrOptimizedShaders(nsIGfxInfo::FEATURE_STATUS_OK),
mMaxRefreshRate(-1),
mHasMixedRefreshRate(false),
mHasBattery(Some(false)),
@ -53,9 +51,6 @@ class MockGfxInfo final : public nsIGfxInfo {
case nsIGfxInfo::FEATURE_WEBRENDER_SOFTWARE:
*_retval = mStatusWrSoftware;
break;
case nsIGfxInfo::FEATURE_WEBRENDER_OPTIMIZED_SHADERS:
*_retval = mStatusWrOptimizedShaders;
break;
default:
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -263,7 +258,6 @@ class GfxConfigManager : public ::testing::Test, public gfxConfigManager {
mFeatureWrAngle = &mFeatures.mWrAngle;
mFeatureWrDComp = &mFeatures.mWrDComp;
mFeatureWrPartial = &mFeatures.mWrPartial;
mFeatureWrOptimizedShaders = &mFeatures.mWrOptimizedShaders;
mFeatureHwCompositing = &mFeatures.mHwCompositing;
mFeatureD3D11HwAngle = &mFeatures.mD3D11HwAngle;
mFeatureGPUProcess = &mFeatures.mGPUProcess;
@ -282,7 +276,6 @@ class GfxConfigManager : public ::testing::Test, public gfxConfigManager {
mWrCompositorEnabled.emplace(true);
mWrPartialPresent = true;
mWrOptimizedShaders = true;
mWrForceAngle = true;
mWrDCompWinEnabled = true;
mWrCompositorDCompRequired = true;
@ -298,7 +291,6 @@ class GfxConfigManager : public ::testing::Test, public gfxConfigManager {
mFeatures.mWrAngle.Reset();
mFeatures.mWrDComp.Reset();
mFeatures.mWrPartial.Reset();
mFeatures.mWrOptimizedShaders.Reset();
mFeatures.mHwCompositing.Reset();
mFeatures.mD3D11HwAngle.Reset();
mFeatures.mGPUProcess.Reset();
@ -312,7 +304,6 @@ class GfxConfigManager : public ::testing::Test, public gfxConfigManager {
FeatureState mWrAngle;
FeatureState mWrDComp;
FeatureState mWrPartial;
FeatureState mWrOptimizedShaders;
FeatureState mHwCompositing;
FeatureState mD3D11HwAngle;
FeatureState mGPUProcess;
@ -334,7 +325,6 @@ TEST_F(GfxConfigManager, WebRenderDefault) {
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
EXPECT_TRUE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -351,7 +341,6 @@ TEST_F(GfxConfigManager, WebRenderNoPartialPresent) {
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
EXPECT_TRUE(mFeatures.mWrDComp.IsEnabled());
EXPECT_FALSE(mFeatures.mWrPartial.IsEnabled());
EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -375,7 +364,6 @@ TEST_F(GfxConfigManager, WebRenderScaledResolutionWithHwStretching) {
EXPECT_TRUE(mFeatures.mWrCompositor.IsEnabled());
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
EXPECT_TRUE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
@ -393,7 +381,6 @@ TEST_F(GfxConfigManager, WebRenderScaledResolutionNoHwStretching) {
EXPECT_FALSE(mFeatures.mWrCompositor.IsEnabled());
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
EXPECT_TRUE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
@ -410,7 +397,6 @@ TEST_F(GfxConfigManager, WebRenderEnabledWithDisableHwCompositingNoWr) {
EXPECT_TRUE(mFeatures.mWrCompositor.IsEnabled());
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
EXPECT_TRUE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
@ -429,7 +415,6 @@ TEST_F(GfxConfigManager, WebRenderDisabledWithDisableHwCompositingNoWr) {
EXPECT_FALSE(mFeatures.mWrAngle.IsEnabled());
EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled());
EXPECT_FALSE(mFeatures.mWrPartial.IsEnabled());
EXPECT_FALSE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_FALSE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_FALSE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -448,7 +433,6 @@ TEST_F(GfxConfigManager, WebRenderDisabledWithAllowSoftwareGPUProcess) {
EXPECT_FALSE(mFeatures.mWrAngle.IsEnabled());
EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled());
EXPECT_FALSE(mFeatures.mWrPartial.IsEnabled());
EXPECT_FALSE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_FALSE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -466,7 +450,6 @@ TEST_F(GfxConfigManager, WebRenderSafeMode) {
EXPECT_FALSE(mFeatures.mWrAngle.IsEnabled());
EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled());
EXPECT_FALSE(mFeatures.mWrPartial.IsEnabled());
EXPECT_FALSE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -483,7 +466,6 @@ TEST_F(GfxConfigManager, WebRenderEarlierThanWindows10) {
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -500,7 +482,6 @@ TEST_F(GfxConfigManager, WebRenderDCompDisabled) {
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -518,7 +499,6 @@ TEST_F(GfxConfigManager, WebRenderDCompNotRequired) {
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -535,7 +515,6 @@ TEST_F(GfxConfigManager, WebRenderForceAngleDisabled) {
EXPECT_FALSE(mFeatures.mWrAngle.IsEnabled());
EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -552,7 +531,6 @@ TEST_F(GfxConfigManager, WebRenderD3D11HwAngleDisabled) {
EXPECT_FALSE(mFeatures.mWrAngle.IsEnabled());
EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled());
EXPECT_FALSE(mFeatures.mWrPartial.IsEnabled());
EXPECT_FALSE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_FALSE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -570,7 +548,6 @@ TEST_F(GfxConfigManager, WebRenderD3D11HwAngleAndForceAngleDisabled) {
EXPECT_FALSE(mFeatures.mWrAngle.IsEnabled());
EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_FALSE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -587,7 +564,6 @@ TEST_F(GfxConfigManager, WebRenderGPUProcessDisabled) {
EXPECT_FALSE(mFeatures.mWrAngle.IsEnabled());
EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled());
EXPECT_FALSE(mFeatures.mWrPartial.IsEnabled());
EXPECT_FALSE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_FALSE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -604,7 +580,6 @@ TEST_F(GfxConfigManager, WebRenderQualifiedAndBlocklistAllowQualified) {
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
EXPECT_TRUE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -622,7 +597,6 @@ TEST_F(GfxConfigManager, WebRenderQualifiedAndBlocklistAllowAlways) {
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
EXPECT_TRUE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -643,7 +617,6 @@ TEST_F(GfxConfigManager, WebRenderIntelBatteryNoHwStretchingNotNightly) {
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
EXPECT_TRUE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -662,7 +635,6 @@ TEST_F(GfxConfigManager, WebRenderNvidiaHighMixedRefreshRateNightly) {
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
EXPECT_TRUE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -681,7 +653,6 @@ TEST_F(GfxConfigManager, WebRenderNvidiaHighMixedRefreshRateNotNightly) {
EXPECT_FALSE(mFeatures.mWrAngle.IsEnabled());
EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled());
EXPECT_FALSE(mFeatures.mWrPartial.IsEnabled());
EXPECT_FALSE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -698,7 +669,6 @@ TEST_F(GfxConfigManager, WebRenderNvidiaHighRefreshRateNotNightly) {
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
EXPECT_TRUE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -716,7 +686,6 @@ TEST_F(GfxConfigManager, WebRenderNvidiaLowMixedRefreshRateNotNightly) {
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
EXPECT_TRUE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -734,7 +703,6 @@ TEST_F(GfxConfigManager, WebRenderWhenXRenderEnabled) {
EXPECT_FALSE(mFeatures.mWrAngle.IsEnabled());
EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled());
EXPECT_FALSE(mFeatures.mWrPartial.IsEnabled());
EXPECT_FALSE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -754,7 +722,6 @@ TEST_F(GfxConfigManager, WebRenderSofwareAndQualified) {
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
EXPECT_TRUE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -774,7 +741,6 @@ TEST_F(GfxConfigManager, WebRenderSofwareAndNotQualified) {
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_FALSE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -791,7 +757,6 @@ TEST_F(GfxConfigManager, WebRenderForceDisabledEnvvar) {
EXPECT_FALSE(mFeatures.mWrAngle.IsEnabled());
EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled());
EXPECT_FALSE(mFeatures.mWrPartial.IsEnabled());
EXPECT_FALSE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -809,7 +774,6 @@ TEST_F(GfxConfigManager, WebRenderSoftwareAllowedForceDisabledEnvvar) {
EXPECT_FALSE(mFeatures.mWrAngle.IsEnabled());
EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled());
EXPECT_FALSE(mFeatures.mWrPartial.IsEnabled());
EXPECT_FALSE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -827,7 +791,6 @@ TEST_F(GfxConfigManager, WebRenderSoftwareAllowedForceDisabledPref) {
EXPECT_FALSE(mFeatures.mWrAngle.IsEnabled());
EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled());
EXPECT_FALSE(mFeatures.mWrPartial.IsEnabled());
EXPECT_FALSE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -845,7 +808,6 @@ TEST_F(GfxConfigManager, WebRenderForceSoftwareForceDisabledEnvvar) {
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_FALSE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -863,7 +825,6 @@ TEST_F(GfxConfigManager, WebRenderForceEnabledEnvvar) {
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
EXPECT_TRUE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -882,7 +843,6 @@ TEST_F(GfxConfigManager, WebRenderSoftwareAllowedForceEnabledEnvvar) {
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
EXPECT_TRUE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -901,7 +861,6 @@ TEST_F(GfxConfigManager, WebRenderSoftwareAllowedForceEnabledPref) {
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
EXPECT_TRUE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_TRUE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());
@ -920,7 +879,6 @@ TEST_F(GfxConfigManager, WebRenderForceSoftwareForceEnabledEnvvar) {
EXPECT_TRUE(mFeatures.mWrAngle.IsEnabled());
EXPECT_FALSE(mFeatures.mWrDComp.IsEnabled());
EXPECT_TRUE(mFeatures.mWrPartial.IsEnabled());
EXPECT_FALSE(mFeatures.mWrOptimizedShaders.IsEnabled());
EXPECT_TRUE(mFeatures.mHwCompositing.IsEnabled());
EXPECT_TRUE(mFeatures.mGPUProcess.IsEnabled());
EXPECT_TRUE(mFeatures.mD3D11HwAngle.IsEnabled());

View File

@ -2733,8 +2733,9 @@ void gfxPlatform::InitWebRenderConfig() {
gfxVars::SetUseWebRenderProgramBinaryDisk(hasWebRender);
}
gfxVars::SetUseWebRenderOptimizedShaders(
gfxConfig::IsEnabled(Feature::WEBRENDER_OPTIMIZED_SHADERS));
if (StaticPrefs::gfx_webrender_use_optimized_shaders_AtStartup()) {
gfxVars::SetUseWebRenderOptimizedShaders(hasWebRender);
}
gfxVars::SetUseSoftwareWebRender(!hasHardware && hasSoftware);

View File

@ -228,9 +228,6 @@ static const char* GetPrefNameForFeature(int32_t aFeature) {
case nsIGfxInfo::FEATURE_WEBRENDER_SOFTWARE:
name = BLOCKLIST_PREF_BRANCH "webrender.software";
break;
case nsIGfxInfo::FEATURE_WEBRENDER_OPTIMIZED_SHADERS:
name = BLOCKLIST_PREF_BRANCH "webrender.optimized-shaders";
break;
default:
MOZ_ASSERT_UNREACHABLE("Unexpected nsIGfxInfo feature?!");
break;

View File

@ -653,22 +653,6 @@ nsresult GfxInfo::GetFeatureStatusImpl(
}
return NS_OK;
}
if (aFeature == FEATURE_WEBRENDER_OPTIMIZED_SHADERS) {
// Optimized shaders result in completely broken rendering in at least one
// Mali-T6xx device. Disable on all T6xx as a precaution until we know
// more specifically which devices are affected. See bug 1689064 for
// details.
const bool isMaliT6xx =
mGLStrings->Renderer().Find("Mali-T6", /*ignoreCase*/ true) >= 0;
if (isMaliT6xx) {
*aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
aFailureId = "FEATURE_FAILURE_BUG_1689064";
} else {
*aStatus = nsIGfxInfo::FEATURE_STATUS_OK;
}
return NS_OK;
}
}
return GfxInfoBase::GetFeatureStatusImpl(

View File

@ -171,10 +171,8 @@ interface nsIGfxInfo : nsISupports
const long FEATURE_THREADSAFE_GL = 31;
/* Support running WebRender using the software backend, starting in 84. */
const long FEATURE_WEBRENDER_SOFTWARE = 32;
/* Whether webrender uses pre-optimized shaders, starting in 87. */
const long FEATURE_WEBRENDER_OPTIMIZED_SHADERS = 33;
/* the maximum feature value. */
const long FEATURE_MAX_VALUE = FEATURE_WEBRENDER_OPTIMIZED_SHADERS;
const long FEATURE_MAX_VALUE = FEATURE_WEBRENDER_SOFTWARE;
/*
* A set of return values from GetFeatureStatus