Closed Bug 1779866 Opened 2 years ago Closed 2 years ago

CI has no test coverage for dcomp overlays

Categories

(Core :: Graphics, defect, P1)

defect

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: jgilbert, Assigned: jgilbert)

References

Details

Attachments

(1 file, 1 obsolete file)

For example, there should have been a MOZ_CRASH from this change:
https://treeherder.mozilla.org/jobs?repo=try&revision=1d7967895cbe253db9b0435b291954d2879105a7

Severity: S3 → S2

A CI run with printfs:
https://treeherder.mozilla.org/jobs?repo=try&revision=9c8fa54e90d1e961a0d5522bd20d15e0b76b96a8

For "Job: Windows 10 x86 2004 WebRender debug Reftests test-windows10-32-2004-qr/debug-reftest R2":
https://treeherder.mozilla.org/jobs?repo=try&revision=9c8fa54e90d1e961a0d5522bd20d15e0b76b96a8&selectedTaskRun=bApMg48RQvCHqqXYCoywlQ.0

Excerpts

[task 2022-07-18T18:14:20.028Z] 18:14:20     INFO - gfxConfig::IsEnabled(Feature::WEBRENDER_DCOMP_PRESENT) -> true
[task 2022-07-18T18:14:20.029Z] 18:14:20     INFO - StaticPrefs::gfx_webrender_dcomp_video_overlay_win_AtStartup() -> true
[task 2022-07-18T18:14:20.029Z] 18:14:20     INFO - IsWin10AnniversaryUpdateOrLater() -> true
[task 2022-07-18T18:14:20.030Z] 18:14:20     INFO - gfxConfig::IsEnabled(Feature::WEBRENDER_COMPOSITOR) -> false
[task 2022-07-18T18:14:20.030Z] 18:14:20     INFO - StaticPrefs:: gfx_webrender_dcomp_video_overlay_win_force_enabled_AtStartup() -> false
[task 2022-07-18T18:14:20.030Z] 18:14:20     INFO - useVideoOverlay -> false
[task 2022-07-18T18:14:20.031Z] 18:14:20     INFO - useHwVideoZeroCopy -> true
[task 2022-07-18T18:14:20.031Z] 18:14:20     INFO - reuseDecoderDevice -> true
[task 2022-07-18T18:14:20.032Z] 18:14:20     INFO - gfxConfig::IsEnabled(Feature::WEBRENDER_COMPOSITOR) -> false
[task 2022-07-18T18:14:20.889Z] 18:14:20     INFO - GL_VENDOR: Google Inc. (NVIDIA)
[task 2022-07-18T18:14:20.889Z] 18:14:20     INFO - mVendor: NVIDIA
[task 2022-07-18T18:14:20.890Z] 18:14:20     INFO - GL_RENDERER: ANGLE (NVIDIA, NVIDIA Tesla M60 Direct3D11 vs_5_0 ps_5_0, D3D11-23.21.13.9181)
[task 2022-07-18T18:14:20.890Z] 18:14:20     INFO - mRenderer: Unknown
[task 2022-07-18T18:14:20.890Z] 18:14:20     INFO - mIsMesa: 0
[task 2022-07-18T18:14:22.033Z] 18:14:22     INFO - DCLayerTree::Create
[task 2022-07-18T18:14:22.034Z] 18:14:22     INFO - DCLayerTree::ctor
[task 2022-07-18T18:14:22.041Z] 18:14:22     INFO - [2022-07-18T18:14:22Z WARN  webrender::device::gl] Missing optimized shader source for gpu_cache_update
[task 2022-07-18T18:14:22.384Z] 18:14:22     INFO - [Child 1312, Main Thread] WARNING: Fallback to BasicLayerManager: file /builds/worker/checkouts/gecko/dom/ipc/BrowserChild.cpp:2816
[task 2022-07-18T18:14:22.384Z] 18:14:22     INFO - [2022-07-18T18:14:22Z WARN  webrender::device::gl] Cropping texture upload Box2D((0, 0), (0, 1)) to None
[task 2022-07-18T18:14:22.384Z] 18:14:22     INFO - [2022-07-18T18:14:22Z WARN  webrender::device::gl] Cropping texture upload Box2D((0, 0), (0, 1)) to None
[task 2022-07-18T18:14:22.384Z] 18:14:22     INFO - [2022-07-18T18:14:22Z WARN  webrender::device::gl] Cropping texture upload Box2D((0, 0), (0, 1)) to None
[task 2022-07-18T18:14:22.391Z] 18:14:22     INFO - [Child 1312, Main Thread] WARNING: Fallback to BasicLayerManager: file /builds/worker/checkouts/gecko/dom/ipc/BrowserChild.cpp:2816
[task 2022-07-18T18:14:22.398Z] 18:14:22     INFO - [Child 1312, Main Thread] WARNING: Fallback to BasicLayerManager: file /builds/worker/checkouts/gecko/dom/ipc/BrowserChild.cpp:2816
[task 2022-07-18T18:14:22.403Z] 18:14:22     INFO - [Child 1312, Main Thread] WARNING: Fallback to BasicLayerManager: file /builds/worker/checkouts/gecko/dom/ipc/BrowserChild.cpp:2816
[task 2022-07-18T18:14:22.409Z] 18:14:22     INFO - [Child 1312, Main Thread] WARNING: Fallback to BasicLayerManager: file /builds/worker/checkouts/gecko/dom/ipc/BrowserChild.cpp:2816
[task 2022-07-18T18:14:22.449Z] 18:14:22     INFO - DCLayerTree::Create
[task 2022-07-18T18:14:22.449Z] 18:14:22     INFO - DCLayerTree::ctor

Highlights

[task 2022-07-18T18:14:20.028Z] 18:14:20     INFO - gfxConfig::IsEnabled(Feature::WEBRENDER_DCOMP_PRESENT) -> true
[task 2022-07-18T18:14:20.030Z] 18:14:20     INFO - gfxConfig::IsEnabled(Feature::WEBRENDER_COMPOSITOR) -> false
[task 2022-07-18T18:14:20.030Z] 18:14:20     INFO - useVideoOverlay -> false

But "WARNING: Fallback to BasicLayerManager" and DCLayerTree::Create and DCLayerTree::ctor called.
Though neither DCLayerTree::CreateSurface nor CreateExternalSurface are called.

More spew:
https://hg.mozilla.org/try/rev/402d7612ae67662d6005a757b40c244ed74788d4
https://treeherder.mozilla.org/jobs?repo=try&author=jgilbert%40mozilla.com&selectedTaskRun=UZ9aglwcQbyc7pkvvNcAAw.0

[task 2022-07-18T23:20:37.063Z] 23:20:37     INFO - 1: mFeatureWrCompositor->IsEnabled() -> true
[task 2022-07-18T23:20:37.064Z] 23:20:37     INFO - 2: mWrCompositorForceEnabled -> false
[task 2022-07-18T23:20:37.064Z] 23:20:37     INFO - 3: mFeatureWrCompositor->IsEnabled() -> true
[task 2022-07-18T23:20:37.064Z] 23:20:37     INFO - 4: mFeatureWrCompositor->IsEnabled() -> true
[task 2022-07-18T23:20:37.065Z] 23:20:37     INFO - 5: mFeatureWrCompositor->IsEnabled() -> false            [!!!]
[task 2022-07-18T23:20:37.065Z] 23:20:37     INFO - 6: mFeatureWrDComp->IsEnabled() -> true
[task 2022-07-18T23:20:37.066Z] 23:20:37     INFO - 6: mWrCompositorDCompRequired -> true
[task 2022-07-18T23:20:37.066Z] 23:20:37     INFO - 6: mFeatureWrCompositor->IsEnabled() -> false
[task 2022-07-18T23:20:37.066Z] 23:20:37     INFO - 7: mFeatureWrCompositor->IsEnabled() -> false
[task 2022-07-18T23:20:37.067Z] 23:20:37     INFO - gfxConfig::IsEnabled(Feature::WEBRENDER_DCOMP_PRESENT) -> true
[task 2022-07-18T23:20:37.067Z] 23:20:37     INFO - StaticPrefs::gfx_webrender_dcomp_video_overlay_win_AtStartup() -> true
[task 2022-07-18T23:20:37.068Z] 23:20:37     INFO - IsWin10AnniversaryUpdateOrLater() -> true
[task 2022-07-18T23:20:37.068Z] 23:20:37     INFO - gfxConfig::IsEnabled(Feature::WEBRENDER_COMPOSITOR) -> false
[task 2022-07-18T23:20:37.069Z] 23:20:37     INFO - StaticPrefs:: gfx_webrender_dcomp_video_overlay_win_force_enabled_AtStartup() -> false
[task 2022-07-18T23:20:37.069Z] 23:20:37     INFO - useVideoOverlay -> false
[task 2022-07-18T23:20:37.069Z] 23:20:37     INFO - useHwVideoZeroCopy -> true
[task 2022-07-18T23:20:37.070Z] 23:20:37     INFO - reuseDecoderDevice -> true
[task 2022-07-18T23:20:37.070Z] 23:20:37     INFO - gfxConfig::IsEnabled(Feature::WEBRENDER_COMPOSITOR) -> false

Switched to false between '4' and '5':

+  DUMP("4: ", mFeatureWrCompositor->IsEnabled());
 
   // Disable native compositor when hardware stretching is not supported. It is
   // for avoiding a problem like Bug 1618370.
   // XXX Is there a better check for Bug 1618370?
   if (!mHwStretchingSupport.IsFullySupported() && mScaledResolution) {
     nsPrintfCString failureId(
         "FEATURE_FAILURE_NO_HARDWARE_STRETCHING_B%uW%uF%uN%uE%u",
         mHwStretchingSupport.mBoth, mHwStretchingSupport.mWindowOnly,
         mHwStretchingSupport.mFullScreenOnly, mHwStretchingSupport.mNone,
         mHwStretchingSupport.mError);
     mFeatureWrCompositor->Disable(FeatureStatus::Unavailable,
                                   "No hardware stretching support", failureId);
   }
+  DUMP("5: ", mFeatureWrCompositor->IsEnabled());

https://treeherder.mozilla.org/jobs?repo=try&author=jgilbert%40mozilla.com&selectedTaskRun=GKCOrwKnRKO3OUwDh4Hz8w.0

[task 2022-07-19T00:40:35.709Z] 00:40:35     INFO - config->mPaths -> T[2]
[task 2022-07-19T00:40:35.709Z] 00:40:35     INFO - config->mModes -> T[4]
[task 2022-07-19T00:40:35.711Z] 00:40:35     INFO - targetModeIndex -> 0
[task 2022-07-19T00:40:35.711Z] 00:40:35     INFO - sourceModeIndex -> 1
[task 2022-07-19T00:40:35.711Z] 00:40:35     INFO - activeSize { 2560, 1600 }
[task 2022-07-19T00:40:35.711Z] 00:40:35     INFO - sourceMode { 1280, 1024 }

@jmaher, do you know why this would be, maybe?

Flags: needinfo?(jmaher)

And specifically, it does look like CI ends up configured as gfxVars::UseWebRenderDCompWin() && !gfxVars::UseWebRenderCompositor(), and we do use dcomp, we just don't use it as the system compositor.
But also, it feels like there's code that sure doesn't expect this combo.

I believe this is where this leaves us:
We need new windows test variants:

  1. Update our default variant/baseline to match what most users hit: WR with +DCompPresent +Compositor +Overlays.
  2. Add variant for +DCompPresent +Compositor -Overlays.
  3. Add variant for +DCompPresent -Compositor (-Overlays) (our current default).
  4. Add variant for -DCompPresent (-Compositor -Overlays).

We should probably have more asserts, to enforce the above state invariants:

  • No Overlay without Compositor, and
  • No Compositor without DCompPresent.

@gw and @jrmuizel: Does this sound right?

Flags: needinfo?(jmuizelaar)
Flags: needinfo?(gwatson)

for reftest, mochitest, web-platform-test, perf? 32 bit vs 64 bit? I am happy to dig in and help this week; I have time tomorrow to look at this in more detail and help adjust things on some try pushes if we are ready for that

I suspect this is just for reftest runs, but it could be a general global machine/boot config. I did a quick search for 2560 in searchfox but didn't immediately see anything useful.

I'm definitely curious about the resolution thing, but also I think orthogonally we should just force-enable the configs we want, even if they're less than optimal?

I guess the exception would be if this causes things not to work, such as because of some mismatch between what layout and dcomp expect the screen size to be?

Sounds roughly correct - though I'm not sure what features / flags define whether overlays are enabled? (I had assumed they were just always on if DC was enabled as native compositor, but that's probably not the case?).

Flags: needinfo?(gwatson)
Assignee: nobody → jgilbert
Status: NEW → ASSIGNED

Something like:
https://treeherder.mozilla.org/jobs?repo=try&revision=f1583a5af79571919a3088aa38c115cde3d3f8fe

@jmaher I'm unsure how to balance coverage with load here. Maybe we should only add these variants to just "Windows 10 x64 2004 WebRender Shippable|Debug"? We want to both ensure that what we Ship(able) is working properly, but also that we don't have asserts being not checked.
Can I demote additional configs to try --full?

Sounds reasonable. It would be good if we could assert that our default configuration is +DCompPresent +Compositor +Overlays so it doesn't change without us realizing. I think aosmond has set up this kind of assert before.

Flags: needinfo?(jmuizelaar) → needinfo?(aosmond)

Also I now think the layering of features is actually (System)Compositing requires Overlays requires DComp(Present) [requires Webrender].

I want to do this in two stages:

  1. Add the missing coverage we need.
  2. Pare back the coverage we added to reduce load.
Attachment #9286104 - Attachment is obsolete: true
Flags: needinfo?(jmaher)
Pushed by jgilbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/69c55f0c4cad
Add dcomp variants to reftests. r=gw,jmaher,jrmuizel
Regressions: 1780460
Regressions: 1780466
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
Regressions: 1696069
Regressions: 1686887
Flags: needinfo?(aosmond)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: