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>