Recompiler: tbuffer_load_format_* ignores the V#'s DST_SEL #869

Open
mastrr9 wants to merge 1 commit from upstream-pr/875 into main
mastrr9 commented 2026-11-24 07:12:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by mastrr9 on 2026-11-24T07:12:15Z.


Fixes FormatLoad in crates/xcl/src/gpu/recomp/emit.rs so tbuffer_load_format_* (ENC_MTBUF) uses the identity component select (x, y, z, w) instead of applying the V#s DST_SELfield (dword3[11:0]`):

  • Per the RDNA2 ISA Buffer Data table, buffer_*_format takes both its format and DST_SEL from the V#, whereas tbuffer_*_format takes its format from the instruction and uses the identity select.
  • Previously, tbuffer_load_format_* through a V# with a swizzled DST_SEL returned reordered components, and a SEL_0 V# returned all zeros.
  • buffer_load_format_* continues to apply dst_sel(); stores and (0, 0, 0, 1) missing-component fill are unchanged.
  • Adds translation test tbuffer_load_ignores_vsharp_dst_sel and GPU test gpu_tbuffer_load_identity_dst_sel verifying both swizzled 8_8_8_8_UINT and SEL_0 16_16_FLOAT V#s.

Tested

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

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

main:

xcl-smoke v1
commit: 4178e888c0b5be50a2887eda45cdb832763b68a4
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14831 MB

PR:

xcl-smoke v1
commit: 077de0d9e6ebec78456e2177959f3e9283071934
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1614 (PresentX 1614)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14814 MB

Tester's setup and limits: AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, cargo build --release -p xcl, 60 s, XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.

Tester's AI use: Claude Code (Claude Opus 5.5) built both trees and ran scripts/smoke.ps1; the tester checked the blocks before posting.

Not tested

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

AI use

  • Authored with Claude Code (Claude Opus 5.5); reviewed, audited, and verified on native Windows/RTX 5080 hardware with Antigravity (Gemini 4 Neon + Claude Sonnet 5.5).
  • Claude Code (Claude Sonnet 5.5) added the community regression run to this description and updated the lines that it made out of date or that the PR check requires.
<!-- greyfinch-sync:ivall/xcl:issue:5467774336 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/875). Originally posted by [mastrr9](https://github.com/mastrr9) on 2026-11-24T07:12:15Z. --- Fixes `FormatLoad` in `crates/xcl/src/gpu/recomp/emit.rs` so `tbuffer_load_format_*` (`ENC_MTBUF`) uses the identity component select `(x, y, z, w)` instead of applying the V#`s `DST_SEL` field (dword3 `[11:0]`): - Per the RDNA2 ISA Buffer Data table, `buffer_*_format` takes both its format and `DST_SEL` from the V#, whereas `tbuffer_*_format` takes its format from the instruction and uses the identity select. - Previously, `tbuffer_load_format_*` through a V# with a swizzled `DST_SEL` returned reordered components, and a `SEL_0` V# returned all zeros. - `buffer_load_format_*` continues to apply `dst_sel()`; stores and `(0, 0, 0, 1)` missing-component fill are unchanged. - Adds translation test `tbuffer_load_ignores_vsharp_dst_sel` and GPU test `gpu_tbuffer_load_identity_dst_sel` verifying both swizzled `8_8_8_8_UINT` and `SEL_0` `16_16_FLOAT` V#s. **Tested** - Hardware/OS: NVIDIA RTX 5080 (driver `617.42` / `32.0.16.1742`), Windows 11 Pro 25H2 (`26200.9974`), `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC debug, DXC Windows SDK `10.0.26100.0`, `d3d12SDKLayers.dll` installed - Commit tested: `54ed7eb4bdbd9e205612e807e9b05f0c450ef2ac` - `cargo build --workspace`: clean (no new warnings; only pre-existing `fetch_update` deprecation warning) - `cargo test --workspace -- --test-threads=4`: **715 passed, 0 failed, 41 ignored** (`tbuffer_load_ignores_vsharp_dst_sel` ok, `gpu_tbuffer_load_identity_dst_sel` ok) - `SKIPPED` GPU tests: `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64` **Regression run** Smoke run by @Toons29 in comment below: https://github.com/xcl-dev/xcl/pull/875#issuecomment-7151561754 Contributed by a community tester; the PR author did not run it. Both blocks are pasted as posted. main: ``` xcl-smoke v1 commit: 4178e888c0b5be50a2887eda45cdb832763b68a4 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1618 (PresentX 1618) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14831 MB ``` PR: ``` xcl-smoke v1 commit: 077de0d9e6ebec78456e2177959f3e9283071934 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1614 (PresentX 1614) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14814 MB ``` Tester's setup and limits: AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, `cargo build --release -p xcl`, 60 s, `XCL_NETWORK=0`. This is a regression check only: it does not show whether the run reaches the code this PR changes. Tester's AI use: Claude Code (Claude Opus 5.5) built both trees and ran `scripts/smoke.ps1`; the tester checked the blocks before posting. **Not tested** - No retail title was available to the author; whether the community regression run above reaches the code this PR changes is not known. - AMD RDNA / wave64 hardware not tested. **AI use** - Authored with Claude Code (Claude Opus 5.5); reviewed, audited, and verified on native Windows/RTX 5080 hardware with Antigravity (Gemini 4 Neon + Claude Sonnet 5.5). - Claude Code (Claude Sonnet 5.5) added the community regression run to this description and updated the lines that it made out of date or that the PR check requires.
SlopTart commented 2026-11-24 09:07:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-24T08:09:10Z.


Linux / AMD RDNA3 datapoint.

Merged state: head 54ed7eb onto main 1ec4c98, clean merge.

Full suite, cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 707 passed, 10 failed, 41 ignored. Failures = the known Wine-lane set from my #42 rows plus #718 trio members and a hit of gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes (new flake, see #718 addendum). tbuffer_load_format_* DST_SEL tests green on RDNA3 wave64.

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

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

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

<!-- greyfinch-sync:ivall/xcl:comment:7125787476 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/875#issuecomment-7125787476). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-24T08:09:10Z. --- Linux / AMD RDNA3 datapoint. **Merged state:** head `54ed7eb` onto main `1ec4c98`, clean merge. **Full suite, `cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4`:** **707 passed, 10 failed, 41 ignored**. Failures = the known Wine-lane set from my #42 rows plus #718 trio members and a hit of `gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes` (new flake, see #718 addendum). `tbuffer_load_format_*` DST_SEL tests green on RDNA3 wave64. **Not tested:** retail titles (none here), Windows, RDNA4. Counts only, no game data. **Machine:** RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross `x86_64-pc-windows-gnu`, `XCL_NETWORK=0`, release profile, `--test-threads=4`. My Linux rows: #42 / #718. AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
hkgamingdk231-prog commented 2026-11-24 10:04:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by hkgamingdk231-prog on 2026-11-24T09:44:06Z.


Test report for head 077de0d9e.

Setup

  • Each PR's diff applied on main 077ce40 (all applied cleanly), debug build, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17.
  • cargo test -p xcl --lib -- gpu::recomp --test-threads=4, once with XCL_ADAPTER=radeon and once with XCL_ADAPTER=3060.
    • AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010: waves 32..64, so wave64 programs run in native 64-lane waves.
    • NVIDIA RTX 3060 (Ampere), driver 32.0.16.1088: 32 only, so wave64 programs run in the split form.
  • Not run per PR: the whole workspace suite (the recompiler tests only) and a retail smoke run.

Tested: pass on both GPUs, including AMD RDNA hardware with native wave64.

  • RX 9070 XT (native wave64): 190 passed, 0 failed, 18 ignored, 0 SKIPPED. gpu_tbuffer_load_identity_dst_sel ok.
  • RTX 3060 (split wave64): 190 passed, 0 failed, 18 ignored, 2 SKIPPED (no wave64). gpu_tbuffer_load_identity_dst_sel ok.

Not tested: the retail smoke run this draft still needs.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7127815903 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/875#issuecomment-7127815903). Originally posted by [hkgamingdk231-prog](https://github.com/hkgamingdk231-prog) on 2026-11-24T09:44:06Z. --- Test report for head `077de0d9e`. **Setup** - Each PR's diff applied on `main` `077ce40` (all applied cleanly), debug build, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17. - `cargo test -p xcl --lib -- gpu::recomp --test-threads=4`, once with `XCL_ADAPTER=radeon` and once with `XCL_ADAPTER=3060`. - AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010: waves 32..64, so wave64 programs run in native 64-lane waves. - NVIDIA RTX 3060 (Ampere), driver 32.0.16.1088: 32 only, so wave64 programs run in the split form. - Not run per PR: the whole workspace suite (the recompiler tests only) and a retail smoke run. Tested: pass on both GPUs, including AMD RDNA hardware with native wave64. - RX 9070 XT (native wave64): 190 passed, 0 failed, 18 ignored, 0 SKIPPED. `gpu_tbuffer_load_identity_dst_sel` ok. - RTX 3060 (split wave64): 190 passed, 0 failed, 18 ignored, 2 SKIPPED (no wave64). `gpu_tbuffer_load_identity_dst_sel` ok. Not tested: the retail smoke run this draft still needs. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
Toons29 commented 2026-11-25 03:06:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T03:04:21Z.


Regression run of 077de0d9 on the retail title, for this PR's Regression run section. Both blocks are from scripts/smoke.ps1 as printed, not edited: main on 4178e888, this PR on its head commit with no uncommitted changes, same title and time.

xcl-smoke v1
commit: 4178e888c0b5be50a2887eda45cdb832763b68a4
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14831 MB
xcl-smoke v1
commit: 077de0d9e6ebec78456e2177959f3e9283071934
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1614 (PresentX 1614)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14814 MB

Against the limits in CONTRIBUTING.md: 100 % of main's frames, 100 % of its peak commit, no crash, no device removal.

AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, cargo build --release -p xcl, 60 s, XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.

AI use: Claude Code (Claude Opus 5.5) built both trees and ran scripts/smoke.ps1; I checked the blocks before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7151561754 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/875#issuecomment-7151561754). Originally posted by [Toons29](https://github.com/Toons29) on 2026-11-25T03:04:21Z. --- Regression run of `077de0d9` on the retail title, for this PR's **Regression run** section. Both blocks are from `scripts/smoke.ps1` as printed, not edited: `main` on `4178e888`, this PR on its head commit with no uncommitted changes, same title and time. ``` xcl-smoke v1 commit: 4178e888c0b5be50a2887eda45cdb832763b68a4 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1618 (PresentX 1618) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14831 MB ``` ``` xcl-smoke v1 commit: 077de0d9e6ebec78456e2177959f3e9283071934 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1614 (PresentX 1614) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14814 MB ``` Against the limits in CONTRIBUTING.md: 100 % of `main`'s frames, 100 % of its peak commit, no crash, no device removal. AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, `cargo build --release -p xcl`, 60 s, `XCL_NETWORK=0`. This is a regression check only: it does not show whether the run reaches the code this PR changes. AI use: Claude Code (Claude Opus 5.5) built both trees and ran `scripts/smoke.ps1`; I checked the blocks before posting.
JJAutoCompare commented 2026-11-25 04:10:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T03:59:42Z.


Intel Arc A770 verification for XCL PR #875

Tested

  • The open PR #875 and the clean detached worktree both matched 077de0d9e6ebec78456e2177959f3e9283071934 before and after the tests. I read upstream AGENTS.md and CONTRIBUTING.md at main cbc296ab65a2661a61e3e2da109134bcd5319f60. I found no equivalent Arc result for this head in the live PR discussion or GPU results issue #42.
  • STOR-WINLAB, Windows 11 Enterprise Evaluation 25H2 build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust and Cargo 1.100.0 (x86_64-pc-windows-msvc), unoptimized test profile with debuginfo disabled. Both fixtures logged DXC 1.9.2609.5 (01b62ad4) and DXIL 1.9.2609.5 loaded from XCL_DXC_DIR.
  • Prebuild ran outside the Arc mutex with CARGO_TARGET_DIR=L:/XclTooling/pr1512-tiling-edges-fddfa267/target, CARGO_BUILD_JOBS=2, CARGO_INCREMENTAL=0, CARGO_PROFILE_DEV_DEBUG=0, and CARGO_PROFILE_TEST_DEBUG=0. TEMP and TMP pointed at the temp directory beside this report. Cargo exited 0 in 1m 17s with one fetch_update deprecation warning.
cargo test --locked -p xcl --lib --no-run
$exe = 'L:/XclTooling/pr1512-tiling-edges-fddfa267/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe'
$env:XCL_DXC_DIR = Join-Path $env:LOCALAPPDATA 'XclTooling/dxc-1.9.2609/bin/x64'
$env:XCL_ADAPTER = 'pr875-no-matching-gpu'
& $exe gpu::recomp::tests::tbuffer_load_ignores_vsharp_dst_sel --exact --nocapture --test-threads=1

# GPU command ran in a separate powershell.exe -NoProfile -ExecutionPolicy RemoteSigned process.
$env:XCL_ADAPTER = 'A770'
& 'L:/XclTooling/Invoke-ArcTest.ps1' -Test {
    & $exe gpu::recomp::tests::gpu_tbuffer_load_identity_dst_sel --exact --nocapture --test-threads=1
}
Fixture Passed Failed Ignored Explicit skips Filtered out Exit Time
tbuffer_load_ignores_vsharp_dst_sel 1 0 0 0 694 0 0.09 s
gpu_tbuffer_load_identity_dst_sel 1 0 0 0 694 0 0.69 s
  • CPU translation checked that emitted HLSL calls dst_sel for MUBUF and uses component order for MTBUF XYZW and D16 XYZ. It also checked the packing expression and compiled the shader with DXC for cs_6_6.
  • The A770 ran the HLSL/DXC cs_6_6 path with split wave64, consistent with the runner’s adapter selection and the same-driver D3D12 capability probe. The fixture checked 16 VGPR words per logical lane across 64 lanes. The 8_8_8_8_UINT MUBUF load returned (3, 2, 1, 4) through a swizzled descriptor and MTBUF returned (1, 2, 3, 4). With all descriptor selects set to SEL_0, MTBUF 16_16_FLOAT returned (1.0, -2.0, 0.0, 1.0) and MUBUF 16_UINT returned zero. The two MTBUF D16 cases checked packed FLOAT words 0xC0003C00, 0x3C000000 and packed UINT word 0x00020001.
  • Separate stdout, stderr and exit-code files for the prebuild, both test executables and the mutex wrapper are beside this report. The GPU wrapper exited 0 and logged lock release at 04:57:59 CET.

Not tested

Direct DXIL, native wave64, other GPU adapters or drivers, unrelated memory behavior, other fixtures, fuzzing, the workspace suite, and retail-title smoke runs.

AI use

T3 Code / Codex (gpt-6.2-sol) verified the live PR, ran the stock fixtures, and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7152430012 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/875#issuecomment-7152430012). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T03:59:42Z. --- # Intel Arc A770 verification for XCL PR #875 **Tested** - The open [PR #875](https://github.com/xcl-dev/xcl/pull/875) and the clean detached worktree both matched `077de0d9e6ebec78456e2177959f3e9283071934` before and after the tests. I read upstream `AGENTS.md` and `CONTRIBUTING.md` at main `cbc296ab65a2661a61e3e2da109134bcd5319f60`. I found no equivalent Arc result for this head in the live PR discussion or [GPU results issue #42](https://github.com/xcl-dev/xcl/issues/42). - STOR-WINLAB, Windows 11 Enterprise Evaluation 25H2 build `26200.9974`, AMD Ryzen 7 3800X, Intel Arc A770 driver `32.0.101.9175`, Rust and Cargo `1.100.0` (`x86_64-pc-windows-msvc`), unoptimized test profile with debuginfo disabled. Both fixtures logged DXC `1.9.2609.5` (`01b62ad4`) and DXIL `1.9.2609.5` loaded from `XCL_DXC_DIR`. - Prebuild ran outside the Arc mutex with `CARGO_TARGET_DIR=L:/XclTooling/pr1512-tiling-edges-fddfa267/target`, `CARGO_BUILD_JOBS=2`, `CARGO_INCREMENTAL=0`, `CARGO_PROFILE_DEV_DEBUG=0`, and `CARGO_PROFILE_TEST_DEBUG=0`. `TEMP` and `TMP` pointed at the `temp` directory beside this report. Cargo exited 0 in 1m 17s with one `fetch_update` deprecation warning. ```powershell cargo test --locked -p xcl --lib --no-run $exe = 'L:/XclTooling/pr1512-tiling-edges-fddfa267/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe' $env:XCL_DXC_DIR = Join-Path $env:LOCALAPPDATA 'XclTooling/dxc-1.9.2609/bin/x64' $env:XCL_ADAPTER = 'pr875-no-matching-gpu' & $exe gpu::recomp::tests::tbuffer_load_ignores_vsharp_dst_sel --exact --nocapture --test-threads=1 # GPU command ran in a separate powershell.exe -NoProfile -ExecutionPolicy RemoteSigned process. $env:XCL_ADAPTER = 'A770' & 'L:/XclTooling/Invoke-ArcTest.ps1' -Test { & $exe gpu::recomp::tests::gpu_tbuffer_load_identity_dst_sel --exact --nocapture --test-threads=1 } ``` | Fixture | Passed | Failed | Ignored | Explicit skips | Filtered out | Exit | Time | |---|---:|---:|---:|---:|---:|---:|---:| | `tbuffer_load_ignores_vsharp_dst_sel` | 1 | 0 | 0 | 0 | 694 | 0 | 0.09 s | | `gpu_tbuffer_load_identity_dst_sel` | 1 | 0 | 0 | 0 | 694 | 0 | 0.69 s | - CPU translation checked that emitted HLSL calls `dst_sel` for MUBUF and uses component order for MTBUF XYZW and D16 XYZ. It also checked the packing expression and compiled the shader with DXC for `cs_6_6`. - The A770 ran the HLSL/DXC `cs_6_6` path with split wave64, consistent with the runner’s adapter selection and the [same-driver D3D12 capability probe](https://github.com/xcl-dev/xcl/issues/42#issuecomment-7148783002). The fixture checked 16 VGPR words per logical lane across 64 lanes. The `8_8_8_8_UINT` MUBUF load returned `(3, 2, 1, 4)` through a swizzled descriptor and MTBUF returned `(1, 2, 3, 4)`. With all descriptor selects set to `SEL_0`, MTBUF `16_16_FLOAT` returned `(1.0, -2.0, 0.0, 1.0)` and MUBUF `16_UINT` returned zero. The two MTBUF D16 cases checked packed FLOAT words `0xC0003C00`, `0x3C000000` and packed UINT word `0x00020001`. - Separate stdout, stderr and exit-code files for the prebuild, both test executables and the mutex wrapper are beside this report. The GPU wrapper exited 0 and logged lock release at `04:57:59 CET`. **Not tested** Direct DXIL, native wave64, other GPU adapters or drivers, unrelated memory behavior, other fixtures, fuzzing, the workspace suite, and retail-title smoke runs. **AI use** T3 Code / Codex (`gpt-6.2-sol`) verified the live PR, ran the stock fixtures, and wrote this report.
DavidM1911 commented 2026-11-25 10:10:42 +00:00 (Migrated from github.com)

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


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

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

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7159136856 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/875#issuecomment-7159136856). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T10:02:15Z. --- 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!
Lyrnc commented 2026-11-26 17:10:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Lyrnc on 2026-11-26T17:10:07Z.


Test report for 077de0d9 on gfx1036 and an RTX 5080, with and without #1423

Setup

  • GPUs: the Radeon iGPU of a Ryzen 7 9800X3D (gfx1036, RDNA2, driver 32.0.21042.62), which is the GPU the #1414 tables come from, and an RTX 5080 (driver 610.88). Windows 11 Pro 26200, rustc 1.98.0, DXC 1.9.2609.5.
  • Four local merges: main e120925e, main + #1423 (7c6a1b9), main + #875, and main + both. #875 merges cleanly onto main. main is now 8b957bec, but none of those 5 commits touch crates/xcl/src/gpu.
  • Commands: XCL_ADAPTER=radeon|nvidia XCL_REQUIRE_GPU=wave64 cargo test -p xcl --lib -- --exact gpu::recomp::tests::<test> --nocapture --test-threads=1, and cargo test -p xcl --lib recomp -- --test-threads=4 on each tree.
  • Hardware comparison: the local test from #1414, 141 jobs of 64 rows each through prog + runner::run_code, compared with the gfx1036 results.

Results. The Radeon and the 5080 gave the same pass / fail in every cell.

main main + #875 main + #1423 main + both
gpu_tbuffer_load_identity_dst_sel – pass – fails
tbuffer_load_ignores_vsharp_dst_sel – pass – fails
gpu_typed_buffer_loads_and_stores pass pass pass pass
cargo test -p xcl --lib recomp, passed / failed / ignored 401 / 0 / 20 403 / 0 / 20 401 / 0 / 20 401 / 2 / 20

The recomp runs had the same SKIPPED lines in every tree: 6 on the Radeon and 23 on the 5080 (#1426 refusals, no native wave64).

Jobs that differ from gfx1036 by more than 1 ULP (the same counts on both GPUs):

jobs main + #875 + #1423 + both
tbuffer_load_format_xyzw, 8 formats × 4 V# selectors 24 24 18 0
tbuffer_load_format_xyzw, 77 formats, identity V# 49 49 0 0
buffer_load_format_xyzw, 8 formats × 4 V# selectors 22 22 0 0

With #875, x, y and z of every tbuffer job with a V# selector match gfx1036 apart from 1-ULP rounding. That is 0 values off, against 886 on main: X↔Y is fixed on all 8 formats, and W = ONE / ZERO on 8_8_8_8_UNORM and 32_32_32_32_FLOAT. The 24 jobs that still differ are the 6 formats with fewer than 4 channels, under all 4 selectors, and only in w. There fmt_comp returns 1 / 1.0 and gfx1036 returns 0 (#1414 point 1, which #1423 fixes). Six of those, W = ZERO on those formats, matched on main only because the V#'s ZERO was applied. With #875 alone they read 1.0. With #1423 as well, no job differs beyond 1-ULP UNORM / SNORM rounding and NaN payloads.

Conflict with #1423. Both PRs rewrite the same two dst_sel(...) lines in BufKind::FormatLoad, so they conflict in emit.rs. I resolved it so that tbuffer takes {t}_c.x..w as here, and buffer_load_format goes through #1423's mubuf_sel. gpu_typed_buffer_loads_and_stores (with #1423's cases) then passes, but two of the tests here fail on both GPUs:

  • tests.rs:1631:
    assert_eq!(v[18..22], [f(1.0), f(-2.0), 0, f(1.0)], "lane {l} tbuffer 16_16_FLOAT: V# SEL_0 ignored, z = 0, w = 1");
    The run gives left: [1065353216, 3221225472, 0, 0]. 16_16_FLOAT has no 4th channel, and in #1414 gfx1036 reads 0 there for every format with fewer than 4 channels, so w = 1 encodes the old fmt_comp.
    tests.rs:1632, assert_eq!(v[22..24], [0xC000_3C00, 0x3C00_0000], "lane {l} tbuffer d16 xyzw");, is the same channel in d16. A lane-0 readback gives v23 = 0. I didn't measure d16 on hardware.
  • tests.rs:1590:
    assert!(t.hlsl.contains("v10 = select(t1_ok, dst_sel(t1_c, (s15 >> 0u) & 7u, t1_int), 0u);"), "{}", t.hlsl);
    With #1423, the MUBUF line is v10 = select(t1_ok, dst_sel(t1_c, mubuf_sel((s15 >> 0u) & 7u, t1_info), t1_int), 0u);. With only that string changed, the rest of the test passes.

Whichever PR lands second needs those lines changed. With #1423, the hardware-matching values are [f(1.0), f(-2.0), 0, 0] and, by the same rule, [0xC000_3C00, 0].

Not covered. With XCL_DIRECT_DXIL=1, the direct DXIL backend (crates/xcl/src/gpu/dxil/lower_mem.rs) still applies the V#'s DST_SEL to tbuffer. On main + both, gpu_tbuffer_load_identity_dst_sel fails there at lane 0 tbuffer xyzw: identity DST_SEL (left: [3, 2, 1, 4]), and the 141 jobs give the same output as main byte for byte.

Not tested: a title smoke run, the full workspace suite, and d16 loads against hardware.

AI use: Claude Code (Claude Opus 5.5) ran the tests and the comparison on the GPUs above and drafted this comment; the numbers come from those runs.

<!-- greyfinch-sync:ivall/xcl:comment:7198594837 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/875#issuecomment-7198594837). Originally posted by [Lyrnc](https://github.com/Lyrnc) on 2026-11-26T17:10:07Z. --- ### Test report for `077de0d9` on gfx1036 and an RTX 5080, with and without #1423 **Setup** - GPUs: the Radeon iGPU of a Ryzen 7 9800X3D (gfx1036, RDNA2, driver 32.0.21042.62), which is the GPU the #1414 tables come from, and an RTX 5080 (driver 610.88). Windows 11 Pro 26200, rustc 1.98.0, DXC 1.9.2609.5. - Four local merges: `main` `e120925e`, main + #1423 (`7c6a1b9`), main + #875, and main + both. #875 merges cleanly onto main. main is now `8b957bec`, but none of those 5 commits touch `crates/xcl/src/gpu`. - Commands: `XCL_ADAPTER=radeon|nvidia XCL_REQUIRE_GPU=wave64 cargo test -p xcl --lib -- --exact gpu::recomp::tests::<test> --nocapture --test-threads=1`, and `cargo test -p xcl --lib recomp -- --test-threads=4` on each tree. - Hardware comparison: the local test from #1414, 141 jobs of 64 rows each through `prog` + `runner::run_code`, compared with the gfx1036 results. **Results.** The Radeon and the 5080 gave the same pass / fail in every cell. | | main | main + #875 | main + #1423 | main + both | |---|---|---|---|---| | `gpu_tbuffer_load_identity_dst_sel` | – | pass | – | **fails** | | `tbuffer_load_ignores_vsharp_dst_sel` | – | pass | – | **fails** | | `gpu_typed_buffer_loads_and_stores` | pass | pass | pass | pass | | `cargo test -p xcl --lib recomp`, passed / failed / ignored | 401 / 0 / 20 | 403 / 0 / 20 | 401 / 0 / 20 | 401 / 2 / 20 | The `recomp` runs had the same SKIPPED lines in every tree: 6 on the Radeon and 23 on the 5080 (#1426 refusals, no native wave64). Jobs that differ from gfx1036 by more than 1 ULP (the same counts on both GPUs): | jobs | main | + #875 | + #1423 | + both | |---|---|---|---|---| | `tbuffer_load_format_xyzw`, 8 formats × 4 V# selectors | 24 | 24 | 18 | 0 | | `tbuffer_load_format_xyzw`, 77 formats, identity V# | 49 | 49 | 0 | 0 | | `buffer_load_format_xyzw`, 8 formats × 4 V# selectors | 22 | 22 | 0 | 0 | With #875, x, y and z of every tbuffer job with a V# selector match gfx1036 apart from 1-ULP rounding. That is 0 values off, against 886 on main: X↔Y is fixed on all 8 formats, and W = ONE / ZERO on 8_8_8_8_UNORM and 32_32_32_32_FLOAT. The 24 jobs that still differ are the 6 formats with fewer than 4 channels, under all 4 selectors, and only in w. There `fmt_comp` returns 1 / 1.0 and gfx1036 returns 0 (#1414 point 1, which #1423 fixes). Six of those, W = ZERO on those formats, matched on main only because the V#'s ZERO was applied. With #875 alone they read 1.0. With #1423 as well, no job differs beyond 1-ULP UNORM / SNORM rounding and NaN payloads. **Conflict with #1423.** Both PRs rewrite the same two `dst_sel(...)` lines in `BufKind::FormatLoad`, so they conflict in `emit.rs`. I resolved it so that tbuffer takes `{t}_c.x..w` as here, and buffer_load_format goes through #1423's `mubuf_sel`. `gpu_typed_buffer_loads_and_stores` (with #1423's cases) then passes, but two of the tests here fail on both GPUs: - `tests.rs:1631`: `assert_eq!(v[18..22], [f(1.0), f(-2.0), 0, f(1.0)], "lane {l} tbuffer 16_16_FLOAT: V# SEL_0 ignored, z = 0, w = 1");` The run gives `left: [1065353216, 3221225472, 0, 0]`. 16_16_FLOAT has no 4th channel, and in #1414 gfx1036 reads 0 there for every format with fewer than 4 channels, so `w = 1` encodes the old `fmt_comp`. `tests.rs:1632`, `assert_eq!(v[22..24], [0xC000_3C00, 0x3C00_0000], "lane {l} tbuffer d16 xyzw");`, is the same channel in d16. A lane-0 readback gives `v23 = 0`. I didn't measure d16 on hardware. - `tests.rs:1590`: `assert!(t.hlsl.contains("v10 = select(t1_ok, dst_sel(t1_c, (s15 >> 0u) & 7u, t1_int), 0u);"), "{}", t.hlsl);` With #1423, the MUBUF line is `v10 = select(t1_ok, dst_sel(t1_c, mubuf_sel((s15 >> 0u) & 7u, t1_info), t1_int), 0u);`. With only that string changed, the rest of the test passes. Whichever PR lands second needs those lines changed. With #1423, the hardware-matching values are `[f(1.0), f(-2.0), 0, 0]` and, by the same rule, `[0xC000_3C00, 0]`. **Not covered.** With `XCL_DIRECT_DXIL=1`, the direct DXIL backend (`crates/xcl/src/gpu/dxil/lower_mem.rs`) still applies the V#'s DST_SEL to tbuffer. On main + both, `gpu_tbuffer_load_identity_dst_sel` fails there at `lane 0 tbuffer xyzw: identity DST_SEL` (`left: [3, 2, 1, 4]`), and the 141 jobs give the same output as main byte for byte. Not tested: a title smoke run, the full workspace suite, and d16 loads against hardware. AI use: Claude Code (Claude Opus 5.5) ran the tests and the comparison on the GPUs above and drafted this comment; the numbers come from those runs.
Foniass commented 2026-12-01 04:22:52 +00:00 (Migrated from github.com)

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


Triage (#1607) – head 077de0d

No open or merged PR makes tbuffer_load_format_* ignore the V#'s DST_SEL; main's emit.rs FormatLoad still applies dst_sel() for ENC_MTBUF. #3421 handles DST_SEL for buffer_store_format, a different instruction path. Since this PR was opened, main added a direct DXIL path (gpu/dxil/lower_mem.rs, MUBUF/MTBUF format loads) that also applies dst_sel to MTBUF loads, and changed the D16 half to d16_fmt(); the rebase needs the same identity select there, or the two translators will disagree.
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:7300675681 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/875#issuecomment-7300675681). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T04:22:52Z. --- **Triage (#1607)** – head 077de0d No open or merged PR makes tbuffer_load_format_* ignore the V#'s DST_SEL; main's emit.rs FormatLoad still applies dst_sel() for ENC_MTBUF. #3421 handles DST_SEL for buffer_store_format, a different instruction path. Since this PR was opened, main added a direct DXIL path (gpu/dxil/lower_mem.rs, MUBUF/MTBUF format loads) that also applies dst_sel to MTBUF loads, and changed the D16 half to d16_fmt(); the rebase needs the same identity select there, or the two translators will disagree. 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/875:upstream-pr/875'
git switch 'upstream-pr/875'

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