D3D12.X: keep compositor render targets out of title tracking #2470
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2480"
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?
Imported from ivall/xcl. Originally posted by Creaa on 2026-11-25T19:52:53Z.
The presenter creates its render-target view through the same hooked D3D12 device as the title. Tracking that view adds a COM reference to the swap-chain back buffer that can prevent DXGI from resizing the buffers. Addresses the back-buffer reference in #2456. The sRGB format question in that issue remains open.
What is in it
The RTV creation and binding hooks skip title tracking during the presenter's own work. A regression test checks that the title's render target stays registered and bound while the compositor's handle stays out of both tables.
Tested
cargo test -p xcl --lib compositor_render_targets_stay_out_of_title_trackingfailed before the fix because both handles appeared in the table. On7400291it passed.cargo build --workspacesucceeded.cargo test --workspace --no-fail-fast -- --test-threads=4reported 1414 passed, 0 failed, 46 ignored. The 29 SKIPPED messages covered wave64, unsupported direct-DXIL cases, heap windows, D3D12 debug layers and the driver cache setting that requires Developer Mode. The harness includes skipped cases in its pass count.Regression run
main:
this PR:
Not tested
The 60-second retail run did not specifically exercise a swap-chain resize after multi-plane composition. The unit test covers the references held by the tracking hooks.
AI use
OpenAI Codex (GPT-6) verified the tracking path, wrote the change and its regression test, ran the test suite and both smoke runs, and drafted this description.
Imported from ivall/xcl. Originally posted by bmjask on 2026-11-25T20:35:52Z.
Review: COMMENTED
No source-level blocker found. IN_PRESENT is set before compositor recording, so compositor RTV/binding operations bypass title tracking while title operations outside presentation remain tracked; current CI and smoke evidence are green. The important remaining validation gap is an actual swap-chain ResizeBuffers exercise after multi-plane composition, the user-visible failure this prevents. The hook-level test does not cover that end-to-end path.
upstream-sync referenced this pull request2026-11-25 21:03:50 +00:00
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T20:34:26Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-25T20:52:02Z.
gpu_suite (cold cache): 164 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR.Targeted run of
compositor_render_targets_stay_out_of_title_tracking: passed.Imported from ivall/xcl. Originally posted by rgroenewoudt on 2026-11-26T16:50:08Z.
Tested on AMD Radeon RX 9070 (RDNA4) at this PR's head
7400291: no new failures.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4: 1412 passed, 2 failed, 46 ignored. The 2 failures arefuzz_validate_and_gpu_1(seed 722) and_3(seed 1599), the AMD ones from #2115, not touched here.heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows)Not tested
AI use
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-30T08:39:59Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:09:12Z.
Triage (#1607) – head
7400291Not on main: main's
note_rtvandnote_rt0inpresent.rsstill check onlyenabled(). No other open PR makes this change as its own. The same guard appears in a fork commit (28ec004) carried in the base of several unrelated PRs (e.g. #2589), which has no PR of its own and is not on main. #2537 deals with the sRGB part of #2456.The compositor's
CreateRenderTargetViewandOMSetRenderTargetsrun insidepresent_now, which setsIN_PRESENT, so the guard covers them. The test checks both tables and needs no GPU. No problems found in the diff.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.