Windows needs equivalent to GdkDmabufTexture
The Linux backend gained support for dmabufs in 4.14 and we've been increasingly making more use of it to interact with external applications providing GPU-backed image data, as using GdkGLTexture
is quite easy to break.
The whole graphics offload work is based around it (as it bypasses the renderers, ie GL, and talks directly to the system), and Vulkan can't import GL textures directly, so that path is now accelerated via dmabufs, too. And that kind of means it is a precondition to have such a texture for a Vulkan-by-default switch.
So the Windows backend would want:
-
A texture implementation matching
GdkDmabufTexture
, let's call itGdkDX12Texture
. The main work of that is making sure it can be downloaded into CPU memory so a working path exists forgdk_texture_save_to_png()
. -
A
GdkDX12TextureBuilder
for creating such textures and giving applications an extensible way of setting all the weird properties related to those textures. -
If necessary, some infrastructure to query supported formats. GTK has
GdkDmabufFormats
for that, but I have no idea if Windows doesn't have that API as part of the OS already. -
An accelerated implementation for the Vulkan and GL renderers to create their internal
GskGpuImage
objects (unaccelerated import should work via CPU memory download after step 1). -
Use of this code path to import
GdkGLTextures
into the Vulkan renderer. -
(ideally) Make the Vulkan/GL renderers and
GtkGLArea
produce this kind of texture. -
(optionally) An extension of the GStreamer sink element to support accelerated video playback.
-
(optionally) An implementation of the GdkSubsurface interface to allow graphics offloading on Windows.