xshader: inline float constants in f16 operands, with RX 6800 vectors #202
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
library
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/omonkeyz--xbox-emulator!202
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/202/head"
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?
@QuentinDanblon on GitHub · 2026-11-23 01:02 UTC · original
QuentinDanblon:pr/hw-f16→main· +116 −5 · 3 files · 1 commits · closed without mergingLibrary / area: tombox-xshader (f16 operands of VOP instructions)
Exports changed (exports.txt rows): none
Source of the behaviour: LLVM AMDGPU
getLit16Encodingfor inline constants in 16-bit operands, and results an AMD Radeon RX 6800 (gfx1030) returned, published in the comments of the Leonida project's GPU test programs (GPL-3.0). Facts only (instruction, input bits, measured bits), no code copied; encodings fromllvm-mc -mcpu=gfx1013. The Leonida line ofTHIRD_PARTY/CREDITSalready coverstests/exec_vop/leonida.rs, where the tests are, so that file is not changed here.Part of the split of #152: first of three small groups of translator fixes from the RX 6800 vectors. Based on
c2a3522, 3 files, +116 / -5.An inline float constant in an f16 operand is the f16 of that value in the low half and zero in the high half. Before this change:
v_pack_b32_f16andv_cvt_f32_f16read the f32 bit pattern of the constant;0x3118.Tests (
tests/exec_vop/leonida.rs): five tests, 45 measured cases (f16 unary, f16 binary, f16 inline constants,v_med3_f16with OPSEL, single-rounding FMA). Onc2a3522without the fix, 6 cases fail, all inleonida_f16_inline_constants; the others already pass and are kept as regression vectors.Results
WARP,
--release, this branch alone onc2a3522:cargo test -p tombox-xshader --test exec -- leonida: 8 passed, 0 failed, 1 ignored (the 3 existing Leonida tests and the 5 new ones).v_med3_f32, SMEM) merged together onc2a3522,cargo test -p tombox-xshader, all targets: 0 failed. exec 115 passed (2 ignored), lib 90, mesh 26, opcodes 24, synthetic 24, isa_table 3, linkage 3, mixed_table 3, gcn_dims 3.isa_sweep: 541 mnemonics, 530 pass, 0 fail, 11 known WARP deviations.2eda8b0without conflict (git merge-tree); it was not rerun there.Hardware: not rerun on this base, the GPU of my machine is busy for now. The same change passed on an RTX 5090 in #152 (
2f1cfd0onf10db75), and MiguelMatMar ran that branch on an RTX 40-series (results in #152). I will post a hardware run of this branch when the card is free.No comment lines added (PR gate: 3 files checked, 0 problems). Not run against a title.
cargo test -p tombox-xshaderpasses on WARPmissingwith a note🤖 Generated with Claude Code
@omonkeyz on GitHub · 2026-11-23 01:38 UTC · original
Applied in
8e4abb5(merged in24e6c10) with your authorship kept, thanks. The trailing comments on the new test vectors were dropped inf04f768(the project keeps code comment-free).Pull request closed