nir: Add "viewport vector" system values
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Wed, 3 Apr 2019 01:45:44 +0000 (01:45 +0000)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Thu, 4 Apr 2019 03:44:09 +0000 (03:44 +0000)
commita83862754e94ea11602ac8c43b940b26775b9c4d
treec3f73b2dd263435fabe396ad1360318af9198b13
parentb85ca86c1eb2cd095351196cd3a3eb7c1ff4184a
nir: Add "viewport vector" system values

While a partial set of viewport system values exist, these are scalar
values, which is a poor fit for viewport transformations on vector ISAs
like Midgard (where the vec3 values for scale and offset each need to be
coherent in a vec4 uniform slot to take advantage of vectorized
transform math). This patch adds vec3 scale/offset fields corresponding
to the 3D Gallium viewport / glViewport+depth

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/compiler/nir/nir_intrinsics.py