On 2017-10-18 22:31:59, Jordan Justen wrote: > From: Connor Abbott <cwabbo...@gmail.com> > > diff --git a/src/compiler/nir/nir_serialize.c > b/src/compiler/nir/nir_serialize.c > new file mode 100644 > index 0000000000..fb6232446b > --- /dev/null > +++ b/src/compiler/nir/nir_serialize.c
> +static void > +read_instr(read_ctx *ctx, nir_block *block) > +{ > + nir_instr_type type = blob_read_uint32(ctx->blob); > + nir_instr *instr; > + switch (type) { > + case nir_instr_type_alu: > + instr = &read_alu(ctx)->instr; > + break; > + case nir_instr_type_intrinsic: > + instr = &read_intrinsic(ctx)->instr; > + break; > + case nir_instr_type_load_const: > + instr = &read_load_const(ctx)->instr; > + break; > + case nir_instr_type_ssa_undef: > + instr = &read_ssa_undef(ctx)->instr; > + break; > + case nir_instr_type_tex: > + instr = &read_tex(ctx)->instr; > + break; > + case nir_instr_type_phi: > + /* Phi instructions are a bit of a special case when readin because we typo: readin Patches 1-4 & 11-12 Reviewed-by: Jordan Justen <jordan.l.jus...@intel.com> For this I'll admit that I just checked that the reading/writing aligned, so I could easily have missed fields/structures. -Jordan _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev