[Mesa-dev] [PATCH v2 11/32] nir: add serialization and deserialization
Jordan Justen
jordan.l.justen at intel.com
Fri Oct 20 22:03:11 UTC 2017
On 2017-10-18 22:31:59, Jordan Justen wrote:
> From: Connor Abbott <cwabbott0 at 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.justen at 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
More information about the mesa-dev
mailing list