<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Sep 15, 2017 at 6:39 PM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Connor Abbott <<a href="mailto:cwabbott0@gmail.com">cwabbott0@gmail.com</a>><br>
<br>
v2 (Jason Ekstrand):<br>
- Various whitespace cleanups<br>
- Add helpers for reading/writing objects<br>
- Rework derefs<br>
- [de]serialize nir_shader::num_*<br>
- Fix uses of blob_reserve_bytes<br>
- Use a bitfield struct for packing tex_instr data<br>
---<br>
src/compiler/Makefile.sources | 2 +<br>
src/compiler/nir/nir_<wbr>serialize.c | 1195 ++++++++++++++++++++++++++++++<wbr>++++++++<br>
src/compiler/nir/nir_<wbr>serialize.h | 35 ++<br>
3 files changed, 1232 insertions(+)<br>
create mode 100644 src/compiler/nir/nir_<wbr>serialize.c<br>
create mode 100644 src/compiler/nir/nir_<wbr>serialize.h<span class="gmail-HOEnZb"><font color="#888888"><br>
</font></span></blockquote></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">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.</div><div class="gmail_extra"><br></div><div class="gmail_extra">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?<br></div></div>