summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_intrinsics.py
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-05-06 02:00:37 +0000
committerAlyssa Rosenzweig <[email protected]>2019-05-10 15:49:28 +0000
commit006cafc2430bbc334644d9520c4847e5a6b71b17 (patch)
tree168a643888b5c0040039c1f618272bbcac36ad55 /src/compiler/nir/nir_intrinsics.py
parent6b0472b18199aecba30052ad7d2936de943d0cfb (diff)
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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_intrinsics.py')
-rw-r--r--src/compiler/nir/nir_intrinsics.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_intrinsics.py b/src/compiler/nir/nir_intrinsics.py
index 3a0470c2ca1..df459a3cdec 100644
--- a/src/compiler/nir/nir_intrinsics.py
+++ b/src/compiler/nir/nir_intrinsics.py
@@ -568,11 +568,14 @@ system_value("viewport_z_offset", 1)
system_value("viewport_scale", 3)
system_value("viewport_offset", 3)
-# Blend constant color values. Float values are clamped.#
+# Blend constant color values. Float values are clamped. Vectored versions are
+# provided as well for driver convenience
+
system_value("blend_const_color_r_float", 1)
system_value("blend_const_color_g_float", 1)
system_value("blend_const_color_b_float", 1)
system_value("blend_const_color_a_float", 1)
+system_value("blend_const_color_rgba", 4)
system_value("blend_const_color_rgba8888_unorm", 1)
system_value("blend_const_color_aaaa8888_unorm", 1)