Repository navigation
Conversation
Adds ps_vcmp_int16 for v_cmp_{eq,ne,lt,le,gt,ge}_{i16,u16}, with the words
derived by hand in the .asm header, plus the matching semantic fixture and test.
AI-assisted.
|
Tested 7cfdf4b on NVIDIA GeForce RTX 3090 (Ampere, subgroup 32..32), driver 610.88 (Vulkan 1.4.341), Windows 11 Pro 26300: pass. The PR's diff applied cleanly to
|
|
Tested
AI-assisted run. |
Hardware Validation: NVIDIA Turing (RTX 2070 SUPER)Tested \ps_vcmp_int16\ on physical hardware:
Results:
|
|
Tested 7cfdf4b on AMD Radeon RX 9060 XT (RDNA4), AMD driver 26.10.44 (LLPC, Vulkan driver 2.0.395), Windows 11 Pro 10.0.26300, subgroup 32..64: pass. The checks above have no AMD run from outside the author; this adds an AMD card with native 64-wide subgroups.
Test programs: an MSVC 14.44 build of 4947579, this PR's base; the PR changes no C++ or CMake. llvm-mc 21.1.8 (native), Vulkan SDK 1.4.363.0. No negative control run here. No game files. AI-assisted (Claude Code). |
tests/semantic/regen_fixtures.py AI-assisted.
|
Tested
No game files. AI-assisted (Claude Code). |
|
Tested Runtime and test programs built from this head (MSVC 14.51, Ninja, RelWithDebInfo), native Windows
This PR's shaders:
AI-assisted (Claude Code); I checked the results. |
tests/semantic/regen_fixtures.py AI-assisted.
|
Tested
No game files. AI-assisted (Claude Code). |
|
Tested
AI-assisted (Claude Code). Synthetic shaders only, no game files. |
|
Tested 4f19eb2 on NVIDIA RTX 4080, driver 610.88, Windows 11: pass This is the head rebased on
AI-assisted. |
|
Tested |
|
Tested 4f19eb2 (merge base aa2988c) on NVIDIA GeForce RTX 5080, Linux 580.65.06: pass Tested the PR head merged with current main
Line-by-line against my main run (results that differ from main):
Not run: the full AI-assisted (Claude Code). |
|
Tested
Not run: AI-assisted (Claude Code). |
Requested by Lucas · project thread
Claimed in the coordination issue as: EGEN-GPU-VCMP-INT16, #2078 (comment)
What and why
Adds
ps_vcmp_int16, a GPU test for the 16-bit integer VOPC compares:v_cmp_{eq,ne,lt,le,gt,ge}_{i16,u16}, in the e32 form (VCC) and the e64 form (SGPR pair, operands swapped). On main these twelve ran only on the CPU.v_cmp_f/t_{i16,u16}cannot be assembled for gfx10 (llvm-mc rejects them), so they are left out.Five operand pairs per op, on the low 16 bits only: a 16-bit literal
0x8000vs 1 and an inline-1vs 0 (signed and unsigned disagree), an inline 1 vs0x8000, a literal0x1234vs a register whose high half is0xabcd(equal as 16-bit values), and two registers 3 vs 5 where the first has0xffffin its high half. The four expected words are derived by hand in the.asmheader. The same shader is atests/semanticfixture, asserted intests/semantic/test_vcmp_int16.pyagainst a plain-Python reference.Not covered: the f16 compares and
v_cmpxon 16-bit operands.Tested
run_gpu_tests.py --filter ps_vcmp_int16: PASS, 4096/4096 pixels exact on both.v_cmp_*_i16intools/rdna2spirv.py(one line) fails on both GPUs: got0x163e52e8, 0x163e52e8, 0x39458ee8, 0x39458ee8, want0x184dcee8, 0x163e52e8, 0x373612e8, 0x39458ee8(4096/4096 mismatches). Reverted.python -m unittest discover -s tests/semantic(2569 tests, OK, 3 skipped),python tests/semantic/regen_fixtures.py --checkclean,python -I tests/test_shader_checks.py(60 tests OK).Checklist
AI-assisted.