mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:45:53 +01:00
[PR #958] d3d12_xs: retain queue and fence wrappers through forwarded calls #996
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#996
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/958
Author: @Kadamitas
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:restore/queue-child-lifetime📝 Commits (3)
8cfbfe0d3d12_xs: keep child proxies alive during queue calls41a1065d3d12_xs: avoid full registry walks when unwrapping objectsfe9ee37xs proxy mock: check queue and fence ownership during forwarding📊 Changes
2 files changed (+113 additions, -11 deletions)
View changed files
📝
runtime/shims/d3d12_xs_device.cpp(+96 -8)📝
runtime/test/xs_proxy_mock_test.cpp(+17 -3)📄 Description
Claimed in the coordination issue as: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7136476546
What and why
Restore two changes originally proposed in ItsNotRexed/Leonida PR 9475. A forwarded queue operation now keeps its wrapper alive until the backend returns. Signal and Wait also retain the fence wrapper while using its underlying object. The live-child index uses 256 address buckets and performs identity checks without allocating during lookup. The registry lock is released before calling the backend or releasing an underlying COM object.
The rebase preserves current main's command-list unwrapping and presentation routes. The mock samples the queue and fence ownership counts inside Signal and Wait, then checks that both return to their initial counts. Credit to VibeClauding for reviewing the original change and identifying the need to check ownership during the call.
The claim uses the unlisted-work route in CONTRIBUTING.md. A board ID can be added if the maintainers assign one.
Tested
On Windows 11 Pro 25H2 (26200.9974), Visual Studio 2022 MSVC toolset 14.36.32532, x64. All six existing mock modes passed on 8106179d6, including the new in-call ownership assertions. The default run also checked presentation and command-list forwarding.
The normal CMake target stopped in the separate CRT timed-wait shim on this older toolset. The proxy mock's two source files compiled directly from an x64 developer prompt:
Ran the executable with no arguments and with each of
--fail-virtualalloc,--fail-virtualprotect,--fail-veh,--env-slots, and--env-slots-invalid. The repository content guard andgit diff --checkalso passed.GPUs tested: n/a, synthetic COM backend.
AI-assisted: yes.
Checklist
a28927849).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.