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.
Cc: Rob Clark <[email protected]> --- src/glsl/nir/nir_builder.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/glsl/nir/nir_builder.h b/src/glsl/nir/nir_builder.h index cf50f69..44134cf 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); } /** -- 2.5.0.400.gff86faf _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
