tombox-xshader exec suite on an AMD Radeon RX 6600 XT (RDNA2): four existing tests fail with TOMBOX_EXEC_HW=1 on main, all pass on WARP #333

Open
opened 2026-11-26 06:19:16 +00:00 by github-bot · 1 comment
Owner

@⁠GDAgent on GitHub · 2026-11-23 20:21 UTC · original

Related: #188 (independent hardware run on an NVIDIA GPU, all passing) and #194 (f16 NaN results on an RTX 3080, closed).

Setup

  • main at f89e410, Windows 11 (build 26200), native, not run under Proton.

  • GPU: AMD Radeon RX 6600 XT (RDNA2, gfx1032), driver 32.0.21045.29003.

  • The first three tests run on their own, twice, with the same numbers both times; vop::basic::vop2_basic on its own once, and the whole exec binary once on a branch of main with an unrelated SOP1 translator fix (126 passed, 4 failed, 2 ignored, 1667 s; the four failures are the four below, with identical numbers):

    TOMBOX_EXEC_HW=1 cargo test -p tombox-xshader --test exec <test> -- --test-threads=1
    
  • The same four tests without TOMBOX_EXEC_HW (WARP): all pass.

Failures

f16_omod_follows_mode

f16_omod_follows_mode: 3 mnemonics verified, 0 failing, 12 cases
f16_omod_follows_mode (runtime inputs): 2 mnemonics verified, 1 failing, 12 cases
f16_omod_follows_mode: 1 failing cases
#4 v_add_f16: got [00000000] want [00008000]

Only the rerun with runtime inputs fails, and only case 4: v_add_f16 v3, v3 (both inputs 0x8000, i.e. -0.0, output modifier x2, no clamp). The expected result is -0.0 (0x8000); the GPU gives +0.0, so the sign of zero is lost.

exec_mem::mtbuf::mtbuf_d16_store_formats

mtbuf_d16_store: 0 mnemonics verified, 4 failing, 330 cases, 0 rerun with runtime inputs
mtbuf_d16_store: 6 failing
#0 tbuffer_store_format_d16_xyzw: [256] 00000000 want 00000080, [259] 01ab00ff want ff550000, [260] ff00fc00 want ff000110, ...
#1 tbuffer_store_format_d16_xyzw: [256] 1d0000bf want 00000000, [257] 00ff9a00 want 00ff0000, ...
#2 tbuffer_store_format_d16_xyzw: [256] 00d6e8a3 want 007207ab, ...
#3 tbuffer_store_format_d16_x:  [256] 00000000 want 00000080, [259] 01ab00ff want ff550000, ...
#4 tbuffer_store_format_d16_xy: [256] 00000000 want 00000080, ...
#5 tbuffer_store_format_d16_xyz: [256] 00000000 want 00000080, ...

All four mnemonics of the group fail, every one with several wrong dwords, not only the last bit of a conversion. The failing cases are the first ones of the group (indices 0 to 5 of 330).

scalar_smem_loads

smem: 5 mnemonics verified, 5 failing, 47 cases
smem: 7 failing
#39 s_load_dword:    got [a5002323] want [a5002929]
#40 s_load_dwordx2:  got [a5004343] want [a5004949]
#42 s_load_dwordx4:  got [a500c3c3] want [a500c9c9]
#43 s_load_dwordx8:  got [a5006363] want [a5006969]
#44 s_load_dwordx16: got [a5008383] want [a5008989]
#45 s_load_dwordx16: got [a500a3a3] want [a500a9a9]
#46 s_load_dwordx16: got [a5008383, a500a4a4] want [a5008989, a500aaaa]

Only the s_load_dword* forms fail (the s_buffer_load_dword* forms of the same test pass). The wrong values are consistently 6 off in the two low bytes (0x23 for 0x29, 0x43 for 0x49, ...), so it looks like a systematic address or stride difference of one element, not noise.

vop::basic::vop2_basic

vop2_basic: 26 mnemonics verified, 0 failing, 2245 cases
vop2_basic (runtime inputs): 24 mnemonics verified, 2 failing, 2245 cases
vop2_basic: 4 failing cases
#642 v_sub_f32:    got [00000000] want [7fc00000]
#643 v_subrev_f32: got [00000000] want [7fc00000]
#707 v_sub_f32:    got [00000000] want [7fc00000]
#708 v_subrev_f32: got [00000000] want [7fc00000]

Only the rerun with runtime inputs fails, on four NaN cases of v_sub_f32 and v_subrev_f32: the expected quiet NaN 0x7fc00000 comes back as 0. The same shape as #194 (NaN results on hardware), but for the f32 subtract.

What I did not check

  • Whether the same four tests fail on other RDNA2 or RDNA3 cards or other driver versions. The reports in #188 and #194 are NVIDIA; I have no second AMD card.
  • Whether the cause is in the translator (for example an assumption about RWStructuredBuffer GetDimensions stride or about the f16 zero sign that holds on one vendor) or in this driver. I did not debug it further.
  • Whether it also happens with a debug layer; I ran without TOMBOX_EXEC_DEBUG.

Full output of these runs is available if useful.

**@⁠GDAgent** on GitHub · 2026-11-23 20:21 UTC · [original](https://github.com/omonkeyz/xbox-emulator/issues/333) Related: #188 (independent hardware run on an NVIDIA GPU, all passing) and #194 (f16 NaN results on an RTX 3080, closed). ## Setup - `main` at f89e410, Windows 11 (build 26200), native, not run under Proton. - GPU: AMD Radeon RX 6600 XT (RDNA2, gfx1032), driver 32.0.21045.29003. - The first three tests run on their own, twice, with the same numbers both times; `vop::basic::vop2_basic` on its own once, and the whole `exec` binary once on a branch of `main` with an unrelated SOP1 translator fix (126 passed, 4 failed, 2 ignored, 1667 s; the four failures are the four below, with identical numbers): TOMBOX_EXEC_HW=1 cargo test -p tombox-xshader --test exec <test> -- --test-threads=1 - The same four tests without `TOMBOX_EXEC_HW` (WARP): all pass. ## Failures ### `f16_omod_follows_mode` f16_omod_follows_mode: 3 mnemonics verified, 0 failing, 12 cases f16_omod_follows_mode (runtime inputs): 2 mnemonics verified, 1 failing, 12 cases f16_omod_follows_mode: 1 failing cases #4 v_add_f16: got [00000000] want [00008000] Only the rerun with runtime inputs fails, and only case 4: `v_add_f16 v3, v3` (both inputs `0x8000`, i.e. -0.0, output modifier x2, no clamp). The expected result is -0.0 (`0x8000`); the GPU gives +0.0, so the sign of zero is lost. ### `exec_mem::mtbuf::mtbuf_d16_store_formats` mtbuf_d16_store: 0 mnemonics verified, 4 failing, 330 cases, 0 rerun with runtime inputs mtbuf_d16_store: 6 failing #0 tbuffer_store_format_d16_xyzw: [256] 00000000 want 00000080, [259] 01ab00ff want ff550000, [260] ff00fc00 want ff000110, ... #1 tbuffer_store_format_d16_xyzw: [256] 1d0000bf want 00000000, [257] 00ff9a00 want 00ff0000, ... #2 tbuffer_store_format_d16_xyzw: [256] 00d6e8a3 want 007207ab, ... #3 tbuffer_store_format_d16_x: [256] 00000000 want 00000080, [259] 01ab00ff want ff550000, ... #4 tbuffer_store_format_d16_xy: [256] 00000000 want 00000080, ... #5 tbuffer_store_format_d16_xyz: [256] 00000000 want 00000080, ... All four mnemonics of the group fail, every one with several wrong dwords, not only the last bit of a conversion. The failing cases are the first ones of the group (indices 0 to 5 of 330). ### `scalar_smem_loads` smem: 5 mnemonics verified, 5 failing, 47 cases smem: 7 failing #39 s_load_dword: got [a5002323] want [a5002929] #40 s_load_dwordx2: got [a5004343] want [a5004949] #42 s_load_dwordx4: got [a500c3c3] want [a500c9c9] #43 s_load_dwordx8: got [a5006363] want [a5006969] #44 s_load_dwordx16: got [a5008383] want [a5008989] #45 s_load_dwordx16: got [a500a3a3] want [a500a9a9] #46 s_load_dwordx16: got [a5008383, a500a4a4] want [a5008989, a500aaaa] Only the `s_load_dword*` forms fail (the `s_buffer_load_dword*` forms of the same test pass). The wrong values are consistently 6 off in the two low bytes (`0x23` for `0x29`, `0x43` for `0x49`, ...), so it looks like a systematic address or stride difference of one element, not noise. ### `vop::basic::vop2_basic` vop2_basic: 26 mnemonics verified, 0 failing, 2245 cases vop2_basic (runtime inputs): 24 mnemonics verified, 2 failing, 2245 cases vop2_basic: 4 failing cases #642 v_sub_f32: got [00000000] want [7fc00000] #643 v_subrev_f32: got [00000000] want [7fc00000] #707 v_sub_f32: got [00000000] want [7fc00000] #708 v_subrev_f32: got [00000000] want [7fc00000] Only the rerun with runtime inputs fails, on four NaN cases of `v_sub_f32` and `v_subrev_f32`: the expected quiet NaN `0x7fc00000` comes back as 0. The same shape as #194 (NaN results on hardware), but for the f32 subtract. ## What I did not check - Whether the same four tests fail on other RDNA2 or RDNA3 cards or other driver versions. The reports in #188 and #194 are NVIDIA; I have no second AMD card. - Whether the cause is in the translator (for example an assumption about `RWStructuredBuffer` `GetDimensions` stride or about the f16 zero sign that holds on one vendor) or in this driver. I did not debug it further. - Whether it also happens with a debug layer; I ran without `TOMBOX_EXEC_DEBUG`. Full output of these runs is available if useful.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:19:16 +00:00
Author
Owner

@⁠BuHHuTlyx on GitHub · 2026-11-23 21:28 UTC · original

I ran the four exact tests on a clean main checkout at f89e4106fe8a1728515afa34ceb5097132cadcda on native Windows 11 24H2 (build 26100.9711), with Rust 1.100.0 MSVC and DXC 1.9.2609.5.

Test WARP RTX 3070 (driver 32.0.16.2124)
exec_mem::mtbuf::mtbuf_d16_store_formats pass pass
f16_omod_follows_mode pass pass
scalar_smem_loads pass pass
vop::basic::vop2_basic pass pass

Both runs had 4 passed and 0 failed, including the runtime-input reruns of the two VOP tests. I used the command below with TOMBOX_EXEC_HW unset for WARP and set to 1 for the RTX 3070.

cargo test --locked -p tombox-xshader --test exec -- --test-threads=1 --nocapture mtbuf_d16_store_formats f16_omod_follows_mode scalar_smem_loads vop2_basic
**@⁠BuHHuTlyx** on GitHub · 2026-11-23 21:28 UTC · [original](https://github.com/omonkeyz/xbox-emulator/issues/333#issuecomment-7114506317) I ran the four exact tests on a clean `main` checkout at `f89e4106fe8a1728515afa34ceb5097132cadcda` on native Windows 11 24H2 (build 26100.9711), with Rust 1.100.0 MSVC and DXC 1.9.2609.5. | Test | WARP | RTX 3070 (driver `32.0.16.2124`) | | --- | --- | --- | | `exec_mem::mtbuf::mtbuf_d16_store_formats` | pass | pass | | `f16_omod_follows_mode` | pass | pass | | `scalar_smem_loads` | pass | pass | | `vop::basic::vop2_basic` | pass | pass | Both runs had 4 passed and 0 failed, including the runtime-input reruns of the two VOP tests. I used the command below with `TOMBOX_EXEC_HW` unset for WARP and set to `1` for the RTX 3070. ```text cargo test --locked -p tombox-xshader --test exec -- --test-threads=1 --nocapture mtbuf_d16_store_formats f16_omod_follows_mode scalar_smem_loads vop2_basic ```
This discussion has been locked. Commenting is limited to contributors.
No description provided.