Mesa (fix_msvc_build): nir: Don't use empty initializer list in lower_io_arrays
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Oct 25 13:49:17 UTC 2019
Module: Mesa
Branch: fix_msvc_build
Commit: 1c7929a29358e3933d4f175a60a812436daf33a3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1c7929a29358e3933d4f175a60a812436daf33a3
Author: Jan Zielinski <jan.zielinski at intel.com>
Date: Fri Oct 25 17:42:58 2019 +0200
nir: Don't use empty initializer list in lower_io_arrays
Using empty initializer list in C code causes compilation
issues with MSVC. gcc and clang display warnings (if the
warning level is high enough), but do not fail the build.
MSVC does.
Fixes: ee2050b1111
---
src/compiler/nir/nir_lower_io_arrays_to_elements.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/compiler/nir/nir_lower_io_arrays_to_elements.c b/src/compiler/nir/nir_lower_io_arrays_to_elements.c
index a0d0eb740db..ed002739836 100644
--- a/src/compiler/nir/nir_lower_io_arrays_to_elements.c
+++ b/src/compiler/nir/nir_lower_io_arrays_to_elements.c
@@ -349,7 +349,7 @@ nir_lower_io_arrays_to_elements_no_indirects(nir_shader *shader,
struct hash_table *split_inputs = _mesa_pointer_hash_table_create(NULL);
struct hash_table *split_outputs = _mesa_pointer_hash_table_create(NULL);
- BITSET_DECLARE(indirects, 4 * MAX_VARYINGS_INCL_PATCH) = {};
+ BITSET_DECLARE(indirects, 4 * MAX_VARYINGS_INCL_PATCH) = {0};
lower_io_arrays_to_elements(shader, nir_var_shader_out,
indirects, split_outputs, true);
@@ -387,7 +387,7 @@ nir_lower_io_arrays_to_elements(nir_shader *producer, nir_shader *consumer)
struct hash_table *split_inputs = _mesa_pointer_hash_table_create(NULL);
struct hash_table *split_outputs = _mesa_pointer_hash_table_create(NULL);
- BITSET_DECLARE(indirects, 4 * MAX_VARYINGS_INCL_PATCH) = {};
+ BITSET_DECLARE(indirects, 4 * MAX_VARYINGS_INCL_PATCH) = {0};
create_indirects_mask(producer, indirects, nir_var_shader_out);
create_indirects_mask(consumer, indirects, nir_var_shader_in);
More information about the mesa-commit
mailing list