Check out VirGL and the virtio-gpu projects. Is already available in qemu if you're willing to do some work. Virtualized OpenGL (and soon Vulkan?) access to the host GPU inside the VM.
e: my memory slips me, I've already run vulkan apps in qemu.
> [lexi@arch-steam ~]$ vkcube
> Selected GPU 0: Virtio-GPU Venus (Intel(R) UHD Graphics (CML GT2)), type: 1
Granted this was ChromeOS[0], but ultimately it's the same qemu. You just need the right flags and for the guest to have a mesa driver aware of virtio-gpu.