D3D12.X: title texture uploads run on the title's queue and wait for its page mappings #2548

Closed
treybertram06 wants to merge 2 commits from upstream-pr/2558 into main
treybertram06 commented 2026-11-25 22:55:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by treybertram06 on 2026-11-25T22:55:35Z.


Supersedes #455 (@Cattn). That PR has had no update from its author since 2026-11-24, and it no longer merges into main. This carries its commit forward unchanged in substance, with Cattn's authorship kept, rebased onto current main. It adds the fix for a race the reviews and runs found in it.

Title texture uploads go on the queue of the submit that needs them (ExecuteCommandLists / KickoffX on a DIRECT queue), ahead of the title's lists, instead of on XCL's upload queue followed by a CPU wait (#455's description has the rest). With uploads on the title's queue, nothing made that queue wait for the texture page mappings, which XCL's own upload queue waits for (vram::before_execute). A texture created on another thread after refresh_once's wait, or the levels map_levels_with_texels maps right before the copies, could therefore be copied into tiles whose UpdateTileMappings hadn't run yet on the page queue.

On an RTX 3080 that was a copy-engine write page fault and a hung device in the retail title's world load:

  • The fault: DmaPageFaultWrite | EngineResetRequired 4.6 ms before VidSchErrorHardwarePageFault in a DxgKrnl trace. This is the one in my Aftermath report on #1452.
  • The result: 3 of 4 runs without the wait, 0 of 7 with it.

What is in it

  • D3D12.X: title texture uploads run on the submitting queue, without a CPU wait (gpu/texture.rs, hle/d3d12x/title_textures.rs). This is #455's commit by Cattn, rebased onto main e1d84b7. The two conflicts in title_textures.rs were with code added on main since. Both sides are kept:
    • seed_stream_recheck runs before upload_all, which takes the title queue;
    • main's stream recheck and batch_fits / BATCH_ITEMS caps come before #455's ON_QUEUE / submit_on_title_queue.
  • D3D12.X: a title-queue texture upload waits for the page mappings first (hle/d3d12x/title_textures.rs, test hooks in hle/d3d12x/vram.rs):
    • submit_on_title_queue calls vram::before_execute first.
    • New test gpu_a_title_queue_upload_waits_for_the_page_mappings_before_it. It records a page mapping, uploads on a title queue, and checks the queue waited for that mapping. Without the wait it fails (waited 0, needed 1).

#455's review points

  • Destination textures not held while an upload is in flight (@upipibi, @ozimchuk). On current main this is covered by late_release. The title's last Release of a resource is held until a fence value signalled on every known title queue (present::known_queues), the sparse queue and the upload queues has been passed. An upload submitted on the title queue before that release is ahead of the fence on the same queue, so the texture can't be destroyed under the copy. This also avoids holding the destinations in InFlight, which @ozimchuk measured breaks placed_title_textures_share_vram_and_preserve_pixels by moving a shadowed placement's reactivation to a later reclaim. I checked this by reading late_release.rs; I didn't add a test of it here.
  • Krashgamer's measurement (the CPU wait is not where the refresh time goes on his 3080) still applies. This PR doesn't claim a speed-up beyond #455's.

Tested

  • RTX 3080 10 GB (driver 621.40 / 32.0.16.2140), Ryzen 9 5900X, Windows 11 build 26300, Rust 1.100.0, debug tests and release smoke builds.
  • cargo test -p xcl --lib title_textures -- --test-threads=1: 22 passed, 0 failed. The new test fails without the wait.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 (XCL_DXC_DIR set to DXC 1.9): 1426 passed, 0 failed, 46 ignored.
  • 25 SKIPPED:
    • 21 no wave64;
    • 1 no heap windows;
    • 3 refused for the #1426 f16 / VOP3 semantics.
  • Retail title, world load, on the #2057 tree with #455 and this wait (XCL_DIRECT_DXIL=1 XCL_UMA_SHADOW=1): page-fault device removals (0x887a0006, nvlddmkm 153) in 3 of 4 runs without the wait, 0 of 7 with it. The silent 0x887a0005 that remains in those runs is the 512 MB driver shader-code heap of #2403, not this.

Regression run

xcl-smoke v1
commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea
gpu: NVIDIA GeForce RTX 3080
title: 4ba6c38e
seconds: 60
exit: 0x0
frames shown: 1559 (PresentX 1559)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14937 MB
xcl-smoke v1
commit: 2dc76ac89461198bc502f26bd6088eed26a3f521
gpu: NVIDIA GeForce RTX 3080
title: 4ba6c38e
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: 14734 MB

Not tested

  • AMD and Intel GPUs, and Linux / vkd3d-proton.
  • A test that a title's early Release is held behind an in-flight title-queue upload (reasoned from late_release, above).
  • The race with this exact tree in the retail title. The 3 of 4 / 0 of 7 runs were on #2057's integration tree with the same two changes.

AI use

  • Claude Code with Claude Opus 5.5. It rebased #455, resolved the conflicts, wrote the wait, its test and this description, and ran the tests and runs above. The author reviewed the diff. The retail-title runs and traces were made with the same tool earlier (#1452).
<!-- greyfinch-sync:ivall/xcl:issue:5500591103 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2558). Originally posted by [treybertram06](https://github.com/treybertram06) on 2026-11-25T22:55:35Z. --- Supersedes #455 (@Cattn). That PR has had no update from its author since 2026-11-24, and it no longer merges into `main`. This carries its commit forward unchanged in substance, with Cattn's authorship kept, rebased onto current `main`. It adds the fix for a race the reviews and runs found in it. Title texture uploads go on the queue of the submit that needs them (`ExecuteCommandLists` / `KickoffX` on a DIRECT queue), ahead of the title's lists, instead of on XCL's upload queue followed by a CPU wait (#455's description has the rest). With uploads on the title's queue, nothing made that queue wait for the texture page mappings, which XCL's own upload queue waits for (`vram::before_execute`). A texture created on another thread after `refresh_once`'s wait, or the levels `map_levels_with_texels` maps right before the copies, could therefore be copied into tiles whose `UpdateTileMappings` hadn't run yet on the page queue. On an RTX 3080 that was a copy-engine write page fault and a hung device in the retail title's world load: - **The fault:** `DmaPageFaultWrite | EngineResetRequired` 4.6 ms before `VidSchErrorHardwarePageFault` in a DxgKrnl trace. This is the one in my Aftermath report on #1452. - **The result:** 3 of 4 runs without the wait, 0 of 7 with it. **What is in it** - `D3D12.X: title texture uploads run on the submitting queue, without a CPU wait` (`gpu/texture.rs`, `hle/d3d12x/title_textures.rs`). This is #455's commit by Cattn, rebased onto `main` `e1d84b7`. The two conflicts in `title_textures.rs` were with code added on `main` since. Both sides are kept: - `seed_stream_recheck` runs before `upload_all`, which takes the title queue; - `main`'s stream recheck and `batch_fits` / `BATCH_ITEMS` caps come before #455's `ON_QUEUE` / `submit_on_title_queue`. - `D3D12.X: a title-queue texture upload waits for the page mappings first` (`hle/d3d12x/title_textures.rs`, test hooks in `hle/d3d12x/vram.rs`): - `submit_on_title_queue` calls `vram::before_execute` first. - New test `gpu_a_title_queue_upload_waits_for_the_page_mappings_before_it`. It records a page mapping, uploads on a title queue, and checks the queue waited for that mapping. Without the wait it fails (waited 0, needed 1). **#455's review points** - **Destination textures not held while an upload is in flight (@upipibi, @ozimchuk).** On current `main` this is covered by `late_release`. The title's last `Release` of a resource is held until a fence value signalled on every known title queue (`present::known_queues`), the sparse queue and the upload queues has been passed. An upload submitted on the title queue before that release is ahead of the fence on the same queue, so the texture can't be destroyed under the copy. This also avoids holding the destinations in `InFlight`, which @ozimchuk measured breaks `placed_title_textures_share_vram_and_preserve_pixels` by moving a shadowed placement's reactivation to a later `reclaim`. I checked this by reading `late_release.rs`; I didn't add a test of it here. - **Krashgamer's measurement** (the CPU wait is not where the refresh time goes on his 3080) still applies. This PR doesn't claim a speed-up beyond #455's. **Tested** - RTX 3080 10 GB (driver 621.40 / 32.0.16.2140), Ryzen 9 5900X, Windows 11 build 26300, Rust 1.100.0, debug tests and release smoke builds. - `cargo test -p xcl --lib title_textures -- --test-threads=1`: 22 passed, 0 failed. The new test fails without the wait. - `cargo test --workspace --no-fail-fast -- --test-threads=4` (`XCL_DXC_DIR` set to DXC 1.9): 1426 passed, 0 failed, 46 ignored. - 25 `SKIPPED`: - 21 `no wave64`; - 1 `no heap windows`; - 3 refused for the #1426 f16 / VOP3 semantics. - Retail title, world load, on the #2057 tree with #455 and this wait (`XCL_DIRECT_DXIL=1 XCL_UMA_SHADOW=1`): page-fault device removals (`0x887a0006`, nvlddmkm 153) in 3 of 4 runs without the wait, 0 of 7 with it. The silent `0x887a0005` that remains in those runs is the 512 MB driver shader-code heap of #2403, not this. **Regression run** ``` xcl-smoke v1 commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea gpu: NVIDIA GeForce RTX 3080 title: 4ba6c38e seconds: 60 exit: 0x0 frames shown: 1559 (PresentX 1559) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14937 MB ``` ``` xcl-smoke v1 commit: 2dc76ac89461198bc502f26bd6088eed26a3f521 gpu: NVIDIA GeForce RTX 3080 title: 4ba6c38e 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: 14734 MB ``` **Not tested** - AMD and Intel GPUs, and Linux / vkd3d-proton. - A test that a title's early `Release` is held behind an in-flight title-queue upload (reasoned from `late_release`, above). - The race with this exact tree in the retail title. The 3 of 4 / 0 of 7 runs were on #2057's integration tree with the same two changes. **AI use** - Claude Code with Claude Opus 5.5. It rebased #455, resolved the conflicts, wrote the wait, its test and this description, and ran the tests and runs above. The author reviewed the diff. The retail-title runs and traces were made with the same tool earlier (#1452).
DarkPanda69 commented 2026-11-26 00:05:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DarkPanda69 on 2026-11-25T23:15:18Z.


AMD run (listed as untested) on an RX 9070 XT, plus an RTX 3060: all 3 new GPU tests pass on both cards, with no skips.

Head 2dc76ac applied on main 08db802, debug, Windows 11 Pro 26200, cargo test -p xcl --lib -- title_textures --test-threads=4, card chosen with XCL_ADAPTER (the tests take the backend device, real::device_raw()):

  • RX 9070 XT (RDNA4, driver 32.0.32029.2010): 22 passed, 0 failed, 0 SKIPPED. gpu_uploads_on_the_title_queue_run_before_its_later_work_and_are_released, gpu_a_title_queue_upload_waits_for_the_page_mappings_before_it and gpu_an_upload_still_running_is_kept_when_its_wait_times_out ok.
  • RTX 3060 (driver 32.0.16.1088): 22 passed, 0 failed, 0 SKIPPED; the same 3 tests ok.

Not tested: the whole suite with this PR, Intel, Linux / vkd3d-proton, a title.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7177319470 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2558#issuecomment-7177319470). Originally posted by [DarkPanda69](https://github.com/DarkPanda69) on 2026-11-25T23:15:18Z. --- AMD run (listed as untested) on an RX 9070 XT, plus an RTX 3060: all 3 new GPU tests pass on both cards, with no skips. Head `2dc76ac` applied on `main` `08db802`, debug, Windows 11 Pro 26200, `cargo test -p xcl --lib -- title_textures --test-threads=4`, card chosen with `XCL_ADAPTER` (the tests take the backend device, `real::device_raw()`): - **RX 9070 XT** (RDNA4, driver 32.0.32029.2010): 22 passed, 0 failed, 0 SKIPPED. `gpu_uploads_on_the_title_queue_run_before_its_later_work_and_are_released`, `gpu_a_title_queue_upload_waits_for_the_page_mappings_before_it` and `gpu_an_upload_still_running_is_kept_when_its_wait_times_out` ok. - **RTX 3060** (driver 32.0.16.1088): 22 passed, 0 failed, 0 SKIPPED; the same 3 tests ok. Not tested: the whole suite with this PR, Intel, Linux / vkd3d-proton, a title. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
DavidM1911 commented 2026-11-26 00:05:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T23:19:14Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, 26 ignored.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7177403728 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2558#issuecomment-7177403728). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T23:19:14Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 26 ignored. Thanks! — Devin
fromthemoonx commented 2026-11-26 00:05:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-25T23:22:19Z.


D3D12 debug-layer check: the three new GPU tests run clean under the layer (only the exit-time live-object report), and the e2e title's messages are the same as main's. It adds the layer to the RTX 3080 / 3060 runs above.

Tested: 2dc76ac merged onto main 08db802 (clean). RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug, Graphics Tools (D3D12 debug layer) installed.

result
gpu_uploads_on_the_title_queue_run_before_its_later_work_and_are_released, gpu_a_title_queue_upload_waits_for_the_page_mappings_before_it, gpu_an_upload_still_running_is_kept_when_its_wait_times_out, each with XCL_D3D12_DEBUG=1 (D3D12: debug layer enabled in the output) each passes; no error or corruption messages, only the 8 id 0 live-object lines at process exit
e2e test_title_draws_with_a_root_signature_under_the_debug_layer, merged vs main 08db802 passes on both, the same messages: 3× error id 93, 1× error id 1046, 1× warning id 820, 8× id 0 at exit

The e2e title's log doesn't show whether it takes the title-queue upload path, so the three tests are what checks the new code here.

Not tested: the whole suite (DarkPanda69 and the description cover NVIDIA), a title, a release build.

AI use: Claude Code (Claude Opus 5.5) ran the debug-layer checks and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7177469101 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2558#issuecomment-7177469101). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-11-25T23:22:19Z. --- **D3D12 debug-layer check: the three new GPU tests run clean under the layer (only the exit-time live-object report), and the e2e title's messages are the same as `main`'s.** It adds the layer to the RTX 3080 / 3060 runs above. **Tested:** `2dc76ac` merged onto `main` `08db802` (clean). RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug, Graphics Tools (D3D12 debug layer) installed. | | result | |---|---| | `gpu_uploads_on_the_title_queue_run_before_its_later_work_and_are_released`, `gpu_a_title_queue_upload_waits_for_the_page_mappings_before_it`, `gpu_an_upload_still_running_is_kept_when_its_wait_times_out`, each with `XCL_D3D12_DEBUG=1` (`D3D12: debug layer enabled` in the output) | each passes; no error or corruption messages, only the 8 `id 0` live-object lines at process exit | | `e2e` `test_title_draws_with_a_root_signature_under_the_debug_layer`, merged vs `main` `08db802` | passes on both, the same messages: 3× error id 93, 1× error id 1046, 1× warning id 820, 8× id 0 at exit | The e2e title's log doesn't show whether it takes the title-queue upload path, so the three tests are what checks the new code here. **Not tested:** the whole suite (DarkPanda69 and the description cover NVIDIA), a title, a release build. **AI use:** Claude Code (Claude Opus 5.5) ran the debug-layer checks and wrote this report.
luckyteagirl commented 2026-11-26 02:08:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T01:37:25Z.


RX 6800M focused GPU report for #2558: the title-queue upload mapping-wait regression passes on this RDNA2 card.

Setup: clean detached head 2dc76ac89461198bc502f26bd6088eed26a3f521; Windows 11 Home build 26200; Ryzen 9 5980HX; AMD Radeon RX 6800M, driver 30.0.13002.13003; Rust 1.99.0 MSVC, debug lib-test build with its own Cargo target. XCL_ADAPTER=6800M and XCL_REQUIRE_GPU=wave64 were set. The run log confirms backend 'real' – AMD Radeon RX 6800M (11987 MiB VRAM) and the tiled-resource page queue/fence path.

Tested: cargo test --locked -p xcl --lib -j 1 hle::d3d12x::title_textures::tests::gpu_a_title_queue_upload_waits_for_the_page_mappings_before_it -- --exact --test-threads=1 --nocapture, under a free-memory guard: 1 passed, 0 failed, 0 ignored, 0 measured, 1326 filtered out, 0.65 s; no SKIPPED line and no guard stop. The fixture checked that the title queue waited for the mapping-fence value before the upload and completed a 64×64 texture upload/readback.

Limit: The fixture's test helper signals the page-mapping fence but does not itself issue UpdateTileMappings, so this verifies the queue-wait ordering and GPU upload/readback rather than a physical tile-mapping race. I did not run the full suite or a title smoke pair. DXC was configured but this fixture did not compile a shader. No game files were used.

AI use: Codex (GPT-6) and a Codex Luna subagent prepared the clean worktree, ran the guarded focused test, checked the log and source coverage, and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7179958806 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2558#issuecomment-7179958806). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T01:37:25Z. --- **RX 6800M focused GPU report for #2558:** the title-queue upload mapping-wait regression passes on this RDNA2 card. **Setup:** clean detached head `2dc76ac89461198bc502f26bd6088eed26a3f521`; Windows 11 Home build 26200; Ryzen 9 5980HX; AMD Radeon RX 6800M, driver `30.0.13002.13003`; Rust 1.99.0 MSVC, debug lib-test build with its own Cargo target. `XCL_ADAPTER=6800M` and `XCL_REQUIRE_GPU=wave64` were set. The run log confirms `backend 'real' – AMD Radeon RX 6800M (11987 MiB VRAM)` and the tiled-resource page queue/fence path. **Tested:** `cargo test --locked -p xcl --lib -j 1 hle::d3d12x::title_textures::tests::gpu_a_title_queue_upload_waits_for_the_page_mappings_before_it -- --exact --test-threads=1 --nocapture`, under a free-memory guard: **1 passed, 0 failed, 0 ignored, 0 measured, 1326 filtered out**, 0.65 s; no `SKIPPED` line and no guard stop. The fixture checked that the title queue waited for the mapping-fence value before the upload and completed a 64×64 texture upload/readback. **Limit:** The fixture's test helper signals the page-mapping fence but does not itself issue `UpdateTileMappings`, so this verifies the queue-wait ordering and GPU upload/readback rather than a physical tile-mapping race. I did not run the full suite or a title smoke pair. DXC was configured but this fixture did not compile a shader. No game files were used. **AI use:** Codex (GPT-6) and a Codex Luna subagent prepared the clean worktree, ran the guarded focused test, checked the log and source coverage, and wrote this report.
itsSio commented 2026-11-26 04:07:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by itsSio on 2026-11-26T03:24:36Z.


Independent dual-PC NVIDIA full-workspace test report on clean head 2dc76ac89461198bc502f26bd6088eed26a3f521.

Tested

  • Machine 1: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro build 26200.9974, rustc 1.97.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug build
    • cargo build --workspace: exit 0 (1 dead_code warning in vram.rs:1110)
    • cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture: 1426 passed, 0 failed, 46 ignored (all 22 title_textures tests passed)
    • SKIPPED: 26 (wave64-only GPU tests, #1426 wave32 f16/cvt refusals, no heap windows, pso_measurement driver-cache disable 0x887A002D)
  • Machine 2: NVIDIA GeForce RTX 2080 SUPER (driver 32.0.16.1088), AMD Ryzen 5 5600X, 16 GB RAM, Windows 11 Pro build 26200.8653, rustc 1.99.1 (stable-x86_64-pc-windows-msvc), Windows SDK 10.0.26100 DXC 1.8.2502.11, debug build
    • cargo build --workspace: exit 0 (3 warnings)
    • cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture: 1426 passed, 0 failed, 46 ignored
    • SKIPPED: 29 (same 26 as Machine 1 plus 3 requiring d3d12SDKLayers.dll)

Not tested

  • Retail title / scripts/smoke.ps1 runs
  • Release builds (--release)
  • AMD / Intel GPUs, native wave64, Linux / Wine / vkd3d-proton

AI use
Ran via Samaritan:

  • Google Antigravity CLI (Gemini 4 Hydrogen (High)): built the branch and ran the workspace test suite on both NVIDIA machines.
  • Google Antigravity CLI (Gemini 4 Neon (High)): coordinated the runs and wrote this test report.
<!-- greyfinch-sync:ivall/xcl:comment:7181693478 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2558#issuecomment-7181693478). Originally posted by [itsSio](https://github.com/itsSio) on 2026-11-26T03:24:36Z. --- Independent dual-PC NVIDIA full-workspace test report on clean head `2dc76ac89461198bc502f26bd6088eed26a3f521`. **Tested** - **Machine 1:** NVIDIA GeForce RTX 5080 (driver `32.0.16.1088`), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro build 26200.9974, `rustc 1.97.0` (`stable-x86_64-pc-windows-msvc`), DXC `1.9.2609.5`, debug build - `cargo build --workspace`: exit 0 (1 `dead_code` warning in `vram.rs:1110`) - `cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture`: **1426 passed, 0 failed, 46 ignored** (all 22 `title_textures` tests passed) - `SKIPPED`: 26 (wave64-only GPU tests, `#1426` wave32 f16/cvt refusals, no heap windows, `pso_measurement` driver-cache disable `0x887A002D`) - **Machine 2:** NVIDIA GeForce RTX 2080 SUPER (driver `32.0.16.1088`), AMD Ryzen 5 5600X, 16 GB RAM, Windows 11 Pro build 26200.8653, `rustc 1.99.1` (`stable-x86_64-pc-windows-msvc`), Windows SDK 10.0.26100 DXC `1.8.2502.11`, debug build - `cargo build --workspace`: exit 0 (3 warnings) - `cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture`: **1426 passed, 0 failed, 46 ignored** - `SKIPPED`: 29 (same 26 as Machine 1 plus 3 requiring `d3d12SDKLayers.dll`) **Not tested** - Retail title / `scripts/smoke.ps1` runs - Release builds (`--release`) - AMD / Intel GPUs, native wave64, Linux / Wine / vkd3d-proton **AI use** Ran via Samaritan: - Google Antigravity CLI (Gemini 4 Hydrogen (High)): built the branch and ran the workspace test suite on both NVIDIA machines. - Google Antigravity CLI (Gemini 4 Neon (High)): coordinated the runs and wrote this test report.
pickles976 commented 2026-11-26 05:05:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by pickles976 on 2026-11-26T04:57:45Z.


First Wine/NVIDIA verdict for the mapping-wait fixture, now that a diagnostic stack can run it. Head 2dc76ac89461198bc502f26bd6088eed26a3f521, RTX 4060 Laptop GPU 8 GiB, Wine 11.0, NVIDIA 590.48.1, --locked --target x86_64-pc-windows-msvc, one test thread, fresh Compiling xcl .../xcl-pr2558/... provenance.

On stock vkd3d-proton 3.2.0 this fixture aborts before its body: ID3D12Fence1 – 12 PC methods, 10 internal slots under the guard then Assertion failed: iface->lpVtbl == &d3d12_fence_vtbl (vkd3d_private.h:705) — the #175 identity wall, which is why my earlier report could make no pass/fail claim for the GPU leg.

On a relaxed diagnostic build of the exact same provenance commit (2576c0b4adfae4a, -Db_ndebug=true + the two from_iface relaxations described in #175, local-only, not proposed anywhere), gpu_a_title_queue_upload_waits_for_the_page_mappings_before_it passes 1/1 (0.86 s, 0 ignored) on the real adapter: the upload waits for the title queue's page mappings ahead of it and the fixture's readback checks hold.

Scope: this verifies the fixture's own assertions under Wine/vkd3d-proton, not retail title behavior, and the relaxed DLL means the identity checks that stock builds enforce were absent — it removes the abort, it does not validate XCL's vtable patching against a stock runtime. Log: .compat-xcl/logs/verify-pr2558-wine-mapping-wait-relaxed.log (local). AI-assisted verification and report (OpenAI Codex).

<!-- greyfinch-sync:ivall/xcl:comment:7183055109 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2558#issuecomment-7183055109). Originally posted by [pickles976](https://github.com/pickles976) on 2026-11-26T04:57:45Z. --- **First Wine/NVIDIA verdict for the mapping-wait fixture, now that a diagnostic stack can run it.** Head `2dc76ac89461198bc502f26bd6088eed26a3f521`, RTX 4060 Laptop GPU 8 GiB, Wine 11.0, NVIDIA 590.48.1, `--locked --target x86_64-pc-windows-msvc`, one test thread, fresh `Compiling xcl .../xcl-pr2558/...` provenance. On **stock** vkd3d-proton 3.2.0 this fixture aborts before its body: `ID3D12Fence1 – 12 PC methods, 10 internal slots under the guard` then `Assertion failed: iface->lpVtbl == &d3d12_fence_vtbl (vkd3d_private.h:705)` — the #175 identity wall, which is why my earlier report could make no pass/fail claim for the GPU leg. On a **relaxed diagnostic build** of the exact same provenance commit (`2576c0b4adfae4a`, `-Db_ndebug=true` + the two `from_iface` relaxations described in #175, local-only, not proposed anywhere), `gpu_a_title_queue_upload_waits_for_the_page_mappings_before_it` **passes 1/1** (0.86 s, 0 ignored) on the real adapter: the upload waits for the title queue's page mappings ahead of it and the fixture's readback checks hold. Scope: this verifies the fixture's own assertions under Wine/vkd3d-proton, not retail title behavior, and the relaxed DLL means the identity checks that stock builds enforce were absent — it removes the abort, it does not validate XCL's vtable patching against a stock runtime. Log: `.compat-xcl/logs/verify-pr2558-wine-mapping-wait-relaxed.log` (local). AI-assisted verification and report (OpenAI Codex).
SlopTart commented 2026-11-26 05:05:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-26T05:04:41Z.


Tested: current PR head merged onto current origin/main (clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo target x86_64-pc-windows-gnu run under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).

gpu_ suite (cold cache): 168 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.
The three new upload-queue tests (gpu_uploads_on_the_title_queue_run_before_its_later_work_and_are_released, gpu_a_title_queue_upload_waits_for_the_page_mappings_before_it, gpu_an_upload_still_running_is_kept_when_its_wait_times_out) ran inside the suite: passed (suite gained 3 passes over main).

Not tested: retail titles (no title data on this lane, counts only).

AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7183159479 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2558#issuecomment-7183159479). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-26T05:04:41Z. --- **Tested**: current PR head merged onto current `origin/main` (clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo target `x86_64-pc-windows-gnu` run under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29). `gpu_` suite (cold cache): 168 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. The three new upload-queue tests (`gpu_uploads_on_the_title_queue_run_before_its_later_work_and_are_released`, `gpu_a_title_queue_upload_waits_for_the_page_mappings_before_it`, `gpu_an_upload_still_running_is_kept_when_its_wait_times_out`) ran inside the suite: passed (suite gained 3 passes over main). **Not tested**: retail titles (no title data on this lane, counts only). **AI use**: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
luckyteagirl commented 2026-11-26 06:37:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T06:37:01Z.

Review: COMMENTED


Both error branches run after texture::submit_batch() has submitted the upload list. If CreateFence or queue.Signal fails, they call texture::wait(dev, queue)?; that recovery wait can also fail (including its 10-second timeout), so ? returns and drops f without proving the queued copy finished. f owns the staging resource and command allocator used by that copy. Microsoft's D3D12 synchronization guidance requires those objects to remain valid until GPU work is done. Could the retirement fence be established before submission where possible, and could a failed recovery wait retain/quarantine f instead of dropping it? A blocked-queue fault injection (submit, fail fence setup or signal, let recovery time out, then unblock) would cover this path. The normal success path and the new mapping-wait tests do not exercise it.

Exact-head source review of 2dc76ac89461198bc502f26bd6088eed26a3f521; I did not force a device/fence failure or run a title on this head. AI-assisted review with Codex.

<!-- greyfinch-sync:ivall/xcl:review:6069573796 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2558#pullrequestreview-6069573796). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T06:37:01Z. **Review:** COMMENTED --- Both error branches run after `texture::submit_batch()` has submitted the upload list. If `CreateFence` or `queue.Signal` fails, they call `texture::wait(dev, queue)?`; that recovery wait can also fail (including its 10-second timeout), so `?` returns and drops `f` without proving the queued copy finished. `f` owns the staging resource and command allocator used by that copy. [Microsoft's D3D12 synchronization guidance](https://learn.microsoft.com/en-us/windows/win32/direct3d12/porting-from-direct3d-11-to-direct3d-12#cpugpu-synchronization) requires those objects to remain valid until GPU work is done. Could the retirement fence be established before submission where possible, and could a failed recovery wait retain/quarantine `f` instead of dropping it? A blocked-queue fault injection (submit, fail fence setup or signal, let recovery time out, then unblock) would cover this path. The normal success path and the new mapping-wait tests do not exercise it. Exact-head source review of `2dc76ac89461198bc502f26bd6088eed26a3f521`; I did not force a device/fence failure or run a title on this head. AI-assisted review with Codex.
Decodere commented 2026-11-27 02:44:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T02:44:58Z.


Independent desktop NVIDIA verification of PR #2558 at head 2dc76ac89461198bc502f26bd6088eed26a3f521 (2 commits 779d533c -> 2dc76ac8; exact merge-base: e1d84b7d9153f86a97d2ec5d209d196046fc0bea, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted release tests & build (2dc76ac8)

Command Result
cargo test --release -p xcl --lib gpu_uploads_on_the_title_queue_run_before_its_later_work_and_are_released -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1326 filtered out × 3 (0.37s, 0.36s, 0.37s, 0 skipped — live D3D12 execution on RTX 4060)
cargo test --release -p xcl --lib gpu_a_title_queue_upload_waits_for_the_page_mappings_before_it -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1326 filtered out × 3 (0.36s, 0.36s, 0.37s, 0 skipped — live D3D12 execution on RTX 4060)
cargo test --release -p xcl --lib gpu_an_upload_still_running_is_kept_when_its_wait_times_out -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1326 filtered out × 3 (0.40s × 3, 0 skipped — live D3D12 execution on RTX 4060)
cargo test --release -p xcl --lib gpu::texture:: -- --test-threads=1 (3 consecutive runs) 15 passed; 0 failed; 0 ignored; 1312 filtered out × 3 (0.87s × 3, 0 skipped)
cargo test --release -p xcl --lib hle::d3d12x::title_textures:: -- --test-threads=1 (3 consecutive runs) 22 passed; 0 failed; 0 ignored; 1305 filtered out × 3 (1.01s, 1.03s, 0.93s, 0 skipped)
cargo test --release -p xcl --lib hle::d3d12x::vram:: -- --test-threads=1 (3 consecutive runs) 19 passed; 0 failed; 1 ignored; 1307 filtered out × 3 (2.41s, 2.40s, 2.41s, 0 skipped)
cargo build --release -p xcl Clean build (1m 11s, exit 0, 0 new warnings)

Paired quiet 60 s retail smoke (title: 29640639)

Exact merge-base (e1d84b7d9153f86a97d2ec5d209d196046fc0bea, cached baseline on the same machine):

xcl-smoke v1
commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1531 (PresentX 1531)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13982 MB

PR #2558 (2dc76ac89461198bc502f26bd6088eed26a3f521):

xcl-smoke v1
commit: 2dc76ac89461198bc502f26bd6088eed26a3f521
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1589 (PresentX 1589)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13962 MB

Runtime log observations (xcl.log)

  • 9222 log lines, 0 [ERROR] / device-removal / panic lines.
  • Final draw/memory telemetry in log: 19531 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample 13933 MB committed by the process; video memory 6112 MB local, 4604 MB non-local.

Limits of coverage

  • Title-queue texture upload ordering, GPU fence wait on prior page mappings, and retention of in-flight uploads past wait timeout were directly verified on desktop D3D12 / RTX 4060 via all 3 new GPU tests (3/3 each, 0 skipped), gpu::texture:: (15/15 × 3), title_textures:: (22/22 × 3), and vram:: (19/0/1 × 3).
  • The 60 s retail smoke on title: 29640639 exercises live title-texture uploads on desktop RTX 4060 with zero device removals or crashes (frame-count and peak-commit deltas vs. cached merge-base reflect single-run startup variance, not this PR); frame-time latency impact under multi-minute world streaming was not separately benchmarked.

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

<!-- greyfinch-sync:ivall/xcl:comment:7208395939 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2558#issuecomment-7208395939). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-27T02:44:58Z. --- Independent desktop NVIDIA verification of **PR #2558** at head `2dc76ac89461198bc502f26bd6088eed26a3f521` (`2` commits `779d533c -> 2dc76ac8`; exact merge-base: `e1d84b7d9153f86a97d2ec5d209d196046fc0bea`, pre-`#2555` ancestor of `main`). ### Environment - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6C / 12T), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` (Developer Mode off) - **Toolchain:** `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC, DXC `1.9.2609.5`, `--release` ### Targeted release tests & build (`2dc76ac8`) | Command | Result | | --- | --- | | `cargo test --release -p xcl --lib gpu_uploads_on_the_title_queue_run_before_its_later_work_and_are_released -- --nocapture` (3 consecutive runs) | `1 passed; 0 failed; 0 ignored; 1326 filtered out` × 3 (`0.37s`, `0.36s`, `0.37s`, `0` skipped — live D3D12 execution on RTX 4060) | | `cargo test --release -p xcl --lib gpu_a_title_queue_upload_waits_for_the_page_mappings_before_it -- --nocapture` (3 consecutive runs) | `1 passed; 0 failed; 0 ignored; 1326 filtered out` × 3 (`0.36s`, `0.36s`, `0.37s`, `0` skipped — live D3D12 execution on RTX 4060) | | `cargo test --release -p xcl --lib gpu_an_upload_still_running_is_kept_when_its_wait_times_out -- --nocapture` (3 consecutive runs) | `1 passed; 0 failed; 0 ignored; 1326 filtered out` × 3 (`0.40s` × 3, `0` skipped — live D3D12 execution on RTX 4060) | | `cargo test --release -p xcl --lib gpu::texture:: -- --test-threads=1` (3 consecutive runs) | `15 passed; 0 failed; 0 ignored; 1312 filtered out` × 3 (`0.87s` × 3, `0` skipped) | | `cargo test --release -p xcl --lib hle::d3d12x::title_textures:: -- --test-threads=1` (3 consecutive runs) | `22 passed; 0 failed; 0 ignored; 1305 filtered out` × 3 (`1.01s`, `1.03s`, `0.93s`, `0` skipped) | | `cargo test --release -p xcl --lib hle::d3d12x::vram:: -- --test-threads=1` (3 consecutive runs) | `19 passed; 0 failed; 1 ignored; 1307 filtered out` × 3 (`2.41s`, `2.40s`, `2.41s`, `0` skipped) | | `cargo build --release -p xcl` | Clean build (`1m 11s`, exit `0`, `0` new warnings) | ### Paired quiet 60 s retail smoke (`title: 29640639`) Exact merge-base (`e1d84b7d9153f86a97d2ec5d209d196046fc0bea`, cached baseline on the same machine): ``` xcl-smoke v1 commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1531 (PresentX 1531) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13982 MB ``` PR #2558 (`2dc76ac89461198bc502f26bd6088eed26a3f521`): ``` xcl-smoke v1 commit: 2dc76ac89461198bc502f26bd6088eed26a3f521 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1589 (PresentX 1589) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13962 MB ``` ### Runtime log observations (`xcl.log`) - `9222` log lines, `0` `[ERROR]` / device-removal / panic lines. - Final draw/memory telemetry in log: `19531 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped)`; last memory sample `13933 MB committed by the process; video memory 6112 MB local, 4604 MB non-local`. ### Limits of coverage - Title-queue texture upload ordering, GPU fence wait on prior page mappings, and retention of in-flight uploads past wait timeout were directly verified on desktop D3D12 / RTX 4060 via all 3 new GPU tests (`3/3` each, `0` skipped), `gpu::texture::` (`15/15` × 3), `title_textures::` (`22/22` × 3), and `vram::` (`19/0/1` × 3). - The 60 s retail smoke on `title: 29640639` exercises live title-texture uploads on desktop RTX 4060 with zero device removals or crashes (frame-count and peak-commit deltas vs. cached merge-base reflect single-run startup variance, not this PR); frame-time latency impact under multi-minute world streaming was not separately benchmarked. *AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).*
throny commented 2026-11-27 21:49:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-27T21:49:24Z.


merge-check claim
head: 2dc76ac894

<!-- greyfinch-sync:ivall/xcl:comment:7228785847 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2558#issuecomment-7228785847). Originally posted by [throny](https://github.com/throny) on 2026-11-27T21:49:24Z. --- merge-check claim head: 2dc76ac89461198bc502f26bd6088eed26a3f521
throny commented 2026-11-27 22:11:30 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-27T22:11:30Z.


merge-check
base: 2c717a04
head: 2dc76ac894
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1469 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1466 passed, 0 failed, 47 ignored
review: open from an earlier review and still on this head: in submit_on_title_queue, when CreateFence or Signal fails, the code waits and then drops the upload (allocator, list, staging); if that wait fails too, the early return drops them while the GPU may still be copying. Main's upload_batch deliberately forgets them on a failed wait for this reason. Also to answer: the submit now goes back through the hooked ExecuteCommandLists with XCL's own list (bookkeeping for a title list runs on it; not verified harmless); a texture uploaded on one queue and read on another without a fence between them could be read stale, where main's CPU wait finished the copy first; ON_QUEUE entries are never removed when a queue is released.
performance: this changes the default path. The title's submit thread no longer waits per batch, but it now creates an allocator, a list and an upload buffer (up to 32 MB) per batch instead of reusing the cached uploader, and blocks up to 10 s per batch with the table locked once more than 512 MB is in flight; up to 512 MB of staging can stay alive until that queue's next upload. Reasoned, not measured: a load-time and commit comparison on a title is needed.
verdict: not yet: forget instead of drop on the failed-wait path, answers on the hook re-entry and on readers from other queues, and a measurement of the default-path cost.
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7229108306 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2558#issuecomment-7229108306). Originally posted by [throny](https://github.com/throny) on 2026-11-27T22:11:30Z. --- merge-check base: 2c717a04 head: 2dc76ac89461198bc502f26bd6088eed26a3f521 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1469 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1466 passed, 0 failed, 47 ignored review: open from an earlier review and still on this head: in submit_on_title_queue, when CreateFence or Signal fails, the code waits and then drops the upload (allocator, list, staging); if that wait fails too, the early return drops them while the GPU may still be copying. Main's upload_batch deliberately forgets them on a failed wait for this reason. Also to answer: the submit now goes back through the hooked ExecuteCommandLists with XCL's own list (bookkeeping for a title list runs on it; not verified harmless); a texture uploaded on one queue and read on another without a fence between them could be read stale, where main's CPU wait finished the copy first; ON_QUEUE entries are never removed when a queue is released. performance: this changes the default path. The title's submit thread no longer waits per batch, but it now creates an allocator, a list and an upload buffer (up to 32 MB) per batch instead of reusing the cached uploader, and blocks up to 10 s per batch with the table locked once more than 512 MB is in flight; up to 512 MB of staging can stay alive until that queue's next upload. Reasoned, not measured: a load-time and commit comparison on a title is needed. verdict: not yet: forget instead of drop on the failed-wait path, answers on the hook re-entry and on readers from other queues, and a measurement of the default-path cost. hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
KOLESNiii commented 2026-11-28 02:46:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-28T02:46:06Z.


merge-check claim
head: 2dc76ac894

<!-- greyfinch-sync:ivall/xcl:comment:7232581255 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2558#issuecomment-7232581255). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-28T02:46:06Z. --- merge-check claim head: 2dc76ac89461198bc502f26bd6088eed26a3f521
KOLESNiii commented 2026-11-28 03:52:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-28T03:52:52Z.


merge-check
base: e429936c10
head: 2dc76ac894
merge: conflicts (crates/xcl/src/gpu/texture.rs, crates/xcl/src/hle/d3d12x/title_textures.rs, crates/xcl/src/hle/d3d12x/vram.rs)
build: not run (the PR does not merge into this base)
tests: not run on this base. On the previous base 753e8b1a the trial merge was clean, built, and its suite gave 1514 passed, 1 failed, 47 ignored, 25 SKIPPED (fine_timer_makes_short_sleeps_short failed only under the load of 6 other suites running at once and passed alone).
review: not repeated on this base. On 753e8b1a: 1 major finding. title_textures.rs upload_all / submit_on_title_queue: CPU-written title textures are now uploaded on the direct queue whose ExecuteCommandLists ran refresh(), with no CPU wait; before, every batch was waited for on the CPU (upload_batch), so all queues saw the texels. refresh() runs on every queue's ExecuteCommandLists (real.rs, compute queues included), and refresh_once takes the dirty pages of all title textures (GetWriteWatch with reset) and uploads every one of them on that queue. Failure: the title writes a texture on the CPU, submits graphics work on its direct queue A (the upload is queued on A, the dirty pages are consumed), then submits work that reads the texture on its compute queue B without waiting on A, as it may on the console where the CPU write is already visible. B's refresh finds nothing dirty and nothing orders B after A's copy, so B reads old or partly copied texels while the texture may be in COPY_DEST on A. The new tests only check ordering on the same queue. A fix could make other queues wait on ON_QUEUE's fence in refresh, or keep the synchronous path when the title has more than one queue. The rest reads sound: before_execute is called on the title queue first, staging, allocator and list live until the fence passes, and the in-flight bytes are capped at 512 MiB.
performance: not assessed on this base.
verdict: not yet: conflicts with main (crates/xcl/src/gpu/texture.rs, crates/xcl/src/hle/d3d12x/title_textures.rs, crates/xcl/src/hle/d3d12x/vram.rs); rebase onto main
hardware / tool and model: Windows 11 build 26300.9974, NVIDIA GeForce RTX 2070 SUPER 8 GB (driver 621.40, wave32 only), AMD Ryzen 5 3600XT; rustc 1.100.1 (20ddd0171 2026-11-25) x86_64-pc-windows-msvc, debug test profile. Claude Code: Claude Opus 5.5 (coordination, full-diff review, draft).

<!-- greyfinch-sync:ivall/xcl:comment:7233473334 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2558#issuecomment-7233473334). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-28T03:52:52Z. --- merge-check base: e429936c10a5b8aa09470ff99dfc8c8d3d8c56fd head: 2dc76ac89461198bc502f26bd6088eed26a3f521 merge: conflicts (crates/xcl/src/gpu/texture.rs, crates/xcl/src/hle/d3d12x/title_textures.rs, crates/xcl/src/hle/d3d12x/vram.rs) build: not run (the PR does not merge into this base) tests: not run on this base. On the previous base 753e8b1a the trial merge was clean, built, and its suite gave 1514 passed, 1 failed, 47 ignored, 25 SKIPPED (fine_timer_makes_short_sleeps_short failed only under the load of 6 other suites running at once and passed alone). review: not repeated on this base. On 753e8b1a: 1 major finding. title_textures.rs upload_all / submit_on_title_queue: CPU-written title textures are now uploaded on the direct queue whose ExecuteCommandLists ran refresh(), with no CPU wait; before, every batch was waited for on the CPU (upload_batch), so all queues saw the texels. refresh() runs on every queue's ExecuteCommandLists (real.rs, compute queues included), and refresh_once takes the dirty pages of all title textures (GetWriteWatch with reset) and uploads every one of them on that queue. Failure: the title writes a texture on the CPU, submits graphics work on its direct queue A (the upload is queued on A, the dirty pages are consumed), then submits work that reads the texture on its compute queue B without waiting on A, as it may on the console where the CPU write is already visible. B's refresh finds nothing dirty and nothing orders B after A's copy, so B reads old or partly copied texels while the texture may be in COPY_DEST on A. The new tests only check ordering on the same queue. A fix could make other queues wait on ON_QUEUE's fence in refresh, or keep the synchronous path when the title has more than one queue. The rest reads sound: before_execute is called on the title queue first, staging, allocator and list live until the fence passes, and the in-flight bytes are capped at 512 MiB. performance: not assessed on this base. verdict: not yet: conflicts with main (crates/xcl/src/gpu/texture.rs, crates/xcl/src/hle/d3d12x/title_textures.rs, crates/xcl/src/hle/d3d12x/vram.rs); rebase onto main hardware / tool and model: Windows 11 build 26300.9974, NVIDIA GeForce RTX 2070 SUPER 8 GB (driver 621.40, wave32 only), AMD Ryzen 5 3600XT; rustc 1.100.1 (20ddd0171 2026-11-25) x86_64-pc-windows-msvc, debug test profile. Claude Code: Claude Opus 5.5 (coordination, full-diff review, draft).
treybertram06 commented 2026-11-30 06:55:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by treybertram06 on 2026-11-30T06:55:58Z.


Closing: main has all of this now, from other PRs.

  • Cattn's commit (title texture uploads on the submitting queue) is on main as 124ccfb1 / cfa24826.
  • The wait for the page mappings before a title-queue upload is e9c60bd4 (bmjask, via #2959), with its test made robust in #3278.
  • The failure path from this PR's third commit is covered by submit_on in title_textures.rs. The fence is created before anything is submitted. When the Signal fails, the upload buffer is dropped only if the drain succeeded, and leaked otherwise.
  • A released queue's entry leaves ON_QUEUE in forget_queue.

@throny, thanks for the merge-check. If your other points (cross-queue staleness, the hooked ExecuteCommandLists, the cost on the default path) still hold, they now apply to main's code, not this branch.

AI use: Claude Code (Claude Opus 5.5) compared this branch with main d52ff48c and wrote this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7271166285 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2558#issuecomment-7271166285). Originally posted by [treybertram06](https://github.com/treybertram06) on 2026-11-30T06:55:58Z. --- Closing: `main` has all of this now, from other PRs. - Cattn's commit (title texture uploads on the submitting queue) is on `main` as `124ccfb1` / `cfa24826`. - The wait for the page mappings before a title-queue upload is `e9c60bd4` (bmjask, via #2959), with its test made robust in #3278. - The failure path from this PR's third commit is covered by `submit_on` in `title_textures.rs`. The fence is created before anything is submitted. When the Signal fails, the upload buffer is dropped only if the drain succeeded, and leaked otherwise. - A released queue's entry leaves `ON_QUEUE` in `forget_queue`. @throny, thanks for the merge-check. If your other points (cross-queue staleness, the hooked ExecuteCommandLists, the cost on the default path) still hold, they now apply to `main`'s code, not this branch. AI use: Claude Code (Claude Opus 5.5) compared this branch with `main` `d52ff48c` and wrote this comment.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2548
No description provided.