<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/a-look-at-vulkan-extensions-in-venus-lp5bkgbhx" -->

---
title: A look at Vulkan extensions in Venus | daily.dev
description: Venus is a virtual Vulkan driver built on the Virtio-GPU protocol that serializes Vulkan commands between guest and host. The post walks through the three key...
canonical: https://daily.dev/posts/a-look-at-vulkan-extensions-in-venus-lp5bkgbhx
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: A look at Vulkan extensions in Venus | daily.dev
og:description: Venus is a virtual Vulkan driver built on the Virtio-GPU protocol that serializes Vulkan commands between guest and host. The post walks through the three key...
og:url: https://daily.dev/posts/a-look-at-vulkan-extensions-in-venus-lp5bkgbhx
og:image: https://api.daily.dev/og/posts/LP5bKgBhX.png
og:image:alt: A look at Vulkan extensions in Venus
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.

# A look at Vulkan extensions in Venus

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

## Summary

Venus is a virtual Vulkan driver built on the Virtio-GPU protocol that serializes Vulkan commands between guest and host. The post walks through the three key components — the Mesa driver, the Venus Protocol (XML-based spec with code generation), and Virglrenderer — and demonstrates step-by-step how to add support for a new Vulkan extension (VK_EXT_extended_dynamic_state2). This includes updating the protocol XMLs, regenerating serialization code, implementing the guest-side Mesa functions with the vn_ prefix, caching physical device features, enabling passthrough, and adding the host-side Virglrenderer dispatch function. The process is relatively lightweight because Venus-Protocol auto-generates most serialization boilerplate.

## 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/2022/10/19/a-look-at-vulkan-extensions-in-venus>

## Questions this post answers

### How does the Venus virtual Vulkan driver serialize commands between guest and host?

Venus serializes Vulkan commands using the Venus Protocol, an XML-defined specification that generates C encoder/decoder code for both the Mesa guest driver and Virglrenderer on the host. The guest Mesa driver batches commands into a command stream and sends them via the Virtio-GPU kernel driver. Files prefixed vn_protocol_driver_* serve Mesa; vn_protocol_renderer_* serve Virglrenderer. Return values travel the same path in reverse.

_Developers building or debugging virtual GPU stacks track Venus and Virglrenderer developments on daily.dev._

### What files do I need to modify to add a new Vulkan extension to the Venus driver?

Adding a Vulkan extension to Venus requires changes in three places: the Venus Protocol XMLs (add the extension to vk.xml's extension list and new commands to VK_EXT_command_serialization.xml, then regenerate code), the Mesa guest driver under src/virtio/vulkan/ (implement vn_-prefixed functions, update the features cache struct, and add the extension to the passthrough list), and Virglrenderer (enable the extension in vkr_common.c and add vkr_dispatch_ functions for any new commands).

_Vulkan driver contributors working across Mesa and Virglrenderer find related patches and discussions on daily.dev._

### How does Venus handle physical device feature caching for Vulkan extensions?

Venus caches physical device features during vkEnumeratePhysicalDevices or vkEnumeratePhysicalDeviceGroups so that later calls like vkGetPhysicalDeviceFeatures2 return cached values without a host round-trip. To support a new extension, you add its feature struct to vn_physical_device_features in vn_physical_device.h, register it with VN_ADD_EXT_TO_PNEXT in vn_physical_device_init_features, and add a case in vn_GetPhysicalDeviceFeatures2 to copy the cached struct back to the caller.

_Teams porting Vulkan extensions to virtualized environments keep up with Venus internals on daily.dev._

## Similar posts on daily.dev

- [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
- [Venus Vulkan Driver Lands Mesh Shader Support In Mesa 26.0](https://daily.dev/posts/venus-vulkan-driver-lands-mesh-shader-support-in-mesa-26-0-m4wzjlmka) · Phoronix · 0 upvotes · 0 comments
- [Vulkan 1.4.348 Ships Four New Extensions - Including One To Help OpenGL Emulation](https://daily.dev/posts/vulkan-1-4-348-ships-four-new-extensions---including-one-to-help-opengl-emulation-zchboyjvy) · Phoronix · 0 upvotes · 0 comments

---

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

[View this post on daily.dev](https://daily.dev/posts/a-look-at-vulkan-extensions-in-venus-lp5bkgbhx)

```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":"A look at Vulkan extensions in Venus","url":"https://daily.dev/posts/a-look-at-vulkan-extensions-in-venus-lp5bkgbhx","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/a-look-at-vulkan-extensions-in-venus-lp5bkgbhx"},"datePublished":"2026-08-11T08:57:19.518Z","dateModified":"2026-08-11T09:42:11.054Z","description":"Venus is a virtual Vulkan driver built on the Virtio-GPU protocol that serializes Vulkan commands between guest and host. The post walks through the three key...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c2516b1b88d73e8c41f731e90d3d85dd?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c2516b1b88d73e8c41f731e90d3d85dd?_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/a-look-at-vulkan-extensions-in-venus-lp5bkgbhx","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"vulkan,mesa","timeRequired":"PT12M"}
{"@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":"A look at Vulkan extensions in Venus"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/a-look-at-vulkan-extensions-in-venus-lp5bkgbhx#faq","mainEntity":[{"@type":"Question","name":"How does the Venus virtual Vulkan driver serialize commands between guest and host?","acceptedAnswer":{"@type":"Answer","text":"Venus serializes Vulkan commands using the Venus Protocol, an XML-defined specification that generates C encoder/decoder code for both the Mesa guest driver and Virglrenderer on the host. The guest Mesa driver batches commands into a command stream and sends them via the Virtio-GPU kernel driver. Files prefixed vn_protocol_driver_* serve Mesa; vn_protocol_renderer_* serve Virglrenderer. Return values travel the same path in reverse. Developers building or debugging virtual GPU stacks track Venus and Virglrenderer developments on daily.dev."}},{"@type":"Question","name":"What files do I need to modify to add a new Vulkan extension to the Venus driver?","acceptedAnswer":{"@type":"Answer","text":"Adding a Vulkan extension to Venus requires changes in three places: the Venus Protocol XMLs (add the extension to vk.xml's extension list and new commands to VK_EXT_command_serialization.xml, then regenerate code), the Mesa guest driver under src/virtio/vulkan/ (implement vn_-prefixed functions, update the features cache struct, and add the extension to the passthrough list), and Virglrenderer (enable the extension in vkr_common.c and add vkr_dispatch_ functions for any new commands). Vulkan driver contributors working across Mesa and Virglrenderer find related patches and discussions on daily.dev."}},{"@type":"Question","name":"How does Venus handle physical device feature caching for Vulkan extensions?","acceptedAnswer":{"@type":"Answer","text":"Venus caches physical device features during vkEnumeratePhysicalDevices or vkEnumeratePhysicalDeviceGroups so that later calls like vkGetPhysicalDeviceFeatures2 return cached values without a host round-trip. To support a new extension, you add its feature struct to vn_physical_device_features in vn_physical_device.h, register it with VN_ADD_EXT_TO_PNEXT in vn_physical_device_init_features, and add a case in vn_GetPhysicalDeviceFeatures2 to copy the cached struct back to the caller. Teams porting Vulkan extensions to virtualized environments keep up with Venus internals on daily.dev."}}]}
```

