D3D12.X: fill memory from the list's upload memory, not a pattern buffer per value #832

Open
mastrr9 wants to merge 1 commit from upstream-pr/838 into main
mastrr9 commented 2026-11-24 06:39:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by mastrr9 on 2026-11-24T06:39:41Z.


Replaces the leaked 32-entry PATTERNS upload buffer cache in list_x::fill() (FillMemoryWith{32,64,128}BitValueX) with the command list's own upload arena (bind::allocate_upload_memory), copying over the destination in FILL_CHUNK (ARENA_BLOCK / 2, 128 KiB) chunks with the same state transitions CopyMemoryToMemoryX uses.

  • Previously, each distinct (pattern, size) allocated a committed upload buffer rounded up to a power of two (up to 256 MiB) and kept it forever; after 32 entries, fills with any new value were dropped with a warning.
  • Now, pattern memory is released automatically when the list's command allocator resets, and arbitrary numbers of distinct fill values work without leaking upload memory.

Tested

  • Hardware/OS: NVIDIA RTX 5080 (driver 617.42 / 32.0.16.1742), Windows 11 Pro 25H2 (26200.9974), rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC debug, DXC Windows SDK 10.0.26100.0, d3d12SDKLayers.dll installed
  • Commit tested: ba1f7e888b8c1c0386ce62edd3c3b1509a5348f2
  • cargo build --workspace: clean (only pre-existing fetch_update deprecation warning)
  • cargo test --workspace -- --test-threads=4: 714 passed, 0 failed, 41 ignored (new test hle::d3d12x::list_x::tests::fill_copies_cover_the_range_once passed)
  • SKIPPED GPU tests: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64

Regression run
Smoke run by @CuteBooty in comment below: https://github.com/xcl-dev/xcl/pull/838#issuecomment-7142452731
Contributed by a community tester; the PR author did not run it. Both blocks are pasted as posted.

main:

xcl-smoke v1
commit: beaa245ca04e212f064efc7cafcdce104bc5c0a2
gpu: NVIDIA GeForce RTX 3070
title: game
seconds: 60
exit: 0x0
frames shown: 1466 (PresentX 1466)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15248 MB

PR:

xcl-smoke v1
commit: 3784317880c0cff8954a161b33629233d8e9cbb8
gpu: NVIDIA GeForce RTX 3070
title: game
seconds: 60
exit: 0x0
frames shown: 1519 (PresentX 1519)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15432 MB

Tester's setup: RTX 3070 8 GB (32-lane waves), NVIDIA 621.24; Ryzen 5 3600, 32 GB; Windows 11 Pro 26200; rustc 1.100.0 MSVC; release build.

Tester's method: scripts\smoke.ps1 -Game <folder> -Seconds 60, no input, on this PR's head as it is and on main beaa245, the commit it branches from, each from a clean checkout. Each build ran twice back to back; the blocks are the second runs. The main block is shared with the tester's reports on other PRs of the same base.

Tester's AI use: Claude Code (Claude Opus 5.5) made the runs with the tester present and wrote the report from the script's output.

Not tested

  • No retail title was available to the author; whether the community regression run above reaches the code this PR changes is not known.

AI use

  • Authored with Claude Code (Claude Opus 5.5); reviewed, audited, and verified on native Windows/RTX 5080 hardware with Antigravity (Gemini 4 Neon + Claude Sonnet 5.5).
  • Claude Code (Claude Sonnet 5.5) added the community regression run to this description and updated the lines that it made out of date or that the PR check requires.
<!-- greyfinch-sync:ivall/xcl:issue:5467404870 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/838). Originally posted by [mastrr9](https://github.com/mastrr9) on 2026-11-24T06:39:41Z. --- Replaces the leaked 32-entry `PATTERNS` upload buffer cache in `list_x::fill()` (`FillMemoryWith{32,64,128}BitValueX`) with the command list's own upload arena (`bind::allocate_upload_memory`), copying over the destination in `FILL_CHUNK` (`ARENA_BLOCK / 2`, 128 KiB) chunks with the same state transitions `CopyMemoryToMemoryX` uses. - Previously, each distinct `(pattern, size)` allocated a committed upload buffer rounded up to a power of two (up to 256 MiB) and kept it forever; after 32 entries, fills with any new value were dropped with a warning. - Now, pattern memory is released automatically when the list's command allocator resets, and arbitrary numbers of distinct fill values work without leaking upload memory. **Tested** - Hardware/OS: NVIDIA RTX 5080 (driver `617.42` / `32.0.16.1742`), Windows 11 Pro 25H2 (`26200.9974`), `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC debug, DXC Windows SDK `10.0.26100.0`, `d3d12SDKLayers.dll` installed - Commit tested: `ba1f7e888b8c1c0386ce62edd3c3b1509a5348f2` - `cargo build --workspace`: clean (only pre-existing `fetch_update` deprecation warning) - `cargo test --workspace -- --test-threads=4`: **714 passed, 0 failed, 41 ignored** (new test `hle::d3d12x::list_x::tests::fill_copies_cover_the_range_once` passed) - `SKIPPED` GPU tests: `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64` **Regression run** Smoke run by @CuteBooty in comment below: https://github.com/xcl-dev/xcl/pull/838#issuecomment-7142452731 Contributed by a community tester; the PR author did not run it. Both blocks are pasted as posted. main: ``` xcl-smoke v1 commit: beaa245ca04e212f064efc7cafcdce104bc5c0a2 gpu: NVIDIA GeForce RTX 3070 title: game seconds: 60 exit: 0x0 frames shown: 1466 (PresentX 1466) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15248 MB ``` PR: ``` xcl-smoke v1 commit: 3784317880c0cff8954a161b33629233d8e9cbb8 gpu: NVIDIA GeForce RTX 3070 title: game seconds: 60 exit: 0x0 frames shown: 1519 (PresentX 1519) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15432 MB ``` Tester's setup: RTX 3070 8 GB (32-lane waves), NVIDIA 621.24; Ryzen 5 3600, 32 GB; Windows 11 Pro 26200; rustc 1.100.0 MSVC; release build. Tester's method: `scripts\smoke.ps1 -Game <folder> -Seconds 60`, no input, on this PR's head as it is and on `main` `beaa245`, the commit it branches from, each from a clean checkout. Each build ran twice back to back; the blocks are the second runs. The `main` block is shared with the tester's reports on other PRs of the same base. Tester's AI use: Claude Code (Claude Opus 5.5) made the runs with the tester present and wrote the report from the script's output. **Not tested** - No retail title was available to the author; whether the community regression run above reaches the code this PR changes is not known. **AI use** - Authored with Claude Code (Claude Opus 5.5); reviewed, audited, and verified on native Windows/RTX 5080 hardware with Antigravity (Gemini 4 Neon + Claude Sonnet 5.5). - Claude Code (Claude Sonnet 5.5) added the community regression run to this description and updated the lines that it made out of date or that the PR check requires.
futurepro62 commented 2026-11-24 07:06:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T07:06:17Z.


Full-suite run, since this PR has no test report yet. Tested exact head ba1f7e8 (on its base beaa245).

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: 714 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: fill_copies_cover_the_range_once.

Not tested

  • AMD, 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.
<!-- greyfinch-sync:ivall/xcl:comment:7124620339 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/838#issuecomment-7124620339). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T07:06:17Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `ba1f7e8` (on its base `beaa245`). **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`: **714 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: `fill_copies_cover_the_range_once`. **Not tested** - AMD, 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.
SlopTart commented 2026-11-24 08:03:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-24T07:17:51Z.


Linux / AMD RDNA3 datapoint.

Merged state: head ba1f7e8 onto main a1672ef, clean merge.

Full suite, cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 706 passed, 10 failed, 41 ignored. Failures are the known Wine-lane set from my #42 rows plus #718 trio members; nothing here fails because of your change. Upload-memory fill tests green; no new failures.

Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.

Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross x86_64-pc-windows-gnu, XCL_NETWORK=0, release profile, --test-threads=4. Linux rows: #42 / #718.

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

<!-- greyfinch-sync:ivall/xcl:comment:7124834729 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/838#issuecomment-7124834729). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-24T07:17:51Z. --- Linux / AMD RDNA3 datapoint. **Merged state:** head `ba1f7e8` onto main `a1672ef`, clean merge. **Full suite, `cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4`:** **706 passed, 10 failed, 41 ignored**. Failures are the known Wine-lane set from my #42 rows plus #718 trio members; nothing here fails because of your change. Upload-memory fill tests green; no new failures. **Not tested:** retail titles (none here), Windows, RDNA4. Counts only, no game data. **Machine:** RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross `x86_64-pc-windows-gnu`, `XCL_NETWORK=0`, release profile, `--test-threads=4`. Linux rows: #42 / #718. AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
CuteBooty commented 2026-11-24 21:09:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by CuteBooty on 2026-11-24T19:41:27Z.


Regression run on a retail title for 3784317: pass (no device removal, no crash, frames and peak commit within the check's limits).

Tested

  • RTX 3070 8 GB (32-lane waves), NVIDIA 621.24; Ryzen 5 3600, 32 GB; Windows 11 Pro 26200; rustc 1.100.0 MSVC; release build.
  • scripts\smoke.ps1 -Game <folder> -Seconds 60, no input, on this PR's head as it is and on main beaa245, the commit it branches from, each from a clean checkout. Each build ran twice back to back; the blocks are the second runs. The main block is shared with my reports on other PRs of the same base.

main:

xcl-smoke v1
commit: beaa245ca04e212f064efc7cafcdce104bc5c0a2
gpu: NVIDIA GeForce RTX 3070
title: game
seconds: 60
exit: 0x0
frames shown: 1466 (PresentX 1466)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15248 MB

this PR:

xcl-smoke v1
commit: 3784317880c0cff8954a161b33629233d8e9cbb8
gpu: NVIDIA GeForce RTX 3070
title: game
seconds: 60
exit: 0x0
frames shown: 1519 (PresentX 1519)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15432 MB

Not tested

  • Whether the 60 s reach the code this PR changes, the world load, the test suite, current main merged in, AMD and Intel GPUs.

AI use

  • Claude Code (Claude Opus 5.5) made the runs with me present and wrote this from the script's output.
<!-- greyfinch-sync:ivall/xcl:comment:7142452731 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/838#issuecomment-7142452731). Originally posted by [CuteBooty](https://github.com/CuteBooty) on 2026-11-24T19:41:27Z. --- Regression run on a retail title for `3784317`: **pass** (no device removal, no crash, frames and peak commit within the check's limits). **Tested** - RTX 3070 8 GB (32-lane waves), NVIDIA 621.24; Ryzen 5 3600, 32 GB; Windows 11 Pro 26200; rustc 1.100.0 MSVC; release build. - `scripts\smoke.ps1 -Game <folder> -Seconds 60`, no input, on this PR's head as it is and on `main` `beaa245`, the commit it branches from, each from a clean checkout. Each build ran twice back to back; the blocks are the second runs. The `main` block is shared with my reports on other PRs of the same base. main: ``` xcl-smoke v1 commit: beaa245ca04e212f064efc7cafcdce104bc5c0a2 gpu: NVIDIA GeForce RTX 3070 title: game seconds: 60 exit: 0x0 frames shown: 1466 (PresentX 1466) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15248 MB ``` this PR: ``` xcl-smoke v1 commit: 3784317880c0cff8954a161b33629233d8e9cbb8 gpu: NVIDIA GeForce RTX 3070 title: game seconds: 60 exit: 0x0 frames shown: 1519 (PresentX 1519) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15432 MB ``` **Not tested** - Whether the 60 s reach the code this PR changes, the world load, the test suite, current `main` merged in, AMD and Intel GPUs. **AI use** - Claude Code (Claude Opus 5.5) made the runs with me present and wrote this from the script's output.
JJAutoCompare commented 2026-11-25 06:06:02 +00:00 (Migrated from github.com)

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


Empirical test report (37843178)

Verified PR #838 at detached head 3784317880c0cff8954a161b33629233d8e9cbb8.

Hardware / environment

  • Windows x64, build 26200, on an AMD x64 CPU (family 23, model 113).
  • Rust 1.100.0 (0ef1bc386 2026-11-09) and DXC 1.9.2609.5 (01b62ad47). Cargo used the unoptimized test profile with debug information and incremental compilation disabled.
  • The focused fixture ran on CPU outside Invoke-ArcTest.ps1 with XCL_ADAPTER=NONE_CPU_ONLY and RUST_TEST_NOCAPTURE=1.

Commands and results

  • cargo test --workspace --no-run exited 0 and built the workspace test binaries.
  • cargo test -p xcl --lib hle::d3d12x::list_x::tests::fill_copies_cover_the_range_once -- --exact exited 0 with 1 passed, 0 failed, 0 ignored, and 0 skipped. The exact filter excluded 693 other library tests.
  • Cargo emitted a deprecation warning for AtomicU32::fetch_update in XGameRuntime.

Observed behavior

The fixture passed its assertions for a fill smaller than one chunk, exactly one chunk, and two full chunks followed by a 36-byte tail. For six representative sizes from 4 bytes up to the 256 MiB fill limit, it checked contiguous offsets, positive copy lengths bounded by the chunk size and divisible by four, and an end offset equal to the requested size.

Not tested

The full GPU workspace suite and game smoke runs were omitted. This run covered CPU chunk planning. GPU copy execution, resource transitions, and the lifetime of the upload allocation were outside the fixture's coverage.

AI use

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

<!-- greyfinch-sync:ivall/xcl:comment:7154298996 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/838#issuecomment-7154298996). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T05:57:26Z. --- ### Empirical test report (37843178) Verified PR #838 at detached head `3784317880c0cff8954a161b33629233d8e9cbb8`. **Hardware / environment** - Windows x64, build 26200, on an AMD x64 CPU (family 23, model 113). - Rust `1.100.0 (0ef1bc386 2026-11-09)` and DXC `1.9.2609.5 (01b62ad47)`. Cargo used the unoptimized test profile with debug information and incremental compilation disabled. - The focused fixture ran on CPU outside `Invoke-ArcTest.ps1` with `XCL_ADAPTER=NONE_CPU_ONLY` and `RUST_TEST_NOCAPTURE=1`. **Commands and results** - `cargo test --workspace --no-run` exited 0 and built the workspace test binaries. - `cargo test -p xcl --lib hle::d3d12x::list_x::tests::fill_copies_cover_the_range_once -- --exact` exited 0 with 1 passed, 0 failed, 0 ignored, and 0 skipped. The exact filter excluded 693 other library tests. - Cargo emitted a deprecation warning for `AtomicU32::fetch_update` in XGameRuntime. **Observed behavior** The fixture passed its assertions for a fill smaller than one chunk, exactly one chunk, and two full chunks followed by a 36-byte tail. For six representative sizes from 4 bytes up to the 256 MiB fill limit, it checked contiguous offsets, positive copy lengths bounded by the chunk size and divisible by four, and an end offset equal to the requested size. **Not tested** The full GPU workspace suite and game smoke runs were omitted. This run covered CPU chunk planning. GPU copy execution, resource transitions, and the lifetime of the upload allocation were outside the fixture's coverage. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr838-focused.log` and published.
DavidM1911 commented 2026-11-25 11:09:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T10:27:51Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7159730328 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/838#issuecomment-7159730328). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T10:27:51Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
ClosetPie107 commented 2026-11-25 20:08:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-11-25T19:54:29Z.


Independent AMD RDNA4 / Linux (RADV, native wave64) test report for head 3784317880c0cff8954a161b33629233d8e9cbb8 (merged cleanly onto main 2898511).

Hardware & environment

  • AMD Radeon RX 9070 16 GB (RDNA4, RADV GFX1201, Mesa 26.3.1, native wave64), Ryzen 5 9600X, 30 GiB RAM, CachyOS Linux
  • Proton Experimental (experimental-11.0-20261112), vkd3d-proton master ec207194 (3.2.0) + dxil-spirv b540c8a2 + relaxed-vtable patch (-Db_ndebug=true), DXVK v3.1.1-209, DXC 1.9.2609.5, Rust x86_64-pc-windows-gnu (debug for tests, release for retail)

Unit / GPU tests (XCL_REQUIRE_GPU=wave64, XCL_DXC_DIR, VKD3D_CONFIG=ignore_shared_fence, --test-threads=1 --nocapture)

  • hle::d3d12x::list_x::: 37 passed, 0 failed, 0 ignored (0 skipped)

Combined retail sanity run (main 2898511 + #2103, #838, #1250, #1733 merged together; XCL_DIRECT_DXIL=1, XCL_TEXTURE_LEVEL_PAGES=1, XCL_PSO_WAIT_MS=50, XCL_SPLIT_MIDLIST_WAIT=0, XCL_COHERENT_MB=1024, VKD3D_CONFIG=ignore_shared_fence, XCL_PSO_PRELOAD=0, XCL_NETWORK=0, warm PSO cache)

  • Ran 268 s with 0 device removals, 45,841 translated draws, 154,125 dispatches (+ 4,634 chained split-compute), 47,255 Opus packets (0 errors), 13.2 GiB peak VRAM (0 GTT spill), 15.1 GiB peak RSS (vs 19.3 GiB on clean main 2898511).
  • Ended at 268.4 s on the same pre-existing main 0xc0000005 TOCTOU race in title_textures::subresources (copy_nonoverlapping reading 0x793a08000) also reproduced on clean main 2898511 (161.8 s).

Not tested

  • Full workspace test suite, native Windows, or an isolated single-PR retail run (retail sanity run above was on the 4-PR batch).

AI use

  • T3 Code / Antigravity (Gemini 4 Neon) merged the PR onto main, ran the tests and combined retail run under Proton on this machine, and drafted this report.
<!-- greyfinch-sync:ivall/xcl:comment:7172926955 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/838#issuecomment-7172926955). Originally posted by [ClosetPie107](https://github.com/ClosetPie107) on 2026-11-25T19:54:29Z. --- Independent AMD RDNA4 / Linux (RADV, native wave64) test report for head `3784317880c0cff8954a161b33629233d8e9cbb8` (merged cleanly onto `main` `2898511`). **Hardware & environment** - AMD Radeon RX 9070 16 GB (RDNA4, RADV GFX1201, Mesa 26.3.1, native wave64), Ryzen 5 9600X, 30 GiB RAM, CachyOS Linux - Proton Experimental (`experimental-11.0-20261112`), `vkd3d-proton` `master` `ec207194` (3.2.0) + `dxil-spirv` `b540c8a2` + relaxed-vtable patch (`-Db_ndebug=true`), DXVK `v3.1.1-209`, DXC `1.9.2609.5`, Rust `x86_64-pc-windows-gnu` (debug for tests, release for retail) **Unit / GPU tests** (`XCL_REQUIRE_GPU=wave64`, `XCL_DXC_DIR`, `VKD3D_CONFIG=ignore_shared_fence`, `--test-threads=1 --nocapture`) - `hle::d3d12x::list_x::`: **37 passed, 0 failed, 0 ignored** (0 skipped) **Combined retail sanity run** (`main` `2898511` + `#2103`, `#838`, `#1250`, `#1733` merged together; `XCL_DIRECT_DXIL=1`, `XCL_TEXTURE_LEVEL_PAGES=1`, `XCL_PSO_WAIT_MS=50`, `XCL_SPLIT_MIDLIST_WAIT=0`, `XCL_COHERENT_MB=1024`, `VKD3D_CONFIG=ignore_shared_fence`, `XCL_PSO_PRELOAD=0`, `XCL_NETWORK=0`, warm PSO cache) - Ran 268 s with **0 device removals**, `45,841` translated draws, `154,125` dispatches (+ `4,634` chained split-compute), `47,255` Opus packets (0 errors), `13.2 GiB` peak VRAM (0 GTT spill), `15.1 GiB` peak RSS (vs `19.3 GiB` on clean `main` `2898511`). - Ended at `268.4 s` on the same pre-existing `main` `0xc0000005` TOCTOU race in `title_textures::subresources` (`copy_nonoverlapping` reading `0x793a08000`) also reproduced on clean `main` `2898511` (`161.8 s`). **Not tested** - Full workspace test suite, native Windows, or an isolated single-PR retail run (retail sanity run above was on the 4-PR batch). **AI use** - T3 Code / Antigravity (Gemini 4 Neon) merged the PR onto `main`, ran the tests and combined retail run under Proton on this machine, and drafted this report.
bmjask commented 2026-11-25 21:25:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-25T21:25:47Z.

Review: COMMENTED


P1: new d==s path violates D3D12 resource state. as_copy_dest transitions entire buffer resource to COPY_DEST, then CopyBufferRegion reads source s from the same resource/another offset without COPY_SOURCE. Buffers are state-tracked per resource, not byte range; non-overlap does not permit simultaneous source COPY_SOURCE/dest COPY_DEST because COPY_DEST is write-only. Use a distinct source resource/window/staging/GPU-fill path and add a debug-layer case where arena allocation/destination share a window.

<!-- greyfinch-sync:ivall/xcl:review:6065197103 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/838#pullrequestreview-6065197103). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-25T21:25:47Z. **Review:** COMMENTED --- P1: new d==s path violates D3D12 resource state. as_copy_dest transitions entire buffer resource to COPY_DEST, then CopyBufferRegion reads source s from the same resource/another offset without COPY_SOURCE. Buffers are state-tracked per resource, not byte range; non-overlap does not permit simultaneous source COPY_SOURCE/dest COPY_DEST because COPY_DEST is write-only. Use a distinct source resource/window/staging/GPU-fill path and add a debug-layer case where arena allocation/destination share a window.
Foniass commented 2026-12-01 04:16:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:16:27Z.


Triage (#1607) – head 3784317

No open or merged PR makes the same change; pattern_buffer/PATTERNS are still on main.
list_x.rs:fill: when the list's upload memory and the destination are in the same window buffer (d == s), all chunks are copied inside one buffer held in COPY_DEST. Main's CopyMemoryToMemoryX stopped doing exactly that (#958, one buffer cannot be COPY_SOURCE and COPY_DEST at once) and goes through copy_scratch instead; the fill could do the same.
The branch conflicts with main: fill there now calls want_view, uma_window_buffer_gpu and note_write(.., WriteProducer::InSegmentGpu, ..), so the rebase is not mechanical.
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:7300559653 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/838#issuecomment-7300559653). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T04:16:27Z. --- **Triage (#1607)** – head 3784317 No open or merged PR makes the same change; `pattern_buffer`/`PATTERNS` are still on main. `list_x.rs:fill`: when the list's upload memory and the destination are in the same window buffer (`d == s`), all chunks are copied inside one buffer held in COPY_DEST. Main's `CopyMemoryToMemoryX` stopped doing exactly that (#958, one buffer cannot be COPY_SOURCE and COPY_DEST at once) and goes through `copy_scratch` instead; the fill could do the same. The branch conflicts with main: `fill` there now calls `want_view`, `uma_window_buffer_gpu` and `note_write(.., WriteProducer::InSegmentGpu, ..)`, so the rebase is not mechanical. 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/838:upstream-pr/838'
git switch 'upstream-pr/838'

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