Hi everyone,
I'm playing around with adding DRI3 support to Xvnc, so that OpenGL and
Vulkan can be accelerated for headless VNC sessions. Everything seems to
be working, but there is one inefficiency that I'm trying to resolve,
and that's minimising the shuffling of data between the GPU and CPU.
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.
Presently, I have to assume that everything that the X server wants to
read is modified, and always read that back from the GPU.
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?
Ideally, the copying could be completely avoided by accessing the same
memory. But apparently¹, gbm_bo_map() isn't guaranteed to actually map
memory.
¹
https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/945#note_1483370
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?