DRI3 damage tracking?

Enrico Weigelt, metux IT consult info at metux.net
Tue Feb 27 12:03:37 UTC 2024


On 27.02.24 09:37, Pierre Ossman wrote:

Hi,

> I'm playing around with adding DRI3 support to Xvnc, so that OpenGL and
> Vulkan can be accelerated for headless VNC sessions.

cool :)

> The X server can follow what it modifies, so knowing what to push back
> to the GPU is fairly straightforward. But I cannot find any details
> about the other direction. I.e. what the DRI3 clients modify via direct
> rendering.

To my understanding, damage tracking looks at things like window
movements: if some formerly hidden piece of a window becomes visible,
it can tell the client that just this piece needs to be redrawn.

So, if the client needs to redraw, it's free to draw just the missing
pieces (the rest is either already there or invisible and will be
clipped out anyways).

> Presently, I have to assume that everything that the X server wants to
> read is modified, and always read that back from the GPU.

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.

> So, is there some information the X server can see about what has been
> modified? Or perhaps at least if the buffer has been touched at all
> since the last synchronisation?

I don't think there's some kind of dirty-region-map at all. I might be
wrong, but IMHO the client needs to tell the server what to compose.
(and that decision can be aided by expose messages)


--mtx

--
---
Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info at metux.net -- +49-151-27565287


More information about the xorg-devel mailing list