nir: Zero local_size const struct for valgrind & nir_serialize
authorJordan Justen <jordan.l.justen@intel.com>
Mon, 2 Oct 2017 07:05:28 +0000 (00:05 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Wed, 25 Oct 2017 19:36:21 +0000 (12:36 -0700)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_lower_system_values.c

index ba20d3083f18a807c2f5967c857b1d1f6b0d5927..39b1a260bd0db9c44130d0103d57893782d022b6 100644 (file)
@@ -58,6 +58,7 @@ convert_block(nir_block *block, nir_builder *b)
           */
 
          nir_const_value local_size;
+         memset(&local_size, 0, sizeof(local_size));
          local_size.u32[0] = b->shader->info.cs.local_size[0];
          local_size.u32[1] = b->shader->info.cs.local_size[1];
          local_size.u32[2] = b->shader->info.cs.local_size[2];