tgsi_to_nir: Support FACE and POSITION properly.
authorTimur Kristóf <timur.kristof@gmail.com>
Fri, 8 Feb 2019 21:19:14 +0000 (22:19 +0100)
committerEric Anholt <eric@anholt.net>
Tue, 5 Mar 2019 19:13:27 +0000 (19:13 +0000)
commit674045d04b9ebd134b6322a3b944986b4082a3b1
tree94caea55c324157c37b66f0116fbdfc10455a4e2
parentf748fa47f84397490bba5c51466f769b18e96f35
tgsi_to_nir: Support FACE and POSITION properly.

Previously, FACE was hard-coded as a sysval, but TTN emulated
it incorrectly. Also, POSITION was not supported when it was
a sysval. This patch fixes these by allowing both of them to
be sysvals or inputs, based on driver capabilities. It also
fixes the TGSI FACE emulation based on the TGSI spec.

Signed-Off-By: Timur Kristóf <timur.kristof@gmail.com>
Tested-by: Andre Heider <a.heider@gmail.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/gallium/auxiliary/nir/tgsi_to_nir.c