Add grammars, C header, and header generator for vendor and KHR extended instruction...
authorDavid Neto <dneto@google.com>
Wed, 26 Feb 2020 18:58:17 +0000 (13:58 -0500)
committerGitHub <noreply@github.com>
Wed, 26 Feb 2020 18:58:17 +0000 (11:58 -0700)
commit0a7fc45259910f07f00c5a3fa10be5678bee1f83
treef45e7edffb792166d18d13c391ffede11acac58f
parent5dbc1c32182e17b8ab8e8158a802ecabaf35aad3
Add grammars, C header, and header generator for vendor and KHR extended instruction sets (#143)

* Add JSON grammars for extened instruction sets

Add AMD extended instruction sets
Add DebugInfo
Add OpenCL.DebugInfo.100

* Add script to generate C headers from extinst grammar

This is cloned then adapted from the same-named script in SPIRV-Tools
(contributed under same authorship but different copyright).

Invoke the script as part of the overall header generation script.

* Add generated C header for extended instruction sets

Add for DebugInfo and OpenCLDebugInfo
Add for AMD vendor extended instruction sets

* Update the README for extinst header generation

* Fix header include guard to match directory structure

* Ensure generated header ends in newline

* Fix typo in file reference

* Fix name of AMD_shader_explicit_vertex_parameter.h

* Avoid duplicate generation

* Split Revision and Version enum values by newlines

Per code review request

* Convert C header generator driver to Python3

* Fix README for Python3 for extinst header generation

* Use 4-space in generated headers, consistently
16 files changed:
README.md
include/spirv/unified1/AMD_gcn_shader.h [new file with mode: 0644]
include/spirv/unified1/AMD_shader_ballot.h [new file with mode: 0644]
include/spirv/unified1/AMD_shader_explicit_vertex_parameter.h [new file with mode: 0644]
include/spirv/unified1/AMD_shader_trinary_minmax.h [new file with mode: 0644]
include/spirv/unified1/DebugInfo.h [new file with mode: 0644]
include/spirv/unified1/OpenCLDebugInfo100.h [new file with mode: 0644]
include/spirv/unified1/extinst.debuginfo.grammar.json [new file with mode: 0644]
include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json [new file with mode: 0644]
include/spirv/unified1/extinst.spv-amd-gcn-shader.grammar.json [new file with mode: 0644]
include/spirv/unified1/extinst.spv-amd-shader-ballot.grammar.json [new file with mode: 0644]
include/spirv/unified1/extinst.spv-amd-shader-explicit-vertex-parameter.grammar.json [new file with mode: 0644]
include/spirv/unified1/extinst.spv-amd-shader-trinary-minmax.grammar.json [new file with mode: 0644]
tools/buildHeaders/bin/generate_language_headers.py [new file with mode: 0755]
tools/buildHeaders/bin/makeExtinstHeaders.py [new file with mode: 0755]
tools/buildHeaders/bin/makeHeaders