diff options
author | Jason Ekstrand <[email protected]> | 2015-09-15 12:09:06 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-09-15 14:51:05 -0700 |
commit | cb503c322754dd9dba016e703cf8b30177ed157b (patch) | |
tree | ae3eac10651eb45d789956b96e21887089f5c624 | |
parent | 18385bc3ac867bf7fb4070fe0f90bdf8e3e515a4 (diff) |
nir/builder: Use a normal temporary array in nir_channel
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 <[email protected]>
-rw-r--r-- | src/glsl/nir/nir_builder.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/nir/nir_builder.h b/src/glsl/nir/nir_builder.h index cf50f699eae..44134cf4c29 100644 --- 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); } /** |