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

Open
github-bot wants to merge 1 commit from github-bot/gh-2480 into main AGit
Owner

@⁠Creaa on GitHub · 2026-11-25 19:52 UTC · original
Creaa:d3d12x/compositor-rtv-tracking-2456 → main · +30 −2 · 1 files · 1 commits · open

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.

**@⁠Creaa** on GitHub · 2026-11-25 19:52 UTC · [original](https://github.com/xcl-dev/xcl/pull/2480) `Creaa:d3d12x/compositor-rtv-tracking-2456` → `main` · +30 −2 · 1 files · 1 commits · open 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)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:31:45 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 20:34 UTC · original

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!

**@⁠DavidM1911** on GitHub · 2026-11-25 20:34 UTC · [original](https://github.com/xcl-dev/xcl/pull/2480#issuecomment-7173871121) 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!
Author
Owner

@⁠SlopTart on GitHub · 2026-11-25 20:52 UTC · original

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.

**@⁠SlopTart** on GitHub · 2026-11-25 20:52 UTC · [original](https://github.com/xcl-dev/xcl/pull/2480#issuecomment-7174295001) `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.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2480/head:github-bot/gh-2480'
git switch 'github-bot/gh-2480'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2480'
git switch 'github-bot/gh-2480'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2480'
git switch 'github-bot/gh-2480'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2480'
git switch 'main'
git merge --squash 'github-bot/gh-2480'
git switch 'main'
git merge --ff-only 'github-bot/gh-2480'
git switch 'main'
git merge 'github-bot/gh-2480'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.