mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:15:51 +01:00
[PR #2259] xbox_present_test: a resize round whose present was out of date has no readback (TEST-XBOX-PRESENT-RESIZE-OUT-OF-DATE) #2261
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#2261
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/2259
Author: @CodingRule
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:test-xbox-present-resize-out-of-date📝 Commits (1)
01bf5f1xbox_present_test: a resize round whose present was out of date has no readback (TEST-XBOX-PRESENT-RESIZE-OUT-OF-DATE)📊 Changes
1 file changed (+15 additions, -3 deletions)
View changed files
📝
runtime/test/xbox_present_test.cpp(+15 -3)📄 Description
Claimed in the coordination issue as: TEST-XBOX-PRESENT-RESIZE-OUT-OF-DATE (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7190029861)
What and why
xbox_presentis red onmainon NVIDIA under Windows:line 1226: present_planes(&one, 1), in the resize loop ofruntime/test/xbox_present_test.cpp(section F, 320x240 -> 400x300 -> 200x150 -> 320x240).What happens there, measured with a temporary print in the test's helper:
SetWindowPos, the first composed present is acquired on the old swapchain andvkQueuePresentKHRreturnsVK_ERROR_OUT_OF_DATE_KHR.PresentXreturnsS_OK(its work was submitted) and the frame is not counted as shown, asvulkan_present.hdocuments.9f98dcc61the presenter setscaptured_ = falsebefore every present ("never expose a stale sample after an unsampled or unshown frame",runtime/src/vulkan_present.h:555), and only a shown frame sets it again. Soread_backreturns false for that frame:read_back=0 bytes=307200 extent=320x240 want=0x0.The presenter's rule is deliberate, so this changes the test, not the runtime: a round whose present was not shown is skipped, and it must not hand out a frame either. Only the first two rounds of a size may go unshown (the next present recreates the swapchain); the last round must be shown and have the new size, which is what the loop checked before.
One file, test only.
Tested
On
maina73a57e13, built withscripts\build_runtime.ps1(MSVC 14.44.35207, RelWithDebInfo):ctest -R "^xbox_present$"line 1226: present_planes(&one, 1)xbox_present_test: all cases pass, the resize line printsokFull
cteston the same build before the change: 475 of 477 passed; the other failure isd3d12_set_descriptor_heaps(line 353), which #2153 covers. I have not run this on AMD or Intel, where the present after a resize may be reported suboptimal instead; that path is the unchanged one (the frame is shown and read back).GPUs tested: NVIDIA GeForce RTX 4090, driver 591.86, Vulkan 1.4.325, Windows 11 Pro build 26200
AI-assisted: yes (Claude Code found the failure, wrote the change and ran the tests)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.