On Fri, Sep 15, 2017 at 6:39 PM, Jason Ekstrand <ja...@jlekstrand.net>
wrote:

> From: Connor Abbott <cwabbo...@gmail.com>
>
> 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
> ---
>  src/compiler/Makefile.sources    |    2 +
>  src/compiler/nir/nir_serialize.c | 1195 ++++++++++++++++++++++++++++++
> ++++++++
>  src/compiler/nir/nir_serialize.h |   35 ++
>  3 files changed, 1232 insertions(+)
>  create mode 100644 src/compiler/nir/nir_serialize.c
>  create mode 100644 src/compiler/nir/nir_serialize.h
>

I didn't send an R-B with this patch because, to be honest, I didn't
actually review it properly.  I just fixed it to the point where it's
working.

The one issue that I think should probably still be considered is error
checking.  This pass does almost none beyond a couple of asserts.  It
doesn't even check that you didn't overrun the end of the blob.  How robust
does it need to be against tampering?  For an on-disk shader cache, we're
probably safe so long as we have some sort of checksum in the file.  For
program_binary, do we want to be a bit safer?
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to