From d80c342d898275cbd6266c37e70dc422590d7d8c Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Wed, 16 May 2018 10:02:55 -0400 Subject: nir: add deref lowering sanity checking This will be removed at the end of the transition, but add some tracking plus asserts to help ensure that lowering passes are called at the correct point (pre or post deref instruction lowering) as passes are converted and the point where lower_deref_instrs() is called is moved. Signed-off-by: Rob Clark Acked-by: Rob Clark Acked-by: Bas Nieuwenhuizen Acked-by: Dave Airlie Reviewed-by: Kenneth Graunke --- src/compiler/nir/nir_serialize.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/compiler/nir/nir_serialize.c') diff --git a/src/compiler/nir/nir_serialize.c b/src/compiler/nir/nir_serialize.c index 834a65b07e8..155205d2198 100644 --- a/src/compiler/nir/nir_serialize.c +++ b/src/compiler/nir/nir_serialize.c @@ -1215,6 +1215,7 @@ nir_serialize(struct blob *blob, const nir_shader *nir) blob_write_uint32(blob, nir->num_uniforms); blob_write_uint32(blob, nir->num_outputs); blob_write_uint32(blob, nir->num_shared); + blob_write_uint32(blob, nir->lowered_derefs); blob_write_uint32(blob, exec_list_length(&nir->functions)); nir_foreach_function(fxn, nir) { @@ -1270,6 +1271,7 @@ nir_deserialize(void *mem_ctx, ctx.nir->num_uniforms = blob_read_uint32(blob); ctx.nir->num_outputs = blob_read_uint32(blob); ctx.nir->num_shared = blob_read_uint32(blob); + ctx.nir->lowered_derefs = blob_read_uint32(blob); unsigned num_functions = blob_read_uint32(blob); for (unsigned i = 0; i < num_functions; i++) -- cgit v1.2.3