D3D12.X: keep in-flight texture upload objects alive on Signal/wait failure #1476

Open
b3IKK wants to merge 1 commit from upstream-pr/1486 into main
b3IKK commented 2026-11-24 16:50:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by b3IKK on 2026-11-24T16:50:49Z.


After ExecuteCommandLists, upload_batch called Signal and wait and then dropped the allocator, command list and staging buffer unconditionally. If Signal or the wait failed, the CPU freed memory the GPU could still be reading; the same applies to the uploader kept in UPLOADERS, which was keyed only by the queue pointer and could hand a device another device's staging buffer.

This keeps the in-flight objects alive when Signal or the wait fails (finish_gpu_wait forgets them instead of dropping them) and keys the uploader map by (device, queue).

What is in it

  • crates/xcl/src/gpu/texture.rs: finish_gpu_wait; upload_batch keeps (allocator, command list, staging) alive on error; UPLOADERS is keyed by (device, queue); unit test finish_gpu_wait_keeps_inflight_alive_on_error_and_returns_on_ok.
  • The test module's key construction was updated to the new (device, queue) key when rebasing.

Since the last push: rebased onto main 06c9f55. The conflict was in the test module, where main had added large_staging_uses_sixteen_mib_growth_steps / gpu_large_mixed_upload_keeps_tight_staging_and_exact_pixels at the same place; both sides are kept. main also changed the uploader key to (device, queue), so the branch's test now builds that key too.

Tested

  • hardware (GPU + driver, CPU), Windows build, Rust version, debug / release: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 9 9950X3D, Windows 11 10.0.26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1)
  • .\\scripts\\test.ps1 (cargo build --workspace + cargo test --workspace -- --test-threads=4): 1266 passed, 0 failed, 46 ignored (SKIPPED: the wave64 / direct-DXIL per-lane tests that need 64-lane hardware or a semantics mode this adapter refuses, no heap windows, and cannot disable the driver cache (Windows Developer Mode is required))
  • cargo test -p xcl --lib -- gpu::texture: 15 passed, 0 failed
  • the new test with std::mem::forget(in_flight) put back to std::mem::drop(in_flight): 0 passed, 1 failed — assertion left == right failed: in-flight objects must stay alive on error (left: 1, right: 0)

Regression run

main (426a5a7, clean tree, no local changes):

xcl-smoke v1
commit: 426a5a745db4d5e4b037449ede0b70cb342f5192
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1642 (PresentX 1642)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15158 MB

PR (bd33797, clean tree, no local changes):

xcl-smoke v1
commit: bd33797d4255854b290515dd0c93757ccbf26c96
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1636 (PresentX 1636)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15939 MB

(The main block is 426a5a7, an ancestor of the current main 06c9f55, from the same machine and data folder.)

Not tested

  • a real Signal/wait failure while the GPU is still reading (the test drives finish_gpu_wait directly)
  • AMD GPUs and native wave64 hardware
  • other titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant) and Linux / Wine

AI use

  • OpenCode, Claude Fable 5.2: rebased onto 06c9f55, kept both tests at the conflict, adapted the test to main's (device, queue) key, confirmed the new test fails without the fix, ran the suite and the scripts/smoke.ps1 pair.
<!-- greyfinch-sync:ivall/xcl:issue:5476525205 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1486). Originally posted by [b3IKK](https://github.com/b3IKK) on 2026-11-24T16:50:49Z. --- After `ExecuteCommandLists`, `upload_batch` called `Signal` and `wait` and then dropped the allocator, command list and staging buffer unconditionally. If `Signal` or the wait failed, the CPU freed memory the GPU could still be reading; the same applies to the uploader kept in `UPLOADERS`, which was keyed only by the queue pointer and could hand a device another device's staging buffer. This keeps the in-flight objects alive when `Signal` or the wait fails (`finish_gpu_wait` forgets them instead of dropping them) and keys the uploader map by `(device, queue)`. **What is in it** - `crates/xcl/src/gpu/texture.rs`: `finish_gpu_wait`; `upload_batch` keeps `(allocator, command list, staging)` alive on error; `UPLOADERS` is keyed by `(device, queue)`; unit test `finish_gpu_wait_keeps_inflight_alive_on_error_and_returns_on_ok`. - The test module's key construction was updated to the new `(device, queue)` key when rebasing. **Since the last push**: rebased onto `main` `06c9f55`. The conflict was in the test module, where `main` had added `large_staging_uses_sixteen_mib_growth_steps` / `gpu_large_mixed_upload_keeps_tight_staging_and_exact_pixels` at the same place; both sides are kept. `main` also changed the uploader key to `(device, queue)`, so the branch's test now builds that key too. **Tested** - hardware (GPU + driver, CPU), Windows build, Rust version, debug / release: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 9 9950X3D, Windows 11 10.0.26300, Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`), DXC 1.9.2609.5, debug (`scripts/test.ps1`) and release (`scripts/smoke.ps1`) - `.\\scripts\\test.ps1` (`cargo build --workspace` + `cargo test --workspace -- --test-threads=4`): **1266 passed, 0 failed, 46 ignored** (SKIPPED: the wave64 / direct-DXIL per-lane tests that need 64-lane hardware or a semantics mode this adapter refuses, `no heap windows`, and `cannot disable the driver cache (Windows Developer Mode is required)`) - `cargo test -p xcl --lib -- gpu::texture`: 15 passed, 0 failed - the new test with `std::mem::forget(in_flight)` put back to `std::mem::drop(in_flight)`: 0 passed, 1 failed — `assertion left == right failed: in-flight objects must stay alive on error` (`left: 1, right: 0`) **Regression run** main (`426a5a7`, clean tree, no local changes): ``` xcl-smoke v1 commit: 426a5a745db4d5e4b037449ede0b70cb342f5192 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1642 (PresentX 1642) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15158 MB ``` PR (`bd33797`, clean tree, no local changes): ``` xcl-smoke v1 commit: bd33797d4255854b290515dd0c93757ccbf26c96 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1636 (PresentX 1636) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15939 MB ``` (The main block is `426a5a7`, an ancestor of the current `main` `06c9f55`, from the same machine and data folder.) **Not tested** - a real `Signal`/`wait` failure while the GPU is still reading (the test drives `finish_gpu_wait` directly) - AMD GPUs and native wave64 hardware - other titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant) and Linux / Wine **AI use** - OpenCode, Claude Fable 5.2: rebased onto `06c9f55`, kept both tests at the conflict, adapted the test to `main`'s `(device, queue)` key, confirmed the new test fails without the fix, ran the suite and the `scripts/smoke.ps1` pair.
dcastell1 commented 2026-11-24 17:06:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by dcastell1 on 2026-11-24T16:55:30Z.


Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on main@b7aa9f3 (baseline 770 passed, 0 failed, 41 ignored on this box):

patch -p1 < this PR            # clean, no fuzz
cargo test --workspace -- --test-threads=4
771 passed; 0 failed; 41 ignored   (exit 0)

One more than the baseline; keeping in-flight texture upload objects alive is covered and green.

Tree restored afterwards (full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.

<!-- greyfinch-sync:ivall/xcl:comment:7138417662 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1486#issuecomment-7138417662). Originally posted by [dcastell1](https://github.com/dcastell1) on 2026-11-24T16:55:30Z. --- Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on `main@b7aa9f3` (baseline **770 passed, 0 failed, 41 ignored** on this box): ``` patch -p1 < this PR # clean, no fuzz cargo test --workspace -- --test-threads=4 771 passed; 0 failed; 41 ignored (exit 0) ``` One more than the baseline; keeping in-flight texture upload objects alive is covered and green. Tree restored afterwards (full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.
DavidM1911 commented 2026-11-24 19:07:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:53:28Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7141296103 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1486#issuecomment-7141296103). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T18:53:28Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
JJAutoCompare commented 2026-11-25 06:05:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T05:26:21Z.


Empirical test report (8151725a)

PR #1486 at 8151725a18ccc773b0cf23ef1732224c52adc7aa.

Hardware / environment

  • Windows x64 build 26200, AMD Ryzen 7 3800X, Intel Arc A770 with installed driver 32.0.101.9175. Windows also listed a Microsoft Basic Display Adapter.
  • rustc 1.100.0 (0ef1bc386 2026-11-09) and DXC 1.9.2609.5 (01b62ad47). The Cargo test profile was unoptimized, with incremental compilation and debug info disabled.
  • The focused run held the Arc test lock with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1. The GPU fixture requested the default D3D12 adapter. Its output did not identify the adapter.

Commands and results

  • cargo test --workspace --no-run exited 0 outside Invoke-ArcTest.ps1.

  • Inside Invoke-ArcTest.ps1, ran the compiled library test executable xcl-77aca8ccb20e299f.exe with these exact arguments.

    --exact gpu::texture::tests::finish_gpu_wait_keeps_inflight_alive_on_error_and_returns_on_ok gpu::texture::tests::gpu_upload_batches_reuse_the_queues_upload_buffer
    
  • The focused run exited 0 and finished in 1.80 s. The log recorded 2 passed, 0 failed, 0 ignored, 0 skipped, and 742 filtered out. Both named tests reported ok. Skips were counted from case-sensitive SKIPPED lines.

Observed behavior

  • The drop-counter test passed both branches of finish_gpu_wait. A synthetic error left the in-flight object's drop count at zero. A successful wait returned ownership, and dropping the returned value increased the count to one.
  • Two successful D3D12 upload batches each uploaded three textures with patterned data. The fixture compared the readback subresources with their inputs and verified that both batches retained the same staging buffer and capacity under the (device, queue) cache key.

Not tested

The full GPU workspace suite and game smoke runs were omitted. The focused run did not inject a real D3D12 Signal or fence-wait failure or exercise cache reuse across devices.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1486-focused.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7153771418 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1486#issuecomment-7153771418). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T05:26:21Z. --- ### Empirical test report (8151725a) PR #1486 at `8151725a18ccc773b0cf23ef1732224c52adc7aa`. **Hardware / environment** - Windows x64 build 26200, AMD Ryzen 7 3800X, Intel Arc A770 with installed driver `32.0.101.9175`. Windows also listed a Microsoft Basic Display Adapter. - `rustc 1.100.0 (0ef1bc386 2026-11-09)` and DXC `1.9.2609.5` (`01b62ad47`). The Cargo test profile was unoptimized, with incremental compilation and debug info disabled. - The focused run held the Arc test lock with `XCL_ADAPTER=A770` and `RUST_TEST_NOCAPTURE=1`. The GPU fixture requested the default D3D12 adapter. Its output did not identify the adapter. **Commands and results** - `cargo test --workspace --no-run` exited 0 outside `Invoke-ArcTest.ps1`. - Inside `Invoke-ArcTest.ps1`, ran the compiled library test executable `xcl-77aca8ccb20e299f.exe` with these exact arguments. ```text --exact gpu::texture::tests::finish_gpu_wait_keeps_inflight_alive_on_error_and_returns_on_ok gpu::texture::tests::gpu_upload_batches_reuse_the_queues_upload_buffer ``` - The focused run exited 0 and finished in 1.80 s. The log recorded **2 passed, 0 failed, 0 ignored, 0 skipped**, and 742 filtered out. Both named tests reported `ok`. Skips were counted from case-sensitive `SKIPPED ` lines. **Observed behavior** - The drop-counter test passed both branches of `finish_gpu_wait`. A synthetic error left the in-flight object's drop count at zero. A successful wait returned ownership, and dropping the returned value increased the count to one. - Two successful D3D12 upload batches each uploaded three textures with patterned data. The fixture compared the readback subresources with their inputs and verified that both batches retained the same staging buffer and capacity under the `(device, queue)` cache key. **Not tested** The full GPU workspace suite and game smoke runs were omitted. The focused run did not inject a real D3D12 `Signal` or fence-wait failure or exercise cache reuse across devices. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr1486-focused.log` and published.
b3IKK commented 2026-11-25 16:12:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by b3IKK on 2026-11-25T16:04:16Z.


Rebased onto main 06c9f55; the conflict was main's two new staging tests in the same module, and both are kept. main had also changed the uploader key to (device, queue), so the branch's test builds that key now. Head bd33797: suite 1266 passed, 0 failed, 46 ignored; with std::mem::forget(in_flight) replaced by drop the new test fails (left: 1, right: 0); smoke 1636 frames, 0 crashes, 0 removals.

AI use: OpenCode, Claude Fable 5.2 rebased it, adapted the test, ran the suite and the smoke pair and wrote this.

<!-- greyfinch-sync:ivall/xcl:comment:7167566431 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1486#issuecomment-7167566431). Originally posted by [b3IKK](https://github.com/b3IKK) on 2026-11-25T16:04:16Z. --- Rebased onto ``main`` ``06c9f55``; the conflict was ``main``'s two new staging tests in the same module, and both are kept. ``main`` had also changed the uploader key to ``(device, queue)``, so the branch's test builds that key now. Head ``bd33797``: suite 1266 passed, 0 failed, 46 ignored; with ``std::mem::forget(in_flight)`` replaced by ``drop`` the new test fails (``left: 1, right: 0``); smoke 1636 frames, 0 crashes, 0 removals. AI use: OpenCode, Claude Fable 5.2 rebased it, adapted the test, ran the suite and the smoke pair and wrote this.
DavidM1911 commented 2026-11-26 06:06:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T05:27:38Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7183504529 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1486#issuecomment-7183504529). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T05:27:38Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
Decodere commented 2026-11-27 15:37:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T15:37:33Z.


Independent desktop NVIDIA verification of PR #1486 at head bd33797d4255854b290515dd0c93757ccbf26c96 (1 commit; exact parent & merge-base: 06c9f5505f63f10c5ec49ef932d75b2c28177324, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12, Wave32-only Ada), 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 tests & build (bd33797d)

Command Result
cargo test --release -p xcl --lib -- --nocapture finish_gpu_wait_keeps_inflight_alive_on_error_and_returns_on_ok (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1222 filtered out × 3 (0.00s, 0.00s, 0.00s, 0 skipped)
cargo test --release -p xcl --lib -- --nocapture gpu::texture:: (3 consecutive runs) 15 passed; 0 failed; 0 ignored; 1208 filtered out × 3 (0.65s, 0.57s, 0.58s; 14 executed incl. 3 live RTX 4060 GPU upload tests with byte_exact=true + 1 self-skipped retail_ttpf_textures_detile_with_their_mip_chains because XCL_SAMPLE_TTPF is unset)
cargo build --release -p xcl Clean build (1m 29s, exit 0, 0 new warnings in gpu/texture.rs)

Paired quiet 60 s retail smoke (title: 29640639)

Exact parent & merge-base (06c9f5505f63f10c5ec49ef932d75b2c28177324, cached baseline on the same machine):

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

PR #1486 (bd33797d4255854b290515dd0c93757ccbf26c96):

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

Limits of coverage

  • finish_gpu_wait_keeps_inflight_alive_on_error_and_returns_on_ok and all 14 executed gpu::texture:: tests (including live RTX 4060 gpu_upload_batches_reuse_the_queues_upload_buffer, gpu_console_textures_upload_every_mip_and_slice, and gpu_large_mixed_upload_keeps_tight_staging_and_exact_pixels) passed 3/3; retail_ttpf_textures_detile_with_their_mip_chains self-skipped because XCL_SAMPLE_TTPF was unset.
  • The Signal/fence-wait failure path is verified by the finish_gpu_wait unit test rather than by injecting a live D3D12 device removal during texture upload; the 60 s retail smoke confirms normal upload reuse and runtime stability (0 device removals, 0 crashes, steady 60 Hz), with single-run frame/commit delta vs. the cached parent reflecting normal startup variance.

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

<!-- greyfinch-sync:ivall/xcl:comment:7222285715 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1486#issuecomment-7222285715). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-27T15:37:33Z. --- Independent desktop NVIDIA verification of **PR #1486** at head `bd33797d4255854b290515dd0c93757ccbf26c96` (`1` commit; exact parent & merge-base: `06c9f5505f63f10c5ec49ef932d75b2c28177324`, pre-`#2555` ancestor of `main`). ### Environment - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12, Wave32-only Ada), 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 tests & build (`bd33797d`) | Command | Result | | --- | --- | | `cargo test --release -p xcl --lib -- --nocapture finish_gpu_wait_keeps_inflight_alive_on_error_and_returns_on_ok` (3 consecutive runs) | `1 passed; 0 failed; 0 ignored; 1222 filtered out` × 3 (`0.00s`, `0.00s`, `0.00s`, `0` skipped) | | `cargo test --release -p xcl --lib -- --nocapture gpu::texture::` (3 consecutive runs) | `15 passed; 0 failed; 0 ignored; 1208 filtered out` × 3 (`0.65s`, `0.57s`, `0.58s`; `14` executed incl. 3 live RTX 4060 GPU upload tests with `byte_exact=true` + `1` self-skipped `retail_ttpf_textures_detile_with_their_mip_chains` because `XCL_SAMPLE_TTPF` is unset) | | `cargo build --release -p xcl` | Clean build (`1m 29s`, exit `0`, `0` new warnings in `gpu/texture.rs`) | ### Paired quiet 60 s retail smoke (`title: 29640639`) Exact parent & merge-base (`06c9f5505f63f10c5ec49ef932d75b2c28177324`, cached baseline on the same machine): ``` xcl-smoke v1 commit: 06c9f5505f63f10c5ec49ef932d75b2c28177324 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1588 (PresentX 1589) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14452 MB ``` PR #1486 (`bd33797d4255854b290515dd0c93757ccbf26c96`): ``` xcl-smoke v1 commit: bd33797d4255854b290515dd0c93757ccbf26c96 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1546 (PresentX 1546) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14463 MB ``` ### Limits of coverage - `finish_gpu_wait_keeps_inflight_alive_on_error_and_returns_on_ok` and all `14` executed `gpu::texture::` tests (including live RTX 4060 `gpu_upload_batches_reuse_the_queues_upload_buffer`, `gpu_console_textures_upload_every_mip_and_slice`, and `gpu_large_mixed_upload_keeps_tight_staging_and_exact_pixels`) passed `3/3`; `retail_ttpf_textures_detile_with_their_mip_chains` self-skipped because `XCL_SAMPLE_TTPF` was unset. - The `Signal`/fence-wait failure path is verified by the `finish_gpu_wait` unit test rather than by injecting a live D3D12 device removal during texture upload; the 60 s retail smoke confirms normal upload reuse and runtime stability (`0` device removals, `0` crashes, steady 60 Hz), with single-run frame/commit delta vs. the cached parent reflecting normal startup variance. *AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).*
ClosetPie107 commented 2026-11-27 16:12:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-11-27T16:12:31Z.


Tested on AMD / Linux: bd33797d (RX 9070 16 GB, RDNA4, Mesa 26.3.1 RADV; Ryzen 5 9600X, 32 GB; CachyOS; Proton Experimental experimental-11.0-20261112 with vkd3d-proton master ec207194 plus a local patch dropping the lpVtbl checks of command allocators and lists; DXC 1.9.2609.5; Rust 1.96.0, x86_64-pc-windows-gnu debug build, tests run under Wine)

The head as it is (not merged onto current main), with its base 06c9f550 as the baseline.

Tests (XCL_REQUIRE_GPU=wave64)

  • cargo test -p xcl --lib -- gpu::texture:: --test-threads=1: 15 passed, 0 failed, 0 ignored (includes finish_gpu_wait_keeps_inflight_alive_on_error_and_returns_on_ok).
  • cargo test --workspace --no-fail-fast -- --test-threads=4 with --skip compositor_blends_ui_plane_over_scene_plane --skip failed_restore_stops_before_importing_an_unbacked_window --skip grooming_leaves_a_window_under_1_gib_only_its_hole (here the first loses the RADV device, the other two run out of memory under Wine): lib 1181 passed, 16 failed, 26 ignored; base 06c9f550 (this PR's base) the same session: lib 1180 passed, 16 failed, 26 ignored. The failures are the same set as on the base. The other binaries fail the same 3 tests as on the base (e2e, pls_quota, predication_e2e).
  • d3d12_resource_and_sync: 3 passed, 0 failed on this head; on the base its fence and queue test ended the process (exit 1), which it does in most trees here, main included.

Not tested

  • Native Windows, NVIDIA / Intel
  • A retail title
  • The failure path itself (no Signal or fence-wait failure happened)

AI use

  • Claude Code (Claude Opus 5.5) wrote the test scripts, ran the builds and tests on my machine and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7222985787 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1486#issuecomment-7222985787). Originally posted by [ClosetPie107](https://github.com/ClosetPie107) on 2026-11-27T16:12:31Z. --- **Tested on AMD / Linux: `bd33797d`** (RX 9070 16 GB, RDNA4, Mesa 26.3.1 RADV; Ryzen 5 9600X, 32 GB; CachyOS; Proton Experimental `experimental-11.0-20261112` with vkd3d-proton master `ec207194` plus a local patch dropping the `lpVtbl` checks of command allocators and lists; DXC 1.9.2609.5; Rust 1.96.0, `x86_64-pc-windows-gnu` debug build, tests run under Wine) The head as it is (not merged onto current `main`), with its base `06c9f550` as the baseline. **Tests** (`XCL_REQUIRE_GPU=wave64`) - `cargo test -p xcl --lib -- gpu::texture:: --test-threads=1`: **15 passed, 0 failed**, 0 ignored (includes `finish_gpu_wait_keeps_inflight_alive_on_error_and_returns_on_ok`). - `cargo test --workspace --no-fail-fast -- --test-threads=4` with `--skip compositor_blends_ui_plane_over_scene_plane --skip failed_restore_stops_before_importing_an_unbacked_window --skip grooming_leaves_a_window_under_1_gib_only_its_hole` (here the first loses the RADV device, the other two run out of memory under Wine): lib 1181 passed, 16 failed, 26 ignored; base `06c9f550` (this PR's base) the same session: lib 1180 passed, 16 failed, 26 ignored. The failures are the same set as on the base. The other binaries fail the same 3 tests as on the base (`e2e`, `pls_quota`, `predication_e2e`). - `d3d12_resource_and_sync`: 3 passed, 0 failed on this head; on the base its fence and queue test ended the process (exit 1), which it does in most trees here, `main` included. **Not tested** - Native Windows, NVIDIA / Intel - A retail title - The failure path itself (no `Signal` or fence-wait failure happened) **AI use** - Claude Code (Claude Opus 5.5) wrote the test scripts, ran the builds and tests on my machine and wrote this report.
throny commented 2026-11-27 23:28:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-27T23:28:14Z.


merge-check claim
head: bd33797d42

<!-- greyfinch-sync:ivall/xcl:comment:7230165350 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1486#issuecomment-7230165350). Originally posted by [throny](https://github.com/throny) on 2026-11-27T23:28:14Z. --- merge-check claim head: bd33797d4255854b290515dd0c93757ccbf26c96
throny commented 2026-11-27 23:41:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-27T23:41:21Z.


merge-check
base: 2c717a04
head: bd33797d42
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1467 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1466 passed, 0 failed, 47 ignored (26 SKIPPED lines)
review: no blocking finding. On main a failed Signal in upload_batch returns early and drops the uploader while its list may still run, and upload() drops allocator, list and staging after a failed wait; the PR keeps them alive in both cases (a deliberate leak on an error path), which is right. Outside the stated purpose: the uploader table's key changes from the queue to (device, queue). The test checks the helper's forget / drop only, not an upload error path. For whoever merges: textual conflicts with #2558 and #2678 in texture.rs, and one in meaning: #2558's new error path drops the in-flight objects when its wait fails, which is what this PR forbids; whichever lands second should route that path through this PR's helper.
performance: none by default (error paths only).
verdict: safe to merge
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:7230332727 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1486#issuecomment-7230332727). Originally posted by [throny](https://github.com/throny) on 2026-11-27T23:41:21Z. --- merge-check base: 2c717a04 head: bd33797d4255854b290515dd0c93757ccbf26c96 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1467 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1466 passed, 0 failed, 47 ignored (26 SKIPPED lines) review: no blocking finding. On main a failed Signal in upload_batch returns early and drops the uploader while its list may still run, and upload() drops allocator, list and staging after a failed wait; the PR keeps them alive in both cases (a deliberate leak on an error path), which is right. Outside the stated purpose: the uploader table's key changes from the queue to (device, queue). The test checks the helper's forget / drop only, not an upload error path. For whoever merges: textual conflicts with #2558 and #2678 in texture.rs, and one in meaning: #2558's new error path drops the in-flight objects when its wait fails, which is what this PR forbids; whichever lands second should route that path through this PR's helper. performance: none by default (error paths only). verdict: safe to merge 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 03:53:58 +00:00 (Migrated from github.com)

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


merge-check
base: e429936c10
head: bd33797d42
merge: conflicts (crates/xcl/src/gpu/texture.rs)
build: not run (the PR does not merge into this base)
tests: not run
review: not done (the merge has conflicts)
performance: not assessed
verdict: not yet: conflicts with main (crates/xcl/src/gpu/texture.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, draft).

<!-- greyfinch-sync:ivall/xcl:comment:7233491572 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1486#issuecomment-7233491572). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-28T03:53:58Z. --- merge-check base: e429936c10a5b8aa09470ff99dfc8c8d3d8c56fd head: bd33797d4255854b290515dd0c93757ccbf26c96 merge: conflicts (crates/xcl/src/gpu/texture.rs) build: not run (the PR does not merge into this base) tests: not run review: not done (the merge has conflicts) performance: not assessed verdict: not yet: conflicts with main (crates/xcl/src/gpu/texture.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, draft).
Foniass commented 2026-12-01 05:54:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:54:54Z.


Triage (#1607) – head bd33797

Part of this is on main now: commit 5ee15471 (drop_after_wait) handles a failed Signal in upload_batch (fallback queue wait, objects forgotten only if that fails too), and the forget on a failed fence::wait was already there. The PR conflicts with that code and should be rebased onto it.
What main still lacks is the synchronous texture::upload: it still does drop(staging) after wait fails, so finish_gpu_wait((alloc, list, staging), ...) there is still useful.
The UPLOADERS key change to (device, queue) is not mentioned in the title and is a separate change; a queue pointer already identifies its device.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7302273443 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1486#issuecomment-7302273443). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:54:54Z. --- **Triage (#1607)** – head bd33797 Part of this is on main now: commit 5ee15471 (`drop_after_wait`) handles a failed Signal in `upload_batch` (fallback queue wait, objects forgotten only if that fails too), and the forget on a failed `fence::wait` was already there. The PR conflicts with that code and should be rebased onto it. What main still lacks is the synchronous `texture::upload`: it still does `drop(staging)` after `wait` fails, so `finish_gpu_wait((alloc, list, staging), ...)` there is still useful. The UPLOADERS key change to (device, queue) is not mentioned in the title and is a separate change; a queue pointer already identifies its device. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1486:upstream-pr/1486'
git switch 'upstream-pr/1486'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/1486'
git switch 'upstream-pr/1486'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1486'
git switch 'upstream-pr/1486'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1486'
git switch 'main'
git merge --squash 'upstream-pr/1486'
git switch 'main'
git merge --ff-only 'upstream-pr/1486'
git switch 'main'
git merge 'upstream-pr/1486'
git push origin 'main'
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!1476
No description provided.