diff options
| author | Rafael <rafaelalvesp2005@gmail.com> | 2026-11-23 06:37:34 -0300 |
|---|---|---|
| committer | Super User <root@device-83.home> | 2026-11-25 09:53:34 +0100 |
| commit | 697b1761d250c63bc70dfba586982f0aed2b57ac (patch) | |
| tree | 3f8a2d5275399ddad0ffd7df97676b80b7a8be66 /runtime/test/vk_queue_query_sync_test.cpp | |
| parent | 604ddff0bc3c3a329d935aab50aab444e9d2801c (diff) | |
rdna2spirv: the PS FRONT_FACE VGPR holds 0xffffffff / 0, the form the game's shaders test (SHADER-892)
RDNA2's FRONT_FACE system VGPR is 0xffffffff (front) / 0 (back) with
SPI_BARYC_CNTL.FRONT_FACE_ALL_BITS = 1 and +1.0 / -1.0 without it (#5123);
which one the console programs wasn't known. Over the 1.0.2.1 corpus, 1,984
pixel shaders declare SV_IsFrontFace, 345 read the VGPR, and every first use
is an integer compare against 0 (282 v_cmp_ne_u32_e32, 62 v_cmp_ne_u32_e64,
1 v_cmp_eq_u32_e32) - no float compare, bit op or other use. +1.0 and -1.0
are both non-zero, so with the float form the translator wrote, all 345
saw every face as front. It now stores the mask form.
tests/test_ps_front_face.py translates a hand-written PS that tests the VGPR
the same way and checks the stored values (fails on the old code). The
712 corpus PS that compare the FRONT_FACE register translate and pass
spirv-val before and after.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/vk_queue_query_sync_test.cpp')
0 files changed, 0 insertions, 0 deletions