Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Headers.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Neto <dneto@google.com>2020-02-26 21:58:17 +0300
committerGitHub <noreply@github.com>2020-02-26 21:58:17 +0300
commit0a7fc45259910f07f00c5a3fa10be5678bee1f83 (patch)
treef45e7edffb792166d18d13c391ffede11acac58f /README.md
parent5dbc1c32182e17b8ab8e8158a802ecabaf35aad3 (diff)
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
Diffstat (limited to 'README.md')
-rw-r--r--README.md22
1 files changed, 21 insertions, 1 deletions
diff --git a/README.md b/README.md
index 53c476f..2ea3dc5 100644
--- a/README.md
+++ b/README.md
@@ -119,7 +119,7 @@ cc_library(
#include "spirv/unified1/spirv.hpp"
```
-## Generating the headers from the JSON grammar
+## Generating headers from the JSON grammar for the SPIR-V core instruction set
This will generally be done by Khronos, for a change to the JSON grammar.
However, the project for the tool to do this is included in this repository,
@@ -137,6 +137,26 @@ Notes:
and that influences the languages used, for legacy reasons
- the C++ structures built may similarly include more than strictly necessary, for the same reason
+## Generating C headers for extended instruction sets
+
+The [GLSL.std.450.h](include/spirv/unified1/GLSL.std.450.h)
+and [OpenCL.std.h](include/spirv/unified1/OpenCL.std.h) extended instruction set headers
+are maintained manually.
+
+The C/C++ header for each of the other extended instruction sets
+is generated from the corresponding JSON grammar file. For example, the
+[OpenCLDebugInfo100.h](include/spirv/unified1/OpenCLDebugInfo100.h) header
+is generated from the
+[extinst.opencl.debuginfo.100.grammar.json](include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json)
+grammar file.
+
+To generate these C/C++ headers, first make sure `python3` is in your PATH, then
+invoke the build script as follows:
+```
+cd tools/buildHeaders
+python3 bin/makeExtinstHeaders.py
+```
+
## FAQ
* *How are different versions published?*