Recompiler: route 32_32_UINT MUBUF stores by DST_SEL #2808
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2818"
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?
Imported from ivall/xcl. Originally posted by CryingLaughing on 2026-11-26T14:23:31Z.
Part of #1414.
For non-D16 MUBUF
BUFFER_STORE_FORMAT_XYZWwith32_32_UINT, the buffer descriptor selects which two input words reach memory. The current translators always take the first two. Apply the measured desktop RDNA2 routing before packing both translated forms.What is in it
gpu/recomp/emit.rsandgpu/dxil/lower_mem.rs. Preserve the existing order for reserved selectors, and leave the MTBUF and other format paths unchanged.gpu/recomp/tests.rsthat also checks neighboring formats, bounds and guard words.Tested
Head
138e36d6f56e3b6112bf0fa935a9147e9eb5d71conb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7. RTX 4080 driver 621.01, i5-13600K, Windows 11 25H2 build 26200.9974, Rust 1.100.0 x64 MSVC, DXC 1.8.2502.11, debug.gpu_mubuf_u32x2_xyzw_store_selects_channelsfailed 0/1/0 at the intended XYZW assertion on the base with the test overlay, in both HLSL and direct DXIL. Both translators stored(17,34)instead of(17,68). The patched fixture passed 1/0/0 in each mode over all 13 cases with no capability skips.cargo build --workspace --locked -j 4succeeded.cargo test --workspace --locked -j 4 --no-fail-fast -- --test-threads=4 --show-outputreported 1,436 passed, 0 failed, 47 ignored across 37 harnesses. The pass count includes 29 capability skips.Independent RTX 5070 Ti Laptop verification covered all 13 cases in wave32 and in the upper half of split wave64, through both translators. Windows GPU check
Independent RX 9070 verification under Wine passed all 13 cases in native wave32 and wave64. A test-only multilane fixture found zero output or guard mismatches on the head across HLSL, direct plain, and direct compact. AMD GPU check
Independent Windows 10 build 19045 verification on exact
138e36d6f56e3b6112bf0fa935a9147e9eb5d71cused an RTX 3090 Ti on driver 621.40 and passed all 13 Wave32 raw-memory cases through HLSL and direct DXIL. Each reported 1 passed, 0 failed, 0 ignored, with no capability skips. Independent Ampere checkRegression run
Independent retail smoke by Anon64 compared release builds of main and this exact head on an RTX 3060 12 GB (driver 581.80), Core i9-14900KF, and Windows 11 build 26200. The 60-second runs used the same title. The head retained 102.3% of the baseline frames and used 88.3% of its peak commit, with zero crashes or device removals. The run did not establish whether the title reached the changed code.
main:
PR:
Not tested
Imported from ivall/xcl. Originally posted by ettehn on 2026-11-26T14:37:20Z.
Independent Windows GPU check on
138e36d6f56e3b6112bf0fa935a9147e9eb5d71c: RTX 5070 Ti Laptop (driver 621.24), Windows 11 x64 (build 26200), Rust 1.97.1 MSVC and DXC 1.8.2502.11.XCL_DIRECT_DXIL=0) and direct DXIL (=1).EXEC_LO=0,EXEC_HI=1). This checks the upper half of the split, including the guard words and out-of-bounds case. The extension used the existing split-wave options and did not change translator code.Each backend invocation reported 1 passed, 0 failed, 0 ignored and no capability skips. Command:
cargo test --locked --offline -p xcl --lib -j 2 gpu_mubuf_u32x2_xyzw_store_selects_channels -- --test-threads=1 --nocapturewithXCL_ADAPTER=NVIDIAandXCL_REQUIRE_GPU=wave64. No retail smoke run.OpenAI Codex (6.2sol) assisted with verification.
Imported from ivall/xcl. Originally posted by SzczepanGrela on 2026-11-26T14:44:59Z.
RX 9070 / Wine verification, including native Wave32/Wave64 and concurrent per-lane stores.
Tested
138e36d6f56e3b6112bf0fa935a9147e9eb5d71cagainst mainb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7.8293130ebe370b1+(local asserts-disabled build), DXC/DXIL 1.9.2602.17, Rust 1.97.1, releasex86_64-pc-windows-gnu.XCL_REQUIRE_GPU=wave64,XCL_NETWORK=0, private caches. These tests execute native waves; split is disabled in the local extension.Original fixture
gpu::recomp::tests::gpu_mubuf_u32x2_xyzw_store_selects_channels, three fresh processes per revision/backend:XCL_DIRECT_DXIL=0) and direct DXIL (=1).wave64 XYZWassertion:(17,34)instead of(17,68). Its later rows/wave are not reached in this fixture.Main imports the upstream test with only its new format-constant import replaced by literal 62 inside the test. Production code remains unchanged.
Local multilane fixture
Both source copies additionally receive identical
gpu_mubuf_u32x2_multilane_guard_readback. It retains the 13 upstream expected routes, adds distinct inputs for each lane and disjoint 32-byte output slots through OFFEN, and checks the complete 26 KiB memory image. This includes guard words, inactive-lane slots, reserved selectors, MTBUF, neighboring formats and the out-of-bounds row.Every mode runs through HLSL/DXC, direct plain and direct compact, with DXIL validation before dispatch. Three fresh processes per revision give identical results on all three paths:
Main differs only in rows
XYZW,XYZ1,YX01,YZZ1,Y001. The remaining eight rows match. Guard/inactive/out-of-bounds checks report zero unexpected writes on both revisions. The local test reports head 1/0/0 versus main 0/1/0; main's final assertion collects all 12 mode/path results before failing.Existing
gpu_typed_buffer_loads_and_storesandgpu_grouped_loads_bounds_and_inactive_laneseach pass separately on both revisions withXCL_DIRECT_DXIL=0and1.All 26 process summaries, 72 local mode/path records, 12 upstream head wave records, exact main failures, source reconstruction and executable hashes were independently checked. No runtime skips or ignored tests. Removing the disclosed test insertions reconstructs the exact original sources on both sides.
Build:
cargo test --offline --locked --release --target x86_64-pc-windows-gnu -p xcl --lib --no-run. Invocation: GE-Proton Wine,<libtest.exe> gpu::recomp::tests::<test> --exact --nocapture --test-threads=1. The local fixture explicitly selects all three translator paths.Not tested
Independent native Xbox/RDNA2 instruction measurements, selectors outside the upstream fixture, forced split execution here, native Windows, other GPUs, full workspace suite, retail workload,
scripts/smoke.ps1, performance or FPS. These translated-kernel checks use the PR fixture's expected channel routing.AI use
OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the diff, wrote the local multilane fixture, ran and independently verified the paired tests, and drafted this report. Publication authorized by the account owner.
Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-26T14:55:38Z.
Regression run of
138e36don a newer retail title: no device removal, no crash, frames and commit within the limits.Setup: RTX 3060 12 GB (NVIDIA 581.80), i9-14900KF, Windows 11 26200, release builds of main
b49be18(this PR's base) and of this PR's exact head,scripts/smoke.ps1 -Game <title>for 60 s withXCL_NETWORK=0and A pressed every 4 s from 20 s. Main ran before and after this PR and peaked at 24,953 and 25,032 MB.main:
this PR:
102 % of main's frames, 88 % of its peak commit. One run each.
Not tested: the suite on this head; whether the title reaches the code this PR changes in its first 60 s; AMD.
AI use: Claude Code (Claude Opus 5.5) ran these runs on this machine and wrote this report.
Imported from ivall/xcl. Originally posted by GodlyBDS on 2026-11-26T16:04:46Z.
Independent Ampere check on exact head
138e36d6f56e3b6112bf0fa935a9147e9eb5d71c, RTX 3090 Ti / driver 621.40, Windows 10 19045, Agility v620, Rust 1.98.1 MSVC and DXC 1.8.2502.11. The fixture identified the 3090 Ti and ran all 13 Wave32 rows in both HLSL (XCL_DIRECT_DXIL=0) and direct DXIL (=1). Each returned 1 passed, 0 failed, 0 ignored and zero capability skips.cargo test --offline --locked -j 30 -p xcl --lib gpu_mubuf_u32x2_xyzw_store_selects_channels -- --test-threads=1 --nocapturewithXCL_ADAPTER=3090 Ti. This covers the focused raw-memory regression on Windows 10 Ampere. Retail execution and the split-wave64 extension are outside this check. OpenAI Codex (GPT-6 family) ran the tests and drafted this report.Imported from ivall/xcl. Originally posted by Smokeyqdqd on 2026-11-26T16:58:51Z.
RTX 3060 parent/head comparison for the Wave32 channel-store test. On the parent, the HLSL path wrote
0x22into the second channel of theXYZWcase (expected0x44). Direct DXIL passed on the same parent. Both paths passed all 13 cases on the PR head.Tested
Windows 11 build 26200, Ryzen 7 5800X, RTX 3060 12 GB, driver 610.88, rustc 1.100.0 MSVC, debug. With
XCL_ADAPTER=3060, I rancargo test --offline --locked -p xcl --lib -- gpu_mubuf_u32x2_xyzw_store_selects_channels --test-threads=1 --nocaptureonce per revision and backend.XCL_DIRECT_DXIL=0)XCL_DIRECT_DXIL=1)b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7138e36d6f56e3b6112bf0fa935a9147e9eb5d71cFor the parent run I copied the PR test and defined its format constant (
62) inside the test. Production code was unchanged. All four runs had 0 ignored and zeroSKIPPEDlines.Not tested: full workspace suite, wave64 or retail gameplay in this comparison.
AI use: Codex (GPT-6.2 Astra) ran the tests, checked the logs and drafted this report.
Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-26T17:16:34Z.
Ran the MUBUF channel-routing regression at
138e36d6on an NVIDIA Blackwell desktop part:Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5, debug build.
The single test covers all 13 cases (the selected channel pairs, reserved selectors, MTBUF, neighboring formats and the out-of-bounds guard) and ran on this adapter with DXC 1.9.2609.5. ettehn reported the same head on an RTX 5070 Ti Laptop (12 GB, driver 621.24, rustc 1.97.1, DXC 1.8.2502.11); this adds the desktop 16 GB part on driver 32.0.16.2124 with rustc 1.100.0 and DXC 1.9.2609.5.
Not tested: native wave64 (this part only has 32-lane waves), the full workspace suite, a paired smoke run, AMD and Intel GPUs, Wine, release profile, game data.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
Imported from ivall/xcl. Originally posted by relativespace2K on 2026-11-26T18:14:24Z.
Tested - retail title and GPU tests on native Windows AMD RDNA2, PR head
138e36d6f56e3b6112bf0fa935a9147e9eb5d71conmainb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7Tool: OpenCode with DeepSeek V4.1 Flash 1017
Windows 11 IoT Enterprise LTSC 26100; release build; DXC 1.9.2602.17.
cargo test --release -p xcl --lib -- gpu_mubuf_u32x2_xyzw_store_selects_channels --nocapture,default backend: 1 passed, 0 failed, 0 ignored, 0 skipped; printed
backend=hlsl wave=64 rows=13andbackend=hlsl wave=32 rows=13, adapter RX 6800 XT.XCL_DIRECT_DXIL=1: 1 passed, 0 failed, 0 ignored, 0 skipped; printedbackend=direct wave=64 rows=13andbackend=direct wave=32 rows=13. Both translation pathsthe PR changes were exercised on this part.
XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_FRAME_DUMP=1 XCL_RUN_SECONDS=240, no other XCL_* variables;warm shader/pipeline caches;
mainfirst, PR second.empty V#mainBoth trees stop presenting at the same point (about 128 s) and remain on the loading screen, so
there is no world or FPS comparison. The peak commit figures are post-stall driver-compile
transients (main 238 s, PR 211 s); at 178 s they are 39,635 MB and 31,497 MB. The PR ran colder
(64 DXIL misses against 8) because its changed channel routing gives several shaders new cache
keys, so the presents and peak differences are not a measured effect of the routing change.
No crash, no error, 0 failed pipelines, 0 DXIL failures; 40 mesh refusals, 1
empty V#warning and7,445 MB sparse on both trees.
Not tested: direct-DXIL game run (the synthetic test covers that path), world/FPS (never
reached), NVIDIA/Intel GPUs, full workspace, debug build.
AI use: OpenCode with DeepSeek V4.1 Flash 1017 ran the tests, read the logs and wrote this comment; the counts and per-run figures were checked against the logs.
Pull request closed