mirror of
https://github.com/games-on-whales/gst-wayland-display.git
synced 2026-10-15 21:02:00 +00:00
[PR #46] [MERGED] fix(vulkan): actually fall back to tiled when a LINEAR encode-src alloc fails #46
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#46
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/46
Author: @salty2011
Created: 7/26/2026
Status: ✅ Merged
Merged: 8/16/2026
Merged by: @JBailes
Base:
feat/vulkan-encode← Head:fix/linear-encsrc-fallback📝 Commits (2)
ffd7b36fix(vulkan): actually fall back to tiled when a LINEAR encode-src alloc failsc764925review: log effective encode-src tiling post-alloc; scope fallback comment to allocation failure📊 Changes
1 file changed (+27 additions, -6 deletions)
View changed files
📝
wayland-display-core/src/utils/vulkan_share.rs(+27 -6)📄 Description
WOLF_VULKAN_LINEAR_ENCSRC's comment promises the knob is safe because it "falls back to tiled if the linear alloc fails", but the code does not do that: whengst_vulkan_image_memory_alloc_with_image_inforeturns null for the LINEAR image,alloc_encode_src_buffersimply returnsNone. That failsVulkanNv12::new_on_shared("encode-src image allocation failed") and the session's entire Vulkan output fails to be created.Verified live on an RTX 5090 (2026-07-24): NVIDIA's Vulkan-Video encoder rejects a LINEAR encode-src image, so setting the knob on an NVIDIA host hard-failed every session instead of degrading gracefully.
This implements the documented behaviour: if the LINEAR allocation returns null while
WOLF_VULKAN_LINEAR_ENCSRCis set, warn and retry the identical allocation withvk::ImageTiling::OPTIMAL. A genuine allocation failure still returnsNoneafter the retry, and the non-knob path is byte-identical because the retry branch is gated onlinear_encsrc.Scope of the safety claim: the fallback only covers a driver that rejects the LINEAR image at allocation time. A driver that accepts the LINEAR image and then corrupts or fails at
vkCmdEncodeVideois not covered. So on a mixed-GPU fleet the knob degrades gracefully for allocation-time rejection (the NVIDIA case above), nothing more.Build-verified on this branch's head (
43d4c25).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.