mirror of
https://github.com/games-on-whales/gst-wayland-display.git
synced 2026-10-15 12:51:57 +00:00
[PR #52] feat(vulkan): write directly into compatible encode images #53
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#53
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/52
Author: @elibosley
Created: 7/30/2026
Status: 🔄 Open
Base:
feat/vulkan-encode← Head:agent/direct-encode-storage📝 Commits (3)
fd1c97cfix(vulkan): preserve allocator image create flags9d60844feat(vulkan): write directly into compatible encode imagese8d7e98docs(vulkan): document direct encode prerequisites📊 Changes
5 files changed (+332 additions, -107 deletions)
View changed files
📝
docker/vulkan.Dockerfile(+6 -3)📝
patches/README.md(+12 -0)➕
patches/vulkan-image-create-flags-1.28.patch(+13 -0)📝
wayland-display-core/src/utils/vulkan_nv12.rs(+71 -44)📝
wayland-display-core/src/utils/vulkan_share.rs(+230 -60)📄 Description
Summary
The shared Vulkan encoder path can now write NV12 directly into a compatible encode image, eliminating the scratch image and copy on drivers that support the required storage and video-encode combination.
Why This Exists
The shared encoder image was already created with
VIDEO_ENCODE_SRC, but compute conversion still wrote to a separate storage image and copied the result into that encoder image. This added an allocation, synchronization, and full-frame transfer to every compatible frame.Resolution
Probe
STORAGE | VIDEO_ENCODE_SRCsupport with the active video profile, image-format list, tiling, and creation flags. When supported, allocate the encoder image with storage usage and create plane views directly on it. When unsupported or allocation fails, retain the existing scratch-image-and-copy path.Reviewer Considerations
Behavior Changes
Implementation Summary
MUTABLE_FORMATandEXTENDED_USAGE.Verification
cargo fmt --check— passed.git diff --check origin/feat/vulkan-encode...HEAD— passed.cargo test -p wayland-display-core direct_encode --lib— blocked before compilation in this macOS checkout becausewayland-server.pcis unavailable; the container image runscargo test --release -p wayland-display-core direct_encode.Risk
Moderate, hardware-specific: a driver can decline the combined image capabilities. The capability probe and allocation-failure fallback preserve the prior scratch-and-copy path; NVIDIA and RADV encode smoke tests are still needed.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.