summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_opcodes.py
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-09-10 10:51:46 -0700
committerJason Ekstrand <[email protected]>2015-09-15 12:38:48 -0700
commit47739c7df430664c3a998163a1e8a4a5e1901691 (patch)
treed6fa66bfb82d9e2e73b7ad755a7abae1eb84cadd /src/glsl/nir/nir_opcodes.py
parent2458ea95c5676807a064f24ec720f12506975402 (diff)
nir: Add a fdot instruction that replicates the result to a vec4
Fortunately, nir_constant_expr already auto-splats if "dst" never shows up in the constant expression field so we don't need to do anything there. Reviewed-by: Connor Abbott <[email protected]> Reviewed-by: Eduardo Lima Mitev <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir_opcodes.py')
-rw-r--r--src/glsl/nir/nir_opcodes.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glsl/nir/nir_opcodes.py b/src/glsl/nir/nir_opcodes.py
index df5b7e2d517..495d109375b 100644
--- a/src/glsl/nir/nir_opcodes.py
+++ b/src/glsl/nir/nir_opcodes.py
@@ -453,6 +453,9 @@ binop("fxor", tfloat, commutative,
binop_reduce("fdot", 1, tfloat, tfloat, "{src0} * {src1}", "{src0} + {src1}",
"{src}")
+binop_reduce("fdot_replicated", 4, tfloat, tfloat,
+ "{src0} * {src1}", "{src0} + {src1}", "{src}")
+
binop("fmin", tfloat, "", "fminf(src0, src1)")
binop("imin", tint, commutative + associative, "src1 > src0 ? src0 : src1")
binop("umin", tunsigned, commutative + associative, "src1 > src0 ? src0 : src1")