<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/improving-vulkan-graphics-state-tracking-in-mesa-7nefx6oer" -->

---
title: Improving Vulkan graphics state tracking in Mesa | daily.dev
description: Faith Ekstrand explains the challenges of Vulkan graphics state tracking in Mesa drivers and introduces a new common state tracking framework. The post covers...
canonical: https://daily.dev/posts/improving-vulkan-graphics-state-tracking-in-mesa-7nefx6oer
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Improving Vulkan graphics state tracking in Mesa | daily.dev
og:description: Faith Ekstrand explains the challenges of Vulkan graphics state tracking in Mesa drivers and introduces a new common state tracking framework. The post covers...
og:url: https://daily.dev/posts/improving-vulkan-graphics-state-tracking-in-mesa-7nefx6oer
og:image: https://api.daily.dev/og/posts/7nefX6OER.png
og:image:alt: Improving Vulkan graphics state tracking in Mesa
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.

# Improving Vulkan graphics state tracking in Mesa

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

## Summary

Faith Ekstrand explains the challenges of Vulkan graphics state tracking in Mesa drivers and introduces a new common state tracking framework. The post covers why real GPU hardware diverges from Vulkan's idealized model — including shader recompilation, combined/computed hardware states, indirect state, DMA operations using the 3D engine, and dynamic state complexity. It then describes the newly landed common framework (MR #17328) that provides shared structs for pipeline state collection and dynamic state management, making it easier to implement VK_EXT_graphics_pipeline_library. Switching the Intel Vulkan driver to the new framework removed ~1000 lines of code, and the framework also adds smarter dirty-state diffing to reduce redundant state emissions on pipeline switches.

## 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/09/07/improving-vulkan-graphics-state-tracking-in-mesa>

## Questions this post answers

### What problems does Vulkan state tracking in Mesa drivers need to solve that don't exist on an ideal GPU?

Five major problems arise: shader recompilation triggered by state (e.g., Intel needs multisampling info, AMD needs render target color formats), combined hardware states where multiple API states share one register or packet, computed states derived from multiple API inputs, indirect state requiring CPU-side management until draw time, and DMA operations that must use the 3D engine and require full state save/restore.

_Developers writing Vulkan drivers for Mesa track these exact pain points on daily.dev._

### How does the new Mesa common Vulkan dynamic state framework reduce driver code and what does switching to it involve?

Switching the Intel Vulkan driver to the common vk_dynamic_graphics_state framework removed approximately 1000 lines of code. A driver must embed vk_dynamic_graphics_state in its pipeline object and command buffer, call vk_cmd_set_dynamic_graphics_state() in vkCmdBindPipeline(), read dynamic state from vk_command_buffer::dynamic_graphics_state, and then delete all its own vkCmdSet*() entrypoints. The framework also diffs state on pipeline switches to avoid redundant emissions.

_Mesa Vulkan driver contributors following this migration find the latest coverage on daily.dev._

### What does VK_EXT_graphics_pipeline_library require from Mesa drivers in terms of state management?

VK_EXT_graphics_pipeline_library splits pipeline state into four groups — vertex input, pre-rasterization shaders, fragment shader, and fragment output interface — and allows partial pipelines to be linked. Drivers need a data structure capturing all state from each partial pipeline so combined and computed states can be resolved at link time. The new vk_graphics_pipeline_state_fill() and vk_graphics_pipeline_state_merge() helpers in Mesa automate this accumulation.

_Developers implementing pipeline libraries in Mesa stay current on framework changes through daily.dev._

## Similar posts on daily.dev

- [Intel's Vulkan Linux Driver Merges Shader VMA Allocator For Ray-Tracing Capture/Replay](https://daily.dev/posts/intel-s-vulkan-linux-driver-merges-shader-vma-allocator-for-ray-tracing-capture-replay-grab740ce) · Phoronix · 0 upvotes · 0 comments
- [PanVK Mali Vulkan Driver Lands In-Memory Cache & On-Disk Shader Cache Support](https://daily.dev/posts/panvk-mali-vulkan-driver-lands-in-memory-cache-on-disk-shader-cache-support-y2z1wbliv) · Phoronix · 0 upvotes · 0 comments
- [Mesa 25.3 Unleashed: Revolutionizing Open-Source Graphics for Linux Power Users](https://daily.dev/posts/mesa-25-3-unleashed-revolutionizing-open-source-graphics-for-linux-power-users-9noeiyani) · Khronos · 0 upvotes · 0 comments

---

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

[View this post on daily.dev](https://daily.dev/posts/improving-vulkan-graphics-state-tracking-in-mesa-7nefx6oer)

```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":"Improving Vulkan graphics state tracking in Mesa","url":"https://daily.dev/posts/improving-vulkan-graphics-state-tracking-in-mesa-7nefx6oer","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/improving-vulkan-graphics-state-tracking-in-mesa-7nefx6oer"},"datePublished":"2026-08-11T08:55:48.198Z","dateModified":"2026-08-11T09:27:58.330Z","description":"Faith Ekstrand explains the challenges of Vulkan graphics state tracking in Mesa drivers and introduces a new common state tracking framework. The post covers...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/48fbf38d5642e743b2d3137e40677902?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/48fbf38d5642e743b2d3137e40677902?_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/improving-vulkan-graphics-state-tracking-in-mesa-7nefx6oer","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"gpu,vulkan,mesa","timeRequired":"PT20M"}
{"@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":"Improving Vulkan graphics state tracking in Mesa"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/improving-vulkan-graphics-state-tracking-in-mesa-7nefx6oer#faq","mainEntity":[{"@type":"Question","name":"What problems does Vulkan state tracking in Mesa drivers need to solve that don't exist on an ideal GPU?","acceptedAnswer":{"@type":"Answer","text":"Five major problems arise: shader recompilation triggered by state (e.g., Intel needs multisampling info, AMD needs render target color formats), combined hardware states where multiple API states share one register or packet, computed states derived from multiple API inputs, indirect state requiring CPU-side management until draw time, and DMA operations that must use the 3D engine and require full state save/restore. Developers writing Vulkan drivers for Mesa track these exact pain points on daily.dev."}},{"@type":"Question","name":"How does the new Mesa common Vulkan dynamic state framework reduce driver code and what does switching to it involve?","acceptedAnswer":{"@type":"Answer","text":"Switching the Intel Vulkan driver to the common vk_dynamic_graphics_state framework removed approximately 1000 lines of code. A driver must embed vk_dynamic_graphics_state in its pipeline object and command buffer, call vk_cmd_set_dynamic_graphics_state() in vkCmdBindPipeline(), read dynamic state from vk_command_buffer::dynamic_graphics_state, and then delete all its own vkCmdSet*() entrypoints. The framework also diffs state on pipeline switches to avoid redundant emissions. Mesa Vulkan driver contributors following this migration find the latest coverage on daily.dev."}},{"@type":"Question","name":"What does VK_EXT_graphics_pipeline_library require from Mesa drivers in terms of state management?","acceptedAnswer":{"@type":"Answer","text":"VK_EXT_graphics_pipeline_library splits pipeline state into four groups — vertex input, pre-rasterization shaders, fragment shader, and fragment output interface — and allows partial pipelines to be linked. Drivers need a data structure capturing all state from each partial pipeline so combined and computed states can be resolved at link time. The new vk_graphics_pipeline_state_fill() and vk_graphics_pipeline_state_merge() helpers in Mesa automate this accumulation. Developers implementing pipeline libraries in Mesa stay current on framework changes through daily.dev."}}]}
```

