d3d12_xs: sync unified memory texture uploads on ExecuteCommandLists and fix Xbox One texture VA caching #118
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
library
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/omonkeyz--xbox-emulator!118
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/118/head"
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?
@adriaespii on GitHub · 2026-11-22 12:08 UTC · original
adriaespii:contrib/terraria-texture-sync-upload→main· +141 −7 · 6 files · 104 commits · closed without mergingSummary
Resolves the first-frame initialization hang in titles like Terraria (Xbox One \d3d12_x) where Unity waits indefinitely for async texture upload completion (\WaitOnAddress\ loop until \ exture+0xe9\ is set) before any frame is presented (\PresentX).
Root Cause & Changes
egister_direct_queue, ensuring \upload::pump\ commands are always submitted to a valid Direct command queue even if \exec_lists_x\ is triggered on a non-direct (e.g. Copy/Compute) queue.
Verification
@omonkeyz on GitHub · 2026-11-22 13:12 UTC · original
Main's history was rewritten, which auto-closed this PR (sorry for the noise). A maintainer reviewed it. The safe part (texture VA / is_xbox_one no longer caching false before d3d12_x.dll loads, plus Direct queue registration) will be applied with your authorship. The per-ExecuteCommandLists pump needs changes. pump() is presenting-thread-only, and it adds a cost to every ExecuteCommandLists call. Acceptable shape: an atomic pending check that costs nothing with no backlog, gated to Xbox One, and either pump() made safe from any thread under a lock or ExecuteCommandLists only signalling the presenting/upload thread. Add a test showing no double submit when two threads race. Forcing poll_mode on for Xbox One is fine together with that. To resubmit:
git fetchthis repo, branch from the currentmain, cherry-pick only your own commits (the old branch is based on the previous history and cannot be merged), and open a new PR.@omonkeyz on GitHub · 2026-11-22 13:18 UTC · original
Update: the safe part is applied in
d693e69(merged in99f48e3) with your authorship kept, thanks! The ExecuteCommandLists pump and forced poll mode are still open as described above. Please resubmit those as a new PR based on the current main.Pull request closed