virglrenderer is a library that gives emulators the necessary tools to implement a [virtio-gpu][] device, in particular one with 3D support. See capability sets below for a summary of the APIs virglrenderer can implement for the guest.
It directly implements the logic behind some 3D commands like GET_CAPSET
, CTX_CREATE
, CTX_SUBMIT_3D
, CREATE_RESOURCE_BLOB
, and though it closely follows the semantics of virtio-gpu in most cases, it is in theory independent of virtio or any other transport.
Main user is [qemu][qemu-gpu-impl], but there also appears to be a [standalone virtio-gpu vhost-user][qemu-vhost-impl] implementation that uses virglrenderer in qemu/contrib.
virglrenderer's public header is at [src/virglrenderer.h
][public-header]. This document attempts to outine the public API and contract, but you should look at the header for an authoritative source of truth since semantics described here could be slightly wrong or have changed, a