projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46cd549
)
nir/builder: Add an int64 immediate helper
author
Jason Ekstrand
<jason.ekstrand@intel.com>
Fri, 24 Feb 2017 05:35:00 +0000
(21:35 -0800)
committer
Jason Ekstrand
<jason.ekstrand@intel.com>
Fri, 3 Mar 2017 21:59:24 +0000
(13:59 -0800)
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/compiler/nir/nir_builder.h
patch
|
blob
|
history
diff --git
a/src/compiler/nir/nir_builder.h
b/src/compiler/nir/nir_builder.h
index 2eaa02506561bcf46143db72f1a0a49d0c1fe7b4..1dc56ebf53d42695bf27933ce2033a59d7089682 100644
(file)
--- a/
src/compiler/nir/nir_builder.h
+++ b/
src/compiler/nir/nir_builder.h
@@
-252,6
+252,17
@@
nir_imm_int(nir_builder *build, int x)
return nir_build_imm(build, 1, 32, v);
}
+static inline nir_ssa_def *
+nir_imm_int64(nir_builder *build, int64_t x)
+{
+ nir_const_value v;
+
+ memset(&v, 0, sizeof(v));
+ v.i64[0] = x;
+
+ return nir_build_imm(build, 1, 64, v);
+}
+
static inline nir_ssa_def *
nir_imm_ivec4(nir_builder *build, int x, int y, int z, int w)
{