DRI3 damage tracking?
Pierre Ossman
ossman at cendio.se
Tue Feb 27 15:09:37 UTC 2024
On 27/02/2024 13:03, Enrico Weigelt, metux IT consult wrote:
>
> I'm confused: what exactly are you reading back ?
>
> To my understanding, the client renders into some buffer and at some
> point tells the Xserver to copy that buffer (or region of it) into the
> window. I'm not deep into DRI/GLX, but I'd assume it doens't always
> need to compose the whole buffer / window area.
>
That's not the whole picture, unfortunately.
To start with, what the client wants to draw (CopyArea/Present) is not
the same thing as what it has actually modified. It might not have
modified anything and only wants to copy from an off-screen Pixmap to a
window because of an Expose event.
But the more important part is what happens when the server would like
to write to the buffer.
E.g., "draw a line from 5,5 to 200,200". The server currently has no
idea if the client has rendered anything to the buffer. So it first has
to read back the 5,5 to 200,200 rectangle. Then draw the line. Then
write back the same rectangle.
Only then can we be sure the client has seen our new line, and that we
didn't use a stale copy of the Pixmap data and reverted any other
changes the client did by itself.
Regards
--
Pierre Ossman Software Development
Cendio AB https://cendio.com
Teknikringen 8 https://twitter.com/ThinLinc
583 30 Linköping https://facebook.com/ThinLinc
Phone: +46-13-214600
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
More information about the xorg-devel
mailing list