OLD-8171: a failed ResizeBuffers leaves the swap chain without buffers until the next one succeeds, as on the host #389
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!389
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/389/head"
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?
@lines9686-rgb on GitHub · 2026-11-24 04:24 UTC · original
lines9686-rgb:dxgi-resizebuffers-lost→main· +287 −18 · 3 files · 3 commits · merged 2026-11-24 05:09 UTCClaimed in the coordination issue as:
OLD-8171(carried over from the original repository, same author)What and why
On the host, once
ResizeBuffersaccepts its arguments the old buffers are gone. When the new ones cannot be made the call fails and the swap chain stays without buffers: its description already reports the new size, count and format,GetBufferandPresentareDXGI_ERROR_INVALID_CALL, and the next successfulResizeBuffersbrings it back. A side above 16384 isE_INVALIDARGon a hardware device. The layer kept the old buffers instead, so a title that recovers by resizing again saw different answers than on Windows.dxgi_com.cppnow models that state (lost_):GetDesc/GetDesc1report the requested description,PresentandGetBufferrefuse,SetSourceSizechecks against the requested size, a side above 16384 isE_INVALIDARG, and a Vulkan failure isE_OUTOFMEMORY.Rebased on this
main: onmainevery chain is the offscreen ring, so the two fake-table cases that expected the direct path now expect the ring with matching counts.Tested
Windows 11, RTX 3060 Ti, NVIDIA 621.24, MSVC:
dxgi_swapchain_test: PASS. Its new step compares 17 steps of a failed resize and the recovery with the host runtime: 0 mismatches (PresentansweringDXGI_STATUS_OCCLUDEDfor a window off screen counts asS_OK).dxgi_swapchain_count_test: PASS, with 4 failed-resize cases:vkCreateSwapchainKHRfails or the new ring fails, with and without extra native images. Each case checks that the next resize builds a working swap chain.GPUs tested: NVIDIA GeForce RTX 3060 Ti, driver 621.24, Windows 11
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly.scripts/check_no_game_data.pyover every changed file: clean).docs/design.md: n/a🤖 Generated with Claude Code