Mesa (master): nir: Fix array initializer

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Oct 26 18:36:17 UTC 2018


Module: Mesa
Branch: master
Commit: 7e64e39f8bb54e45cc76dcd33d38537696e53a44
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7e64e39f8bb54e45cc76dcd33d38537696e53a44

Author: Brian Paul <brianp at vmware.com>
Date:   Fri Oct 26 12:34:09 2018 -0600

nir: Fix array initializer

Empty initializer is not standard C.  This fixes MSVC build.

Trivial.

---

 src/compiler/nir/nir_opt_if.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/nir/nir_opt_if.c b/src/compiler/nir/nir_opt_if.c
index 72a7285c1e..1f2e1f2113 100644
--- a/src/compiler/nir/nir_opt_if.c
+++ b/src/compiler/nir/nir_opt_if.c
@@ -449,7 +449,7 @@ propagate_condition_eval(nir_builder *b, nir_if *nif, nir_src *use_src,
 
    b->cursor = nir_before_src(alu_use, is_if_condition);
 
-   nir_ssa_def *def[2] = { };
+   nir_ssa_def *def[2] = {0};
    for (unsigned i = 0; i < nir_op_infos[alu->op].num_inputs; i++) {
       if (alu->src[i].src.ssa == use_src->ssa) {
          def[i] = nir_imm_bool(b, bool_value);




More information about the mesa-commit mailing list