bhyve bhyve has emulated OpenGL API?



Reaction score: 31
Messages: 61

Hi there.

I just started playing with bhyve recently. I'm testing a simple Ubuntu VM I start like:

bhyve -c 2 -m 2G -Hwl bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
    -U 2cf9a8d1-f169-11eb-a741-98838979965d \
    -s 0,hostbridge \
    -s 31,lpc \
    -s 4:0,ahci,hd:/dev/da0 \
    -s 5:0,e1000,tap0,mac=58:9c:fc:0f:af:21 \
    -s 6:0,fbuf,tcp=,w=1366,h=768 \
    -s 7:0,xhci,tablet ubuntu

In the Ubuntu VM I have glxgears installed, and it just works.
I want to understand what's happening.

bhyve is emulating OpenGL API so it just works there in the VM?

By the other hand, testing with Windows10 the VM complain about no OpenGL while trying GoogleEarth
I guess currently the only way of having it for Windows is by doing GPU passthru?



Aspiring Daemon

Reaction score: 378
Messages: 610

glxgears is part of Mesa which is capable of emulating OpenGL on the CPU (software rendering). Might be that.
Mesa also contains an implementation of software rendering called swrast that allows shaders to run on the CPU as a fallback when no graphics hardware accelerators are present.

You can use glxinfo to check if it uses the software renderer.



Reaction score: 31
Messages: 61

Thanks for the explanation!
So it looks like OpenGL emulation. From glxinfo it reads:

Device: llvmpipe (LLVM 11.0.0, 256 bits)