nir/serialize: Prevent writing uninitialized state_slot data
authorConnor Abbott <cwabbott0@gmail.com>
Fri, 8 Mar 2019 12:05:53 +0000 (13:05 +0100)
committerConnor Abbott <cwabbott0@gmail.com>
Mon, 11 Mar 2019 14:17:41 +0000 (15:17 +0100)
commitd086d16b8165244db53f20dbf60c921f4bb38f38
tree4164a047d16a50a3469338183c87732ccd9b7891
parent47fc359822494935852de1e70e4d840b2fe6a25c
nir/serialize: Prevent writing uninitialized state_slot data

The nir_state_slot struct had some padding that was never initialized.
Serializing the individual parts of the struct is more robust and avoids
the overhead of zeroing it at creation, so just do that.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_serialize.c