mirror of
https://github.com/games-on-whales/gst-wayland-display.git
synced 2026-10-15 12:51:57 +00:00
[PR #37] feat(nv12): Vulkan NV12 + VA/Vulkan encode #36
Labels
No labels
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/gst-wayland-display#36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/games-on-whales/gst-wayland-display/pull/37
Author: @JBailes
Created: 6/20/2026
Status: 🔄 Open
Base:
stable← Head:feat/vulkan-encode📝 Commits (10+)
e7aeb99feat(nv12): Vulkan RGBA->NV12 converter + direct VA encodebe09822fix(nv12): share the VA display on the default render-node pathcbfdfe5feat(nv12): addnv12property to prefer NV12 outputb8a6340feat(nv12): negotiate the encoder's NV12 modifierb8d3bc0feat(vulkan): zero-copy NV12 VulkanImage output for vulkanh264ence9e9ea8style: cargo fmtc07bce3build: bundle the vulkanh264enc DPB-pool patch for the gst build8c6ef2cdocs: document meson build recipe for the vkh264enc DPB patch36e0ebaMerge pull request #41 from games-on-whales/feat/vulkan-encode-out1347da2build: move gstreamer-rs to 0.25, bump Rust to 1.92📊 Changes
48 files changed (+13670 additions, -235 deletions)
View changed files
📝
.devcontainer/Dockerfile(+114 -40)📝
.github/workflows/harness.yml(+11 -10)➕
.github/workflows/vulkan-image.yml(+67 -0)➕
CONTRIBUTING.md(+66 -0)📝
Cargo.lock(+129 -81)📝
Cargo.toml(+2 -2)📝
README.md(+55 -0)📝
ci/README.md(+5 -1)📝
ci/harness.sh(+9 -0)➕
docker/vulkan.Dockerfile(+140 -0)📝
gst-plugin-wayland-display/Cargo.toml(+3 -3)📝
gst-plugin-wayland-display/src/lib.rs(+12 -0)📝
gst-plugin-wayland-display/src/waylandsrc/imp.rs(+659 -24)➕
gst-plugin-wayland-display/tests/encode.rs(+213 -0)➕
patches/README.md(+95 -0)➕
patches/vkh264enc-dpb-pool-in-new-sequence.patch(+32 -0)➕
patches/vulkanh265enc.patch(+6116 -0)📝
wayland-display-core/Cargo.toml(+20 -3)📝
wayland-display-core/build.rs(+16 -2)➕
wayland-display-core/resources/protocols/frog-color-management-v1.xml(+356 -0)...and 28 more files
📄 Description
Vulkan RGBA to NV12 converter. waylanddisplaysrc feeds VA encoders an NV12 dmabuf direct, no vapostproc.
GLES renders RGBA. Vulkan imports that dmabuf (VK_EXT_external_memory_dma_buf), compute-shades BT.601 NV12, exports an NV12 dmabuf the encoder takes zero-copy. va_share binds it to the encoder's gst-va display so the encoder reuses one surface per ring slot instead of importing a fresh one each frame.
Pipeline:
A VA encoder directly downstream asks for NV12, so it negotiates on its own. Behind a format-agnostic sink like interpipesink (Wolf), set
nv12=trueso the source offers NV12 first. RGBA stays as a fallback.Tested to EOS, 20 frames:
Real content on Intel (SMPTE + moving ball, decoded): clean, no garbling or tearing.
Default build. CUDA path stacks on top.
Vulkan encode
Second consumer off the same converter: vulkanh264enc, zero-copy.
waylanddisplaysrc emits NV12
memory:VulkanImageon the encoder's shared GstVulkanDevice (via gst context). The encoder views the image, no copy, no dmabuf hop. Setvulkan=true.Pipeline (Wolf, one process):
Fan-out works: one capture, N encoders, mixed profiles. Seed the image's tracked layout to VIDEO_ENCODE_SRC and null its per-memory timeline semaphore so each encoder reads dependency-free; gate ring reuse on buffer release.
Tested on Nvidia 5080, gst 1.28.4 and 1.29.1:
Needs the vkh264enc DPB patch (create_dpb_pool in new_sequence) and Vulkan headers >= 1.4.317 at build.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.