nir: Add blend_const_color_rgba sysval
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Mon, 6 May 2019 02:00:37 +0000 (02:00 +0000)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Fri, 10 May 2019 15:49:28 +0000 (15:49 +0000)
commit006cafc2430bbc334644d9520c4847e5a6b71b17
tree168a643888b5c0040039c1f618272bbcac36ad55
parent6b0472b18199aecba30052ad7d2936de943d0cfb
nir: Add blend_const_color_rgba sysval

This represents a float vec4 constant color, as passed to glBlendColor.
While the existing 4 shader sysvals are retained to minimize code churn,
a single vectorized intrinsic is required for efficient blending on
vector architectures. (This may also apply to archictectures like
Bifrost where ALU is scalar but load/store is vector; it largely depends
on how blending is implemented per-driver.)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/compiler/nir/nir_intrinsics.py