projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18385bc
)
nir/builder: Use a normal temporary array in nir_channel
author
Jason Ekstrand
<jason.ekstrand@intel.com>
Tue, 15 Sep 2015 19:09:06 +0000
(12:09 -0700)
committer
Jason Ekstrand
<jason.ekstrand@intel.com>
Tue, 15 Sep 2015 21:51:05 +0000
(14:51 -0700)
C++ gets cranky if we take references of temporaries. This isn't a problem
yet in master because nir_builder is never used from C++. However, it will
be in the future so we should fix it now.
Reviewed-by: Rob Clark <robclark@freedesktop.org>
src/glsl/nir/nir_builder.h
patch
|
blob
|
history
diff --git
a/src/glsl/nir/nir_builder.h
b/src/glsl/nir/nir_builder.h
index cf50f699eae76a62739523911d9691c7f95742e0..44134cf4c29ea21e291f93bbaef165442e0fa01c 100644
(file)
--- a/
src/glsl/nir/nir_builder.h
+++ b/
src/glsl/nir/nir_builder.h
@@
-219,7
+219,8
@@
nir_swizzle(nir_builder *build, nir_ssa_def *src, unsigned swiz[4],
static inline nir_ssa_def *
nir_channel(nir_builder *b, nir_ssa_def *def, int c)
{
- return nir_swizzle(b, def, (unsigned[4]){c, c, c, c}, 1, false);
+ unsigned swizzle[4] = {c, c, c, c};
+ return nir_swizzle(b, def, swizzle, 1, false);
}
/**