aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-04-25 01:07:22 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-04-25 01:07:22 +0000
commite77e441774b57a4b01567cdcb9e5b67a5cc2ee81 (patch)
treea537e7dae0f0339e9e520540a418915dafe0640c
parent9dbc2f4dcef149aeda48ef53b404e3aafa33024e (diff)
parent5a5d05464af49430eb495f1a8c6e660ce30a358e (diff)
downloadSPIRV-Headers-android11-s1-release.tar.gz
Change-Id: If25453e1b336a8ea58f56ad5120912aa8373d726
-rw-r--r--BUILD.bazel1
-rw-r--r--BUILD.gn43
-rw-r--r--CMakeLists.txt106
-rw-r--r--README.md22
-rw-r--r--include/spirv/spir-v.xml7
-rw-r--r--include/spirv/unified1/AMD_gcn_shader.h52
-rw-r--r--include/spirv/unified1/AMD_shader_ballot.h53
-rw-r--r--include/spirv/unified1/AMD_shader_explicit_vertex_parameter.h50
-rw-r--r--include/spirv/unified1/AMD_shader_trinary_minmax.h58
-rw-r--r--include/spirv/unified1/DebugInfo.h143
-rw-r--r--include/spirv/unified1/NonSemanticDebugPrintf.h50
-rw-r--r--include/spirv/unified1/OpenCLDebugInfo100.h156
-rw-r--r--include/spirv/unified1/extinst.debuginfo.grammar.json568
-rw-r--r--include/spirv/unified1/extinst.nonsemantic.debugprintf.grammar.json13
-rw-r--r--include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json632
-rw-r--r--include/spirv/unified1/extinst.spv-amd-gcn-shader.grammar.json26
-rw-r--r--include/spirv/unified1/extinst.spv-amd-shader-ballot.grammar.json41
-rw-r--r--include/spirv/unified1/extinst.spv-amd-shader-explicit-vertex-parameter.grammar.json14
-rw-r--r--include/spirv/unified1/extinst.spv-amd-shader-trinary-minmax.grammar.json95
-rw-r--r--include/spirv/unified1/spirv.core.grammar.json978
-rw-r--r--include/spirv/unified1/spirv.cs111
-rw-r--r--include/spirv/unified1/spirv.h136
-rw-r--r--include/spirv/unified1/spirv.hpp137
-rw-r--r--include/spirv/unified1/spirv.hpp11137
-rw-r--r--include/spirv/unified1/spirv.json112
-rw-r--r--include/spirv/unified1/spirv.lua106
-rw-r--r--include/spirv/unified1/spirv.py106
-rw-r--r--include/spirv/unified1/spv.d111
-rwxr-xr-xtools/buildHeaders/bin/generate_language_headers.py242
-rwxr-xr-xtools/buildHeaders/bin/makeExtinstHeaders.py27
-rwxr-xr-xtools/buildHeaders/bin/makeHeaders2
-rw-r--r--tools/buildHeaders/header.cpp6
-rw-r--r--tools/buildHeaders/jsonToSpirv.cpp24
-rw-r--r--tools/buildHeaders/jsonToSpirv.h7
34 files changed, 4240 insertions, 132 deletions
diff --git a/BUILD.bazel b/BUILD.bazel
index 29f43ce..9c53db3 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -81,6 +81,7 @@ cc_library(
"include/spirv/1.2/GLSL.std.450.h",
"include/spirv/1.2/OpenCL.std.h",
"include/spirv/unified1/GLSL.std.450.h",
+ "include/spirv/unified1/NonSemanticDebugPrintf.h",
"include/spirv/unified1/OpenCL.std.h",
],
includes = ["include"],
diff --git a/BUILD.gn b/BUILD.gn
new file mode 100644
index 0000000..57e35f0
--- /dev/null
+++ b/BUILD.gn
@@ -0,0 +1,43 @@
+# Copyright (c) 2020 Google LLC
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and/or associated documentation files (the "Materials"),
+# to deal in the Materials without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Materials, and to permit persons to whom the
+# Materials are furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Materials.
+#
+# MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
+# STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
+# HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
+#
+# THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
+# IN THE MATERIALS.
+
+config("spv_headers_public_config") {
+ include_dirs = [ "include" ]
+}
+
+source_set("spv_headers") {
+ sources = [
+ "include/spirv/1.2/GLSL.std.450.h",
+ "include/spirv/1.2/OpenCL.std.h",
+ "include/spirv/1.2/spirv.h",
+ "include/spirv/1.2/spirv.hpp",
+ "include/spirv/unified1/GLSL.std.450.h",
+ "include/spirv/unified1/NonSemanticDebugPrintf.h",
+ "include/spirv/unified1/OpenCL.std.h",
+ "include/spirv/unified1/spirv.h",
+ "include/spirv/unified1/spirv.hpp",
+ ]
+
+ public_configs = [ ":spv_headers_public_config" ]
+}
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5fd0196..eb46947 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,7 +29,7 @@
# https://www.khronos.org/registry/spir-v/
#
cmake_minimum_required(VERSION 3.0)
-project(SPIRV-Headers VERSION 1.4.1)
+project(SPIRV-Headers VERSION 1.5.1)
# There are two ways to use this project.
#
@@ -51,9 +51,18 @@ add_custom_target(install-headers
option(SPIRV_HEADERS_SKIP_EXAMPLES "Skip building examples"
${SPIRV_HEADERS_SKIP_EXAMPLES})
+
+option(SPIRV_HEADERS_SKIP_INSTALL "Skip install"
+ ${SPIRV_HEADERS_SKIP_INSTALL})
+
if(NOT ${SPIRV_HEADERS_SKIP_EXAMPLES})
set(SPIRV_HEADERS_ENABLE_EXAMPLES ON)
endif()
+
+if(NOT ${SPIRV_HEADERS_SKIP_INSTALL})
+ set(SPIRV_HEADERS_ENABLE_INSTALL ON)
+endif()
+
if (SPIRV_HEADERS_ENABLE_EXAMPLES)
message(STATUS "Building SPIRV-Header examples")
add_subdirectory(example)
@@ -67,49 +76,52 @@ target_include_directories(${PROJECT_NAME} INTERFACE
# Installation
-set(config_install_dir "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
-
-set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")
-
-set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake")
-set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake")
-set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
-set(namespace "${PROJECT_NAME}::")
-
-include(CMakePackageConfigHelpers)
-write_basic_package_version_file(
- "${version_config}"
- COMPATIBILITY SameMajorVersion
-)
-
-configure_package_config_file(
- "cmake/Config.cmake.in"
- "${project_config}"
- INSTALL_DESTINATION "${config_install_dir}"
-)
-
-install(
- TARGETS ${PROJECT_NAME}
- EXPORT "${TARGETS_EXPORT_NAME}"
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
- INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
-)
-
-install(
- DIRECTORY include/spirv
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
-)
-
-install(
- FILES "${project_config}" "${version_config}"
- DESTINATION "${config_install_dir}"
-)
-
-install(
- EXPORT "${TARGETS_EXPORT_NAME}"
- NAMESPACE "${namespace}"
- DESTINATION "${config_install_dir}"
-)
-
+if (SPIRV_HEADERS_ENABLE_INSTALL)
+ message(STATUS "Installing SPIRV-Header")
+
+ set(config_install_dir "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
+
+ set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")
+
+ set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake")
+ set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake")
+ set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets")
+ set(namespace "${PROJECT_NAME}::")
+
+ include(CMakePackageConfigHelpers)
+ write_basic_package_version_file(
+ "${version_config}"
+ COMPATIBILITY SameMajorVersion
+ )
+
+ configure_package_config_file(
+ "cmake/Config.cmake.in"
+ "${project_config}"
+ INSTALL_DESTINATION "${config_install_dir}"
+ )
+
+ install(
+ TARGETS ${PROJECT_NAME}
+ EXPORT "${TARGETS_EXPORT_NAME}"
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ )
+
+ install(
+ DIRECTORY include/spirv
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ )
+
+ install(
+ FILES "${project_config}" "${version_config}"
+ DESTINATION "${config_install_dir}"
+ )
+
+ install(
+ EXPORT "${TARGETS_EXPORT_NAME}"
+ NAMESPACE "${namespace}"
+ DESTINATION "${config_install_dir}"
+ )
+endif()
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?*
diff --git a/include/spirv/spir-v.xml b/include/spirv/spir-v.xml
index 523460d..2fac9c5 100644
--- a/include/spirv/spir-v.xml
+++ b/include/spirv/spir-v.xml
@@ -111,6 +111,7 @@
<ids type="opcode" start="5696" end="5823" vendor="Intel" comment="Contact ben.ashbaugh@intel.com"/>
<ids type="opcode" start="5824" end="5951" vendor="Intel" comment="Contact michael.kinsner@intel.com"/>
<ids type="opcode" start="5952" end="6015" vendor="Codeplay" comment="Contact victor@codeplay.com"/>
+ <ids type="opcode" start="6016" end="6079" vendor="Khronos" comment="Contact @tobski"/>
<!-- Opcodes & enumerants reservable for future use. To get a block, allocate
multiples of 64 starting at the lowest available point in this
block and add a corresponding <ids> tag immediately above. Make
@@ -119,7 +120,7 @@
<!-- Example new block: <ids type="opcode" start="XXXX" end="XXXX+64n-1" vendor="Add vendor" comment="Contact TBD"/> -->
- <ids type="opcode" start="6016" end="4294967295" comment="Opcode range reservable for future use by vendors"/>
+ <ids type="opcode" start="6080" end="4294967295" comment="Opcode range reservable for future use by vendors"/>
<!-- SECTION: SPIR-V Loop Control Bit Reservations -->
@@ -138,8 +139,8 @@
<!-- Reserved loop control bits -->
<ids type="LoopControl" start="0" end="15" vendor="Khronos" comment="Reserved LoopControl bits, not available to vendors - see the SPIR-V Specification"/>
- <ids type="LoopControl" start="16" end="19" vendor="Intel" comment="Contact michael.kinsner@intel.com"/>
- <ids type="LoopControl" start="20" end="30" comment="Unreserved bits reservable for use by vendors"/>
+ <ids type="LoopControl" start="16" end="22" vendor="Intel" comment="Contact michael.kinsner@intel.com"/>
+ <ids type="LoopControl" start="23" end="30" comment="Unreserved bits reservable for use by vendors"/>
<ids type="LoopControl" start="31" end="31" vendor="Khronos" comment="Reserved LoopControl bit, not available to vendors"/>
</registry>
diff --git a/include/spirv/unified1/AMD_gcn_shader.h b/include/spirv/unified1/AMD_gcn_shader.h
new file mode 100644
index 0000000..80165ae
--- /dev/null
+++ b/include/spirv/unified1/AMD_gcn_shader.h
@@ -0,0 +1,52 @@
+// Copyright (c) 2020 The Khronos Group Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and/or associated documentation files (the
+// "Materials"), to deal in the Materials without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Materials, and to
+// permit persons to whom the Materials are furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Materials.
+//
+// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
+// KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
+// SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
+// https://www.khronos.org/registry/
+//
+// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+//
+
+#ifndef SPIRV_UNIFIED1_AMD_gcn_shader_H_
+#define SPIRV_UNIFIED1_AMD_gcn_shader_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum {
+ AMD_gcn_shaderRevision = 2,
+ AMD_gcn_shaderRevision_BitWidthPadding = 0x7fffffff
+};
+
+enum AMD_gcn_shaderInstructions {
+ AMD_gcn_shaderCubeFaceIndexAMD = 1,
+ AMD_gcn_shaderCubeFaceCoordAMD = 2,
+ AMD_gcn_shaderTimeAMD = 3,
+ AMD_gcn_shaderInstructionsMax = 0x7fffffff
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // SPIRV_UNIFIED1_AMD_gcn_shader_H_
diff --git a/include/spirv/unified1/AMD_shader_ballot.h b/include/spirv/unified1/AMD_shader_ballot.h
new file mode 100644
index 0000000..8a8bb6e
--- /dev/null
+++ b/include/spirv/unified1/AMD_shader_ballot.h
@@ -0,0 +1,53 @@
+// Copyright (c) 2020 The Khronos Group Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and/or associated documentation files (the
+// "Materials"), to deal in the Materials without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Materials, and to
+// permit persons to whom the Materials are furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Materials.
+//
+// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
+// KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
+// SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
+// https://www.khronos.org/registry/
+//
+// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+//
+
+#ifndef SPIRV_UNIFIED1_AMD_shader_ballot_H_
+#define SPIRV_UNIFIED1_AMD_shader_ballot_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum {
+ AMD_shader_ballotRevision = 5,
+ AMD_shader_ballotRevision_BitWidthPadding = 0x7fffffff
+};
+
+enum AMD_shader_ballotInstructions {
+ AMD_shader_ballotSwizzleInvocationsAMD = 1,
+ AMD_shader_ballotSwizzleInvocationsMaskedAMD = 2,
+ AMD_shader_ballotWriteInvocationAMD = 3,
+ AMD_shader_ballotMbcntAMD = 4,
+ AMD_shader_ballotInstructionsMax = 0x7fffffff
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // SPIRV_UNIFIED1_AMD_shader_ballot_H_
diff --git a/include/spirv/unified1/AMD_shader_explicit_vertex_parameter.h b/include/spirv/unified1/AMD_shader_explicit_vertex_parameter.h
new file mode 100644
index 0000000..12b6480
--- /dev/null
+++ b/include/spirv/unified1/AMD_shader_explicit_vertex_parameter.h
@@ -0,0 +1,50 @@
+// Copyright (c) 2020 The Khronos Group Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and/or associated documentation files (the
+// "Materials"), to deal in the Materials without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Materials, and to
+// permit persons to whom the Materials are furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Materials.
+//
+// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
+// KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
+// SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
+// https://www.khronos.org/registry/
+//
+// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+//
+
+#ifndef SPIRV_UNIFIED1_AMD_shader_explicit_vertex_parameter_H_
+#define SPIRV_UNIFIED1_AMD_shader_explicit_vertex_parameter_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum {
+ AMD_shader_explicit_vertex_parameterRevision = 4,
+ AMD_shader_explicit_vertex_parameterRevision_BitWidthPadding = 0x7fffffff
+};
+
+enum AMD_shader_explicit_vertex_parameterInstructions {
+ AMD_shader_explicit_vertex_parameterInterpolateAtVertexAMD = 1,
+ AMD_shader_explicit_vertex_parameterInstructionsMax = 0x7fffffff
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // SPIRV_UNIFIED1_AMD_shader_explicit_vertex_parameter_H_
diff --git a/include/spirv/unified1/AMD_shader_trinary_minmax.h b/include/spirv/unified1/AMD_shader_trinary_minmax.h
new file mode 100644
index 0000000..1b14997
--- /dev/null
+++ b/include/spirv/unified1/AMD_shader_trinary_minmax.h
@@ -0,0 +1,58 @@
+// Copyright (c) 2020 The Khronos Group Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and/or associated documentation files (the
+// "Materials"), to deal in the Materials without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Materials, and to
+// permit persons to whom the Materials are furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Materials.
+//
+// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
+// KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
+// SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
+// https://www.khronos.org/registry/
+//
+// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+//
+
+#ifndef SPIRV_UNIFIED1_AMD_shader_trinary_minmax_H_
+#define SPIRV_UNIFIED1_AMD_shader_trinary_minmax_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum {
+ AMD_shader_trinary_minmaxRevision = 4,
+ AMD_shader_trinary_minmaxRevision_BitWidthPadding = 0x7fffffff
+};
+
+enum AMD_shader_trinary_minmaxInstructions {
+ AMD_shader_trinary_minmaxFMin3AMD = 1,
+ AMD_shader_trinary_minmaxUMin3AMD = 2,
+ AMD_shader_trinary_minmaxSMin3AMD = 3,
+ AMD_shader_trinary_minmaxFMax3AMD = 4,
+ AMD_shader_trinary_minmaxUMax3AMD = 5,
+ AMD_shader_trinary_minmaxSMax3AMD = 6,
+ AMD_shader_trinary_minmaxFMid3AMD = 7,
+ AMD_shader_trinary_minmaxUMid3AMD = 8,
+ AMD_shader_trinary_minmaxSMid3AMD = 9,
+ AMD_shader_trinary_minmaxInstructionsMax = 0x7fffffff
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // SPIRV_UNIFIED1_AMD_shader_trinary_minmax_H_
diff --git a/include/spirv/unified1/DebugInfo.h b/include/spirv/unified1/DebugInfo.h
new file mode 100644
index 0000000..c50a131
--- /dev/null
+++ b/include/spirv/unified1/DebugInfo.h
@@ -0,0 +1,143 @@
+// Copyright (c) 2017 The Khronos Group Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and/or associated documentation files (the "Materials"),
+// to deal in the Materials without restriction, including without limitation
+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Materials, and to permit persons to whom the
+// Materials are furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Materials.
+//
+// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
+// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
+// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
+//
+// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
+// IN THE MATERIALS.
+
+#ifndef SPIRV_UNIFIED1_DebugInfo_H_
+#define SPIRV_UNIFIED1_DebugInfo_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum {
+ DebugInfoVersion = 100,
+ DebugInfoVersion_BitWidthPadding = 0x7fffffff
+};
+enum {
+ DebugInfoRevision = 1,
+ DebugInfoRevision_BitWidthPadding = 0x7fffffff
+};
+
+enum DebugInfoInstructions {
+ DebugInfoDebugInfoNone = 0,
+ DebugInfoDebugCompilationUnit = 1,
+ DebugInfoDebugTypeBasic = 2,
+ DebugInfoDebugTypePointer = 3,
+ DebugInfoDebugTypeQualifier = 4,
+ DebugInfoDebugTypeArray = 5,
+ DebugInfoDebugTypeVector = 6,
+ DebugInfoDebugTypedef = 7,
+ DebugInfoDebugTypeFunction = 8,
+ DebugInfoDebugTypeEnum = 9,
+ DebugInfoDebugTypeComposite = 10,
+ DebugInfoDebugTypeMember = 11,
+ DebugInfoDebugTypeInheritance = 12,
+ DebugInfoDebugTypePtrToMember = 13,
+ DebugInfoDebugTypeTemplate = 14,
+ DebugInfoDebugTypeTemplateParameter = 15,
+ DebugInfoDebugTypeTemplateTemplateParameter = 16,
+ DebugInfoDebugTypeTemplateParameterPack = 17,
+ DebugInfoDebugGlobalVariable = 18,
+ DebugInfoDebugFunctionDeclaration = 19,
+ DebugInfoDebugFunction = 20,
+ DebugInfoDebugLexicalBlock = 21,
+ DebugInfoDebugLexicalBlockDiscriminator = 22,
+ DebugInfoDebugScope = 23,
+ DebugInfoDebugNoScope = 24,
+ DebugInfoDebugInlinedAt = 25,
+ DebugInfoDebugLocalVariable = 26,
+ DebugInfoDebugInlinedVariable = 27,
+ DebugInfoDebugDeclare = 28,
+ DebugInfoDebugValue = 29,
+ DebugInfoDebugOperation = 30,
+ DebugInfoDebugExpression = 31,
+ DebugInfoDebugMacroDef = 32,
+ DebugInfoDebugMacroUndef = 33,
+ DebugInfoInstructionsMax = 0x7fffffff
+};
+
+
+enum DebugInfoDebugInfoFlags {
+ DebugInfoFlagIsProtected = 0x01,
+ DebugInfoFlagIsPrivate = 0x02,
+ DebugInfoFlagIsPublic = 0x03,
+ DebugInfoFlagIsLocal = 0x04,
+ DebugInfoFlagIsDefinition = 0x08,
+ DebugInfoFlagFwdDecl = 0x10,
+ DebugInfoFlagArtificial = 0x20,
+ DebugInfoFlagExplicit = 0x40,
+ DebugInfoFlagPrototyped = 0x80,
+ DebugInfoFlagObjectPointer = 0x100,
+ DebugInfoFlagStaticMember = 0x200,
+ DebugInfoFlagIndirectVariable = 0x400,
+ DebugInfoFlagLValueReference = 0x800,
+ DebugInfoFlagRValueReference = 0x1000,
+ DebugInfoFlagIsOptimized = 0x2000,
+ DebugInfoDebugInfoFlagsMax = 0x7fffffff
+};
+
+enum DebugInfoDebugBaseTypeAttributeEncoding {
+ DebugInfoUnspecified = 0,
+ DebugInfoAddress = 1,
+ DebugInfoBoolean = 2,
+ DebugInfoFloat = 4,
+ DebugInfoSigned = 5,
+ DebugInfoSignedChar = 6,
+ DebugInfoUnsigned = 7,
+ DebugInfoUnsignedChar = 8,
+ DebugInfoDebugBaseTypeAttributeEncodingMax = 0x7fffffff
+};
+
+enum DebugInfoDebugCompositeType {
+ DebugInfoClass = 0,
+ DebugInfoStructure = 1,
+ DebugInfoUnion = 2,
+ DebugInfoDebugCompositeTypeMax = 0x7fffffff
+};
+
+enum DebugInfoDebugTypeQualifier {
+ DebugInfoConstType = 0,
+ DebugInfoVolatileType = 1,
+ DebugInfoRestrictType = 2,
+ DebugInfoDebugTypeQualifierMax = 0x7fffffff
+};
+
+enum DebugInfoDebugOperation {
+ DebugInfoDeref = 0,
+ DebugInfoPlus = 1,
+ DebugInfoMinus = 2,
+ DebugInfoPlusUconst = 3,
+ DebugInfoBitPiece = 4,
+ DebugInfoSwap = 5,
+ DebugInfoXderef = 6,
+ DebugInfoStackValue = 7,
+ DebugInfoConstu = 8,
+ DebugInfoDebugOperationMax = 0x7fffffff
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // SPIRV_UNIFIED1_DebugInfo_H_
diff --git a/include/spirv/unified1/NonSemanticDebugPrintf.h b/include/spirv/unified1/NonSemanticDebugPrintf.h
new file mode 100644
index 0000000..83796d7
--- /dev/null
+++ b/include/spirv/unified1/NonSemanticDebugPrintf.h
@@ -0,0 +1,50 @@
+// Copyright (c) 2020 The Khronos Group Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and/or associated documentation files (the
+// "Materials"), to deal in the Materials without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Materials, and to
+// permit persons to whom the Materials are furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Materials.
+//
+// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
+// KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
+// SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
+// https://www.khronos.org/registry/
+//
+// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+//
+
+#ifndef SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_
+#define SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum {
+ NonSemanticDebugPrintfRevision = 1,
+ NonSemanticDebugPrintfRevision_BitWidthPadding = 0x7fffffff
+};
+
+enum NonSemanticDebugPrintfInstructions {
+ NonSemanticDebugPrintfDebugPrintf = 1,
+ NonSemanticDebugPrintfInstructionsMax = 0x7fffffff
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_
diff --git a/include/spirv/unified1/OpenCLDebugInfo100.h b/include/spirv/unified1/OpenCLDebugInfo100.h
new file mode 100644
index 0000000..1149980
--- /dev/null
+++ b/include/spirv/unified1/OpenCLDebugInfo100.h
@@ -0,0 +1,156 @@
+// Copyright (c) 2018 The Khronos Group Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and/or associated documentation files (the "Materials"),
+// to deal in the Materials without restriction, including without limitation
+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Materials, and to permit persons to whom the
+// Materials are furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Materials.
+//
+// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
+// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
+// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
+//
+// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
+// IN THE MATERIALS.
+
+#ifndef SPIRV_UNIFIED1_OpenCLDebugInfo100_H_
+#define SPIRV_UNIFIED1_OpenCLDebugInfo100_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum {
+ OpenCLDebugInfo100Version = 200,
+ OpenCLDebugInfo100Version_BitWidthPadding = 0x7fffffff
+};
+enum {
+ OpenCLDebugInfo100Revision = 2,
+ OpenCLDebugInfo100Revision_BitWidthPadding = 0x7fffffff
+};
+
+enum OpenCLDebugInfo100Instructions {
+ OpenCLDebugInfo100DebugInfoNone = 0,
+ OpenCLDebugInfo100DebugCompilationUnit = 1,
+ OpenCLDebugInfo100DebugTypeBasic = 2,
+ OpenCLDebugInfo100DebugTypePointer = 3,
+ OpenCLDebugInfo100DebugTypeQualifier = 4,
+ OpenCLDebugInfo100DebugTypeArray = 5,
+ OpenCLDebugInfo100DebugTypeVector = 6,
+ OpenCLDebugInfo100DebugTypedef = 7,
+ OpenCLDebugInfo100DebugTypeFunction = 8,
+ OpenCLDebugInfo100DebugTypeEnum = 9,
+ OpenCLDebugInfo100DebugTypeComposite = 10,
+ OpenCLDebugInfo100DebugTypeMember = 11,
+ OpenCLDebugInfo100DebugTypeInheritance = 12,
+ OpenCLDebugInfo100DebugTypePtrToMember = 13,
+ OpenCLDebugInfo100DebugTypeTemplate = 14,
+ OpenCLDebugInfo100DebugTypeTemplateParameter = 15,
+ OpenCLDebugInfo100DebugTypeTemplateTemplateParameter = 16,
+ OpenCLDebugInfo100DebugTypeTemplateParameterPack = 17,
+ OpenCLDebugInfo100DebugGlobalVariable = 18,
+ OpenCLDebugInfo100DebugFunctionDeclaration = 19,
+ OpenCLDebugInfo100DebugFunction = 20,
+ OpenCLDebugInfo100DebugLexicalBlock = 21,
+ OpenCLDebugInfo100DebugLexicalBlockDiscriminator = 22,
+ OpenCLDebugInfo100DebugScope = 23,
+ OpenCLDebugInfo100DebugNoScope = 24,
+ OpenCLDebugInfo100DebugInlinedAt = 25,
+ OpenCLDebugInfo100DebugLocalVariable = 26,
+ OpenCLDebugInfo100DebugInlinedVariable = 27,
+ OpenCLDebugInfo100DebugDeclare = 28,
+ OpenCLDebugInfo100DebugValue = 29,
+ OpenCLDebugInfo100DebugOperation = 30,
+ OpenCLDebugInfo100DebugExpression = 31,
+ OpenCLDebugInfo100DebugMacroDef = 32,
+ OpenCLDebugInfo100DebugMacroUndef = 33,
+ OpenCLDebugInfo100DebugImportedEntity = 34,
+ OpenCLDebugInfo100DebugSource = 35,
+ OpenCLDebugInfo100InstructionsMax = 0x7fffffff
+};
+
+
+enum OpenCLDebugInfo100DebugInfoFlags {
+ OpenCLDebugInfo100FlagIsProtected = 0x01,
+ OpenCLDebugInfo100FlagIsPrivate = 0x02,
+ OpenCLDebugInfo100FlagIsPublic = 0x03,
+ OpenCLDebugInfo100FlagIsLocal = 0x04,
+ OpenCLDebugInfo100FlagIsDefinition = 0x08,
+ OpenCLDebugInfo100FlagFwdDecl = 0x10,
+ OpenCLDebugInfo100FlagArtificial = 0x20,
+ OpenCLDebugInfo100FlagExplicit = 0x40,
+ OpenCLDebugInfo100FlagPrototyped = 0x80,
+ OpenCLDebugInfo100FlagObjectPointer = 0x100,
+ OpenCLDebugInfo100FlagStaticMember = 0x200,
+ OpenCLDebugInfo100FlagIndirectVariable = 0x400,
+ OpenCLDebugInfo100FlagLValueReference = 0x800,
+ OpenCLDebugInfo100FlagRValueReference = 0x1000,
+ OpenCLDebugInfo100FlagIsOptimized = 0x2000,
+ OpenCLDebugInfo100FlagIsEnumClass = 0x4000,
+ OpenCLDebugInfo100FlagTypePassByValue = 0x8000,
+ OpenCLDebugInfo100FlagTypePassByReference = 0x10000,
+ OpenCLDebugInfo100DebugInfoFlagsMax = 0x7fffffff
+};
+
+enum OpenCLDebugInfo100DebugBaseTypeAttributeEncoding {
+ OpenCLDebugInfo100Unspecified = 0,
+ OpenCLDebugInfo100Address = 1,
+ OpenCLDebugInfo100Boolean = 2,
+ OpenCLDebugInfo100Float = 3,
+ OpenCLDebugInfo100Signed = 4,
+ OpenCLDebugInfo100SignedChar = 5,
+ OpenCLDebugInfo100Unsigned = 6,
+ OpenCLDebugInfo100UnsignedChar = 7,
+ OpenCLDebugInfo100DebugBaseTypeAttributeEncodingMax = 0x7fffffff
+};
+
+enum OpenCLDebugInfo100DebugCompositeType {
+ OpenCLDebugInfo100Class = 0,
+ OpenCLDebugInfo100Structure = 1,
+ OpenCLDebugInfo100Union = 2,
+ OpenCLDebugInfo100DebugCompositeTypeMax = 0x7fffffff
+};
+
+enum OpenCLDebugInfo100DebugTypeQualifier {
+ OpenCLDebugInfo100ConstType = 0,
+ OpenCLDebugInfo100VolatileType = 1,
+ OpenCLDebugInfo100RestrictType = 2,
+ OpenCLDebugInfo100AtomicType = 3,
+ OpenCLDebugInfo100DebugTypeQualifierMax = 0x7fffffff
+};
+
+enum OpenCLDebugInfo100DebugOperation {
+ OpenCLDebugInfo100Deref = 0,
+ OpenCLDebugInfo100Plus = 1,
+ OpenCLDebugInfo100Minus = 2,
+ OpenCLDebugInfo100PlusUconst = 3,
+ OpenCLDebugInfo100BitPiece = 4,
+ OpenCLDebugInfo100Swap = 5,
+ OpenCLDebugInfo100Xderef = 6,
+ OpenCLDebugInfo100StackValue = 7,
+ OpenCLDebugInfo100Constu = 8,
+ OpenCLDebugInfo100Fragment = 9,
+ OpenCLDebugInfo100DebugOperationMax = 0x7fffffff
+};
+
+enum OpenCLDebugInfo100DebugImportedEntity {
+ OpenCLDebugInfo100ImportedModule = 0,
+ OpenCLDebugInfo100ImportedDeclaration = 1,
+ OpenCLDebugInfo100DebugImportedEntityMax = 0x7fffffff
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // SPIRV_UNIFIED1_OpenCLDebugInfo100_H_
diff --git a/include/spirv/unified1/extinst.debuginfo.grammar.json b/include/spirv/unified1/extinst.debuginfo.grammar.json
new file mode 100644
index 0000000..9212f6f
--- /dev/null
+++ b/include/spirv/unified1/extinst.debuginfo.grammar.json
@@ -0,0 +1,568 @@
+{
+ "copyright" : [
+ "Copyright (c) 2017 The Khronos Group Inc.",
+ "",
+ "Permission is hereby granted, free of charge, to any person obtaining a copy",
+ "of this software and/or associated documentation files (the \"Materials\"),",
+ "to deal in the Materials without restriction, including without limitation",
+ "the rights to use, copy, modify, merge, publish, distribute, sublicense,",
+ "and/or sell copies of the Materials, and to permit persons to whom the",
+ "Materials are furnished to do so, subject to the following conditions:",
+ "",
+ "The above copyright notice and this permission notice shall be included in",
+ "all copies or substantial portions of the Materials.",
+ "",
+ "MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS",
+ "STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND",
+ "HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ",
+ "",
+ "THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS",
+ "OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
+ "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL",
+ "THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
+ "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING",
+ "FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS",
+ "IN THE MATERIALS."
+ ],
+ "version" : 100,
+ "revision" : 1,
+ "instructions" : [
+ {
+ "opname" : "DebugInfoNone",
+ "opcode" : 0
+ },
+ {
+ "opname" : "DebugCompilationUnit",
+ "opcode" : 1,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Version'" },
+ { "kind" : "LiteralInteger", "name" : "'DWARF Version'" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeBasic",
+ "opcode" : 2,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Size'" },
+ { "kind" : "DebugBaseTypeAttributeEncoding", "name" : "'Encoding'" }
+ ]
+ },
+ {
+ "opname" : "DebugTypePointer",
+ "opcode" : 3,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Base Type'" },
+ { "kind" : "StorageClass", "name" : "'Storage Class'" },
+ { "kind" : "DebugInfoFlags", "name" : "'Literal Flags'" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeQualifier",
+ "opcode" : 4,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Base Type'" },
+ { "kind" : "DebugTypeQualifier", "name" : "'Type Qualifier'" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeArray",
+ "opcode" : 5,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Base Type'" },
+ { "kind" : "IdRef", "name" : "'Component Counts'", "quantifier" : "*" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeVector",
+ "opcode" : 6,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Base Type'" },
+ { "kind" : "LiteralInteger", "name" : "'Component Count'" }
+ ]
+ },
+ {
+ "opname" : "DebugTypedef",
+ "opcode" : 7,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Base Type'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" },
+ { "kind" : "IdRef", "name" : "'Parent'" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeFunction",
+ "opcode" : 8,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Return Type'" },
+ { "kind" : "IdRef", "name" : "'Paramter Types'", "quantifier" : "*" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeEnum",
+ "opcode" : 9,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Underlying Type'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" },
+ { "kind" : "IdRef", "name" : "'Parent'" },
+ { "kind" : "IdRef", "name" : "'Size'" },
+ { "kind" : "DebugInfoFlags", "name" : "'Flags'" },
+ { "kind" : "PairIdRefIdRef", "name" : "'Value, Name, Value, Name, ...'", "quantifier" : "*" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeComposite",
+ "opcode" : 10,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "DebugCompositeType", "name" : "'Tag'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" },
+ { "kind" : "IdRef", "name" : "'Parent'" },
+ { "kind" : "IdRef", "name" : "'Size'" },
+ { "kind" : "DebugInfoFlags", "name" : "'Flags'" },
+ { "kind" : "IdRef", "name" : "'Members'", "quantifier" : "*" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeMember",
+ "opcode" : 11,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Type'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" },
+ { "kind" : "IdRef", "name" : "'Parent'" },
+ { "kind" : "IdRef", "name" : "'Offset'" },
+ { "kind" : "IdRef", "name" : "'Size'" },
+ { "kind" : "DebugInfoFlags", "name" : "'Flags'" },
+ { "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeInheritance",
+ "opcode" : 12,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Child'" },
+ { "kind" : "IdRef", "name" : "'Parent'" },
+ { "kind" : "IdRef", "name" : "'Offset'" },
+ { "kind" : "IdRef", "name" : "'Size'" },
+ { "kind" : "DebugInfoFlags", "name" : "'Flags'" }
+ ]
+ },
+ {
+ "opname" : "DebugTypePtrToMember",
+ "opcode" : 13,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Member Type'" },
+ { "kind" : "IdRef", "name" : "'Parent'" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeTemplate",
+ "opcode" : 14,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Target'" },
+ { "kind" : "IdRef", "name" : "'Parameters'", "quantifier" : "*" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeTemplateParameter",
+ "opcode" : 15,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Actual Type'" },
+ { "kind" : "IdRef", "name" : "'Value'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeTemplateTemplateParameter",
+ "opcode" : 16,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Template Name'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeTemplateParameterPack",
+ "opcode" : 17,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" },
+ { "kind" : "IdRef", "name" : "'Template Parameters'", "quantifier" : "*" }
+ ]
+ },
+ {
+ "opname" : "DebugGlobalVariable",
+ "opcode" : 18,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Type'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" },
+ { "kind" : "IdRef", "name" : "'Parent'" },
+ { "kind" : "IdRef", "name" : "'Linkage Name'" },
+ { "kind" : "IdRef", "name" : "'Variable'" },
+ { "kind" : "DebugInfoFlags", "name" : "'Flags'" },
+ { "kind" : "IdRef", "name" : "'Static Member Declaration'", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "DebugFunctionDeclaration",
+ "opcode" : 19,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Type'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" },
+ { "kind" : "IdRef", "name" : "'Parent'" },
+ { "kind" : "IdRef", "name" : "'Linkage Name'" },
+ { "kind" : "DebugInfoFlags", "name" : "'Flags'" }
+ ]
+ },
+ {
+ "opname" : "DebugFunction",
+ "opcode" : 20,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Type'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" },
+ { "kind" : "IdRef", "name" : "'Parent'" },
+ { "kind" : "IdRef", "name" : "'Linkage Name'" },
+ { "kind" : "DebugInfoFlags", "name" : "'Flags'" },
+ { "kind" : "LiteralInteger", "name" : "'Scope Line'" },
+ { "kind" : "IdRef", "name" : "'Function'" },
+ { "kind" : "IdRef", "name" : "'Declaration'", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "DebugLexicalBlock",
+ "opcode" : 21,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" },
+ { "kind" : "IdRef", "name" : "'Parent'" },
+ { "kind" : "IdRef", "name" : "'Name'", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "DebugLexicalBlockDiscriminator",
+ "opcode" : 22,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Scope'" },
+ { "kind" : "LiteralInteger", "name" : "'Discriminator'" },
+ { "kind" : "IdRef", "name" : "'Parent'" }
+ ]
+ },
+ {
+ "opname" : "DebugScope",
+ "opcode" : 23,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Scope'" },
+ { "kind" : "IdRef", "name" : "'Inlined At'", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "DebugNoScope",
+ "opcode" : 24
+ },
+ {
+ "opname" : "DebugInlinedAt",
+ "opcode" : 25,
+ "operands" : [
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "IdRef", "name" : "'Scope'" },
+ { "kind" : "IdRef", "name" : "'Inlined'", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "DebugLocalVariable",
+ "opcode" : 26,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Type'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" },
+ { "kind" : "IdRef", "name" : "'Parent'" },
+ { "kind" : "LiteralInteger", "name" : "'Arg Number'", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "DebugInlinedVariable",
+ "opcode" : 27,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Variable'" },
+ { "kind" : "IdRef", "name" : "'Inlined'" }
+ ]
+ },
+ {
+ "opname" : "DebugDeclare",
+ "opcode" : 28,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Local Variable'" },
+ { "kind" : "IdRef", "name" : "'Variable'" },
+ { "kind" : "IdRef", "name" : "'Expression'" }
+ ]
+ },
+ {
+ "opname" : "DebugValue",
+ "opcode" : 29,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Value'" },
+ { "kind" : "IdRef", "name" : "'Expression'" },
+ { "kind" : "IdRef", "name" : "'Indexes'", "quantifier" : "*" }
+ ]
+ },
+ {
+ "opname" : "DebugOperation",
+ "opcode" : 30,
+ "operands" : [
+ { "kind" : "DebugOperation", "name" : "'OpCode'" },
+ { "kind" : "LiteralInteger", "name" : "'Operands ...'", "quantifier" : "*" }
+ ]
+ },
+ {
+ "opname" : "DebugExpression",
+ "opcode" : 31,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Operands ...'", "quantifier" : "*" }
+ ]
+ },
+ {
+ "opname" : "DebugMacroDef",
+ "opcode" : 32,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "DebugMacroUndef",
+ "opcode" : 33,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "IdRef", "name" : "'Macro'" }
+ ]
+ }
+ ],
+ "operand_kinds" : [
+ {
+ "category" : "BitEnum",
+ "kind" : "DebugInfoFlags",
+ "enumerants" : [
+ {
+ "enumerant" : "FlagIsProtected",
+ "value" : "0x01"
+ },
+ {
+ "enumerant" : "FlagIsPrivate",
+ "value" : "0x02"
+ },
+ {
+ "enumerant" : "FlagIsPublic",
+ "value" : "0x03"
+ },
+ {
+ "enumerant" : "FlagIsLocal",
+ "value" : "0x04"
+ },
+ {
+ "enumerant" : "FlagIsDefinition",
+ "value" : "0x08"
+ },
+ {
+ "enumerant" : "FlagFwdDecl",
+ "value" : "0x10"
+ },
+ {
+ "enumerant" : "FlagArtificial",
+ "value" : "0x20"
+ },
+ {
+ "enumerant" : "FlagExplicit",
+ "value" : "0x40"
+ },
+ {
+ "enumerant" : "FlagPrototyped",
+ "value" : "0x80"
+ },
+ {
+ "enumerant" : "FlagObjectPointer",
+ "value" : "0x100"
+ },
+ {
+ "enumerant" : "FlagStaticMember",
+ "value" : "0x200"
+ },
+ {
+ "enumerant" : "FlagIndirectVariable",
+ "value" : "0x400"
+ },
+ {
+ "enumerant" : "FlagLValueReference",
+ "value" : "0x800"
+ },
+ {
+ "enumerant" : "FlagRValueReference",
+ "value" : "0x1000"
+ },
+ {
+ "enumerant" : "FlagIsOptimized",
+ "value" : "0x2000"
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "DebugBaseTypeAttributeEncoding",
+ "enumerants" : [
+ {
+ "enumerant" : "Unspecified",
+ "value" : "0"
+ },
+ {
+ "enumerant" : "Address",
+ "value" : "1"
+ },
+ {
+ "enumerant" : "Boolean",
+ "value" : "2"
+ },
+ {
+ "enumerant" : "Float",
+ "value" : "4"
+ },
+ {
+ "enumerant" : "Signed",
+ "value" : "5"
+ },
+ {
+ "enumerant" : "SignedChar",
+ "value" : "6"
+ },
+ {
+ "enumerant" : "Unsigned",
+ "value" : "7"
+ },
+ {
+ "enumerant" : "UnsignedChar",
+ "value" : "8"
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "DebugCompositeType",
+ "enumerants" : [
+ {
+ "enumerant" : "Class",
+ "value" : "0"
+ },
+ {
+ "enumerant" : "Structure",
+ "value" : "1"
+ },
+ {
+ "enumerant" : "Union",
+ "value" : "2"
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "DebugTypeQualifier",
+ "enumerants" : [
+ {
+ "enumerant" : "ConstType",
+ "value" : "0"
+ },
+ {
+ "enumerant" : "VolatileType",
+ "value" : "1"
+ },
+ {
+ "enumerant" : "RestrictType",
+ "value" : "2"
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "DebugOperation",
+ "enumerants" : [
+ {
+ "enumerant" : "Deref",
+ "value" : "0"
+ },
+ {
+ "enumerant" : "Plus",
+ "value" : "1"
+ },
+ {
+ "enumerant" : "Minus",
+ "value" : "2"
+ },
+ {
+ "enumerant" : "PlusUconst",
+ "value" : "3",
+ "parameters" : [
+ { "kind" : "LiteralInteger" }
+ ]
+ },
+ {
+ "enumerant" : "BitPiece",
+ "value" : "4",
+ "parameters" : [
+ { "kind" : "LiteralInteger" },
+ { "kind" : "LiteralInteger" }
+ ]
+ },
+ {
+ "enumerant" : "Swap",
+ "value" : "5"
+ },
+ {
+ "enumerant" : "Xderef",
+ "value" : "6"
+ },
+ {
+ "enumerant" : "StackValue",
+ "value" : "7"
+ },
+ {
+ "enumerant" : "Constu",
+ "value" : "8",
+ "parameters" : [
+ { "kind" : "LiteralInteger" }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/include/spirv/unified1/extinst.nonsemantic.debugprintf.grammar.json b/include/spirv/unified1/extinst.nonsemantic.debugprintf.grammar.json
new file mode 100644
index 0000000..71fa711
--- /dev/null
+++ b/include/spirv/unified1/extinst.nonsemantic.debugprintf.grammar.json
@@ -0,0 +1,13 @@
+{
+ "revision" : 1,
+ "instructions" : [
+ {
+ "opname" : "DebugPrintf",
+ "opcode" : 1,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Format'" },
+ { "kind" : "IdRef", "quantifier" : "*" }
+ ]
+ }
+ ]
+}
diff --git a/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json b/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json
new file mode 100644
index 0000000..08062be
--- /dev/null
+++ b/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json
@@ -0,0 +1,632 @@
+{
+ "copyright" : [
+ "Copyright (c) 2018 The Khronos Group Inc.",
+ "",
+ "Permission is hereby granted, free of charge, to any person obtaining a copy",
+ "of this software and/or associated documentation files (the \"Materials\"),",
+ "to deal in the Materials without restriction, including without limitation",
+ "the rights to use, copy, modify, merge, publish, distribute, sublicense,",
+ "and/or sell copies of the Materials, and to permit persons to whom the",
+ "Materials are furnished to do so, subject to the following conditions:",
+ "",
+ "The above copyright notice and this permission notice shall be included in",
+ "all copies or substantial portions of the Materials.",
+ "",
+ "MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS",
+ "STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND",
+ "HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ",
+ "",
+ "THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS",
+ "OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
+ "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL",
+ "THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
+ "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING",
+ "FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS",
+ "IN THE MATERIALS."
+ ],
+ "version" : 200,
+ "revision" : 2,
+ "instructions" : [
+ {
+ "opname" : "DebugInfoNone",
+ "opcode" : 0
+ },
+ {
+ "opname" : "DebugCompilationUnit",
+ "opcode" : 1,
+ "operands" : [
+ { "kind" : "LiteralInteger", "name" : "'Version'" },
+ { "kind" : "LiteralInteger", "name" : "'DWARF Version'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "SourceLanguage", "name" : "'Language'" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeBasic",
+ "opcode" : 2,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Size'" },
+ { "kind" : "DebugBaseTypeAttributeEncoding", "name" : "'Encoding'" }
+ ]
+ },
+ {
+ "opname" : "DebugTypePointer",
+ "opcode" : 3,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Base Type'" },
+ { "kind" : "StorageClass", "name" : "'Storage Class'" },
+ { "kind" : "DebugInfoFlags", "name" : "'Flags'" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeQualifier",
+ "opcode" : 4,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Base Type'" },
+ { "kind" : "DebugTypeQualifier", "name" : "'Type Qualifier'" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeArray",
+ "opcode" : 5,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Base Type'" },
+ { "kind" : "IdRef", "name" : "'Component Counts'", "quantifier" : "*" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeVector",
+ "opcode" : 6,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Base Type'" },
+ { "kind" : "LiteralInteger", "name" : "'Component Count'" }
+ ]
+ },
+ {
+ "opname" : "DebugTypedef",
+ "opcode" : 7,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Base Type'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" },
+ { "kind" : "IdRef", "name" : "'Parent'" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeFunction",
+ "opcode" : 8,
+ "operands" : [
+ { "kind" : "DebugInfoFlags", "name" : "'Flags'" },
+ { "kind" : "IdRef", "name" : "'Return Type'" },
+ { "kind" : "IdRef", "name" : "'Parameter Types'", "quantifier" : "*" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeEnum",
+ "opcode" : 9,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Underlying Type'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" },
+ { "kind" : "IdRef", "name" : "'Parent'" },
+ { "kind" : "IdRef", "name" : "'Size'" },
+ { "kind" : "DebugInfoFlags", "name" : "'Flags'" },
+ { "kind" : "PairIdRefIdRef", "name" : "'Value, Name, Value, Name, ...'", "quantifier" : "*" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeComposite",
+ "opcode" : 10,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "DebugCompositeType", "name" : "'Tag'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" },
+ { "kind" : "IdRef", "name" : "'Parent'" },
+ { "kind" : "IdRef", "name" : "'Linkage Name'" },
+ { "kind" : "IdRef", "name" : "'Size'" },
+ { "kind" : "DebugInfoFlags", "name" : "'Flags'" },
+ { "kind" : "IdRef", "name" : "'Members'", "quantifier" : "*" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeMember",
+ "opcode" : 11,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Type'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" },
+ { "kind" : "IdRef", "name" : "'Parent'" },
+ { "kind" : "IdRef", "name" : "'Offset'" },
+ { "kind" : "IdRef", "name" : "'Size'" },
+ { "kind" : "DebugInfoFlags", "name" : "'Flags'" },
+ { "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeInheritance",
+ "opcode" : 12,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Child'" },
+ { "kind" : "IdRef", "name" : "'Parent'" },
+ { "kind" : "IdRef", "name" : "'Offset'" },
+ { "kind" : "IdRef", "name" : "'Size'" },
+ { "kind" : "DebugInfoFlags", "name" : "'Flags'" }
+ ]
+ },
+ {
+ "opname" : "DebugTypePtrToMember",
+ "opcode" : 13,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Member Type'" },
+ { "kind" : "IdRef", "name" : "'Parent'" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeTemplate",
+ "opcode" : 14,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Target'" },
+ { "kind" : "IdRef", "name" : "'Parameters'", "quantifier" : "*" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeTemplateParameter",
+ "opcode" : 15,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Actual Type'" },
+ { "kind" : "IdRef", "name" : "'Value'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeTemplateTemplateParameter",
+ "opcode" : 16,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Template Name'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" }
+ ]
+ },
+ {
+ "opname" : "DebugTypeTemplateParameterPack",
+ "opcode" : 17,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" },
+ { "kind" : "IdRef", "name" : "'Template Parameters'", "quantifier" : "*" }
+ ]
+ },
+ {
+ "opname" : "DebugGlobalVariable",
+ "opcode" : 18,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Type'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" },
+ { "kind" : "IdRef", "name" : "'Parent'" },
+ { "kind" : "IdRef", "name" : "'Linkage Name'" },
+ { "kind" : "IdRef", "name" : "'Variable'" },
+ { "kind" : "DebugInfoFlags", "name" : "'Flags'" },
+ { "kind" : "IdRef", "name" : "'Static Member Declaration'", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "DebugFunctionDeclaration",
+ "opcode" : 19,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Type'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" },
+ { "kind" : "IdRef", "name" : "'Parent'" },
+ { "kind" : "IdRef", "name" : "'Linkage Name'" },
+ { "kind" : "DebugInfoFlags", "name" : "'Flags'" }
+ ]
+ },
+ {
+ "opname" : "DebugFunction",
+ "opcode" : 20,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Type'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" },
+ { "kind" : "IdRef", "name" : "'Parent'" },
+ { "kind" : "IdRef", "name" : "'Linkage Name'" },
+ { "kind" : "DebugInfoFlags", "name" : "'Flags'" },
+ { "kind" : "LiteralInteger", "name" : "'Scope Line'" },
+ { "kind" : "IdRef", "name" : "'Function'" },
+ { "kind" : "IdRef", "name" : "'Declaration'", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "DebugLexicalBlock",
+ "opcode" : 21,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" },
+ { "kind" : "IdRef", "name" : "'Parent'" },
+ { "kind" : "IdRef", "name" : "'Name'", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "DebugLexicalBlockDiscriminator",
+ "opcode" : 22,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Discriminator'" },
+ { "kind" : "IdRef", "name" : "'Parent'" }
+ ]
+ },
+ {
+ "opname" : "DebugScope",
+ "opcode" : 23,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Scope'" },
+ { "kind" : "IdRef", "name" : "'Inlined At'", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "DebugNoScope",
+ "opcode" : 24
+ },
+ {
+ "opname" : "DebugInlinedAt",
+ "opcode" : 25,
+ "operands" : [
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "IdRef", "name" : "'Scope'" },
+ { "kind" : "IdRef", "name" : "'Inlined'", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "DebugLocalVariable",
+ "opcode" : 26,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Type'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" },
+ { "kind" : "IdRef", "name" : "'Parent'" },
+ { "kind" : "DebugInfoFlags", "name" : "'Flags'" },
+ { "kind" : "LiteralInteger", "name" : "'Arg Number'", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "DebugInlinedVariable",
+ "opcode" : 27,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Variable'" },
+ { "kind" : "IdRef", "name" : "'Inlined'" }
+ ]
+ },
+ {
+ "opname" : "DebugDeclare",
+ "opcode" : 28,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Local Variable'" },
+ { "kind" : "IdRef", "name" : "'Variable'" },
+ { "kind" : "IdRef", "name" : "'Expression'" }
+ ]
+ },
+ {
+ "opname" : "DebugValue",
+ "opcode" : 29,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Local Variable'" },
+ { "kind" : "IdRef", "name" : "'Value'" },
+ { "kind" : "IdRef", "name" : "'Expression'" },
+ { "kind" : "IdRef", "name" : "'Indexes'", "quantifier" : "*" }
+ ]
+ },
+ {
+ "opname" : "DebugOperation",
+ "opcode" : 30,
+ "operands" : [
+ { "kind" : "DebugOperation", "name" : "'OpCode'" },
+ { "kind" : "LiteralInteger", "name" : "'Operands ...'", "quantifier" : "*" }
+ ]
+ },
+ {
+ "opname" : "DebugExpression",
+ "opcode" : 31,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Operands ...'", "quantifier" : "*" }
+ ]
+ },
+ {
+ "opname" : "DebugMacroDef",
+ "opcode" : 32,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" }
+ ]
+ },
+ {
+ "opname" : "DebugMacroUndef",
+ "opcode" : 33,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "IdRef", "name" : "'Macro'" }
+ ]
+ },
+ {
+ "opname" : "DebugImportedEntity",
+ "opcode" : 34,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Name'" },
+ { "kind" : "DebugImportedEntity", "name" : "'Tag'" },
+ { "kind" : "IdRef", "name" : "'Source'" },
+ { "kind" : "IdRef", "name" : "'Entity'" },
+ { "kind" : "LiteralInteger", "name" : "'Line'" },
+ { "kind" : "LiteralInteger", "name" : "'Column'" },
+ { "kind" : "IdRef", "name" : "'Parent'" }
+ ]
+ },
+ {
+ "opname" : "DebugSource",
+ "opcode" : 35,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'File'" },
+ { "kind" : "IdRef", "name" : "'Text'", "quantifier" : "?" }
+ ]
+ }
+ ],
+ "operand_kinds" : [
+ {
+ "category" : "BitEnum",
+ "kind" : "DebugInfoFlags",
+ "enumerants" : [
+ {
+ "enumerant" : "FlagIsProtected",
+ "value" : "0x01"
+ },
+ {
+ "enumerant" : "FlagIsPrivate",
+ "value" : "0x02"
+ },
+ {
+ "enumerant" : "FlagIsPublic",
+ "value" : "0x03"
+ },
+ {
+ "enumerant" : "FlagIsLocal",
+ "value" : "0x04"
+ },
+ {
+ "enumerant" : "FlagIsDefinition",
+ "value" : "0x08"
+ },
+ {
+ "enumerant" : "FlagFwdDecl",
+ "value" : "0x10"
+ },
+ {
+ "enumerant" : "FlagArtificial",
+ "value" : "0x20"
+ },
+ {
+ "enumerant" : "FlagExplicit",
+ "value" : "0x40"
+ },
+ {
+ "enumerant" : "FlagPrototyped",
+ "value" : "0x80"
+ },
+ {
+ "enumerant" : "FlagObjectPointer",
+ "value" : "0x100"
+ },
+ {
+ "enumerant" : "FlagStaticMember",
+ "value" : "0x200"
+ },
+ {
+ "enumerant" : "FlagIndirectVariable",
+ "value" : "0x400"
+ },
+ {
+ "enumerant" : "FlagLValueReference",
+ "value" : "0x800"
+ },
+ {
+ "enumerant" : "FlagRValueReference",
+ "value" : "0x1000"
+ },
+ {
+ "enumerant" : "FlagIsOptimized",
+ "value" : "0x2000"
+ },
+ {
+ "enumerant" : "FlagIsEnumClass",
+ "value" : "0x4000"
+ },
+ {
+ "enumerant" : "FlagTypePassByValue",
+ "value" : "0x8000"
+ },
+ {
+ "enumerant" : "FlagTypePassByReference",
+ "value" : "0x10000"
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "DebugBaseTypeAttributeEncoding",
+ "enumerants" : [
+ {
+ "enumerant" : "Unspecified",
+ "value" : "0"
+ },
+ {
+ "enumerant" : "Address",
+ "value" : "1"
+ },
+ {
+ "enumerant" : "Boolean",
+ "value" : "2"
+ },
+ {
+ "enumerant" : "Float",
+ "value" : "3"
+ },
+ {
+ "enumerant" : "Signed",
+ "value" : "4"
+ },
+ {
+ "enumerant" : "SignedChar",
+ "value" : "5"
+ },
+ {
+ "enumerant" : "Unsigned",
+ "value" : "6"
+ },
+ {
+ "enumerant" : "UnsignedChar",
+ "value" : "7"
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "DebugCompositeType",
+ "enumerants" : [
+ {
+ "enumerant" : "Class",
+ "value" : "0"
+ },
+ {
+ "enumerant" : "Structure",
+ "value" : "1"
+ },
+ {
+ "enumerant" : "Union",
+ "value" : "2"
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "DebugTypeQualifier",
+ "enumerants" : [
+ {
+ "enumerant" : "ConstType",
+ "value" : "0"
+ },
+ {
+ "enumerant" : "VolatileType",
+ "value" : "1"
+ },
+ {
+ "enumerant" : "RestrictType",
+ "value" : "2"
+ },
+ {
+ "enumerant" : "AtomicType",
+ "value" : "3"
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "DebugOperation",
+ "enumerants" : [
+ {
+ "enumerant" : "Deref",
+ "value" : "0"
+ },
+ {
+ "enumerant" : "Plus",
+ "value" : "1"
+ },
+ {
+ "enumerant" : "Minus",
+ "value" : "2"
+ },
+ {
+ "enumerant" : "PlusUconst",
+ "value" : "3",
+ "parameters" : [
+ { "kind" : "LiteralInteger" }
+ ]
+ },
+ {
+ "enumerant" : "BitPiece",
+ "value" : "4",
+ "parameters" : [
+ { "kind" : "LiteralInteger" },
+ { "kind" : "LiteralInteger" }
+ ]
+ },
+ {
+ "enumerant" : "Swap",
+ "value" : "5"
+ },
+ {
+ "enumerant" : "Xderef",
+ "value" : "6"
+ },
+ {
+ "enumerant" : "StackValue",
+ "value" : "7"
+ },
+ {
+ "enumerant" : "Constu",
+ "value" : "8",
+ "parameters" : [
+ { "kind" : "LiteralInteger" }
+ ]
+ },
+ {
+ "enumerant" : "Fragment",
+ "value" : "9",
+ "parameters" : [
+ { "kind" : "LiteralInteger" },
+ { "kind" : "LiteralInteger" }
+ ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "DebugImportedEntity",
+ "enumerants" : [
+ {
+ "enumerant" : "ImportedModule",
+ "value" : "0"
+ },
+ {
+ "enumerant" : "ImportedDeclaration",
+ "value" : "1"
+ }
+ ]
+ }
+ ]
+}
diff --git a/include/spirv/unified1/extinst.spv-amd-gcn-shader.grammar.json b/include/spirv/unified1/extinst.spv-amd-gcn-shader.grammar.json
new file mode 100644
index 0000000..e18251b
--- /dev/null
+++ b/include/spirv/unified1/extinst.spv-amd-gcn-shader.grammar.json
@@ -0,0 +1,26 @@
+{
+ "revision" : 2,
+ "instructions" : [
+ {
+ "opname" : "CubeFaceIndexAMD",
+ "opcode" : 1,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'P'" }
+ ],
+ "extensions" : [ "SPV_AMD_gcn_shader" ]
+ },
+ {
+ "opname" : "CubeFaceCoordAMD",
+ "opcode" : 2,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'P'" }
+ ],
+ "extensions" : [ "SPV_AMD_gcn_shader" ]
+ },
+ {
+ "opname" : "TimeAMD",
+ "opcode" : 3,
+ "extensions" : [ "SPV_AMD_gcn_shader" ]
+ }
+ ]
+}
diff --git a/include/spirv/unified1/extinst.spv-amd-shader-ballot.grammar.json b/include/spirv/unified1/extinst.spv-amd-shader-ballot.grammar.json
new file mode 100644
index 0000000..62a470e
--- /dev/null
+++ b/include/spirv/unified1/extinst.spv-amd-shader-ballot.grammar.json
@@ -0,0 +1,41 @@
+{
+ "revision" : 5,
+ "instructions" : [
+ {
+ "opname" : "SwizzleInvocationsAMD",
+ "opcode" : 1,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'data'" },
+ { "kind" : "IdRef", "name" : "'offset'" }
+ ],
+ "extensions" : [ "SPV_AMD_shader_ballot" ]
+ },
+ {
+ "opname" : "SwizzleInvocationsMaskedAMD",
+ "opcode" : 2,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'data'" },
+ { "kind" : "IdRef", "name" : "'mask'" }
+ ],
+ "extensions" : [ "SPV_AMD_shader_ballot" ]
+ },
+ {
+ "opname" : "WriteInvocationAMD",
+ "opcode" : 3,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'inputValue'" },
+ { "kind" : "IdRef", "name" : "'writeValue'" },
+ { "kind" : "IdRef", "name" : "'invocationIndex'" }
+ ],
+ "extensions" : [ "SPV_AMD_shader_ballot" ]
+ },
+ {
+ "opname" : "MbcntAMD",
+ "opcode" : 4,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'mask'" }
+ ],
+ "extensions" : [ "SPV_AMD_shader_ballot" ]
+ }
+ ]
+}
diff --git a/include/spirv/unified1/extinst.spv-amd-shader-explicit-vertex-parameter.grammar.json b/include/spirv/unified1/extinst.spv-amd-shader-explicit-vertex-parameter.grammar.json
new file mode 100644
index 0000000..e156b1b
--- /dev/null
+++ b/include/spirv/unified1/extinst.spv-amd-shader-explicit-vertex-parameter.grammar.json
@@ -0,0 +1,14 @@
+{
+ "revision" : 4,
+ "instructions" : [
+ {
+ "opname" : "InterpolateAtVertexAMD",
+ "opcode" : 1,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'interpolant'" },
+ { "kind" : "IdRef", "name" : "'vertexIdx'" }
+ ],
+ "extensions" : [ "SPV_AMD_shader_explicit_vertex_parameter" ]
+ }
+ ]
+}
diff --git a/include/spirv/unified1/extinst.spv-amd-shader-trinary-minmax.grammar.json b/include/spirv/unified1/extinst.spv-amd-shader-trinary-minmax.grammar.json
new file mode 100644
index 0000000..c681976
--- /dev/null
+++ b/include/spirv/unified1/extinst.spv-amd-shader-trinary-minmax.grammar.json
@@ -0,0 +1,95 @@
+{
+ "revision" : 4,
+ "instructions" : [
+ {
+ "opname" : "FMin3AMD",
+ "opcode" : 1,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'x'" },
+ { "kind" : "IdRef", "name" : "'y'" },
+ { "kind" : "IdRef", "name" : "'z'" }
+ ],
+ "extensions" : [ "SPV_AMD_shader_trinary_minmax" ]
+ },
+ {
+ "opname" : "UMin3AMD",
+ "opcode" : 2,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'x'" },
+ { "kind" : "IdRef", "name" : "'y'" },
+ { "kind" : "IdRef", "name" : "'z'" }
+ ],
+ "extensions" : [ "SPV_AMD_shader_trinary_minmax" ]
+ },
+ {
+ "opname" : "SMin3AMD",
+ "opcode" : 3,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'x'" },
+ { "kind" : "IdRef", "name" : "'y'" },
+ { "kind" : "IdRef", "name" : "'z'" }
+ ],
+ "extensions" : [ "SPV_AMD_shader_trinary_minmax" ]
+ },
+ {
+ "opname" : "FMax3AMD",
+ "opcode" : 4,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'x'" },
+ { "kind" : "IdRef", "name" : "'y'" },
+ { "kind" : "IdRef", "name" : "'z'" }
+ ],
+ "extensions" : [ "SPV_AMD_shader_trinary_minmax" ]
+ },
+ {
+ "opname" : "UMax3AMD",
+ "opcode" : 5,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'x'" },
+ { "kind" : "IdRef", "name" : "'y'" },
+ { "kind" : "IdRef", "name" : "'z'" }
+ ],
+ "extensions" : [ "SPV_AMD_shader_trinary_minmax" ]
+ },
+ {
+ "opname" : "SMax3AMD",
+ "opcode" : 6,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'x'" },
+ { "kind" : "IdRef", "name" : "'y'" },
+ { "kind" : "IdRef", "name" : "'z'" }
+ ],
+ "extensions" : [ "SPV_AMD_shader_trinary_minmax" ]
+ },
+ {
+ "opname" : "FMid3AMD",
+ "opcode" : 7,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'x'" },
+ { "kind" : "IdRef", "name" : "'y'" },
+ { "kind" : "IdRef", "name" : "'z'" }
+ ],
+ "extensions" : [ "SPV_AMD_shader_trinary_minmax" ]
+ },
+ {
+ "opname" : "UMid3AMD",
+ "opcode" : 8,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'x'" },
+ { "kind" : "IdRef", "name" : "'y'" },
+ { "kind" : "IdRef", "name" : "'z'" }
+ ],
+ "extensions" : [ "SPV_AMD_shader_trinary_minmax" ]
+ },
+ {
+ "opname" : "SMid3AMD",
+ "opcode" : 9,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'x'" },
+ { "kind" : "IdRef", "name" : "'y'" },
+ { "kind" : "IdRef", "name" : "'z'" }
+ ],
+ "extensions" : [ "SPV_AMD_shader_trinary_minmax" ]
+ }
+ ]
+}
diff --git a/include/spirv/unified1/spirv.core.grammar.json b/include/spirv/unified1/spirv.core.grammar.json
index 45bac52..824ae4b 100644
--- a/include/spirv/unified1/spirv.core.grammar.json
+++ b/include/spirv/unified1/spirv.core.grammar.json
@@ -1,6 +1,6 @@
{
"copyright" : [
- "Copyright (c) 2014-2016 The Khronos Group Inc.",
+ "Copyright (c) 2014-2020 The Khronos Group Inc.",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy",
"of this software and/or associated documentation files (the \"Materials\"),",
@@ -4400,26 +4400,54 @@
{ "kind" : "IdRef", "name" : "'Hit'" },
{ "kind" : "IdRef", "name" : "'HitKind'" }
],
- "capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpReportIntersectionKHR",
+ "class" : "Reserved",
+ "opcode" : 5334,
+ "operands" : [
+ { "kind" : "IdResultType" },
+ { "kind" : "IdResult" },
+ { "kind" : "IdRef", "name" : "'Hit'" },
+ { "kind" : "IdRef", "name" : "'HitKind'" }
+ ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
"opname" : "OpIgnoreIntersectionNV",
"class" : "Reserved",
"opcode" : 5335,
-
- "capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpIgnoreIntersectionKHR",
+ "class" : "Reserved",
+ "opcode" : 5335,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
"opname" : "OpTerminateRayNV",
"class" : "Reserved",
"opcode" : 5336,
-
- "capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpTerminateRayKHR",
+ "class" : "Reserved",
+ "opcode" : 5336,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
@@ -4440,8 +4468,30 @@
{ "kind" : "IdRef", "name" : "'Ray Tmax'" },
{ "kind" : "IdRef", "name" : "'PayloadId'" }
],
- "capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpTraceRayKHR",
+ "class" : "Reserved",
+ "opcode" : 5337,
+ "operands" : [
+
+ { "kind" : "IdRef", "name" : "'Accel'" },
+ { "kind" : "IdRef", "name" : "'Ray Flags'" },
+ { "kind" : "IdRef", "name" : "'Cull Mask'" },
+ { "kind" : "IdRef", "name" : "'SBT Offset'" },
+ { "kind" : "IdRef", "name" : "'SBT Stride'" },
+ { "kind" : "IdRef", "name" : "'Miss Index'" },
+ { "kind" : "IdRef", "name" : "'Ray Origin'" },
+ { "kind" : "IdRef", "name" : "'Ray Tmin'" },
+ { "kind" : "IdRef", "name" : "'Ray Direction'" },
+ { "kind" : "IdRef", "name" : "'Ray Tmax'" },
+ { "kind" : "IdRef", "name" : "'PayloadId'" }
+ ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
@@ -4451,11 +4501,479 @@
"operands" : [
{ "kind" : "IdResult" }
],
- "capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR", "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing", "SPV_KHR_ray_query" ],
"version" : "None"
},
{
+ "opname" : "OpTypeAccelerationStructureKHR",
+ "class" : "Reserved",
+ "opcode" : 5341,
+ "operands" : [
+ { "kind" : "IdResult" }
+ ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR", "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing", "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpTypeRayQueryProvisionalKHR",
+ "class" : "Reserved",
+ "opcode" : 4472,
+ "operands" : [
+ { "kind" : "IdResult" }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryInitializeKHR",
+ "class" : "Reserved",
+ "opcode" : 4473,
+ "operands" : [
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'Accel'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayFlags'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'CullMask'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayOrigin'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayTMin'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayDirection'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayTMax'"
+ }
+
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryTerminateKHR",
+ "class" : "Reserved",
+ "opcode" : 4474,
+ "operands" : [
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryGenerateIntersectionKHR",
+ "class" : "Reserved",
+ "opcode" : 4475,
+ "operands" : [
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'HitT'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryConfirmIntersectionKHR",
+ "class" : "Reserved",
+ "opcode" : 4476,
+ "operands" : [
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryProceedKHR",
+ "class" : "Reserved",
+ "opcode" : 4477,
+ "operands" : [
+ { "kind" : "IdResultType" },
+ { "kind" : "IdResult" },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryGetIntersectionTypeKHR",
+ "class" : "Reserved",
+ "opcode" : 4479,
+ "operands" : [
+ { "kind" : "IdResultType" },
+ { "kind" : "IdResult" },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'Intersection'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryGetRayTMinKHR",
+ "class" : "Reserved",
+ "opcode" : 6016,
+ "operands" : [
+ { "kind" : "IdResultType" },
+ { "kind" : "IdResult" },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryGetRayFlagsKHR",
+ "class" : "Reserved",
+ "opcode" : 6017,
+ "operands" : [
+ { "kind" : "IdResultType" },
+ { "kind" : "IdResult" },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryGetIntersectionTKHR",
+ "class" : "Reserved",
+ "opcode" : 6018,
+ "operands" : [
+ { "kind" : "IdResultType" },
+ { "kind" : "IdResult" },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'Intersection'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryGetIntersectionInstanceCustomIndexKHR",
+ "class" : "Reserved",
+ "opcode" : 6019,
+ "operands" : [
+ { "kind" : "IdResultType" },
+ { "kind" : "IdResult" },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'Intersection'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryGetIntersectionInstanceIdKHR",
+ "class" : "Reserved",
+ "opcode" : 6020,
+ "operands" : [
+ { "kind" : "IdResultType" },
+ { "kind" : "IdResult" },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'Intersection'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR",
+ "class" : "Reserved",
+ "opcode" : 6021,
+ "operands" : [
+ { "kind" : "IdResultType" },
+ { "kind" : "IdResult" },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'Intersection'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryGetIntersectionGeometryIndexKHR",
+ "class" : "Reserved",
+ "opcode" : 6022,
+ "operands" : [
+ { "kind" : "IdResultType" },
+ { "kind" : "IdResult" },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'Intersection'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryGetIntersectionPrimitiveIndexKHR",
+ "class" : "Reserved",
+ "opcode" : 6023,
+ "operands" : [
+ { "kind" : "IdResultType" },
+ { "kind" : "IdResult" },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'Intersection'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryGetIntersectionBarycentricsKHR",
+ "class" : "Reserved",
+ "opcode" : 6024,
+ "operands" : [
+ { "kind" : "IdResultType" },
+ { "kind" : "IdResult" },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'Intersection'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryGetIntersectionFrontFaceKHR",
+ "class" : "Reserved",
+ "opcode" : 6025,
+ "operands" : [
+ { "kind" : "IdResultType" },
+ { "kind" : "IdResult" },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'Intersection'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryGetIntersectionCandidateAABBOpaqueKHR",
+ "class" : "Reserved",
+ "opcode" : 6026,
+ "operands" : [
+ { "kind" : "IdResultType" },
+ { "kind" : "IdResult" },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryGetIntersectionObjectRayDirectionKHR",
+ "class" : "Reserved",
+ "opcode" : 6027,
+ "operands" : [
+ { "kind" : "IdResultType" },
+ { "kind" : "IdResult" },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'Intersection'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryGetIntersectionObjectRayOriginKHR",
+ "class" : "Reserved",
+ "opcode" : 6028,
+ "operands" : [
+ { "kind" : "IdResultType" },
+ { "kind" : "IdResult" },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'Intersection'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryGetWorldRayDirectionKHR",
+ "class" : "Reserved",
+ "opcode" : 6029,
+ "operands" : [
+ { "kind" : "IdResultType" },
+ { "kind" : "IdResult" },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+
+ {
+ "opname" : "OpRayQueryGetWorldRayOriginKHR",
+ "class" : "Reserved",
+ "opcode" : 6030,
+ "operands" : [
+ { "kind" : "IdResultType" },
+ { "kind" : "IdResult" },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryGetIntersectionObjectToWorldKHR",
+ "class" : "Reserved",
+ "opcode" : 6031,
+ "operands" : [
+ { "kind" : "IdResultType" },
+ { "kind" : "IdResult" },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'Intersection'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpRayQueryGetIntersectionWorldToObjectKHR",
+ "class" : "Reserved",
+ "opcode" : 6032,
+ "operands" : [
+ { "kind" : "IdResultType" },
+ { "kind" : "IdResult" },
+ {
+ "kind" : "IdRef",
+ "name" : "'RayQuery'"
+ },
+ {
+ "kind" : "IdRef",
+ "name" : "'Intersection'"
+ }
+ ],
+ "capabilities" : [ "RayQueryProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
"opname" : "OpExecuteCallableNV",
"class" : "Reserved",
"opcode" : 5344,
@@ -4464,8 +4982,21 @@
{ "kind" : "IdRef", "name" : "'SBT Index'" },
{ "kind" : "IdRef", "name" : "'Callable DataId'" }
],
- "capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpExecuteCallableKHR",
+ "class" : "Reserved",
+ "opcode" : 5344,
+ "operands" : [
+
+ { "kind" : "IdRef", "name" : "'SBT Index'" },
+ { "kind" : "IdRef", "name" : "'Callable DataId'" }
+ ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
@@ -6943,6 +7474,67 @@
]
},
{
+ "category" : "BitEnum",
+ "kind" : "RayFlags",
+ "enumerants" : [
+ {
+ "enumerant" : "NoneKHR",
+ "value" : "0x0000",
+ "capabilities" : [ "RayQueryProvisionalKHR","RayTracingProvisionalKHR" ]
+ },
+ {
+ "enumerant" : "OpaqueKHR",
+ "value" : "0x0001",
+ "capabilities" : [ "RayQueryProvisionalKHR","RayTracingProvisionalKHR" ]
+ },
+ {
+ "enumerant" : "NoOpaqueKHR",
+ "value" : "0x0002",
+ "capabilities" : [ "RayQueryProvisionalKHR","RayTracingProvisionalKHR" ]
+ },
+ {
+ "enumerant" : "TerminateOnFirstHitKHR",
+ "value" : "0x0004",
+ "capabilities" : [ "RayQueryProvisionalKHR","RayTracingProvisionalKHR" ]
+ },
+ {
+ "enumerant" : "SkipClosestHitShaderKHR",
+ "value" : "0x0008",
+ "capabilities" : [ "RayQueryProvisionalKHR","RayTracingProvisionalKHR" ]
+ },
+ {
+ "enumerant" : "CullBackFacingTrianglesKHR",
+ "value" : "0x0010",
+ "capabilities" : [ "RayQueryProvisionalKHR","RayTracingProvisionalKHR" ]
+ },
+ {
+ "enumerant" : "CullFrontFacingTrianglesKHR",
+ "value" : "0x0020",
+ "capabilities" : [ "RayQueryProvisionalKHR","RayTracingProvisionalKHR" ]
+ },
+ {
+ "enumerant" : "CullOpaqueKHR",
+ "value" : "0x0040",
+ "capabilities" : [ "RayQueryProvisionalKHR","RayTracingProvisionalKHR" ]
+ },
+ {
+ "enumerant" : "CullNoOpaqueKHR",
+ "value" : "0x0080",
+ "capabilities" : [ "RayQueryProvisionalKHR","RayTracingProvisionalKHR" ]
+ },
+ {
+ "enumerant" : "SkipTrianglesKHR",
+ "value" : "0x0100",
+ "capabilities" : [ "RayTraversalPrimitiveCullingProvisionalKHR" ]
+ },
+ {
+ "enumerant" : "SkipAABBsKHR",
+ "value" : "0x0200",
+ "capabilities" : [ "RayTraversalPrimitiveCullingProvisionalKHR" ]
+ }
+ ]
+ },
+ {
"category" : "ValueEnum",
"kind" : "SourceLanguage",
"enumerants" : [
@@ -7026,37 +7618,73 @@
{
"enumerant" : "RayGenerationNV",
"value" : 5313,
- "capabilities" : [ "RayTracingNV" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "RayGenerationKHR",
+ "value" : 5313,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
"version" : "None"
},
{
"enumerant" : "IntersectionNV",
"value" : 5314,
- "capabilities" : [ "RayTracingNV" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "IntersectionKHR",
+ "value" : 5314,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
"version" : "None"
},
{
"enumerant" : "AnyHitNV",
"value" : 5315,
- "capabilities" : [ "RayTracingNV" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "AnyHitKHR",
+ "value" : 5315,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
"version" : "None"
},
{
"enumerant" : "ClosestHitNV",
"value" : 5316,
- "capabilities" : [ "RayTracingNV" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "ClosestHitKHR",
+ "value" : 5316,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
"version" : "None"
},
{
"enumerant" : "MissNV",
"value" : 5317,
- "capabilities" : [ "RayTracingNV" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "MissKHR",
+ "value" : 5317,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
"version" : "None"
},
{
"enumerant" : "CallableNV",
"value" : 5318,
- "capabilities" : [ "RayTracingNV" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "CallableKHR",
+ "value" : 5318,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
"version" : "None"
}
]
@@ -7581,43 +8209,85 @@
{
"enumerant" : "CallableDataNV",
"value" : 5328,
- "extensions" : [ "SPV_NV_ray_tracing" ],
- "capabilities" : [ "RayTracingNV" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "CallableDataKHR",
+ "value" : 5328,
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
"version" : "None"
},
{
"enumerant" : "IncomingCallableDataNV",
"value" : 5329,
- "extensions" : [ "SPV_NV_ray_tracing" ],
- "capabilities" : [ "RayTracingNV" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "IncomingCallableDataKHR",
+ "value" : 5329,
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
"version" : "None"
},
{
"enumerant" : "RayPayloadNV",
"value" : 5338,
- "extensions" : [ "SPV_NV_ray_tracing" ],
- "capabilities" : [ "RayTracingNV" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "RayPayloadKHR",
+ "value" : 5338,
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
"version" : "None"
},
{
"enumerant" : "HitAttributeNV",
"value" : 5339,
- "extensions" : [ "SPV_NV_ray_tracing" ],
- "capabilities" : [ "RayTracingNV" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "HitAttributeKHR",
+ "value" : 5339,
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
"version" : "None"
},
{
"enumerant" : "IncomingRayPayloadNV",
"value" : 5342,
- "extensions" : [ "SPV_NV_ray_tracing" ],
- "capabilities" : [ "RayTracingNV" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "IncomingRayPayloadKHR",
+ "value" : 5342,
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
"version" : "None"
},
{
"enumerant" : "ShaderRecordBufferNV",
"value" : 5343,
- "extensions" : [ "SPV_NV_ray_tracing" ],
- "capabilities" : [ "RayTracingNV" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "ShaderRecordBufferKHR",
+ "value" : 5343,
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
"version" : "None"
},
{
@@ -8735,7 +9405,7 @@
{
"enumerant" : "PrimitiveId",
"value" : 7,
- "capabilities" : [ "Geometry", "Tessellation", "RayTracingNV" ]
+ "capabilities" : [ "Geometry", "Tessellation", "RayTracingNV", "RayTracingProvisionalKHR" ]
},
{
"enumerant" : "InvocationId",
@@ -9193,99 +9863,204 @@
{
"enumerant" : "LaunchIdNV",
"value" : 5319,
- "capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "LaunchIdKHR",
+ "value" : 5319,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
"enumerant" : "LaunchSizeNV",
"value" : 5320,
- "capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "LaunchSizeKHR",
+ "value" : 5320,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
"enumerant" : "WorldRayOriginNV",
"value" : 5321,
- "capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "WorldRayOriginKHR",
+ "value" : 5321,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
"enumerant" : "WorldRayDirectionNV",
"value" : 5322,
- "capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "WorldRayDirectionKHR",
+ "value" : 5322,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
"enumerant" : "ObjectRayOriginNV",
"value" : 5323,
- "capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "ObjectRayOriginKHR",
+ "value" : 5323,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
"enumerant" : "ObjectRayDirectionNV",
"value" : 5324,
- "capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "ObjectRayDirectionKHR",
+ "value" : 5324,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
"enumerant" : "RayTminNV",
"value" : 5325,
- "capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "RayTminKHR",
+ "value" : 5325,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
"enumerant" : "RayTmaxNV",
"value" : 5326,
- "capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "RayTmaxKHR",
+ "value" : 5326,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
"enumerant" : "InstanceCustomIndexNV",
"value" : 5327,
- "capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "InstanceCustomIndexKHR",
+ "value" : 5327,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
"enumerant" : "ObjectToWorldNV",
"value" : 5330,
- "capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "ObjectToWorldKHR",
+ "value" : 5330,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
"enumerant" : "WorldToObjectNV",
"value" : 5331,
- "capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "WorldToObjectKHR",
+ "value" : 5331,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
"enumerant" : "HitTNV",
"value" : 5332,
- "capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "HitTKHR",
+ "value" : 5332,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
"enumerant" : "HitKindNV",
"value" : 5333,
- "capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "HitKindKHR",
+ "value" : 5333,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
"enumerant" : "IncomingRayFlagsNV",
"value" : 5351,
- "capabilities" : [ "RayTracingNV" ],
- "extensions" : [ "SPV_NV_ray_tracing" ],
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "IncomingRayFlagsKHR",
+ "value" : 5351,
+ "capabilities" : [ "RayTracingNV" , "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_NV_ray_tracing" , "SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "RayGeometryIndexKHR",
+ "value" : 5352,
+ "capabilities" : [ "RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_tracing" ],
"version" : "None"
},
{
@@ -9353,6 +10128,11 @@
"value" : 5,
"capabilities" : [ "VulkanMemoryModel" ],
"version" : "1.5"
+ },
+ {
+ "enumerant" : "ShaderCallKHR",
+ "value" : 6,
+ "capabilities" : [ "RayTracingProvisionalKHR" ]
}
]
},
@@ -9925,6 +10705,20 @@
"version" : "1.4"
},
{
+ "enumerant" : "RayQueryProvisionalKHR",
+ "value" : 4471,
+ "capabilities" : [ "Shader" ],
+ "extensions" : [ "SPV_KHR_ray_query" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "RayTraversalPrimitiveCullingProvisionalKHR",
+ "value" : 4478,
+ "capabilities" : [ "RayQueryProvisionalKHR","RayTracingProvisionalKHR" ],
+ "extensions" : [ "SPV_KHR_ray_query","SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
"enumerant" : "Float16ImageAMD",
"value" : 5008,
"capabilities" : [ "Shader" ],
@@ -10273,6 +11067,13 @@
"version" : "None"
},
{
+ "enumerant" : "RayTracingProvisionalKHR",
+ "value" : 5353,
+ "capabilities" : [ "Shader" ],
+ "extensions" : [ "SPV_KHR_ray_tracing" ],
+ "version" : "None"
+ },
+ {
"enumerant" : "CooperativeMatrixNV",
"value" : 5357,
"capabilities" : [ "Shader" ],
@@ -10366,6 +11167,59 @@
]
},
{
+ "category" : "ValueEnum",
+ "kind" : "RayQueryIntersection",
+ "enumerants" : [
+ {
+ "enumerant" : "RayQueryCandidateIntersectionKHR",
+ "value" : 0,
+ "capabilities" : [ "RayQueryProvisionalKHR" ]
+ },
+ {
+ "enumerant" : "RayQueryCommittedIntersectionKHR",
+ "value" : 1,
+ "capabilities" : [ "RayQueryProvisionalKHR" ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "RayQueryCommittedIntersectionType",
+ "enumerants" : [
+ {
+ "enumerant" : "RayQueryCommittedIntersectionNoneKHR",
+ "value" : 0,
+ "capabilities" : [ "RayQueryProvisionalKHR" ]
+ },
+ {
+ "enumerant" : "RayQueryCommittedIntersectionTriangleKHR",
+ "value" : 1,
+ "capabilities" : [ "RayQueryProvisionalKHR" ]
+ },
+ {
+ "enumerant" : "RayQueryCommittedIntersectionGeneratedKHR",
+ "value" : 2,
+ "capabilities" : [ "RayQueryProvisionalKHR" ]
+ }
+ ]
+ },
+ {
+ "category" : "ValueEnum",
+ "kind" : "RayQueryCandidateIntersectionType",
+ "enumerants" : [
+ {
+ "enumerant" : "RayQueryCandidateIntersectionTriangleKHR",
+ "value" : 0,
+ "capabilities" : [ "RayQueryProvisionalKHR" ]
+ },
+ {
+ "enumerant" : "RayQueryCandidateIntersectionAABBKHR",
+ "value" : 1,
+ "capabilities" : [ "RayQueryProvisionalKHR" ]
+ }
+ ]
+ },
+ {
"category" : "Id",
"kind" : "IdResultType",
"doc" : "Reference to an <id> representing the result's type of the enclosing instruction"
diff --git a/include/spirv/unified1/spirv.cs b/include/spirv/unified1/spirv.cs
index 705aa59..c5ddff9 100644
--- a/include/spirv/unified1/spirv.cs
+++ b/include/spirv/unified1/spirv.cs
@@ -1,4 +1,4 @@
-// Copyright (c) 2014-2019 The Khronos Group Inc.
+// Copyright (c) 2014-2020 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"),
@@ -74,11 +74,17 @@ namespace Spv
Kernel = 6,
TaskNV = 5267,
MeshNV = 5268,
+ RayGenerationKHR = 5313,
RayGenerationNV = 5313,
+ IntersectionKHR = 5314,
IntersectionNV = 5314,
+ AnyHitKHR = 5315,
AnyHitNV = 5315,
+ ClosestHitKHR = 5316,
ClosestHitNV = 5316,
+ MissKHR = 5317,
MissNV = 5317,
+ CallableKHR = 5318,
CallableNV = 5318,
}
@@ -175,11 +181,17 @@ namespace Spv
AtomicCounter = 10,
Image = 11,
StorageBuffer = 12,
+ CallableDataKHR = 5328,
CallableDataNV = 5328,
+ IncomingCallableDataKHR = 5329,
IncomingCallableDataNV = 5329,
+ RayPayloadKHR = 5338,
RayPayloadNV = 5338,
+ HitAttributeKHR = 5339,
HitAttributeNV = 5339,
+ IncomingRayPayloadKHR = 5342,
IncomingRayPayloadNV = 5342,
+ ShaderRecordBufferKHR = 5343,
ShaderRecordBufferNV = 5343,
PhysicalStorageBuffer = 5349,
PhysicalStorageBufferEXT = 5349,
@@ -556,20 +568,35 @@ namespace Spv
FragmentSizeNV = 5292,
FragInvocationCountEXT = 5293,
InvocationsPerPixelNV = 5293,
+ LaunchIdKHR = 5319,
LaunchIdNV = 5319,
+ LaunchSizeKHR = 5320,
LaunchSizeNV = 5320,
+ WorldRayOriginKHR = 5321,
WorldRayOriginNV = 5321,
+ WorldRayDirectionKHR = 5322,
WorldRayDirectionNV = 5322,
+ ObjectRayOriginKHR = 5323,
ObjectRayOriginNV = 5323,
+ ObjectRayDirectionKHR = 5324,
ObjectRayDirectionNV = 5324,
+ RayTminKHR = 5325,
RayTminNV = 5325,
+ RayTmaxKHR = 5326,
RayTmaxNV = 5326,
+ InstanceCustomIndexKHR = 5327,
InstanceCustomIndexNV = 5327,
+ ObjectToWorldKHR = 5330,
ObjectToWorldNV = 5330,
+ WorldToObjectKHR = 5331,
WorldToObjectNV = 5331,
+ HitTKHR = 5332,
HitTNV = 5332,
+ HitKindKHR = 5333,
HitKindNV = 5333,
+ IncomingRayFlagsKHR = 5351,
IncomingRayFlagsNV = 5351,
+ RayGeometryIndexKHR = 5352,
WarpsPerSMNV = 5374,
SMCountNV = 5375,
WarpIDNV = 5376,
@@ -712,6 +739,7 @@ namespace Spv
Invocation = 4,
QueueFamily = 5,
QueueFamilyKHR = 5,
+ ShaderCallKHR = 6,
}
public enum GroupOperation
@@ -837,6 +865,8 @@ namespace Spv
SignedZeroInfNanPreserve = 4466,
RoundingModeRTE = 4467,
RoundingModeRTZ = 4468,
+ RayQueryProvisionalKHR = 4471,
+ RayTraversalPrimitiveCullingProvisionalKHR = 4478,
Float16ImageAMD = 5008,
ImageGatherBiasLodAMD = 5009,
FragmentMaskAMD = 5010,
@@ -890,6 +920,7 @@ namespace Spv
PhysicalStorageBufferAddresses = 5347,
PhysicalStorageBufferAddressesEXT = 5347,
ComputeDerivativeGroupLinearNV = 5350,
+ RayTracingProvisionalKHR = 5353,
CooperativeMatrixNV = 5357,
FragmentShaderSampleInterlockEXT = 5363,
FragmentShaderShadingRateInterlockEXT = 5372,
@@ -906,6 +937,54 @@ namespace Spv
SubgroupAvcMotionEstimationChromaINTEL = 5698,
}
+ public enum RayFlagsShift
+ {
+ OpaqueKHR = 0,
+ NoOpaqueKHR = 1,
+ TerminateOnFirstHitKHR = 2,
+ SkipClosestHitShaderKHR = 3,
+ CullBackFacingTrianglesKHR = 4,
+ CullFrontFacingTrianglesKHR = 5,
+ CullOpaqueKHR = 6,
+ CullNoOpaqueKHR = 7,
+ SkipTrianglesKHR = 8,
+ SkipAABBsKHR = 9,
+ }
+
+ public enum RayFlagsMask
+ {
+ MaskNone = 0,
+ OpaqueKHR = 0x00000001,
+ NoOpaqueKHR = 0x00000002,
+ TerminateOnFirstHitKHR = 0x00000004,
+ SkipClosestHitShaderKHR = 0x00000008,
+ CullBackFacingTrianglesKHR = 0x00000010,
+ CullFrontFacingTrianglesKHR = 0x00000020,
+ CullOpaqueKHR = 0x00000040,
+ CullNoOpaqueKHR = 0x00000080,
+ SkipTrianglesKHR = 0x00000100,
+ SkipAABBsKHR = 0x00000200,
+ }
+
+ public enum RayQueryIntersection
+ {
+ RayQueryCandidateIntersectionKHR = 0,
+ RayQueryCommittedIntersectionKHR = 1,
+ }
+
+ public enum RayQueryCommittedIntersectionType
+ {
+ RayQueryCommittedIntersectionNoneKHR = 0,
+ RayQueryCommittedIntersectionTriangleKHR = 1,
+ RayQueryCommittedIntersectionGeneratedKHR = 2,
+ }
+
+ public enum RayQueryCandidateIntersectionType
+ {
+ RayQueryCandidateIntersectionTriangleKHR = 0,
+ RayQueryCandidateIntersectionAABBKHR = 1,
+ }
+
public enum Op
{
OpNop = 0,
@@ -1258,6 +1337,13 @@ namespace Spv
OpSubgroupAnyKHR = 4429,
OpSubgroupAllEqualKHR = 4430,
OpSubgroupReadInvocationKHR = 4432,
+ OpTypeRayQueryProvisionalKHR = 4472,
+ OpRayQueryInitializeKHR = 4473,
+ OpRayQueryTerminateKHR = 4474,
+ OpRayQueryGenerateIntersectionKHR = 4475,
+ OpRayQueryConfirmIntersectionKHR = 4476,
+ OpRayQueryProceedKHR = 4477,
+ OpRayQueryGetIntersectionTypeKHR = 4479,
OpGroupIAddNonUniformAMD = 5000,
OpGroupFAddNonUniformAMD = 5001,
OpGroupFMinNonUniformAMD = 5002,
@@ -1272,11 +1358,17 @@ namespace Spv
OpImageSampleFootprintNV = 5283,
OpGroupNonUniformPartitionNV = 5296,
OpWritePackedPrimitiveIndices4x8NV = 5299,
+ OpReportIntersectionKHR = 5334,
OpReportIntersectionNV = 5334,
+ OpIgnoreIntersectionKHR = 5335,
OpIgnoreIntersectionNV = 5335,
+ OpTerminateRayKHR = 5336,
OpTerminateRayNV = 5336,
OpTraceNV = 5337,
+ OpTraceRayKHR = 5337,
+ OpTypeAccelerationStructureKHR = 5341,
OpTypeAccelerationStructureNV = 5341,
+ OpExecuteCallableKHR = 5344,
OpExecuteCallableNV = 5344,
OpTypeCooperativeMatrixNV = 5358,
OpCooperativeMatrixLoadNV = 5359,
@@ -1433,6 +1525,23 @@ namespace Spv
OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814,
OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815,
OpSubgroupAvcSicGetInterRawSadsINTEL = 5816,
+ OpRayQueryGetRayTMinKHR = 6016,
+ OpRayQueryGetRayFlagsKHR = 6017,
+ OpRayQueryGetIntersectionTKHR = 6018,
+ OpRayQueryGetIntersectionInstanceCustomIndexKHR = 6019,
+ OpRayQueryGetIntersectionInstanceIdKHR = 6020,
+ OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR = 6021,
+ OpRayQueryGetIntersectionGeometryIndexKHR = 6022,
+ OpRayQueryGetIntersectionPrimitiveIndexKHR = 6023,
+ OpRayQueryGetIntersectionBarycentricsKHR = 6024,
+ OpRayQueryGetIntersectionFrontFaceKHR = 6025,
+ OpRayQueryGetIntersectionCandidateAABBOpaqueKHR = 6026,
+ OpRayQueryGetIntersectionObjectRayDirectionKHR = 6027,
+ OpRayQueryGetIntersectionObjectRayOriginKHR = 6028,
+ OpRayQueryGetWorldRayDirectionKHR = 6029,
+ OpRayQueryGetWorldRayOriginKHR = 6030,
+ OpRayQueryGetIntersectionObjectToWorldKHR = 6031,
+ OpRayQueryGetIntersectionWorldToObjectKHR = 6032,
}
}
}
diff --git a/include/spirv/unified1/spirv.h b/include/spirv/unified1/spirv.h
index 1b67617..92b34c3 100644
--- a/include/spirv/unified1/spirv.h
+++ b/include/spirv/unified1/spirv.h
@@ -1,5 +1,5 @@
/*
-** Copyright (c) 2014-2019 The Khronos Group Inc.
+** Copyright (c) 2014-2020 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a copy
** of this software and/or associated documentation files (the "Materials"),
@@ -57,7 +57,7 @@ typedef unsigned int SpvId;
#define SPV_REVISION 1
static const unsigned int SpvMagicNumber = 0x07230203;
-static const unsigned int SpvVersion = 0x00010400;
+static const unsigned int SpvVersion = 0x00010500;
static const unsigned int SpvRevision = 1;
static const unsigned int SpvOpCodeMask = 0xffff;
static const unsigned int SpvWordCountShift = 16;
@@ -82,11 +82,17 @@ typedef enum SpvExecutionModel_ {
SpvExecutionModelKernel = 6,
SpvExecutionModelTaskNV = 5267,
SpvExecutionModelMeshNV = 5268,
+ SpvExecutionModelRayGenerationKHR = 5313,
SpvExecutionModelRayGenerationNV = 5313,
+ SpvExecutionModelIntersectionKHR = 5314,
SpvExecutionModelIntersectionNV = 5314,
+ SpvExecutionModelAnyHitKHR = 5315,
SpvExecutionModelAnyHitNV = 5315,
+ SpvExecutionModelClosestHitKHR = 5316,
SpvExecutionModelClosestHitNV = 5316,
+ SpvExecutionModelMissKHR = 5317,
SpvExecutionModelMissNV = 5317,
+ SpvExecutionModelCallableKHR = 5318,
SpvExecutionModelCallableNV = 5318,
SpvExecutionModelMax = 0x7fffffff,
} SpvExecutionModel;
@@ -183,11 +189,17 @@ typedef enum SpvStorageClass_ {
SpvStorageClassAtomicCounter = 10,
SpvStorageClassImage = 11,
SpvStorageClassStorageBuffer = 12,
+ SpvStorageClassCallableDataKHR = 5328,
SpvStorageClassCallableDataNV = 5328,
+ SpvStorageClassIncomingCallableDataKHR = 5329,
SpvStorageClassIncomingCallableDataNV = 5329,
+ SpvStorageClassRayPayloadKHR = 5338,
SpvStorageClassRayPayloadNV = 5338,
+ SpvStorageClassHitAttributeKHR = 5339,
SpvStorageClassHitAttributeNV = 5339,
+ SpvStorageClassIncomingRayPayloadKHR = 5342,
SpvStorageClassIncomingRayPayloadNV = 5342,
+ SpvStorageClassShaderRecordBufferKHR = 5343,
SpvStorageClassShaderRecordBufferNV = 5343,
SpvStorageClassPhysicalStorageBuffer = 5349,
SpvStorageClassPhysicalStorageBufferEXT = 5349,
@@ -562,20 +574,35 @@ typedef enum SpvBuiltIn_ {
SpvBuiltInFragmentSizeNV = 5292,
SpvBuiltInFragInvocationCountEXT = 5293,
SpvBuiltInInvocationsPerPixelNV = 5293,
+ SpvBuiltInLaunchIdKHR = 5319,
SpvBuiltInLaunchIdNV = 5319,
+ SpvBuiltInLaunchSizeKHR = 5320,
SpvBuiltInLaunchSizeNV = 5320,
+ SpvBuiltInWorldRayOriginKHR = 5321,
SpvBuiltInWorldRayOriginNV = 5321,
+ SpvBuiltInWorldRayDirectionKHR = 5322,
SpvBuiltInWorldRayDirectionNV = 5322,
+ SpvBuiltInObjectRayOriginKHR = 5323,
SpvBuiltInObjectRayOriginNV = 5323,
+ SpvBuiltInObjectRayDirectionKHR = 5324,
SpvBuiltInObjectRayDirectionNV = 5324,
+ SpvBuiltInRayTminKHR = 5325,
SpvBuiltInRayTminNV = 5325,
+ SpvBuiltInRayTmaxKHR = 5326,
SpvBuiltInRayTmaxNV = 5326,
+ SpvBuiltInInstanceCustomIndexKHR = 5327,
SpvBuiltInInstanceCustomIndexNV = 5327,
+ SpvBuiltInObjectToWorldKHR = 5330,
SpvBuiltInObjectToWorldNV = 5330,
+ SpvBuiltInWorldToObjectKHR = 5331,
SpvBuiltInWorldToObjectNV = 5331,
+ SpvBuiltInHitTKHR = 5332,
SpvBuiltInHitTNV = 5332,
+ SpvBuiltInHitKindKHR = 5333,
SpvBuiltInHitKindNV = 5333,
+ SpvBuiltInIncomingRayFlagsKHR = 5351,
SpvBuiltInIncomingRayFlagsNV = 5351,
+ SpvBuiltInRayGeometryIndexKHR = 5352,
SpvBuiltInWarpsPerSMNV = 5374,
SpvBuiltInSMCountNV = 5375,
SpvBuiltInWarpIDNV = 5376,
@@ -713,6 +740,7 @@ typedef enum SpvScope_ {
SpvScopeInvocation = 4,
SpvScopeQueueFamily = 5,
SpvScopeQueueFamilyKHR = 5,
+ SpvScopeShaderCallKHR = 6,
SpvScopeMax = 0x7fffffff,
} SpvScope;
@@ -837,6 +865,8 @@ typedef enum SpvCapability_ {
SpvCapabilitySignedZeroInfNanPreserve = 4466,
SpvCapabilityRoundingModeRTE = 4467,
SpvCapabilityRoundingModeRTZ = 4468,
+ SpvCapabilityRayQueryProvisionalKHR = 4471,
+ SpvCapabilityRayTraversalPrimitiveCullingProvisionalKHR = 4478,
SpvCapabilityFloat16ImageAMD = 5008,
SpvCapabilityImageGatherBiasLodAMD = 5009,
SpvCapabilityFragmentMaskAMD = 5010,
@@ -890,6 +920,7 @@ typedef enum SpvCapability_ {
SpvCapabilityPhysicalStorageBufferAddresses = 5347,
SpvCapabilityPhysicalStorageBufferAddressesEXT = 5347,
SpvCapabilityComputeDerivativeGroupLinearNV = 5350,
+ SpvCapabilityRayTracingProvisionalKHR = 5353,
SpvCapabilityCooperativeMatrixNV = 5357,
SpvCapabilityFragmentShaderSampleInterlockEXT = 5363,
SpvCapabilityFragmentShaderShadingRateInterlockEXT = 5372,
@@ -907,6 +938,53 @@ typedef enum SpvCapability_ {
SpvCapabilityMax = 0x7fffffff,
} SpvCapability;
+typedef enum SpvRayFlagsShift_ {
+ SpvRayFlagsOpaqueKHRShift = 0,
+ SpvRayFlagsNoOpaqueKHRShift = 1,
+ SpvRayFlagsTerminateOnFirstHitKHRShift = 2,
+ SpvRayFlagsSkipClosestHitShaderKHRShift = 3,
+ SpvRayFlagsCullBackFacingTrianglesKHRShift = 4,
+ SpvRayFlagsCullFrontFacingTrianglesKHRShift = 5,
+ SpvRayFlagsCullOpaqueKHRShift = 6,
+ SpvRayFlagsCullNoOpaqueKHRShift = 7,
+ SpvRayFlagsSkipTrianglesKHRShift = 8,
+ SpvRayFlagsSkipAABBsKHRShift = 9,
+ SpvRayFlagsMax = 0x7fffffff,
+} SpvRayFlagsShift;
+
+typedef enum SpvRayFlagsMask_ {
+ SpvRayFlagsMaskNone = 0,
+ SpvRayFlagsOpaqueKHRMask = 0x00000001,
+ SpvRayFlagsNoOpaqueKHRMask = 0x00000002,
+ SpvRayFlagsTerminateOnFirstHitKHRMask = 0x00000004,
+ SpvRayFlagsSkipClosestHitShaderKHRMask = 0x00000008,
+ SpvRayFlagsCullBackFacingTrianglesKHRMask = 0x00000010,
+ SpvRayFlagsCullFrontFacingTrianglesKHRMask = 0x00000020,
+ SpvRayFlagsCullOpaqueKHRMask = 0x00000040,
+ SpvRayFlagsCullNoOpaqueKHRMask = 0x00000080,
+ SpvRayFlagsSkipTrianglesKHRMask = 0x00000100,
+ SpvRayFlagsSkipAABBsKHRMask = 0x00000200,
+} SpvRayFlagsMask;
+
+typedef enum SpvRayQueryIntersection_ {
+ SpvRayQueryIntersectionRayQueryCandidateIntersectionKHR = 0,
+ SpvRayQueryIntersectionRayQueryCommittedIntersectionKHR = 1,
+ SpvRayQueryIntersectionMax = 0x7fffffff,
+} SpvRayQueryIntersection;
+
+typedef enum SpvRayQueryCommittedIntersectionType_ {
+ SpvRayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionNoneKHR = 0,
+ SpvRayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionTriangleKHR = 1,
+ SpvRayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionGeneratedKHR = 2,
+ SpvRayQueryCommittedIntersectionTypeMax = 0x7fffffff,
+} SpvRayQueryCommittedIntersectionType;
+
+typedef enum SpvRayQueryCandidateIntersectionType_ {
+ SpvRayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionTriangleKHR = 0,
+ SpvRayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionAABBKHR = 1,
+ SpvRayQueryCandidateIntersectionTypeMax = 0x7fffffff,
+} SpvRayQueryCandidateIntersectionType;
+
typedef enum SpvOp_ {
SpvOpNop = 0,
SpvOpUndef = 1,
@@ -1258,6 +1336,13 @@ typedef enum SpvOp_ {
SpvOpSubgroupAnyKHR = 4429,
SpvOpSubgroupAllEqualKHR = 4430,
SpvOpSubgroupReadInvocationKHR = 4432,
+ SpvOpTypeRayQueryProvisionalKHR = 4472,
+ SpvOpRayQueryInitializeKHR = 4473,
+ SpvOpRayQueryTerminateKHR = 4474,
+ SpvOpRayQueryGenerateIntersectionKHR = 4475,
+ SpvOpRayQueryConfirmIntersectionKHR = 4476,
+ SpvOpRayQueryProceedKHR = 4477,
+ SpvOpRayQueryGetIntersectionTypeKHR = 4479,
SpvOpGroupIAddNonUniformAMD = 5000,
SpvOpGroupFAddNonUniformAMD = 5001,
SpvOpGroupFMinNonUniformAMD = 5002,
@@ -1272,11 +1357,17 @@ typedef enum SpvOp_ {
SpvOpImageSampleFootprintNV = 5283,
SpvOpGroupNonUniformPartitionNV = 5296,
SpvOpWritePackedPrimitiveIndices4x8NV = 5299,
+ SpvOpReportIntersectionKHR = 5334,
SpvOpReportIntersectionNV = 5334,
+ SpvOpIgnoreIntersectionKHR = 5335,
SpvOpIgnoreIntersectionNV = 5335,
+ SpvOpTerminateRayKHR = 5336,
SpvOpTerminateRayNV = 5336,
SpvOpTraceNV = 5337,
+ SpvOpTraceRayKHR = 5337,
+ SpvOpTypeAccelerationStructureKHR = 5341,
SpvOpTypeAccelerationStructureNV = 5341,
+ SpvOpExecuteCallableKHR = 5344,
SpvOpExecuteCallableNV = 5344,
SpvOpTypeCooperativeMatrixNV = 5358,
SpvOpCooperativeMatrixLoadNV = 5359,
@@ -1433,6 +1524,23 @@ typedef enum SpvOp_ {
SpvOpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814,
SpvOpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815,
SpvOpSubgroupAvcSicGetInterRawSadsINTEL = 5816,
+ SpvOpRayQueryGetRayTMinKHR = 6016,
+ SpvOpRayQueryGetRayFlagsKHR = 6017,
+ SpvOpRayQueryGetIntersectionTKHR = 6018,
+ SpvOpRayQueryGetIntersectionInstanceCustomIndexKHR = 6019,
+ SpvOpRayQueryGetIntersectionInstanceIdKHR = 6020,
+ SpvOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR = 6021,
+ SpvOpRayQueryGetIntersectionGeometryIndexKHR = 6022,
+ SpvOpRayQueryGetIntersectionPrimitiveIndexKHR = 6023,
+ SpvOpRayQueryGetIntersectionBarycentricsKHR = 6024,
+ SpvOpRayQueryGetIntersectionFrontFaceKHR = 6025,
+ SpvOpRayQueryGetIntersectionCandidateAABBOpaqueKHR = 6026,
+ SpvOpRayQueryGetIntersectionObjectRayDirectionKHR = 6027,
+ SpvOpRayQueryGetIntersectionObjectRayOriginKHR = 6028,
+ SpvOpRayQueryGetWorldRayDirectionKHR = 6029,
+ SpvOpRayQueryGetWorldRayOriginKHR = 6030,
+ SpvOpRayQueryGetIntersectionObjectToWorldKHR = 6031,
+ SpvOpRayQueryGetIntersectionWorldToObjectKHR = 6032,
SpvOpMax = 0x7fffffff,
} SpvOp;
@@ -1810,6 +1918,30 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
case SpvOpTerminateRayNV: *hasResult = false; *hasResultType = false; break;
case SpvOpTraceNV: *hasResult = false; *hasResultType = false; break;
case SpvOpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break;
+ case SpvOpTypeRayQueryProvisionalKHR: *hasResult = true; *hasResultType = false; break;
+ case SpvOpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break;
+ case SpvOpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break;
+ case SpvOpRayQueryGenerateIntersectionKHR: *hasResult = false; *hasResultType = false; break;
+ case SpvOpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break;
+ case SpvOpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break;
+ case SpvOpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break;
+ case SpvOpRayQueryGetRayTMinKHR: *hasResult = true; *hasResultType = true; break;
+ case SpvOpRayQueryGetRayFlagsKHR: *hasResult = true; *hasResultType = true; break;
+ case SpvOpRayQueryGetIntersectionTKHR: *hasResult = true; *hasResultType = true; break;
+ case SpvOpRayQueryGetIntersectionInstanceCustomIndexKHR: *hasResult = true; *hasResultType = true; break;
+ case SpvOpRayQueryGetIntersectionInstanceIdKHR: *hasResult = true; *hasResultType = true; break;
+ case SpvOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: *hasResult = true; *hasResultType = true; break;
+ case SpvOpRayQueryGetIntersectionGeometryIndexKHR: *hasResult = true; *hasResultType = true; break;
+ case SpvOpRayQueryGetIntersectionPrimitiveIndexKHR: *hasResult = true; *hasResultType = true; break;
+ case SpvOpRayQueryGetIntersectionBarycentricsKHR: *hasResult = true; *hasResultType = true; break;
+ case SpvOpRayQueryGetIntersectionFrontFaceKHR: *hasResult = true; *hasResultType = true; break;
+ case SpvOpRayQueryGetIntersectionCandidateAABBOpaqueKHR: *hasResult = true; *hasResultType = true; break;
+ case SpvOpRayQueryGetIntersectionObjectRayDirectionKHR: *hasResult = true; *hasResultType = true; break;
+ case SpvOpRayQueryGetIntersectionObjectRayOriginKHR: *hasResult = true; *hasResultType = true; break;
+ case SpvOpRayQueryGetWorldRayDirectionKHR: *hasResult = true; *hasResultType = true; break;
+ case SpvOpRayQueryGetWorldRayOriginKHR: *hasResult = true; *hasResultType = true; break;
+ case SpvOpRayQueryGetIntersectionObjectToWorldKHR: *hasResult = true; *hasResultType = true; break;
+ case SpvOpRayQueryGetIntersectionWorldToObjectKHR: *hasResult = true; *hasResultType = true; break;
case SpvOpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
case SpvOpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
case SpvOpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break;
diff --git a/include/spirv/unified1/spirv.hpp b/include/spirv/unified1/spirv.hpp
index f5cbda1..9f98683 100644
--- a/include/spirv/unified1/spirv.hpp
+++ b/include/spirv/unified1/spirv.hpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2014-2019 The Khronos Group Inc.
+// Copyright (c) 2014-2020 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"),
@@ -53,7 +53,7 @@ typedef unsigned int Id;
#define SPV_REVISION 1
static const unsigned int MagicNumber = 0x07230203;
-static const unsigned int Version = 0x00010400;
+static const unsigned int Version = 0x00010500;
static const unsigned int Revision = 1;
static const unsigned int OpCodeMask = 0xffff;
static const unsigned int WordCountShift = 16;
@@ -78,11 +78,17 @@ enum ExecutionModel {
ExecutionModelKernel = 6,
ExecutionModelTaskNV = 5267,
ExecutionModelMeshNV = 5268,
+ ExecutionModelRayGenerationKHR = 5313,
ExecutionModelRayGenerationNV = 5313,
+ ExecutionModelIntersectionKHR = 5314,
ExecutionModelIntersectionNV = 5314,
+ ExecutionModelAnyHitKHR = 5315,
ExecutionModelAnyHitNV = 5315,
+ ExecutionModelClosestHitKHR = 5316,
ExecutionModelClosestHitNV = 5316,
+ ExecutionModelMissKHR = 5317,
ExecutionModelMissNV = 5317,
+ ExecutionModelCallableKHR = 5318,
ExecutionModelCallableNV = 5318,
ExecutionModelMax = 0x7fffffff,
};
@@ -179,11 +185,17 @@ enum StorageClass {
StorageClassAtomicCounter = 10,
StorageClassImage = 11,
StorageClassStorageBuffer = 12,
+ StorageClassCallableDataKHR = 5328,
StorageClassCallableDataNV = 5328,
+ StorageClassIncomingCallableDataKHR = 5329,
StorageClassIncomingCallableDataNV = 5329,
+ StorageClassRayPayloadKHR = 5338,
StorageClassRayPayloadNV = 5338,
+ StorageClassHitAttributeKHR = 5339,
StorageClassHitAttributeNV = 5339,
+ StorageClassIncomingRayPayloadKHR = 5342,
StorageClassIncomingRayPayloadNV = 5342,
+ StorageClassShaderRecordBufferKHR = 5343,
StorageClassShaderRecordBufferNV = 5343,
StorageClassPhysicalStorageBuffer = 5349,
StorageClassPhysicalStorageBufferEXT = 5349,
@@ -558,20 +570,35 @@ enum BuiltIn {
BuiltInFragmentSizeNV = 5292,
BuiltInFragInvocationCountEXT = 5293,
BuiltInInvocationsPerPixelNV = 5293,
+ BuiltInLaunchIdKHR = 5319,
BuiltInLaunchIdNV = 5319,
+ BuiltInLaunchSizeKHR = 5320,
BuiltInLaunchSizeNV = 5320,
+ BuiltInWorldRayOriginKHR = 5321,
BuiltInWorldRayOriginNV = 5321,
+ BuiltInWorldRayDirectionKHR = 5322,
BuiltInWorldRayDirectionNV = 5322,
+ BuiltInObjectRayOriginKHR = 5323,
BuiltInObjectRayOriginNV = 5323,
+ BuiltInObjectRayDirectionKHR = 5324,
BuiltInObjectRayDirectionNV = 5324,
+ BuiltInRayTminKHR = 5325,
BuiltInRayTminNV = 5325,
+ BuiltInRayTmaxKHR = 5326,
BuiltInRayTmaxNV = 5326,
+ BuiltInInstanceCustomIndexKHR = 5327,
BuiltInInstanceCustomIndexNV = 5327,
+ BuiltInObjectToWorldKHR = 5330,
BuiltInObjectToWorldNV = 5330,
+ BuiltInWorldToObjectKHR = 5331,
BuiltInWorldToObjectNV = 5331,
+ BuiltInHitTKHR = 5332,
BuiltInHitTNV = 5332,
+ BuiltInHitKindKHR = 5333,
BuiltInHitKindNV = 5333,
+ BuiltInIncomingRayFlagsKHR = 5351,
BuiltInIncomingRayFlagsNV = 5351,
+ BuiltInRayGeometryIndexKHR = 5352,
BuiltInWarpsPerSMNV = 5374,
BuiltInSMCountNV = 5375,
BuiltInWarpIDNV = 5376,
@@ -709,6 +736,7 @@ enum Scope {
ScopeInvocation = 4,
ScopeQueueFamily = 5,
ScopeQueueFamilyKHR = 5,
+ ScopeShaderCallKHR = 6,
ScopeMax = 0x7fffffff,
};
@@ -833,6 +861,8 @@ enum Capability {
CapabilitySignedZeroInfNanPreserve = 4466,
CapabilityRoundingModeRTE = 4467,
CapabilityRoundingModeRTZ = 4468,
+ CapabilityRayQueryProvisionalKHR = 4471,
+ CapabilityRayTraversalPrimitiveCullingProvisionalKHR = 4478,
CapabilityFloat16ImageAMD = 5008,
CapabilityImageGatherBiasLodAMD = 5009,
CapabilityFragmentMaskAMD = 5010,
@@ -886,6 +916,7 @@ enum Capability {
CapabilityPhysicalStorageBufferAddresses = 5347,
CapabilityPhysicalStorageBufferAddressesEXT = 5347,
CapabilityComputeDerivativeGroupLinearNV = 5350,
+ CapabilityRayTracingProvisionalKHR = 5353,
CapabilityCooperativeMatrixNV = 5357,
CapabilityFragmentShaderSampleInterlockEXT = 5363,
CapabilityFragmentShaderShadingRateInterlockEXT = 5372,
@@ -903,6 +934,53 @@ enum Capability {
CapabilityMax = 0x7fffffff,
};
+enum RayFlagsShift {
+ RayFlagsOpaqueKHRShift = 0,
+ RayFlagsNoOpaqueKHRShift = 1,
+ RayFlagsTerminateOnFirstHitKHRShift = 2,
+ RayFlagsSkipClosestHitShaderKHRShift = 3,
+ RayFlagsCullBackFacingTrianglesKHRShift = 4,
+ RayFlagsCullFrontFacingTrianglesKHRShift = 5,
+ RayFlagsCullOpaqueKHRShift = 6,
+ RayFlagsCullNoOpaqueKHRShift = 7,
+ RayFlagsSkipTrianglesKHRShift = 8,
+ RayFlagsSkipAABBsKHRShift = 9,
+ RayFlagsMax = 0x7fffffff,
+};
+
+enum RayFlagsMask {
+ RayFlagsMaskNone = 0,
+ RayFlagsOpaqueKHRMask = 0x00000001,
+ RayFlagsNoOpaqueKHRMask = 0x00000002,
+ RayFlagsTerminateOnFirstHitKHRMask = 0x00000004,
+ RayFlagsSkipClosestHitShaderKHRMask = 0x00000008,
+ RayFlagsCullBackFacingTrianglesKHRMask = 0x00000010,
+ RayFlagsCullFrontFacingTrianglesKHRMask = 0x00000020,
+ RayFlagsCullOpaqueKHRMask = 0x00000040,
+ RayFlagsCullNoOpaqueKHRMask = 0x00000080,
+ RayFlagsSkipTrianglesKHRMask = 0x00000100,
+ RayFlagsSkipAABBsKHRMask = 0x00000200,
+};
+
+enum RayQueryIntersection {
+ RayQueryIntersectionRayQueryCandidateIntersectionKHR = 0,
+ RayQueryIntersectionRayQueryCommittedIntersectionKHR = 1,
+ RayQueryIntersectionMax = 0x7fffffff,
+};
+
+enum RayQueryCommittedIntersectionType {
+ RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionNoneKHR = 0,
+ RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionTriangleKHR = 1,
+ RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionGeneratedKHR = 2,
+ RayQueryCommittedIntersectionTypeMax = 0x7fffffff,
+};
+
+enum RayQueryCandidateIntersectionType {
+ RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionTriangleKHR = 0,
+ RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionAABBKHR = 1,
+ RayQueryCandidateIntersectionTypeMax = 0x7fffffff,
+};
+
enum Op {
OpNop = 0,
OpUndef = 1,
@@ -1254,6 +1332,13 @@ enum Op {
OpSubgroupAnyKHR = 4429,
OpSubgroupAllEqualKHR = 4430,
OpSubgroupReadInvocationKHR = 4432,
+ OpTypeRayQueryProvisionalKHR = 4472,
+ OpRayQueryInitializeKHR = 4473,
+ OpRayQueryTerminateKHR = 4474,
+ OpRayQueryGenerateIntersectionKHR = 4475,
+ OpRayQueryConfirmIntersectionKHR = 4476,
+ OpRayQueryProceedKHR = 4477,
+ OpRayQueryGetIntersectionTypeKHR = 4479,
OpGroupIAddNonUniformAMD = 5000,
OpGroupFAddNonUniformAMD = 5001,
OpGroupFMinNonUniformAMD = 5002,
@@ -1268,11 +1353,17 @@ enum Op {
OpImageSampleFootprintNV = 5283,
OpGroupNonUniformPartitionNV = 5296,
OpWritePackedPrimitiveIndices4x8NV = 5299,
+ OpReportIntersectionKHR = 5334,
OpReportIntersectionNV = 5334,
+ OpIgnoreIntersectionKHR = 5335,
OpIgnoreIntersectionNV = 5335,
+ OpTerminateRayKHR = 5336,
OpTerminateRayNV = 5336,
OpTraceNV = 5337,
+ OpTraceRayKHR = 5337,
+ OpTypeAccelerationStructureKHR = 5341,
OpTypeAccelerationStructureNV = 5341,
+ OpExecuteCallableKHR = 5344,
OpExecuteCallableNV = 5344,
OpTypeCooperativeMatrixNV = 5358,
OpCooperativeMatrixLoadNV = 5359,
@@ -1429,6 +1520,23 @@ enum Op {
OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814,
OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815,
OpSubgroupAvcSicGetInterRawSadsINTEL = 5816,
+ OpRayQueryGetRayTMinKHR = 6016,
+ OpRayQueryGetRayFlagsKHR = 6017,
+ OpRayQueryGetIntersectionTKHR = 6018,
+ OpRayQueryGetIntersectionInstanceCustomIndexKHR = 6019,
+ OpRayQueryGetIntersectionInstanceIdKHR = 6020,
+ OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR = 6021,
+ OpRayQueryGetIntersectionGeometryIndexKHR = 6022,
+ OpRayQueryGetIntersectionPrimitiveIndexKHR = 6023,
+ OpRayQueryGetIntersectionBarycentricsKHR = 6024,
+ OpRayQueryGetIntersectionFrontFaceKHR = 6025,
+ OpRayQueryGetIntersectionCandidateAABBOpaqueKHR = 6026,
+ OpRayQueryGetIntersectionObjectRayDirectionKHR = 6027,
+ OpRayQueryGetIntersectionObjectRayOriginKHR = 6028,
+ OpRayQueryGetWorldRayDirectionKHR = 6029,
+ OpRayQueryGetWorldRayOriginKHR = 6030,
+ OpRayQueryGetIntersectionObjectToWorldKHR = 6031,
+ OpRayQueryGetIntersectionWorldToObjectKHR = 6032,
OpMax = 0x7fffffff,
};
@@ -1806,6 +1914,30 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpTerminateRayNV: *hasResult = false; *hasResultType = false; break;
case OpTraceNV: *hasResult = false; *hasResultType = false; break;
case OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break;
+ case OpTypeRayQueryProvisionalKHR: *hasResult = true; *hasResultType = false; break;
+ case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break;
+ case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break;
+ case OpRayQueryGenerateIntersectionKHR: *hasResult = false; *hasResultType = false; break;
+ case OpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break;
+ case OpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetRayTMinKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetRayFlagsKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionTKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionInstanceCustomIndexKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionInstanceIdKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionGeometryIndexKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionPrimitiveIndexKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionBarycentricsKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionFrontFaceKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionObjectRayDirectionKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionObjectRayOriginKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetWorldRayDirectionKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetWorldRayOriginKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionObjectToWorldKHR: *hasResult = true; *hasResultType = true; break;
+ case OpRayQueryGetIntersectionWorldToObjectKHR: *hasResult = true; *hasResultType = true; break;
case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
case OpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break;
@@ -1974,6 +2106,7 @@ inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask
inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); }
inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); }
inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); }
+inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); }
} // end namespace spv
diff --git a/include/spirv/unified1/spirv.hpp11 b/include/spirv/unified1/spirv.hpp11
index 00c7b18..406ba19 100644
--- a/include/spirv/unified1/spirv.hpp11
+++ b/include/spirv/unified1/spirv.hpp11
@@ -1,4 +1,4 @@
-// Copyright (c) 2014-2019 The Khronos Group Inc.
+// Copyright (c) 2014-2020 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"),
@@ -53,7 +53,7 @@ typedef unsigned int Id;
#define SPV_REVISION 1
static const unsigned int MagicNumber = 0x07230203;
-static const unsigned int Version = 0x00010400;
+static const unsigned int Version = 0x00010500;
static const unsigned int Revision = 1;
static const unsigned int OpCodeMask = 0xffff;
static const unsigned int WordCountShift = 16;
@@ -78,11 +78,17 @@ enum class ExecutionModel : unsigned {
Kernel = 6,
TaskNV = 5267,
MeshNV = 5268,
+ RayGenerationKHR = 5313,
RayGenerationNV = 5313,
+ IntersectionKHR = 5314,
IntersectionNV = 5314,
+ AnyHitKHR = 5315,
AnyHitNV = 5315,
+ ClosestHitKHR = 5316,
ClosestHitNV = 5316,
+ MissKHR = 5317,
MissNV = 5317,
+ CallableKHR = 5318,
CallableNV = 5318,
Max = 0x7fffffff,
};
@@ -179,11 +185,17 @@ enum class StorageClass : unsigned {
AtomicCounter = 10,
Image = 11,
StorageBuffer = 12,
+ CallableDataKHR = 5328,
CallableDataNV = 5328,
+ IncomingCallableDataKHR = 5329,
IncomingCallableDataNV = 5329,
+ RayPayloadKHR = 5338,
RayPayloadNV = 5338,
+ HitAttributeKHR = 5339,
HitAttributeNV = 5339,
+ IncomingRayPayloadKHR = 5342,
IncomingRayPayloadNV = 5342,
+ ShaderRecordBufferKHR = 5343,
ShaderRecordBufferNV = 5343,
PhysicalStorageBuffer = 5349,
PhysicalStorageBufferEXT = 5349,
@@ -558,20 +570,35 @@ enum class BuiltIn : unsigned {
FragmentSizeNV = 5292,
FragInvocationCountEXT = 5293,
InvocationsPerPixelNV = 5293,
+ LaunchIdKHR = 5319,
LaunchIdNV = 5319,
+ LaunchSizeKHR = 5320,
LaunchSizeNV = 5320,
+ WorldRayOriginKHR = 5321,
WorldRayOriginNV = 5321,
+ WorldRayDirectionKHR = 5322,
WorldRayDirectionNV = 5322,
+ ObjectRayOriginKHR = 5323,
ObjectRayOriginNV = 5323,
+ ObjectRayDirectionKHR = 5324,
ObjectRayDirectionNV = 5324,
+ RayTminKHR = 5325,
RayTminNV = 5325,
+ RayTmaxKHR = 5326,
RayTmaxNV = 5326,
+ InstanceCustomIndexKHR = 5327,
InstanceCustomIndexNV = 5327,
+ ObjectToWorldKHR = 5330,
ObjectToWorldNV = 5330,
+ WorldToObjectKHR = 5331,
WorldToObjectNV = 5331,
+ HitTKHR = 5332,
HitTNV = 5332,
+ HitKindKHR = 5333,
HitKindNV = 5333,
+ IncomingRayFlagsKHR = 5351,
IncomingRayFlagsNV = 5351,
+ RayGeometryIndexKHR = 5352,
WarpsPerSMNV = 5374,
SMCountNV = 5375,
WarpIDNV = 5376,
@@ -709,6 +736,7 @@ enum class Scope : unsigned {
Invocation = 4,
QueueFamily = 5,
QueueFamilyKHR = 5,
+ ShaderCallKHR = 6,
Max = 0x7fffffff,
};
@@ -833,6 +861,8 @@ enum class Capability : unsigned {
SignedZeroInfNanPreserve = 4466,
RoundingModeRTE = 4467,
RoundingModeRTZ = 4468,
+ RayQueryProvisionalKHR = 4471,
+ RayTraversalPrimitiveCullingProvisionalKHR = 4478,
Float16ImageAMD = 5008,
ImageGatherBiasLodAMD = 5009,
FragmentMaskAMD = 5010,
@@ -886,6 +916,7 @@ enum class Capability : unsigned {
PhysicalStorageBufferAddresses = 5347,
PhysicalStorageBufferAddressesEXT = 5347,
ComputeDerivativeGroupLinearNV = 5350,
+ RayTracingProvisionalKHR = 5353,
CooperativeMatrixNV = 5357,
FragmentShaderSampleInterlockEXT = 5363,
FragmentShaderShadingRateInterlockEXT = 5372,
@@ -903,6 +934,53 @@ enum class Capability : unsigned {
Max = 0x7fffffff,
};
+enum class RayFlagsShift : unsigned {
+ OpaqueKHR = 0,
+ NoOpaqueKHR = 1,
+ TerminateOnFirstHitKHR = 2,
+ SkipClosestHitShaderKHR = 3,
+ CullBackFacingTrianglesKHR = 4,
+ CullFrontFacingTrianglesKHR = 5,
+ CullOpaqueKHR = 6,
+ CullNoOpaqueKHR = 7,
+ SkipTrianglesKHR = 8,
+ SkipAABBsKHR = 9,
+ Max = 0x7fffffff,
+};
+
+enum class RayFlagsMask : unsigned {
+ MaskNone = 0,
+ OpaqueKHR = 0x00000001,
+ NoOpaqueKHR = 0x00000002,
+ TerminateOnFirstHitKHR = 0x00000004,
+ SkipClosestHitShaderKHR = 0x00000008,
+ CullBackFacingTrianglesKHR = 0x00000010,
+ CullFrontFacingTrianglesKHR = 0x00000020,
+ CullOpaqueKHR = 0x00000040,
+ CullNoOpaqueKHR = 0x00000080,
+ SkipTrianglesKHR = 0x00000100,
+ SkipAABBsKHR = 0x00000200,
+};
+
+enum class RayQueryIntersection : unsigned {
+ RayQueryCandidateIntersectionKHR = 0,
+ RayQueryCommittedIntersectionKHR = 1,
+ Max = 0x7fffffff,
+};
+
+enum class RayQueryCommittedIntersectionType : unsigned {
+ RayQueryCommittedIntersectionNoneKHR = 0,
+ RayQueryCommittedIntersectionTriangleKHR = 1,
+ RayQueryCommittedIntersectionGeneratedKHR = 2,
+ Max = 0x7fffffff,
+};
+
+enum class RayQueryCandidateIntersectionType : unsigned {
+ RayQueryCandidateIntersectionTriangleKHR = 0,
+ RayQueryCandidateIntersectionAABBKHR = 1,
+ Max = 0x7fffffff,
+};
+
enum class Op : unsigned {
OpNop = 0,
OpUndef = 1,
@@ -1254,6 +1332,13 @@ enum class Op : unsigned {
OpSubgroupAnyKHR = 4429,
OpSubgroupAllEqualKHR = 4430,
OpSubgroupReadInvocationKHR = 4432,
+ OpTypeRayQueryProvisionalKHR = 4472,
+ OpRayQueryInitializeKHR = 4473,
+ OpRayQueryTerminateKHR = 4474,
+ OpRayQueryGenerateIntersectionKHR = 4475,
+ OpRayQueryConfirmIntersectionKHR = 4476,
+ OpRayQueryProceedKHR = 4477,
+ OpRayQueryGetIntersectionTypeKHR = 4479,
OpGroupIAddNonUniformAMD = 5000,
OpGroupFAddNonUniformAMD = 5001,
OpGroupFMinNonUniformAMD = 5002,
@@ -1268,11 +1353,17 @@ enum class Op : unsigned {
OpImageSampleFootprintNV = 5283,
OpGroupNonUniformPartitionNV = 5296,
OpWritePackedPrimitiveIndices4x8NV = 5299,
+ OpReportIntersectionKHR = 5334,
OpReportIntersectionNV = 5334,
+ OpIgnoreIntersectionKHR = 5335,
OpIgnoreIntersectionNV = 5335,
+ OpTerminateRayKHR = 5336,
OpTerminateRayNV = 5336,
OpTraceNV = 5337,
+ OpTraceRayKHR = 5337,
+ OpTypeAccelerationStructureKHR = 5341,
OpTypeAccelerationStructureNV = 5341,
+ OpExecuteCallableKHR = 5344,
OpExecuteCallableNV = 5344,
OpTypeCooperativeMatrixNV = 5358,
OpCooperativeMatrixLoadNV = 5359,
@@ -1429,6 +1520,23 @@ enum class Op : unsigned {
OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814,
OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815,
OpSubgroupAvcSicGetInterRawSadsINTEL = 5816,
+ OpRayQueryGetRayTMinKHR = 6016,
+ OpRayQueryGetRayFlagsKHR = 6017,
+ OpRayQueryGetIntersectionTKHR = 6018,
+ OpRayQueryGetIntersectionInstanceCustomIndexKHR = 6019,
+ OpRayQueryGetIntersectionInstanceIdKHR = 6020,
+ OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR = 6021,
+ OpRayQueryGetIntersectionGeometryIndexKHR = 6022,
+ OpRayQueryGetIntersectionPrimitiveIndexKHR = 6023,
+ OpRayQueryGetIntersectionBarycentricsKHR = 6024,
+ OpRayQueryGetIntersectionFrontFaceKHR = 6025,
+ OpRayQueryGetIntersectionCandidateAABBOpaqueKHR = 6026,
+ OpRayQueryGetIntersectionObjectRayDirectionKHR = 6027,
+ OpRayQueryGetIntersectionObjectRayOriginKHR = 6028,
+ OpRayQueryGetWorldRayDirectionKHR = 6029,
+ OpRayQueryGetWorldRayOriginKHR = 6030,
+ OpRayQueryGetIntersectionObjectToWorldKHR = 6031,
+ OpRayQueryGetIntersectionWorldToObjectKHR = 6032,
Max = 0x7fffffff,
};
@@ -1806,6 +1914,30 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case Op::OpTerminateRayNV: *hasResult = false; *hasResultType = false; break;
case Op::OpTraceNV: *hasResult = false; *hasResultType = false; break;
case Op::OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break;
+ case Op::OpTypeRayQueryProvisionalKHR: *hasResult = true; *hasResultType = false; break;
+ case Op::OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break;
+ case Op::OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break;
+ case Op::OpRayQueryGenerateIntersectionKHR: *hasResult = false; *hasResultType = false; break;
+ case Op::OpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break;
+ case Op::OpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break;
+ case Op::OpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break;
+ case Op::OpRayQueryGetRayTMinKHR: *hasResult = true; *hasResultType = true; break;
+ case Op::OpRayQueryGetRayFlagsKHR: *hasResult = true; *hasResultType = true; break;
+ case Op::OpRayQueryGetIntersectionTKHR: *hasResult = true; *hasResultType = true; break;
+ case Op::OpRayQueryGetIntersectionInstanceCustomIndexKHR: *hasResult = true; *hasResultType = true; break;
+ case Op::OpRayQueryGetIntersectionInstanceIdKHR: *hasResult = true; *hasResultType = true; break;
+ case Op::OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: *hasResult = true; *hasResultType = true; break;
+ case Op::OpRayQueryGetIntersectionGeometryIndexKHR: *hasResult = true; *hasResultType = true; break;
+ case Op::OpRayQueryGetIntersectionPrimitiveIndexKHR: *hasResult = true; *hasResultType = true; break;
+ case Op::OpRayQueryGetIntersectionBarycentricsKHR: *hasResult = true; *hasResultType = true; break;
+ case Op::OpRayQueryGetIntersectionFrontFaceKHR: *hasResult = true; *hasResultType = true; break;
+ case Op::OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: *hasResult = true; *hasResultType = true; break;
+ case Op::OpRayQueryGetIntersectionObjectRayDirectionKHR: *hasResult = true; *hasResultType = true; break;
+ case Op::OpRayQueryGetIntersectionObjectRayOriginKHR: *hasResult = true; *hasResultType = true; break;
+ case Op::OpRayQueryGetWorldRayDirectionKHR: *hasResult = true; *hasResultType = true; break;
+ case Op::OpRayQueryGetWorldRayOriginKHR: *hasResult = true; *hasResultType = true; break;
+ case Op::OpRayQueryGetIntersectionObjectToWorldKHR: *hasResult = true; *hasResultType = true; break;
+ case Op::OpRayQueryGetIntersectionWorldToObjectKHR: *hasResult = true; *hasResultType = true; break;
case Op::OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
case Op::OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
case Op::OpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break;
@@ -1974,6 +2106,7 @@ inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask
inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); }
inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); }
inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); }
+inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); }
} // end namespace spv
diff --git a/include/spirv/unified1/spirv.json b/include/spirv/unified1/spirv.json
index b08a1a5..d372beb 100644
--- a/include/spirv/unified1/spirv.json
+++ b/include/spirv/unified1/spirv.json
@@ -6,7 +6,7 @@
"Comment":
[
[
- "Copyright (c) 2014-2019 The Khronos Group Inc.",
+ "Copyright (c) 2014-2020 The Khronos Group Inc.",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy",
"of this software and/or associated documentation files (the \"Materials\"),",
@@ -88,11 +88,17 @@
"Kernel": 6,
"TaskNV": 5267,
"MeshNV": 5268,
+ "RayGenerationKHR": 5313,
"RayGenerationNV": 5313,
+ "IntersectionKHR": 5314,
"IntersectionNV": 5314,
+ "AnyHitKHR": 5315,
"AnyHitNV": 5315,
+ "ClosestHitKHR": 5316,
"ClosestHitNV": 5316,
+ "MissKHR": 5317,
"MissNV": 5317,
+ "CallableKHR": 5318,
"CallableNV": 5318
}
},
@@ -201,11 +207,17 @@
"AtomicCounter": 10,
"Image": 11,
"StorageBuffer": 12,
+ "CallableDataKHR": 5328,
"CallableDataNV": 5328,
+ "IncomingCallableDataKHR": 5329,
"IncomingCallableDataNV": 5329,
+ "RayPayloadKHR": 5338,
"RayPayloadNV": 5338,
+ "HitAttributeKHR": 5339,
"HitAttributeNV": 5339,
+ "IncomingRayPayloadKHR": 5342,
"IncomingRayPayloadNV": 5342,
+ "ShaderRecordBufferKHR": 5343,
"ShaderRecordBufferNV": 5343,
"PhysicalStorageBuffer": 5349,
"PhysicalStorageBufferEXT": 5349
@@ -591,20 +603,35 @@
"FragmentSizeNV": 5292,
"FragInvocationCountEXT": 5293,
"InvocationsPerPixelNV": 5293,
+ "LaunchIdKHR": 5319,
"LaunchIdNV": 5319,
+ "LaunchSizeKHR": 5320,
"LaunchSizeNV": 5320,
+ "WorldRayOriginKHR": 5321,
"WorldRayOriginNV": 5321,
+ "WorldRayDirectionKHR": 5322,
"WorldRayDirectionNV": 5322,
+ "ObjectRayOriginKHR": 5323,
"ObjectRayOriginNV": 5323,
+ "ObjectRayDirectionKHR": 5324,
"ObjectRayDirectionNV": 5324,
+ "RayTminKHR": 5325,
"RayTminNV": 5325,
+ "RayTmaxKHR": 5326,
"RayTmaxNV": 5326,
+ "InstanceCustomIndexKHR": 5327,
"InstanceCustomIndexNV": 5327,
+ "ObjectToWorldKHR": 5330,
"ObjectToWorldNV": 5330,
+ "WorldToObjectKHR": 5331,
"WorldToObjectNV": 5331,
+ "HitTKHR": 5332,
"HitTNV": 5332,
+ "HitKindKHR": 5333,
"HitKindNV": 5333,
+ "IncomingRayFlagsKHR": 5351,
"IncomingRayFlagsNV": 5351,
+ "RayGeometryIndexKHR": 5352,
"WarpsPerSMNV": 5374,
"SMCountNV": 5375,
"WarpIDNV": 5376,
@@ -698,7 +725,8 @@
"Subgroup": 3,
"Invocation": 4,
"QueueFamily": 5,
- "QueueFamilyKHR": 5
+ "QueueFamilyKHR": 5,
+ "ShaderCallKHR": 6
}
},
{
@@ -830,6 +858,8 @@
"SignedZeroInfNanPreserve": 4466,
"RoundingModeRTE": 4467,
"RoundingModeRTZ": 4468,
+ "RayQueryProvisionalKHR": 4471,
+ "RayTraversalPrimitiveCullingProvisionalKHR": 4478,
"Float16ImageAMD": 5008,
"ImageGatherBiasLodAMD": 5009,
"FragmentMaskAMD": 5010,
@@ -883,6 +913,7 @@
"PhysicalStorageBufferAddresses": 5347,
"PhysicalStorageBufferAddressesEXT": 5347,
"ComputeDerivativeGroupLinearNV": 5350,
+ "RayTracingProvisionalKHR": 5353,
"CooperativeMatrixNV": 5357,
"FragmentShaderSampleInterlockEXT": 5363,
"FragmentShaderShadingRateInterlockEXT": 5372,
@@ -900,6 +931,51 @@
}
},
{
+ "Name": "RayFlags",
+ "Type": "Bit",
+ "Values":
+ {
+ "OpaqueKHR": 0,
+ "NoOpaqueKHR": 1,
+ "TerminateOnFirstHitKHR": 2,
+ "SkipClosestHitShaderKHR": 3,
+ "CullBackFacingTrianglesKHR": 4,
+ "CullFrontFacingTrianglesKHR": 5,
+ "CullOpaqueKHR": 6,
+ "CullNoOpaqueKHR": 7,
+ "SkipTrianglesKHR": 8,
+ "SkipAABBsKHR": 9
+ }
+ },
+ {
+ "Name": "RayQueryIntersection",
+ "Type": "Value",
+ "Values":
+ {
+ "RayQueryCandidateIntersectionKHR": 0,
+ "RayQueryCommittedIntersectionKHR": 1
+ }
+ },
+ {
+ "Name": "RayQueryCommittedIntersectionType",
+ "Type": "Value",
+ "Values":
+ {
+ "RayQueryCommittedIntersectionNoneKHR": 0,
+ "RayQueryCommittedIntersectionTriangleKHR": 1,
+ "RayQueryCommittedIntersectionGeneratedKHR": 2
+ }
+ },
+ {
+ "Name": "RayQueryCandidateIntersectionType",
+ "Type": "Value",
+ "Values":
+ {
+ "RayQueryCandidateIntersectionTriangleKHR": 0,
+ "RayQueryCandidateIntersectionAABBKHR": 1
+ }
+ },
+ {
"Name": "Op",
"Type": "Value",
"Values":
@@ -1254,6 +1330,13 @@
"OpSubgroupAnyKHR": 4429,
"OpSubgroupAllEqualKHR": 4430,
"OpSubgroupReadInvocationKHR": 4432,
+ "OpTypeRayQueryProvisionalKHR": 4472,
+ "OpRayQueryInitializeKHR": 4473,
+ "OpRayQueryTerminateKHR": 4474,
+ "OpRayQueryGenerateIntersectionKHR": 4475,
+ "OpRayQueryConfirmIntersectionKHR": 4476,
+ "OpRayQueryProceedKHR": 4477,
+ "OpRayQueryGetIntersectionTypeKHR": 4479,
"OpGroupIAddNonUniformAMD": 5000,
"OpGroupFAddNonUniformAMD": 5001,
"OpGroupFMinNonUniformAMD": 5002,
@@ -1268,11 +1351,17 @@
"OpImageSampleFootprintNV": 5283,
"OpGroupNonUniformPartitionNV": 5296,
"OpWritePackedPrimitiveIndices4x8NV": 5299,
+ "OpReportIntersectionKHR": 5334,
"OpReportIntersectionNV": 5334,
+ "OpIgnoreIntersectionKHR": 5335,
"OpIgnoreIntersectionNV": 5335,
+ "OpTerminateRayKHR": 5336,
"OpTerminateRayNV": 5336,
"OpTraceNV": 5337,
+ "OpTraceRayKHR": 5337,
+ "OpTypeAccelerationStructureKHR": 5341,
"OpTypeAccelerationStructureNV": 5341,
+ "OpExecuteCallableKHR": 5344,
"OpExecuteCallableNV": 5344,
"OpTypeCooperativeMatrixNV": 5358,
"OpCooperativeMatrixLoadNV": 5359,
@@ -1428,7 +1517,24 @@
"OpSubgroupAvcSicGetIpeChromaModeINTEL": 5813,
"OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL": 5814,
"OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL": 5815,
- "OpSubgroupAvcSicGetInterRawSadsINTEL": 5816
+ "OpSubgroupAvcSicGetInterRawSadsINTEL": 5816,
+ "OpRayQueryGetRayTMinKHR": 6016,
+ "OpRayQueryGetRayFlagsKHR": 6017,
+ "OpRayQueryGetIntersectionTKHR": 6018,
+ "OpRayQueryGetIntersectionInstanceCustomIndexKHR": 6019,
+ "OpRayQueryGetIntersectionInstanceIdKHR": 6020,
+ "OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR": 6021,
+ "OpRayQueryGetIntersectionGeometryIndexKHR": 6022,
+ "OpRayQueryGetIntersectionPrimitiveIndexKHR": 6023,
+ "OpRayQueryGetIntersectionBarycentricsKHR": 6024,
+ "OpRayQueryGetIntersectionFrontFaceKHR": 6025,
+ "OpRayQueryGetIntersectionCandidateAABBOpaqueKHR": 6026,
+ "OpRayQueryGetIntersectionObjectRayDirectionKHR": 6027,
+ "OpRayQueryGetIntersectionObjectRayOriginKHR": 6028,
+ "OpRayQueryGetWorldRayDirectionKHR": 6029,
+ "OpRayQueryGetWorldRayOriginKHR": 6030,
+ "OpRayQueryGetIntersectionObjectToWorldKHR": 6031,
+ "OpRayQueryGetIntersectionWorldToObjectKHR": 6032
}
}
]
diff --git a/include/spirv/unified1/spirv.lua b/include/spirv/unified1/spirv.lua
index 27385db..3774a95 100644
--- a/include/spirv/unified1/spirv.lua
+++ b/include/spirv/unified1/spirv.lua
@@ -1,4 +1,4 @@
--- Copyright (c) 2014-2019 The Khronos Group Inc.
+-- Copyright (c) 2014-2020 The Khronos Group Inc.
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and/or associated documentation files (the "Materials"),
@@ -68,11 +68,17 @@ spv = {
Kernel = 6,
TaskNV = 5267,
MeshNV = 5268,
+ RayGenerationKHR = 5313,
RayGenerationNV = 5313,
+ IntersectionKHR = 5314,
IntersectionNV = 5314,
+ AnyHitKHR = 5315,
AnyHitNV = 5315,
+ ClosestHitKHR = 5316,
ClosestHitNV = 5316,
+ MissKHR = 5317,
MissNV = 5317,
+ CallableKHR = 5318,
CallableNV = 5318,
},
@@ -165,11 +171,17 @@ spv = {
AtomicCounter = 10,
Image = 11,
StorageBuffer = 12,
+ CallableDataKHR = 5328,
CallableDataNV = 5328,
+ IncomingCallableDataKHR = 5329,
IncomingCallableDataNV = 5329,
+ RayPayloadKHR = 5338,
RayPayloadNV = 5338,
+ HitAttributeKHR = 5339,
HitAttributeNV = 5339,
+ IncomingRayPayloadKHR = 5342,
IncomingRayPayloadNV = 5342,
+ ShaderRecordBufferKHR = 5343,
ShaderRecordBufferNV = 5343,
PhysicalStorageBuffer = 5349,
PhysicalStorageBufferEXT = 5349,
@@ -530,20 +542,35 @@ spv = {
FragmentSizeNV = 5292,
FragInvocationCountEXT = 5293,
InvocationsPerPixelNV = 5293,
+ LaunchIdKHR = 5319,
LaunchIdNV = 5319,
+ LaunchSizeKHR = 5320,
LaunchSizeNV = 5320,
+ WorldRayOriginKHR = 5321,
WorldRayOriginNV = 5321,
+ WorldRayDirectionKHR = 5322,
WorldRayDirectionNV = 5322,
+ ObjectRayOriginKHR = 5323,
ObjectRayOriginNV = 5323,
+ ObjectRayDirectionKHR = 5324,
ObjectRayDirectionNV = 5324,
+ RayTminKHR = 5325,
RayTminNV = 5325,
+ RayTmaxKHR = 5326,
RayTmaxNV = 5326,
+ InstanceCustomIndexKHR = 5327,
InstanceCustomIndexNV = 5327,
+ ObjectToWorldKHR = 5330,
ObjectToWorldNV = 5330,
+ WorldToObjectKHR = 5331,
WorldToObjectNV = 5331,
+ HitTKHR = 5332,
HitTNV = 5332,
+ HitKindKHR = 5333,
HitKindNV = 5333,
+ IncomingRayFlagsKHR = 5351,
IncomingRayFlagsNV = 5351,
+ RayGeometryIndexKHR = 5352,
WarpsPerSMNV = 5374,
SMCountNV = 5375,
WarpIDNV = 5376,
@@ -675,6 +702,7 @@ spv = {
Invocation = 4,
QueueFamily = 5,
QueueFamilyKHR = 5,
+ ShaderCallKHR = 6,
},
GroupOperation = {
@@ -795,6 +823,8 @@ spv = {
SignedZeroInfNanPreserve = 4466,
RoundingModeRTE = 4467,
RoundingModeRTZ = 4468,
+ RayQueryProvisionalKHR = 4471,
+ RayTraversalPrimitiveCullingProvisionalKHR = 4478,
Float16ImageAMD = 5008,
ImageGatherBiasLodAMD = 5009,
FragmentMaskAMD = 5010,
@@ -848,6 +878,7 @@ spv = {
PhysicalStorageBufferAddresses = 5347,
PhysicalStorageBufferAddressesEXT = 5347,
ComputeDerivativeGroupLinearNV = 5350,
+ RayTracingProvisionalKHR = 5353,
CooperativeMatrixNV = 5357,
FragmentShaderSampleInterlockEXT = 5363,
FragmentShaderShadingRateInterlockEXT = 5372,
@@ -864,6 +895,49 @@ spv = {
SubgroupAvcMotionEstimationChromaINTEL = 5698,
},
+ RayFlagsShift = {
+ OpaqueKHR = 0,
+ NoOpaqueKHR = 1,
+ TerminateOnFirstHitKHR = 2,
+ SkipClosestHitShaderKHR = 3,
+ CullBackFacingTrianglesKHR = 4,
+ CullFrontFacingTrianglesKHR = 5,
+ CullOpaqueKHR = 6,
+ CullNoOpaqueKHR = 7,
+ SkipTrianglesKHR = 8,
+ SkipAABBsKHR = 9,
+ },
+
+ RayFlagsMask = {
+ MaskNone = 0,
+ OpaqueKHR = 0x00000001,
+ NoOpaqueKHR = 0x00000002,
+ TerminateOnFirstHitKHR = 0x00000004,
+ SkipClosestHitShaderKHR = 0x00000008,
+ CullBackFacingTrianglesKHR = 0x00000010,
+ CullFrontFacingTrianglesKHR = 0x00000020,
+ CullOpaqueKHR = 0x00000040,
+ CullNoOpaqueKHR = 0x00000080,
+ SkipTrianglesKHR = 0x00000100,
+ SkipAABBsKHR = 0x00000200,
+ },
+
+ RayQueryIntersection = {
+ RayQueryCandidateIntersectionKHR = 0,
+ RayQueryCommittedIntersectionKHR = 1,
+ },
+
+ RayQueryCommittedIntersectionType = {
+ RayQueryCommittedIntersectionNoneKHR = 0,
+ RayQueryCommittedIntersectionTriangleKHR = 1,
+ RayQueryCommittedIntersectionGeneratedKHR = 2,
+ },
+
+ RayQueryCandidateIntersectionType = {
+ RayQueryCandidateIntersectionTriangleKHR = 0,
+ RayQueryCandidateIntersectionAABBKHR = 1,
+ },
+
Op = {
OpNop = 0,
OpUndef = 1,
@@ -1215,6 +1289,13 @@ spv = {
OpSubgroupAnyKHR = 4429,
OpSubgroupAllEqualKHR = 4430,
OpSubgroupReadInvocationKHR = 4432,
+ OpTypeRayQueryProvisionalKHR = 4472,
+ OpRayQueryInitializeKHR = 4473,
+ OpRayQueryTerminateKHR = 4474,
+ OpRayQueryGenerateIntersectionKHR = 4475,
+ OpRayQueryConfirmIntersectionKHR = 4476,
+ OpRayQueryProceedKHR = 4477,
+ OpRayQueryGetIntersectionTypeKHR = 4479,
OpGroupIAddNonUniformAMD = 5000,
OpGroupFAddNonUniformAMD = 5001,
OpGroupFMinNonUniformAMD = 5002,
@@ -1229,11 +1310,17 @@ spv = {
OpImageSampleFootprintNV = 5283,
OpGroupNonUniformPartitionNV = 5296,
OpWritePackedPrimitiveIndices4x8NV = 5299,
+ OpReportIntersectionKHR = 5334,
OpReportIntersectionNV = 5334,
+ OpIgnoreIntersectionKHR = 5335,
OpIgnoreIntersectionNV = 5335,
+ OpTerminateRayKHR = 5336,
OpTerminateRayNV = 5336,
OpTraceNV = 5337,
+ OpTraceRayKHR = 5337,
+ OpTypeAccelerationStructureKHR = 5341,
OpTypeAccelerationStructureNV = 5341,
+ OpExecuteCallableKHR = 5344,
OpExecuteCallableNV = 5344,
OpTypeCooperativeMatrixNV = 5358,
OpCooperativeMatrixLoadNV = 5359,
@@ -1390,6 +1477,23 @@ spv = {
OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814,
OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815,
OpSubgroupAvcSicGetInterRawSadsINTEL = 5816,
+ OpRayQueryGetRayTMinKHR = 6016,
+ OpRayQueryGetRayFlagsKHR = 6017,
+ OpRayQueryGetIntersectionTKHR = 6018,
+ OpRayQueryGetIntersectionInstanceCustomIndexKHR = 6019,
+ OpRayQueryGetIntersectionInstanceIdKHR = 6020,
+ OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR = 6021,
+ OpRayQueryGetIntersectionGeometryIndexKHR = 6022,
+ OpRayQueryGetIntersectionPrimitiveIndexKHR = 6023,
+ OpRayQueryGetIntersectionBarycentricsKHR = 6024,
+ OpRayQueryGetIntersectionFrontFaceKHR = 6025,
+ OpRayQueryGetIntersectionCandidateAABBOpaqueKHR = 6026,
+ OpRayQueryGetIntersectionObjectRayDirectionKHR = 6027,
+ OpRayQueryGetIntersectionObjectRayOriginKHR = 6028,
+ OpRayQueryGetWorldRayDirectionKHR = 6029,
+ OpRayQueryGetWorldRayOriginKHR = 6030,
+ OpRayQueryGetIntersectionObjectToWorldKHR = 6031,
+ OpRayQueryGetIntersectionWorldToObjectKHR = 6032,
},
}
diff --git a/include/spirv/unified1/spirv.py b/include/spirv/unified1/spirv.py
index 6968e7b..a7344aa 100644
--- a/include/spirv/unified1/spirv.py
+++ b/include/spirv/unified1/spirv.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2014-2019 The Khronos Group Inc.
+# Copyright (c) 2014-2020 The Khronos Group Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and/or associated documentation files (the "Materials"),
@@ -68,11 +68,17 @@ spv = {
'Kernel' : 6,
'TaskNV' : 5267,
'MeshNV' : 5268,
+ 'RayGenerationKHR' : 5313,
'RayGenerationNV' : 5313,
+ 'IntersectionKHR' : 5314,
'IntersectionNV' : 5314,
+ 'AnyHitKHR' : 5315,
'AnyHitNV' : 5315,
+ 'ClosestHitKHR' : 5316,
'ClosestHitNV' : 5316,
+ 'MissKHR' : 5317,
'MissNV' : 5317,
+ 'CallableKHR' : 5318,
'CallableNV' : 5318,
},
@@ -165,11 +171,17 @@ spv = {
'AtomicCounter' : 10,
'Image' : 11,
'StorageBuffer' : 12,
+ 'CallableDataKHR' : 5328,
'CallableDataNV' : 5328,
+ 'IncomingCallableDataKHR' : 5329,
'IncomingCallableDataNV' : 5329,
+ 'RayPayloadKHR' : 5338,
'RayPayloadNV' : 5338,
+ 'HitAttributeKHR' : 5339,
'HitAttributeNV' : 5339,
+ 'IncomingRayPayloadKHR' : 5342,
'IncomingRayPayloadNV' : 5342,
+ 'ShaderRecordBufferKHR' : 5343,
'ShaderRecordBufferNV' : 5343,
'PhysicalStorageBuffer' : 5349,
'PhysicalStorageBufferEXT' : 5349,
@@ -530,20 +542,35 @@ spv = {
'FragmentSizeNV' : 5292,
'FragInvocationCountEXT' : 5293,
'InvocationsPerPixelNV' : 5293,
+ 'LaunchIdKHR' : 5319,
'LaunchIdNV' : 5319,
+ 'LaunchSizeKHR' : 5320,
'LaunchSizeNV' : 5320,
+ 'WorldRayOriginKHR' : 5321,
'WorldRayOriginNV' : 5321,
+ 'WorldRayDirectionKHR' : 5322,
'WorldRayDirectionNV' : 5322,
+ 'ObjectRayOriginKHR' : 5323,
'ObjectRayOriginNV' : 5323,
+ 'ObjectRayDirectionKHR' : 5324,
'ObjectRayDirectionNV' : 5324,
+ 'RayTminKHR' : 5325,
'RayTminNV' : 5325,
+ 'RayTmaxKHR' : 5326,
'RayTmaxNV' : 5326,
+ 'InstanceCustomIndexKHR' : 5327,
'InstanceCustomIndexNV' : 5327,
+ 'ObjectToWorldKHR' : 5330,
'ObjectToWorldNV' : 5330,
+ 'WorldToObjectKHR' : 5331,
'WorldToObjectNV' : 5331,
+ 'HitTKHR' : 5332,
'HitTNV' : 5332,
+ 'HitKindKHR' : 5333,
'HitKindNV' : 5333,
+ 'IncomingRayFlagsKHR' : 5351,
'IncomingRayFlagsNV' : 5351,
+ 'RayGeometryIndexKHR' : 5352,
'WarpsPerSMNV' : 5374,
'SMCountNV' : 5375,
'WarpIDNV' : 5376,
@@ -675,6 +702,7 @@ spv = {
'Invocation' : 4,
'QueueFamily' : 5,
'QueueFamilyKHR' : 5,
+ 'ShaderCallKHR' : 6,
},
'GroupOperation' : {
@@ -795,6 +823,8 @@ spv = {
'SignedZeroInfNanPreserve' : 4466,
'RoundingModeRTE' : 4467,
'RoundingModeRTZ' : 4468,
+ 'RayQueryProvisionalKHR' : 4471,
+ 'RayTraversalPrimitiveCullingProvisionalKHR' : 4478,
'Float16ImageAMD' : 5008,
'ImageGatherBiasLodAMD' : 5009,
'FragmentMaskAMD' : 5010,
@@ -848,6 +878,7 @@ spv = {
'PhysicalStorageBufferAddresses' : 5347,
'PhysicalStorageBufferAddressesEXT' : 5347,
'ComputeDerivativeGroupLinearNV' : 5350,
+ 'RayTracingProvisionalKHR' : 5353,
'CooperativeMatrixNV' : 5357,
'FragmentShaderSampleInterlockEXT' : 5363,
'FragmentShaderShadingRateInterlockEXT' : 5372,
@@ -864,6 +895,49 @@ spv = {
'SubgroupAvcMotionEstimationChromaINTEL' : 5698,
},
+ 'RayFlagsShift' : {
+ 'OpaqueKHR' : 0,
+ 'NoOpaqueKHR' : 1,
+ 'TerminateOnFirstHitKHR' : 2,
+ 'SkipClosestHitShaderKHR' : 3,
+ 'CullBackFacingTrianglesKHR' : 4,
+ 'CullFrontFacingTrianglesKHR' : 5,
+ 'CullOpaqueKHR' : 6,
+ 'CullNoOpaqueKHR' : 7,
+ 'SkipTrianglesKHR' : 8,
+ 'SkipAABBsKHR' : 9,
+ },
+
+ 'RayFlagsMask' : {
+ 'MaskNone' : 0,
+ 'OpaqueKHR' : 0x00000001,
+ 'NoOpaqueKHR' : 0x00000002,
+ 'TerminateOnFirstHitKHR' : 0x00000004,
+ 'SkipClosestHitShaderKHR' : 0x00000008,
+ 'CullBackFacingTrianglesKHR' : 0x00000010,
+ 'CullFrontFacingTrianglesKHR' : 0x00000020,
+ 'CullOpaqueKHR' : 0x00000040,
+ 'CullNoOpaqueKHR' : 0x00000080,
+ 'SkipTrianglesKHR' : 0x00000100,
+ 'SkipAABBsKHR' : 0x00000200,
+ },
+
+ 'RayQueryIntersection' : {
+ 'RayQueryCandidateIntersectionKHR' : 0,
+ 'RayQueryCommittedIntersectionKHR' : 1,
+ },
+
+ 'RayQueryCommittedIntersectionType' : {
+ 'RayQueryCommittedIntersectionNoneKHR' : 0,
+ 'RayQueryCommittedIntersectionTriangleKHR' : 1,
+ 'RayQueryCommittedIntersectionGeneratedKHR' : 2,
+ },
+
+ 'RayQueryCandidateIntersectionType' : {
+ 'RayQueryCandidateIntersectionTriangleKHR' : 0,
+ 'RayQueryCandidateIntersectionAABBKHR' : 1,
+ },
+
'Op' : {
'OpNop' : 0,
'OpUndef' : 1,
@@ -1215,6 +1289,13 @@ spv = {
'OpSubgroupAnyKHR' : 4429,
'OpSubgroupAllEqualKHR' : 4430,
'OpSubgroupReadInvocationKHR' : 4432,
+ 'OpTypeRayQueryProvisionalKHR' : 4472,
+ 'OpRayQueryInitializeKHR' : 4473,
+ 'OpRayQueryTerminateKHR' : 4474,
+ 'OpRayQueryGenerateIntersectionKHR' : 4475,
+ 'OpRayQueryConfirmIntersectionKHR' : 4476,
+ 'OpRayQueryProceedKHR' : 4477,
+ 'OpRayQueryGetIntersectionTypeKHR' : 4479,
'OpGroupIAddNonUniformAMD' : 5000,
'OpGroupFAddNonUniformAMD' : 5001,
'OpGroupFMinNonUniformAMD' : 5002,
@@ -1229,11 +1310,17 @@ spv = {
'OpImageSampleFootprintNV' : 5283,
'OpGroupNonUniformPartitionNV' : 5296,
'OpWritePackedPrimitiveIndices4x8NV' : 5299,
+ 'OpReportIntersectionKHR' : 5334,
'OpReportIntersectionNV' : 5334,
+ 'OpIgnoreIntersectionKHR' : 5335,
'OpIgnoreIntersectionNV' : 5335,
+ 'OpTerminateRayKHR' : 5336,
'OpTerminateRayNV' : 5336,
'OpTraceNV' : 5337,
+ 'OpTraceRayKHR' : 5337,
+ 'OpTypeAccelerationStructureKHR' : 5341,
'OpTypeAccelerationStructureNV' : 5341,
+ 'OpExecuteCallableKHR' : 5344,
'OpExecuteCallableNV' : 5344,
'OpTypeCooperativeMatrixNV' : 5358,
'OpCooperativeMatrixLoadNV' : 5359,
@@ -1390,6 +1477,23 @@ spv = {
'OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL' : 5814,
'OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL' : 5815,
'OpSubgroupAvcSicGetInterRawSadsINTEL' : 5816,
+ 'OpRayQueryGetRayTMinKHR' : 6016,
+ 'OpRayQueryGetRayFlagsKHR' : 6017,
+ 'OpRayQueryGetIntersectionTKHR' : 6018,
+ 'OpRayQueryGetIntersectionInstanceCustomIndexKHR' : 6019,
+ 'OpRayQueryGetIntersectionInstanceIdKHR' : 6020,
+ 'OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR' : 6021,
+ 'OpRayQueryGetIntersectionGeometryIndexKHR' : 6022,
+ 'OpRayQueryGetIntersectionPrimitiveIndexKHR' : 6023,
+ 'OpRayQueryGetIntersectionBarycentricsKHR' : 6024,
+ 'OpRayQueryGetIntersectionFrontFaceKHR' : 6025,
+ 'OpRayQueryGetIntersectionCandidateAABBOpaqueKHR' : 6026,
+ 'OpRayQueryGetIntersectionObjectRayDirectionKHR' : 6027,
+ 'OpRayQueryGetIntersectionObjectRayOriginKHR' : 6028,
+ 'OpRayQueryGetWorldRayDirectionKHR' : 6029,
+ 'OpRayQueryGetWorldRayOriginKHR' : 6030,
+ 'OpRayQueryGetIntersectionObjectToWorldKHR' : 6031,
+ 'OpRayQueryGetIntersectionWorldToObjectKHR' : 6032,
},
}
diff --git a/include/spirv/unified1/spv.d b/include/spirv/unified1/spv.d
index ec5a161..2c76658 100644
--- a/include/spirv/unified1/spv.d
+++ b/include/spirv/unified1/spv.d
@@ -1,5 +1,5 @@
/+
- + Copyright (c) 2014-2019 The Khronos Group Inc.
+ + Copyright (c) 2014-2020 The Khronos Group Inc.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and/or associated documentation files (the "Materials"),
@@ -77,11 +77,17 @@ enum ExecutionModel : uint
Kernel = 6,
TaskNV = 5267,
MeshNV = 5268,
+ RayGenerationKHR = 5313,
RayGenerationNV = 5313,
+ IntersectionKHR = 5314,
IntersectionNV = 5314,
+ AnyHitKHR = 5315,
AnyHitNV = 5315,
+ ClosestHitKHR = 5316,
ClosestHitNV = 5316,
+ MissKHR = 5317,
MissNV = 5317,
+ CallableKHR = 5318,
CallableNV = 5318,
}
@@ -178,11 +184,17 @@ enum StorageClass : uint
AtomicCounter = 10,
Image = 11,
StorageBuffer = 12,
+ CallableDataKHR = 5328,
CallableDataNV = 5328,
+ IncomingCallableDataKHR = 5329,
IncomingCallableDataNV = 5329,
+ RayPayloadKHR = 5338,
RayPayloadNV = 5338,
+ HitAttributeKHR = 5339,
HitAttributeNV = 5339,
+ IncomingRayPayloadKHR = 5342,
IncomingRayPayloadNV = 5342,
+ ShaderRecordBufferKHR = 5343,
ShaderRecordBufferNV = 5343,
PhysicalStorageBuffer = 5349,
PhysicalStorageBufferEXT = 5349,
@@ -559,20 +571,35 @@ enum BuiltIn : uint
FragmentSizeNV = 5292,
FragInvocationCountEXT = 5293,
InvocationsPerPixelNV = 5293,
+ LaunchIdKHR = 5319,
LaunchIdNV = 5319,
+ LaunchSizeKHR = 5320,
LaunchSizeNV = 5320,
+ WorldRayOriginKHR = 5321,
WorldRayOriginNV = 5321,
+ WorldRayDirectionKHR = 5322,
WorldRayDirectionNV = 5322,
+ ObjectRayOriginKHR = 5323,
ObjectRayOriginNV = 5323,
+ ObjectRayDirectionKHR = 5324,
ObjectRayDirectionNV = 5324,
+ RayTminKHR = 5325,
RayTminNV = 5325,
+ RayTmaxKHR = 5326,
RayTmaxNV = 5326,
+ InstanceCustomIndexKHR = 5327,
InstanceCustomIndexNV = 5327,
+ ObjectToWorldKHR = 5330,
ObjectToWorldNV = 5330,
+ WorldToObjectKHR = 5331,
WorldToObjectNV = 5331,
+ HitTKHR = 5332,
HitTNV = 5332,
+ HitKindKHR = 5333,
HitKindNV = 5333,
+ IncomingRayFlagsKHR = 5351,
IncomingRayFlagsNV = 5351,
+ RayGeometryIndexKHR = 5352,
WarpsPerSMNV = 5374,
SMCountNV = 5375,
WarpIDNV = 5376,
@@ -715,6 +742,7 @@ enum Scope : uint
Invocation = 4,
QueueFamily = 5,
QueueFamilyKHR = 5,
+ ShaderCallKHR = 6,
}
enum GroupOperation : uint
@@ -840,6 +868,8 @@ enum Capability : uint
SignedZeroInfNanPreserve = 4466,
RoundingModeRTE = 4467,
RoundingModeRTZ = 4468,
+ RayQueryProvisionalKHR = 4471,
+ RayTraversalPrimitiveCullingProvisionalKHR = 4478,
Float16ImageAMD = 5008,
ImageGatherBiasLodAMD = 5009,
FragmentMaskAMD = 5010,
@@ -893,6 +923,7 @@ enum Capability : uint
PhysicalStorageBufferAddresses = 5347,
PhysicalStorageBufferAddressesEXT = 5347,
ComputeDerivativeGroupLinearNV = 5350,
+ RayTracingProvisionalKHR = 5353,
CooperativeMatrixNV = 5357,
FragmentShaderSampleInterlockEXT = 5363,
FragmentShaderShadingRateInterlockEXT = 5372,
@@ -909,6 +940,54 @@ enum Capability : uint
SubgroupAvcMotionEstimationChromaINTEL = 5698,
}
+enum RayFlagsShift : uint
+{
+ OpaqueKHR = 0,
+ NoOpaqueKHR = 1,
+ TerminateOnFirstHitKHR = 2,
+ SkipClosestHitShaderKHR = 3,
+ CullBackFacingTrianglesKHR = 4,
+ CullFrontFacingTrianglesKHR = 5,
+ CullOpaqueKHR = 6,
+ CullNoOpaqueKHR = 7,
+ SkipTrianglesKHR = 8,
+ SkipAABBsKHR = 9,
+}
+
+enum RayFlagsMask : uint
+{
+ MaskNone = 0,
+ OpaqueKHR = 0x00000001,
+ NoOpaqueKHR = 0x00000002,
+ TerminateOnFirstHitKHR = 0x00000004,
+ SkipClosestHitShaderKHR = 0x00000008,
+ CullBackFacingTrianglesKHR = 0x00000010,
+ CullFrontFacingTrianglesKHR = 0x00000020,
+ CullOpaqueKHR = 0x00000040,
+ CullNoOpaqueKHR = 0x00000080,
+ SkipTrianglesKHR = 0x00000100,
+ SkipAABBsKHR = 0x00000200,
+}
+
+enum RayQueryIntersection : uint
+{
+ RayQueryCandidateIntersectionKHR = 0,
+ RayQueryCommittedIntersectionKHR = 1,
+}
+
+enum RayQueryCommittedIntersectionType : uint
+{
+ RayQueryCommittedIntersectionNoneKHR = 0,
+ RayQueryCommittedIntersectionTriangleKHR = 1,
+ RayQueryCommittedIntersectionGeneratedKHR = 2,
+}
+
+enum RayQueryCandidateIntersectionType : uint
+{
+ RayQueryCandidateIntersectionTriangleKHR = 0,
+ RayQueryCandidateIntersectionAABBKHR = 1,
+}
+
enum Op : uint
{
OpNop = 0,
@@ -1261,6 +1340,13 @@ enum Op : uint
OpSubgroupAnyKHR = 4429,
OpSubgroupAllEqualKHR = 4430,
OpSubgroupReadInvocationKHR = 4432,
+ OpTypeRayQueryProvisionalKHR = 4472,
+ OpRayQueryInitializeKHR = 4473,
+ OpRayQueryTerminateKHR = 4474,
+ OpRayQueryGenerateIntersectionKHR = 4475,
+ OpRayQueryConfirmIntersectionKHR = 4476,
+ OpRayQueryProceedKHR = 4477,
+ OpRayQueryGetIntersectionTypeKHR = 4479,
OpGroupIAddNonUniformAMD = 5000,
OpGroupFAddNonUniformAMD = 5001,
OpGroupFMinNonUniformAMD = 5002,
@@ -1275,11 +1361,17 @@ enum Op : uint
OpImageSampleFootprintNV = 5283,
OpGroupNonUniformPartitionNV = 5296,
OpWritePackedPrimitiveIndices4x8NV = 5299,
+ OpReportIntersectionKHR = 5334,
OpReportIntersectionNV = 5334,
+ OpIgnoreIntersectionKHR = 5335,
OpIgnoreIntersectionNV = 5335,
+ OpTerminateRayKHR = 5336,
OpTerminateRayNV = 5336,
OpTraceNV = 5337,
+ OpTraceRayKHR = 5337,
+ OpTypeAccelerationStructureKHR = 5341,
OpTypeAccelerationStructureNV = 5341,
+ OpExecuteCallableKHR = 5344,
OpExecuteCallableNV = 5344,
OpTypeCooperativeMatrixNV = 5358,
OpCooperativeMatrixLoadNV = 5359,
@@ -1436,6 +1528,23 @@ enum Op : uint
OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814,
OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815,
OpSubgroupAvcSicGetInterRawSadsINTEL = 5816,
+ OpRayQueryGetRayTMinKHR = 6016,
+ OpRayQueryGetRayFlagsKHR = 6017,
+ OpRayQueryGetIntersectionTKHR = 6018,
+ OpRayQueryGetIntersectionInstanceCustomIndexKHR = 6019,
+ OpRayQueryGetIntersectionInstanceIdKHR = 6020,
+ OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR = 6021,
+ OpRayQueryGetIntersectionGeometryIndexKHR = 6022,
+ OpRayQueryGetIntersectionPrimitiveIndexKHR = 6023,
+ OpRayQueryGetIntersectionBarycentricsKHR = 6024,
+ OpRayQueryGetIntersectionFrontFaceKHR = 6025,
+ OpRayQueryGetIntersectionCandidateAABBOpaqueKHR = 6026,
+ OpRayQueryGetIntersectionObjectRayDirectionKHR = 6027,
+ OpRayQueryGetIntersectionObjectRayOriginKHR = 6028,
+ OpRayQueryGetWorldRayDirectionKHR = 6029,
+ OpRayQueryGetWorldRayOriginKHR = 6030,
+ OpRayQueryGetIntersectionObjectToWorldKHR = 6031,
+ OpRayQueryGetIntersectionWorldToObjectKHR = 6032,
}
diff --git a/tools/buildHeaders/bin/generate_language_headers.py b/tools/buildHeaders/bin/generate_language_headers.py
new file mode 100755
index 0000000..c56780c
--- /dev/null
+++ b/tools/buildHeaders/bin/generate_language_headers.py
@@ -0,0 +1,242 @@
+#!/usr/bin/env python3
+# Copyright (c) 2017-2020 Google LLC
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and/or associated documentation files (the
+# "Materials"), to deal in the Materials without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Materials, and to
+# permit persons to whom the Materials are furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Materials.
+#
+# MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
+# KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
+# SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
+# https://www.khronos.org/registry/
+#
+# THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+
+"""Generates a C language headers from a SPIR-V JSON grammar file"""
+
+import errno
+import json
+import os.path
+import re
+
+DEFAULT_COPYRIGHT="""Copyright (c) 2020 The Khronos Group Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and/or associated documentation files (the
+"Materials"), to deal in the Materials without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Materials, and to
+permit persons to whom the Materials are furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Materials.
+
+MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
+KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
+SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
+ https://www.khronos.org/registry/
+
+THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+""".split('\n')
+
+def make_path_to_file(f):
+ """Makes all ancestor directories to the given file, if they
+ don't yet exist.
+
+ Arguments:
+ f: The file whose ancestor directories are to be created.
+ """
+ dir = os.path.dirname(os.path.abspath(f))
+ try:
+ os.makedirs(dir)
+ except OSError as e:
+ if e.errno == errno.EEXIST and os.path.isdir(dir):
+ pass
+ else:
+ raise
+
+class ExtInstGrammar:
+ """The grammar for an extended instruction set"""
+
+ def __init__(self, name, copyright, instructions, operand_kinds, version = None, revision = None):
+ self.name = name
+ self.copyright = copyright
+ self.instructions = instructions
+ self.operand_kinds = operand_kinds
+ self.version = version
+ self.revision = revision
+
+
+class LangGenerator:
+ """A language-specific generator"""
+
+ def __init__(self):
+ self.upper_case_initial = re.compile('^[A-Z]')
+ pass
+
+ def comment_prefix(self):
+ return ""
+
+ def namespace_prefix(self):
+ return ""
+
+ def uses_guards(self):
+ return False
+
+ def cpp_guard_preamble(self):
+ return ""
+
+ def cpp_guard_postamble(self):
+ return ""
+
+ def enum_value(self, prefix, name, value):
+ if self.upper_case_initial.match(name):
+ use_name = name
+ else:
+ use_name = '_' + name
+
+ return " {}{} = {},".format(prefix, use_name, value)
+
+ def generate(self, grammar):
+ """Returns a string that is the language-specific header for the given grammar"""
+
+ parts = []
+ if grammar.copyright:
+ parts.extend(["{}{}".format(self.comment_prefix(), f) for f in grammar.copyright])
+ parts.append('')
+
+ guard = 'SPIRV_UNIFIED1_{}_H_'.format(grammar.name)
+ if self.uses_guards:
+ parts.append('#ifndef {}'.format(guard))
+ parts.append('#define {}'.format(guard))
+ parts.append('')
+
+ parts.append(self.cpp_guard_preamble())
+
+ if grammar.version:
+ parts.append(self.const_definition(grammar.name, 'Version', grammar.version))
+
+ if grammar.revision is not None:
+ parts.append(self.const_definition(grammar.name, 'Revision', grammar.revision))
+
+ parts.append('')
+
+ if grammar.instructions:
+ parts.append(self.enum_prefix(grammar.name, 'Instructions'))
+ for inst in grammar.instructions:
+ parts.append(self.enum_value(grammar.name, inst['opname'], inst['opcode']))
+ parts.append(self.enum_end(grammar.name, 'Instructions'))
+ parts.append('')
+
+ if grammar.operand_kinds:
+ for kind in grammar.operand_kinds:
+ parts.append(self.enum_prefix(grammar.name, kind['kind']))
+ for e in kind['enumerants']:
+ parts.append(self.enum_value(grammar.name, e['enumerant'], e['value']))
+ parts.append(self.enum_end(grammar.name, kind['kind']))
+ parts.append('')
+
+ parts.append(self.cpp_guard_postamble())
+
+ if self.uses_guards:
+ parts.append('#endif // {}'.format(guard))
+
+ # Ensre the file ends in an end of line
+ parts.append('')
+
+ return '\n'.join(parts)
+
+
+class CLikeGenerator(LangGenerator):
+ def uses_guards(self):
+ return True
+
+ def comment_prefix(self):
+ return "// "
+
+ def const_definition(self, prefix, var, value):
+ # Use an anonymous enum. Don't use a static const int variable because
+ # that can bloat binary size.
+ return 'enum {0}{1}{2}{3} = {4},{1}{2}{3}_BitWidthPadding = 0x7fffffff{5};'.format(
+ '{', '\n ', prefix, var, value, '\n}')
+
+ def enum_prefix(self, prefix, name):
+ return 'enum {}{} {}'.format(prefix, name, '{')
+
+ def enum_end(self, prefix, enum):
+ return ' {}{}Max = 0x7fffffff\n{};\n'.format(prefix, enum, '}')
+
+ def cpp_guard_preamble(self):
+ return '#ifdef __cplusplus\nextern "C" {\n#endif\n'
+
+ def cpp_guard_postamble(self):
+ return '#ifdef __cplusplus\n}\n#endif\n'
+
+
+class CGenerator(CLikeGenerator):
+ pass
+
+
+def main():
+ import argparse
+ parser = argparse.ArgumentParser(description='Generate language headers from a JSON grammar')
+
+ parser.add_argument('--extinst-name',
+ type=str, required=True,
+ help='The name to use in tokens')
+ parser.add_argument('--extinst-grammar', metavar='<path>',
+ type=str, required=True,
+ help='input JSON grammar file for extended instruction set')
+ parser.add_argument('--extinst-output-base', metavar='<path>',
+ type=str, required=True,
+ help='Basename of the language-specific output file.')
+ args = parser.parse_args()
+
+ with open(args.extinst_grammar) as json_file:
+ grammar_json = json.loads(json_file.read())
+ if 'copyright' in grammar_json:
+ copyright = grammar_json['copyright']
+ else:
+ copyright = DEFAULT_COPYRIGHT
+ if 'version' in grammar_json:
+ version = grammar_json['version']
+ else:
+ version = 0
+ if 'operand_kinds' in grammar_json:
+ operand_kinds = grammar_json['operand_kinds']
+ else:
+ operand_kinds = []
+
+ grammar = ExtInstGrammar(name = args.extinst_name,
+ copyright = copyright,
+ instructions = grammar_json['instructions'],
+ operand_kinds = operand_kinds,
+ version = version,
+ revision = grammar_json['revision'])
+ make_path_to_file(args.extinst_output_base)
+ with open(args.extinst_output_base + '.h', 'w') as f:
+ f.write(CGenerator().generate(grammar))
+
+
+if __name__ == '__main__':
+ main()
diff --git a/tools/buildHeaders/bin/makeExtinstHeaders.py b/tools/buildHeaders/bin/makeExtinstHeaders.py
new file mode 100755
index 0000000..780e479
--- /dev/null
+++ b/tools/buildHeaders/bin/makeExtinstHeaders.py
@@ -0,0 +1,27 @@
+#!/usr/bin/env python3
+"""Generate C headers for certain extended instruction sets"""
+
+import subprocess
+import os
+
+# Assume we are running from the tools/buildHeaders directory
+os.chdir('../../include/spirv/unified1')
+
+def mk_extinst(name, grammar_file):
+ """Generate one C header from a grammar"""
+ script = '../../../tools/buildHeaders/bin/generate_language_headers.py'
+ subprocess.check_call(['python3',
+ script,
+ '--extinst-name=' + name,
+ '--extinst-grammar=' + grammar_file,
+ '--extinst-output-base=' + name])
+ subprocess.check_call(['dos2unix', name + '.h'])
+
+
+mk_extinst('DebugInfo', 'extinst.debuginfo.grammar.json')
+mk_extinst('OpenCLDebugInfo100', 'extinst.opencl.debuginfo.100.grammar.json')
+mk_extinst('AMD_gcn_shader', 'extinst.spv-amd-gcn-shader.grammar.json')
+mk_extinst('AMD_shader_ballot', 'extinst.spv-amd-shader-ballot.grammar.json')
+mk_extinst('AMD_shader_explicit_vertex_parameter', 'extinst.spv-amd-shader-explicit-vertex-parameter.grammar.json')
+mk_extinst('AMD_shader_trinary_minmax', 'extinst.spv-amd-shader-trinary-minmax.grammar.json')
+mk_extinst('NonSemanticDebugPrintf', 'extinst.nonsemantic.debugprintf.grammar.json')
diff --git a/tools/buildHeaders/bin/makeHeaders b/tools/buildHeaders/bin/makeHeaders
index 47d2218..0ca0b2f 100755
--- a/tools/buildHeaders/bin/makeHeaders
+++ b/tools/buildHeaders/bin/makeHeaders
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
+python3 bin/makeExtinstHeaders.py
+
cd ../../include/spirv/unified1
../../../tools/buildHeaders/build/install/bin/buildSpvHeaders -H spirv.core.grammar.json
dos2unix spirv.* SpirV.* spv.*
diff --git a/tools/buildHeaders/header.cpp b/tools/buildHeaders/header.cpp
index e1e05d0..7e8f668 100644
--- a/tools/buildHeaders/header.cpp
+++ b/tools/buildHeaders/header.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2014-2019 The Khronos Group Inc.
+// Copyright (c) 2014-2020 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"),
@@ -69,7 +69,7 @@ namespace {
TPrinter();
static const int DocMagicNumber = 0x07230203;
- static const int DocVersion = 0x00010400;
+ static const int DocVersion = 0x00010500;
static const int DocRevision = 1;
#define DocRevisionString "1"
static const std::string DocCopyright;
@@ -169,7 +169,7 @@ namespace {
}
const std::string TPrinter::DocCopyright =
- "Copyright (c) 2014-2019 The Khronos Group Inc.\n"
+ "Copyright (c) 2014-2020 The Khronos Group Inc.\n"
"\n"
"Permission is hereby granted, free of charge, to any person obtaining a copy\n"
"of this software and/or associated documentation files (the \"Materials\"),\n"
diff --git a/tools/buildHeaders/jsonToSpirv.cpp b/tools/buildHeaders/jsonToSpirv.cpp
index 2190bd3..5cca0b9 100644
--- a/tools/buildHeaders/jsonToSpirv.cpp
+++ b/tools/buildHeaders/jsonToSpirv.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2014-2019 The Khronos Group Inc.
+// Copyright (c) 2014-2020 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"),
@@ -77,6 +77,10 @@ EnumValues ScopeParams;
EnumValues KernelEnqueueFlagsParams;
EnumValues KernelProfilingInfoParams;
EnumValues CapabilityParams;
+EnumValues RayFlagsParams;
+EnumValues RayQueryIntersectionParams;
+EnumValues RayQueryCommittedIntersectionTypeParams;
+EnumValues RayQueryCandidateIntersectionTypeParams;
std::pair<bool, std::string> ReadFile(const std::string& path)
{
@@ -146,7 +150,7 @@ ClassOptionality ToOperandClassAndOptionality(const std::string& operandKind, co
} else if (operandKind == "LiteralSpecConstantOpInteger") {
type = OperandLiteralNumber;
} else if (operandKind == "LiteralContextDependentNumber") {
- type = OperandVariableLiterals;
+ type = OperandAnySizeLiteralNumber;
} else if (operandKind == "SourceLanguage") {
type = OperandSource;
} else if (operandKind == "ExecutionModel") {
@@ -203,6 +207,14 @@ ClassOptionality ToOperandClassAndOptionality(const std::string& operandKind, co
type = OperandFunction;
} else if (operandKind == "MemoryAccess") {
type = OperandMemoryOperands;
+ } else if (operandKind == "RayFlags") {
+ type = OperandRayFlags;
+ } else if (operandKind == "RayQueryIntersection") {
+ type = OperandRayQueryIntersection;
+ } else if (operandKind == "RayQueryCommittedIntersectionType") {
+ type = OperandRayQueryCommittedIntersectionType;
+ } else if (operandKind == "RayQueryCandidateIntersectionType") {
+ type = OperandRayQueryCandidateIntersectionType;
}
if (type == OperandNone) {
@@ -463,6 +475,14 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders)
establishOperandClass(enumName, OperandKernelEnqueueFlags, &KernelEnqueueFlagsParams, operandEnum, category);
} else if (enumName == "KernelProfilingInfo") {
establishOperandClass(enumName, OperandKernelProfilingInfo, &KernelProfilingInfoParams, operandEnum, category);
+ } else if (enumName == "RayFlags") {
+ establishOperandClass(enumName, OperandRayFlags, &RayFlagsParams, operandEnum, category);
+ } else if (enumName == "RayQueryIntersection") {
+ establishOperandClass(enumName, OperandRayQueryIntersection, &RayQueryIntersectionParams, operandEnum, category);
+ } else if (enumName == "RayQueryCommittedIntersectionType") {
+ establishOperandClass(enumName, OperandRayQueryCommittedIntersectionType, &RayQueryCommittedIntersectionTypeParams, operandEnum, category);
+ } else if (enumName == "RayQueryCandidateIntersectionType") {
+ establishOperandClass(enumName, OperandRayQueryCandidateIntersectionType, &RayQueryCandidateIntersectionTypeParams, operandEnum, category);
}
}
}
diff --git a/tools/buildHeaders/jsonToSpirv.h b/tools/buildHeaders/jsonToSpirv.h
index 0764de3..9a5eafd 100644
--- a/tools/buildHeaders/jsonToSpirv.h
+++ b/tools/buildHeaders/jsonToSpirv.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2014-2019 The Khronos Group Inc.
+// Copyright (c) 2014-2020 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"),
@@ -51,6 +51,7 @@ enum OperandClass {
OperandVariableLiterals,
OperandVariableIdLiteral,
OperandVariableLiteralId,
+ OperandAnySizeLiteralNumber,
OperandLiteralNumber,
OperandLiteralString,
OperandSource,
@@ -83,6 +84,10 @@ enum OperandClass {
OperandKernelEnqueueFlags,
OperandKernelProfilingInfo,
OperandCapability,
+ OperandRayFlags,
+ OperandRayQueryIntersection,
+ OperandRayQueryCommittedIntersectionType,
+ OperandRayQueryCandidateIntersectionType,
OperandOpcode,