spirv: Generate spirv_info.c
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 17 Jul 2017 19:31:06 +0000 (12:31 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 18 Jul 2017 16:43:12 +0000 (09:43 -0700)
commit2dd4e2ece32f86d7973cf444c7dae06d4cb1e40e
tree58f171ee24149c3d85383bad37b624a8eec10b29
parentde765ec9dc90c7e8325c6b101439fdebc87cf064
spirv: Generate spirv_info.c

The old table based spirv_*_to_string functions would return NULL for
any values "inside" the table that didn't have entries.  The tables also
needed to be updated by hand each time a new spirv.h was imported.
Generate the file instead.

v2: Make this script work more like src/mesa/main/format_fallback.py.
Suggested by Jason.  Remove SCons supports.  Suggested by Jason and
Emil.  Put all the build work in Makefile.nir.am in lieu of adding a new
Makefile.spirv.am.  Suggested by Emil.  Add support for Android builds
based on code provided by Emil.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/compiler/Android.nir.gen.mk
src/compiler/Makefile.nir.am
src/compiler/Makefile.sources
src/compiler/spirv/spirv_info.c [deleted file]
src/compiler/spirv/spirv_info_c.py [new file with mode: 0644]