upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/vulkan_aftermath.cpp
diff options
context:
space:
mode:
authormilk4sale <53350507+milk4sale@users.noreply.github.com>2026-11-24 12:30:40 -0600
committermilk4sale <53350507+milk4sale@users.noreply.github.com>2026-11-24 12:40:29 -0600
commitcec2c7074c8b086b28d276f573573c22899200af (patch)
tree1b2db7f56b461719293c0522026f54d70eb41027 /runtime/src/vulkan_aftermath.cpp
parent6293c1c4f88c7ea2088ec595fea51362f1759996 (diff)
tests: GPU readback for 38 scalar ALU ops on run-time operands (GPU-SALU-EXT)
No fixture in runtime/test/shaders ran s_sub_i32, s_andn2_b32, s_orn2_b32, s_xor_b32, s_ashr_i32, s_mul_hi_u32, s_lshl3_add_u32, s_lshl4_add_u32, s_pack_ll_b32_b16, s_pack_hh_b32_b16, s_abs_i32, s_bcnt0_i32_b32, s_bitset0_b32, s_bitset1_b32, s_brev_b32, s_flbit_i32, s_flbit_i32_b32, s_sext_i32_i8, the six s_cmp_*_i32, s_cmp_gt_u32, s_cmp_le_u32, s_bitcmp0_b32, s_bitcmp1_b32, s_addk_i32, s_mulk_i32, s_cmovk_i32, s_ashr_i64, s_lshl_b64, s_lshr_b64, s_bcnt0_i32_b64, s_bitset0_b64, s_cmov_b64 or s_ff0_i32_b64. cs_w32_salu_ext gets sixteen operand words in s4..s19 from VKC_SGPRS, so each op reaches the driver as SPIR-V and is not folded by the translator as an op on literals is. One thread stores every destination and four words of SCC bits: SCC after each op that writes it, run on operands that set it and on operands that clear it, each compare both ways, and SCC after each op that must keep it, set to 1 and to 0 in turn before them. The 73 expected words are literals in check.py, derived in the fixture's header. tests/test_gpu_salu_ext.py recomputes them from the fixture's own instruction lines with the reference of tools/salu_diff.py, checks that every op that writes SCC is seen with both values, and checks the readback and both runners' verdicts. The fixture is the first in the folder with bit 15 set in the immediate of a signed SOPK op (s_addk_i32 s52, 0x8000). tools/rdna2_decode.py gives that immediate sign-extended and llvm-mc 23.1.4 prints the same word as 0x8000, so test_parity_with_llvm_mc_on_shader_fixtures failed on it. That test now compares the immediates of the ten signed SOPK ops as the 16 bits they are, as it already does for SOPP branch offsets, and a hand-encoded test pins which of the sixteen ops the decoder sign-extends. No translator, decoder or runtime change. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/vulkan_aftermath.cpp')
0 files changed, 0 insertions, 0 deletions