D3D12.X: map a one-slice title texture's packed mips where D3D12 addresses them #470
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!470
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-470"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Abdellah-Khanani on GitHub · 2026-11-24 00:46 UTC · original
Abdellah-Khanani:rdna1-packed-mips→main· +47 −12 · 2 files · 2 commits · openOn AMD's RDNA1 Windows driver, the packed mips of a reserved title texture with standard mips stay unmapped, so they read zero. Measured on an RX 5700 XT with the 64x64x64 RGBA8, 4-mip 3D texture of
placed_title_textures_share_vram_and_preserve_pixels:GetResourceTilinggives 19 tiles: mip 0 has 16 (start 0), mip 1 has 2 (start 16), and mips 2-3 are packed into 1 tile (NumStandardMips2, start 18). AfterPages::map's single run over the 19 overall tiles from subresource 0, mip 2 reads back all zero (3D 64x64x64 4 mips: subresource 2 mismatch). Mapping the packed block a second time, with the first packed mip as the subresource and the tile in the block as X (how D3D12 addresses packed mips), fixes it.That test has been SKIPPED on this adapter since
a6f5f7a, because the driver refuses the reserved 256x256x6 cube too. This PR lets the test run there: only the cube's same-address reuse step is left out when the cube is committed, so it catches this bug.What is in it
D3D12.X: map the packed mips of a one-slice title texture where D3D12 addresses them:Pages::map_packed_mipsincrates/xcl/src/hle/d3d12x/vram.rs, called aftermapinbind. Only for a 3D texture or a 2D texture without an array (an array keeps a packed block per slice; not measured here), and only when it has both standard and packed mips. It maps the same tilesmapchose, so on a driver where the run already reached them nothing changes.Tests: the title textures test runs on an adapter that makes no reserved cube:crates/xcl/src/hle/d3d12x/title_textures.rs. The whole-test skip froma6f5f7ais removed. The cubemap's same-address reuse check runs only when the first cube was reserved (a committed cube has no tiles to reuse); the existing tolerance for a committed cube stays as it was.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4onmain2997c9a+ this PR: 675 passed, 1 failed, 41 ignored. The failure isgpu::recomp::tests::gpu_nonfused_mad_and_mac_prevent_fma_contraction, which also fails onmainon this adapter and is unrelated (the driver does not fusemad; reported separately).SKIPPED gpu::recomp::tests::gpu_geometry_mode_es_gs_strip: no mesh shaders,SKIPPED gpu::recomp::tests::gpu_mesh_mode_two_passes: no mesh shaders.placed_title_textures_share_vram_and_preserve_pixelswith the test change but without thevram.rschange: fails (3D 64x64x64 4 mips: subresource 2 mismatch). With both changes: passes.Regression run
scripts/smoke.ps1 -Seconds 90, no input, second run of each (warm translation cache). The blocks are copied unchanged from that comment.main:this PR's head:
Not tested
AI use
GetResourceTilinglog, wrote both changes and this description, and ran the tests above on my machine. I reviewed the diff.🤖 Generated with Claude Code
@Mustafaiq1998x on GitHub · 2026-11-24 01:02 UTC · original
<html>Independent RDNA2 validation — AMD Radeon RX 6800
Confirmed that the packed-mip issue also affects RDNA2.
Environment:
GPU: AMD Radeon RX 6800
Driver: 32.0.21045.29003
Windows build: 26300
Rust: 1.100.0 MSVC
DXC: 1.9.2602.17
Debug build
Results:
Revision | Passed | Failed -- | -- | -- Main (2997c9a) | 0 | 2 PR #470 (3896e4f) | 4 | 0Main fails with:
3D 64x64x64 4 mips: subresource 2 mismatchThe PR passes the complete
placed_title_textures_share_vram_and_preserve_pixelstest.For the final A/B run, I temporarily instrumented the test to print and assert the actual DXGI adapter, since it uses
EnumAdapters1(0)rather thanXCL_ADAPTER.Both runs confirmed
AMD Radeon RX 6800.The diagnostic source changes were restored afterward. No retail game data was used.
This confirms the fix on RDNA2 in addition to the author's RDNA1 results.
AI use: ChatGPT (GPT-6.2) assisted with investigation, test planning and report preparation. All GPU tests were executed on my local hardware.
</html>@MesshM on GitHub · 2026-11-24 01:16 UTC · original
Test run of
3896e4fb97d4971971ab7b178a541170cb96318bon AMD RDNA4 (the PR has RDNA1 and RDNA2 results). The branch is based on2997c9a, so I merged it onto currentmain7ebf1b8locally (clean merge,title_textures.rsandvram.rs) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debug.\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4) on the merge: 677 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 637 passed, 0 failed, 21 ignoredSKIPPED: on this adapter the reserved 256x256x6 cube is made, soplaced_title_textures_share_vram_and_preserve_pixelstakes the reserved path, including the cubemap same-address reuse step, withmap_packed_mipsactive; it passes (again alone with--nocapture: 1 passed, 14.2 s, noSKIPPEDline)So on RDNA4, where
mapalready reached the packed tiles before this change (the test ran and passed onmaina6f5f7aon this machine, 0SKIPPED), mapping them a second time changes nothing that the test can see.Review of the change:
map_packed_mipsmaps the same tilesmapchose, addressed as D3D12 addresses packed mips (subresource = first packed mip, X = tile within the packed block), one call per heap with the other heaps' tiles skipped, asmapdoes. It returns early for arrays and cubes, for textures without standard or packed mips, and when the packed block does not fittiles. The test change keeps the reuse step only when the first cube was reserved, which is the case the step is about. I found nothing to change. One thing not measured: every placement of a one-slice texture with packed mips now does a secondUpdateTileMappingsand aSignal; that could matter during world streaming, next to #490.Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain;main7ebf1b8itself was not run in full on this machine.Run and report by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
@WebIdentity1 on GitHub · 2026-11-24 01:24 UTC · original
Independent two-adapter validation of
3896e4fb97d4971971ab7b178a541170cb96318b(base2997c9a).Tested
XCL_ADAPTERand picks adapter0 (AMD here). Focused A/B tests temporarily selected and asserted the adapter name/vendor on both sides; those diagnostics were removed for the full run.cargo test --locked -p xcl --lib hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels -- --exact --nocapture.cargo build --locked --workspacepasses. Desktop session1,cargo test --locked --workspace --no-fail-fast -- --test-threads=1: 675 passed, 1 failed, 41 ignored. Remaining failure: pre-existinggpu_clamp_and_omod_per_instruction. Two native-wave64 SKIPPED tests, not GPU coverage:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.Not tested
Retail title/smoke, release, other GPUs. No XCL_SAMPLE_* data. Full-suite fixtures use mixed adapters; only the focused texture controls assert one GPU.
AI use
Codex (GPT-6) assisted with inspection, diagnostic overlays, test execution and this report. No changes proposed to the author's fix.
@PHeitor1 on GitHub · 2026-11-24 01:26 UTC · original
Tested
3896e4fmerged ontomain508a0c7.RTX 5060 Ti 8 GB (Blackwell, 32-lane waves), NVIDIA 621.24, Ryzen 5 5600X, Windows 11 Pro 26300 (native, Graphics Tools + XGameRuntime installed), rustc 1.100.0 MSVC, debug,
cargo test --workspace --no-fail-fast -- --test-threads=4, noXCL_SAMPLE_*.Pass: 680 passed, 0 failed, 41 ignored. SKIPPED: only the 2
no wave64tests.placed_title_textures_share_vram_and_preserve_pixelsalone with--nocapture:mainand with this PR, with no SKIPPED line and about 12 s each. The driver makes the reserved cube with mips here, so the new committed-cube branch is not reached, and the packed-mip mapping is a no-op as described.Run and written with Claude Code (Claude Opus 5.5).
@Y0z64 on GitHub · 2026-11-24 01:26 UTC · original
Fixes the 3D packed-mip failure on RDNA2 too: RX 6700S (Navi 22, driver 32.0.21045.29003), Windows 11 26200, debug,
cargo test --workspace --no-fail-fast -- --test-threads=4, noXCL_SAMPLE_*.maina6f5f7a: 673 passed, 3 failed (placed_title_textures_share_vram_and_preserve_pixels+ 2 follow-on), 41 ignored3896e4f: 676 passed, 0 failed, 41 ignored, no SKIPPEDNot tested: smoke.ps1 / retail title. Claude Code (Claude Opus 5.5) ran the tests and wrote this.
@CryingLaughing on GitHub · 2026-11-24 01:27 UTC · original
Exact PR head
3896e4fb97d4971971ab7b178a541170cb96318bpassed the four-thread workspace suite on an RTX 4080. The focused control with the old mapping also passed on this adapter, including the reserved 3D texture's packed mips.Tested
XCL_ADAPTER=4080, allXCL_SAMPLE_*variables unset. A DXGI probe identified adapter zero, used directly by the texture fixture, as the RTX 4080.cargo test -p xcl --lib --locked -j 4 placed_title_textures_share_vram_and_preserve_pixels -- --show-outputpassed 1/1 on the clean PR head and 1/1 with onlyvram.rsrestored to2997c9aca6ebf4577fed34ebdb3cb0a77dd9ec21plus fixture diagnostics. Neither focused run skipped. The control reported tiled resources tier 4 and resource heap tier 2. Its reserved 64×64×64 RGBA8 fixture reported 19 total tiles, two standard mips and two packed mips in one tile starting at tile 18. All mip readbacks matched in both runs.cargo build --workspace --locked -j 4passed on the exact head.cargo test --workspace --locked -j 4 -- --test-threads=4 --show-outputreported 676 passed, 0 failed, 41 ignored. The pass count includes opt-in game-data tests that returned early and four explicit skips.SKIPPEDfor native wave64:gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware.SKIPPEDfor D3D12 debug-layer availability:test_title_draws_with_a_root_signature_under_the_debug_layeranduploads_start_from_each_subresources_state.Not tested
AI use
@yyc160 on GitHub · 2026-11-24 01:33 UTC · original
Tested on Blackwell: the test this PR un-skips passes here.
On
main@2997c9ait SKIPs on my adapter for the same reasonregiumlepidisaw — the driver refuses the 256x256x6 reserved cube:With this PR @
3896e4fthe skip is gone and the test runs to the end:Hardware: RTX 5070 Ti (Blackwell, 32-lane), driver 32.0.16.1742, Windows 11, 32 GB.
cargo test --release -p xcl --lib placed_title_textures -- --nocapture, DXC 1.9.2609.Two observations from that run:
Not tested: one GPU, one driver. I cannot reproduce the RDNA1 case your description is based on. No smoke run — this change is in a test and
vram.rs's page mapping is only reached throughmap_packed_mips, so a title run would not exercise it differently.@yyc160 on GitHub · 2026-11-24 01:40 UTC · original
One more thing after reading
Pages::mapand the scope check.The premise deserves a second look.
mapcallsUpdateTileMappingswithcoord = D3D12_TILED_RESOURCE_COORDINATE::default()(subresource 0, x/y/z 0),region.NumTiles = tiles.len()andUseBox = false. With 19 overall tiles and a linear region, that call is supposed to cover tile 18 — the packed block — the same way it covers 0..17; the linear region runs through the overall tile range. So "mip 2 reads zero after one pass" could also mean the first call does not reach what we think it reaches (heap ranges fromheap_ranges,NumTiles, the coordinate base) rather than the driver refusing to map a packed tile. A second, differently-shaped call fixing it is a valid workaround either way — but the comment states it as a driver bug, and if it is actually our first call, the workaround hides it. Worth confirming on the RDNA1 box by dumpingGetResourceTilingfor the resource and the ranges the first call actually sent.2D arrays are skipped by the early return.
if desc.Dimension != TEXTURE3D && desc.DepthOrArraySize != 1 { return; }lets all 3D through and only single-slice 2D, so a 2D array or a cube with packed mips never gets the second mapping. The comment says an array keeps a packed block per slice — if that is right, each slice needs its own mapping at (first packed mip of that slice, X), which is the same shape as the 3D case, just repeated. Out of scope on purpose, or does the array case not show up on the drivers where the single-slice one does?@alpz1000 on GitHub · 2026-11-24 01:49 UTC · original
Independent NVIDIA check on RTX 3060 12 GB, driver 610.88 (32.0.16.1088), Core i5-8400, Windows 11 Home 26200.9974, Rust 1.100.0 x86_64-pc-windows-msvc, debug.
Tested:
cargo test --locked -p xcl --lib hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels -- --exact --test-threads=1 --nocapture.3896e4fb97d4971971ab7b178a541170cb96318b: 1 passed, 0 failed, 0 ignored, no skip messages.vram.rsrestored from2997c9a, retaining the PR's test changes: 1 passed, 0 failed, 0 ignored, no skip messages.I did not reproduce the AMD packed-mip readback failure on this NVIDIA adapter. The targeted test also stayed green with the extra mapping enabled.
Not tested: full workspace, retail titles, or other adapters.
AI use: OpenAI Codex (GPT-6) ran both local tests and summarized their output.
@DarX-Oren on GitHub · 2026-11-24 01:51 UTC · original
Additional RDNA2 validation — RX 6700 XT
Confirmed that the isolated VRAM mapping change from this PR resolves the packed-mip texture failure on my RX 6700 XT.
Environment:
508a0c7The original test failed at subresource 2 of the 64x64x64 3D texture, returning zeros.
The other two failures passed independently and were associated with poisoned locks.
Applying only the
vram.rschange resolved the failure without modifying the original test assertions.Limitations: Two tests counted as passed skipped their checks because the D3D12 debug layer was unavailable. No commercial game data was used.
AI use: OpenAI Codex (GPT-6) assisted with compilation, investigation and local testing.
@Abdellah-Khanani on GitHub · 2026-11-24 01:59 UTC · original
@yyc160 Thanks, both are fair. I measured on the RX 5700 XT (RDNA1, 32.0.21045.29003), on
3896e4fwith temporary logging inPages::mapand an env switch to leave outmap_packed_mipsin the same build. The temporary code is not in the PR.1. What the first call sends. For the 64x64x64 RGBA8 4-mip texture:
NumTiles = 19, one pool heap,coordsubresource 0 at (0,0,0),UseBox = false, and the ranges fromheap_ranges:That is 1+1+2+1+3+8+3 = 19 tiles, all mapped, no SKIP runs. Overall tile 18 (
StartTileIndexInOverallResourceof the packed block,NumStandardMips2, 1 packed tile) is the last tile of the final(16, 3)run, so heap tile 18. So the first call does name the packed tile; the ranges are not short.map_packed_mips(same build, switch on):3D 64x64x64 4 mips: subresource 2 mismatch, zeros.So with identical heap tiles, this driver applies the linear region to tiles 0-17 but not to the packed block. NVIDIA (several cards above) and RDNA4 (MesshM's run) apply it, so it does depend on the driver. I could not find wording in the D3D12 docs that settles whether a linear
UseBox = falseregion continues into the packed block, so "driver behaviour" is my reading of the measurement, not a spec claim. I can rephrase the comment invram.rsto say what was measured and not call it a driver bug, if you prefer.2. 2D arrays. Out of scope on purpose, because I can't test them here. With a temporary 2D
256x256x4array with 9 mips added to the test's shapes, this driver does not make it reserved either (not reserved on this adapter (committed instead), like the cube), so the per-slice packed case never reachesmap_packed_mipson RDNA1. If an adapter that makes reserved arrays shows the same zeros, the same call per slice should fix it, as you describe. I'd rather do that in a follow-up with a test on hardware that reaches it than ship it untested.@srcamarda on GitHub · 2026-11-24 02:09 UTC · original
Regression run on a retail title, as asked under Regression run.
Tested
scripts/smoke.ps1 -Seconds 90, no input (the title stays on its account screen at 30 fps). Each binary was built from a clean checkout of its commit and run twice; the first run of each has a cold translation cache. Blocks below are from the second run.main508a0c7: 2343 / 2361 frames, peak 15764 / 15674 MB. This PR (3896e4f): 2329 / 2365 frames, peak 15785 / 15683 MB. No crash or device removal in any run.mainbeyond run-to-run spread.Regression run
main:this PR's head:
Not tested
AI use
@H0UNDZER0 on GitHub · 2026-11-24 01:32 UTC · original · edited 2026-11-24 02:20 UTC
Tested on an RTX 5080: pass, the same counts as
main. The title-textures test runs whole and passes, and the new mapping is used on this GPU.Several NVIDIA results are above already. This one adds an RTX 5080 on a release build, with a probe of the 3D texture's tile layout on this driver.
3896e4fb97d4971971ab7b178a541170cb96318b, this PR's head as is (on its base2997c9a), release build.XCL_*variables set.cargo build --release --workspace --locked: OK, the same singlefetch_updatewarning asmain.cargo test --workspace --release --no-fail-fast --locked -- --test-threads=4, run twice (the second with--show-output): 676 passed, 0 failed, 41 ignored both times, the same asmain2997c9aon this PC.SKIPPED: the usual 2,gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no wave64).placed_title_textures_share_vram_and_preserve_pixelspasses in both runs and in 3 of 3 runs alone (--exact). Its output is the same as onmain(512 unreleased 1 MiB textures over 16 MiB: +16777216 B pages (after fill: +0 B), …). There is nonot reserved on this adapterline: this driver makes the reserved cube, so the cube's reuse step still runs.GetResourceTilinggives 19 tiles of 32x32x16, 2 standard and 2 packed mips, and a packed tail of 1 tile at index 18. That is the same split as the RX 5700 XT in the description. Somap_packed_mipsmaps that tile a second time on this GPU, and all 4 subresources of the volume still read back right.Not tested
main. At the time of the run that was7ebf1b8, which changestitle_textures.rs;git merge-treeshowed no conflict with it.scripts/smoke.ps1.AI use: Claude Code (Claude Opus 5.5, Claude Fable 5.2)
@EllissonSB on GitHub · 2026-11-24 03:21 UTC · original
Tested
3896e4f(PR head, behind main) on AMD RX 6650 XT (RDNA2, driver 32.0.21045.29003), Tiled Resources Tier 4, debug build.placed_title_textures_share_vram_and_preserve_pixels: fails on main (3D 64x64x64 4 mips: subresource 2 mismatch, the packed mips read back all zero; a plain reserved 3D resource with one heap mapped straight and the same upload reproduces it, so it is the driver's handling of the packed block, not the page sharing). Passes on this commit.cargo test --workspace --no-fail-fast -- --test-threads=4: 676 passed, 0 failed, 41 ignored.Not run:
scripts/smoke.ps1on a title, other GPUs, the merge with current main, arrays with packed mips.Report written with Claude Code (Claude Sonnet 5.5) from a real run on the hardware above.
@iggyvilla on GitHub · 2026-11-24 04:02 UTC · original
Test run of
3896e4fb97d4971971ab7b178a541170cb96318bon a third RDNA2 card (Navi 23), as is and merged onto currentmaindd2ae9a.Tested
stable-x86_64-pc-windows-msvc, debug; noXCL_SAMPLE_*setcargo build --workspacethencargo test --workspace --no-fail-fast -- --test-threads=4:3896e4f(clean tree): 676 passed, 0 failed, 41 ignored, exit 03896e4fmerged ontomaindd2ae9a(clean merge,title_textures.rsauto-merged): 690 passed, 0 failed, 41 ignored, exit 0SKIPPEDlines in either runplaced_title_textures_share_vram_and_preserve_pixelspasses in both runs. Onmaindd2ae9a(full run on this machine: 687 passed, 3 failed, 41 ignored) this card fails it with3D 64x64x64 4 mips: subresource 2 mismatch(zero readback). Two more tests then fail because the panic poisonsTEST_LOCK/VRAM_TEST_LOCK(transitions_apply_when_their_list_is_submitted,d32s8_targets_take_their_own_size_of_video_memory; each passes on its own; #673 makes those locks survive it). With the PR, all three pass.Not tested
smoke.ps1, no release build.Run and written with Claude Code (Claude Opus 5.5).
@zorde23 on GitHub · 2026-11-24 04:20 UTC · original
Tested on RDNA2 (AMD Radeon RX 6750 XT): the 3D packed-mip failure reproduces here and this PR fixes it, as on the RX 5700 XT.
Hardware / build
stable-x86_64-pc-windows-msvc), debug; DXC 1.8.2502 from Windows SDK 10.0.26100.Tested
3896e4f,cargo test --workspace --no-fail-fast -- --test-threads=4: 676 passed, 0 failed, 41 ignored.cargo test -p xcl --lib placed_title_textures_share_vram_and_preserve_pixelsalone: passes 3 of 3.3896e4fwith736d10ereverted (test change kept,vram.rschange removed), the same test alone: fails 3 of 3 with3D 64x64x64 4 mips: subresource 2 mismatch(mip 2 reads all zero).main91f9a5e(without this PR),cargo test --workspace --no-fail-fast -- --test-threads=4: 690 passed, 3 failed, 41 ignored. The test fails with the same3D 64x64x64 4 mips: subresource 2 mismatch; the other two arePoisonErrorfailures that pass alone.mainf4ce27c(no conflicts): the test passes alone 3 of 3, andcargo test -p xcl --lib -- --test-threads=1gives 660 passed, 0 failed, 21 ignored.cargo test --workspace --no-fail-fast -- --test-threads=4gives 698 passed, 3 failed, 41 ignored: the test panics atcubemap extra_pages must be reused at same va(left 2359296, right 17170432), which comes before the 3D case, so that run does not reach the packed mips. The other two failures are thePoisonErrorcascade #673 addresses.mainf4ce27c, same command: 698 passed, 3 failed, 41 ignored, with the same cubemap assertion (left 2359296, right 2555904) and the same twoPoisonErrorfailures.--test-threads=1, I read the cubemap failure as interference from tests running in parallel, probably the page reclaim #447 describes, not something this PR leaves out. I did not confirm that.SKIPPEDlines in any run; neither the test'stiled tier < 2skip nor its no-reserved-cube path triggered.Not tested
AI use
@bobosneefdev on GitHub · 2026-11-24 07:42 UTC · original
Tested
maina1672efand this PR's head3896e4fon AMD Radeon RX 6800 (RDNA2), driver 32.0.21045.29003; Ryzen 5 5600X3D; Windows 11 Pro 26200; Rust 1.98.1 MSVC; debug.I confirm the root cause is the driver, not the page sharing. Separately from this PR, I reproduced it with no XCL code: a plain reserved 3D texture on one heap, mapped, uploaded with
CopyTextureRegionand read back. Per mip, RGBA8 (✓ = read back intact):totaltiles (whatPages::mapsends)Two things this PR does not cover yet:
("3D 128x128x128 5 mips", console_desc(4, 128, 128, 128, 5, 28, 0x105))to the test's shapes fails with3D 128x128x128 5 mips: subresource 2 mismatch. Re-mapping only the packed block doesn't reach it; each standard subresource needs its own region.Pages::unmaphas the same problem. I mapped each subresource separately, then sentunmap's call (one linear NULL region oftotaltiles): on the 64³ and 128³ textures, mips 2 and up still read back data instead of zero, so those tiles stay mapped.unmap_supersededthen cools them (release_tiles(.., true)), and afterCOOLthey can be given to another texture while the superseded one still maps them. I have not seen this cause a visible problem in a game; it is what the readback shows.Locally, I made
Pages::mapandPages::unmapboth build their regions fromGetResourceTiling: one region per standard subresource, plus one per slice's packed block. They fall back to the single region when the tiling doesn't add up tototal(60 added / 10 removed lines invram.rs). With that change onmain, the test passes with the 128³ shape added. Happy to share the diff here, or open a follow-up once this PR is settled, whichever you prefer.(The occasional
cubemap extra_pages must be reused at same vafailure in full-suite runs is a separate timing issue: #718, with a fix in #447.)Claude Code (Claude Opus 5.5) ran the probes and tests and wrote this comment; I checked it.
@Abdellah-Khanani on GitHub · 2026-11-24 09:47 UTC · original
Thanks, that's a better fix than mine. I reproduced the 128³ case on RDNA1: with
("3D 128x128x128 5 mips", console_desc(4, 128, 128, 128, 5, 28, 0x105))added to the shapes, this PR's head3896e4ffails with3D 128x128x128 5 mips: subresource 2 mismatchon the RX 5700 XT (driver 32.0.21045.29003), the same as your RX 6800. So re-mapping only the packed block covers the shapes in the test, not every 3D texture.Building the regions from
GetResourceTilingin bothmapandunmapfixes the cause, and fixingunmaptoo matters more: tiles that stay mapped and are then handed to another texture are worse than zeros. I'd rather not grow this PR with code I didn't write, so please open it as your own PR, with the 128³ shape in the test. I'll run it on the RX 5700 XT and post the results there. If the maintainers would rather take one PR, I'm also fine closing this one in favour of yours, since yours covers everything this one does.Claude Code (Claude Opus 5.5) ran the test above and helped write this comment; I checked it.
@gutersohn on GitHub · 2026-11-24 09:51 UTC · original
Test run of
3896e4fb97d4971971ab7b178a541170cb96318bon an AMD Radeon RX 6600 (RDNA2, Navi 23, gfx1032), as is and merged onto currentmain9aec53d: the 3D packed-mip failure is gone in both, 0 failed. This card runs an older driver than the RDNA2 results above that name theirs (32.0.21045.16010 vs 32.0.21045.29003).Tested
XCL_ADAPTER=radeon; noXCL_SAMPLE_*setcargo build --workspace+cargo test --workspace --no-fail-fast -- --test-threads=4, clean worktrees:3896e4f(base2997c9a)main9aec53d9aec53d+ this PR (local merge, clean, not committed)mainthe 3 failures areplaced_title_textures_share_vram_and_preserve_pixels(3D 64x64x64 4 mips: subresource 2 mismatch) and the twoPoisonErrorfollow-ons from #673.cargo test -p xcl --lib placed_title_textures_share_vram_and_preserve_pixelsalone, 5 runs each:main0/5, PR head 5/5, merged tree 5/5.SKIPPEDGPU tests on this adapter in any of the three trees (wave64 and mesh available).Not tested
scripts/smoke.ps1(no game data); release build; #673 on this cardAI-assisted: Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
@AlexandreSchuelter on GitHub · 2026-11-24 11:15 UTC · original
RX 6900 XT (RDNA2), Windows, release: the packed-mip failure reproduces on
main384f7f7and is gone with this PR (3896e4f), as-is (636 passed, 0 failed) and merged ontomain(694 passed, 0 failed; the test alone 5/5 passed,main0/5).For the 128³ / unmap follow-up discussed above: #1028 adds that case to the test. It also passes here, and this PR and #1028 merge together without conflicts (694 passed, 0 failed). Full numbers are on #1028.
Not tested: a retail title, the whole workspace suite, debug builds.
AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this comment; the runs are real, on the hardware above.
@RodrigoTorreao on GitHub · 2026-11-24 12:39 UTC · original
Test report on RDNA2: this PR's head
3896e4fmerged locally onto currentmain47efa2e(105 commits ahead of its base; the merge had no conflicts and needed no edits).Tested
XCL_SAMPLE_RPF,XCL_SAMPLE_DLLS,XCL_SAMPLE_TTPF,XCL_SAMPLE_BVH4set to the retail title's filesmain47efa2e,cargo test --workspace --no-fail-fast -- --test-threads=4: 738 passed, 3 failed, 41 ignored, 0 SKIPPEDplaced_title_textures_share_vram_and_preserve_pixels:3D 64x64x64 4 mips: subresource 2 mismatch(mip 2 reads as zeros); the other two failures arePoisonErrorfollow-onsmain+ this PR,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_pixelspasses, including the 3D subresource 2 case, as the test is onmainnow3896e4f,cargo test -p xcl --lib -- hle::d3d12x::title_textures hle::d3d12x::vram: 13 passed, 0 failedSo this PR also fixes the packed-mip readback on RDNA2, not only on the RX 5700 XT.
Not tested
scripts/smoke.ps1run on the retail titleAI use
@RodrigoTorreao on GitHub · 2026-11-24 13:10 UTC · original
Test report on RDNA2 for this PR's head
3896e4f, merged locally onto currentmain47efa2e. That is 105 commits past the PR's base. The merge had no conflicts and needed no edits.On RDNA2 the packed-mip test passes with this PR, so the fix is not specific to the RX 5700 XT. The title runs with it, with no crash and no device removal. The frame-rate comparison with main is within the noise of this machine.
Tested
XCL_SAMPLE_RPF/DLLS/TTPF/BVH4set to the retail title's files,cargo test --workspace --no-fail-fast -- --test-threads=4.main47efa2e: 738 passed, 3 failed, 41 ignored, 0 SKIPPED.placed_title_textures_share_vram_and_preserve_pixels:3D 64x64x64 4 mips: subresource 2 mismatch. Mip 2 reads as zeros.PoisonErrorfollow-ons.main+ this PR, aftercargo build --workspace: 741 passed, 0 failed, 41 ignored, 0 SKIPPED. This is against the test as it is onmainnow.3896e4f,cargo test -p xcl --lib -- hle::d3d12x::title_textures hle::d3d12x::vram: 13 passed, 0 failed.main+ this PR (local merge commit 07b5336),scripts/smoke.ps1 -Seconds 60on the retail title, DXC 1.9.2609 viaXCL_DXC_DIR, warm DXIL cache.pressed, andkeyboard_mouse = falsewas 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 → this PR → #1028.
47efa2eNot tested
3896e4f.AI use
@relativespace2K on GitHub · 2026-11-24 03:40 UTC · original · edited 2026-11-25 04:09 UTC
Tested -
3896e4fonmain3da2abb, retail GTA6 1.0.2.1Tool: OpenCode with DeepSeek V4.1 Flash 1017
1,831 frames, peak 31,973 MB committed, 0 failed pipelines, 0 DXIL failures.
main, 13 console-only IIDs, 10 stubs; 19,2xx unique shaders.main3da2abbitself: 360 s, exit 0, peak 32,880 MB - the oldgame+0x23cf683streamingcrash seen on
b7aa9f3does not reproduce on this main.Tested - #470 + #673 together on AMD RDNA2
main91f9a5e+ #4703896e4f+ #67384b6645(cherry-picks
736d10e,3896e4f,84b6645, not committed; not either PR's head).Windows 11 IoT Enterprise LTSC 26100; Rust 1.100.0
stable-x86_64-pc-windows-msvc;DXC 1.9.2602.17 (Windows SDK 10.0.26100.0); debug; no
XCL_SAMPLE_*.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4.main63cdc25(one README commit before91f9a5e)84b6645main91f9a5e+ #470 + #673SKIPPEDGPU tests;placed_title_textures_share_vram_and_preserve_pixels --exactpasses (1.95 s).mainfailures are gone: the packed-mip mismatch and the twoPoisonErrorfollow-ons.Not tested: retail title /
smoke.ps1, release build, NVIDIA / Intel.AI use: OpenCode with DeepSeek V4.1 Flash 1017 ran the tests and drafted this report.
@DavidM1911 on GitHub · 2026-11-25 14:05 UTC · original
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!
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.