Mesa (master): nir/builder: add nir_imm_double()
Samuel Iglesias Gonsálvez
samuelig at kemper.freedesktop.org
Thu Apr 28 10:02:38 UTC 2016
Module: Mesa
Branch: master
Commit: 2cf3b28884047f1cdef76542355bd2a4dd653fde
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2cf3b28884047f1cdef76542355bd2a4dd653fde
Author: Connor Abbott <connor.w.abbott at intel.com>
Date: Fri Jul 31 10:52:04 2015 -0700
nir/builder: add nir_imm_double()
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
src/compiler/nir/nir_builder.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h
index 3e3bdcd..a14f9ef 100644
--- a/src/compiler/nir/nir_builder.h
+++ b/src/compiler/nir/nir_builder.h
@@ -115,6 +115,14 @@ nir_imm_float(nir_builder *build, float x)
}
static inline nir_ssa_def *
+nir_imm_double(nir_builder *build, double x)
+{
+ nir_const_value v = { { .f64 = {x, 0, 0, 0} } };
+ nir_ssa_def *def = nir_build_imm(build, 1, 64, v);
+ return def;
+}
+
+static inline nir_ssa_def *
nir_imm_vec4(nir_builder *build, float x, float y, float z, float w)
{
nir_const_value v;
More information about the mesa-commit
mailing list