forked from joejulian/gio
gpu/headless: accept the lavapipe Vulkan driver
On headless setups such as sr.ht CI machines, lavapipe is the only available Vulkan driver. This change accepts the lavapipe software driver for headless contexts, so that CI won't fall back to OpenGL. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -892,8 +892,9 @@ func ChoosePhysicalDevice(inst Instance, surf Surface) (PhysicalDevice, int, err
|
||||
for _, pd := range devs {
|
||||
var props C.VkPhysicalDeviceProperties
|
||||
C.vkGetPhysicalDeviceProperties(funcs.vkGetPhysicalDeviceProperties, pd, &props)
|
||||
// Skip software implementations such as lavapipe.
|
||||
if props.deviceType == C.VK_PHYSICAL_DEVICE_TYPE_CPU {
|
||||
// The lavapipe software implementation doesn't work well rendering to a surface.
|
||||
// See https://gitlab.freedesktop.org/mesa/mesa/-/issues/5473.
|
||||
if surf != 0 && props.deviceType == C.VK_PHYSICAL_DEVICE_TYPE_CPU {
|
||||
continue
|
||||
}
|
||||
const caps = C.VK_QUEUE_GRAPHICS_BIT | C.VK_QUEUE_COMPUTE_BIT
|
||||
|
||||
Reference in New Issue
Block a user