nir: Define system values for vc4's blending-lowering arguments.
authorEric Anholt <eric@anholt.net>
Wed, 27 Jul 2016 00:31:44 +0000 (17:31 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 22 Aug 2016 18:52:26 +0000 (11:52 -0700)
commite8378fee0c20ecd26451c079c725420077606cb9
tree3603185648555d9e8a7a70efa52a79f2f97fd629
parent475ce61d1aa0fb06202511b4ea8ad9bd1fab64d0
nir: Define system values for vc4's blending-lowering arguments.

In the GLSL-to-NIR conversion of VC4, I had a bit of trouble with what I
was calling the "state uniforms" that I was putting into the NIR fighting
with its other lowering passes.  Instead of using magic uniform base
numbers in the backend, follow the lead of load_user_clip_plane and just
define system values for them.

v2: Fix unintended change to channel_num, drop unspecified const_index
    value on blend_const_color_r_float.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/nir/nir_intrinsics.h
src/gallium/drivers/vc4/vc4_nir_lower_blend.c
src/gallium/drivers/vc4/vc4_nir_lower_io.c
src/gallium/drivers/vc4/vc4_program.c
src/gallium/drivers/vc4/vc4_qir.h