[Mesa-dev] [PATCH] nir: fix msvc build
Jason Ekstrand
jason at jlekstrand.net
Sat Jul 14 03:06:39 UTC 2018
On July 13, 2018 19:51:33 <sroland at vmware.com> wrote:
> From: Roland Scheidegger <sroland at vmware.com>
>
> Empty initializer braces aren't valid c (it's a gnu extension, and
> it's valid in c++).
> Hopefully fixes appveyor / msvc build...
>
> Fixes a3150c1d06ae7766c3d3fe3b33432e55c3c7527e
> ---
> src/compiler/nir/nir_format_convert.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/compiler/nir/nir_format_convert.h
> b/src/compiler/nir/nir_format_convert.h
> index 33d90f260c..45532b7488 100644
> --- a/src/compiler/nir/nir_format_convert.h
> +++ b/src/compiler/nir/nir_format_convert.h
> @@ -121,7 +121,7 @@ nir_format_bitcast_uint_vec_unmasked(nir_builder *b,
> nir_ssa_def *src,
> DIV_ROUND_UP(src->num_components * src_bits, dst_bits);
> assert(dst_components <= 4);
>
> - nir_ssa_def *dst_chan[4] = { };
> + nir_ssa_def *dst_chan[4] = {0};
Maybe use NULL instead? Either way, R-b me.
More information about the mesa-dev
mailing list