GTK's Vulkan Renderer Will Now Let You Pick The GPU For Rendering
One of the features exciting us the most about GTK4 is the Vulkan renderer that will make its premiere. This Vulkan renderer continues getting worked into shape for GTK+ 4.0.
The most recent addition to this Vulkan renderer is a means to allow specifying a device (GPU) to use for rendering, in the event of having multiple Vulkan graphics processors on the same system.
Ultimately the GNOME developers want the GTK Vulkan code to be smarter about choosing the device to use for Vulkan, but for now they have introduced a GDK_VULKAN_DEVICE environment variable so users can specify their desired Vulkan device.
If setting the GDK_VULKAN_DEVICE=list environment variable prior to running a GTK4 application, it will print a list of all available devices with their vendor/device ID, properties, and exposed API version. This is good for those with multi-GPU systems or hybrid laptops. At this time GTK+ doesn't attempt to make any Vulkan multi-GPU rendering support, which likely wouldn't be useful in this case.
This GDK_VULKAN_DEVICE support was added with this commit.