How does glamor upload picture contents to a texture or fbo?

Po Lu luangruo at yahoo.com
Wed Oct 26 05:25:06 UTC 2022


Is there documentation anywhere on glamor internals?  And if there
isn't, does anyone on this list know how glamor decides whether or not
to upload pixmap contents to a texture (and/or fbo) when used as the
source Picture to a CompositePictures request?

This might end up being an X/Y question, so I'll say why I'm asking.

I'm writing a Wayland compositor that runs on X, and so far the "fast
path" of using PresentPixmap to display the contents of a buffer is
working fine.  However, XRender is used to composite buffer contents to
the window when there are multiple subsurfaces attached, and I'm running
into a problem where partially drawn contents from shared memory buffers
end up displayed by the X server while glamor is enabled.  exa and the
Render acceleration in xf86-video-intel work fine, but the former is
slow.

The only way this can make sense is if wl_buffer.release is sent before
the buffer contents are uploaded to the fbo, resulting in the Wayland
client scribbling over the contents of the buffer before the X server
has a chance to display them.  So what I need to know is whether or not
the pixmap contents have been uploaded (or copied somewhere) by the time
an XSync after the Composite request completes, or if not, when the
pixmap contents will have been uploaded.

Thanks.


More information about the xorg-devel mailing list