mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:10:52 +01:00
[PR #77] Cancel suspended Vulkan presents before enqueueing #129
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#129
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/77
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:old-pr/9805📝 Commits (1)
3c51dceCancel suspended Vulkan presents before enqueueing📊 Changes
3 files changed (+51 additions, -27 deletions)
View changed files
📝
runtime/shims/xbox_present.cpp(+3 -4)📝
runtime/src/vulkan_present.h(+17 -23)📝
runtime/test/vk_presenter_sync_test.cpp(+31 -0)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Claimed in the coordination issue as deferred Vulkan presents and SuspendX.
What and why
When
SuspendXinterrupted a wait on a full deferred-present queue, the presenter still queued the interrupted request and returned success. That let the queue exceed its eight-present limit and allowed the interrupted frame to appear after the held work was released.The capacity check and enqueue now share the presenter lock. Waiting releases that lock so the queue can drain, and a cancelled wait returns
VK_NOT_READYbefore adding work. A blankPresentXreports the suspended state, matching the textured paths, and skips the presentation counters on failure.Tested
Windows 11, MSVC 19.44, NVIDIA GeForce RTX 4060 Ti, driver 621.01, Vulkan validation enabled. Synthetic data only.
xbox_presentandd3d12_queue_handoverpassed with the fix.vk_presenter_syncregression failed as expected against the unmodified runtime on5d74c2723because the ninth present did not returnVK_NOT_READY. The patched executable built successfully. Windows Application Control blocked its launch, so the positive result still needs verification.git diff --checkandscripts/check_no_game_data.pypassed on the three changed files.AI-assisted: yes (OpenAI Codex).
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.