mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:20:51 +01:00
[PR #526] [MERGED] d3d12_xs: keep the Win32 PresentX window responsive during rendering #574
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#574
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/526
Author: @Rain156
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:fix/windows-present-window-pump📝 Commits (10+)
0a71454d3d12_xs: honour XMemAllocationHooks for descriptor heaps and translate CPU handles8563343d3d12_xs: device slot 25 pads a render target to whole console tiles (RT-5 stop 17)584ef36d3d12_xs: device slot 25 gives the PC device clean resource descriptions (RT-5 stop 16)f1a68eed3d12_xs: console render target sizes follow each resource's alignment, slot 56 offsets, full mip chains, rounded-up mip extents, B5G5R5A1, saturating sums35e687fd3d12_xs: committed resources lease their size through the title's XMem hooks (RT-5 stop 17)20936e8d3d12_xs: a console indirect argument of type 105 is created as DISPATCH (slot 41)58ce13cd3d12_xs: read the console argument type as its 32 bits (clang-cl)3b86f5fd3d12: CreateCommandSignature creates a DISPATCH_MESH signature on a device with mesh shadersf54cf31d3d12_xs: Xbox device slot 61 is CreateSamplerX, routed to the PC CreateSampler6d4cf2cd3d12_xs: slot 61 is CreateSamplerX only for the title's calls; a host caller gets PC CreateMetaCommand📊 Changes
25 files changed (+2317 additions, -133 deletions)
View changed files
📝
docs/d3d12_vulkan.md(+28 -2)📝
runtime/CMakeLists.txt(+8 -0)📝
runtime/shims/d3d12_com.cpp(+9 -13)📝
runtime/shims/d3d12_vulkan_device.cpp(+5 -0)📝
runtime/shims/d3d12_xs.cpp(+17 -0)➕
runtime/shims/d3d12_xs_alloc_size.h(+156 -0)➕
runtime/shims/d3d12_xs_desc_clean.h(+34 -0)📝
runtime/shims/d3d12_xs_device.cpp(+833 -50)📝
runtime/shims/d3d12_xs_device.h(+54 -11)➕
runtime/shims/present_window.h(+72 -0)📝
runtime/shims/registry.cpp(+39 -0)📝
runtime/shims/shims.h(+13 -0)📝
runtime/shims/xbox_present.cpp(+3 -2)📝
runtime/shims/xbox_present.h(+2 -1)📝
runtime/src/command_list.h(+3 -0)📝
runtime/src/frame_pacer.h(+19 -6)📝
runtime/src/pe_loader.cpp(+7 -0)📝
runtime/test/allocator_proxy_test.cpp(+24 -7)📝
runtime/test/d3d12_mesh_test.cpp(+22 -0)📝
runtime/test/device_proxy_test.cpp(+70 -0)...and 5 more files
📄 Description
Claimed in the coordination issue as: RT-PRESENTX-WINDOW-PUMP (claim).
Depends on: #414
What and why
The Win32 fallback window created by #414 belongs to the rendering thread. On native Windows the window stopped answering messages during pipeline compilation, and it could still be marked hung while draws and presents continued. Give this HWND a dedicated message thread. Release its Vulkan presenter before waking and joining the window owner on shutdown.
The change to review is ce3e5153f. The preceding PresentX commits are from #414. The title-owned window path is outside this change.
Tested
WM_NULLprobe in 0.08 ms while the game was running. Before the change Windows reported the fallback HWND hung. Captured frames were still black. GPU content is a separate open problem.GPUs tested: NVIDIA GeForce RTX 5070 Ti, driver 617.42, Windows 11 Pro x64. The hidden-window test needs only a Win32 desktop.
AI-assisted: yes, OpenAI Codex.
Checklist
mainis merged into the stack and the branch merges cleanly.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.