Skip to content

D3D12.X: keep compositor render targets out of title tracking - #2480

Open
Creaa wants to merge 1 commit into
xcl-dev:mainfrom
Creaa:d3d12x/compositor-rtv-tracking-2456
Open

Creaa wants to merge 1 commit into
xcl-dev:mainfrom
Creaa:d3d12x/compositor-rtv-tracking-2456

Conversation

@Creaa

@Creaa Creaa commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

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

  • RTX 4070 12 GB (driver 617.14), i7-13700F, Windows 11 build 26300, Rust 1.100.0. Debug tests and release smoke runs.
  • cargo test -p xcl --lib compositor_render_targets_stay_out_of_title_tracking failed before the fix because both handles appeared in the table. On 7400291 it passed.
  • cargo build --workspace succeeded. cargo test --workspace --no-fail-fast -- --test-threads=4 reported 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:

xcl-smoke v1
commit: 889ef3e8aa7f267323ab4879e735e65da6bcef10
gpu: NVIDIA GeForce RTX 4070
title: RetailTitle
seconds: 60
exit: 0x0
frames shown: 1568 (PresentX 1568)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16816 MB

this PR:

xcl-smoke v1
commit: 74002910048796fe9504e2a0fd3bbff2063a9781
gpu: NVIDIA GeForce RTX 4070
title: RetailTitle
seconds: 60
exit: 0x0
frames shown: 1578 (PresentX 1579)
presents per 2 s (last 3): 60 43 57
device removals: 0
crashes: 0
peak commit: 19203 MB

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.

The internal presenter uses the same hooked device as the title. An RTV for its swap-chain back buffer therefore acquired an extra COM reference in the title tracking table, which prevents DXGI from resizing the buffers. Skip both tracking hooks during presentation and test that ordinary title bindings are preserved.

Assisted-by: OpenAI Codex (GPT-6)
gustavsi added a commit to gustavsi/xcl that referenced this pull request Nov 25, 2026
…#2127, xcl-dev#2476, xcl-dev#2479, xcl-dev#2467, xcl-dev#2444, xcl-dev#2447, xcl-dev#2448

Integrates compositor RT tracking fix (xcl-dev#2480), split shader cache budget
(xcl-dev#2475), foreign-thread deferred release (xcl-dev#2474), Wine 4-thread DXC cap
(xcl-dev#2127), DXIL feature/reload fixes (xcl-dev#2476, xcl-dev#2479), DXC loader cleanup
(xcl-dev#2467), console xcl-dev#14 null ppv guard (xcl-dev#2444), root-sig flag stripping
(xcl-dev#2447), and two-pass stream canonicalization (xcl-dev#2448).

Assisted-by: Antigravity (Gemini 4 Neon)
@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

Thanks!

@bmjask bmjask left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@SlopTart

Copy link
Copy Markdown

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.

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.

4 participants