D3D12.X: map and unmap 3D texture mips separately #1021

Open
bobosneefdev wants to merge 1 commit from upstream-pr/1028 into main
bobosneefdev commented 2026-11-24 10:33:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bobosneefdev on 2026-11-24T10:33:27Z.


On RX 6800, one linear tile-mapping region leaves upper 3D mips reading zero, and a NULL update over the same region leaves them mapped. By the spec one region from subresource 0 covers every mip; this maps and unmaps 3D textures with one region per standard mip plus the packed tail instead. Requested follow-up to #470; independent of it.

Since #1990, 3D textures with an XG packed mip tail take the detile/upload path instead of vram::Pages, so this applies to placed volumes whose mips all stay above the tail.

What is in it

  • vram.rs: tile_regions builds the regions from GetResourceTiling, shared by map and unmap. 2D textures and unexpected tilings keep main's single region, including its trailing-SKIP trim from 3bc7143; 3D textures with split regions skip that trim, since their regions must cover every tile.
  • title_textures.rs: a 256×256×64 four-mip volume (no XG packed tail, so placed), and a check that every mip of a placed 3D texture reads zero after retirement.

Tested

  • RX 6800, driver 32.0.21045.29003; Ryzen 5 5600X3D, 64 GB; Windows 11 Pro 26200; Rust 1.98.1 MSVC; DXC 1.8.2502.11. Debug tests; release smoke runs.
  • Clean 7a8b3a0196a7662668b50304373454658be2875b (on main 6987e49): cargo test --workspace --no-fail-fast -- --test-threads=4: 1153 passed, 1 failed, 46 ignored.
  • The failure is gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1; it fails the same way on clean main and does not touch this code.
  • SKIPPED (not coverage): heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows); the per-lane cases of f16_programs_on_the_gpu and f32_programs_on_the_gpu (refused by design).
  • placed_title_textures_share_vram_and_preserve_pixels on main 6987e49 with this test but without the vram.rs change: fails with 3D 256x256x64 4 mips: subresource 2 mismatch (2/2 runs); with it, passes.

Regression run
scripts/smoke.ps1 -Game '<game folder>' -Seconds 60, release, XCL_DATA_ROOT=%TEMP%\xcl-mips-game-data, XCL_COHERENT_MB=512, XCL_FRAME_DUMP=300, no scripted input. Three alternating clean pairs on 6987e49 / 7a8b3a0 (main/head frames): 678/802, 872/810, 675/741; no removals or crashes, peak commit 16851–17578 MB on both. The blocks below are the first pair.

Main (6987e49):

xcl-smoke v1
commit: 6987e496c35653f9ccc9dbdc1f1d342734306811
gpu: AMD Radeon RX 6800
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 678 (PresentX 678)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16955 MB

This head (7a8b3a0):

xcl-smoke v1
commit: 7a8b3a0196a7662668b50304373454658be2875b
gpu: AMD Radeon RX 6800
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 802 (PresentX 802)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16851 MB

Not tested

  • Other GPUs and drivers (RDNA3/4, NVIDIA), the debug layer, XCL_SAMPLE_* inputs.
  • No visible difference in the retail title's first 60 s; the run is a regression check. Its world load currently stops on huge compute pipeline compiles on this card, before any scene where this would show.

AI use

  • T3 Code through Codex (gpt-6.1-sol): implementation, tests, first description.
  • Claude Code (Claude Opus 5.5): review, rebases onto 3bc7143 and 6987e49, the test update after #1990, description, full test runs, revert checks, smoke pairs and the mapping instrumentation.
  • Codex (GPT-6; exact runtime model identifier unavailable): earlier smoke runs and publishing.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5470478553 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1028). Originally posted by [bobosneefdev](https://github.com/bobosneefdev) on 2026-11-24T10:33:27Z. --- On RX 6800, one linear tile-mapping region leaves upper 3D mips reading zero, and a NULL update over the same region leaves them mapped. By the spec one region from subresource 0 covers every mip; this maps and unmaps 3D textures with one region per standard mip plus the packed tail instead. Requested follow-up to #470; independent of it. Since #1990, 3D textures with an XG packed mip tail take the detile/upload path instead of `vram::Pages`, so this applies to placed volumes whose mips all stay above the tail. **What is in it** - `vram.rs`: `tile_regions` builds the regions from `GetResourceTiling`, shared by map and unmap. 2D textures and unexpected tilings keep `main`'s single region, including its trailing-`SKIP` trim from `3bc7143`; 3D textures with split regions skip that trim, since their regions must cover every tile. - `title_textures.rs`: a 256×256×64 four-mip volume (no XG packed tail, so placed), and a check that every mip of a placed 3D texture reads zero after retirement. **Tested** - RX 6800, driver 32.0.21045.29003; Ryzen 5 5600X3D, 64 GB; Windows 11 Pro 26200; Rust 1.98.1 MSVC; DXC 1.8.2502.11. Debug tests; release smoke runs. - Clean `7a8b3a0196a7662668b50304373454658be2875b` (on `main` `6987e49`): `cargo test --workspace --no-fail-fast -- --test-threads=4`: 1153 passed, 1 failed, 46 ignored. - The failure is `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`; it fails the same way on clean `main` and does not touch this code. - SKIPPED (not coverage): `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows); the per-lane cases of `f16_programs_on_the_gpu` and `f32_programs_on_the_gpu` (refused by design). - `placed_title_textures_share_vram_and_preserve_pixels` on `main` `6987e49` with this test but without the `vram.rs` change: fails with `3D 256x256x64 4 mips: subresource 2 mismatch` (2/2 runs); with it, passes. **Regression run** `scripts/smoke.ps1 -Game '<game folder>' -Seconds 60`, release, `XCL_DATA_ROOT=%TEMP%\xcl-mips-game-data`, `XCL_COHERENT_MB=512`, `XCL_FRAME_DUMP=300`, no scripted input. Three alternating clean pairs on `6987e49` / `7a8b3a0` (main/head frames): 678/802, 872/810, 675/741; no removals or crashes, peak commit 16851–17578 MB on both. The blocks below are the first pair. Main (`6987e49`): ``` xcl-smoke v1 commit: 6987e496c35653f9ccc9dbdc1f1d342734306811 gpu: AMD Radeon RX 6800 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 678 (PresentX 678) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16955 MB ``` This head (`7a8b3a0`): ``` xcl-smoke v1 commit: 7a8b3a0196a7662668b50304373454658be2875b gpu: AMD Radeon RX 6800 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 802 (PresentX 802) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16851 MB ``` **Not tested** - Other GPUs and drivers (RDNA3/4, NVIDIA), the debug layer, `XCL_SAMPLE_*` inputs. - No visible difference in the retail title's first 60 s; the run is a regression check. Its world load currently stops on huge compute pipeline compiles on this card, before any scene where this would show. **AI use** - T3 Code through Codex (`gpt-6.1-sol`): implementation, tests, first description. - Claude Code (Claude Opus 5.5): review, rebases onto `3bc7143` and `6987e49`, the test update after #1990, description, full test runs, revert checks, smoke pairs and the mapping instrumentation. - Codex (GPT-6; exact runtime model identifier unavailable): earlier smoke runs and publishing. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
AlexandreSchuelter commented 2026-11-24 12:05:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by AlexandreSchuelter on 2026-11-24T11:15:19Z.


Test report on an RX 6900 XT (RDNA2): this PR fixes the 3D 64x64x64 4 mips: subresource 2 mismatch failure, as-is and merged onto main, and merges cleanly with #470.

Tested

  • AMD Radeon RX 6900 XT (Navi 21), driver 32.0.21045.29003; Ryzen 7 5800X3D; Windows NT 10.0.26300
  • Rust 1.100.0 stable-x86_64-pc-windows-msvc, release; XCL_NETWORK=0, XCL_REQUIRE_GPU=wave64; no SKIPPED tests
  • cargo test -p xcl --lib --release -- --test-threads=4:
Tree Passed Failed Ignored placed_title_textures_share_vram_and_preserve_pixels
main 384f7f7 691 3 21 FAILED: 3D 64x64x64 4 mips: subresource 2 mismatch
this PR as-is 8e11e74 685 0 21 ok
this PR merged onto 384f7f7 694 0 21 ok
this PR + #470 (3896e4f) merged onto 384f7f7 694 0 21 ok
  • The other two failures on main (transitions_apply_when_their_list_is_submitted, d32s8_targets_take_their_own_size_of_video_memory) are PoisonError cascades: both pass when run without the failing test.
  • The test alone, 5 runs per tree: main 0/5 passed, this PR merged onto main 5/5 passed.

Not tested

  • Whether this adapter reports tiled resources tier 3, so whether the new "unmapped subresource still reads data" check ran here (the test passed either way)
  • The whole workspace suite (--workspace), only the xcl lib tests
  • A retail title / scripts/smoke.ps1 (no game here), debug builds, other GPUs

AI use: Claude Code (Claude Opus 5.5) fetched the branches, ran the tests and wrote this report; the runs are real, on the hardware above.

<!-- greyfinch-sync:ivall/xcl:comment:7129859755 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1028#issuecomment-7129859755). Originally posted by [AlexandreSchuelter](https://github.com/AlexandreSchuelter) on 2026-11-24T11:15:19Z. --- Test report on an RX 6900 XT (RDNA2): this PR fixes the `3D 64x64x64 4 mips: subresource 2 mismatch` failure, as-is and merged onto `main`, and merges cleanly with #470. **Tested** - AMD Radeon RX 6900 XT (Navi 21), driver 32.0.21045.29003; Ryzen 7 5800X3D; Windows NT 10.0.26300 - Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, release; `XCL_NETWORK=0`, `XCL_REQUIRE_GPU=wave64`; no SKIPPED tests - `cargo test -p xcl --lib --release -- --test-threads=4`: | Tree | Passed | Failed | Ignored | `placed_title_textures_share_vram_and_preserve_pixels` | |---|---|---|---|---| | `main` `384f7f7` | 691 | 3 | 21 | FAILED: `3D 64x64x64 4 mips: subresource 2 mismatch` | | this PR as-is `8e11e74` | 685 | 0 | 21 | ok | | this PR merged onto `384f7f7` | 694 | 0 | 21 | ok | | this PR + #470 (`3896e4f`) merged onto `384f7f7` | 694 | 0 | 21 | ok | - The other two failures on `main` (`transitions_apply_when_their_list_is_submitted`, `d32s8_targets_take_their_own_size_of_video_memory`) are `PoisonError` cascades: both pass when run without the failing test. - The test alone, 5 runs per tree: `main` 0/5 passed, this PR merged onto `main` 5/5 passed. **Not tested** - Whether this adapter reports tiled resources tier 3, so whether the new "unmapped subresource still reads data" check ran here (the test passed either way) - The whole workspace suite (`--workspace`), only the `xcl` lib tests - A retail title / `scripts/smoke.ps1` (no game here), debug builds, other GPUs **AI use**: Claude Code (Claude Opus 5.5) fetched the branches, ran the tests and wrote this report; the runs are real, on the hardware above.
DavidM1911 commented 2026-11-24 12:05:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T11:18:45Z.


Independent verification, merged onto current main 384f7f7 locally (clean merge).

Machine: Windows 11, Ryzen 9 7900X Radeon iGPU (gfx1036 RDNA2) + RTX 3060 Ti; Rust stable MSVC, debug.

  • XCL_ADAPTER=radeon cargo test -p xcl --lib vram -- --test-threads=4: 8 passed, 1 failed — gpu_sparse_vram_descriptors_buffers_and_xmem (submit 1 lane 0 mismatch, left 0 / right 1077). That is the known #343 write-watch race between this test and placed_title_textures_share_vram_and_preserve_pixels; the same pair fails identically on clean main 384f7f7 on this machine (3/3 + 1/1 runs), so it is not a regression here — on this iGPU the race resolves the same way every time.
  • placed_title_textures_share_vram_and_preserve_pixels itself passed on the Radeon — it carries this PR's new "unmapped subresource still reads data" asserts for 3D mip regions.

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

<!-- greyfinch-sync:ivall/xcl:comment:7129934210 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1028#issuecomment-7129934210). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T11:18:45Z. --- Independent verification, merged onto current `main` `384f7f7` locally (clean merge). **Machine:** Windows 11, Ryzen 9 7900X Radeon iGPU (gfx1036 RDNA2) + RTX 3060 Ti; Rust stable MSVC, debug. - `XCL_ADAPTER=radeon cargo test -p xcl --lib vram -- --test-threads=4`: 8 passed, **1 failed** — `gpu_sparse_vram_descriptors_buffers_and_xmem` (`submit 1 lane 0 mismatch`, left 0 / right 1077). That is the known #343 write-watch race between this test and `placed_title_textures_share_vram_and_preserve_pixels`; the same pair fails identically on clean `main` `384f7f7` on this machine (3/3 + 1/1 runs), so it is not a regression here — on this iGPU the race resolves the same way every time. - `placed_title_textures_share_vram_and_preserve_pixels` itself **passed** on the Radeon — it carries this PR's new "unmapped subresource still reads data" asserts for 3D mip regions. AI use: test runs by Devin (Cognition, SWE-2); no code changes.
RodrigoTorreao commented 2026-11-24 13:03:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by RodrigoTorreao on 2026-11-24T12:40:00Z.


Test report on RDNA2 for b3c53e9 (head of this PR, unmodified).

Tested

  • AMD Radeon RX 6750 XT (RDNA2, 12 GB), driver 32.0.21045.29003; Intel i5-14600KF; Windows 11 25H2 build 26200.9974; Rust 1.100.0 (stable-x86_64-pc-windows-msvc), debug build
  • XCL_SAMPLE_RPF, XCL_SAMPLE_DLLS, XCL_SAMPLE_TTPF, XCL_SAMPLE_BVH4 set to the retail title's files
  • main 47efa2e, cargo test --workspace --no-fail-fast -- --test-threads=4: 738 passed, 3 failed, 41 ignored, 0 SKIPPED
    • the one real failure is placed_title_textures_share_vram_and_preserve_pixels: 3D 64x64x64 4 mips: subresource 2 mismatch (mip 2 reads as zeros)
    • transitions_apply_when_their_list_is_submitted and d32s8_targets_take_their_own_size_of_video_memory fail only with PoisonError after it; each passes when run alone
  • this PR at b3c53e9, cargo build --workspace + cargo test --workspace --no-fail-fast -- --test-threads=4: 741 passed, 0 failed, 41 ignored, 0 SKIPPED; placed_title_textures_share_vram_and_preserve_pixels passes, including the 3D subresource 2 case

Not tested

  • no scripts/smoke.ps1 run on the retail title, so this does not answer the frame-rate drop in the description (741 vs 1,004 frames)
  • release build; other RDNA2 boards or drivers

AI use

  • Claude Code with Claude Opus 5.5 ran the commands and wrote this report; I checked the counts against the logs.
<!-- greyfinch-sync:ivall/xcl:comment:7131754254 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1028#issuecomment-7131754254). Originally posted by [RodrigoTorreao](https://github.com/RodrigoTorreao) on 2026-11-24T12:40:00Z. --- Test report on RDNA2 for b3c53e9 (head of this PR, unmodified). **Tested** - AMD Radeon RX 6750 XT (RDNA2, 12 GB), driver 32.0.21045.29003; Intel i5-14600KF; Windows 11 25H2 build 26200.9974; Rust 1.100.0 (stable-x86_64-pc-windows-msvc), debug build - `XCL_SAMPLE_RPF`, `XCL_SAMPLE_DLLS`, `XCL_SAMPLE_TTPF`, `XCL_SAMPLE_BVH4` set to the retail title's files - `main` 47efa2e, `cargo test --workspace --no-fail-fast -- --test-threads=4`: 738 passed, 3 failed, 41 ignored, 0 SKIPPED - the one real failure is `placed_title_textures_share_vram_and_preserve_pixels`: `3D 64x64x64 4 mips: subresource 2 mismatch` (mip 2 reads as zeros) - `transitions_apply_when_their_list_is_submitted` and `d32s8_targets_take_their_own_size_of_video_memory` fail only with `PoisonError` after it; each passes when run alone - this PR at b3c53e9, `cargo build --workspace` + `cargo test --workspace --no-fail-fast -- --test-threads=4`: **741 passed, 0 failed, 41 ignored, 0 SKIPPED**; `placed_title_textures_share_vram_and_preserve_pixels` passes, including the 3D subresource 2 case **Not tested** - no `scripts/smoke.ps1` run on the retail title, so this does not answer the frame-rate drop in the description (741 vs 1,004 frames) - release build; other RDNA2 boards or drivers **AI use** - Claude Code with Claude Opus 5.5 ran the commands and wrote this report; I checked the counts against the logs.
RodrigoTorreao commented 2026-11-24 14:06:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by RodrigoTorreao on 2026-11-24T13:10:49Z.


Test report on RDNA2 for b3c53e9, this PR's head, unmodified.

The packed-mip test passes with this PR. Over repeated smoke runs I could not find the frame-rate drop from the description. The spread between runs of the same build is larger than any difference between builds, so this setup can neither confirm nor rule it out.

Tested

  • Hardware and software:
    • AMD Radeon RX 6750 XT (RDNA2, 12 GB), driver 32.0.21045.29003
    • Intel i5-14600KF, 16 GB RAM
    • Windows 11 25H2 build 26200.9974
    • Rust 1.100.0 (stable-x86_64-pc-windows-msvc)
  • Tests: debug build, with XCL_SAMPLE_RPF/DLLS/TTPF/BVH4 set to the retail title's files, cargo test --workspace --no-fail-fast -- --test-threads=4.
    • main 47efa2e: 738 passed, 3 failed, 41 ignored, 0 SKIPPED.
      • The real failure is placed_title_textures_share_vram_and_preserve_pixels: 3D 64x64x64 4 mips: subresource 2 mismatch. Mip 2 reads as zeros.
      • The other two failures are PoisonError follow-ons. Each passes when run alone.
    • This PR, after cargo build --workspace: 741 passed, 0 failed, 41 ignored, 0 SKIPPED.
  • Smoke runs: release build, scripts/smoke.ps1 -Seconds 60 on the retail title, DXC 1.9.2609 via XCL_DXC_DIR, warm DXIL cache.
    • The title stays in its first menu, at about 13 draws per frame in every run.
    • No gamepad or keyboard input reached the title in any of them. I checked the log for pressed, and keyboard_mouse = false was set for the interleaved rounds.

Regression run
Frames shown in 60 s, all clean runs. The last three columns are interleaved rounds, in the order main → #470 → this PR.

build single runs round 1 round 2 round 3 median
main 47efa2e 987, 721 666 754 433 721
this PR b3c53e9 647, 627 579 776 506 627
  • All runs on both sides: exit 0x0, 0 device removals, 0 crashes, peak commit 15 880–15 895 MB.
  • main alone ranges from 433 to 987 frames, with the same workload and about 6 GB of RAM free before each run. I did not find the cause of the spread. The title commits about 15.9 GB on a 16 GB machine, so paging is a suspect, but I have not checked it.
  • Earlier I had compared one run of this PR (647) with main's best run (987) and got 65.6 %. Taken against the medians, that difference is within the noise.
  • I have all the xcl-smoke blocks and logs and can paste any of them.

Not tested

  • A machine with a stable frame rate, for example with more RAM. On this one the 80 % gate cannot be measured reliably.
  • Where the PR's extra work goes. The diff adds a GetDevice and a GetResourceTiling per map/unmap of a 3D texture, and one region per mip. I did not profile it.
  • Other RDNA2 boards and drivers.

AI use

  • Claude Code (Claude Opus 5.5) ran the commands on my machine and wrote this report. The counts and frame numbers were copied from the test output and the XCL logs.
<!-- greyfinch-sync:ivall/xcl:comment:7132461566 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1028#issuecomment-7132461566). Originally posted by [RodrigoTorreao](https://github.com/RodrigoTorreao) on 2026-11-24T13:10:49Z. --- Test report on RDNA2 for b3c53e9, this PR's head, unmodified. The packed-mip test passes with this PR. Over repeated smoke runs I could not find the frame-rate drop from the description. The spread between runs of the same build is larger than any difference between builds, so this setup can neither confirm nor rule it out. **Tested** - Hardware and software: - AMD Radeon RX 6750 XT (RDNA2, 12 GB), driver 32.0.21045.29003 - Intel i5-14600KF, 16 GB RAM - Windows 11 25H2 build 26200.9974 - Rust 1.100.0 (stable-x86_64-pc-windows-msvc) - Tests: debug build, with `XCL_SAMPLE_RPF/DLLS/TTPF/BVH4` set to the retail title's files, `cargo test --workspace --no-fail-fast -- --test-threads=4`. - `main` 47efa2e: 738 passed, 3 failed, 41 ignored, 0 SKIPPED. - The real failure is `placed_title_textures_share_vram_and_preserve_pixels`: `3D 64x64x64 4 mips: subresource 2 mismatch`. Mip 2 reads as zeros. - The other two failures are `PoisonError` follow-ons. Each passes when run alone. - This PR, after `cargo build --workspace`: **741 passed, 0 failed, 41 ignored, 0 SKIPPED**. - Smoke runs: release build, `scripts/smoke.ps1 -Seconds 60` on the retail title, DXC 1.9.2609 via `XCL_DXC_DIR`, warm DXIL cache. - The title stays in its first menu, at about 13 draws per frame in every run. - No gamepad or keyboard input reached the title in any of them. I checked the log for `pressed`, and `keyboard_mouse = false` was set for the interleaved rounds. **Regression run** Frames shown in 60 s, all clean runs. The last three columns are interleaved rounds, in the order main → #470 → this PR. | build | single runs | round 1 | round 2 | round 3 | median | |---|---|---|---|---|---| | main 47efa2e | 987, 721 | 666 | 754 | 433 | **721** | | this PR b3c53e9 | 647, 627 | 579 | 776 | 506 | **627** | - All runs on both sides: exit 0x0, 0 device removals, 0 crashes, peak commit 15 880–15 895 MB. - main alone ranges from 433 to 987 frames, with the same workload and about 6 GB of RAM free before each run. I did not find the cause of the spread. The title commits about 15.9 GB on a 16 GB machine, so paging is a suspect, but I have not checked it. - Earlier I had compared one run of this PR (647) with main's best run (987) and got 65.6 %. Taken against the medians, that difference is within the noise. - I have all the `xcl-smoke` blocks and logs and can paste any of them. **Not tested** - A machine with a stable frame rate, for example with more RAM. On this one the 80 % gate cannot be measured reliably. - Where the PR's extra work goes. The diff adds a `GetDevice` and a `GetResourceTiling` per map/unmap of a 3D texture, and one region per mip. I did not profile it. - Other RDNA2 boards and drivers. **AI use** - Claude Code (Claude Opus 5.5) ran the commands on my machine and wrote this report. The counts and frame numbers were copied from the test output and the XCL logs.
JoaoPauluu commented 2026-11-24 15:05:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JoaoPauluu on 2026-11-24T14:22:34Z.


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

Tested

  • RTX 3060 12 GB (NVIDIA 620.70.06, 32-lane waves), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for x86_64-pc-windows-gnu. b3c53e9 as it is (merge base 47efa2e) and main 47efa2e, no uncommitted changes. Retail title 1.0.2.1, scripts/linux/smoke.sh (#257) for 60 s, no input. Twelve runs in a row, main first and last, other PRs in between.
  • title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels (--exact, one process each, lib test binary under Wine): 3 of 3 passed on this PR (its new 3D 128x128x128 5 mips case included) and 3 of 3 on main 47efa2e. vkd3d-proton implements the tile mappings itself, not an AMD driver. I did not check whether the 3D shapes were placed as tiled resources here (the tier 3 branch) or fell back to committed ones, so this does not show the RX 6800 fault or its fix on this stack.
  • The game run is a regression check: I did not check whether GTA VI reaches the changed code in these 60 s.

Regression run

main (first run):

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

this PR:

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

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

Not tested

  • the rest of the suite on this head; native Windows; AMD.

AI use

  • Claude Code (Claude Opus 5.5) built both commits, ran the tests and runs and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
<!-- greyfinch-sync:ivall/xcl:comment:7134272132 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1028#issuecomment-7134272132). Originally posted by [JoaoPauluu](https://github.com/JoaoPauluu) on 2026-11-24T14:22:34Z. --- A regression run under Wine on Linux, on a retail title. **Tested** - RTX 3060 12 GB (NVIDIA 620.70.06, 32-lane waves), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for `x86_64-pc-windows-gnu`. `b3c53e9` as it is (merge base `47efa2e`) and `main` `47efa2e`, no uncommitted changes. Retail title 1.0.2.1, `scripts/linux/smoke.sh` (#257) for 60 s, no input. Twelve runs in a row, `main` first and last, other PRs in between. - `title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels` (`--exact`, one process each, lib test binary under Wine): 3 of 3 passed on this PR (its new `3D 128x128x128 5 mips` case included) and 3 of 3 on `main` `47efa2e`. vkd3d-proton implements the tile mappings itself, not an AMD driver. I did not check whether the 3D shapes were placed as tiled resources here (the tier 3 branch) or fell back to committed ones, so this does not show the RX 6800 fault or its fix on this stack. - The game run is a regression check: I did not check whether GTA VI reaches the changed code in these 60 s. **Regression run** main (first run): ``` xcl-smoke v1 commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3 gpu: NVIDIA GeForce RTX 3060 title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1384 (PresentX 1384) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` this PR: ``` xcl-smoke v1 commit: b3c53e98de18b2150b361303010f702ba3610f31 gpu: NVIDIA GeForce RTX 3060 title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1396 (PresentX 1396) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` The last `main` run: 1425 frames, `exit: 0x0`, no device removal, no crash. Under Wine, `peak commit` reads 0 MB, so these blocks do not check memory. **Not tested** - the rest of the suite on this head; native Windows; AMD. **AI use** - Claude Code (Claude Opus 5.5) built both commits, ran the tests and runs and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
thiagocalile commented 2026-11-24 15:06:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thiagocalile on 2026-11-24T15:00:01Z.


Tested commit b3c53e98de18b2150b361303010f702ba3610f31 on an AMD RX 6600 (RDNA2) where main (930e8b4) fails placed_title_textures_share_vram_and_preserve_pixels with 3D 64x64x64 4 mips: subresource 2 mismatch (plus 2 cascading PoisonError failures). This PR fixes it and passes the new 3D 128x128x128 5 mips and post-retirement unmap checks.

Tested

  • Hardware: AMD Radeon RX 6600 (8146 MiB VRAM, driver 32.0.21045.29003; secondary NVIDIA GTX 1050 Ti present, bypassed with XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (26200), Rust 1.100.0 (stable-x86_64-pc-windows-msvc, debug), DXC 1.8.2502.11.
  • XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4: 736 passed, 0 failed, 41 ignored (xcl --lib: 698 passed, 0 failed, 21 ignored; integration tests: 38 passed, 0 failed, 20 ignored).
  • SKIPPED (2 tests, not coverage):
  • test_title_draws_with_a_root_signature_under_the_debug_layer: no d3d12SDKLayers.dll
  • uploads_start_from_each_subresources_state: no D3D12 debug layer (0x887A002D)

Not tested

  • D3D12 debug layer (d3d12SDKLayers.dll not installed) and system xgameruntime.dll.
  • Retail title smoke run (scripts/smoke.ps1) — no game executable available here.
  • XCL_SAMPLE_* tests on this commit, other GPUs / drivers (RDNA1/3/4, NVIDIA, Intel).

AI use

  • Antigravity (Gemini 4 Neon) ran the build and test commands on my machine and drafted this report; I checked the output before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7135293735 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1028#issuecomment-7135293735). Originally posted by [thiagocalile](https://github.com/thiagocalile) on 2026-11-24T15:00:01Z. --- Tested commit `b3c53e98de18b2150b361303010f702ba3610f31` on an AMD RX 6600 (RDNA2) where `main` (`930e8b4`) fails `placed_title_textures_share_vram_and_preserve_pixels` with `3D 64x64x64 4 mips: subresource 2 mismatch` (plus 2 cascading `PoisonError` failures). This PR fixes it and passes the new `3D 128x128x128 5 mips` and post-retirement unmap checks. **Tested** - Hardware: AMD Radeon RX 6600 (8146 MiB VRAM, driver 32.0.21045.29003; secondary NVIDIA GTX 1050 Ti present, bypassed with `XCL_ADAPTER=radeon`), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (26200), Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`, debug), DXC 1.8.2502.11. - `XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4`: 736 passed, 0 failed, 41 ignored (`xcl --lib`: 698 passed, 0 failed, 21 ignored; integration tests: 38 passed, 0 failed, 20 ignored). - `SKIPPED` (2 tests, not coverage): - `test_title_draws_with_a_root_signature_under_the_debug_layer`: `no d3d12SDKLayers.dll` - `uploads_start_from_each_subresources_state`: `no D3D12 debug layer (0x887A002D)` **Not tested** - D3D12 debug layer (`d3d12SDKLayers.dll` not installed) and system `xgameruntime.dll`. - Retail title smoke run (`scripts/smoke.ps1`) — no game executable available here. - `XCL_SAMPLE_*` tests on this commit, other GPUs / drivers (RDNA1/3/4, NVIDIA, Intel). **AI use** - Antigravity (Gemini 4 Neon) ran the build and test commands on my machine and drafted this report; I checked the output before posting.
JJAutoCompare commented 2026-11-25 06:05:53 +00:00 (Migrated from github.com)

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


Empirical test report (325f864c)

PR #1028 was checked at 325f864cab487b2f8d7831d2bbca977a06ad81a2 in a clean, detached worktree.

Hardware / environment

  • Windows x64 build 26200, AMD64 Family 23 Model 113 CPU, Intel Arc A770 (DXGI adapter 0), driver 32.0.101.9175. A separate D3D12 capability query on adapter 0 returned Tiled Resources Tier 4 and Resource Heap Tier 1.
  • Rust 1.100.0 (0ef1bc386 2026-11-09), DXC 1.9.2609.5 (01b62ad47). Unoptimized Cargo test profile with debug info and incremental compilation disabled.

Commands and results

  • cargo test --workspace --no-run completed outside the Arc lock (exit 0).
  • Under Invoke-ArcTest.ps1, ran only xcl-77aca8ccb20e299f.exe --exact hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1 (exit 0). The fixture selects DXGI adapter 0 directly.
  • Rust reported 1 passed, 0 failed, 0 ignored, with 951 filtered out. The log contained 1 explicit SKIPPED marker, leaving 0 completed fixture bodies.

Observed behavior

  • The fixture printed SKIPPED placed_title_textures_share_vram_and_preserve_pixels: tiled tier < 2. That branch also checks Resource Heap Tier 2. The Arc adapter's Resource Heap Tier 1 fails the check before any texture placement, mip readback, or retirement assertions.

Not tested

  • Reserved 3D texture mip mapping and unmapping, including zero readback after retirement. The full GPU workspace suite and game smoke runs were omitted.

AI use

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

<!-- greyfinch-sync:ivall/xcl:comment:7153895827 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1028#issuecomment-7153895827). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T05:33:32Z. --- ### Empirical test report (325f864c) PR #1028 was checked at `325f864cab487b2f8d7831d2bbca977a06ad81a2` in a clean, detached worktree. **Hardware / environment** - Windows x64 build 26200, AMD64 Family 23 Model 113 CPU, Intel Arc A770 (DXGI adapter 0), driver `32.0.101.9175`. A separate D3D12 capability query on adapter 0 returned Tiled Resources Tier 4 and Resource Heap Tier 1. - Rust `1.100.0 (0ef1bc386 2026-11-09)`, DXC `1.9.2609.5 (01b62ad47)`. Unoptimized Cargo test profile with debug info and incremental compilation disabled. **Commands and results** - `cargo test --workspace --no-run` completed outside the Arc lock (exit 0). - Under `Invoke-ArcTest.ps1`, ran only `xcl-77aca8ccb20e299f.exe --exact hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels` with `XCL_ADAPTER=A770` and `RUST_TEST_NOCAPTURE=1` (exit 0). The fixture selects DXGI adapter 0 directly. - Rust reported **1 passed, 0 failed, 0 ignored**, with 951 filtered out. The log contained **1 explicit `SKIPPED` marker**, leaving **0 completed fixture bodies**. **Observed behavior** - The fixture printed `SKIPPED placed_title_textures_share_vram_and_preserve_pixels: tiled tier < 2`. That branch also checks Resource Heap Tier 2. The Arc adapter's Resource Heap Tier 1 fails the check before any texture placement, mip readback, or retirement assertions. **Not tested** - Reserved 3D texture mip mapping and unmapping, including zero readback after retirement. The full GPU workspace suite and game smoke runs were omitted. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr1028-focused.log` and published.
CryingLaughing commented 2026-11-26 16:06:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by CryingLaughing on 2026-11-26T15:22:03Z.


Paired native D3D12 result on the RTX 4080 for the current #1028 head. Both revisions passed the same four-mip volume test.

Source revision with identical test-only fixture Passed Failed Ignored Capability skips
Parent 6987e496c35653f9ccc9dbdc1f1d342734306811 1 0 0 0
Head 7a8b3a0196a7662668b50304373454658be2875b 1 0 0 0

Both used a reserved 256×256×64 RGBA8 volume. DXGI verified the physical RTX 4080, Tiled Resources Tier 4, three standard mips, one packed mip, and 293 tiles. The four readbacks matched all 19,169,280 uploaded bytes. After retirement and a queue drain, every mip read back as zero.

Tested on NVIDIA RTX 4080 driver 621.01, Core i5-13600K, Windows 11 25H2 build 26200.9974 and Rust 1.100.0 x64 MSVC debug. Separate binaries built with cargo test --offline --locked -j 4 -p xcl --lib --no-run --message-format=json. Each ran hle::d3d12x::title_textures::tests::pr1028_placed_volume_reads_all_mips_before_and_after_retirement --exact --test-threads=1 --nocapture with XCL_ADAPTER=4080.

Not tested were a retail title, an AMD adapter, or performance.

<!-- greyfinch-sync:ivall/xcl:comment:7196165870 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1028#issuecomment-7196165870). Originally posted by [CryingLaughing](https://github.com/CryingLaughing) on 2026-11-26T15:22:03Z. --- Paired native D3D12 result on the RTX 4080 for the current #1028 head. Both revisions passed the same four-mip volume test. | Source revision with identical test-only fixture | Passed | Failed | Ignored | Capability skips | | --- | ---: | ---: | ---: | ---: | | Parent `6987e496c35653f9ccc9dbdc1f1d342734306811` | 1 | 0 | 0 | 0 | | Head `7a8b3a0196a7662668b50304373454658be2875b` | 1 | 0 | 0 | 0 | Both used a reserved 256×256×64 RGBA8 volume. DXGI verified the physical RTX 4080, Tiled Resources Tier 4, three standard mips, one packed mip, and 293 tiles. The four readbacks matched **all 19,169,280 uploaded bytes**. After retirement and a queue drain, every mip read back as zero. **Tested** on NVIDIA RTX 4080 driver 621.01, Core i5-13600K, Windows 11 25H2 build 26200.9974 and Rust 1.100.0 x64 MSVC debug. Separate binaries built with `cargo test --offline --locked -j 4 -p xcl --lib --no-run --message-format=json`. Each ran `hle::d3d12x::title_textures::tests::pr1028_placed_volume_reads_all_mips_before_and_after_retirement --exact --test-threads=1 --nocapture` with `XCL_ADAPTER=4080`. **Not tested** were a retail title, an AMD adapter, or performance.
github-actions[bot] commented 2026-12-01 02:34:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:34:47Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7298767383 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1028#issuecomment-7298767383). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-12-01T02:34:47Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 04:40:29 +00:00 (Migrated from github.com)

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


Triage (#1607) – head 7a8b3a0

#470 also works on tile mappings that miss later mips on AMD drivers, but in a different way. It maps the packed block of a one-slice texture a second time, addressed from its first packed mip, and only when mapping. This PR gives a 3D texture one region per standard mip plus one for the packed block, for both map and unmap. Each fixes a case the other does not, so this is not a duplicate. The approach is not on main: Pages::map / unmap_range still use one linear region from sub.
The PR conflicts with main. map now takes a sub (lazy levels), and since #1990 3D textures with an XG packed tail take the detile path, so tile_regions needs a rebase. Its regions start at subresource 0, which is only right while sub is 0.
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:7300979955 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1028#issuecomment-7300979955). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T04:40:29Z. --- **Triage (#1607)** – head 7a8b3a0 #470 also works on tile mappings that miss later mips on AMD drivers, but in a different way. It maps the packed block of a one-slice texture a second time, addressed from its first packed mip, and only when mapping. This PR gives a 3D texture one region per standard mip plus one for the packed block, for both map and unmap. Each fixes a case the other does not, so this is not a duplicate. The approach is not on main: `Pages::map` / `unmap_range` still use one linear region from `sub`. The PR conflicts with main. `map` now takes a `sub` (lazy levels), and since #1990 3D textures with an XG packed tail take the detile path, so `tile_regions` needs a rebase. Its regions start at subresource 0, which is only right while `sub` is 0. 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/1028:upstream-pr/1028'
git switch 'upstream-pr/1028'

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