nir: add serialization and deserialization
authorConnor Abbott <cwabbott0@gmail.com>
Wed, 13 Sep 2017 03:17:51 +0000 (23:17 -0400)
committerJordan Justen <jordan.l.justen@intel.com>
Wed, 1 Nov 2017 06:36:53 +0000 (23:36 -0700)
commit120da009755414ba62b0f902a67ad22004b9a304
tree2353d1c708813407b91186057975ce26fa173564
parent57892a23be9058b535072ce03dc155f42db02be4
nir: add serialization and deserialization

v2 (Jason Ekstrand):
 - Various whitespace cleanups
 - Add helpers for reading/writing objects
 - Rework derefs
 - [de]serialize nir_shader::num_*
 - Fix uses of blob_reserve_bytes
 - Use a bitfield struct for packing tex_instr data

v3:
 - Zero nir_variable struct on deserialization. (Jordan)
 - Allow nir_serialize.h to be included in C++. (Jordan)
 - Handle NULL info.name. (Jason)
 - Set info.name to NULL when name is NULL. (Jordan)

Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/Makefile.sources
src/compiler/nir/meson.build
src/compiler/nir/nir_serialize.c [new file with mode: 0644]
src/compiler/nir/nir_serialize.h [new file with mode: 0644]