Skip to content

Commit

Permalink
Bug 1666272 - Use the HW ANGLE failure ID when disabled WebRender due…
Browse files Browse the repository at this point in the history
… to it. r=jrmuizel

We don't collect telemetry stats on why users don't get HW ANGLE,
however we can just share failure IDs with HW ANGLE when we disable
WebRender with UnavailableNoAngle.

Differential Revision: https://phabricator.services.mozilla.com/D90867
  • Loading branch information
aosmond committed Sep 21, 2020
1 parent 1daee6f commit 4cda819
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion gfx/config/gfxConfigManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ void gfxConfigManager::ConfigureWebRender() {
if (!mFeatureD3D11HwAngle->IsEnabled()) {
mFeatureWr->ForceDisable(FeatureStatus::UnavailableNoAngle,
"ANGLE is disabled",
"FEATURE_FAILURE_ANGLE_DISABLED"_ns);
mFeatureD3D11HwAngle->GetFailureId());
} else if (!mFeatureGPUProcess->IsEnabled() &&
(!mIsNightly || !mWrForceAngleNoGPUProcess)) {
// WebRender with ANGLE relies on the GPU process when on Windows
Expand Down
6 changes: 4 additions & 2 deletions gfx/thebes/DeviceManagerDx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,11 +655,13 @@ void DeviceManagerDx::CreateCompositorDevice(FeatureState& d3d11) {

if (!textureSharingWorks) {
gfxConfig::SetFailed(Feature::D3D11_HW_ANGLE, FeatureStatus::Broken,
"Texture sharing doesn't work");
"Texture sharing doesn't work",
"FEATURE_FAILURE_HW_ANGLE_NEEDS_TEXTURE_SHARING"_ns);
}
if (D3D11Checks::DoesRenderTargetViewNeedRecreating(device)) {
gfxConfig::SetFailed(Feature::D3D11_HW_ANGLE, FeatureStatus::Broken,
"RenderTargetViews need recreating");
"RenderTargetViews need recreating",
"FEATURE_FAILURE_HW_ANGLE_NEEDS_RTV_RECREATION"_ns);
}
if (XRE_IsParentProcess()) {
// It seems like this may only happen when we're using the NVIDIA gpu
Expand Down
5 changes: 3 additions & 2 deletions gfx/thebes/gfxWindowsPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ gfxWindowsPlatform::~gfxWindowsPlatform() {
static void UpdateANGLEConfig() {
if (!gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING)) {
gfxConfig::Disable(Feature::D3D11_HW_ANGLE, FeatureStatus::Disabled,
"D3D11 compositing is disabled");
"D3D11 compositing is disabled",
"FEATURE_FAILURE_HW_ANGLE_D3D11_DISABLED"_ns);
}
}

Expand Down Expand Up @@ -1256,7 +1257,7 @@ static void InitializeANGLEConfig() {
if (!gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING)) {
d3d11ANGLE.DisableByDefault(FeatureStatus::Unavailable,
"D3D11 compositing is disabled",
"FEATURE_FAILURE_D3D11_DISABLED"_ns);
"FEATURE_FAILURE_HW_ANGLE_D3D11_DISABLED"_ns);
return;
}

Expand Down
18 changes: 12 additions & 6 deletions widget/GfxInfoBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1659,12 +1659,18 @@ bool GfxInfoBase::InitFeatureObject(JSContext* aCx,

nsCString status;
auto value = aFeatureState.GetValue();
if (value == FeatureStatus::Blocklisted || value == FeatureStatus::Disabled ||
value == FeatureStatus::Unavailable || value == FeatureStatus::Blocked) {
status.AppendPrintf("%s:%s", FeatureStatusToString(value),
aFeatureState.GetFailureId().get());
} else {
status.Append(FeatureStatusToString(value));
switch (value) {
case FeatureStatus::Blocklisted:
case FeatureStatus::Disabled:
case FeatureStatus::Unavailable:
case FeatureStatus::UnavailableNoAngle:
case FeatureStatus::Blocked:
status.AppendPrintf("%s:%s", FeatureStatusToString(value),
aFeatureState.GetFailureId().get());
break;
default:
status.Append(FeatureStatusToString(value));
break;
}

JS::Rooted<JSString*> str(aCx, JS_NewStringCopyZ(aCx, status.get()));
Expand Down

0 comments on commit 4cda819

Please sign in to comment.