program: Extend prog_to_nir handle system values.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 1 Feb 2019 05:52:50 +0000 (21:52 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 5 Feb 2019 21:51:51 +0000 (13:51 -0800)
commit536abd453bfedd4a424d94f4559371fd38cfaa7b
tree91221e567bb1cd2d2309d5f12ef53a5b1a181ae4
parentfa38ca25f6ab5ce55450442d01791dd68f0a90f4
program: Extend prog_to_nir handle system values.

Some drivers, such as radeonsi, use a system value for gl_FragCoord
rather than an input variable.  In this case, our Mesa IR will have
a PROGRAM_SYSTEM_VALUE register, which we need to translate.

This makes prog_to_nir work for Gallium drivers which expose the
PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL capability bit.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/program/prog_to_nir.c