<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/virtualizing-gpu-access-lut0vitax" -->

---
title: Virtualizing GPU Access | daily.dev
description: A hands-on guide to setting up virtualized GPU access using the Virgil3D stack (QEMU, virglrenderer, virtio-gpu, and Mesa). It explains how guest applications...
canonical: https://daily.dev/posts/virtualizing-gpu-access-lut0vitax
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Virtualizing GPU Access | daily.dev
og:description: A hands-on guide to setting up virtualized GPU access using the Virgil3D stack (QEMU, virglrenderer, virtio-gpu, and Mesa). It explains how guest applications...
og:url: https://daily.dev/posts/virtualizing-gpu-access-lut0vitax
og:image: https://api.daily.dev/og/posts/luT0vITAX.png
og:image:alt: Virtualizing GPU Access
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Virtualizing GPU Access

**[Collabora Blog](https://daily.dev/sources/collabora)** · 5 min read · 0 upvotes · 0 comments

## Summary

A hands-on guide to setting up virtualized GPU access using the Virgil3D stack (QEMU, virglrenderer, virtio-gpu, and Mesa). It explains how guest applications speak unmodified OpenGL to Mesa, which channels commands through virtio-gpu to QEMU on the host, where virglrenderer translates Gallium state into host OpenGL. The post covers building a parallel graphics development environment, compiling libepoxy, virglrenderer, libpciaccess, Mesa, and QEMU from source, and launching an Ubuntu 17.10 guest VM with GPU acceleration enabled.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.collabora.com/news-and-blog/blog/2018/02/12/virtualizing-gpu-access>

## Questions this post answers

### How does Virgil3D pass OpenGL commands from a guest VM to the host GPU?

Guest applications speak unmodified OpenGL to Mesa inside the VM. Instead of Mesa sending commands directly to hardware, they are channeled through virtio-gpu on the guest to QEMU on the host. QEMU then uses virglrenderer to translate the raw Gallium state into standard OpenGL, which executes on the host's GPU — which can be Mesa or a proprietary driver like NVIDIA's.

_Developers building virtualized graphics stacks track virglrenderer and Mesa developments on daily.dev._

### What does virglrenderer do and how does it translate shaders?

Virglrenderer is the component QEMU uses to provide accelerated rendering inside VMs. It receives Gallium state from the guest kernel via the virtio-gpu interface and translates it into OpenGL on the host. It also converts shaders from the TGSI format used by Gallium into the GLSL format required by OpenGL.

_Engineers working on GPU passthrough and shader translation find relevant deep-dives on daily.dev._

## Similar posts on daily.dev

- [GPU Virtualization Architecture for Multi-Desktop Containers](https://daily.dev/posts/gpu-virtualization-architecture-for-multi-desktop-containers-kfc1v2hut) · HelixML · 42 upvotes · 0 comments
- [Flatpak Exploring GPU Virtualization To Ease Driver Challenges](https://daily.dev/posts/flatpak-exploring-gpu-virtualization-to-ease-driver-challenges-0irfkmyja) · Phoronix · 1 upvotes · 0 comments
- [AMD Working On A New Backend For Improving ROCm Compute In QEMU/VMs](https://daily.dev/posts/amd-working-on-a-new-backend-for-improving-rocm-compute-in-qemu-vms-px3wwgxqw) · Phoronix · 0 upvotes · 0 comments
- [Igniting the GPU: From Kernel Plumbing to 3D Rendering on RISC-V](https://daily.dev/posts/igniting-the-gpu-from-kernel-plumbing-to-3d-rendering-on-risc-v-n3d4nu797) · Hacker News · 1 upvotes · 0 comments

---

Tags: [#mesa](https://daily.dev/tags/mesa)

[View this post on daily.dev](https://daily.dev/posts/virtualizing-gpu-access-lut0vitax)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Virtualizing GPU Access","url":"https://daily.dev/posts/virtualizing-gpu-access-lut0vitax","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/virtualizing-gpu-access-lut0vitax"},"datePublished":"2026-08-11T08:53:50.619Z","dateModified":"2026-08-11T09:15:36.806Z","description":"A hands-on guide to setting up virtualized GPU access using the Virgil3D stack (QEMU, virglrenderer, virtio-gpu, and Mesa). It explains how guest applications...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9215e754d295489df1a930a2eaecb8d6?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9215e754d295489df1a930a2eaecb8d6?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Collabora Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Collabora Blog","logo":"https://media.daily.dev/image/upload/s--ZGZ0FjqS--/f_auto,q_auto/v1786438306/logos/collabora?_a=BAMAMicg0","url":"https://daily.dev/sources/collabora"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/virtualizing-gpu-access-lut0vitax","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"mesa","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Collabora Blog","item":"https://daily.dev/sources/collabora"},{"@type":"ListItem","position":3,"name":"Virtualizing GPU Access"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/virtualizing-gpu-access-lut0vitax#faq","mainEntity":[{"@type":"Question","name":"How does Virgil3D pass OpenGL commands from a guest VM to the host GPU?","acceptedAnswer":{"@type":"Answer","text":"Guest applications speak unmodified OpenGL to Mesa inside the VM. Instead of Mesa sending commands directly to hardware, they are channeled through virtio-gpu on the guest to QEMU on the host. QEMU then uses virglrenderer to translate the raw Gallium state into standard OpenGL, which executes on the host's GPU — which can be Mesa or a proprietary driver like NVIDIA's. Developers building virtualized graphics stacks track virglrenderer and Mesa developments on daily.dev."}},{"@type":"Question","name":"What does virglrenderer do and how does it translate shaders?","acceptedAnswer":{"@type":"Answer","text":"Virglrenderer is the component QEMU uses to provide accelerated rendering inside VMs. It receives Gallium state from the guest kernel via the virtio-gpu interface and translates it into OpenGL on the host. It also converts shaders from the TGSI format used by Gallium into the GLSL format required by OpenGL. Engineers working on GPU passthrough and shader translation find relevant deep-dives on daily.dev."}}]}
```

