nir: Fix lower_two_sided_color when the face is an input
authorIcecream95 <ixn@keemail.me>
Tue, 14 Jul 2020 10:18:21 +0000 (22:18 +1200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 17 Jul 2020 14:50:26 +0000 (14:50 +0000)
commit4e986568b8bda39da6cc843a2f0d16d432e17ce3
tree3073d1f7917b588436c99567613e8522c7d477f8
parent314ba5e17450c8c14c2191bcd5675a9eaaac69d8
nir: Fix lower_two_sided_color when the face is an input

Fixes the two-sided-lighting and vertex-program-two-side piglit tests
on Panfrost.

v2: Use an existing variable for gl_FrontFacing if present.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Tested-by: Urja Rannikko <urjaman@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5915>
src/compiler/nir/nir_lower_two_sided_color.c