[Mesa-dev] [PATCH 1.2/8] spirv: Generate spirv_info.c
Ian Romanick
idr at freedesktop.org
Mon Jul 17 18:15:37 UTC 2017
On 07/17/2017 10:54 AM, Emil Velikov wrote:
> On 15 July 2017 at 02:39, Ian Romanick <idr at freedesktop.org> wrote:
>> From: Ian Romanick <ian.d.romanick at intel.com>
>>
>> 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.
>>
>> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
>> Suggested-by: Jason Ekstrand <jason at jlekstrand.net>
>> ---
>> I am pretty sure the scons changes are bogus... halp, plz?
>>
> From a quick look the following should do it. Can resend as inline,
> etc - let me know what you prefer.
>
> https://github.com/evelikov/Mesa/commit/d8d808db279e8edba441c3416c87324a87a3bff5.patch
>
>> src/compiler/Makefile.am | 2 +
>> src/compiler/Makefile.nir.am | 1 +
>> src/compiler/Makefile.sources | 4 +-
>> src/compiler/Makefile.spirv.am | 31 ++++++++
>> src/compiler/SConscript | 1 +
>> src/compiler/SConscript.spirv | 32 ++++++++
>> src/compiler/spirv/spirv_info.c | 156 -------------------------------------
>> src/compiler/spirv/spirv_info_c.py | 90 +++++++++++++++++++++
>> 8 files changed, 160 insertions(+), 157 deletions(-)
>> create mode 100644 src/compiler/Makefile.spirv.am
>> create mode 100644 src/compiler/SConscript.spirv
>> delete mode 100644 src/compiler/spirv/spirv_info.c
>> create mode 100644 src/compiler/spirv/spirv_info_c.py
>>
> I think you missed "git add spirv....json"
That's in the previous patch... which I guess should also add that file
to EXTRA_DIST, right?
> About keeping the JSON + header file in sync one could do try the following:
> - Add simple bash/other script which parses the revision (other
> unique field) from the files and error out on mismatch.
> - Wire said script to `make check'
> - ...
> - Profit :-)
>
> -Emil
More information about the mesa-dev
mailing list