Repository navigation
rdna2spirv: verify 16-bit add/sub clamp and op_sel, support VOP3 literals - #3228
abnalstlll-byte wants to merge 1 commit into
Conversation
|
Independent CPU review at I assembled synthetic gfx1030 programs with WSL LLVM 21.1.8 and cross-checked the instruction text and bytes against object disassembly. I fed the assembler listings with their encoding bytes to the stock translator and ran its output in the stock semantic interpreter under uv Python 3.12.13. An independent integer reference checked both halves of the destination.
I found no issue in this CPU scope. |
|
Tested de37be1 on an RTX 5090 (driver 616.92), Windows 11, Vulkan SDK 1.4.363. The GPU test programs were built from the same tree:
AI-assisted (Claude Code). |
de37be1 to
d700b71
Compare
|
Tested
Not run: the |
…rals - Clarify RDNA2 ISA status: GFX10.3 dropped reversed 16-bit integer subtraction (v_subrev_nc_u16 / v_subrev_nc_i16 do not exist on hardware; v_subrev_f16 is the only 16-bit reverse subtract opcode). - In tools/rdna2spirv.py, correctly identify VOP3 encoding for 16-bit integer ops when 32-bit literal operands extend the instruction to 12 bytes, preserving the untouched destination half. - Guard against non-VGPR destination when op_sel writes to destination high half. - In tools/int_hw_probe.py, add v_add_sub_nc_i16_clamp covering signed saturation to [-32768, 32767], op_sel source selection, and untouched half preservation. - In tests/semantic/test_alu_subrev_f16.py, add test_vop3_omod_and_clamp. - In tests/semantic/test_valu_add_sub_nc_i16.py, add coverage for SGPR sources, literal constants, high-half preservation, and non-VGPR op_sel destination rejection. - Update docs/design.md row 261 with RDNA2 ISA details and probe status.
d700b71 to
923512c
Compare
|
Tested I ran a synthetic pixel shader with four literal-operand VOP3 instructions through llvm-mc, the translator, spirv-val and the Vulkan harness built from this head. Each destination started at
All four output words matched at all 4,096 pixels. Both destination selections preserved the untouched half. This was a filtered synthetic draw. AI-assisted verification. |
|
Tested
AI-assisted (Claude Code). |
|
Tested
No game files. AI-assisted (Claude Code). |
|
Tested 923512c merged with main 3faac55 on native Windows (Python 3.13.1, llvm-mc 23.1.6) and with main 98fa503 on Linux (Python 3.12.16): pass. tests/semantic/test_valu_add_sub_nc_i16.py, test_value_semantics.py and the rdna2spirv and shader_checks tests: Windows 10/10, Linux 14/14. Negative control with main's tools/rdna2spirv.py and tools/int_hw_probe.py: test_valu_add_sub_nc_i16 fails (2 failures). |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # docs/design.md
Claimed in the coordination issue: #3047 (comment)
What and why
Tested
AI-assisted (Gemini). No game files or proprietary assets used.