On 22/10/18 23:13, Jason Ekstrand wrote:
> Instead of doing our own constant folding, we just emit instructions and
> let constant folding happen.  This is substantially simpler and lets us
> use the nir_imm_bool helper instead of dealing with the const_value's
> ourselves.
> ---
>   src/compiler/nir/nir_opt_if.c | 91 ++++++++++++-----------------------
>   1 file changed, 30 insertions(+), 61 deletions(-)
> 
> diff --git a/src/compiler/nir/nir_opt_if.c b/src/compiler/nir/nir_opt_if.c
> index 0c94aa170b5..60368a0259e 100644
> --- a/src/compiler/nir/nir_opt_if.c
> +++ b/src/compiler/nir/nir_opt_if.c
[...]
> +   nir_ssa_def *def[2] = { };

I'm afraid empty struct/array initializers aren't standard C and MSVC 
throws an error.

I really wish there was some GCC warning we could enable for this, as it 
appears to be a common mistake, particularly on nir, probably due to all 
simple POD structs.  But I couldn't find one.

Jose
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to