xref: /aosp_15_r20/external/mesa3d/docs/drivers/virgl.rst (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1*61046927SAndroid Build Coastguard WorkerVirGL
2*61046927SAndroid Build Coastguard Worker=====
3*61046927SAndroid Build Coastguard Worker
4*61046927SAndroid Build Coastguard WorkerWhat is VirGL?
5*61046927SAndroid Build Coastguard Worker--------------
6*61046927SAndroid Build Coastguard Worker
7*61046927SAndroid Build Coastguard WorkerVirGL is a virtual 3D GPU for use inside QEMU virtual machines, that
8*61046927SAndroid Build Coastguard Workerallows the guest operating system to use the capabilities of the host GPU
9*61046927SAndroid Build Coastguard Workerto accelerate 3D rendering. The plan is to have a guest GPU that is fully
10*61046927SAndroid Build Coastguard Workerindependent of the host GPU.
11*61046927SAndroid Build Coastguard Worker
12*61046927SAndroid Build Coastguard WorkerWhat exactly does it entail?
13*61046927SAndroid Build Coastguard Worker----------------------------
14*61046927SAndroid Build Coastguard Worker
15*61046927SAndroid Build Coastguard WorkerThe project entails creating a virtual 3D capable graphics card for
16*61046927SAndroid Build Coastguard Workervirtual machines running inside QEMU. The design of this card is based
17*61046927SAndroid Build Coastguard Workeraround the concepts of Gallium3D to make writing Mesa and (eventually)
18*61046927SAndroid Build Coastguard WorkerDirect3D drivers for it easy. The card natively uses the Gallium TGSI
19*61046927SAndroid Build Coastguard Workerintermediate representation for its shaders. The implementation of
20*61046927SAndroid Build Coastguard Workerrendering for the card is done in the host system as part of QEMU and is
21*61046927SAndroid Build Coastguard Workerimplemented purely on OpenGL so you can get accelerated rendering on any
22*61046927SAndroid Build Coastguard Workersufficiently capable card/driver combination.
23*61046927SAndroid Build Coastguard Worker
24*61046927SAndroid Build Coastguard WorkerThe project also consists of a complete Linux guest stack, composed of a
25*61046927SAndroid Build Coastguard WorkerLinux kernel KMS driver, X.org 2D DDX driver and Mesa 3D driver.
26*61046927SAndroid Build Coastguard Worker
27*61046927SAndroid Build Coastguard WorkerCurrent status
28*61046927SAndroid Build Coastguard Worker--------------
29*61046927SAndroid Build Coastguard Worker
30*61046927SAndroid Build Coastguard Worker* Many pieces are now upstreamed in various projects.
31*61046927SAndroid Build Coastguard Worker* Kernel Linux 4.2 contains the modesetting only drivers. Linux 4.4
32*61046927SAndroid Build Coastguard Worker  contains the 3D supported pieces.
33*61046927SAndroid Build Coastguard Worker* Mesa main contains the VirGL 3D driver.
34*61046927SAndroid Build Coastguard Worker* QEMU 2.4 contained the initial virtio-gpu with no acceleration
35*61046927SAndroid Build Coastguard Worker  support. QEMU 2.5 contains 3D support only with the GTK3 frontend with
36*61046927SAndroid Build Coastguard Worker  GL enabled.
37*61046927SAndroid Build Coastguard Worker* The virglrenderer library seems mostly API stable.
38*61046927SAndroid Build Coastguard Worker* Limited environment renderer (GLES2)
39*61046927SAndroid Build Coastguard Worker
40*61046927SAndroid Build Coastguard WorkerSo what can it do now?
41*61046927SAndroid Build Coastguard Worker^^^^^^^^^^^^^^^^^^^^^^
42*61046927SAndroid Build Coastguard Worker
43*61046927SAndroid Build Coastguard WorkerRun a desktop and most 3D games I've thrown at it.
44*61046927SAndroid Build Coastguard Worker
45*61046927SAndroid Build Coastguard WorkerScope
46*61046927SAndroid Build Coastguard Worker-----
47*61046927SAndroid Build Coastguard Worker
48*61046927SAndroid Build Coastguard WorkerThe project is currently investigating the desktop virtualization use case
49*61046927SAndroid Build Coastguard Workeronly. This use case is where the viewer, host and guest are all running on
50*61046927SAndroid Build Coastguard Workerthe same machine (i.e. workstation or laptop). Some areas are in scope for
51*61046927SAndroid Build Coastguard Workerfuture investigation but not being looked at, at this time.
52*61046927SAndroid Build Coastguard Worker
53*61046927SAndroid Build Coastguard WorkerFuture scope
54*61046927SAndroid Build Coastguard Worker^^^^^^^^^^^^
55*61046927SAndroid Build Coastguard Worker
56*61046927SAndroid Build Coastguard Worker* Remoting rendering using a codec solution.
57*61046927SAndroid Build Coastguard Worker* Windows guest, Direct3D drivers.
58*61046927SAndroid Build Coastguard Worker* Other architectures
59*61046927SAndroid Build Coastguard Worker
60*61046927SAndroid Build Coastguard WorkerOut of scope
61*61046927SAndroid Build Coastguard Worker^^^^^^^^^^^^
62*61046927SAndroid Build Coastguard Worker
63*61046927SAndroid Build Coastguard Worker* Passing through GPUs or subsets of GPU capabilities.
64*61046927SAndroid Build Coastguard Worker
65*61046927SAndroid Build Coastguard WorkerRepos
66*61046927SAndroid Build Coastguard Worker-----
67*61046927SAndroid Build Coastguard Worker
68*61046927SAndroid Build Coastguard WorkerAll upstream parts are being developed upstream.
69*61046927SAndroid Build Coastguard Worker
70*61046927SAndroid Build Coastguard Workervirglrenderer: the GL renderer https://gitlab.freedesktop.org/virgl/virglrenderer
71*61046927SAndroid Build Coastguard Worker
72*61046927SAndroid Build Coastguard WorkerAuthors and Contributors
73*61046927SAndroid Build Coastguard Worker------------------------
74*61046927SAndroid Build Coastguard Worker
75*61046927SAndroid Build Coastguard WorkerVirGL is a project undertaken by Dave Airlie at Red Hat. It builds on lots
76*61046927SAndroid Build Coastguard Workerof open source work in a number of projects, primarily the Gallium 3D code
77*61046927SAndroid Build Coastguard Workerfrom the Mesa project.
78*61046927SAndroid Build Coastguard Worker
79*61046927SAndroid Build Coastguard WorkerSupport or Contact
80*61046927SAndroid Build Coastguard Worker------------------
81*61046927SAndroid Build Coastguard Worker
82*61046927SAndroid Build Coastguard Workermailing list: [email protected]
83*61046927SAndroid Build Coastguard Worker
84*61046927SAndroid Build Coastguard Workerhttps://lists.freedesktop.org/mailman/listinfo/virglrenderer-devel
85*61046927SAndroid Build Coastguard Worker
86*61046927SAndroid Build Coastguard WorkerIRC: `#virgil3d on OFTC <irc://irc.oftc.net/virgil3d>`__.
87