Display output: bars around the picture in a window of other proportions, instead of stretching it #3755
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!3755
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3755"
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?
@stasadance on GitHub · 2026-11-30 06:03 UTC · original
stasadance:feat/letterbox-output→main· +101 −1 · 3 files · 1 commits · openRelated: #3366
What it changes
When the window's client area isn't at the picture's proportions, the swap chain scales the back buffer to the window, and vkd3d-proton only stretches. Under Wine's X11 driver on GNOME the window manager resizes the window freely (no WM_SIZING, no aspect hints), so the picture came out stretched, e.g. a 1920x1080 window resized to 1328x1080.
Now, when the proportions differ, the back buffer takes the window's size, the composer draws the picture whole in its middle and the rest is black, so the picture is never stretched. DLSS Frame Generation is told the picture's part of the back buffer (
kBufferTypeBackbuffer, 53, with its extent alone), so the bars are copied as they are.VICTORY_LETTERBOX=0stretches, as before.How it was tested
cargo testpassed for the crates it touches: nativecargo testcannot buildvictory-gpuon a Linux host (same on main), so no;cargo xwin clippyfor the Windows target adds no warning over current main.Checked for overlap
@ -2526,0 +2530,4 @@// the back buffer alone, the bars are copied as they are. (Streamline// knows the back buffer: the tag carries the extent only.)let picture = crate::host::letterboxed();if picture.is_some() || LETTERBOX_TAGGED.swap(picture.is_some(), Relaxed) {@andrewpozdnakov7-jpg on GitHub · 2026-11-30 07:11 UTC · original
||skips its right-hand operand whenpicture.is_some()is true. That leavesLETTERBOX_TAGGEDfalse during frames with bars, so the first full-size frame never emits the intended reset extent.I ran the exact condition extracted from
a2439f2and from the one-line fix in a native Rust harness. With two transitions from bars to full size, the PR omitted both reset extents. With the swap evaluated first, both transitions emitted the full extent once. Consecutive full-size frames emitted nothing. This checks the tag decisions before the Streamline call. NVIDIA DLSS-G guide, backbuffer subrectLocal fix
bd7ab26is based on the exact PR head. If incorporating it manually, please retain the Git author or addCo-authored-by: andrewpozdnakov7-jpg <[email protected]>.AI-assisted with OpenAI Codex.
@stasadance on GitHub · 2026-11-30 08:22 UTC · original
Thanks @andrewpozdnakov7-jpg, you're right: with
||short-circuiting, the swap never ran on frames with bars, so the first full-size frame after them never re-tagged the whole back buffer. Fixed inf9feb31by evaluating the swap first, as you suggested, with you as co-author.@andrewpozdnakov7-jpg on GitHub · 2026-11-30 08:48 UTC · original
Retested the exact updated head
f9feb31don Windows. In the eight-frame fixture, both returns from bars to full size emitted the full extent once and the following full-size frames emitted no additional tag. This resolves the tag-decision issue I raised. The fixture stops before the Streamline call.9c3d1838c6to22f3adf8a1View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.