RDNA2 silicon evidence for 29 held-back or unverified instructions (RDNA2 instructions 768 -> 789) #191
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/191"
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 omonkeyz/xbox-emulator. Originally posted by SchmashinPrunes on 2026-11-22T23:00:11Z.
RDNA2 hardware evidence for the instruction squares that were grey or amber for want of verification. RDNA2 instructions go from 768 to 789 of 797 (two commits: 778 with the first, 789 with the image atomics), and the two items
progress.jsonheld back (thes_bfewidth >= 32 rule andcvt_pknormrounding) are settled against silicon.Library / area: tombox-xshader tests,
tools/progress,tools/rdna2-hwprobeExports changed (exports.txt rows): none
Source of the behaviour: results recorded on RDNA2 hardware, the gfx1036 iGPU of a Ryzen 5 9600X (ROCm/HIP 5.7.1), with the new
tools/rdna2-hwprobe/verify_probe.pykernels. Each sweep was run twice and kept only when both runs were identical. The test replays the recorded inputs through the translator with the same instruction encodings, so it checks translator against silicon, not translator against a model. gfx1036 is RDNA2, not the console's gfx1013. No game or console files are involved.What is verified
tests/exec_vop/rdna2_silicon.rs(new, WARP): 480 recorded results, 32 per instruction, for 15 instructions. Every case passes with fixed inputs and with runtime inputs (run_both):v_fmac_f16,v_fmamk_f16,v_fmaak_f16: zeros, ±1, denormals, max, infinities, quiet NaNs and random values; random upper halves.v_pk_lshlrev_b16,v_pk_lshrrev_b16: shift counts 0 to 19 in both halves, plus random values.v_cvt_norm_i16_f16,v_cvt_norm_u16_f16,v_cvt_pknorm_{i16,u16}_{f16,f32}: exact rounding ties(k + 0.5) / 32767and/ 65535, one ulp either side of them, out-of-range values, specials.s_bfe_u32,s_bfe_i32,s_bfe_u64,s_bfe_i64: result and SCC, widths 0, 1, 7, 16, 31, 32, 33, 63, 64, 65 and 127, offsets 0 to 39, junk in the unused control bits.image_atomic_*ops run on the hardware against a linearR32_UINTimage, with the initial texels and the 8(x, data, cmp)tuples ofexec_mem::mimg::image_mimg_atomics, with and withoutglc. All 208 results (new texel, untouched neighbours, the returned pre-op value, or vdata unchanged withoutglc) equal that test's expectations, which the translator already passes on WARP. So the existing test is the silicon check and needs no change.ds_write_b16_d16_hi(64 values, both half offsets) andbuffer_store_format_xy/_xyzwere recorded on the same hardware. The results match whatexec_mem::ds::ds_lds_computeand theexecbuffer store tests already expect.What the hardware says
s_bfe_*with width >= 32 returnsS0 >> offset(all remaining bits). That is the reference's rule, not "returns 0", and it is what the translator already does after #178.v_cvt_pknorm_*andv_cvt_norm_*: the translator's rounding matches on every tie and near-tie case.x, y[, z]and then 0 in the components the instruction doesn't write, as the existing tests assume. With 3- and 1-component formats only the format's own components are written. Format 62 storedx, 0; I haven't looked into why, and the translator's tests don't use it.Not covered
Signalling NaN inputs are left out of the f16 FMA cases. With IEEE mode off, the hardware returns a signalling NaN operand unquieted (for example
0x7d01comes back as0x7d01), while the translator returns0x7f01. That follows from all of the translator's host float math quieting NaNs, not from these three instructions, so I've only recorded it here;v_fma_f32and the other verified float ops behave the same way. I can open an issue if that's useful.The 8 squares left are the translator's deliberate refusals:
ds_gws_*,ds_ordered_countands_sendmsghalt(BLOCKERS: no faithful PC equivalent). The_pckimage loads and stores from #103 are not decoded yet. No title uses them, and decoding them would add squares, so they're left out here.Change
tests/exec_vop/rdna2_silicon.rs(new), registered inexec_vop/mod.rs.tools/progress/progress.json:rdna2_verified, with evidence entries;s_bfeops leaverdna2_pending, which is now empty.gen.pyoutput regenerated:summary.json,docs/img/progress.svg,badge-instructions.svg,docs/MILESTONES.md,docs/LIBRARY_MAP.md. Only the instruction count changes (768 to 789).tools/rdna2-hwprobe:verify_probe.py(kernels and inputs),image_probe.py(image atomic kernels, a hand-built T#, and acheckmode against the test model),verify_runner.cpp(HIP runner),verify_gen.py(writes the test from a recording), and README.txt sections.Tests (Windows 11 Pro, WARP, DXC 1.9.2609, on
baadb80)Before the signalling-NaN inputs were removed, the same test failed exactly those 14 f16 FMA cases (got
0x7f01, want0x7d01). The other cases agreed, so the test does detect a translator/silicon difference.cargo test -p tombox-xshaderpasses🤖 Generated with Claude Code
Imported from omonkeyz/xbox-emulator. Originally posted by omonkeyz on 2026-11-23T00:07:02Z.
The hardware results and WARP replay tests are applied in
59c2475(merged ina4cc592) with your authorship kept, thanks. The full tombox-xshader suite passes.I made two changes:
verify_gen.py, the#[test]line inside the Python string now goes through a separatelines.append. The gate was reading it as a comment line. The generated output is unchanged.tools/progress/progress.json,summary.json, the badges and the docs.progress.jsonhas one writer, the lead's generator. The 768 -> 778 change happens when that generator sees your new passing tests.Pull request closed