Module: Mesa Branch: master Commit: 2e4ab489b5963e57df01fa20bb95d67139de8b75 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2e4ab489b5963e57df01fa20bb95d67139de8b75
Author: Rob Clark <[email protected]> Date: Thu Sep 17 21:07:41 2015 -0400 nir/builder: fix c++11 compiler warning Fixes: In file included from nir/nir_lower_samplers.cpp:27:0: nir/nir_builder.h: In function 'nir_ssa_def* nir_channel(nir_builder*, nir_ssa_def*, int)': nir/nir_builder.h:222:37: warning: narrowing conversion of 'c' from 'int' to 'unsigned int' inside { } is ill-formed in C++11 [-Wnarrowing] unsigned swizzle[4] = {c, c, c, c}; Signed-off-by: Rob Clark <[email protected]> --- src/glsl/nir/nir_builder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/nir/nir_builder.h b/src/glsl/nir/nir_builder.h index 44134cf..4753330 100644 --- a/src/glsl/nir/nir_builder.h +++ b/src/glsl/nir/nir_builder.h @@ -217,7 +217,7 @@ 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) +nir_channel(nir_builder *b, nir_ssa_def *def, unsigned c) { unsigned swizzle[4] = {c, c, c, c}; return nir_swizzle(b, def, swizzle, 1, false); _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
