I'm writing an X11 window manager with a Vulkan based compositor. I'm wondering if there's a way to efficiently load window pixmaps as textures.
In OpenGL, one would directly use the EXT_texture_from_pixmap extension to bind the pixmap to a texture. In Vulkan there is no such thing as far as I know.
I've been looking into inter-operation between Vulkan and OpenGL, ie. create a GL context just to use the pixmap extension, and then use the external_objects and such extensions to bring the loaded texture available for Vulkan. But on my Intel HD 630 it seems that the required GL_EXT_memory_object is not available (using Mesa 18.3 dev and latest kernel, if there's a way to enable it somehow, that'd be great).
Currently as a workaround I'm using CPU to get the pixels from the pixmap and then staging it to GPU memory. Obviously this can be very slow with high resolutions, even when restricting the upload to damaged regions only.
What would be the best way to efficiently retrieve the pixmap contents to be used in Vulkan based renderer?