D3D12.X: wait for tiled-texture queues in late_release #1314

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

@⁠ExoCalibra on GitHub · 2026-11-24 14:38 UTC · original
ExoCalibra:pr/late-release-vram-queue → main · +93 −6 · 2 files · 1 commits · open

late_release::drain_known waited on title queues, the sparse tile-mapping queue, and title-texture upload queues before running a held resource's final COM Release, but omitted the tiled-texture tile-mapping queues owned by vram::Pages. A released placed texture could therefore reach its final Release while UpdateTileMappings was still in flight on vram::Pages.queue.

What is in it

  • crates/xcl/src/hle/d3d12x/vram.rs: track vram::Pages queues in a separate VRAM_QUEUES mutex and expose vram::queues() so late_release can snapshot them without taking PAGES.
  • crates/xcl/src/hle/d3d12x/late_release.rs: include vram::queues() in drain_known (via drain_queues), and add GPU regression test drain_queues_waits_for_vram_tile_mapping_queue.

Tested

  • Hardware / OS / toolchain: NVIDIA GeForce RTX 3080 Ti (driver 32.0.16.1088), AMD Ryzen 7 7800X3D, Windows 11 Pro Build 26200, rustc 1.100.0 (0ef1bc386 2026-11-09), debug (scripts/test.ps1) + release (cargo build --release -p xcl).
  • .\scripts\test.ps1 (cargo test --workspace -- --test-threads=4): 736 passed, 0 failed, 41 ignored.
  • SKIPPED GPU tests on this adapter: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64).

Regression run

Main (67a3735):

xcl-smoke v1
commit: 67a3735177f42cf8e5c886e67a974da7f87541b3
gpu: NVIDIA GeForce RTX 3080 Ti
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1084 (PresentX 1084)
presents per 2 s (last 3): 59 59 56
device removals: 0
crashes: 0
peak commit: 16561 MB

PR (7aa9d68):

xcl-smoke v1
commit: 7aa9d68b3fd3918c151ea8f9aa2be7fa3152fbc4
gpu: NVIDIA GeForce RTX 3080 Ti
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1216 (PresentX 1216)
presents per 2 s (last 3): 59 60 60
device removals: 0
crashes: 0
peak commit: 15924 MB

Not tested

  • AMD RDNA / wave64 GPUs and Intel GPUs.
  • XCL_SAMPLE_* tests on local sample files (not set).

AI use

  • Antigravity with Gemini 4 Neon: assisted with root-cause analysis, fix, GPU regression test, audit, and PR description. All code, tests, and smoke logs reviewed by the author.
**@⁠ExoCalibra** on GitHub · 2026-11-24 14:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/1314) `ExoCalibra:pr/late-release-vram-queue` → `main` · +93 −6 · 2 files · 1 commits · open `late_release::drain_known` waited on title queues, the sparse tile-mapping queue, and title-texture upload queues before running a held resource's final COM `Release`, but omitted the tiled-texture tile-mapping queues owned by `vram::Pages`. A released placed texture could therefore reach its final `Release` while `UpdateTileMappings` was still in flight on `vram::Pages.queue`. **What is in it** - `crates/xcl/src/hle/d3d12x/vram.rs`: track `vram::Pages` queues in a separate `VRAM_QUEUES` mutex and expose `vram::queues()` so `late_release` can snapshot them without taking `PAGES`. - `crates/xcl/src/hle/d3d12x/late_release.rs`: include `vram::queues()` in `drain_known` (via `drain_queues`), and add GPU regression test `drain_queues_waits_for_vram_tile_mapping_queue`. **Tested** - Hardware / OS / toolchain: NVIDIA GeForce RTX 3080 Ti (driver 32.0.16.1088), AMD Ryzen 7 7800X3D, Windows 11 Pro Build 26200, `rustc 1.100.0 (0ef1bc386 2026-11-09)`, debug (`scripts/test.ps1`) + release (`cargo build --release -p xcl`). - `.\scripts\test.ps1` (`cargo test --workspace -- --test-threads=4`): 736 passed, 0 failed, 41 ignored. - `SKIPPED` GPU tests on this adapter: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (`no wave64`). **Regression run** Main (`67a3735`): ``` xcl-smoke v1 commit: 67a3735177f42cf8e5c886e67a974da7f87541b3 gpu: NVIDIA GeForce RTX 3080 Ti title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1084 (PresentX 1084) presents per 2 s (last 3): 59 59 56 device removals: 0 crashes: 0 peak commit: 16561 MB ``` PR (`7aa9d68`): ``` xcl-smoke v1 commit: 7aa9d68b3fd3918c151ea8f9aa2be7fa3152fbc4 gpu: NVIDIA GeForce RTX 3080 Ti title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1216 (PresentX 1216) presents per 2 s (last 3): 59 60 60 device removals: 0 crashes: 0 peak commit: 15924 MB ``` **Not tested** - AMD RDNA / wave64 GPUs and Intel GPUs. - `XCL_SAMPLE_*` tests on local sample files (not set). **AI use** - Antigravity with Gemini 4 Neon: assisted with root-cause analysis, fix, GPU regression test, audit, and PR description. All code, tests, and smoke logs reviewed by the author.
late_release::drain_known waited on title queues, the sparse tile-mapping queue, and title-texture upload queues, but omitted the tiled-texture tile-mapping queues owned by vram::Pages. A released placed texture could reach its final COM Release while UpdateTileMappings was still in flight on vram::Pages.queue.

Record vram::Pages queues in a separate VRAM_QUEUES mutex so late_release can snapshot them without taking PAGES, include them in drain_known via drain_queues, and add a GPU regression test verifying held batches wait until the vram queue passes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:50:26 +00:00
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 14:50 UTC · original

Full-suite run, since this PR has no test report yet. Tested exact head 7aa9d68 (on its base 67a3735).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 736 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: drain_queues_waits_for_vram_tile_mapping_queue.
  • Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 736 passed, 0 failed, 41 ignored, no skips.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-24 14:50 UTC · [original](https://github.com/xcl-dev/xcl/pull/1314#issuecomment-7135042190) Full-suite run, since this PR has no test report yet. Tested exact head `7aa9d68` (on its base `67a3735`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4`: **736 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `drain_queues_waits_for_vram_tile_mapping_queue`. - Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **736 passed, 0 failed, 41 ignored**, no skips. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠JoaoPauluu on GitHub · 2026-11-24 15:28 UTC · original

A regression run under Wine on Linux, on a retail title.

Tested

  • RTX 3060 12 GB (NVIDIA 620.70.06, 32-lane waves), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for x86_64-pc-windows-gnu. 7aa9d68 as it is and main 930e8b4, no uncommitted changes. This PR's merge base is 67a3735; the main runs are of 930e8b4, a later commit of main. Retail title 1.0.2.1, scripts/linux/smoke.sh (#257) for 60 s, no input. Nine runs in a row, main first and last, other PRs in between.
  • A regression check: I did not check whether GTA VI reaches the changed code in these 60 s.

Regression run

main (first run):

xcl-smoke v1
commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56
gpu: NVIDIA GeForce RTX 3060
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1371 (PresentX 1371)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

this PR:

xcl-smoke v1
commit: 7aa9d68b3fd3918c151ea8f9aa2be7fa3152fbc4
gpu: NVIDIA GeForce RTX 3060
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1359 (PresentX 1359)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

The last main run: 1338 frames, exit: 0x0, no device removal, no crash. Under Wine, peak commit reads 0 MB, so these blocks do not check memory.

Not tested

  • the test suite on this head; native Windows; AMD.

AI use

  • Claude Code (Claude Opus 5.5) built both commits, ran the runs and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
**@⁠JoaoPauluu** on GitHub · 2026-11-24 15:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/1314#issuecomment-7136078379) A regression run under Wine on Linux, on a retail title. **Tested** - RTX 3060 12 GB (NVIDIA 620.70.06, 32-lane waves), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for `x86_64-pc-windows-gnu`. `7aa9d68` as it is and `main` `930e8b4`, no uncommitted changes. This PR's merge base is `67a3735`; the `main` runs are of `930e8b4`, a later commit of `main`. Retail title 1.0.2.1, `scripts/linux/smoke.sh` (#257) for 60 s, no input. Nine runs in a row, `main` first and last, other PRs in between. - A regression check: I did not check whether GTA VI reaches the changed code in these 60 s. **Regression run** main (first run): ``` xcl-smoke v1 commit: 930e8b49c1c2ec683d22c724a398b39111cd0e56 gpu: NVIDIA GeForce RTX 3060 title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1371 (PresentX 1371) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` this PR: ``` xcl-smoke v1 commit: 7aa9d68b3fd3918c151ea8f9aa2be7fa3152fbc4 gpu: NVIDIA GeForce RTX 3060 title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1359 (PresentX 1359) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` The last `main` run: 1338 frames, `exit: 0x0`, no device removal, no crash. Under Wine, `peak commit` reads 0 MB, so these blocks do not check memory. **Not tested** - the test suite on this head; native Windows; AMD. **AI use** - Claude Code (Claude Opus 5.5) built both commits, ran the runs and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 15:38 UTC · original

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

  • cargo test -p xcl --lib -- --test-threads=1: all passed, 0 failed, ~21 ignored. (Parallel runs intermittently abort with 0xc0000005 — same harness flake seen on unmodified main.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 15:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/1314#issuecomment-7136375095) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib -- --test-threads=1`: all passed, 0 failed, ~21 ignored. (Parallel runs intermittently abort with 0xc0000005 — same harness flake seen on unmodified `main`.) Thanks!
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 04:47 UTC · original

Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current main on the new head — needs another rebase before it can be tested.

**@⁠DavidM1911** on GitHub · 2026-11-26 04:47 UTC · [original](https://github.com/xcl-dev/xcl/pull/1314#issuecomment-7182907651) Re-verification on RTX 3060 Ti (Windows 11): still a **merge conflict with current `main`** on the new head — needs another rebase before it can be tested.
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/hle/d3d12x/vram.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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