shader: fix RDNA2 EXP, VINTRP, SMEM, MIMG and literal decoding in disasm_rdna2 #517
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!517
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/517/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?
@PrivacyOnion on GitHub · 2026-11-22 08:47 UTC · original
PrivacyOnion:shader/disasm-rdna2-real-encodings→main· +305 −27 · 2 files · 2 commits · merged 2026-11-22 09:57 UTC## Summary
tools/disasm_rdna2.py:0xf8000000): decodeen(w0[3:0]),target(w0[9:4], includingmrtzandparam0..31),compr(w0[10]),done(w0[11]), andvm(w0[12]) instead of shifted offsets; format disabled channels asoffand compressed (compr) exports accurately.0xc8000000): fix swappedattr(w0[15:10]) andchan(w0[9:8]) bitfields.0xf4000000): use per-opcode destination register widths (1/2/4/8/16) and base widths (2fors_load_*,4fors_buffer_load_*), decodesoffset(w1[31:25]) vsnull+ 21-bit offset, and emitglc/dlcmodifiers.0xf0000000): add full 64-bit contiguous and 12/16/20-byte NSA (nsize) decoding forimage_load*,image_store*,image_sample*,image_gather4*,image_get_resinfo, andimage_get_lod, includingdmask,dim:SQ_RSRC_IMG_*, sampler descriptors, and modifiers (unorm,glc,slc,r128,lwe,dlc,d16).src == 255) inSOP1,SOP2,VOP1, andVOP2plus mandatory literals inv_fmamk_f32(0x2c) andv_fmaak_f32(0x2d), preventing instruction stream desynchronization; add GFX10 VOP1 rounding opcodes (0x20..0x24:v_fract/trunc/ceil/rndne/floor_f32_e32).tests/rdna2_tools_check.pywith golden vectors for all fixed/added encodings, multi-instruction literal alignment and truncation tests, and full LLVM 15gfx1013round-trip coverage intest_llvm_comparison.Verification
out/pe-env/Scripts/python.exe -B tests/rdna2_tools_check.py -v-> OK (32 tests, 1 skipped locally withoutLLVM_LIB)out/pe-env/Scripts/python.exe -B tests/pso_readiness_check.py-> PASSout/pe-env/Scripts/python.exe -B tests/form_coverage_check.py-> PASSout/pe-env/Scripts/python.exe -B tests/bidi_controls_check.py-> PASSout/pe-env/Scripts/python.exe -B tests/docs_links_check.py-> PASS