EGL partial damage only works with buffer age of 2
Categories
(Core :: Graphics: WebRender, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox83 | --- | fixed |
People
(Reporter: rmader, Assigned: jnicol)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Otherwise it falls back to full damage. If we still want to do partial damage in those cases, we'd probably need some kind of accumulated damage history for each buffer.
See also https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/316#note_279673
Updated•4 years ago
|
Reporter | ||
Comment 1•4 years ago
|
||
From https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6132#note_598224:
The buffer age depends on how many buffers are being used, which IIRC is 3 on wayland and 4 on x11, so in the normal case (ie after the first round-robin through the buffers) the buffer age will always be 2 on wayland and 3 on x11.
Assignee | ||
Comment 2•4 years ago
|
||
Add a trait PartialPresentCompositor with a function get_buffer_age(),
and allow gecko to pass an implementation to webrender during
initialization. This allows webrender to query the age of the current
backbuffer during compositing.
Make webrender track the previous 2 frame's dirty rects, rather than
just the previous 1 frame's, allowing it to calculate the total damage
rect for buffer ages of up to 3. If the age is greater than 3, treat
the entire buffer as invalid. Also handle special cases of ages 0 and
1, 0 meaning the entire buffer is invalid, and 1 meaning the entire
buffer is valid. Make gecko stop requesting a full render for buffer
ages other than 2, as webrender can now handle these cases itself.
Updated•4 years ago
|
Reporter | ||
Comment 3•4 years ago
|
||
Just gave this a try and it appears to bring the X11 EGL backend much closer to how thing look on Wayland, great!
Assignee | ||
Comment 4•4 years ago
•
|
||
Brilliant!
I did a wee bit of testing on Linux myself. For wayland gnome, with Firefox either native wayland or Xwayland, the buffer age seemed a fairly consistent 2. For X11 gnome, the buffer age seemed all over the place, sometimes 1, sometimes 2 or 3, sometimes numbers like 14. But the patch should handle those cases, and rendering looked correct to me.
I may be misremembering, actually. I can't remember how consistent XWayland was. I also tried Sway, with both XWayland and native Wayland, and IIRC the buffer age seemed fairly consistent for those.
Pushed by jnicol@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ed9075d9319b Handle buffer ages other than 2 for EGL_EXT_buffer_age. r=sotaro,gw
Comment 6•4 years ago
|
||
Backed out for WebRender Bustages.
Log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=317371300&repo=autoland&lineNumber=942
Backout: https://hg.mozilla.org/integration/autoland/rev/26fc0a57ed58437c5d74800328189792a091190a
Assignee | ||
Comment 7•4 years ago
|
||
Oh, whoops. Forgot to change integer literals to floats in the tests.
Pushed by jnicol@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5294a158e801 Handle buffer ages other than 2 for EGL_EXT_buffer_age. r=sotaro,gw
Comment 9•4 years ago
|
||
bugherder |
Description
•