[PR #1829] Cancel suspended Vulkan presents before enqueueing (OLD-9805, carries #77) #1841

Open
opened 2026-11-26 21:19:09 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1829
Author: @potatoe0100
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: carry/old-9805


📝 Commits (1)

  • 1ddae51 Cancel 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

Claimed in the coordination issue as: OLD-9805 (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7162809577)

What and why

Carries forward old-pr/9805 (draft #77) by @a-lebailly, rebased on main 0d80bc5df with the author's commit. The deferred-present capacity check and the enqueue now happen under one lock, a wait aborted by suspension returns VK_NOT_READY, and a blank PresentX reports the suspended state instead of the raw failure.

Rebase notes: runtime/shims/xbox_present.cpp conflicted with main's present_diag() wrapper on the blank-present path. Kept the author's suspended-state check and wrapped both returns in present_diag(__LINE__, ...) as main does.

Supersedes draft #77 (its branch can be deleted once this lands).

Tested

VS 2022 (MSVC 19.44) RelWithDebInfo + Ninja, Vulkan SDK 1.4.363.0.

  • vk_presenter_sync passes.
  • Full ctest -j 6: 439 of 439 passed.

GPUs tested: NVIDIA GeForce RTX 4060, driver 621.14, Windows 11 Pro 26H2 (build 26300)

AI-assisted: yes (the original commit says OpenAI Codex; the rebase and testing used Claude Code), by a non-developer tester.

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of 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.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1829 **Author:** [@potatoe0100](https://github.com/potatoe0100) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `carry/old-9805` --- ### 📝 Commits (1) - [`1ddae51`](https://github.com/ubiquitarianism/leonida/commit/1ddae513607a24df122e54c69d0f9e30d84f8d46) Cancel suspended Vulkan presents before enqueueing ### 📊 Changes **3 files changed** (+51 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `runtime/shims/xbox_present.cpp` (+3 -4) 📝 `runtime/src/vulkan_present.h` (+17 -23) 📝 `runtime/test/vk_presenter_sync_test.cpp` (+31 -0) </details> ### 📄 Description Claimed in the coordination issue as: OLD-9805 (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7162809577) ### What and why Carries forward `old-pr/9805` (draft #77) by @a-lebailly, rebased on `main` `0d80bc5df` with the author's commit. The deferred-present capacity check and the enqueue now happen under one lock, a wait aborted by suspension returns `VK_NOT_READY`, and a blank `PresentX` reports the suspended state instead of the raw failure. Rebase notes: `runtime/shims/xbox_present.cpp` conflicted with `main`'s `present_diag()` wrapper on the blank-present path. Kept the author's suspended-state check and wrapped both returns in `present_diag(__LINE__, ...)` as `main` does. Supersedes draft #77 (its branch can be deleted once this lands). ### Tested VS 2022 (MSVC 19.44) RelWithDebInfo + Ninja, Vulkan SDK 1.4.363.0. - `vk_presenter_sync` passes. - Full `ctest -j 6`: 439 of 439 passed. GPUs tested: NVIDIA GeForce RTX 4060, driver 621.14, Windows 11 Pro 26H2 (build 26300) AI-assisted: yes (the original commit says OpenAI Codex; the rebase and testing used Claude Code), by a non-developer tester. ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1841
No description provided.