[PR #51] fix(vulkan): preserve image flags during allocation #52

Open
opened 2026-10-15 12:47:57 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/gst-wayland-display/pull/51
Author: @elibosley
Created: 7/27/2026
Status: 🔄 Open

Base: feat/vulkan-encode ← Head: fix/vulkan-image-create-flags


📝 Commits (1)

  • 3cfe6d0 fix(vulkan): preserve image flags during allocation

📊 Changes

3 files changed (+52 additions, -1 deletions)

View changed files

📝 docker/vulkan.Dockerfile (+3 -1)
📝 patches/README.md (+15 -0)
➕ patches/gstvulkan-preserve-image-create-flags.patch (+34 -0)

📄 Description

What changed

  • add a GStreamer patch that forwards VkImageCreateInfo::flags to
    vkGetPhysicalDeviceImageFormatProperties()
  • apply the patch in the Vulkan runtime image
  • document why the patch is required and when it can be removed

Root cause

gst_vulkan_image_memory_alloc_with_image_info() creates the image with the
caller's flags, but its post-create format query currently passes 0. On RADV,
that makes an otherwise valid multiplanar NV12/P010 allocation fail when
MUTABLE_FORMAT and EXTENDED_USAGE authorize storage-capable plane views.
The wrapped-image allocation path already preserves these flags.

Impact

Compatible Vulkan Video implementations can write conversion output directly
into the encoder-owned NV12/P010 image instead of falling back to a separate
storage scratch image and copy. Implementations that do not advertise the
required format/usage combination retain the existing fallback.

Validation

  • patch applies cleanly to GStreamer 1.28.4 and current GStreamer main
  • the patched GStreamer/Wolf images built successfully with the protected
    Vulkan, HDR, shared-frame ownership, and input-idempotency tests
  • live RADV probes on an AMD Radeon 780M at 3840×2160 selected
    direct_storage=true, optimal tiling, for both NV12/H.264 and P010/H.265
  • local 3840×2160/60 DMA-BUF presentation remained zero-copy

The same minimal source change is prepared against GStreamer main; this
repository patch can be removed once an upstream release contains it.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/games-on-whales/gst-wayland-display/pull/51 **Author:** [@elibosley](https://github.com/elibosley) **Created:** 7/27/2026 **Status:** 🔄 Open **Base:** `feat/vulkan-encode` ← **Head:** `fix/vulkan-image-create-flags` --- ### 📝 Commits (1) - [`3cfe6d0`](https://github.com/games-on-whales/gst-wayland-display/commit/3cfe6d0b3ea6dcb28ce09ab7b0bfab9d699e3855) fix(vulkan): preserve image flags during allocation ### 📊 Changes **3 files changed** (+52 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docker/vulkan.Dockerfile` (+3 -1) 📝 `patches/README.md` (+15 -0) ➕ `patches/gstvulkan-preserve-image-create-flags.patch` (+34 -0) </details> ### 📄 Description ## What changed - add a GStreamer patch that forwards `VkImageCreateInfo::flags` to `vkGetPhysicalDeviceImageFormatProperties()` - apply the patch in the Vulkan runtime image - document why the patch is required and when it can be removed ## Root cause `gst_vulkan_image_memory_alloc_with_image_info()` creates the image with the caller's flags, but its post-create format query currently passes `0`. On RADV, that makes an otherwise valid multiplanar NV12/P010 allocation fail when `MUTABLE_FORMAT` and `EXTENDED_USAGE` authorize storage-capable plane views. The wrapped-image allocation path already preserves these flags. ## Impact Compatible Vulkan Video implementations can write conversion output directly into the encoder-owned NV12/P010 image instead of falling back to a separate storage scratch image and copy. Implementations that do not advertise the required format/usage combination retain the existing fallback. ## Validation - patch applies cleanly to GStreamer 1.28.4 and current GStreamer `main` - the patched GStreamer/Wolf images built successfully with the protected Vulkan, HDR, shared-frame ownership, and input-idempotency tests - live RADV probes on an AMD Radeon 780M at 3840×2160 selected `direct_storage=true`, optimal tiling, for both NV12/H.264 and P010/H.265 - local 3840×2160/60 DMA-BUF presentation remained zero-copy The same minimal source change is prepared against GStreamer `main`; this repository patch can be removed once an upstream release contains it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/gst-wayland-display#52
No description provided.