<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/notes-on-hacking-gfxreconstruct-to-enable-h-265-video-encoding-nspajswko" -->

---
title: Notes on hacking gfxreconstruct to enable H.265 video...
description: A developer working on Vulkan Video encode support in Mesa needed to capture H.265 encoding traces, but gfxreconstruct explicitly blocked the...
canonical: https://daily.dev/posts/notes-on-hacking-gfxreconstruct-to-enable-h-265-video-encoding-nspajswko
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Notes on hacking gfxreconstruct to enable H.265 video encoding | daily.dev
og:description: A developer working on Vulkan Video encode support in Mesa needed to capture H.265 encoding traces, but gfxreconstruct explicitly blocked the...
og:url: https://daily.dev/posts/notes-on-hacking-gfxreconstruct-to-enable-h-265-video-encoding-nspajswko
og:image: https://api.daily.dev/og/posts/nsPAjSWKO.png
og:image:alt: Notes on hacking gfxreconstruct to enable H.265 video encoding
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.

# Notes on hacking gfxreconstruct to enable H.265 video encoding

**[Planet Igalia](https://daily.dev/sources/planet-igalia)** · 4 min read · 0 upvotes · 0 comments

## Summary

A developer working on Vulkan Video encode support in Mesa needed to capture H.265 encoding traces, but gfxreconstruct explicitly blocked the VK_KHR_video_encode_h265 extension. The writeup walks through gfxreconstruct's two blocking mechanisms - a runtime extension blocklist and a code generator exclusion list - and how removing both, plus patching an unresolvable XML len attribute for StdVideoH265HrdParameters, enabled capture support. The piece closes by generalizing the recipe to any other blocked Vulkan video extension, noting H.264 encode is still blocked.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blogs.igalia.com/vjaquez/notes-on-hacking-gfxreconstruct-to-enable-h-265-video-encoding>

## Questions this post answers

### How do I enable VK_KHR_video_encode_h265 capture support in gfxreconstruct?

Remove the extension from the runtime blocklist in framework/encode/vulkan_entry_base.cpp (kVulkanUnsupportedDeviceExtensions), then remove VK_KHR_video_decode_h265 from the _remove_extensions list and vulkan_video_codec_h265std from _remove_video_extensions in vulkan_base_generator.py, and regenerate the code with generate_vulkan.py. VK_KHR_video_maintenance2 should stay included since its structs interact with H.265 session parameters.

_daily.dev surfaces deep Vulkan tooling writeups like this for engineers extending gfxreconstruct._

### Why does gfxreconstruct's code generator fail on StdVideoH265HrdParameters with a len attribute error?

The generator cannot resolve the len expression for pSubLayerHrdParametersNal and pSubLayerHrdParametersVcl because video.xml specifies len="*_max_sub_layers_minus1 + 1", referencing a field that lives in an outer struct (VPS or SPS) rather than in StdVideoH265HrdParameters itself. The generator only walks a struct's own members and cannot follow cross-struct references, so the fix is stripping the len attribute in gencode.py before generation, which makes it treat the pointers as single elements.

_engineers debugging Vulkan XML registry codegen issues can find this kind of trace on daily.dev._

## Similar posts on daily.dev

- [Vulkan Video H.264/H.265 Encode Now Working For Intel Alchemist GPUs On Linux](https://daily.dev/posts/vulkan-video-h-264-h-265-encode-now-working-for-intel-alchemist-gpus-on-linux-m264khd76) · Phoronix · 1 upvotes · 0 comments
- [Video Encoding and Decoding with Vulkan Compute Shaders in FFmpeg](https://daily.dev/posts/video-encoding-and-decoding-with-vulkan-compute-shaders-in-ffmpeg-wmurcqryk) · Khronos · 0 upvotes · 0 comments
- [NVK Vulkan Video Merged For Mesa 26.3](https://daily.dev/posts/nvk-vulkan-video-merged-for-mesa-26-3-grsvw11v9) · Phoronix · 0 upvotes · 0 comments
- [FFmpeg Lands H.265 Vulkan Encode Performance Optimizations](https://daily.dev/posts/ffmpeg-lands-h-265-vulkan-encode-performance-optimizations-kqqs9jkcl) · 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/notes-on-hacking-gfxreconstruct-to-enable-h-265-video-encoding-nspajswko)

```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":"Notes on hacking gfxreconstruct to enable H.265 video encoding","url":"https://daily.dev/posts/notes-on-hacking-gfxreconstruct-to-enable-h-265-video-encoding-nspajswko","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/notes-on-hacking-gfxreconstruct-to-enable-h-265-video-encoding-nspajswko"},"datePublished":"2026-09-20T07:44:42.365Z","dateModified":"2026-09-20T07:48:38.264Z","description":"A developer working on Vulkan Video encode support in Mesa needed to capture H.265 encoding traces, but gfxreconstruct explicitly blocked the...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5b9b6b28b96f22cd6a10474bc47a31af?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5b9b6b28b96f22cd6a10474bc47a31af?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Planet Igalia","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":"Planet Igalia","logo":"https://media.daily.dev/image/upload/s--84VSWNwZ--/f_auto,q_auto/v1789890204/logos/planet-igalia?_a=BAMAMicg0","url":"https://daily.dev/sources/planet-igalia"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/notes-on-hacking-gfxreconstruct-to-enable-h-265-video-encoding-nspajswko","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"vulkan,mesa","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Planet Igalia","item":"https://daily.dev/sources/planet-igalia"},{"@type":"ListItem","position":3,"name":"Notes on hacking gfxreconstruct to enable H.265 video encoding"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/notes-on-hacking-gfxreconstruct-to-enable-h-265-video-encoding-nspajswko#faq","mainEntity":[{"@type":"Question","name":"How do I enable VK_KHR_video_encode_h265 capture support in gfxreconstruct?","acceptedAnswer":{"@type":"Answer","text":"Remove the extension from the runtime blocklist in framework/encode/vulkan_entry_base.cpp (kVulkanUnsupportedDeviceExtensions), then remove VK_KHR_video_decode_h265 from the _remove_extensions list and vulkan_video_codec_h265std from _remove_video_extensions in vulkan_base_generator.py, and regenerate the code with generate_vulkan.py. VK_KHR_video_maintenance2 should stay included since its structs interact with H.265 session parameters. daily.dev surfaces deep Vulkan tooling writeups like this for engineers extending gfxreconstruct."}},{"@type":"Question","name":"Why does gfxreconstruct's code generator fail on StdVideoH265HrdParameters with a len attribute error?","acceptedAnswer":{"@type":"Answer","text":"The generator cannot resolve the len expression for pSubLayerHrdParametersNal and pSubLayerHrdParametersVcl because video.xml specifies len=\"*_max_sub_layers_minus1 + 1\", referencing a field that lives in an outer struct (VPS or SPS) rather than in StdVideoH265HrdParameters itself. The generator only walks a struct's own members and cannot follow cross-struct references, so the fix is stripping the len attribute in gencode.py before generation, which makes it treat the pointers as single elements. engineers debugging Vulkan XML registry codegen issues can find this kind of trace on daily.dev."}}]}
```

