mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:40:52 +01:00
[PR #389] [MERGED] OLD-8171: a failed ResizeBuffers leaves the swap chain without buffers until the next one succeeds, as on the host #442
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#442
Loading…
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/ubiquitarianism/leonida/pull/389
Author: @lines9686-rgb
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism
Base:
main← Head:dxgi-resizebuffers-lost📝 Commits (3)
a3090aadxgi: a failed ResizeBuffers leaves the swap chain without buffers until the next one succeeds, as on the host3746bffdxgi: SetSourceSize checks the requested size after a failed ResizeBuffers; the comparison treats DXGI_STATUS_OCCLUDED as S_OKeeeda84dxgi_swapchain_count_test: every chain is the offscreen ring on main now, so the failed-resize cases with matching counts expect it too📊 Changes
3 files changed (+287 additions, -18 deletions)
View changed files
📝
runtime/shims/dxgi_com.cpp(+52 -13)📝
runtime/test/dxgi_swapchain_count_test.cpp(+100 -5)📝
runtime/test/dxgi_swapchain_test.cpp(+135 -0)📄 Description
Claimed 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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.