[Mesa-dev] [PATCH 01/13] nir/builder: add nir_imm_uint()
Samuel Iglesias Gonsálvez
siglesias at igalia.com
Tue Apr 12 08:05:10 UTC 2016
From: Connor Abbott <connor.w.abbott at intel.com>
---
src/compiler/nir/nir_builder.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h
index 29b13fb..38a1cf7 100644
--- a/src/compiler/nir/nir_builder.h
+++ b/src/compiler/nir/nir_builder.h
@@ -154,6 +154,13 @@ nir_imm_ivec4(nir_builder *build, int x, int y, int z, int w)
}
static inline nir_ssa_def *
+nir_imm_uint(nir_builder *build, unsigned x)
+{
+ nir_const_value v = { { .u32 = {x, 0, 0, 0} } };
+ return nir_build_imm(build, 1, v);
+}
+
+static inline nir_ssa_def *
nir_build_alu(nir_builder *build, nir_op op, nir_ssa_def *src0,
nir_ssa_def *src1, nir_ssa_def *src2, nir_ssa_def *src3)
{
--
2.5.0
More information about the mesa-dev
mailing list