Repository navigation
Recompiler: typed buffer loads read the channels a format lacks as RDNA2 does (#1414) - #1423
tiagonogueiraa-bit wants to merge 1 commit into
Conversation
…NA2 does (xcl-dev#1414) Measured on gfx1036 over all buffer formats (xcl-dev#1414): - tbuffer_load_format_* reads 0 in every channel its format lacks, the 4th too. fmt_comp gave 1 / 1.0 for a missing 4th channel. - buffer_load_format_* with an X..W selector on a channel the format lacks reads channel `sel mod n` of the format: (x, x, x, x), (x, y, x, y), (x, y, z, x) for 1, 2 and 3 channels. XCL gave 0 and 1. ZERO / ONE selectors were already right. fmt_comp now returns 0 for a missing channel, and buffer_load_format passes the V#'s selectors through mubuf_sel. MTBUF keeps applying the V#'s DST_SEL here; xcl-dev#875 changes that. gpu_typed_buffer_loads_and_stores: case B (16_16_FLOAT, identity) now expects (1, -2, 1, -2). New cases G (32_FLOAT), H (32_32_32_FLOAT) and I (tbuffer 32_32_32_FLOAT, 4th channel 0) all fail on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Native Windows GPU test report for
|
| Case | Base 930e8b4, lane 0 |
PR 7c6a1b9, verified across all 64 lanes |
|---|---|---|
B · MUBUF 16_16_FLOAT |
(1, -2, 0, 1) |
(1, -2, 1, -2) |
G · MUBUF 32_FLOAT |
(2.5, 0, 0, 1) |
(2.5, 2.5, 2.5, 2.5) |
H · MUBUF 32_32_32_FLOAT |
(4, 2, 3, 1) |
(4, 2, 3, 4) |
I · MTBUF 32_32_32_FLOAT |
(4, 2, 3, 1) |
(4, 2, 3, 0) |
Tested
- Windows 11 25H2 (26200.9974), Ryzen 7 9800X3D, GeForce RTX 5090 (driver 617.42), Rust 1.100.0 MSVC, DXC 1.8.2502.11.
cargo test --locked -p xcl --lib gpu_typed_buffer_loads_and_stores -- --nocapture --test-threads=1passed on clean head7c6a1b9e5b7ef22e9c5076ea5c8de8007b590c8e. For the baseline, I copied only the updated test function to930e8b49c1c2ec683d22c724a398b39111cd0e56and added the lane-0 readback above.cargo build --workspace --lockedandcargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-outputpassed on the PR head. Cargo reported 751 passed, 0 failed, 41 ignored, including the synthetic end-to-end title. The pass count includes two GPU skips for lack of native wave64:gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware.
Not tested
- Retail-title smoke runs, native wave64, and formats outside the test fixture.
AI use
- OpenAI Codex (GPT-6, exact model variant unavailable) ran the tests and prepared this report.
|
Thank you, @nnonno91! The base-vs-head table across B / G / H / I is exactly the evidence this needed. It's in Tested, and the PR is marked ready for review. Written with Claude Code (Claude Opus 5.5). |
…in-place vtables Integrates 16 upstream PRs (ivall#1380, ivall#1383, ivall#1384, ivall#1395, ivall#1398, ivall#1400, ivall#1404, ivall#1405, ivall#1419, ivall#1420, ivall#1421, ivall#1423, ivall#1424, ivall#1427, ivall#1428, ivall#1429) on top of the Linux/Proton fork, plus three Proton/vkd3d-proton fixes caught during verification: - Recompiler (ivall#1428): flatten IO_GROUP_LIMIT early-return in compute shaders so vkd3d-proton v3.1 dxil-spirv accepts the emitted CFG. - D3D12.X (ivall#1395 + ivall#867): skip UnadoptGuard on in-place-patched vtables and restore native vtables in runner::submit_list when a prior test adopted the singleton ID3D12Device. - Tests: match Wine centered default in window_position_modes. Verified under GE-Proton11-14 (RX 9060 XT / RADV): - gpu_sparse_vram_descriptors_buffers_and_xmem + gpu_valu_float_and_int + window_position_modes: 3 passed, 0 failed - Broad sweep (present, real, sparse, clamp, dstorage, gpu_valu, gpu_typed_buffer): 82 passed, 0 failed, 1 ignored, 0 skipped - 2.5 min retail title run (XCL_MEM_LIMIT=12G): 3,000+ frames at 30.0 fps, 6.0-6.1 GB flat committed RAM, 6.4 GB local VRAM, 0 DS failures.
Hardware test report — commit
|
|
Tested on Windows 11 + NVIDIA GeForce RTX 3060 Ti (8 GB, wave32), including a 60 s retail regression smoke run on clean head Tested
Regression run PR head ( Not tested: debug build, AI use: Antigravity ( |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Thank you, @eizispark and @LocranKing! Both suites are in Tested, and LocranKing's Written with Claude Code (Claude Opus 5.5). |
Typed buffer loads read the channels a format lacks the way @Lyrnc measured on gfx1036 (RDNA2) over all buffer formats in #1414:
tbuffer_load_format_*reads 0 in every missing channel, the 4th too.fmt_compgave 1 / 1.0 for a missing 4th channel.buffer_load_format_*with an X..W selector on a missing channel reads channelsel mod nof the format:(x, x, x, x),(x, y, x, y)and(x, y, z, x)for 1, 2 and 3 channels. XCL gave 0 / 1. ZERO / ONE selectors were already right.Fixes points 1 and 3 of #1414. Point 2 (MTBUF ignoring the V#'s
DST_SEL) is #875, which this leaves alone.What is in it
crates/xcl/src/gpu/recomp/emit.rs:fmt_compreturns 0 for a missing channel.mubuf_selmaps an X..W selector to4 + (sel - 4) % n.BufKind::FormatLoadpasses the V#'s selectors through it forENC_MUBUF(d16 forms included).crates/xcl/src/gpu/recomp/tests.rs,gpu_typed_buffer_loads_and_stores:16_16_FLOAT, identity) now expects(1, -2, 1, -2), as Recompiler: typed buffer loads past the format and dst_sel differ from RDNA2 (tbuffer reads 0 and ignores dst_sel) #1414 predicts for 2-channel formats.buffer_load_format_xyzwof32_FLOATreads(x, x, x, x).buffer_load_format_xyzwof32_32_32_FLOATreads(x, y, z, x).tbuffer_load_format_xyzwof32_32_32_FLOATreads a 4th channel of 0.(x, 0, 0, 1),(x, y, z, 1)andw = 1.0onmain.Tested
cargo check -p xcl --lib --tests --target x86_64-pc-windows-msvc, no errors (C code stubbed, nothing linked).mainand on this branch. That was by reading it, not by running it.7c6a1b9(report):cargo test --workspace --locked --no-fail-fast -- --test-threads=4: 751 passed, 0 failed, 41 ignored, with SKIPPED (no wave64)gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware.gpu_typed_buffer_loads_and_storespasses in all 64 lanes. Copied onto930e8b4, it fails at case B, and lane 0 reads the old results: B(1, -2, 0, 1), G(2.5, 0, 0, 1), H(4, 2, 3, 1), I(4, 2, 3, 1).b7aa9f3: 751 passed, 0 failed, 41 ignored, no GPU skips. That includesgpu_typed_buffer_loads_and_storesand the native-wave64 tests. (report)cargo test --workspace --release, 751 passed, 0 failed, 41 ignored. (report)Regression run
By @LocranKing:
scripts/smoke.ps1, 60 s, RTX 3060 Ti, unedited, from the report.main:
PR:
Not tested
sel mod nrule is the issue's reading of 1, 2 and 3 channels with the identity and X↔Y selectors.Overlaps
#875 and #1310 change the same lines of
BufKind::FormatLoad; whichever merges later rebases. #1310'sfmt_selis a different helper frommubuf_sel.AI use
🤖 Generated with Claude Code