Skip to content

[upstream #994] D3D12.X: preserve busy allocators when replacement fails - #128

Closed
ufoptg wants to merge 1 commit into
mainfrom
upstream-pr/994
Closed

ufoptg wants to merge 1 commit into
mainfrom
upstream-pr/994

Conversation

@ufoptg

@ufoptg ufoptg commented Nov 24, 2026

Copy link
Copy Markdown
Owner

When a busy command allocator needs another backing, failure in GetDevice or CreateCommandAllocator currently returns None from title_reset. The caller interprets that as permission to reset the original allocator, even though its recordings are still held. Return the failure HRESULT instead and preserve the backing and recording associations. Fixes xcl-dev#989.

This is a failure-path fix following xcl-dev#897/xcl-dev#907. It does not establish the cause of the retail world-loading watchdog or null-write reports.

What is in it

  • alloc_pool.rs: propagate replacement errors instead of falling through to the original Reset; synthetic COM regression for device-lookup failure, allocation failure, retries, recording associations and reference cleanup.
  • README.md: describe failed replacement behavior. One commit, no new dependencies or game data.

Tested

  • Source inspection of the caller and replacement paths on main 9aec53d.
  • git diff --check: exit 0.
  • No local build, test executable, GPU workload or game was run for this change. Local execution is disabled at the user's request; no local passing test counts are claimed.
  • Independent report by @dcastell1: this PR's patch applied to main@02bfd1d, Windows 11 10.0.26300, RTX 5090 driver 621.24, Rust 1.100.0/MSVC 14.44.35207, debug; cargo test --workspace -- --test-threads=4: 728 passed, 0 failed, 41 ignored versus baseline 727/0/41. Report prepared using opencode (model not specified). This is an external patch-on-main run, not an exact-head retail smoke run; GPU skip counts were not reported.

Regression run
Not run. Main/head retail smoke blocks are missing; this remains a draft pending Windows validation.

Not tested

  • Local compilation/execution, actual allocation pressure and retail gameplay. The independent suite report above does not replace paired main/head retail smoke runs.
  • Expected negative control by source inspection: the unmodified path returns None for both injected failures, so the new HRESULT assertions should fail. This has not been executed.
  • The existing successful replacement path is unchanged. Other allocator failure cases and the title's response to an allocation error remain outside this patch.

AI use
Codex (GPT-6) inspected the code, wrote the patch and regression, and prepared this description. The exact backend model identifier was not provided in this session.


Mirror of xcl-dev#994 (auto-synced, do not edit).

Propagate replacement GetDevice/CreateCommandAllocator failures instead of letting the Reset hook fall back to the original backing. Add synthetic COM coverage for failure and retry paths; execution remains pending at the user's request. Fixes xcl-dev#989.
@ufoptg

ufoptg commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

Upstream PR xcl-dev#994 was closed or merged.

@ufoptg ufoptg closed this Nov 25, 2026
@ufoptg
ufoptg deleted the upstream-pr/994 branch November 25, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

D3D12.X: failed replacement allocation falls back to resetting a busy allocator

2 participants