lima icon indicating copy to clipboard operation
lima copied to clipboard

qemu: support OpenGL acceleration (VirGL)

Open AkihiroSuda opened this issue 1 year ago • 2 comments

UTM seems to have been supporting VirGL with forked repos: https://github.com/utmapp/UTM/blob/62bd84c78c045870c580df34c1ba233d75e02995/patches/sources#L38-L45

I'm not sure we can just use them in Homebrew's QEMU. Maybe we need a custom Tap.

AkihiroSuda avatar Dec 18 '23 13:12 AkihiroSuda

Another interesting addition would be to see if it would be possible to add VirtualGL support, to the VNC server.

https://github.com/TurboVNC/turbovnc

afbjorklund avatar Dec 18 '23 13:12 afbjorklund

If I understand correctly, you need to configure the QEMU build

--enable-virglrenderer

And then make sure to use the new device, when starting the VM

-device virtio-gpu-gl


https://www.qemu.org/docs/master/system/devices/virtio-gpu.html

There should be a virtio-gpu for testing, that uses software rendering.

EDIT: Also need to set gl=on option, for the default display. Otherwise:

qemu-system-x86_64: -device virtio-gpu-gl: opengl is not available

afbjorklund avatar Dec 18 '23 14:12 afbjorklund