5 ms·
As a developer of this, it's built using Virgil3D[1], which is rather interesting tech, that allows virtualized guests to get hardware accelerated 3D graphics.
by robert_foss 8y ago
As a developer of this, it's built using Virgil3D[1], which is rather interesting tech, that allows virtualized guests to get hardware accelerated 3D graphics.
It works by having the guest run a Mesa3D (Linux Userspace graphics) driver called virgl in the guest, which takes all of the OpenGL/OpenGL ES commands and send them through through Linux VirtIO[3] to the guest, where they are executed by the virglrenderer[1] application as normal OpenGL / OpenGL ES commands.
This let's you run whichever driver you want on the host, even proprietary ones. And it allows you you to do transparent OpenGL <-> OpenGL ES translation.
[1] https://gitlab.freedesktop.org/virgl/virglrenderer/ https://gitlab.freedesktop.org/virgl/virglrenderer/
[2] https://www.mesa3d.org/ https://www.mesa3d.org/
[3] https://lwn.net/Articles/239238/ https://lwn.net/Articles/239238/
- bubblethink 8y agoHow does this compare (in performance, experience etc.) to the gvt-g approach ? At least one benefit of gvt-g seems to be that it would also work for windows guests.
- robert_foss 8y agoWithout being familiar with being familiar with GVT-G, I would think Virgl3D performs worse, by a decent margin.
- drcode 8y agoDoes this mean it won't accelerate 2d graphics? Should I expect acceleration in gimp/emacs/etc after the Crostini patch is available?
- opencl 8y agoIt'll accelerate 2D graphics that use OpenGL. GIMP and emacs don't use hardware acceleration in the first place. Krita uses OpenGL to draw the canvas so it will get accelerated.
- drcode 8y ago> GIMP and emacs don't use hardware acceleration in the first place. Honest question: On most OSes, don't regular drawing operations in these programs (Bitblits, font renderings) typically use hardware acceleration through the OS? On crostini, are these things currently done via pure CPU operations, or are they already being mapped to hardware-accelerated API calls, even before the new OpenGL support?
- Jasper_ 8y agoIt's complicated and depends on a lot of things. On a typical Linux system, bitblt (well, XCopyArea) and font rendering will go through XRender, which may or may not use the GPU depending on driver support. On xf86-video-intel, it will use SNA, which will use the 2D blitter on Intel chips. It's unmaintained at this point and a bit buggy so some distros turn it off. Instead, one might use glamor, which implements XRender on top of OpenGL, which will use the 3D graphics hardware on Intel chips. So it depends on your system configuration. For other operating systems, the words and details change, but the overall idea of "it's complicated and depends on your driver and OS version and which apps are running and phase of the moon" still applies.
- bitwize 8y agoWith Xorg's GLAMOR driver, all 2d graphics use OpenGL. God knows if Xwayland will incorporate GLAMOR. Since almost all compositors except for Weston assume the presence of a GPU, you'd think it would, but I have not been delighted with Wayland development thus far...
- Jasper_ 8y agoXwayland has had glamor support since the very beginning.