Slow swapchain mechanism added in bug 1818685 appears to need additional unexpected steps to trigger (e.g. opening a new tab OR seeking+buffering the current stream)
Categories
(Core :: Graphics, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox119 | --- | fixed |
People
(Reporter: mayankleoboy1, Assigned: sotaro)
References
(Blocks 1 open bug, )
Details
Attachments
(3 files)
Part1:
0. Copy all of these STR in some text file or something
- Close ALL firefox tabs and windows
- Open Firefox (ensure that there is only a singel blank/new tab opened)
- Go to the youtube URL https://www.youtube.com/watch?v=ovSy6KQC9Xk
- Seek the video to somewhere around the middle and ensure you have 720p50 resolution selected
- Click play
- While the video is playing, try to scroll the page
AR: Stuttery video. In about:support no gfx log is generated. (i.e. the mechanism added in bug 1818685 doesnt appear to kick in).
Part2:
7. Now open a new tab and go to google.com
8. Switch back to the youtube page and try to scroll now
AR: The video is smooth. And in about:support, there is a gfx log that says that swapchain is slow.
Alternate Part2:
- Seek the video to a place such that the video stream needs to load from network/buffer
- Now play the video and scroll the page
AR: The video is smooth. And in about:support, there is a gfx log that says that swapchain is slow.
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 1•2 years ago
|
||
Profile: https://share.firefox.dev/3DASLI8
Reporter | ||
Comment 2•2 years ago
|
||
Reporter | ||
Comment 3•2 years ago
|
||
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Updated•2 years ago
|
Assignee | ||
Comment 4•2 years ago
|
||
(In reply to Mayank Bansal from comment #1)
Profile: https://share.firefox.dev/3DASLI8
The wait happened at DCLayerTree::CompositorEndFrame() instead of mVideoSwapChain->Present(0, 0). It seems better to handle it.
Reporter | ||
Comment 5•2 years ago
|
||
another profile : https://share.firefox.dev/3EkNdSB
- Here i opened the youtube video in a tab and scrolled for a bit -> the scrolling was janky and "slow swapchain" message in gfx-log was NOT generated.
- Then I opened google.com in a new tab.
- Switched back to the youtube video and scrolled again -> Scrolling was smooth and "slow swapchain" message in gfx-log was generated.
Assignee | ||
Comment 6•2 years ago
|
||
Check of mVideoSwapChain->Present() was already added by Bug 1818685. This change adds check of mCompositionDevice->Commit().
Assignee | ||
Comment 7•2 years ago
•
|
||
Hi Mayank Bansal, can you check if the following build addresses the problem for you?
https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/YRU3Ih0IRmiMXIT4MkHylQ/runs/0/artifacts/public%2Fbuild%2Ftarget.zip
Assignee | ||
Updated•2 years ago
|
Reporter | ||
Comment 8•2 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #7)
Hi Mayank Bansal, can you check if the following build addresses the problem for you?
https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/YRU3Ih0IRmiMXIT4MkHylQ/runs/0/artifacts/public%2Fbuild%2Ftarget.zip
This did not help.
While i was on the youtube tab, the video continued to stutter while scrolling. The stuttering stopped only after I switched to a new tab (e.g. about:support) , then switched back to youtube.
Profile: Profile: https://share.firefox.dev/3P3B2zG
Reporter | ||
Comment 9•2 years ago
•
|
||
I tried a couple of more times with the try build.
In one instance, the video became smooth almost instantly.
In another instance, the video became smooth after I scrolled couple of times : https://share.firefox.dev/3QLiSDX
So I am confused with the behaviour.
Assignee | ||
Comment 10•2 years ago
•
|
||
Ah, the current patch has a problem. Video frames are not always updated with each frame. It is not handled by the patch. I am going to update it.
Assignee | ||
Comment 11•2 years ago
|
||
Hi Mayank Bansal, can you check again if the following build addresses the problem for you?
https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/VvoIELZpTiKJXKd3ysq56A/runs/0/artifacts/public%2Fbuild%2Ftarget.zip
https://treeherder.mozilla.org/jobs?repo=try&revision=375d2cbc5d30285ff853ce09ff7eadc92dd5be4a
Assignee | ||
Updated•2 years ago
|
Reporter | ||
Comment 12•2 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #11)
Hi Mayank Bansal, can you check again if the following build addresses the problem for you?
https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/VvoIELZpTiKJXKd3ysq56A/runs/0/artifacts/public%2Fbuild%2Ftarget.zip
This build looks to have fixed this bug! Cant repro the stutter on scrolling anymore. I did not see any message in gfx-log but maybe thats expected?
I also tried with maximizing the video and then trying to scroll. The scrolling stuttered but then the slow swapchain mechanism kicked-in and the scrolling became smooth again.
https://share.firefox.dev/44jFJJR , https://share.firefox.dev/3sqn7KS
Assignee | ||
Comment 13•2 years ago
|
||
Hmm, when I played YouTube videos, overlay was used only during fullscreen video playback. It seems like a recent regression. I created Bug 1849680.
Assignee | ||
Comment 14•2 years ago
|
||
When I tested today, video rendering used overlay.
https://www.youtube.com/watch?v=zCLOJ9j1k2Y
Assignee | ||
Comment 15•2 years ago
|
||
Hi Mayank Bansal, can you check again if the following build addresses the problem for you? It seemed that yesterday m-c had a problem.
https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Yxmu2njHQd-ZTYzKENYGrQ/runs/0/artifacts/public%2Fbuild%2Ftarget.zip
https://treeherder.mozilla.org/jobs?repo=try&revision=9ab8fba8d58d67c0fccb08f0f8f7b039369fe1ac
Reporter | ||
Comment 16•2 years ago
•
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #15)
Hi Mayank Bansal, can you check again if the following build addresses the problem for you? It seemed that yesterday m-c had a problem.
https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Yxmu2njHQd-ZTYzKENYGrQ/runs/0/artifacts/public%2Fbuild%2Ftarget.zip
https://treeherder.mozilla.org/jobs?repo=try&revision=9ab8fba8d58d67c0fccb08f0f8f7b039369fe1ac
Similar behaviour as the previous testing :
With video in normal playing mode, the scrolling is smooth and no gfx-log is generated. When I use theater mode, the scrolling stutters for a bit and then becomes smooth and then the gfx-log is generated.
https://share.firefox.dev/47Gv0Mx , https://share.firefox.dev/3Z1uzst , https://share.firefox.dev/3P6FqxA
Assignee | ||
Comment 17•2 years ago
|
||
The patch seems not have a problem, though gecko still seems to have the problem for using overlay.
Comment 18•2 years ago
|
||
I am curious how this bug relates to https://bugzilla.mozilla.org/show_bug.cgi?id=1820370 where I have profiled on all GPU vendors and seen skipped composites and hitting limits on pending video frames on a recurring basis, and also jank (up to 200ms) when the driver frees up large amounts of resources periodically (why it is not doing that every frame is unclear to me). I am wondering if we're not dequeuing something properly?
Assignee | ||
Comment 19•2 years ago
|
||
(In reply to Ashley Hale [:ahale] from comment #18)
I am wondering if we're not dequeuing something properly?
Sorry, I am not sure if there is a missing dequeue around DCLayerTree.
Comment 20•1 years ago
|
||
Comment 21•1 years ago
|
||
bugherder |
Updated•1 years ago
|
Description
•