early-access version 1866
This commit is contained in:
2
externals/sirit/CMakeLists.txt
vendored
2
externals/sirit/CMakeLists.txt
vendored
@@ -17,7 +17,7 @@ if (NOT CMAKE_BUILD_TYPE)
|
||||
endif()
|
||||
|
||||
# Set hard requirements for C++
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
|
@@ -1,2 +1,3 @@
|
||||
build
|
||||
out
|
||||
.DS_Store
|
||||
|
166
externals/sirit/externals/SPIRV-Headers/BUILD.bazel
vendored
Executable file
166
externals/sirit/externals/SPIRV-Headers/BUILD.bazel
vendored
Executable file
@@ -0,0 +1,166 @@
|
||||
package(
|
||||
default_visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files(["LICENSE"])
|
||||
|
||||
filegroup(
|
||||
name = "spirv_core_grammar_1.0",
|
||||
srcs = ["include/spirv/1.0/spirv.core.grammar.json"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "spirv_glsl_grammar_1.0",
|
||||
srcs = ["include/spirv/1.0/extinst.glsl.std.450.grammar.json"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "spirv_opencl_grammar_1.0",
|
||||
srcs = ["include/spirv/1.0/extinst.opencl.std.100.grammar.json"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "spirv_core_grammar_1.1",
|
||||
srcs = ["include/spirv/1.1/spirv.core.grammar.json"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "spirv_glsl_grammar_1.1",
|
||||
srcs = ["include/spirv/1.1/extinst.glsl.std.450.grammar.json"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "spirv_opencl_grammar_1.1",
|
||||
srcs = ["include/spirv/1.1/extinst.opencl.std.100.grammar.json"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "spirv_core_grammar_1.2",
|
||||
srcs = ["include/spirv/1.2/spirv.core.grammar.json"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "spirv_glsl_grammar_1.2",
|
||||
srcs = ["include/spirv/1.2/extinst.glsl.std.450.grammar.json"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "spirv_opencl_grammar_1.2",
|
||||
srcs = ["include/spirv/1.2/extinst.opencl.std.100.grammar.json"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "spirv_core_grammar_unified1",
|
||||
srcs = ["include/spirv/unified1/spirv.core.grammar.json"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "spirv_glsl_grammar_unified1",
|
||||
srcs = ["include/spirv/unified1/extinst.glsl.std.450.grammar.json"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "spirv_opencl_grammar_unified1",
|
||||
srcs = ["include/spirv/unified1/extinst.opencl.std.100.grammar.json"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "spirv_xml_registry",
|
||||
srcs = ["include/spirv/spir-v.xml"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "spirv_ext_inst_debuginfo_grammar_unified1",
|
||||
srcs = ["include/spirv/unified1/extinst.debuginfo.grammar.json"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "spirv_ext_inst_nonsemantic_clspvreflection_grammar_unified1",
|
||||
srcs = ["include/spirv/unified1/extinst.nonsemantic.clspvreflection.grammar.json"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "spirv_ext_inst_nonsemantic_debugprintf_grammar_unified1",
|
||||
srcs = ["include/spirv/unified1/extinst.nonsemantic.debugprintf.grammar.json"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "spirv_ext_inst_opencl_debuginfo_100_grammar_unified1",
|
||||
srcs = ["include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "spirv_ext_inst_spv_amd_gcn_shader_grammar_unified1",
|
||||
srcs = ["include/spirv/unified1/extinst.spv-amd-gcn-shader.grammar.json"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "spirv_ext_inst_spv_amd_shader_ballot_grammar_unified1",
|
||||
srcs = ["include/spirv/unified1/extinst.spv-amd-shader-ballot.grammar.json"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "spirv_ext_inst_spv_amd_shader_explicit_vertex_parameter_grammar_unified1",
|
||||
srcs = ["include/spirv/unified1/extinst.spv-amd-shader-explicit-vertex-parameter.grammar.json"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "spirv_ext_inst_spv_amd_shader_trinary_minmax_grammar_unified1",
|
||||
srcs = ["include/spirv/unified1/extinst.spv-amd-shader-trinary-minmax.grammar.json"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "spirv_common_headers",
|
||||
hdrs = [
|
||||
"include/spirv/1.0/GLSL.std.450.h",
|
||||
"include/spirv/1.0/OpenCL.std.h",
|
||||
"include/spirv/1.1/GLSL.std.450.h",
|
||||
"include/spirv/1.1/OpenCL.std.h",
|
||||
"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/NonSemanticClspvReflection.h",
|
||||
"include/spirv/unified1/NonSemanticDebugPrintf.h",
|
||||
"include/spirv/unified1/OpenCL.std.h",
|
||||
],
|
||||
includes = ["include"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "spirv_c_headers",
|
||||
hdrs = [
|
||||
"include/spirv/1.0/spirv.h",
|
||||
"include/spirv/1.1/spirv.h",
|
||||
"include/spirv/1.2/spirv.h",
|
||||
"include/spirv/unified1/spirv.h",
|
||||
],
|
||||
includes = ["include"],
|
||||
deps = [":spirv_common_headers"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "spirv_cpp_headers",
|
||||
hdrs = [
|
||||
"include/spirv/1.0/spirv.hpp",
|
||||
"include/spirv/1.1/spirv.hpp",
|
||||
"include/spirv/1.2/spirv.hpp",
|
||||
"include/spirv/unified1/spirv.hpp",
|
||||
],
|
||||
includes = ["include"],
|
||||
deps = [":spirv_common_headers"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "spirv_cpp11_headers",
|
||||
hdrs = [
|
||||
"include/spirv/1.0/spirv.hpp11",
|
||||
"include/spirv/1.1/spirv.hpp11",
|
||||
"include/spirv/1.2/spirv.hpp11",
|
||||
"include/spirv/unified1/spirv.hpp11",
|
||||
],
|
||||
includes = ["include"],
|
||||
deps = [":spirv_common_headers"],
|
||||
)
|
||||
|
44
externals/sirit/externals/SPIRV-Headers/BUILD.gn
vendored
Executable file
44
externals/sirit/externals/SPIRV-Headers/BUILD.gn
vendored
Executable file
@@ -0,0 +1,44 @@
|
||||
# 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/NonSemanticClspvReflection.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" ]
|
||||
}
|
@@ -28,8 +28,8 @@
|
||||
# The SPIR-V headers from the SPIR-V Registry
|
||||
# https://www.khronos.org/registry/spir-v/
|
||||
#
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
project(SPIRV-Headers)
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
project(SPIRV-Headers VERSION 1.5.1)
|
||||
|
||||
# There are two ways to use this project.
|
||||
#
|
||||
@@ -44,17 +44,84 @@ project(SPIRV-Headers)
|
||||
# 2. cmake ..
|
||||
# 3. cmake --build . --target install
|
||||
|
||||
file(GLOB_RECURSE HEADER_FILES
|
||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
include/spirv/*)
|
||||
foreach(HEADER_FILE ${HEADER_FILES})
|
||||
get_filename_component(HEADER_INSTALL_DIR ${HEADER_FILE} PATH)
|
||||
install(FILES ${HEADER_FILE} DESTINATION ${HEADER_INSTALL_DIR})
|
||||
endforeach()
|
||||
|
||||
# legacy
|
||||
add_custom_target(install-headers
|
||||
COMMAND cmake -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/include/spirv
|
||||
$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/include/spirv)
|
||||
|
||||
add_subdirectory(example)
|
||||
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)
|
||||
endif()
|
||||
|
||||
include(GNUInstallDirs)
|
||||
add_library(${PROJECT_NAME} INTERFACE)
|
||||
target_include_directories(${PROJECT_NAME} INTERFACE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
)
|
||||
|
||||
# Installation
|
||||
|
||||
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()
|
||||
|
1
externals/sirit/externals/SPIRV-Headers/CODE_OF_CONDUCT.md
vendored
Executable file
1
externals/sirit/externals/SPIRV-Headers/CODE_OF_CONDUCT.md
vendored
Executable file
@@ -0,0 +1 @@
|
||||
A reminder that this issue tracker is managed by the Khronos Group. Interactions here should follow the Khronos Code of Conduct (https://www.khronos.org/developers/code-of-conduct), which prohibits aggressive or derogatory language. Please keep the discussion friendly and civil.
|
@@ -23,12 +23,33 @@ When a new version or revision of the SPIR-V specification is published,
|
||||
the SPIR-V Working Group will push new commits onto master, updating
|
||||
the files under [include](include).
|
||||
|
||||
The SPIR-V XML registry file is updated by Khronos whenever a new enum range is allocated.
|
||||
[The SPIR-V XML registry file](include/spirv/spir-v.xml)
|
||||
is updated by Khronos whenever a new enum range is allocated.
|
||||
|
||||
Pull requests can be made to
|
||||
Pull requests can be made to
|
||||
- request allocation of new enum ranges in the XML registry file
|
||||
- register a new magic number for a SPIR-V generator
|
||||
- reserve specific tokens in the JSON grammar
|
||||
|
||||
### Registering a SPIR-V Generator Magic Number
|
||||
|
||||
Tools that generate SPIR-V should use a magic number in the SPIR-V to help identify the
|
||||
generator.
|
||||
|
||||
Care should be taken to follow existing precedent in populating the details of reserved tokens.
|
||||
This includes:
|
||||
- keeping generator numbers in numeric order
|
||||
- filling out all the existing fields
|
||||
|
||||
### Reserving tokens in the JSON grammar
|
||||
|
||||
Care should be taken to follow existing precedent in populating the details of reserved tokens.
|
||||
This includes:
|
||||
- pointing to what extension has more information, when possible
|
||||
- keeping enumerants in numeric order
|
||||
- when there are aliases, listing the preferred spelling first
|
||||
- adding the statement `"version" : "None"`
|
||||
|
||||
## How to install the headers
|
||||
|
||||
```
|
||||
@@ -45,6 +66,7 @@ If you want to install them somewhere else, then use
|
||||
|
||||
## Using the headers without installing
|
||||
|
||||
### Using CMake
|
||||
A CMake-based project can use the headers without installing, as follows:
|
||||
|
||||
1. Add an `add_subdirectory` directive to include this source tree.
|
||||
@@ -61,7 +83,56 @@ A CMake-based project can use the headers without installing, as follows:
|
||||
See also the [example](example/) subdirectory. But since that example is
|
||||
*inside* this repostory, it doesn't use and `add_subdirectory` directive.
|
||||
|
||||
## Generating the headers from the JSON grammar
|
||||
### Using Bazel
|
||||
A Bazel-based project can use the headers without installing, as follows:
|
||||
|
||||
1. Add SPIRV-Headers as a submodule of your project, and add a
|
||||
`local_repository` to your `WORKSPACE` file. For example, if you place
|
||||
SPIRV-Headers under `external/spirv-headers`, then add the following to your
|
||||
`WORKSPACE` file:
|
||||
|
||||
```
|
||||
local_repository(
|
||||
name = "spirv_headers",
|
||||
path = "external/spirv-headers",
|
||||
)
|
||||
```
|
||||
|
||||
2. Add one of the following to the `deps` attribute of your build target based
|
||||
on your needs:
|
||||
```
|
||||
@spirv_headers//:spirv_c_headers
|
||||
@spirv_headers//:spirv_cpp_headers
|
||||
@spirv_headers//:spirv_cpp11_headers
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
cc_library(
|
||||
name = "project",
|
||||
srcs = [
|
||||
# Path to project sources
|
||||
],
|
||||
hdrs = [
|
||||
# Path to project headers
|
||||
],
|
||||
deps = [
|
||||
"@spirv_tools//:spirv_c_headers",
|
||||
# Other dependencies,
|
||||
],
|
||||
)
|
||||
```
|
||||
|
||||
3. In your C or C++ source code use `#include` directives that explicitly mention
|
||||
the `spirv` path component.
|
||||
```
|
||||
#include "spirv/unified1/GLSL.std.450.h"
|
||||
#include "spirv/unified1/OpenCL.std.h"
|
||||
#include "spirv/unified1/spirv.hpp"
|
||||
```
|
||||
|
||||
## 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,
|
||||
@@ -79,6 +150,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?*
|
||||
|
0
externals/sirit/externals/SPIRV-Headers/WORKSPACE
vendored
Executable file
0
externals/sirit/externals/SPIRV-Headers/WORKSPACE
vendored
Executable file
4
externals/sirit/externals/SPIRV-Headers/cmake/Config.cmake.in
vendored
Executable file
4
externals/sirit/externals/SPIRV-Headers/cmake/Config.cmake.in
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
|
||||
check_required_components("@PROJECT_NAME@")
|
@@ -2,8 +2,3 @@ add_library(SPIRV-Headers-example
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/example.cpp)
|
||||
target_include_directories(SPIRV-Headers-example
|
||||
PRIVATE ${SPIRV-Headers_SOURCE_DIR}/include)
|
||||
|
||||
add_library(SPIRV-Headers-example-1.1
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/example-1.1.cpp)
|
||||
target_include_directories(SPIRV-Headers-example-1.1
|
||||
PRIVATE ${SPIRV-Headers_SOURCE_DIR}/include)
|
||||
|
@@ -24,9 +24,9 @@
|
||||
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
|
||||
#include <spirv/1.0/GLSL.std.450.h>
|
||||
#include <spirv/1.0/OpenCL.std.h>
|
||||
#include <spirv/1.0/spirv.hpp>
|
||||
#include <spirv/unified1/GLSL.std.450.h>
|
||||
#include <spirv/unified1/OpenCL.std.h>
|
||||
#include <spirv/unified1/spirv.hpp>
|
||||
|
||||
namespace {
|
||||
|
||||
|
993
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/spirv.cs
vendored
Executable file
993
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/spirv.cs
vendored
Executable file
@@ -0,0 +1,993 @@
|
||||
// Copyright (c) 2014-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.
|
||||
|
||||
// This header is automatically generated by the same tool that creates
|
||||
// the Binary Section of the SPIR-V specification.
|
||||
|
||||
// Enumeration tokens for SPIR-V, in various styles:
|
||||
// C, C++, C++11, JSON, Lua, Python, C#
|
||||
//
|
||||
// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
|
||||
// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
|
||||
// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
|
||||
// - Lua will use tables, e.g.: spv.SourceLanguage.GLSL
|
||||
// - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL']
|
||||
// - C# will use enum classes in the Specification class located in the "Spv" namespace, e.g.: Spv.Specification.SourceLanguage.GLSL
|
||||
//
|
||||
// Some tokens act like mask values, which can be OR'd together,
|
||||
// while others are mutually exclusive. The mask-like ones have
|
||||
// "Mask" in their name, and a parallel enum that has the shift
|
||||
// amount (1 << x) for each corresponding enumerant.
|
||||
|
||||
namespace Spv
|
||||
{
|
||||
|
||||
public static class Specification
|
||||
{
|
||||
public const uint MagicNumber = 0x07230203;
|
||||
public const uint Version = 0x00010000;
|
||||
public const uint Revision = 12;
|
||||
public const uint OpCodeMask = 0xffff;
|
||||
public const uint WordCountShift = 16;
|
||||
|
||||
public enum SourceLanguage
|
||||
{
|
||||
Unknown = 0,
|
||||
ESSL = 1,
|
||||
GLSL = 2,
|
||||
OpenCL_C = 3,
|
||||
OpenCL_CPP = 4,
|
||||
HLSL = 5,
|
||||
}
|
||||
|
||||
public enum ExecutionModel
|
||||
{
|
||||
Vertex = 0,
|
||||
TessellationControl = 1,
|
||||
TessellationEvaluation = 2,
|
||||
Geometry = 3,
|
||||
Fragment = 4,
|
||||
GLCompute = 5,
|
||||
Kernel = 6,
|
||||
}
|
||||
|
||||
public enum AddressingModel
|
||||
{
|
||||
Logical = 0,
|
||||
Physical32 = 1,
|
||||
Physical64 = 2,
|
||||
}
|
||||
|
||||
public enum MemoryModel
|
||||
{
|
||||
Simple = 0,
|
||||
GLSL450 = 1,
|
||||
OpenCL = 2,
|
||||
}
|
||||
|
||||
public enum ExecutionMode
|
||||
{
|
||||
Invocations = 0,
|
||||
SpacingEqual = 1,
|
||||
SpacingFractionalEven = 2,
|
||||
SpacingFractionalOdd = 3,
|
||||
VertexOrderCw = 4,
|
||||
VertexOrderCcw = 5,
|
||||
PixelCenterInteger = 6,
|
||||
OriginUpperLeft = 7,
|
||||
OriginLowerLeft = 8,
|
||||
EarlyFragmentTests = 9,
|
||||
PointMode = 10,
|
||||
Xfb = 11,
|
||||
DepthReplacing = 12,
|
||||
DepthGreater = 14,
|
||||
DepthLess = 15,
|
||||
DepthUnchanged = 16,
|
||||
LocalSize = 17,
|
||||
LocalSizeHint = 18,
|
||||
InputPoints = 19,
|
||||
InputLines = 20,
|
||||
InputLinesAdjacency = 21,
|
||||
Triangles = 22,
|
||||
InputTrianglesAdjacency = 23,
|
||||
Quads = 24,
|
||||
Isolines = 25,
|
||||
OutputVertices = 26,
|
||||
OutputPoints = 27,
|
||||
OutputLineStrip = 28,
|
||||
OutputTriangleStrip = 29,
|
||||
VecTypeHint = 30,
|
||||
ContractionOff = 31,
|
||||
PostDepthCoverage = 4446,
|
||||
StencilRefReplacingEXT = 5027,
|
||||
}
|
||||
|
||||
public enum StorageClass
|
||||
{
|
||||
UniformConstant = 0,
|
||||
Input = 1,
|
||||
Uniform = 2,
|
||||
Output = 3,
|
||||
Workgroup = 4,
|
||||
CrossWorkgroup = 5,
|
||||
Private = 6,
|
||||
Function = 7,
|
||||
Generic = 8,
|
||||
PushConstant = 9,
|
||||
AtomicCounter = 10,
|
||||
Image = 11,
|
||||
StorageBuffer = 12,
|
||||
}
|
||||
|
||||
public enum Dim
|
||||
{
|
||||
Dim1D = 0,
|
||||
Dim2D = 1,
|
||||
Dim3D = 2,
|
||||
Cube = 3,
|
||||
Rect = 4,
|
||||
Buffer = 5,
|
||||
SubpassData = 6,
|
||||
}
|
||||
|
||||
public enum SamplerAddressingMode
|
||||
{
|
||||
None = 0,
|
||||
ClampToEdge = 1,
|
||||
Clamp = 2,
|
||||
Repeat = 3,
|
||||
RepeatMirrored = 4,
|
||||
}
|
||||
|
||||
public enum SamplerFilterMode
|
||||
{
|
||||
Nearest = 0,
|
||||
Linear = 1,
|
||||
}
|
||||
|
||||
public enum ImageFormat
|
||||
{
|
||||
Unknown = 0,
|
||||
Rgba32f = 1,
|
||||
Rgba16f = 2,
|
||||
R32f = 3,
|
||||
Rgba8 = 4,
|
||||
Rgba8Snorm = 5,
|
||||
Rg32f = 6,
|
||||
Rg16f = 7,
|
||||
R11fG11fB10f = 8,
|
||||
R16f = 9,
|
||||
Rgba16 = 10,
|
||||
Rgb10A2 = 11,
|
||||
Rg16 = 12,
|
||||
Rg8 = 13,
|
||||
R16 = 14,
|
||||
R8 = 15,
|
||||
Rgba16Snorm = 16,
|
||||
Rg16Snorm = 17,
|
||||
Rg8Snorm = 18,
|
||||
R16Snorm = 19,
|
||||
R8Snorm = 20,
|
||||
Rgba32i = 21,
|
||||
Rgba16i = 22,
|
||||
Rgba8i = 23,
|
||||
R32i = 24,
|
||||
Rg32i = 25,
|
||||
Rg16i = 26,
|
||||
Rg8i = 27,
|
||||
R16i = 28,
|
||||
R8i = 29,
|
||||
Rgba32ui = 30,
|
||||
Rgba16ui = 31,
|
||||
Rgba8ui = 32,
|
||||
R32ui = 33,
|
||||
Rgb10a2ui = 34,
|
||||
Rg32ui = 35,
|
||||
Rg16ui = 36,
|
||||
Rg8ui = 37,
|
||||
R16ui = 38,
|
||||
R8ui = 39,
|
||||
}
|
||||
|
||||
public enum ImageChannelOrder
|
||||
{
|
||||
R = 0,
|
||||
A = 1,
|
||||
RG = 2,
|
||||
RA = 3,
|
||||
RGB = 4,
|
||||
RGBA = 5,
|
||||
BGRA = 6,
|
||||
ARGB = 7,
|
||||
Intensity = 8,
|
||||
Luminance = 9,
|
||||
Rx = 10,
|
||||
RGx = 11,
|
||||
RGBx = 12,
|
||||
Depth = 13,
|
||||
DepthStencil = 14,
|
||||
sRGB = 15,
|
||||
sRGBx = 16,
|
||||
sRGBA = 17,
|
||||
sBGRA = 18,
|
||||
ABGR = 19,
|
||||
}
|
||||
|
||||
public enum ImageChannelDataType
|
||||
{
|
||||
SnormInt8 = 0,
|
||||
SnormInt16 = 1,
|
||||
UnormInt8 = 2,
|
||||
UnormInt16 = 3,
|
||||
UnormShort565 = 4,
|
||||
UnormShort555 = 5,
|
||||
UnormInt101010 = 6,
|
||||
SignedInt8 = 7,
|
||||
SignedInt16 = 8,
|
||||
SignedInt32 = 9,
|
||||
UnsignedInt8 = 10,
|
||||
UnsignedInt16 = 11,
|
||||
UnsignedInt32 = 12,
|
||||
HalfFloat = 13,
|
||||
Float = 14,
|
||||
UnormInt24 = 15,
|
||||
UnormInt101010_2 = 16,
|
||||
}
|
||||
|
||||
public enum ImageOperandsShift
|
||||
{
|
||||
Bias = 0,
|
||||
Lod = 1,
|
||||
Grad = 2,
|
||||
ConstOffset = 3,
|
||||
Offset = 4,
|
||||
ConstOffsets = 5,
|
||||
Sample = 6,
|
||||
MinLod = 7,
|
||||
}
|
||||
|
||||
public enum ImageOperandsMask
|
||||
{
|
||||
MaskNone = 0,
|
||||
Bias = 0x00000001,
|
||||
Lod = 0x00000002,
|
||||
Grad = 0x00000004,
|
||||
ConstOffset = 0x00000008,
|
||||
Offset = 0x00000010,
|
||||
ConstOffsets = 0x00000020,
|
||||
Sample = 0x00000040,
|
||||
MinLod = 0x00000080,
|
||||
}
|
||||
|
||||
public enum FPFastMathModeShift
|
||||
{
|
||||
NotNaN = 0,
|
||||
NotInf = 1,
|
||||
NSZ = 2,
|
||||
AllowRecip = 3,
|
||||
Fast = 4,
|
||||
}
|
||||
|
||||
public enum FPFastMathModeMask
|
||||
{
|
||||
MaskNone = 0,
|
||||
NotNaN = 0x00000001,
|
||||
NotInf = 0x00000002,
|
||||
NSZ = 0x00000004,
|
||||
AllowRecip = 0x00000008,
|
||||
Fast = 0x00000010,
|
||||
}
|
||||
|
||||
public enum FPRoundingMode
|
||||
{
|
||||
RTE = 0,
|
||||
RTZ = 1,
|
||||
RTP = 2,
|
||||
RTN = 3,
|
||||
}
|
||||
|
||||
public enum LinkageType
|
||||
{
|
||||
Export = 0,
|
||||
Import = 1,
|
||||
}
|
||||
|
||||
public enum AccessQualifier
|
||||
{
|
||||
ReadOnly = 0,
|
||||
WriteOnly = 1,
|
||||
ReadWrite = 2,
|
||||
}
|
||||
|
||||
public enum FunctionParameterAttribute
|
||||
{
|
||||
Zext = 0,
|
||||
Sext = 1,
|
||||
ByVal = 2,
|
||||
Sret = 3,
|
||||
NoAlias = 4,
|
||||
NoCapture = 5,
|
||||
NoWrite = 6,
|
||||
NoReadWrite = 7,
|
||||
}
|
||||
|
||||
public enum Decoration
|
||||
{
|
||||
RelaxedPrecision = 0,
|
||||
SpecId = 1,
|
||||
Block = 2,
|
||||
BufferBlock = 3,
|
||||
RowMajor = 4,
|
||||
ColMajor = 5,
|
||||
ArrayStride = 6,
|
||||
MatrixStride = 7,
|
||||
GLSLShared = 8,
|
||||
GLSLPacked = 9,
|
||||
CPacked = 10,
|
||||
BuiltIn = 11,
|
||||
NoPerspective = 13,
|
||||
Flat = 14,
|
||||
Patch = 15,
|
||||
Centroid = 16,
|
||||
Sample = 17,
|
||||
Invariant = 18,
|
||||
Restrict = 19,
|
||||
Aliased = 20,
|
||||
Volatile = 21,
|
||||
Constant = 22,
|
||||
Coherent = 23,
|
||||
NonWritable = 24,
|
||||
NonReadable = 25,
|
||||
Uniform = 26,
|
||||
SaturatedConversion = 28,
|
||||
Stream = 29,
|
||||
Location = 30,
|
||||
Component = 31,
|
||||
Index = 32,
|
||||
Binding = 33,
|
||||
DescriptorSet = 34,
|
||||
Offset = 35,
|
||||
XfbBuffer = 36,
|
||||
XfbStride = 37,
|
||||
FuncParamAttr = 38,
|
||||
FPRoundingMode = 39,
|
||||
FPFastMathMode = 40,
|
||||
LinkageAttributes = 41,
|
||||
NoContraction = 42,
|
||||
InputAttachmentIndex = 43,
|
||||
Alignment = 44,
|
||||
ExplicitInterpAMD = 4999,
|
||||
OverrideCoverageNV = 5248,
|
||||
PassthroughNV = 5250,
|
||||
ViewportRelativeNV = 5252,
|
||||
SecondaryViewportRelativeNV = 5256,
|
||||
HlslCounterBufferGOOGLE = 5634,
|
||||
HlslSemanticGOOGLE = 5635,
|
||||
}
|
||||
|
||||
public enum BuiltIn
|
||||
{
|
||||
Position = 0,
|
||||
PointSize = 1,
|
||||
ClipDistance = 3,
|
||||
CullDistance = 4,
|
||||
VertexId = 5,
|
||||
InstanceId = 6,
|
||||
PrimitiveId = 7,
|
||||
InvocationId = 8,
|
||||
Layer = 9,
|
||||
ViewportIndex = 10,
|
||||
TessLevelOuter = 11,
|
||||
TessLevelInner = 12,
|
||||
TessCoord = 13,
|
||||
PatchVertices = 14,
|
||||
FragCoord = 15,
|
||||
PointCoord = 16,
|
||||
FrontFacing = 17,
|
||||
SampleId = 18,
|
||||
SamplePosition = 19,
|
||||
SampleMask = 20,
|
||||
FragDepth = 22,
|
||||
HelperInvocation = 23,
|
||||
NumWorkgroups = 24,
|
||||
WorkgroupSize = 25,
|
||||
WorkgroupId = 26,
|
||||
LocalInvocationId = 27,
|
||||
GlobalInvocationId = 28,
|
||||
LocalInvocationIndex = 29,
|
||||
WorkDim = 30,
|
||||
GlobalSize = 31,
|
||||
EnqueuedWorkgroupSize = 32,
|
||||
GlobalOffset = 33,
|
||||
GlobalLinearId = 34,
|
||||
SubgroupSize = 36,
|
||||
SubgroupMaxSize = 37,
|
||||
NumSubgroups = 38,
|
||||
NumEnqueuedSubgroups = 39,
|
||||
SubgroupId = 40,
|
||||
SubgroupLocalInvocationId = 41,
|
||||
VertexIndex = 42,
|
||||
InstanceIndex = 43,
|
||||
SubgroupEqMaskKHR = 4416,
|
||||
SubgroupGeMaskKHR = 4417,
|
||||
SubgroupGtMaskKHR = 4418,
|
||||
SubgroupLeMaskKHR = 4419,
|
||||
SubgroupLtMaskKHR = 4420,
|
||||
BaseVertex = 4424,
|
||||
BaseInstance = 4425,
|
||||
DrawIndex = 4426,
|
||||
DeviceIndex = 4438,
|
||||
ViewIndex = 4440,
|
||||
BaryCoordNoPerspAMD = 4992,
|
||||
BaryCoordNoPerspCentroidAMD = 4993,
|
||||
BaryCoordNoPerspSampleAMD = 4994,
|
||||
BaryCoordSmoothAMD = 4995,
|
||||
BaryCoordSmoothCentroidAMD = 4996,
|
||||
BaryCoordSmoothSampleAMD = 4997,
|
||||
BaryCoordPullModelAMD = 4998,
|
||||
FragStencilRefEXT = 5014,
|
||||
ViewportMaskNV = 5253,
|
||||
SecondaryPositionNV = 5257,
|
||||
SecondaryViewportMaskNV = 5258,
|
||||
PositionPerViewNV = 5261,
|
||||
ViewportMaskPerViewNV = 5262,
|
||||
}
|
||||
|
||||
public enum SelectionControlShift
|
||||
{
|
||||
Flatten = 0,
|
||||
DontFlatten = 1,
|
||||
}
|
||||
|
||||
public enum SelectionControlMask
|
||||
{
|
||||
MaskNone = 0,
|
||||
Flatten = 0x00000001,
|
||||
DontFlatten = 0x00000002,
|
||||
}
|
||||
|
||||
public enum LoopControlShift
|
||||
{
|
||||
Unroll = 0,
|
||||
DontUnroll = 1,
|
||||
}
|
||||
|
||||
public enum LoopControlMask
|
||||
{
|
||||
MaskNone = 0,
|
||||
Unroll = 0x00000001,
|
||||
DontUnroll = 0x00000002,
|
||||
}
|
||||
|
||||
public enum FunctionControlShift
|
||||
{
|
||||
Inline = 0,
|
||||
DontInline = 1,
|
||||
Pure = 2,
|
||||
Const = 3,
|
||||
}
|
||||
|
||||
public enum FunctionControlMask
|
||||
{
|
||||
MaskNone = 0,
|
||||
Inline = 0x00000001,
|
||||
DontInline = 0x00000002,
|
||||
Pure = 0x00000004,
|
||||
Const = 0x00000008,
|
||||
}
|
||||
|
||||
public enum MemorySemanticsShift
|
||||
{
|
||||
Acquire = 1,
|
||||
Release = 2,
|
||||
AcquireRelease = 3,
|
||||
SequentiallyConsistent = 4,
|
||||
UniformMemory = 6,
|
||||
SubgroupMemory = 7,
|
||||
WorkgroupMemory = 8,
|
||||
CrossWorkgroupMemory = 9,
|
||||
AtomicCounterMemory = 10,
|
||||
ImageMemory = 11,
|
||||
}
|
||||
|
||||
public enum MemorySemanticsMask
|
||||
{
|
||||
MaskNone = 0,
|
||||
Acquire = 0x00000002,
|
||||
Release = 0x00000004,
|
||||
AcquireRelease = 0x00000008,
|
||||
SequentiallyConsistent = 0x00000010,
|
||||
UniformMemory = 0x00000040,
|
||||
SubgroupMemory = 0x00000080,
|
||||
WorkgroupMemory = 0x00000100,
|
||||
CrossWorkgroupMemory = 0x00000200,
|
||||
AtomicCounterMemory = 0x00000400,
|
||||
ImageMemory = 0x00000800,
|
||||
}
|
||||
|
||||
public enum MemoryAccessShift
|
||||
{
|
||||
Volatile = 0,
|
||||
Aligned = 1,
|
||||
Nontemporal = 2,
|
||||
}
|
||||
|
||||
public enum MemoryAccessMask
|
||||
{
|
||||
MaskNone = 0,
|
||||
Volatile = 0x00000001,
|
||||
Aligned = 0x00000002,
|
||||
Nontemporal = 0x00000004,
|
||||
}
|
||||
|
||||
public enum Scope
|
||||
{
|
||||
CrossDevice = 0,
|
||||
Device = 1,
|
||||
Workgroup = 2,
|
||||
Subgroup = 3,
|
||||
Invocation = 4,
|
||||
}
|
||||
|
||||
public enum GroupOperation
|
||||
{
|
||||
Reduce = 0,
|
||||
InclusiveScan = 1,
|
||||
ExclusiveScan = 2,
|
||||
}
|
||||
|
||||
public enum KernelEnqueueFlags
|
||||
{
|
||||
NoWait = 0,
|
||||
WaitKernel = 1,
|
||||
WaitWorkGroup = 2,
|
||||
}
|
||||
|
||||
public enum KernelProfilingInfoShift
|
||||
{
|
||||
CmdExecTime = 0,
|
||||
}
|
||||
|
||||
public enum KernelProfilingInfoMask
|
||||
{
|
||||
MaskNone = 0,
|
||||
CmdExecTime = 0x00000001,
|
||||
}
|
||||
|
||||
public enum Capability
|
||||
{
|
||||
Matrix = 0,
|
||||
Shader = 1,
|
||||
Geometry = 2,
|
||||
Tessellation = 3,
|
||||
Addresses = 4,
|
||||
Linkage = 5,
|
||||
Kernel = 6,
|
||||
Vector16 = 7,
|
||||
Float16Buffer = 8,
|
||||
Float16 = 9,
|
||||
Float64 = 10,
|
||||
Int64 = 11,
|
||||
Int64Atomics = 12,
|
||||
ImageBasic = 13,
|
||||
ImageReadWrite = 14,
|
||||
ImageMipmap = 15,
|
||||
Pipes = 17,
|
||||
Groups = 18,
|
||||
DeviceEnqueue = 19,
|
||||
LiteralSampler = 20,
|
||||
AtomicStorage = 21,
|
||||
Int16 = 22,
|
||||
TessellationPointSize = 23,
|
||||
GeometryPointSize = 24,
|
||||
ImageGatherExtended = 25,
|
||||
StorageImageMultisample = 27,
|
||||
UniformBufferArrayDynamicIndexing = 28,
|
||||
SampledImageArrayDynamicIndexing = 29,
|
||||
StorageBufferArrayDynamicIndexing = 30,
|
||||
StorageImageArrayDynamicIndexing = 31,
|
||||
ClipDistance = 32,
|
||||
CullDistance = 33,
|
||||
ImageCubeArray = 34,
|
||||
SampleRateShading = 35,
|
||||
ImageRect = 36,
|
||||
SampledRect = 37,
|
||||
GenericPointer = 38,
|
||||
Int8 = 39,
|
||||
InputAttachment = 40,
|
||||
SparseResidency = 41,
|
||||
MinLod = 42,
|
||||
Sampled1D = 43,
|
||||
Image1D = 44,
|
||||
SampledCubeArray = 45,
|
||||
SampledBuffer = 46,
|
||||
ImageBuffer = 47,
|
||||
ImageMSArray = 48,
|
||||
StorageImageExtendedFormats = 49,
|
||||
ImageQuery = 50,
|
||||
DerivativeControl = 51,
|
||||
InterpolationFunction = 52,
|
||||
TransformFeedback = 53,
|
||||
GeometryStreams = 54,
|
||||
StorageImageReadWithoutFormat = 55,
|
||||
StorageImageWriteWithoutFormat = 56,
|
||||
MultiViewport = 57,
|
||||
SubgroupBallotKHR = 4423,
|
||||
DrawParameters = 4427,
|
||||
SubgroupVoteKHR = 4431,
|
||||
StorageBuffer16BitAccess = 4433,
|
||||
StorageUniformBufferBlock16 = 4433,
|
||||
StorageUniform16 = 4434,
|
||||
UniformAndStorageBuffer16BitAccess = 4434,
|
||||
StoragePushConstant16 = 4435,
|
||||
StorageInputOutput16 = 4436,
|
||||
DeviceGroup = 4437,
|
||||
MultiView = 4439,
|
||||
VariablePointersStorageBuffer = 4441,
|
||||
VariablePointers = 4442,
|
||||
AtomicStorageOps = 4445,
|
||||
SampleMaskPostDepthCoverage = 4447,
|
||||
ImageGatherBiasLodAMD = 5009,
|
||||
FragmentMaskAMD = 5010,
|
||||
StencilExportEXT = 5013,
|
||||
ImageReadWriteLodAMD = 5015,
|
||||
SampleMaskOverrideCoverageNV = 5249,
|
||||
GeometryShaderPassthroughNV = 5251,
|
||||
ShaderViewportIndexLayerEXT = 5254,
|
||||
ShaderViewportIndexLayerNV = 5254,
|
||||
ShaderViewportMaskNV = 5255,
|
||||
ShaderStereoViewNV = 5259,
|
||||
PerViewAttributesNV = 5260,
|
||||
SubgroupShuffleINTEL = 5568,
|
||||
SubgroupBufferBlockIOINTEL = 5569,
|
||||
SubgroupImageBlockIOINTEL = 5570,
|
||||
}
|
||||
|
||||
public enum Op
|
||||
{
|
||||
OpNop = 0,
|
||||
OpUndef = 1,
|
||||
OpSourceContinued = 2,
|
||||
OpSource = 3,
|
||||
OpSourceExtension = 4,
|
||||
OpName = 5,
|
||||
OpMemberName = 6,
|
||||
OpString = 7,
|
||||
OpLine = 8,
|
||||
OpExtension = 10,
|
||||
OpExtInstImport = 11,
|
||||
OpExtInst = 12,
|
||||
OpMemoryModel = 14,
|
||||
OpEntryPoint = 15,
|
||||
OpExecutionMode = 16,
|
||||
OpCapability = 17,
|
||||
OpTypeVoid = 19,
|
||||
OpTypeBool = 20,
|
||||
OpTypeInt = 21,
|
||||
OpTypeFloat = 22,
|
||||
OpTypeVector = 23,
|
||||
OpTypeMatrix = 24,
|
||||
OpTypeImage = 25,
|
||||
OpTypeSampler = 26,
|
||||
OpTypeSampledImage = 27,
|
||||
OpTypeArray = 28,
|
||||
OpTypeRuntimeArray = 29,
|
||||
OpTypeStruct = 30,
|
||||
OpTypeOpaque = 31,
|
||||
OpTypePointer = 32,
|
||||
OpTypeFunction = 33,
|
||||
OpTypeEvent = 34,
|
||||
OpTypeDeviceEvent = 35,
|
||||
OpTypeReserveId = 36,
|
||||
OpTypeQueue = 37,
|
||||
OpTypePipe = 38,
|
||||
OpTypeForwardPointer = 39,
|
||||
OpConstantTrue = 41,
|
||||
OpConstantFalse = 42,
|
||||
OpConstant = 43,
|
||||
OpConstantComposite = 44,
|
||||
OpConstantSampler = 45,
|
||||
OpConstantNull = 46,
|
||||
OpSpecConstantTrue = 48,
|
||||
OpSpecConstantFalse = 49,
|
||||
OpSpecConstant = 50,
|
||||
OpSpecConstantComposite = 51,
|
||||
OpSpecConstantOp = 52,
|
||||
OpFunction = 54,
|
||||
OpFunctionParameter = 55,
|
||||
OpFunctionEnd = 56,
|
||||
OpFunctionCall = 57,
|
||||
OpVariable = 59,
|
||||
OpImageTexelPointer = 60,
|
||||
OpLoad = 61,
|
||||
OpStore = 62,
|
||||
OpCopyMemory = 63,
|
||||
OpCopyMemorySized = 64,
|
||||
OpAccessChain = 65,
|
||||
OpInBoundsAccessChain = 66,
|
||||
OpPtrAccessChain = 67,
|
||||
OpArrayLength = 68,
|
||||
OpGenericPtrMemSemantics = 69,
|
||||
OpInBoundsPtrAccessChain = 70,
|
||||
OpDecorate = 71,
|
||||
OpMemberDecorate = 72,
|
||||
OpDecorationGroup = 73,
|
||||
OpGroupDecorate = 74,
|
||||
OpGroupMemberDecorate = 75,
|
||||
OpVectorExtractDynamic = 77,
|
||||
OpVectorInsertDynamic = 78,
|
||||
OpVectorShuffle = 79,
|
||||
OpCompositeConstruct = 80,
|
||||
OpCompositeExtract = 81,
|
||||
OpCompositeInsert = 82,
|
||||
OpCopyObject = 83,
|
||||
OpTranspose = 84,
|
||||
OpSampledImage = 86,
|
||||
OpImageSampleImplicitLod = 87,
|
||||
OpImageSampleExplicitLod = 88,
|
||||
OpImageSampleDrefImplicitLod = 89,
|
||||
OpImageSampleDrefExplicitLod = 90,
|
||||
OpImageSampleProjImplicitLod = 91,
|
||||
OpImageSampleProjExplicitLod = 92,
|
||||
OpImageSampleProjDrefImplicitLod = 93,
|
||||
OpImageSampleProjDrefExplicitLod = 94,
|
||||
OpImageFetch = 95,
|
||||
OpImageGather = 96,
|
||||
OpImageDrefGather = 97,
|
||||
OpImageRead = 98,
|
||||
OpImageWrite = 99,
|
||||
OpImage = 100,
|
||||
OpImageQueryFormat = 101,
|
||||
OpImageQueryOrder = 102,
|
||||
OpImageQuerySizeLod = 103,
|
||||
OpImageQuerySize = 104,
|
||||
OpImageQueryLod = 105,
|
||||
OpImageQueryLevels = 106,
|
||||
OpImageQuerySamples = 107,
|
||||
OpConvertFToU = 109,
|
||||
OpConvertFToS = 110,
|
||||
OpConvertSToF = 111,
|
||||
OpConvertUToF = 112,
|
||||
OpUConvert = 113,
|
||||
OpSConvert = 114,
|
||||
OpFConvert = 115,
|
||||
OpQuantizeToF16 = 116,
|
||||
OpConvertPtrToU = 117,
|
||||
OpSatConvertSToU = 118,
|
||||
OpSatConvertUToS = 119,
|
||||
OpConvertUToPtr = 120,
|
||||
OpPtrCastToGeneric = 121,
|
||||
OpGenericCastToPtr = 122,
|
||||
OpGenericCastToPtrExplicit = 123,
|
||||
OpBitcast = 124,
|
||||
OpSNegate = 126,
|
||||
OpFNegate = 127,
|
||||
OpIAdd = 128,
|
||||
OpFAdd = 129,
|
||||
OpISub = 130,
|
||||
OpFSub = 131,
|
||||
OpIMul = 132,
|
||||
OpFMul = 133,
|
||||
OpUDiv = 134,
|
||||
OpSDiv = 135,
|
||||
OpFDiv = 136,
|
||||
OpUMod = 137,
|
||||
OpSRem = 138,
|
||||
OpSMod = 139,
|
||||
OpFRem = 140,
|
||||
OpFMod = 141,
|
||||
OpVectorTimesScalar = 142,
|
||||
OpMatrixTimesScalar = 143,
|
||||
OpVectorTimesMatrix = 144,
|
||||
OpMatrixTimesVector = 145,
|
||||
OpMatrixTimesMatrix = 146,
|
||||
OpOuterProduct = 147,
|
||||
OpDot = 148,
|
||||
OpIAddCarry = 149,
|
||||
OpISubBorrow = 150,
|
||||
OpUMulExtended = 151,
|
||||
OpSMulExtended = 152,
|
||||
OpAny = 154,
|
||||
OpAll = 155,
|
||||
OpIsNan = 156,
|
||||
OpIsInf = 157,
|
||||
OpIsFinite = 158,
|
||||
OpIsNormal = 159,
|
||||
OpSignBitSet = 160,
|
||||
OpLessOrGreater = 161,
|
||||
OpOrdered = 162,
|
||||
OpUnordered = 163,
|
||||
OpLogicalEqual = 164,
|
||||
OpLogicalNotEqual = 165,
|
||||
OpLogicalOr = 166,
|
||||
OpLogicalAnd = 167,
|
||||
OpLogicalNot = 168,
|
||||
OpSelect = 169,
|
||||
OpIEqual = 170,
|
||||
OpINotEqual = 171,
|
||||
OpUGreaterThan = 172,
|
||||
OpSGreaterThan = 173,
|
||||
OpUGreaterThanEqual = 174,
|
||||
OpSGreaterThanEqual = 175,
|
||||
OpULessThan = 176,
|
||||
OpSLessThan = 177,
|
||||
OpULessThanEqual = 178,
|
||||
OpSLessThanEqual = 179,
|
||||
OpFOrdEqual = 180,
|
||||
OpFUnordEqual = 181,
|
||||
OpFOrdNotEqual = 182,
|
||||
OpFUnordNotEqual = 183,
|
||||
OpFOrdLessThan = 184,
|
||||
OpFUnordLessThan = 185,
|
||||
OpFOrdGreaterThan = 186,
|
||||
OpFUnordGreaterThan = 187,
|
||||
OpFOrdLessThanEqual = 188,
|
||||
OpFUnordLessThanEqual = 189,
|
||||
OpFOrdGreaterThanEqual = 190,
|
||||
OpFUnordGreaterThanEqual = 191,
|
||||
OpShiftRightLogical = 194,
|
||||
OpShiftRightArithmetic = 195,
|
||||
OpShiftLeftLogical = 196,
|
||||
OpBitwiseOr = 197,
|
||||
OpBitwiseXor = 198,
|
||||
OpBitwiseAnd = 199,
|
||||
OpNot = 200,
|
||||
OpBitFieldInsert = 201,
|
||||
OpBitFieldSExtract = 202,
|
||||
OpBitFieldUExtract = 203,
|
||||
OpBitReverse = 204,
|
||||
OpBitCount = 205,
|
||||
OpDPdx = 207,
|
||||
OpDPdy = 208,
|
||||
OpFwidth = 209,
|
||||
OpDPdxFine = 210,
|
||||
OpDPdyFine = 211,
|
||||
OpFwidthFine = 212,
|
||||
OpDPdxCoarse = 213,
|
||||
OpDPdyCoarse = 214,
|
||||
OpFwidthCoarse = 215,
|
||||
OpEmitVertex = 218,
|
||||
OpEndPrimitive = 219,
|
||||
OpEmitStreamVertex = 220,
|
||||
OpEndStreamPrimitive = 221,
|
||||
OpControlBarrier = 224,
|
||||
OpMemoryBarrier = 225,
|
||||
OpAtomicLoad = 227,
|
||||
OpAtomicStore = 228,
|
||||
OpAtomicExchange = 229,
|
||||
OpAtomicCompareExchange = 230,
|
||||
OpAtomicCompareExchangeWeak = 231,
|
||||
OpAtomicIIncrement = 232,
|
||||
OpAtomicIDecrement = 233,
|
||||
OpAtomicIAdd = 234,
|
||||
OpAtomicISub = 235,
|
||||
OpAtomicSMin = 236,
|
||||
OpAtomicUMin = 237,
|
||||
OpAtomicSMax = 238,
|
||||
OpAtomicUMax = 239,
|
||||
OpAtomicAnd = 240,
|
||||
OpAtomicOr = 241,
|
||||
OpAtomicXor = 242,
|
||||
OpPhi = 245,
|
||||
OpLoopMerge = 246,
|
||||
OpSelectionMerge = 247,
|
||||
OpLabel = 248,
|
||||
OpBranch = 249,
|
||||
OpBranchConditional = 250,
|
||||
OpSwitch = 251,
|
||||
OpKill = 252,
|
||||
OpReturn = 253,
|
||||
OpReturnValue = 254,
|
||||
OpUnreachable = 255,
|
||||
OpLifetimeStart = 256,
|
||||
OpLifetimeStop = 257,
|
||||
OpGroupAsyncCopy = 259,
|
||||
OpGroupWaitEvents = 260,
|
||||
OpGroupAll = 261,
|
||||
OpGroupAny = 262,
|
||||
OpGroupBroadcast = 263,
|
||||
OpGroupIAdd = 264,
|
||||
OpGroupFAdd = 265,
|
||||
OpGroupFMin = 266,
|
||||
OpGroupUMin = 267,
|
||||
OpGroupSMin = 268,
|
||||
OpGroupFMax = 269,
|
||||
OpGroupUMax = 270,
|
||||
OpGroupSMax = 271,
|
||||
OpReadPipe = 274,
|
||||
OpWritePipe = 275,
|
||||
OpReservedReadPipe = 276,
|
||||
OpReservedWritePipe = 277,
|
||||
OpReserveReadPipePackets = 278,
|
||||
OpReserveWritePipePackets = 279,
|
||||
OpCommitReadPipe = 280,
|
||||
OpCommitWritePipe = 281,
|
||||
OpIsValidReserveId = 282,
|
||||
OpGetNumPipePackets = 283,
|
||||
OpGetMaxPipePackets = 284,
|
||||
OpGroupReserveReadPipePackets = 285,
|
||||
OpGroupReserveWritePipePackets = 286,
|
||||
OpGroupCommitReadPipe = 287,
|
||||
OpGroupCommitWritePipe = 288,
|
||||
OpEnqueueMarker = 291,
|
||||
OpEnqueueKernel = 292,
|
||||
OpGetKernelNDrangeSubGroupCount = 293,
|
||||
OpGetKernelNDrangeMaxSubGroupSize = 294,
|
||||
OpGetKernelWorkGroupSize = 295,
|
||||
OpGetKernelPreferredWorkGroupSizeMultiple = 296,
|
||||
OpRetainEvent = 297,
|
||||
OpReleaseEvent = 298,
|
||||
OpCreateUserEvent = 299,
|
||||
OpIsValidEvent = 300,
|
||||
OpSetUserEventStatus = 301,
|
||||
OpCaptureEventProfilingInfo = 302,
|
||||
OpGetDefaultQueue = 303,
|
||||
OpBuildNDRange = 304,
|
||||
OpImageSparseSampleImplicitLod = 305,
|
||||
OpImageSparseSampleExplicitLod = 306,
|
||||
OpImageSparseSampleDrefImplicitLod = 307,
|
||||
OpImageSparseSampleDrefExplicitLod = 308,
|
||||
OpImageSparseSampleProjImplicitLod = 309,
|
||||
OpImageSparseSampleProjExplicitLod = 310,
|
||||
OpImageSparseSampleProjDrefImplicitLod = 311,
|
||||
OpImageSparseSampleProjDrefExplicitLod = 312,
|
||||
OpImageSparseFetch = 313,
|
||||
OpImageSparseGather = 314,
|
||||
OpImageSparseDrefGather = 315,
|
||||
OpImageSparseTexelsResident = 316,
|
||||
OpNoLine = 317,
|
||||
OpAtomicFlagTestAndSet = 318,
|
||||
OpAtomicFlagClear = 319,
|
||||
OpImageSparseRead = 320,
|
||||
OpDecorateId = 332,
|
||||
OpSubgroupBallotKHR = 4421,
|
||||
OpSubgroupFirstInvocationKHR = 4422,
|
||||
OpSubgroupAllKHR = 4428,
|
||||
OpSubgroupAnyKHR = 4429,
|
||||
OpSubgroupAllEqualKHR = 4430,
|
||||
OpSubgroupReadInvocationKHR = 4432,
|
||||
OpGroupIAddNonUniformAMD = 5000,
|
||||
OpGroupFAddNonUniformAMD = 5001,
|
||||
OpGroupFMinNonUniformAMD = 5002,
|
||||
OpGroupUMinNonUniformAMD = 5003,
|
||||
OpGroupSMinNonUniformAMD = 5004,
|
||||
OpGroupFMaxNonUniformAMD = 5005,
|
||||
OpGroupUMaxNonUniformAMD = 5006,
|
||||
OpGroupSMaxNonUniformAMD = 5007,
|
||||
OpFragmentMaskFetchAMD = 5011,
|
||||
OpFragmentFetchAMD = 5012,
|
||||
OpSubgroupShuffleINTEL = 5571,
|
||||
OpSubgroupShuffleDownINTEL = 5572,
|
||||
OpSubgroupShuffleUpINTEL = 5573,
|
||||
OpSubgroupShuffleXorINTEL = 5574,
|
||||
OpSubgroupBlockReadINTEL = 5575,
|
||||
OpSubgroupBlockWriteINTEL = 5576,
|
||||
OpSubgroupImageBlockReadINTEL = 5577,
|
||||
OpSubgroupImageBlockWriteINTEL = 5578,
|
||||
OpDecorateStringGOOGLE = 5632,
|
||||
OpMemberDecorateStringGOOGLE = 5633,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
1015
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/spirv.cs
vendored
Executable file
1015
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/spirv.cs
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1021
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/spirv.cs
vendored
Executable file
1021
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/spirv.cs
vendored
Executable file
File diff suppressed because it is too large
Load Diff
@@ -23,10 +23,11 @@
|
||||
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
-->
|
||||
<!--
|
||||
This file, spir-v.xml, is the SPIR-V Tool ID and Opcode registry. The
|
||||
canonical version of the registry, together with related schema and
|
||||
This file, spir-v.xml, is the SPIR-V Tool ID, opcode and enumerant registry.
|
||||
The canonical version of the registry, together with related schema and
|
||||
documentation, can be found in the Khronos Registry at
|
||||
http://www.khronos.org/registry/spir-v/
|
||||
include/spirv/spir-v.xml in the master branch at
|
||||
https://github.com/KhronosGroup/SPIRV-Headers
|
||||
-->
|
||||
|
||||
<!-- SECTION: SPIR-V Tool ID Definitions -->
|
||||
@@ -52,7 +53,7 @@
|
||||
<id value="0" vendor="Khronos" comment="Reserved by Khronos"/>
|
||||
<id value="1" vendor="LunarG" comment="Contact TBD"/>
|
||||
<id value="2" vendor="Valve" comment="Contact TBD"/>
|
||||
<id value="3" vendor="Codeplay" comment="Contact Neil Henning, neil@codeplay.com"/>
|
||||
<id value="3" vendor="Codeplay" comment="Contact Victor Lomuller, victor@codeplay.com"/>
|
||||
<id value="4" vendor="NVIDIA" comment="Contact Kerch Holt, kholt@nvidia.com"/>
|
||||
<id value="5" vendor="ARM" comment="Contact Alexander Galazin, alexander.galazin@arm.com"/>
|
||||
<id value="6" vendor="Khronos" tool="LLVM/SPIR-V Translator" comment="Contact Yaxun (Sam) Liu, yaxun.liu@amd.com"/>
|
||||
@@ -69,13 +70,102 @@
|
||||
<id value="17" vendor="Khronos" tool="SPIR-V Tools Linker" comment="Contact David Neto, dneto@google.com"/>
|
||||
<id value="18" vendor="Wine" tool="VKD3D Shader Compiler" comment="Contact wine-devel@winehq.org"/>
|
||||
<id value="19" vendor="Clay" tool="Clay Shader Compiler" comment="Contact info@clayengine.com"/>
|
||||
<unused start="20" end="0xFFFF" comment="Tool ID range reservable for future use by vendors"/>
|
||||
<id value="20" vendor="W3C WebGPU Group" tool="WHLSL Shader Translator" comment="https://github.com/gpuweb/WHLSL"/>
|
||||
<id value="21" vendor="Google" tool="Clspv" comment="Contact David Neto, dneto@google.com"/>
|
||||
<id value="22" vendor="Google" tool="MLIR SPIR-V Serializer" comment="Contact Lei Zhang, antiagainst@google.com"/>
|
||||
<id value="23" vendor="Google" tool="Tint Compiler" comment="Contact David Neto, dneto@google.com"/>
|
||||
<id value="24" vendor="Google" tool="ANGLE Shader Compiler" comment="Contact Shahbaz Youssefi, syoussefi@google.com"/>
|
||||
<id value="25" vendor="Netease Games" tool="Messiah Shader Compiler" comment="Contact Yuwen Wu, atyuwen@gmail.com"/>
|
||||
<id value="26" vendor="Xenia" tool="Xenia Emulator Microcode Translator" comment="Contact Vitaliy Kuzmin, triang3l@yandex.ru, https://github.com/xenia-project/xenia"/>
|
||||
<id value="27" vendor="Embark Studios" tool="Rust GPU Compiler Backend" comment="https://github.com/embarkstudios/rust-gpu"/>
|
||||
<unused start="28" end="0xFFFF" comment="Tool ID range reservable for future use by vendors"/>
|
||||
</ids>
|
||||
|
||||
<!-- SECTION: SPIR-V Opcodes and Enumerants -->
|
||||
<!-- Reserve new ranges for vendors in contiguous blocks of 64
|
||||
preceding the "Future use" block below, and modify that block
|
||||
accordingly.
|
||||
|
||||
<!-- Vendors reserve new ranges of:
|
||||
- opcode enumerants in the "opcode" list below, and
|
||||
- non-opcode enumerants in the non-opcodes "enumerant" list below.
|
||||
Both are reserved by contiguous blocks of 64, preceding the given
|
||||
"Future use" blocks.
|
||||
|
||||
SPIR-V background:
|
||||
- SPIR-V currently has well over 30 enums, including the opcode enum
|
||||
- each enum has its own name space, allowing reuse of enumerants
|
||||
- SPIR-V restricts opcode enumerants to 16 bits
|
||||
- all other enums use 32-bit enumerants
|
||||
|
||||
Reservation rules:
|
||||
- opcode reservations ("opcode") are only valid for opcodes
|
||||
- non-opcode reservations ("enumerant") are not valid for opcodes
|
||||
- reservations in the enumerant list are valid for all non-opcode enums
|
||||
- it is simpler to use each non-opcode enumerant for only one purpose
|
||||
but this is left to the discretion of the vendor
|
||||
- all enumerants in a range should be used before allocating a new range
|
||||
(several extensions can use enumerants from the same range)
|
||||
|
||||
Each vendor determines the use of enumerants in the ranges they
|
||||
reserve. Vendors are not required to disclose those uses. If the use
|
||||
of an enumerant is included in an extension that is adopted by a Khronos
|
||||
extension or specification, then that enumerant's use may be permanently
|
||||
fixed as if originally reserved in a Khronos range.
|
||||
|
||||
-->
|
||||
|
||||
<!-- Begin reservations of opcode enumerants -->
|
||||
<ids type="opcode" start="0" end="4095" vendor="Khronos" comment="Reserved opcodes, not available to vendors - see the SPIR-V Specification"/>
|
||||
<ids type="opcode" start="4096" end="4159" vendor="Mesa" comment="Contact TBD"/>
|
||||
<ids type="opcode" start="4160" end="4415" vendor="ARM"/>
|
||||
<ids type="opcode" start="4416" end="4479" vendor="Khronos" comment="SPV_ARB_shader_ballot - contact Neil Henning, neil.henning@amd.com"/>
|
||||
<ids type="opcode" start="4480" end="4991" vendor="Qualcomm" comment="Contact weifengz@qti.qualcomm.com"/>
|
||||
<ids type="opcode" start="4992" end="5247" vendor="AMD"/>
|
||||
<ids type="opcode" start="5248" end="5503" vendor="NVIDIA"/>
|
||||
<ids type="opcode" start="5504" end="5567" vendor="Imagination"/>
|
||||
<ids type="opcode" start="5568" end="5631" vendor="Intel" comment="Contact ben.ashbaugh@intel.com"/>
|
||||
<ids type="opcode" start="5632" end="5695" vendor="Google" comment="Contact dneto@google.com"/>
|
||||
<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"/>
|
||||
<ids type="opcode" start="6080" end="6143" vendor="Intel" comment="Contact mariusz.merecki@intel.com"/>
|
||||
<!-- Opcode enumerants to reserve 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
|
||||
sure to fill in the vendor attribute, and preferably add a contact
|
||||
person/address in a comment attribute. -->
|
||||
<!-- Example new block: <ids type="opcode" start="XXXX" end="XXXX+64n-1" vendor="Add vendor" comment="Contact TBD"/> -->
|
||||
<ids type="opcode" start="6144" end="65535" comment="Opcode range reservable for future use by vendors"/>
|
||||
<!-- End reservations of opcodes -->
|
||||
|
||||
|
||||
<!-- Begin reservations of non-opcode enumerants -->
|
||||
<ids type="enumerant" start="0" end="4095" vendor="Khronos" comment="Reserved enumerants, not available to vendors - see the SPIR-V Specification"/>
|
||||
<ids type="enumerant" start="4096" end="4159" vendor="Mesa" comment="Contact TBD"/>
|
||||
<ids type="enumerant" start="4160" end="4415" vendor="ARM"/>
|
||||
<ids type="enumerant" start="4416" end="4479" vendor="Khronos" comment="SPV_ARB_shader_ballot - contact Neil Henning, neil.henning@amd.com"/>
|
||||
<ids type="enumerant" start="4480" end="4991" vendor="Qualcomm" comment="Contact weifengz@qti.qualcomm.com"/>
|
||||
<ids type="enumerant" start="4992" end="5247" vendor="AMD"/>
|
||||
<ids type="enumerant" start="5248" end="5503" vendor="NVIDIA"/>
|
||||
<ids type="enumerant" start="5504" end="5567" vendor="Imagination"/>
|
||||
<ids type="enumerant" start="5568" end="5631" vendor="Intel" comment="Contact ben.ashbaugh@intel.com"/>
|
||||
<ids type="enumerant" start="5632" end="5695" vendor="Google" comment="Contact dneto@google.com"/>
|
||||
<ids type="enumerant" start="5696" end="5823" vendor="Intel" comment="Contact ben.ashbaugh@intel.com"/>
|
||||
<ids type="enumerant" start="5824" end="5951" vendor="Intel" comment="Contact michael.kinsner@intel.com"/>
|
||||
<ids type="enumerant" start="5952" end="6015" vendor="Codeplay" comment="Contact victor@codeplay.com"/>
|
||||
<ids type="enumerant" start="6016" end="6079" vendor="Khronos" comment="Contact @tobski"/>
|
||||
<ids type="enumerant" start="6080" end="6143" vendor="Intel" comment="Contact mariusz.merecki@intel.com"/>
|
||||
<!-- Enumerants to reserve 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
|
||||
sure to fill in the vendor attribute, and preferably add a contact
|
||||
person/address in a comment attribute. -->
|
||||
<!-- Example new block: <ids type="enumerant" start="XXXX" end="XXXX+64n-1" vendor="Add vendor" comment="Contact TBD"/> -->
|
||||
<ids type="enumerant" start="6144" end="4294967295" comment="Enumerant range reservable for future use by vendors"/>
|
||||
<!-- End reservations of enumerants -->
|
||||
|
||||
|
||||
<!-- SECTION: SPIR-V Loop Control Bit Reservations -->
|
||||
<!-- Reserve ranges of bits in the loop control bitfield.
|
||||
|
||||
Each vendor determines the use of values in their own ranges.
|
||||
Vendors are not required to disclose those uses. If the use of a
|
||||
@@ -86,34 +176,51 @@
|
||||
The SPIR Working Group strongly recommends:
|
||||
- Each value is used for only one purpose.
|
||||
- All values in a range should be used before allocating a new range.
|
||||
For example, to avoid unused gaps in ranges, it is customary for
|
||||
several extensions to use values from the same range.
|
||||
|
||||
The Id type "enum" is a synonym for "opcode".
|
||||
|
||||
Note that SPIR-V restricts opcode values to 16 bits.
|
||||
-->
|
||||
|
||||
<!-- Reserved opcode & enumerant blocks -->
|
||||
<ids type="opcode" start="0" end="4095" vendor="Khronos" comment="Reserved opcodes, not available to vendors - see the SPIR-V Specification"/>
|
||||
<ids type="opcode" start="4096" end="4159" vendor="Mesa" comment="Contact TBD"/>
|
||||
<ids type="opcode" start="4160" end="4415" vendor="ARM"/>
|
||||
<ids type="opcode" start="4416" end="4479" vendor="Khronos" comment="SPV_ARB_shader_ballot - contact Neil Henning, neil@codeplay.com"/>
|
||||
<ids type="opcode" start="4480" end="4991" vendor="Qualcomm" comment="Contact weifengz@qti.qualcomm.com"/>
|
||||
<ids type="opcode" start="4992" end="5247" vendor="AMD"/>
|
||||
<ids type="opcode" start="5248" end="5503" vendor="NVIDIA"/>
|
||||
<ids type="opcode" start="5504" end="5567" vendor="Imagination"/>
|
||||
<ids type="opcode" start="5568" end="5631" vendor="Intel" comment="Contact ben.ashbaugh@intel.com"/>
|
||||
<ids type="opcode" start="5632" end="5695" vendor="Google" comment="Contact dneto@google.com"/>
|
||||
<ids type="opcode" start="5696" end="5823" vendor="Intel" comment="Contact ben.ashbaugh@intel.com"/>
|
||||
<!-- 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
|
||||
sure to fill in the vendor attribute, and preferably add a contact
|
||||
person/address in a comment attribute. -->
|
||||
<!-- 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="23" vendor="Intel" comment="Contact michael.kinsner@intel.com"/>
|
||||
<ids type="LoopControl" start="24" 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"/>
|
||||
|
||||
<!-- Example new block: <ids type="opcode" start="XXXX" end="XXXX+64n-1" vendor="Add vendor" comment="Contact TBD"/> -->
|
||||
|
||||
<ids type="opcode" start="5824" end="4294967295" comment="Opcode range reservable for future use by vendors"/>
|
||||
<!-- SECTION: SPIR-V Function Control Bit Reservations -->
|
||||
<!-- Reserve ranges of bits in the function control bitfield.
|
||||
|
||||
Each vendor determines the use of values in their own ranges.
|
||||
Vendors are not required to disclose those uses. If the use of a
|
||||
value is included in an extension that is adopted by a Khronos
|
||||
extension or specification, then that value's use may be permanently
|
||||
fixed as if originally reserved in a Khronos range.
|
||||
|
||||
The SPIR Working Group strongly recommends:
|
||||
- Each value is used for only one purpose.
|
||||
- All values in a range should be used before allocating a new range.
|
||||
-->
|
||||
|
||||
<!-- Reserved function control bits -->
|
||||
<ids type="FunctionControl" start="0" end="15" vendor="Khronos" comment="Reserved FunctionControl bits, not available to vendors - see the SPIR-V Specification"/>
|
||||
<ids type="FunctionControl" start="16" end="16" vendor="Intel" comment="Contact ben.ashbaugh@intel.com"/>
|
||||
<ids type="FunctionControl" start="17" end="30" comment="Unreserved bits reservable for use by vendors"/>
|
||||
<ids type="FunctionControl" start="31" end="31" vendor="Khronos" comment="Reserved FunctionControl bit, not available to vendors"/>
|
||||
|
||||
|
||||
<!-- SECTION: SPIR-V FP Fast Math Mode Bit Reservations -->
|
||||
<!-- Reserve ranges of bits in the "FP Fast Math Mode" bitfield.
|
||||
Each vendor determines the use of values in their own ranges.
|
||||
Vendors are not required to disclose those uses. If the use of a
|
||||
value is included in an extension that is adopted by a Khronos
|
||||
extension or specification, then that value's use may be permanently
|
||||
fixed as if originally reserved in a Khronos range.
|
||||
The SPIR Working Group strongly recommends:
|
||||
- Each value is used for only one purpose.
|
||||
- All values in a range should be used before allocating a new range.
|
||||
-->
|
||||
|
||||
<!-- Reserved FP fast math mode bits -->
|
||||
<ids type="FPFastMathMode" start="0" end="15" vendor="Khronos" comment="Reserved FPFastMathMode bits, not available to vendors - see the SPIR-V Specification"/>
|
||||
<ids type="FPFastMathMode" start="16" end="17" vendor="Intel" comment="Contact michael.kinsner@intel.com"/>
|
||||
<ids type="FPFastMathMode" start="18" end="31" comment="Unreserved bits reservable for use by vendors"/>
|
||||
|
||||
</registry>
|
||||
|
52
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/AMD_gcn_shader.h
vendored
Executable file
52
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/AMD_gcn_shader.h
vendored
Executable file
@@ -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_
|
53
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/AMD_shader_ballot.h
vendored
Executable file
53
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/AMD_shader_ballot.h
vendored
Executable file
@@ -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_
|
50
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/AMD_shader_explicit_vertex_parameter.h
vendored
Executable file
50
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/AMD_shader_explicit_vertex_parameter.h
vendored
Executable file
@@ -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_
|
58
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/AMD_shader_trinary_minmax.h
vendored
Executable file
58
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/AMD_shader_trinary_minmax.h
vendored
Executable file
@@ -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_
|
144
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/DebugInfo.h
vendored
Executable file
144
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/DebugInfo.h
vendored
Executable file
@@ -0,0 +1,144 @@
|
||||
// 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 {
|
||||
DebugInfoNone = 0x0000,
|
||||
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_
|
73
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/NonSemanticClspvReflection.h
vendored
Executable file
73
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/NonSemanticClspvReflection.h
vendored
Executable file
@@ -0,0 +1,73 @@
|
||||
// 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_NonSemanticClspvReflection_H_
|
||||
#define SPIRV_UNIFIED1_NonSemanticClspvReflection_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum {
|
||||
NonSemanticClspvReflectionRevision = 1,
|
||||
NonSemanticClspvReflectionRevision_BitWidthPadding = 0x7fffffff
|
||||
};
|
||||
|
||||
enum NonSemanticClspvReflectionInstructions {
|
||||
NonSemanticClspvReflectionKernel = 1,
|
||||
NonSemanticClspvReflectionArgumentInfo = 2,
|
||||
NonSemanticClspvReflectionArgumentStorageBuffer = 3,
|
||||
NonSemanticClspvReflectionArgumentUniform = 4,
|
||||
NonSemanticClspvReflectionArgumentPodStorageBuffer = 5,
|
||||
NonSemanticClspvReflectionArgumentPodUniform = 6,
|
||||
NonSemanticClspvReflectionArgumentPodPushConstant = 7,
|
||||
NonSemanticClspvReflectionArgumentSampledImage = 8,
|
||||
NonSemanticClspvReflectionArgumentStorageImage = 9,
|
||||
NonSemanticClspvReflectionArgumentSampler = 10,
|
||||
NonSemanticClspvReflectionArgumentWorkgroup = 11,
|
||||
NonSemanticClspvReflectionSpecConstantWorkgroupSize = 12,
|
||||
NonSemanticClspvReflectionSpecConstantGlobalOffset = 13,
|
||||
NonSemanticClspvReflectionSpecConstantWorkDim = 14,
|
||||
NonSemanticClspvReflectionPushConstantGlobalOffset = 15,
|
||||
NonSemanticClspvReflectionPushConstantEnqueuedLocalSize = 16,
|
||||
NonSemanticClspvReflectionPushConstantGlobalSize = 17,
|
||||
NonSemanticClspvReflectionPushConstantRegionOffset = 18,
|
||||
NonSemanticClspvReflectionPushConstantNumWorkgroups = 19,
|
||||
NonSemanticClspvReflectionPushConstantRegionGroupOffset = 20,
|
||||
NonSemanticClspvReflectionConstantDataStorageBuffer = 21,
|
||||
NonSemanticClspvReflectionConstantDataUniform = 22,
|
||||
NonSemanticClspvReflectionLiteralSampler = 23,
|
||||
NonSemanticClspvReflectionPropertyRequiredWorkgroupSize = 24,
|
||||
NonSemanticClspvReflectionInstructionsMax = 0x7fffffff
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // SPIRV_UNIFIED1_NonSemanticClspvReflection_H_
|
50
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/NonSemanticDebugPrintf.h
vendored
Executable file
50
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/NonSemanticDebugPrintf.h
vendored
Executable file
@@ -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_
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** Copyright (c) 2015-2017 The Khronos Group Inc.
|
||||
** Copyright (c) 2015-2019 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"),
|
||||
@@ -27,6 +27,7 @@
|
||||
#ifndef OPENCLstd_H
|
||||
#define OPENCLstd_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
namespace OpenCLLIB {
|
||||
|
||||
enum Entrypoints {
|
||||
@@ -212,4 +213,189 @@ enum Entrypoints {
|
||||
|
||||
} // end namespace OpenCLLIB
|
||||
|
||||
#else
|
||||
|
||||
enum OpenCLstd_Entrypoints {
|
||||
|
||||
// Section 2.1: Math extended instructions
|
||||
OpenCLstd_Acos = 0,
|
||||
OpenCLstd_Acosh = 1,
|
||||
OpenCLstd_Acospi = 2,
|
||||
OpenCLstd_Asin = 3,
|
||||
OpenCLstd_Asinh = 4,
|
||||
OpenCLstd_Asinpi = 5,
|
||||
OpenCLstd_Atan = 6,
|
||||
OpenCLstd_Atan2 = 7,
|
||||
OpenCLstd_Atanh = 8,
|
||||
OpenCLstd_Atanpi = 9,
|
||||
OpenCLstd_Atan2pi = 10,
|
||||
OpenCLstd_Cbrt = 11,
|
||||
OpenCLstd_Ceil = 12,
|
||||
OpenCLstd_Copysign = 13,
|
||||
OpenCLstd_Cos = 14,
|
||||
OpenCLstd_Cosh = 15,
|
||||
OpenCLstd_Cospi = 16,
|
||||
OpenCLstd_Erfc = 17,
|
||||
OpenCLstd_Erf = 18,
|
||||
OpenCLstd_Exp = 19,
|
||||
OpenCLstd_Exp2 = 20,
|
||||
OpenCLstd_Exp10 = 21,
|
||||
OpenCLstd_Expm1 = 22,
|
||||
OpenCLstd_Fabs = 23,
|
||||
OpenCLstd_Fdim = 24,
|
||||
OpenCLstd_Floor = 25,
|
||||
OpenCLstd_Fma = 26,
|
||||
OpenCLstd_Fmax = 27,
|
||||
OpenCLstd_Fmin = 28,
|
||||
OpenCLstd_Fmod = 29,
|
||||
OpenCLstd_Fract = 30,
|
||||
OpenCLstd_Frexp = 31,
|
||||
OpenCLstd_Hypot = 32,
|
||||
OpenCLstd_Ilogb = 33,
|
||||
OpenCLstd_Ldexp = 34,
|
||||
OpenCLstd_Lgamma = 35,
|
||||
OpenCLstd_Lgamma_r = 36,
|
||||
OpenCLstd_Log = 37,
|
||||
OpenCLstd_Log2 = 38,
|
||||
OpenCLstd_Log10 = 39,
|
||||
OpenCLstd_Log1p = 40,
|
||||
OpenCLstd_Logb = 41,
|
||||
OpenCLstd_Mad = 42,
|
||||
OpenCLstd_Maxmag = 43,
|
||||
OpenCLstd_Minmag = 44,
|
||||
OpenCLstd_Modf = 45,
|
||||
OpenCLstd_Nan = 46,
|
||||
OpenCLstd_Nextafter = 47,
|
||||
OpenCLstd_Pow = 48,
|
||||
OpenCLstd_Pown = 49,
|
||||
OpenCLstd_Powr = 50,
|
||||
OpenCLstd_Remainder = 51,
|
||||
OpenCLstd_Remquo = 52,
|
||||
OpenCLstd_Rint = 53,
|
||||
OpenCLstd_Rootn = 54,
|
||||
OpenCLstd_Round = 55,
|
||||
OpenCLstd_Rsqrt = 56,
|
||||
OpenCLstd_Sin = 57,
|
||||
OpenCLstd_Sincos = 58,
|
||||
OpenCLstd_Sinh = 59,
|
||||
OpenCLstd_Sinpi = 60,
|
||||
OpenCLstd_Sqrt = 61,
|
||||
OpenCLstd_Tan = 62,
|
||||
OpenCLstd_Tanh = 63,
|
||||
OpenCLstd_Tanpi = 64,
|
||||
OpenCLstd_Tgamma = 65,
|
||||
OpenCLstd_Trunc = 66,
|
||||
OpenCLstd_Half_cos = 67,
|
||||
OpenCLstd_Half_divide = 68,
|
||||
OpenCLstd_Half_exp = 69,
|
||||
OpenCLstd_Half_exp2 = 70,
|
||||
OpenCLstd_Half_exp10 = 71,
|
||||
OpenCLstd_Half_log = 72,
|
||||
OpenCLstd_Half_log2 = 73,
|
||||
OpenCLstd_Half_log10 = 74,
|
||||
OpenCLstd_Half_powr = 75,
|
||||
OpenCLstd_Half_recip = 76,
|
||||
OpenCLstd_Half_rsqrt = 77,
|
||||
OpenCLstd_Half_sin = 78,
|
||||
OpenCLstd_Half_sqrt = 79,
|
||||
OpenCLstd_Half_tan = 80,
|
||||
OpenCLstd_Native_cos = 81,
|
||||
OpenCLstd_Native_divide = 82,
|
||||
OpenCLstd_Native_exp = 83,
|
||||
OpenCLstd_Native_exp2 = 84,
|
||||
OpenCLstd_Native_exp10 = 85,
|
||||
OpenCLstd_Native_log = 86,
|
||||
OpenCLstd_Native_log2 = 87,
|
||||
OpenCLstd_Native_log10 = 88,
|
||||
OpenCLstd_Native_powr = 89,
|
||||
OpenCLstd_Native_recip = 90,
|
||||
OpenCLstd_Native_rsqrt = 91,
|
||||
OpenCLstd_Native_sin = 92,
|
||||
OpenCLstd_Native_sqrt = 93,
|
||||
OpenCLstd_Native_tan = 94,
|
||||
|
||||
// Section 2.2: Integer instructions
|
||||
OpenCLstd_SAbs = 141,
|
||||
OpenCLstd_SAbs_diff = 142,
|
||||
OpenCLstd_SAdd_sat = 143,
|
||||
OpenCLstd_UAdd_sat = 144,
|
||||
OpenCLstd_SHadd = 145,
|
||||
OpenCLstd_UHadd = 146,
|
||||
OpenCLstd_SRhadd = 147,
|
||||
OpenCLstd_URhadd = 148,
|
||||
OpenCLstd_SClamp = 149,
|
||||
OpenCLstd_UClamp = 150,
|
||||
OpenCLstd_Clz = 151,
|
||||
OpenCLstd_Ctz = 152,
|
||||
OpenCLstd_SMad_hi = 153,
|
||||
OpenCLstd_UMad_sat = 154,
|
||||
OpenCLstd_SMad_sat = 155,
|
||||
OpenCLstd_SMax = 156,
|
||||
OpenCLstd_UMax = 157,
|
||||
OpenCLstd_SMin = 158,
|
||||
OpenCLstd_UMin = 159,
|
||||
OpenCLstd_SMul_hi = 160,
|
||||
OpenCLstd_Rotate = 161,
|
||||
OpenCLstd_SSub_sat = 162,
|
||||
OpenCLstd_USub_sat = 163,
|
||||
OpenCLstd_U_Upsample = 164,
|
||||
OpenCLstd_S_Upsample = 165,
|
||||
OpenCLstd_Popcount = 166,
|
||||
OpenCLstd_SMad24 = 167,
|
||||
OpenCLstd_UMad24 = 168,
|
||||
OpenCLstd_SMul24 = 169,
|
||||
OpenCLstd_UMul24 = 170,
|
||||
OpenCLstd_UAbs = 201,
|
||||
OpenCLstd_UAbs_diff = 202,
|
||||
OpenCLstd_UMul_hi = 203,
|
||||
OpenCLstd_UMad_hi = 204,
|
||||
|
||||
// Section 2.3: Common instructions
|
||||
OpenCLstd_FClamp = 95,
|
||||
OpenCLstd_Degrees = 96,
|
||||
OpenCLstd_FMax_common = 97,
|
||||
OpenCLstd_FMin_common = 98,
|
||||
OpenCLstd_Mix = 99,
|
||||
OpenCLstd_Radians = 100,
|
||||
OpenCLstd_Step = 101,
|
||||
OpenCLstd_Smoothstep = 102,
|
||||
OpenCLstd_Sign = 103,
|
||||
|
||||
// Section 2.4: Geometric instructions
|
||||
OpenCLstd_Cross = 104,
|
||||
OpenCLstd_Distance = 105,
|
||||
OpenCLstd_Length = 106,
|
||||
OpenCLstd_Normalize = 107,
|
||||
OpenCLstd_Fast_distance = 108,
|
||||
OpenCLstd_Fast_length = 109,
|
||||
OpenCLstd_Fast_normalize = 110,
|
||||
|
||||
// Section 2.5: Relational instructions
|
||||
OpenCLstd_Bitselect = 186,
|
||||
OpenCLstd_Select = 187,
|
||||
|
||||
// Section 2.6: Vector Data Load and Store instructions
|
||||
OpenCLstd_Vloadn = 171,
|
||||
OpenCLstd_Vstoren = 172,
|
||||
OpenCLstd_Vload_half = 173,
|
||||
OpenCLstd_Vload_halfn = 174,
|
||||
OpenCLstd_Vstore_half = 175,
|
||||
OpenCLstd_Vstore_half_r = 176,
|
||||
OpenCLstd_Vstore_halfn = 177,
|
||||
OpenCLstd_Vstore_halfn_r = 178,
|
||||
OpenCLstd_Vloada_halfn = 179,
|
||||
OpenCLstd_Vstorea_halfn = 180,
|
||||
OpenCLstd_Vstorea_halfn_r = 181,
|
||||
|
||||
// Section 2.7: Miscellaneous Vector instructions
|
||||
OpenCLstd_Shuffle = 182,
|
||||
OpenCLstd_Shuffle2 = 183,
|
||||
|
||||
// Section 2.8: Misc instructions
|
||||
OpenCLstd_Printf = 184,
|
||||
OpenCLstd_Prefetch = 185,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // #ifndef OPENCLstd_H
|
||||
|
157
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/OpenCLDebugInfo100.h
vendored
Executable file
157
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/OpenCLDebugInfo100.h
vendored
Executable file
@@ -0,0 +1,157 @@
|
||||
// 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 {
|
||||
OpenCLDebugInfo100None = 0x0000,
|
||||
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_
|
572
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/extinst.debuginfo.grammar.json
vendored
Executable file
572
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/extinst.debuginfo.grammar.json
vendored
Executable file
@@ -0,0 +1,572 @@
|
||||
{
|
||||
"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" : "None",
|
||||
"value" : "0x0000"
|
||||
},
|
||||
{
|
||||
"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" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
237
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/extinst.nonsemantic.clspvreflection.grammar.json
vendored
Executable file
237
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/extinst.nonsemantic.clspvreflection.grammar.json
vendored
Executable file
@@ -0,0 +1,237 @@
|
||||
{
|
||||
"revision" : 1,
|
||||
"instructions" : [
|
||||
{
|
||||
"opname" : "Kernel",
|
||||
"opcode" : 1,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "Kernel" },
|
||||
{ "kind" : "IdRef", "name" : "Name" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "ArgumentInfo",
|
||||
"opcode" : 2,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "Name" },
|
||||
{ "kind" : "IdRef", "name" : "Type Name", "quantifier" : "?" },
|
||||
{ "kind" : "IdRef", "name" : "Address Qualifier", "quantifier" : "?" },
|
||||
{ "kind" : "IdRef", "name" : "Access Qualifier", "quantifier" : "?" },
|
||||
{ "kind" : "IdRef", "name" : "Type Qualifier", "quantifier" : "?" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "ArgumentStorageBuffer",
|
||||
"opcode" : 3,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "Decl" },
|
||||
{ "kind" : "IdRef", "name" : "Ordinal" },
|
||||
{ "kind" : "IdRef", "name" : "DescriptorSet" },
|
||||
{ "kind" : "IdRef", "name" : "Binding" },
|
||||
{ "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "ArgumentUniform",
|
||||
"opcode" : 4,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "Decl" },
|
||||
{ "kind" : "IdRef", "name" : "Ordinal" },
|
||||
{ "kind" : "IdRef", "name" : "DescriptorSet" },
|
||||
{ "kind" : "IdRef", "name" : "Binding" },
|
||||
{ "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "ArgumentPodStorageBuffer",
|
||||
"opcode" : 5,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "Decl" },
|
||||
{ "kind" : "IdRef", "name" : "Ordinal" },
|
||||
{ "kind" : "IdRef", "name" : "DescriptorSet" },
|
||||
{ "kind" : "IdRef", "name" : "Binding" },
|
||||
{ "kind" : "IdRef", "name" : "Offset" },
|
||||
{ "kind" : "IdRef", "name" : "Size" },
|
||||
{ "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "ArgumentPodUniform",
|
||||
"opcode" : 6,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "Decl" },
|
||||
{ "kind" : "IdRef", "name" : "Ordinal" },
|
||||
{ "kind" : "IdRef", "name" : "DescriptorSet" },
|
||||
{ "kind" : "IdRef", "name" : "Binding" },
|
||||
{ "kind" : "IdRef", "name" : "Offset" },
|
||||
{ "kind" : "IdRef", "name" : "Size" },
|
||||
{ "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "ArgumentPodPushConstant",
|
||||
"opcode" : 7,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "Decl" },
|
||||
{ "kind" : "IdRef", "name" : "Ordinal" },
|
||||
{ "kind" : "IdRef", "name" : "Offset" },
|
||||
{ "kind" : "IdRef", "name" : "Size" },
|
||||
{ "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "ArgumentSampledImage",
|
||||
"opcode" : 8,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "Decl" },
|
||||
{ "kind" : "IdRef", "name" : "Ordinal" },
|
||||
{ "kind" : "IdRef", "name" : "DescriptorSet" },
|
||||
{ "kind" : "IdRef", "name" : "Binding" },
|
||||
{ "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "ArgumentStorageImage",
|
||||
"opcode" : 9,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "Decl" },
|
||||
{ "kind" : "IdRef", "name" : "Ordinal" },
|
||||
{ "kind" : "IdRef", "name" : "DescriptorSet" },
|
||||
{ "kind" : "IdRef", "name" : "Binding" },
|
||||
{ "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "ArgumentSampler",
|
||||
"opcode" : 10,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "Decl" },
|
||||
{ "kind" : "IdRef", "name" : "Ordinal" },
|
||||
{ "kind" : "IdRef", "name" : "DescriptorSet" },
|
||||
{ "kind" : "IdRef", "name" : "Binding" },
|
||||
{ "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "ArgumentWorkgroup",
|
||||
"opcode" : 11,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "Decl" },
|
||||
{ "kind" : "IdRef", "name" : "Ordinal" },
|
||||
{ "kind" : "IdRef", "name" : "SpecId" },
|
||||
{ "kind" : "IdRef", "name" : "ElemSize" },
|
||||
{ "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SpecConstantWorkgroupSize",
|
||||
"opcode" : 12,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "X" },
|
||||
{ "kind" : "IdRef", "name" : "Y" },
|
||||
{ "kind" : "IdRef", "name" : "Z" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SpecConstantGlobalOffset",
|
||||
"opcode" : 13,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "X" },
|
||||
{ "kind" : "IdRef", "name" : "Y" },
|
||||
{ "kind" : "IdRef", "name" : "Z" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SpecConstantWorkDim",
|
||||
"opcode" : 14,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "Dim" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PushConstantGlobalOffset",
|
||||
"opcode" : 15,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "Offset" },
|
||||
{ "kind" : "IdRef", "name" : "Size" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PushConstantEnqueuedLocalSize",
|
||||
"opcode" : 16,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "Offset" },
|
||||
{ "kind" : "IdRef", "name" : "Size" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PushConstantGlobalSize",
|
||||
"opcode" : 17,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "Offset" },
|
||||
{ "kind" : "IdRef", "name" : "Size" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PushConstantRegionOffset",
|
||||
"opcode" : 18,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "Offset" },
|
||||
{ "kind" : "IdRef", "name" : "Size" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PushConstantNumWorkgroups",
|
||||
"opcode" : 19,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "Offset" },
|
||||
{ "kind" : "IdRef", "name" : "Size" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PushConstantRegionGroupOffset",
|
||||
"opcode" : 20,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "Offset" },
|
||||
{ "kind" : "IdRef", "name" : "Size" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "ConstantDataStorageBuffer",
|
||||
"opcode" : 21,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "DescriptorSet" },
|
||||
{ "kind" : "IdRef", "name" : "Binding" },
|
||||
{ "kind" : "IdRef", "name" : "Data" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "ConstantDataUniform",
|
||||
"opcode" : 22,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "DescriptorSet" },
|
||||
{ "kind" : "IdRef", "name" : "Binding" },
|
||||
{ "kind" : "IdRef", "name" : "Data" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "LiteralSampler",
|
||||
"opcode" : 23,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "DescriptorSet" },
|
||||
{ "kind" : "IdRef", "name" : "Binding" },
|
||||
{ "kind" : "IdRef", "name" : "Mask" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PropertyRequiredWorkgroupSize",
|
||||
"opcode" : 24,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "Kernel" },
|
||||
{ "kind" : "IdRef", "name" : "X" },
|
||||
{ "kind" : "IdRef", "name" : "Y" },
|
||||
{ "kind" : "IdRef", "name" : "Z" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
13
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/extinst.nonsemantic.debugprintf.grammar.json
vendored
Executable file
13
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/extinst.nonsemantic.debugprintf.grammar.json
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"revision" : 1,
|
||||
"instructions" : [
|
||||
{
|
||||
"opname" : "DebugPrintf",
|
||||
"opcode" : 1,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'Format'" },
|
||||
{ "kind" : "IdRef", "quantifier" : "*" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
636
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json
vendored
Executable file
636
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json
vendored
Executable file
@@ -0,0 +1,636 @@
|
||||
{
|
||||
"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" : "None",
|
||||
"value" : "0x0000"
|
||||
},
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
26
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/extinst.spv-amd-gcn-shader.grammar.json
vendored
Executable file
26
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/extinst.spv-amd-gcn-shader.grammar.json
vendored
Executable file
@@ -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" ]
|
||||
}
|
||||
]
|
||||
}
|
41
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/extinst.spv-amd-shader-ballot.grammar.json
vendored
Executable file
41
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/extinst.spv-amd-shader-ballot.grammar.json
vendored
Executable file
@@ -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" ]
|
||||
}
|
||||
]
|
||||
}
|
@@ -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" ]
|
||||
}
|
||||
]
|
||||
}
|
@@ -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" ]
|
||||
}
|
||||
]
|
||||
}
|
File diff suppressed because it is too large
Load Diff
1707
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/spirv.cs
vendored
Executable file
1707
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/spirv.cs
vendored
Executable file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,7 @@
|
||||
"Comment":
|
||||
[
|
||||
[
|
||||
"Copyright (c) 2014-2018 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\"),",
|
||||
@@ -36,13 +36,16 @@
|
||||
],
|
||||
[
|
||||
"Enumeration tokens for SPIR-V, in various styles:",
|
||||
" C, C++, C++11, JSON, Lua, Python",
|
||||
" C, C++, C++11, JSON, Lua, Python, C#, D",
|
||||
"",
|
||||
"- C will have tokens with a \"Spv\" prefix, e.g.: SpvSourceLanguageGLSL",
|
||||
"- C++ will have tokens in the \"spv\" name space, e.g.: spv::SourceLanguageGLSL",
|
||||
"- C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL",
|
||||
"- Lua will use tables, e.g.: spv.SourceLanguage.GLSL",
|
||||
"- Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL']",
|
||||
"- C# will use enum classes in the Specification class located in the \"Spv\" namespace,",
|
||||
" e.g.: Spv.Specification.SourceLanguage.GLSL",
|
||||
"- D will have tokens under the \"spv\" module, e.g: spv.SourceLanguage.GLSL",
|
||||
"",
|
||||
"Some tokens act like mask values, which can be OR'd together,",
|
||||
"while others are mutually exclusive. The mask-like ones have",
|
||||
@@ -51,8 +54,8 @@
|
||||
]
|
||||
],
|
||||
"MagicNumber": 119734787,
|
||||
"Version": 66304,
|
||||
"Revision": 1,
|
||||
"Version": 66816,
|
||||
"Revision": 4,
|
||||
"OpCodeMask": 65535,
|
||||
"WordCountShift": 16
|
||||
},
|
||||
@@ -82,7 +85,21 @@
|
||||
"Geometry": 3,
|
||||
"Fragment": 4,
|
||||
"GLCompute": 5,
|
||||
"Kernel": 6
|
||||
"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
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -92,7 +109,9 @@
|
||||
{
|
||||
"Logical": 0,
|
||||
"Physical32": 1,
|
||||
"Physical64": 2
|
||||
"Physical64": 2,
|
||||
"PhysicalStorageBuffer64": 5348,
|
||||
"PhysicalStorageBuffer64EXT": 5348
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -102,7 +121,9 @@
|
||||
{
|
||||
"Simple": 0,
|
||||
"GLSL450": 1,
|
||||
"OpenCL": 2
|
||||
"OpenCL": 2,
|
||||
"Vulkan": 3,
|
||||
"VulkanKHR": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -149,7 +170,33 @@
|
||||
"LocalSizeId": 38,
|
||||
"LocalSizeHintId": 39,
|
||||
"PostDepthCoverage": 4446,
|
||||
"StencilRefReplacingEXT": 5027
|
||||
"DenormPreserve": 4459,
|
||||
"DenormFlushToZero": 4460,
|
||||
"SignedZeroInfNanPreserve": 4461,
|
||||
"RoundingModeRTE": 4462,
|
||||
"RoundingModeRTZ": 4463,
|
||||
"StencilRefReplacingEXT": 5027,
|
||||
"OutputLinesNV": 5269,
|
||||
"OutputPrimitivesNV": 5270,
|
||||
"DerivativeGroupQuadsNV": 5289,
|
||||
"DerivativeGroupLinearNV": 5290,
|
||||
"OutputTrianglesNV": 5298,
|
||||
"PixelInterlockOrderedEXT": 5366,
|
||||
"PixelInterlockUnorderedEXT": 5367,
|
||||
"SampleInterlockOrderedEXT": 5368,
|
||||
"SampleInterlockUnorderedEXT": 5369,
|
||||
"ShadingRateInterlockOrderedEXT": 5370,
|
||||
"ShadingRateInterlockUnorderedEXT": 5371,
|
||||
"SharedLocalMemorySizeINTEL": 5618,
|
||||
"RoundingModeRTPINTEL": 5620,
|
||||
"RoundingModeRTNINTEL": 5621,
|
||||
"FloatingPointModeALTINTEL": 5622,
|
||||
"FloatingPointModeIEEEINTEL": 5623,
|
||||
"MaxWorkgroupSizeINTEL": 5893,
|
||||
"MaxWorkDimINTEL": 5894,
|
||||
"NoGlobalOffsetINTEL": 5895,
|
||||
"NumSIMDWorkitemsINTEL": 5896,
|
||||
"SchedulerTargetFmaxMhzINTEL": 5903
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -169,7 +216,24 @@
|
||||
"PushConstant": 9,
|
||||
"AtomicCounter": 10,
|
||||
"Image": 11,
|
||||
"StorageBuffer": 12
|
||||
"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,
|
||||
"CodeSectionINTEL": 5605,
|
||||
"DeviceOnlyINTEL": 5936,
|
||||
"HostOnlyINTEL": 5937
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -251,7 +315,9 @@
|
||||
"Rg16ui": 36,
|
||||
"Rg8ui": 37,
|
||||
"R16ui": 38,
|
||||
"R8ui": 39
|
||||
"R8ui": 39,
|
||||
"R64ui": 40,
|
||||
"R64i": 41
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -317,7 +383,17 @@
|
||||
"Offset": 4,
|
||||
"ConstOffsets": 5,
|
||||
"Sample": 6,
|
||||
"MinLod": 7
|
||||
"MinLod": 7,
|
||||
"MakeTexelAvailable": 8,
|
||||
"MakeTexelAvailableKHR": 8,
|
||||
"MakeTexelVisible": 9,
|
||||
"MakeTexelVisibleKHR": 9,
|
||||
"NonPrivateTexel": 10,
|
||||
"NonPrivateTexelKHR": 10,
|
||||
"VolatileTexel": 11,
|
||||
"VolatileTexelKHR": 11,
|
||||
"SignExtend": 12,
|
||||
"ZeroExtend": 13
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -329,7 +405,9 @@
|
||||
"NotInf": 1,
|
||||
"NSZ": 2,
|
||||
"AllowRecip": 3,
|
||||
"Fast": 4
|
||||
"Fast": 4,
|
||||
"AllowContractFastINTEL": 16,
|
||||
"AllowReassocINTEL": 17
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -408,6 +486,7 @@
|
||||
"NonWritable": 24,
|
||||
"NonReadable": 25,
|
||||
"Uniform": 26,
|
||||
"UniformId": 27,
|
||||
"SaturatedConversion": 28,
|
||||
"Stream": 29,
|
||||
"Location": 30,
|
||||
@@ -428,14 +507,62 @@
|
||||
"MaxByteOffset": 45,
|
||||
"AlignmentId": 46,
|
||||
"MaxByteOffsetId": 47,
|
||||
"NoSignedWrap": 4469,
|
||||
"NoUnsignedWrap": 4470,
|
||||
"ExplicitInterpAMD": 4999,
|
||||
"OverrideCoverageNV": 5248,
|
||||
"PassthroughNV": 5250,
|
||||
"ViewportRelativeNV": 5252,
|
||||
"SecondaryViewportRelativeNV": 5256,
|
||||
"PerPrimitiveNV": 5271,
|
||||
"PerViewNV": 5272,
|
||||
"PerTaskNV": 5273,
|
||||
"PerVertexNV": 5285,
|
||||
"NonUniform": 5300,
|
||||
"NonUniformEXT": 5300,
|
||||
"RestrictPointer": 5355,
|
||||
"RestrictPointerEXT": 5355,
|
||||
"AliasedPointer": 5356,
|
||||
"AliasedPointerEXT": 5356,
|
||||
"SIMTCallINTEL": 5599,
|
||||
"ReferencedIndirectlyINTEL": 5602,
|
||||
"ClobberINTEL": 5607,
|
||||
"SideEffectsINTEL": 5608,
|
||||
"VectorComputeVariableINTEL": 5624,
|
||||
"FuncParamIOKindINTEL": 5625,
|
||||
"VectorComputeFunctionINTEL": 5626,
|
||||
"StackCallINTEL": 5627,
|
||||
"GlobalVariableOffsetINTEL": 5628,
|
||||
"CounterBuffer": 5634,
|
||||
"HlslCounterBufferGOOGLE": 5634,
|
||||
"HlslSemanticGOOGLE": 5635
|
||||
"HlslSemanticGOOGLE": 5635,
|
||||
"UserSemantic": 5635,
|
||||
"UserTypeGOOGLE": 5636,
|
||||
"FunctionRoundingModeINTEL": 5822,
|
||||
"FunctionDenormModeINTEL": 5823,
|
||||
"RegisterINTEL": 5825,
|
||||
"MemoryINTEL": 5826,
|
||||
"NumbanksINTEL": 5827,
|
||||
"BankwidthINTEL": 5828,
|
||||
"MaxPrivateCopiesINTEL": 5829,
|
||||
"SinglepumpINTEL": 5830,
|
||||
"DoublepumpINTEL": 5831,
|
||||
"MaxReplicatesINTEL": 5832,
|
||||
"SimpleDualPortINTEL": 5833,
|
||||
"MergeINTEL": 5834,
|
||||
"BankBitsINTEL": 5835,
|
||||
"ForcePow2DepthINTEL": 5836,
|
||||
"BurstCoalesceINTEL": 5899,
|
||||
"CacheSizeINTEL": 5900,
|
||||
"DontStaticallyCoalesceINTEL": 5901,
|
||||
"PrefetchINTEL": 5902,
|
||||
"StallEnableINTEL": 5905,
|
||||
"FuseLoopsInFunctionINTEL": 5907,
|
||||
"BufferLocationINTEL": 5921,
|
||||
"IOPipeStorageINTEL": 5944,
|
||||
"FunctionFloatingPointModeINTEL": 6080,
|
||||
"SingleElementVectorINTEL": 6085,
|
||||
"VectorComputeCallableFunctionINTEL": 6087
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -497,8 +624,10 @@
|
||||
"BaseVertex": 4424,
|
||||
"BaseInstance": 4425,
|
||||
"DrawIndex": 4426,
|
||||
"PrimitiveShadingRateKHR": 4432,
|
||||
"DeviceIndex": 4438,
|
||||
"ViewIndex": 4440,
|
||||
"ShadingRateKHR": 4444,
|
||||
"BaryCoordNoPerspAMD": 4992,
|
||||
"BaryCoordNoPerspCentroidAMD": 4993,
|
||||
"BaryCoordNoPerspSampleAMD": 4994,
|
||||
@@ -512,7 +641,53 @@
|
||||
"SecondaryViewportMaskNV": 5258,
|
||||
"PositionPerViewNV": 5261,
|
||||
"ViewportMaskPerViewNV": 5262,
|
||||
"FullyCoveredEXT": 5264
|
||||
"FullyCoveredEXT": 5264,
|
||||
"TaskCountNV": 5274,
|
||||
"PrimitiveCountNV": 5275,
|
||||
"PrimitiveIndicesNV": 5276,
|
||||
"ClipDistancePerViewNV": 5277,
|
||||
"CullDistancePerViewNV": 5278,
|
||||
"LayerPerViewNV": 5279,
|
||||
"MeshViewCountNV": 5280,
|
||||
"MeshViewIndicesNV": 5281,
|
||||
"BaryCoordNV": 5286,
|
||||
"BaryCoordNoPerspNV": 5287,
|
||||
"FragSizeEXT": 5292,
|
||||
"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,
|
||||
"HitTNV": 5332,
|
||||
"HitKindKHR": 5333,
|
||||
"HitKindNV": 5333,
|
||||
"IncomingRayFlagsKHR": 5351,
|
||||
"IncomingRayFlagsNV": 5351,
|
||||
"RayGeometryIndexKHR": 5352,
|
||||
"WarpsPerSMNV": 5374,
|
||||
"SMCountNV": 5375,
|
||||
"WarpIDNV": 5376,
|
||||
"SMIDNV": 5377
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -532,7 +707,20 @@
|
||||
"Unroll": 0,
|
||||
"DontUnroll": 1,
|
||||
"DependencyInfinite": 2,
|
||||
"DependencyLength": 3
|
||||
"DependencyLength": 3,
|
||||
"MinIterations": 4,
|
||||
"MaxIterations": 5,
|
||||
"IterationMultiple": 6,
|
||||
"PeelCount": 7,
|
||||
"PartialCount": 8,
|
||||
"InitiationIntervalINTEL": 16,
|
||||
"MaxConcurrencyINTEL": 17,
|
||||
"DependencyArrayINTEL": 18,
|
||||
"PipelineEnableINTEL": 19,
|
||||
"LoopCoalesceINTEL": 20,
|
||||
"MaxInterleavingINTEL": 21,
|
||||
"SpeculatedIterationsINTEL": 22,
|
||||
"NoFusionINTEL": 23
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -560,7 +748,14 @@
|
||||
"WorkgroupMemory": 8,
|
||||
"CrossWorkgroupMemory": 9,
|
||||
"AtomicCounterMemory": 10,
|
||||
"ImageMemory": 11
|
||||
"ImageMemory": 11,
|
||||
"OutputMemory": 12,
|
||||
"OutputMemoryKHR": 12,
|
||||
"MakeAvailable": 13,
|
||||
"MakeAvailableKHR": 13,
|
||||
"MakeVisible": 14,
|
||||
"MakeVisibleKHR": 14,
|
||||
"Volatile": 15
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -570,7 +765,13 @@
|
||||
{
|
||||
"Volatile": 0,
|
||||
"Aligned": 1,
|
||||
"Nontemporal": 2
|
||||
"Nontemporal": 2,
|
||||
"MakePointerAvailable": 3,
|
||||
"MakePointerAvailableKHR": 3,
|
||||
"MakePointerVisible": 4,
|
||||
"MakePointerVisibleKHR": 4,
|
||||
"NonPrivatePointer": 5,
|
||||
"NonPrivatePointerKHR": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -582,7 +783,10 @@
|
||||
"Device": 1,
|
||||
"Workgroup": 2,
|
||||
"Subgroup": 3,
|
||||
"Invocation": 4
|
||||
"Invocation": 4,
|
||||
"QueueFamily": 5,
|
||||
"QueueFamilyKHR": 5,
|
||||
"ShaderCallKHR": 6
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -689,8 +893,14 @@
|
||||
"GroupNonUniformShuffleRelative": 66,
|
||||
"GroupNonUniformClustered": 67,
|
||||
"GroupNonUniformQuad": 68,
|
||||
"ShaderLayer": 69,
|
||||
"ShaderViewportIndex": 70,
|
||||
"FragmentShadingRateKHR": 4422,
|
||||
"SubgroupBallotKHR": 4423,
|
||||
"DrawParameters": 4427,
|
||||
"WorkgroupMemoryExplicitLayoutKHR": 4428,
|
||||
"WorkgroupMemoryExplicitLayout8BitAccessKHR": 4429,
|
||||
"WorkgroupMemoryExplicitLayout16BitAccessKHR": 4430,
|
||||
"SubgroupVoteKHR": 4431,
|
||||
"StorageBuffer16BitAccess": 4433,
|
||||
"StorageUniformBufferBlock16": 4433,
|
||||
@@ -707,11 +917,22 @@
|
||||
"StorageBuffer8BitAccess": 4448,
|
||||
"UniformAndStorageBuffer8BitAccess": 4449,
|
||||
"StoragePushConstant8": 4450,
|
||||
"DenormPreserve": 4464,
|
||||
"DenormFlushToZero": 4465,
|
||||
"SignedZeroInfNanPreserve": 4466,
|
||||
"RoundingModeRTE": 4467,
|
||||
"RoundingModeRTZ": 4468,
|
||||
"RayQueryProvisionalKHR": 4471,
|
||||
"RayQueryKHR": 4472,
|
||||
"RayTraversalPrimitiveCullingKHR": 4478,
|
||||
"RayTracingKHR": 4479,
|
||||
"Float16ImageAMD": 5008,
|
||||
"ImageGatherBiasLodAMD": 5009,
|
||||
"FragmentMaskAMD": 5010,
|
||||
"StencilExportEXT": 5013,
|
||||
"ImageReadWriteLodAMD": 5015,
|
||||
"Int64ImageEXT": 5016,
|
||||
"ShaderClockKHR": 5055,
|
||||
"SampleMaskOverrideCoverageNV": 5249,
|
||||
"GeometryShaderPassthroughNV": 5251,
|
||||
"ShaderViewportIndexLayerEXT": 5254,
|
||||
@@ -720,22 +941,164 @@
|
||||
"ShaderStereoViewNV": 5259,
|
||||
"PerViewAttributesNV": 5260,
|
||||
"FragmentFullyCoveredEXT": 5265,
|
||||
"MeshShadingNV": 5266,
|
||||
"ImageFootprintNV": 5282,
|
||||
"FragmentBarycentricNV": 5284,
|
||||
"ComputeDerivativeGroupQuadsNV": 5288,
|
||||
"FragmentDensityEXT": 5291,
|
||||
"ShadingRateNV": 5291,
|
||||
"GroupNonUniformPartitionedNV": 5297,
|
||||
"ShaderNonUniform": 5301,
|
||||
"ShaderNonUniformEXT": 5301,
|
||||
"RuntimeDescriptorArray": 5302,
|
||||
"RuntimeDescriptorArrayEXT": 5302,
|
||||
"InputAttachmentArrayDynamicIndexing": 5303,
|
||||
"InputAttachmentArrayDynamicIndexingEXT": 5303,
|
||||
"UniformTexelBufferArrayDynamicIndexing": 5304,
|
||||
"UniformTexelBufferArrayDynamicIndexingEXT": 5304,
|
||||
"StorageTexelBufferArrayDynamicIndexing": 5305,
|
||||
"StorageTexelBufferArrayDynamicIndexingEXT": 5305,
|
||||
"UniformBufferArrayNonUniformIndexing": 5306,
|
||||
"UniformBufferArrayNonUniformIndexingEXT": 5306,
|
||||
"SampledImageArrayNonUniformIndexing": 5307,
|
||||
"SampledImageArrayNonUniformIndexingEXT": 5307,
|
||||
"StorageBufferArrayNonUniformIndexing": 5308,
|
||||
"StorageBufferArrayNonUniformIndexingEXT": 5308,
|
||||
"StorageImageArrayNonUniformIndexing": 5309,
|
||||
"StorageImageArrayNonUniformIndexingEXT": 5309,
|
||||
"InputAttachmentArrayNonUniformIndexing": 5310,
|
||||
"InputAttachmentArrayNonUniformIndexingEXT": 5310,
|
||||
"UniformTexelBufferArrayNonUniformIndexing": 5311,
|
||||
"UniformTexelBufferArrayNonUniformIndexingEXT": 5311,
|
||||
"StorageTexelBufferArrayNonUniformIndexing": 5312,
|
||||
"StorageTexelBufferArrayNonUniformIndexingEXT": 5312,
|
||||
"RayTracingNV": 5340,
|
||||
"VulkanMemoryModel": 5345,
|
||||
"VulkanMemoryModelKHR": 5345,
|
||||
"VulkanMemoryModelDeviceScope": 5346,
|
||||
"VulkanMemoryModelDeviceScopeKHR": 5346,
|
||||
"PhysicalStorageBufferAddresses": 5347,
|
||||
"PhysicalStorageBufferAddressesEXT": 5347,
|
||||
"ComputeDerivativeGroupLinearNV": 5350,
|
||||
"RayTracingProvisionalKHR": 5353,
|
||||
"CooperativeMatrixNV": 5357,
|
||||
"FragmentShaderSampleInterlockEXT": 5363,
|
||||
"FragmentShaderShadingRateInterlockEXT": 5372,
|
||||
"ShaderSMBuiltinsNV": 5373,
|
||||
"FragmentShaderPixelInterlockEXT": 5378,
|
||||
"DemoteToHelperInvocationEXT": 5379,
|
||||
"SubgroupShuffleINTEL": 5568,
|
||||
"SubgroupBufferBlockIOINTEL": 5569,
|
||||
"SubgroupImageBlockIOINTEL": 5570
|
||||
"SubgroupImageBlockIOINTEL": 5570,
|
||||
"SubgroupImageMediaBlockIOINTEL": 5579,
|
||||
"RoundToInfinityINTEL": 5582,
|
||||
"FloatingPointModeINTEL": 5583,
|
||||
"IntegerFunctions2INTEL": 5584,
|
||||
"FunctionPointersINTEL": 5603,
|
||||
"IndirectReferencesINTEL": 5604,
|
||||
"AsmINTEL": 5606,
|
||||
"AtomicFloat32MinMaxEXT": 5612,
|
||||
"AtomicFloat64MinMaxEXT": 5613,
|
||||
"AtomicFloat16MinMaxEXT": 5616,
|
||||
"VectorComputeINTEL": 5617,
|
||||
"VectorAnyINTEL": 5619,
|
||||
"SubgroupAvcMotionEstimationINTEL": 5696,
|
||||
"SubgroupAvcMotionEstimationIntraINTEL": 5697,
|
||||
"SubgroupAvcMotionEstimationChromaINTEL": 5698,
|
||||
"VariableLengthArrayINTEL": 5817,
|
||||
"FunctionFloatControlINTEL": 5821,
|
||||
"FPGAMemoryAttributesINTEL": 5824,
|
||||
"FPFastMathModeINTEL": 5837,
|
||||
"ArbitraryPrecisionIntegersINTEL": 5844,
|
||||
"UnstructuredLoopControlsINTEL": 5886,
|
||||
"FPGALoopControlsINTEL": 5888,
|
||||
"KernelAttributesINTEL": 5892,
|
||||
"FPGAKernelAttributesINTEL": 5897,
|
||||
"FPGAMemoryAccessesINTEL": 5898,
|
||||
"FPGAClusterAttributesINTEL": 5904,
|
||||
"LoopFuseINTEL": 5906,
|
||||
"FPGABufferLocationINTEL": 5920,
|
||||
"USMStorageClassesINTEL": 5935,
|
||||
"IOPipesINTEL": 5943,
|
||||
"BlockingPipesINTEL": 5945,
|
||||
"FPGARegINTEL": 5948,
|
||||
"AtomicFloat32AddEXT": 6033,
|
||||
"AtomicFloat64AddEXT": 6034,
|
||||
"LongConstantCompositeINTEL": 6089
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": "FragmentShadingRate",
|
||||
"Type": "Bit",
|
||||
"Values":
|
||||
{
|
||||
"Vertical2Pixels": 0,
|
||||
"Vertical4Pixels": 1,
|
||||
"Horizontal2Pixels": 2,
|
||||
"Horizontal4Pixels": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "FPDenormMode",
|
||||
"Type": "Value",
|
||||
"Values":
|
||||
{
|
||||
"Preserve": 0,
|
||||
"FlushToZero": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "FPOperationMode",
|
||||
"Type": "Value",
|
||||
"Values":
|
||||
{
|
||||
"IEEE": 0,
|
||||
"ALT": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1083,12 +1446,29 @@
|
||||
"OpGroupNonUniformLogicalXor": 364,
|
||||
"OpGroupNonUniformQuadBroadcast": 365,
|
||||
"OpGroupNonUniformQuadSwap": 366,
|
||||
"OpCopyLogical": 400,
|
||||
"OpPtrEqual": 401,
|
||||
"OpPtrNotEqual": 402,
|
||||
"OpPtrDiff": 403,
|
||||
"OpTerminateInvocation": 4416,
|
||||
"OpSubgroupBallotKHR": 4421,
|
||||
"OpSubgroupFirstInvocationKHR": 4422,
|
||||
"OpSubgroupAllKHR": 4428,
|
||||
"OpSubgroupAnyKHR": 4429,
|
||||
"OpSubgroupAllEqualKHR": 4430,
|
||||
"OpSubgroupReadInvocationKHR": 4432,
|
||||
"OpTraceRayKHR": 4445,
|
||||
"OpExecuteCallableKHR": 4446,
|
||||
"OpConvertUToAccelerationStructureKHR": 4447,
|
||||
"OpIgnoreIntersectionKHR": 4448,
|
||||
"OpTerminateRayKHR": 4449,
|
||||
"OpTypeRayQueryKHR": 4472,
|
||||
"OpRayQueryInitializeKHR": 4473,
|
||||
"OpRayQueryTerminateKHR": 4474,
|
||||
"OpRayQueryGenerateIntersectionKHR": 4475,
|
||||
"OpRayQueryConfirmIntersectionKHR": 4476,
|
||||
"OpRayQueryProceedKHR": 4477,
|
||||
"OpRayQueryGetIntersectionTypeKHR": 4479,
|
||||
"OpGroupIAddNonUniformAMD": 5000,
|
||||
"OpGroupFAddNonUniformAMD": 5001,
|
||||
"OpGroupFMinNonUniformAMD": 5002,
|
||||
@@ -1099,7 +1479,27 @@
|
||||
"OpGroupSMaxNonUniformAMD": 5007,
|
||||
"OpFragmentMaskFetchAMD": 5011,
|
||||
"OpFragmentFetchAMD": 5012,
|
||||
"OpReadClockKHR": 5056,
|
||||
"OpImageSampleFootprintNV": 5283,
|
||||
"OpGroupNonUniformPartitionNV": 5296,
|
||||
"OpWritePackedPrimitiveIndices4x8NV": 5299,
|
||||
"OpReportIntersectionKHR": 5334,
|
||||
"OpReportIntersectionNV": 5334,
|
||||
"OpIgnoreIntersectionNV": 5335,
|
||||
"OpTerminateRayNV": 5336,
|
||||
"OpTraceNV": 5337,
|
||||
"OpTypeAccelerationStructureKHR": 5341,
|
||||
"OpTypeAccelerationStructureNV": 5341,
|
||||
"OpExecuteCallableNV": 5344,
|
||||
"OpTypeCooperativeMatrixNV": 5358,
|
||||
"OpCooperativeMatrixLoadNV": 5359,
|
||||
"OpCooperativeMatrixStoreNV": 5360,
|
||||
"OpCooperativeMatrixMulAddNV": 5361,
|
||||
"OpCooperativeMatrixLengthNV": 5362,
|
||||
"OpBeginInvocationInterlockEXT": 5364,
|
||||
"OpEndInvocationInterlockEXT": 5365,
|
||||
"OpDemoteToHelperInvocationEXT": 5380,
|
||||
"OpIsHelperInvocationEXT": 5381,
|
||||
"OpSubgroupShuffleINTEL": 5571,
|
||||
"OpSubgroupShuffleDownINTEL": 5572,
|
||||
"OpSubgroupShuffleUpINTEL": 5573,
|
||||
@@ -1108,8 +1508,182 @@
|
||||
"OpSubgroupBlockWriteINTEL": 5576,
|
||||
"OpSubgroupImageBlockReadINTEL": 5577,
|
||||
"OpSubgroupImageBlockWriteINTEL": 5578,
|
||||
"OpSubgroupImageMediaBlockReadINTEL": 5580,
|
||||
"OpSubgroupImageMediaBlockWriteINTEL": 5581,
|
||||
"OpUCountLeadingZerosINTEL": 5585,
|
||||
"OpUCountTrailingZerosINTEL": 5586,
|
||||
"OpAbsISubINTEL": 5587,
|
||||
"OpAbsUSubINTEL": 5588,
|
||||
"OpIAddSatINTEL": 5589,
|
||||
"OpUAddSatINTEL": 5590,
|
||||
"OpIAverageINTEL": 5591,
|
||||
"OpUAverageINTEL": 5592,
|
||||
"OpIAverageRoundedINTEL": 5593,
|
||||
"OpUAverageRoundedINTEL": 5594,
|
||||
"OpISubSatINTEL": 5595,
|
||||
"OpUSubSatINTEL": 5596,
|
||||
"OpIMul32x16INTEL": 5597,
|
||||
"OpUMul32x16INTEL": 5598,
|
||||
"OpConstFunctionPointerINTEL": 5600,
|
||||
"OpFunctionPointerCallINTEL": 5601,
|
||||
"OpAsmTargetINTEL": 5609,
|
||||
"OpAsmINTEL": 5610,
|
||||
"OpAsmCallINTEL": 5611,
|
||||
"OpAtomicFMinEXT": 5614,
|
||||
"OpAtomicFMaxEXT": 5615,
|
||||
"OpDecorateString": 5632,
|
||||
"OpDecorateStringGOOGLE": 5632,
|
||||
"OpMemberDecorateStringGOOGLE": 5633
|
||||
"OpMemberDecorateString": 5633,
|
||||
"OpMemberDecorateStringGOOGLE": 5633,
|
||||
"OpVmeImageINTEL": 5699,
|
||||
"OpTypeVmeImageINTEL": 5700,
|
||||
"OpTypeAvcImePayloadINTEL": 5701,
|
||||
"OpTypeAvcRefPayloadINTEL": 5702,
|
||||
"OpTypeAvcSicPayloadINTEL": 5703,
|
||||
"OpTypeAvcMcePayloadINTEL": 5704,
|
||||
"OpTypeAvcMceResultINTEL": 5705,
|
||||
"OpTypeAvcImeResultINTEL": 5706,
|
||||
"OpTypeAvcImeResultSingleReferenceStreamoutINTEL": 5707,
|
||||
"OpTypeAvcImeResultDualReferenceStreamoutINTEL": 5708,
|
||||
"OpTypeAvcImeSingleReferenceStreaminINTEL": 5709,
|
||||
"OpTypeAvcImeDualReferenceStreaminINTEL": 5710,
|
||||
"OpTypeAvcRefResultINTEL": 5711,
|
||||
"OpTypeAvcSicResultINTEL": 5712,
|
||||
"OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL": 5713,
|
||||
"OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL": 5714,
|
||||
"OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL": 5715,
|
||||
"OpSubgroupAvcMceSetInterShapePenaltyINTEL": 5716,
|
||||
"OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL": 5717,
|
||||
"OpSubgroupAvcMceSetInterDirectionPenaltyINTEL": 5718,
|
||||
"OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL": 5719,
|
||||
"OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL": 5720,
|
||||
"OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL": 5721,
|
||||
"OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL": 5722,
|
||||
"OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL": 5723,
|
||||
"OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL": 5724,
|
||||
"OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL": 5725,
|
||||
"OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL": 5726,
|
||||
"OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL": 5727,
|
||||
"OpSubgroupAvcMceSetAcOnlyHaarINTEL": 5728,
|
||||
"OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL": 5729,
|
||||
"OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL": 5730,
|
||||
"OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL": 5731,
|
||||
"OpSubgroupAvcMceConvertToImePayloadINTEL": 5732,
|
||||
"OpSubgroupAvcMceConvertToImeResultINTEL": 5733,
|
||||
"OpSubgroupAvcMceConvertToRefPayloadINTEL": 5734,
|
||||
"OpSubgroupAvcMceConvertToRefResultINTEL": 5735,
|
||||
"OpSubgroupAvcMceConvertToSicPayloadINTEL": 5736,
|
||||
"OpSubgroupAvcMceConvertToSicResultINTEL": 5737,
|
||||
"OpSubgroupAvcMceGetMotionVectorsINTEL": 5738,
|
||||
"OpSubgroupAvcMceGetInterDistortionsINTEL": 5739,
|
||||
"OpSubgroupAvcMceGetBestInterDistortionsINTEL": 5740,
|
||||
"OpSubgroupAvcMceGetInterMajorShapeINTEL": 5741,
|
||||
"OpSubgroupAvcMceGetInterMinorShapeINTEL": 5742,
|
||||
"OpSubgroupAvcMceGetInterDirectionsINTEL": 5743,
|
||||
"OpSubgroupAvcMceGetInterMotionVectorCountINTEL": 5744,
|
||||
"OpSubgroupAvcMceGetInterReferenceIdsINTEL": 5745,
|
||||
"OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL": 5746,
|
||||
"OpSubgroupAvcImeInitializeINTEL": 5747,
|
||||
"OpSubgroupAvcImeSetSingleReferenceINTEL": 5748,
|
||||
"OpSubgroupAvcImeSetDualReferenceINTEL": 5749,
|
||||
"OpSubgroupAvcImeRefWindowSizeINTEL": 5750,
|
||||
"OpSubgroupAvcImeAdjustRefOffsetINTEL": 5751,
|
||||
"OpSubgroupAvcImeConvertToMcePayloadINTEL": 5752,
|
||||
"OpSubgroupAvcImeSetMaxMotionVectorCountINTEL": 5753,
|
||||
"OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL": 5754,
|
||||
"OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL": 5755,
|
||||
"OpSubgroupAvcImeSetWeightedSadINTEL": 5756,
|
||||
"OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL": 5757,
|
||||
"OpSubgroupAvcImeEvaluateWithDualReferenceINTEL": 5758,
|
||||
"OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL": 5759,
|
||||
"OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL": 5760,
|
||||
"OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL": 5761,
|
||||
"OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL": 5762,
|
||||
"OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL": 5763,
|
||||
"OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL": 5764,
|
||||
"OpSubgroupAvcImeConvertToMceResultINTEL": 5765,
|
||||
"OpSubgroupAvcImeGetSingleReferenceStreaminINTEL": 5766,
|
||||
"OpSubgroupAvcImeGetDualReferenceStreaminINTEL": 5767,
|
||||
"OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL": 5768,
|
||||
"OpSubgroupAvcImeStripDualReferenceStreamoutINTEL": 5769,
|
||||
"OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL": 5770,
|
||||
"OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL": 5771,
|
||||
"OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL": 5772,
|
||||
"OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL": 5773,
|
||||
"OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL": 5774,
|
||||
"OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL": 5775,
|
||||
"OpSubgroupAvcImeGetBorderReachedINTEL": 5776,
|
||||
"OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL": 5777,
|
||||
"OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL": 5778,
|
||||
"OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL": 5779,
|
||||
"OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL": 5780,
|
||||
"OpSubgroupAvcFmeInitializeINTEL": 5781,
|
||||
"OpSubgroupAvcBmeInitializeINTEL": 5782,
|
||||
"OpSubgroupAvcRefConvertToMcePayloadINTEL": 5783,
|
||||
"OpSubgroupAvcRefSetBidirectionalMixDisableINTEL": 5784,
|
||||
"OpSubgroupAvcRefSetBilinearFilterEnableINTEL": 5785,
|
||||
"OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL": 5786,
|
||||
"OpSubgroupAvcRefEvaluateWithDualReferenceINTEL": 5787,
|
||||
"OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL": 5788,
|
||||
"OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL": 5789,
|
||||
"OpSubgroupAvcRefConvertToMceResultINTEL": 5790,
|
||||
"OpSubgroupAvcSicInitializeINTEL": 5791,
|
||||
"OpSubgroupAvcSicConfigureSkcINTEL": 5792,
|
||||
"OpSubgroupAvcSicConfigureIpeLumaINTEL": 5793,
|
||||
"OpSubgroupAvcSicConfigureIpeLumaChromaINTEL": 5794,
|
||||
"OpSubgroupAvcSicGetMotionVectorMaskINTEL": 5795,
|
||||
"OpSubgroupAvcSicConvertToMcePayloadINTEL": 5796,
|
||||
"OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL": 5797,
|
||||
"OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL": 5798,
|
||||
"OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL": 5799,
|
||||
"OpSubgroupAvcSicSetBilinearFilterEnableINTEL": 5800,
|
||||
"OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL": 5801,
|
||||
"OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL": 5802,
|
||||
"OpSubgroupAvcSicEvaluateIpeINTEL": 5803,
|
||||
"OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL": 5804,
|
||||
"OpSubgroupAvcSicEvaluateWithDualReferenceINTEL": 5805,
|
||||
"OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL": 5806,
|
||||
"OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL": 5807,
|
||||
"OpSubgroupAvcSicConvertToMceResultINTEL": 5808,
|
||||
"OpSubgroupAvcSicGetIpeLumaShapeINTEL": 5809,
|
||||
"OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL": 5810,
|
||||
"OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL": 5811,
|
||||
"OpSubgroupAvcSicGetPackedIpeLumaModesINTEL": 5812,
|
||||
"OpSubgroupAvcSicGetIpeChromaModeINTEL": 5813,
|
||||
"OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL": 5814,
|
||||
"OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL": 5815,
|
||||
"OpSubgroupAvcSicGetInterRawSadsINTEL": 5816,
|
||||
"OpVariableLengthArrayINTEL": 5818,
|
||||
"OpSaveMemoryINTEL": 5819,
|
||||
"OpRestoreMemoryINTEL": 5820,
|
||||
"OpLoopControlINTEL": 5887,
|
||||
"OpPtrCastToCrossWorkgroupINTEL": 5934,
|
||||
"OpCrossWorkgroupCastToPtrINTEL": 5938,
|
||||
"OpReadPipeBlockingINTEL": 5946,
|
||||
"OpWritePipeBlockingINTEL": 5947,
|
||||
"OpFPGARegINTEL": 5949,
|
||||
"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,
|
||||
"OpAtomicFAddEXT": 6035,
|
||||
"OpTypeBufferSurfaceINTEL": 6086,
|
||||
"OpTypeStructContinuedINTEL": 6090,
|
||||
"OpConstantCompositeContinuedINTEL": 6091,
|
||||
"OpSpecConstantCompositeContinuedINTEL": 6092
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@@ -1,4 +1,4 @@
|
||||
-- Copyright (c) 2014-2018 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"),
|
||||
@@ -26,13 +26,16 @@
|
||||
-- the Binary Section of the SPIR-V specification.
|
||||
|
||||
-- Enumeration tokens for SPIR-V, in various styles:
|
||||
-- C, C++, C++11, JSON, Lua, Python
|
||||
-- C, C++, C++11, JSON, Lua, Python, C#, D
|
||||
--
|
||||
-- - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
|
||||
-- - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
|
||||
-- - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
|
||||
-- - Lua will use tables, e.g.: spv.SourceLanguage.GLSL
|
||||
-- - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL']
|
||||
-- - C# will use enum classes in the Specification class located in the "Spv" namespace,
|
||||
-- e.g.: Spv.Specification.SourceLanguage.GLSL
|
||||
-- - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL
|
||||
--
|
||||
-- Some tokens act like mask values, which can be OR'd together,
|
||||
-- while others are mutually exclusive. The mask-like ones have
|
||||
@@ -41,8 +44,8 @@
|
||||
|
||||
spv = {
|
||||
MagicNumber = 0x07230203,
|
||||
Version = 0x00010300,
|
||||
Revision = 1,
|
||||
Version = 0x00010500,
|
||||
Revision = 4,
|
||||
OpCodeMask = 0xffff,
|
||||
WordCountShift = 16,
|
||||
|
||||
@@ -63,18 +66,36 @@ spv = {
|
||||
Fragment = 4,
|
||||
GLCompute = 5,
|
||||
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,
|
||||
},
|
||||
|
||||
AddressingModel = {
|
||||
Logical = 0,
|
||||
Physical32 = 1,
|
||||
Physical64 = 2,
|
||||
PhysicalStorageBuffer64 = 5348,
|
||||
PhysicalStorageBuffer64EXT = 5348,
|
||||
},
|
||||
|
||||
MemoryModel = {
|
||||
Simple = 0,
|
||||
GLSL450 = 1,
|
||||
OpenCL = 2,
|
||||
Vulkan = 3,
|
||||
VulkanKHR = 3,
|
||||
},
|
||||
|
||||
ExecutionMode = {
|
||||
@@ -117,7 +138,33 @@ spv = {
|
||||
LocalSizeId = 38,
|
||||
LocalSizeHintId = 39,
|
||||
PostDepthCoverage = 4446,
|
||||
DenormPreserve = 4459,
|
||||
DenormFlushToZero = 4460,
|
||||
SignedZeroInfNanPreserve = 4461,
|
||||
RoundingModeRTE = 4462,
|
||||
RoundingModeRTZ = 4463,
|
||||
StencilRefReplacingEXT = 5027,
|
||||
OutputLinesNV = 5269,
|
||||
OutputPrimitivesNV = 5270,
|
||||
DerivativeGroupQuadsNV = 5289,
|
||||
DerivativeGroupLinearNV = 5290,
|
||||
OutputTrianglesNV = 5298,
|
||||
PixelInterlockOrderedEXT = 5366,
|
||||
PixelInterlockUnorderedEXT = 5367,
|
||||
SampleInterlockOrderedEXT = 5368,
|
||||
SampleInterlockUnorderedEXT = 5369,
|
||||
ShadingRateInterlockOrderedEXT = 5370,
|
||||
ShadingRateInterlockUnorderedEXT = 5371,
|
||||
SharedLocalMemorySizeINTEL = 5618,
|
||||
RoundingModeRTPINTEL = 5620,
|
||||
RoundingModeRTNINTEL = 5621,
|
||||
FloatingPointModeALTINTEL = 5622,
|
||||
FloatingPointModeIEEEINTEL = 5623,
|
||||
MaxWorkgroupSizeINTEL = 5893,
|
||||
MaxWorkDimINTEL = 5894,
|
||||
NoGlobalOffsetINTEL = 5895,
|
||||
NumSIMDWorkitemsINTEL = 5896,
|
||||
SchedulerTargetFmaxMhzINTEL = 5903,
|
||||
},
|
||||
|
||||
StorageClass = {
|
||||
@@ -134,6 +181,23 @@ 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,
|
||||
CodeSectionINTEL = 5605,
|
||||
DeviceOnlyINTEL = 5936,
|
||||
HostOnlyINTEL = 5937,
|
||||
},
|
||||
|
||||
Dim = {
|
||||
@@ -200,6 +264,8 @@ spv = {
|
||||
Rg8ui = 37,
|
||||
R16ui = 38,
|
||||
R8ui = 39,
|
||||
R64ui = 40,
|
||||
R64i = 41,
|
||||
},
|
||||
|
||||
ImageChannelOrder = {
|
||||
@@ -254,6 +320,16 @@ spv = {
|
||||
ConstOffsets = 5,
|
||||
Sample = 6,
|
||||
MinLod = 7,
|
||||
MakeTexelAvailable = 8,
|
||||
MakeTexelAvailableKHR = 8,
|
||||
MakeTexelVisible = 9,
|
||||
MakeTexelVisibleKHR = 9,
|
||||
NonPrivateTexel = 10,
|
||||
NonPrivateTexelKHR = 10,
|
||||
VolatileTexel = 11,
|
||||
VolatileTexelKHR = 11,
|
||||
SignExtend = 12,
|
||||
ZeroExtend = 13,
|
||||
},
|
||||
|
||||
ImageOperandsMask = {
|
||||
@@ -266,6 +342,16 @@ spv = {
|
||||
ConstOffsets = 0x00000020,
|
||||
Sample = 0x00000040,
|
||||
MinLod = 0x00000080,
|
||||
MakeTexelAvailable = 0x00000100,
|
||||
MakeTexelAvailableKHR = 0x00000100,
|
||||
MakeTexelVisible = 0x00000200,
|
||||
MakeTexelVisibleKHR = 0x00000200,
|
||||
NonPrivateTexel = 0x00000400,
|
||||
NonPrivateTexelKHR = 0x00000400,
|
||||
VolatileTexel = 0x00000800,
|
||||
VolatileTexelKHR = 0x00000800,
|
||||
SignExtend = 0x00001000,
|
||||
ZeroExtend = 0x00002000,
|
||||
},
|
||||
|
||||
FPFastMathModeShift = {
|
||||
@@ -274,6 +360,8 @@ spv = {
|
||||
NSZ = 2,
|
||||
AllowRecip = 3,
|
||||
Fast = 4,
|
||||
AllowContractFastINTEL = 16,
|
||||
AllowReassocINTEL = 17,
|
||||
},
|
||||
|
||||
FPFastMathModeMask = {
|
||||
@@ -283,6 +371,8 @@ spv = {
|
||||
NSZ = 0x00000004,
|
||||
AllowRecip = 0x00000008,
|
||||
Fast = 0x00000010,
|
||||
AllowContractFastINTEL = 0x00010000,
|
||||
AllowReassocINTEL = 0x00020000,
|
||||
},
|
||||
|
||||
FPRoundingMode = {
|
||||
@@ -341,6 +431,7 @@ spv = {
|
||||
NonWritable = 24,
|
||||
NonReadable = 25,
|
||||
Uniform = 26,
|
||||
UniformId = 27,
|
||||
SaturatedConversion = 28,
|
||||
Stream = 29,
|
||||
Location = 30,
|
||||
@@ -361,14 +452,62 @@ spv = {
|
||||
MaxByteOffset = 45,
|
||||
AlignmentId = 46,
|
||||
MaxByteOffsetId = 47,
|
||||
NoSignedWrap = 4469,
|
||||
NoUnsignedWrap = 4470,
|
||||
ExplicitInterpAMD = 4999,
|
||||
OverrideCoverageNV = 5248,
|
||||
PassthroughNV = 5250,
|
||||
ViewportRelativeNV = 5252,
|
||||
SecondaryViewportRelativeNV = 5256,
|
||||
PerPrimitiveNV = 5271,
|
||||
PerViewNV = 5272,
|
||||
PerTaskNV = 5273,
|
||||
PerVertexNV = 5285,
|
||||
NonUniform = 5300,
|
||||
NonUniformEXT = 5300,
|
||||
RestrictPointer = 5355,
|
||||
RestrictPointerEXT = 5355,
|
||||
AliasedPointer = 5356,
|
||||
AliasedPointerEXT = 5356,
|
||||
SIMTCallINTEL = 5599,
|
||||
ReferencedIndirectlyINTEL = 5602,
|
||||
ClobberINTEL = 5607,
|
||||
SideEffectsINTEL = 5608,
|
||||
VectorComputeVariableINTEL = 5624,
|
||||
FuncParamIOKindINTEL = 5625,
|
||||
VectorComputeFunctionINTEL = 5626,
|
||||
StackCallINTEL = 5627,
|
||||
GlobalVariableOffsetINTEL = 5628,
|
||||
CounterBuffer = 5634,
|
||||
HlslCounterBufferGOOGLE = 5634,
|
||||
HlslSemanticGOOGLE = 5635,
|
||||
UserSemantic = 5635,
|
||||
UserTypeGOOGLE = 5636,
|
||||
FunctionRoundingModeINTEL = 5822,
|
||||
FunctionDenormModeINTEL = 5823,
|
||||
RegisterINTEL = 5825,
|
||||
MemoryINTEL = 5826,
|
||||
NumbanksINTEL = 5827,
|
||||
BankwidthINTEL = 5828,
|
||||
MaxPrivateCopiesINTEL = 5829,
|
||||
SinglepumpINTEL = 5830,
|
||||
DoublepumpINTEL = 5831,
|
||||
MaxReplicatesINTEL = 5832,
|
||||
SimpleDualPortINTEL = 5833,
|
||||
MergeINTEL = 5834,
|
||||
BankBitsINTEL = 5835,
|
||||
ForcePow2DepthINTEL = 5836,
|
||||
BurstCoalesceINTEL = 5899,
|
||||
CacheSizeINTEL = 5900,
|
||||
DontStaticallyCoalesceINTEL = 5901,
|
||||
PrefetchINTEL = 5902,
|
||||
StallEnableINTEL = 5905,
|
||||
FuseLoopsInFunctionINTEL = 5907,
|
||||
BufferLocationINTEL = 5921,
|
||||
IOPipeStorageINTEL = 5944,
|
||||
FunctionFloatingPointModeINTEL = 6080,
|
||||
SingleElementVectorINTEL = 6085,
|
||||
VectorComputeCallableFunctionINTEL = 6087,
|
||||
},
|
||||
|
||||
BuiltIn = {
|
||||
@@ -426,8 +565,10 @@ spv = {
|
||||
BaseVertex = 4424,
|
||||
BaseInstance = 4425,
|
||||
DrawIndex = 4426,
|
||||
PrimitiveShadingRateKHR = 4432,
|
||||
DeviceIndex = 4438,
|
||||
ViewIndex = 4440,
|
||||
ShadingRateKHR = 4444,
|
||||
BaryCoordNoPerspAMD = 4992,
|
||||
BaryCoordNoPerspCentroidAMD = 4993,
|
||||
BaryCoordNoPerspSampleAMD = 4994,
|
||||
@@ -442,6 +583,52 @@ spv = {
|
||||
PositionPerViewNV = 5261,
|
||||
ViewportMaskPerViewNV = 5262,
|
||||
FullyCoveredEXT = 5264,
|
||||
TaskCountNV = 5274,
|
||||
PrimitiveCountNV = 5275,
|
||||
PrimitiveIndicesNV = 5276,
|
||||
ClipDistancePerViewNV = 5277,
|
||||
CullDistancePerViewNV = 5278,
|
||||
LayerPerViewNV = 5279,
|
||||
MeshViewCountNV = 5280,
|
||||
MeshViewIndicesNV = 5281,
|
||||
BaryCoordNV = 5286,
|
||||
BaryCoordNoPerspNV = 5287,
|
||||
FragSizeEXT = 5292,
|
||||
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,
|
||||
HitTNV = 5332,
|
||||
HitKindKHR = 5333,
|
||||
HitKindNV = 5333,
|
||||
IncomingRayFlagsKHR = 5351,
|
||||
IncomingRayFlagsNV = 5351,
|
||||
RayGeometryIndexKHR = 5352,
|
||||
WarpsPerSMNV = 5374,
|
||||
SMCountNV = 5375,
|
||||
WarpIDNV = 5376,
|
||||
SMIDNV = 5377,
|
||||
},
|
||||
|
||||
SelectionControlShift = {
|
||||
@@ -460,6 +647,19 @@ spv = {
|
||||
DontUnroll = 1,
|
||||
DependencyInfinite = 2,
|
||||
DependencyLength = 3,
|
||||
MinIterations = 4,
|
||||
MaxIterations = 5,
|
||||
IterationMultiple = 6,
|
||||
PeelCount = 7,
|
||||
PartialCount = 8,
|
||||
InitiationIntervalINTEL = 16,
|
||||
MaxConcurrencyINTEL = 17,
|
||||
DependencyArrayINTEL = 18,
|
||||
PipelineEnableINTEL = 19,
|
||||
LoopCoalesceINTEL = 20,
|
||||
MaxInterleavingINTEL = 21,
|
||||
SpeculatedIterationsINTEL = 22,
|
||||
NoFusionINTEL = 23,
|
||||
},
|
||||
|
||||
LoopControlMask = {
|
||||
@@ -468,6 +668,19 @@ spv = {
|
||||
DontUnroll = 0x00000002,
|
||||
DependencyInfinite = 0x00000004,
|
||||
DependencyLength = 0x00000008,
|
||||
MinIterations = 0x00000010,
|
||||
MaxIterations = 0x00000020,
|
||||
IterationMultiple = 0x00000040,
|
||||
PeelCount = 0x00000080,
|
||||
PartialCount = 0x00000100,
|
||||
InitiationIntervalINTEL = 0x00010000,
|
||||
MaxConcurrencyINTEL = 0x00020000,
|
||||
DependencyArrayINTEL = 0x00040000,
|
||||
PipelineEnableINTEL = 0x00080000,
|
||||
LoopCoalesceINTEL = 0x00100000,
|
||||
MaxInterleavingINTEL = 0x00200000,
|
||||
SpeculatedIterationsINTEL = 0x00400000,
|
||||
NoFusionINTEL = 0x00800000,
|
||||
},
|
||||
|
||||
FunctionControlShift = {
|
||||
@@ -496,6 +709,13 @@ spv = {
|
||||
CrossWorkgroupMemory = 9,
|
||||
AtomicCounterMemory = 10,
|
||||
ImageMemory = 11,
|
||||
OutputMemory = 12,
|
||||
OutputMemoryKHR = 12,
|
||||
MakeAvailable = 13,
|
||||
MakeAvailableKHR = 13,
|
||||
MakeVisible = 14,
|
||||
MakeVisibleKHR = 14,
|
||||
Volatile = 15,
|
||||
},
|
||||
|
||||
MemorySemanticsMask = {
|
||||
@@ -510,12 +730,25 @@ spv = {
|
||||
CrossWorkgroupMemory = 0x00000200,
|
||||
AtomicCounterMemory = 0x00000400,
|
||||
ImageMemory = 0x00000800,
|
||||
OutputMemory = 0x00001000,
|
||||
OutputMemoryKHR = 0x00001000,
|
||||
MakeAvailable = 0x00002000,
|
||||
MakeAvailableKHR = 0x00002000,
|
||||
MakeVisible = 0x00004000,
|
||||
MakeVisibleKHR = 0x00004000,
|
||||
Volatile = 0x00008000,
|
||||
},
|
||||
|
||||
MemoryAccessShift = {
|
||||
Volatile = 0,
|
||||
Aligned = 1,
|
||||
Nontemporal = 2,
|
||||
MakePointerAvailable = 3,
|
||||
MakePointerAvailableKHR = 3,
|
||||
MakePointerVisible = 4,
|
||||
MakePointerVisibleKHR = 4,
|
||||
NonPrivatePointer = 5,
|
||||
NonPrivatePointerKHR = 5,
|
||||
},
|
||||
|
||||
MemoryAccessMask = {
|
||||
@@ -523,6 +756,12 @@ spv = {
|
||||
Volatile = 0x00000001,
|
||||
Aligned = 0x00000002,
|
||||
Nontemporal = 0x00000004,
|
||||
MakePointerAvailable = 0x00000008,
|
||||
MakePointerAvailableKHR = 0x00000008,
|
||||
MakePointerVisible = 0x00000010,
|
||||
MakePointerVisibleKHR = 0x00000010,
|
||||
NonPrivatePointer = 0x00000020,
|
||||
NonPrivatePointerKHR = 0x00000020,
|
||||
},
|
||||
|
||||
Scope = {
|
||||
@@ -531,6 +770,9 @@ spv = {
|
||||
Workgroup = 2,
|
||||
Subgroup = 3,
|
||||
Invocation = 4,
|
||||
QueueFamily = 5,
|
||||
QueueFamilyKHR = 5,
|
||||
ShaderCallKHR = 6,
|
||||
},
|
||||
|
||||
GroupOperation = {
|
||||
@@ -626,8 +868,14 @@ spv = {
|
||||
GroupNonUniformShuffleRelative = 66,
|
||||
GroupNonUniformClustered = 67,
|
||||
GroupNonUniformQuad = 68,
|
||||
ShaderLayer = 69,
|
||||
ShaderViewportIndex = 70,
|
||||
FragmentShadingRateKHR = 4422,
|
||||
SubgroupBallotKHR = 4423,
|
||||
DrawParameters = 4427,
|
||||
WorkgroupMemoryExplicitLayoutKHR = 4428,
|
||||
WorkgroupMemoryExplicitLayout8BitAccessKHR = 4429,
|
||||
WorkgroupMemoryExplicitLayout16BitAccessKHR = 4430,
|
||||
SubgroupVoteKHR = 4431,
|
||||
StorageBuffer16BitAccess = 4433,
|
||||
StorageUniformBufferBlock16 = 4433,
|
||||
@@ -644,11 +892,22 @@ spv = {
|
||||
StorageBuffer8BitAccess = 4448,
|
||||
UniformAndStorageBuffer8BitAccess = 4449,
|
||||
StoragePushConstant8 = 4450,
|
||||
DenormPreserve = 4464,
|
||||
DenormFlushToZero = 4465,
|
||||
SignedZeroInfNanPreserve = 4466,
|
||||
RoundingModeRTE = 4467,
|
||||
RoundingModeRTZ = 4468,
|
||||
RayQueryProvisionalKHR = 4471,
|
||||
RayQueryKHR = 4472,
|
||||
RayTraversalPrimitiveCullingKHR = 4478,
|
||||
RayTracingKHR = 4479,
|
||||
Float16ImageAMD = 5008,
|
||||
ImageGatherBiasLodAMD = 5009,
|
||||
FragmentMaskAMD = 5010,
|
||||
StencilExportEXT = 5013,
|
||||
ImageReadWriteLodAMD = 5015,
|
||||
Int64ImageEXT = 5016,
|
||||
ShaderClockKHR = 5055,
|
||||
SampleMaskOverrideCoverageNV = 5249,
|
||||
GeometryShaderPassthroughNV = 5251,
|
||||
ShaderViewportIndexLayerEXT = 5254,
|
||||
@@ -657,22 +916,158 @@ spv = {
|
||||
ShaderStereoViewNV = 5259,
|
||||
PerViewAttributesNV = 5260,
|
||||
FragmentFullyCoveredEXT = 5265,
|
||||
MeshShadingNV = 5266,
|
||||
ImageFootprintNV = 5282,
|
||||
FragmentBarycentricNV = 5284,
|
||||
ComputeDerivativeGroupQuadsNV = 5288,
|
||||
FragmentDensityEXT = 5291,
|
||||
ShadingRateNV = 5291,
|
||||
GroupNonUniformPartitionedNV = 5297,
|
||||
ShaderNonUniform = 5301,
|
||||
ShaderNonUniformEXT = 5301,
|
||||
RuntimeDescriptorArray = 5302,
|
||||
RuntimeDescriptorArrayEXT = 5302,
|
||||
InputAttachmentArrayDynamicIndexing = 5303,
|
||||
InputAttachmentArrayDynamicIndexingEXT = 5303,
|
||||
UniformTexelBufferArrayDynamicIndexing = 5304,
|
||||
UniformTexelBufferArrayDynamicIndexingEXT = 5304,
|
||||
StorageTexelBufferArrayDynamicIndexing = 5305,
|
||||
StorageTexelBufferArrayDynamicIndexingEXT = 5305,
|
||||
UniformBufferArrayNonUniformIndexing = 5306,
|
||||
UniformBufferArrayNonUniformIndexingEXT = 5306,
|
||||
SampledImageArrayNonUniformIndexing = 5307,
|
||||
SampledImageArrayNonUniformIndexingEXT = 5307,
|
||||
StorageBufferArrayNonUniformIndexing = 5308,
|
||||
StorageBufferArrayNonUniformIndexingEXT = 5308,
|
||||
StorageImageArrayNonUniformIndexing = 5309,
|
||||
StorageImageArrayNonUniformIndexingEXT = 5309,
|
||||
InputAttachmentArrayNonUniformIndexing = 5310,
|
||||
InputAttachmentArrayNonUniformIndexingEXT = 5310,
|
||||
UniformTexelBufferArrayNonUniformIndexing = 5311,
|
||||
UniformTexelBufferArrayNonUniformIndexingEXT = 5311,
|
||||
StorageTexelBufferArrayNonUniformIndexing = 5312,
|
||||
StorageTexelBufferArrayNonUniformIndexingEXT = 5312,
|
||||
RayTracingNV = 5340,
|
||||
VulkanMemoryModel = 5345,
|
||||
VulkanMemoryModelKHR = 5345,
|
||||
VulkanMemoryModelDeviceScope = 5346,
|
||||
VulkanMemoryModelDeviceScopeKHR = 5346,
|
||||
PhysicalStorageBufferAddresses = 5347,
|
||||
PhysicalStorageBufferAddressesEXT = 5347,
|
||||
ComputeDerivativeGroupLinearNV = 5350,
|
||||
RayTracingProvisionalKHR = 5353,
|
||||
CooperativeMatrixNV = 5357,
|
||||
FragmentShaderSampleInterlockEXT = 5363,
|
||||
FragmentShaderShadingRateInterlockEXT = 5372,
|
||||
ShaderSMBuiltinsNV = 5373,
|
||||
FragmentShaderPixelInterlockEXT = 5378,
|
||||
DemoteToHelperInvocationEXT = 5379,
|
||||
SubgroupShuffleINTEL = 5568,
|
||||
SubgroupBufferBlockIOINTEL = 5569,
|
||||
SubgroupImageBlockIOINTEL = 5570,
|
||||
SubgroupImageMediaBlockIOINTEL = 5579,
|
||||
RoundToInfinityINTEL = 5582,
|
||||
FloatingPointModeINTEL = 5583,
|
||||
IntegerFunctions2INTEL = 5584,
|
||||
FunctionPointersINTEL = 5603,
|
||||
IndirectReferencesINTEL = 5604,
|
||||
AsmINTEL = 5606,
|
||||
AtomicFloat32MinMaxEXT = 5612,
|
||||
AtomicFloat64MinMaxEXT = 5613,
|
||||
AtomicFloat16MinMaxEXT = 5616,
|
||||
VectorComputeINTEL = 5617,
|
||||
VectorAnyINTEL = 5619,
|
||||
SubgroupAvcMotionEstimationINTEL = 5696,
|
||||
SubgroupAvcMotionEstimationIntraINTEL = 5697,
|
||||
SubgroupAvcMotionEstimationChromaINTEL = 5698,
|
||||
VariableLengthArrayINTEL = 5817,
|
||||
FunctionFloatControlINTEL = 5821,
|
||||
FPGAMemoryAttributesINTEL = 5824,
|
||||
FPFastMathModeINTEL = 5837,
|
||||
ArbitraryPrecisionIntegersINTEL = 5844,
|
||||
UnstructuredLoopControlsINTEL = 5886,
|
||||
FPGALoopControlsINTEL = 5888,
|
||||
KernelAttributesINTEL = 5892,
|
||||
FPGAKernelAttributesINTEL = 5897,
|
||||
FPGAMemoryAccessesINTEL = 5898,
|
||||
FPGAClusterAttributesINTEL = 5904,
|
||||
LoopFuseINTEL = 5906,
|
||||
FPGABufferLocationINTEL = 5920,
|
||||
USMStorageClassesINTEL = 5935,
|
||||
IOPipesINTEL = 5943,
|
||||
BlockingPipesINTEL = 5945,
|
||||
FPGARegINTEL = 5948,
|
||||
AtomicFloat32AddEXT = 6033,
|
||||
AtomicFloat64AddEXT = 6034,
|
||||
LongConstantCompositeINTEL = 6089,
|
||||
},
|
||||
|
||||
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,
|
||||
},
|
||||
|
||||
FragmentShadingRateShift = {
|
||||
Vertical2Pixels = 0,
|
||||
Vertical4Pixels = 1,
|
||||
Horizontal2Pixels = 2,
|
||||
Horizontal4Pixels = 3,
|
||||
},
|
||||
|
||||
FragmentShadingRateMask = {
|
||||
MaskNone = 0,
|
||||
Vertical2Pixels = 0x00000001,
|
||||
Vertical4Pixels = 0x00000002,
|
||||
Horizontal2Pixels = 0x00000004,
|
||||
Horizontal4Pixels = 0x00000008,
|
||||
},
|
||||
|
||||
FPDenormMode = {
|
||||
Preserve = 0,
|
||||
FlushToZero = 1,
|
||||
},
|
||||
|
||||
FPOperationMode = {
|
||||
IEEE = 0,
|
||||
ALT = 1,
|
||||
},
|
||||
|
||||
Op = {
|
||||
@@ -1016,12 +1411,29 @@ spv = {
|
||||
OpGroupNonUniformLogicalXor = 364,
|
||||
OpGroupNonUniformQuadBroadcast = 365,
|
||||
OpGroupNonUniformQuadSwap = 366,
|
||||
OpCopyLogical = 400,
|
||||
OpPtrEqual = 401,
|
||||
OpPtrNotEqual = 402,
|
||||
OpPtrDiff = 403,
|
||||
OpTerminateInvocation = 4416,
|
||||
OpSubgroupBallotKHR = 4421,
|
||||
OpSubgroupFirstInvocationKHR = 4422,
|
||||
OpSubgroupAllKHR = 4428,
|
||||
OpSubgroupAnyKHR = 4429,
|
||||
OpSubgroupAllEqualKHR = 4430,
|
||||
OpSubgroupReadInvocationKHR = 4432,
|
||||
OpTraceRayKHR = 4445,
|
||||
OpExecuteCallableKHR = 4446,
|
||||
OpConvertUToAccelerationStructureKHR = 4447,
|
||||
OpIgnoreIntersectionKHR = 4448,
|
||||
OpTerminateRayKHR = 4449,
|
||||
OpTypeRayQueryKHR = 4472,
|
||||
OpRayQueryInitializeKHR = 4473,
|
||||
OpRayQueryTerminateKHR = 4474,
|
||||
OpRayQueryGenerateIntersectionKHR = 4475,
|
||||
OpRayQueryConfirmIntersectionKHR = 4476,
|
||||
OpRayQueryProceedKHR = 4477,
|
||||
OpRayQueryGetIntersectionTypeKHR = 4479,
|
||||
OpGroupIAddNonUniformAMD = 5000,
|
||||
OpGroupFAddNonUniformAMD = 5001,
|
||||
OpGroupFMinNonUniformAMD = 5002,
|
||||
@@ -1032,7 +1444,27 @@ spv = {
|
||||
OpGroupSMaxNonUniformAMD = 5007,
|
||||
OpFragmentMaskFetchAMD = 5011,
|
||||
OpFragmentFetchAMD = 5012,
|
||||
OpReadClockKHR = 5056,
|
||||
OpImageSampleFootprintNV = 5283,
|
||||
OpGroupNonUniformPartitionNV = 5296,
|
||||
OpWritePackedPrimitiveIndices4x8NV = 5299,
|
||||
OpReportIntersectionKHR = 5334,
|
||||
OpReportIntersectionNV = 5334,
|
||||
OpIgnoreIntersectionNV = 5335,
|
||||
OpTerminateRayNV = 5336,
|
||||
OpTraceNV = 5337,
|
||||
OpTypeAccelerationStructureKHR = 5341,
|
||||
OpTypeAccelerationStructureNV = 5341,
|
||||
OpExecuteCallableNV = 5344,
|
||||
OpTypeCooperativeMatrixNV = 5358,
|
||||
OpCooperativeMatrixLoadNV = 5359,
|
||||
OpCooperativeMatrixStoreNV = 5360,
|
||||
OpCooperativeMatrixMulAddNV = 5361,
|
||||
OpCooperativeMatrixLengthNV = 5362,
|
||||
OpBeginInvocationInterlockEXT = 5364,
|
||||
OpEndInvocationInterlockEXT = 5365,
|
||||
OpDemoteToHelperInvocationEXT = 5380,
|
||||
OpIsHelperInvocationEXT = 5381,
|
||||
OpSubgroupShuffleINTEL = 5571,
|
||||
OpSubgroupShuffleDownINTEL = 5572,
|
||||
OpSubgroupShuffleUpINTEL = 5573,
|
||||
@@ -1041,8 +1473,182 @@ spv = {
|
||||
OpSubgroupBlockWriteINTEL = 5576,
|
||||
OpSubgroupImageBlockReadINTEL = 5577,
|
||||
OpSubgroupImageBlockWriteINTEL = 5578,
|
||||
OpSubgroupImageMediaBlockReadINTEL = 5580,
|
||||
OpSubgroupImageMediaBlockWriteINTEL = 5581,
|
||||
OpUCountLeadingZerosINTEL = 5585,
|
||||
OpUCountTrailingZerosINTEL = 5586,
|
||||
OpAbsISubINTEL = 5587,
|
||||
OpAbsUSubINTEL = 5588,
|
||||
OpIAddSatINTEL = 5589,
|
||||
OpUAddSatINTEL = 5590,
|
||||
OpIAverageINTEL = 5591,
|
||||
OpUAverageINTEL = 5592,
|
||||
OpIAverageRoundedINTEL = 5593,
|
||||
OpUAverageRoundedINTEL = 5594,
|
||||
OpISubSatINTEL = 5595,
|
||||
OpUSubSatINTEL = 5596,
|
||||
OpIMul32x16INTEL = 5597,
|
||||
OpUMul32x16INTEL = 5598,
|
||||
OpConstFunctionPointerINTEL = 5600,
|
||||
OpFunctionPointerCallINTEL = 5601,
|
||||
OpAsmTargetINTEL = 5609,
|
||||
OpAsmINTEL = 5610,
|
||||
OpAsmCallINTEL = 5611,
|
||||
OpAtomicFMinEXT = 5614,
|
||||
OpAtomicFMaxEXT = 5615,
|
||||
OpDecorateString = 5632,
|
||||
OpDecorateStringGOOGLE = 5632,
|
||||
OpMemberDecorateString = 5633,
|
||||
OpMemberDecorateStringGOOGLE = 5633,
|
||||
OpVmeImageINTEL = 5699,
|
||||
OpTypeVmeImageINTEL = 5700,
|
||||
OpTypeAvcImePayloadINTEL = 5701,
|
||||
OpTypeAvcRefPayloadINTEL = 5702,
|
||||
OpTypeAvcSicPayloadINTEL = 5703,
|
||||
OpTypeAvcMcePayloadINTEL = 5704,
|
||||
OpTypeAvcMceResultINTEL = 5705,
|
||||
OpTypeAvcImeResultINTEL = 5706,
|
||||
OpTypeAvcImeResultSingleReferenceStreamoutINTEL = 5707,
|
||||
OpTypeAvcImeResultDualReferenceStreamoutINTEL = 5708,
|
||||
OpTypeAvcImeSingleReferenceStreaminINTEL = 5709,
|
||||
OpTypeAvcImeDualReferenceStreaminINTEL = 5710,
|
||||
OpTypeAvcRefResultINTEL = 5711,
|
||||
OpTypeAvcSicResultINTEL = 5712,
|
||||
OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL = 5713,
|
||||
OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL = 5714,
|
||||
OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL = 5715,
|
||||
OpSubgroupAvcMceSetInterShapePenaltyINTEL = 5716,
|
||||
OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL = 5717,
|
||||
OpSubgroupAvcMceSetInterDirectionPenaltyINTEL = 5718,
|
||||
OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL = 5719,
|
||||
OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL = 5720,
|
||||
OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL = 5721,
|
||||
OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL = 5722,
|
||||
OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL = 5723,
|
||||
OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL = 5724,
|
||||
OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL = 5725,
|
||||
OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL = 5726,
|
||||
OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL = 5727,
|
||||
OpSubgroupAvcMceSetAcOnlyHaarINTEL = 5728,
|
||||
OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL = 5729,
|
||||
OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL = 5730,
|
||||
OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL = 5731,
|
||||
OpSubgroupAvcMceConvertToImePayloadINTEL = 5732,
|
||||
OpSubgroupAvcMceConvertToImeResultINTEL = 5733,
|
||||
OpSubgroupAvcMceConvertToRefPayloadINTEL = 5734,
|
||||
OpSubgroupAvcMceConvertToRefResultINTEL = 5735,
|
||||
OpSubgroupAvcMceConvertToSicPayloadINTEL = 5736,
|
||||
OpSubgroupAvcMceConvertToSicResultINTEL = 5737,
|
||||
OpSubgroupAvcMceGetMotionVectorsINTEL = 5738,
|
||||
OpSubgroupAvcMceGetInterDistortionsINTEL = 5739,
|
||||
OpSubgroupAvcMceGetBestInterDistortionsINTEL = 5740,
|
||||
OpSubgroupAvcMceGetInterMajorShapeINTEL = 5741,
|
||||
OpSubgroupAvcMceGetInterMinorShapeINTEL = 5742,
|
||||
OpSubgroupAvcMceGetInterDirectionsINTEL = 5743,
|
||||
OpSubgroupAvcMceGetInterMotionVectorCountINTEL = 5744,
|
||||
OpSubgroupAvcMceGetInterReferenceIdsINTEL = 5745,
|
||||
OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL = 5746,
|
||||
OpSubgroupAvcImeInitializeINTEL = 5747,
|
||||
OpSubgroupAvcImeSetSingleReferenceINTEL = 5748,
|
||||
OpSubgroupAvcImeSetDualReferenceINTEL = 5749,
|
||||
OpSubgroupAvcImeRefWindowSizeINTEL = 5750,
|
||||
OpSubgroupAvcImeAdjustRefOffsetINTEL = 5751,
|
||||
OpSubgroupAvcImeConvertToMcePayloadINTEL = 5752,
|
||||
OpSubgroupAvcImeSetMaxMotionVectorCountINTEL = 5753,
|
||||
OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL = 5754,
|
||||
OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL = 5755,
|
||||
OpSubgroupAvcImeSetWeightedSadINTEL = 5756,
|
||||
OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL = 5757,
|
||||
OpSubgroupAvcImeEvaluateWithDualReferenceINTEL = 5758,
|
||||
OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL = 5759,
|
||||
OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL = 5760,
|
||||
OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL = 5761,
|
||||
OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL = 5762,
|
||||
OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL = 5763,
|
||||
OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL = 5764,
|
||||
OpSubgroupAvcImeConvertToMceResultINTEL = 5765,
|
||||
OpSubgroupAvcImeGetSingleReferenceStreaminINTEL = 5766,
|
||||
OpSubgroupAvcImeGetDualReferenceStreaminINTEL = 5767,
|
||||
OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL = 5768,
|
||||
OpSubgroupAvcImeStripDualReferenceStreamoutINTEL = 5769,
|
||||
OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL = 5770,
|
||||
OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL = 5771,
|
||||
OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL = 5772,
|
||||
OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL = 5773,
|
||||
OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL = 5774,
|
||||
OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL = 5775,
|
||||
OpSubgroupAvcImeGetBorderReachedINTEL = 5776,
|
||||
OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL = 5777,
|
||||
OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL = 5778,
|
||||
OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL = 5779,
|
||||
OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL = 5780,
|
||||
OpSubgroupAvcFmeInitializeINTEL = 5781,
|
||||
OpSubgroupAvcBmeInitializeINTEL = 5782,
|
||||
OpSubgroupAvcRefConvertToMcePayloadINTEL = 5783,
|
||||
OpSubgroupAvcRefSetBidirectionalMixDisableINTEL = 5784,
|
||||
OpSubgroupAvcRefSetBilinearFilterEnableINTEL = 5785,
|
||||
OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL = 5786,
|
||||
OpSubgroupAvcRefEvaluateWithDualReferenceINTEL = 5787,
|
||||
OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL = 5788,
|
||||
OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL = 5789,
|
||||
OpSubgroupAvcRefConvertToMceResultINTEL = 5790,
|
||||
OpSubgroupAvcSicInitializeINTEL = 5791,
|
||||
OpSubgroupAvcSicConfigureSkcINTEL = 5792,
|
||||
OpSubgroupAvcSicConfigureIpeLumaINTEL = 5793,
|
||||
OpSubgroupAvcSicConfigureIpeLumaChromaINTEL = 5794,
|
||||
OpSubgroupAvcSicGetMotionVectorMaskINTEL = 5795,
|
||||
OpSubgroupAvcSicConvertToMcePayloadINTEL = 5796,
|
||||
OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL = 5797,
|
||||
OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL = 5798,
|
||||
OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL = 5799,
|
||||
OpSubgroupAvcSicSetBilinearFilterEnableINTEL = 5800,
|
||||
OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL = 5801,
|
||||
OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL = 5802,
|
||||
OpSubgroupAvcSicEvaluateIpeINTEL = 5803,
|
||||
OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL = 5804,
|
||||
OpSubgroupAvcSicEvaluateWithDualReferenceINTEL = 5805,
|
||||
OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL = 5806,
|
||||
OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL = 5807,
|
||||
OpSubgroupAvcSicConvertToMceResultINTEL = 5808,
|
||||
OpSubgroupAvcSicGetIpeLumaShapeINTEL = 5809,
|
||||
OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL = 5810,
|
||||
OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL = 5811,
|
||||
OpSubgroupAvcSicGetPackedIpeLumaModesINTEL = 5812,
|
||||
OpSubgroupAvcSicGetIpeChromaModeINTEL = 5813,
|
||||
OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814,
|
||||
OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815,
|
||||
OpSubgroupAvcSicGetInterRawSadsINTEL = 5816,
|
||||
OpVariableLengthArrayINTEL = 5818,
|
||||
OpSaveMemoryINTEL = 5819,
|
||||
OpRestoreMemoryINTEL = 5820,
|
||||
OpLoopControlINTEL = 5887,
|
||||
OpPtrCastToCrossWorkgroupINTEL = 5934,
|
||||
OpCrossWorkgroupCastToPtrINTEL = 5938,
|
||||
OpReadPipeBlockingINTEL = 5946,
|
||||
OpWritePipeBlockingINTEL = 5947,
|
||||
OpFPGARegINTEL = 5949,
|
||||
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,
|
||||
OpAtomicFAddEXT = 6035,
|
||||
OpTypeBufferSurfaceINTEL = 6086,
|
||||
OpTypeStructContinuedINTEL = 6090,
|
||||
OpConstantCompositeContinuedINTEL = 6091,
|
||||
OpSpecConstantCompositeContinuedINTEL = 6092,
|
||||
},
|
||||
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2014-2018 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"),
|
||||
@@ -26,13 +26,16 @@
|
||||
# the Binary Section of the SPIR-V specification.
|
||||
|
||||
# Enumeration tokens for SPIR-V, in various styles:
|
||||
# C, C++, C++11, JSON, Lua, Python
|
||||
# C, C++, C++11, JSON, Lua, Python, C#, D
|
||||
#
|
||||
# - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
|
||||
# - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
|
||||
# - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
|
||||
# - Lua will use tables, e.g.: spv.SourceLanguage.GLSL
|
||||
# - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL']
|
||||
# - C# will use enum classes in the Specification class located in the "Spv" namespace,
|
||||
# e.g.: Spv.Specification.SourceLanguage.GLSL
|
||||
# - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL
|
||||
#
|
||||
# Some tokens act like mask values, which can be OR'd together,
|
||||
# while others are mutually exclusive. The mask-like ones have
|
||||
@@ -41,8 +44,8 @@
|
||||
|
||||
spv = {
|
||||
'MagicNumber' : 0x07230203,
|
||||
'Version' : 0x00010300,
|
||||
'Revision' : 1,
|
||||
'Version' : 0x00010500,
|
||||
'Revision' : 4,
|
||||
'OpCodeMask' : 0xffff,
|
||||
'WordCountShift' : 16,
|
||||
|
||||
@@ -63,18 +66,36 @@ spv = {
|
||||
'Fragment' : 4,
|
||||
'GLCompute' : 5,
|
||||
'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,
|
||||
},
|
||||
|
||||
'AddressingModel' : {
|
||||
'Logical' : 0,
|
||||
'Physical32' : 1,
|
||||
'Physical64' : 2,
|
||||
'PhysicalStorageBuffer64' : 5348,
|
||||
'PhysicalStorageBuffer64EXT' : 5348,
|
||||
},
|
||||
|
||||
'MemoryModel' : {
|
||||
'Simple' : 0,
|
||||
'GLSL450' : 1,
|
||||
'OpenCL' : 2,
|
||||
'Vulkan' : 3,
|
||||
'VulkanKHR' : 3,
|
||||
},
|
||||
|
||||
'ExecutionMode' : {
|
||||
@@ -117,7 +138,33 @@ spv = {
|
||||
'LocalSizeId' : 38,
|
||||
'LocalSizeHintId' : 39,
|
||||
'PostDepthCoverage' : 4446,
|
||||
'DenormPreserve' : 4459,
|
||||
'DenormFlushToZero' : 4460,
|
||||
'SignedZeroInfNanPreserve' : 4461,
|
||||
'RoundingModeRTE' : 4462,
|
||||
'RoundingModeRTZ' : 4463,
|
||||
'StencilRefReplacingEXT' : 5027,
|
||||
'OutputLinesNV' : 5269,
|
||||
'OutputPrimitivesNV' : 5270,
|
||||
'DerivativeGroupQuadsNV' : 5289,
|
||||
'DerivativeGroupLinearNV' : 5290,
|
||||
'OutputTrianglesNV' : 5298,
|
||||
'PixelInterlockOrderedEXT' : 5366,
|
||||
'PixelInterlockUnorderedEXT' : 5367,
|
||||
'SampleInterlockOrderedEXT' : 5368,
|
||||
'SampleInterlockUnorderedEXT' : 5369,
|
||||
'ShadingRateInterlockOrderedEXT' : 5370,
|
||||
'ShadingRateInterlockUnorderedEXT' : 5371,
|
||||
'SharedLocalMemorySizeINTEL' : 5618,
|
||||
'RoundingModeRTPINTEL' : 5620,
|
||||
'RoundingModeRTNINTEL' : 5621,
|
||||
'FloatingPointModeALTINTEL' : 5622,
|
||||
'FloatingPointModeIEEEINTEL' : 5623,
|
||||
'MaxWorkgroupSizeINTEL' : 5893,
|
||||
'MaxWorkDimINTEL' : 5894,
|
||||
'NoGlobalOffsetINTEL' : 5895,
|
||||
'NumSIMDWorkitemsINTEL' : 5896,
|
||||
'SchedulerTargetFmaxMhzINTEL' : 5903,
|
||||
},
|
||||
|
||||
'StorageClass' : {
|
||||
@@ -134,6 +181,23 @@ 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,
|
||||
'CodeSectionINTEL' : 5605,
|
||||
'DeviceOnlyINTEL' : 5936,
|
||||
'HostOnlyINTEL' : 5937,
|
||||
},
|
||||
|
||||
'Dim' : {
|
||||
@@ -200,6 +264,8 @@ spv = {
|
||||
'Rg8ui' : 37,
|
||||
'R16ui' : 38,
|
||||
'R8ui' : 39,
|
||||
'R64ui' : 40,
|
||||
'R64i' : 41,
|
||||
},
|
||||
|
||||
'ImageChannelOrder' : {
|
||||
@@ -254,6 +320,16 @@ spv = {
|
||||
'ConstOffsets' : 5,
|
||||
'Sample' : 6,
|
||||
'MinLod' : 7,
|
||||
'MakeTexelAvailable' : 8,
|
||||
'MakeTexelAvailableKHR' : 8,
|
||||
'MakeTexelVisible' : 9,
|
||||
'MakeTexelVisibleKHR' : 9,
|
||||
'NonPrivateTexel' : 10,
|
||||
'NonPrivateTexelKHR' : 10,
|
||||
'VolatileTexel' : 11,
|
||||
'VolatileTexelKHR' : 11,
|
||||
'SignExtend' : 12,
|
||||
'ZeroExtend' : 13,
|
||||
},
|
||||
|
||||
'ImageOperandsMask' : {
|
||||
@@ -266,6 +342,16 @@ spv = {
|
||||
'ConstOffsets' : 0x00000020,
|
||||
'Sample' : 0x00000040,
|
||||
'MinLod' : 0x00000080,
|
||||
'MakeTexelAvailable' : 0x00000100,
|
||||
'MakeTexelAvailableKHR' : 0x00000100,
|
||||
'MakeTexelVisible' : 0x00000200,
|
||||
'MakeTexelVisibleKHR' : 0x00000200,
|
||||
'NonPrivateTexel' : 0x00000400,
|
||||
'NonPrivateTexelKHR' : 0x00000400,
|
||||
'VolatileTexel' : 0x00000800,
|
||||
'VolatileTexelKHR' : 0x00000800,
|
||||
'SignExtend' : 0x00001000,
|
||||
'ZeroExtend' : 0x00002000,
|
||||
},
|
||||
|
||||
'FPFastMathModeShift' : {
|
||||
@@ -274,6 +360,8 @@ spv = {
|
||||
'NSZ' : 2,
|
||||
'AllowRecip' : 3,
|
||||
'Fast' : 4,
|
||||
'AllowContractFastINTEL' : 16,
|
||||
'AllowReassocINTEL' : 17,
|
||||
},
|
||||
|
||||
'FPFastMathModeMask' : {
|
||||
@@ -283,6 +371,8 @@ spv = {
|
||||
'NSZ' : 0x00000004,
|
||||
'AllowRecip' : 0x00000008,
|
||||
'Fast' : 0x00000010,
|
||||
'AllowContractFastINTEL' : 0x00010000,
|
||||
'AllowReassocINTEL' : 0x00020000,
|
||||
},
|
||||
|
||||
'FPRoundingMode' : {
|
||||
@@ -341,6 +431,7 @@ spv = {
|
||||
'NonWritable' : 24,
|
||||
'NonReadable' : 25,
|
||||
'Uniform' : 26,
|
||||
'UniformId' : 27,
|
||||
'SaturatedConversion' : 28,
|
||||
'Stream' : 29,
|
||||
'Location' : 30,
|
||||
@@ -361,14 +452,62 @@ spv = {
|
||||
'MaxByteOffset' : 45,
|
||||
'AlignmentId' : 46,
|
||||
'MaxByteOffsetId' : 47,
|
||||
'NoSignedWrap' : 4469,
|
||||
'NoUnsignedWrap' : 4470,
|
||||
'ExplicitInterpAMD' : 4999,
|
||||
'OverrideCoverageNV' : 5248,
|
||||
'PassthroughNV' : 5250,
|
||||
'ViewportRelativeNV' : 5252,
|
||||
'SecondaryViewportRelativeNV' : 5256,
|
||||
'PerPrimitiveNV' : 5271,
|
||||
'PerViewNV' : 5272,
|
||||
'PerTaskNV' : 5273,
|
||||
'PerVertexNV' : 5285,
|
||||
'NonUniform' : 5300,
|
||||
'NonUniformEXT' : 5300,
|
||||
'RestrictPointer' : 5355,
|
||||
'RestrictPointerEXT' : 5355,
|
||||
'AliasedPointer' : 5356,
|
||||
'AliasedPointerEXT' : 5356,
|
||||
'SIMTCallINTEL' : 5599,
|
||||
'ReferencedIndirectlyINTEL' : 5602,
|
||||
'ClobberINTEL' : 5607,
|
||||
'SideEffectsINTEL' : 5608,
|
||||
'VectorComputeVariableINTEL' : 5624,
|
||||
'FuncParamIOKindINTEL' : 5625,
|
||||
'VectorComputeFunctionINTEL' : 5626,
|
||||
'StackCallINTEL' : 5627,
|
||||
'GlobalVariableOffsetINTEL' : 5628,
|
||||
'CounterBuffer' : 5634,
|
||||
'HlslCounterBufferGOOGLE' : 5634,
|
||||
'HlslSemanticGOOGLE' : 5635,
|
||||
'UserSemantic' : 5635,
|
||||
'UserTypeGOOGLE' : 5636,
|
||||
'FunctionRoundingModeINTEL' : 5822,
|
||||
'FunctionDenormModeINTEL' : 5823,
|
||||
'RegisterINTEL' : 5825,
|
||||
'MemoryINTEL' : 5826,
|
||||
'NumbanksINTEL' : 5827,
|
||||
'BankwidthINTEL' : 5828,
|
||||
'MaxPrivateCopiesINTEL' : 5829,
|
||||
'SinglepumpINTEL' : 5830,
|
||||
'DoublepumpINTEL' : 5831,
|
||||
'MaxReplicatesINTEL' : 5832,
|
||||
'SimpleDualPortINTEL' : 5833,
|
||||
'MergeINTEL' : 5834,
|
||||
'BankBitsINTEL' : 5835,
|
||||
'ForcePow2DepthINTEL' : 5836,
|
||||
'BurstCoalesceINTEL' : 5899,
|
||||
'CacheSizeINTEL' : 5900,
|
||||
'DontStaticallyCoalesceINTEL' : 5901,
|
||||
'PrefetchINTEL' : 5902,
|
||||
'StallEnableINTEL' : 5905,
|
||||
'FuseLoopsInFunctionINTEL' : 5907,
|
||||
'BufferLocationINTEL' : 5921,
|
||||
'IOPipeStorageINTEL' : 5944,
|
||||
'FunctionFloatingPointModeINTEL' : 6080,
|
||||
'SingleElementVectorINTEL' : 6085,
|
||||
'VectorComputeCallableFunctionINTEL' : 6087,
|
||||
},
|
||||
|
||||
'BuiltIn' : {
|
||||
@@ -426,8 +565,10 @@ spv = {
|
||||
'BaseVertex' : 4424,
|
||||
'BaseInstance' : 4425,
|
||||
'DrawIndex' : 4426,
|
||||
'PrimitiveShadingRateKHR' : 4432,
|
||||
'DeviceIndex' : 4438,
|
||||
'ViewIndex' : 4440,
|
||||
'ShadingRateKHR' : 4444,
|
||||
'BaryCoordNoPerspAMD' : 4992,
|
||||
'BaryCoordNoPerspCentroidAMD' : 4993,
|
||||
'BaryCoordNoPerspSampleAMD' : 4994,
|
||||
@@ -442,6 +583,52 @@ spv = {
|
||||
'PositionPerViewNV' : 5261,
|
||||
'ViewportMaskPerViewNV' : 5262,
|
||||
'FullyCoveredEXT' : 5264,
|
||||
'TaskCountNV' : 5274,
|
||||
'PrimitiveCountNV' : 5275,
|
||||
'PrimitiveIndicesNV' : 5276,
|
||||
'ClipDistancePerViewNV' : 5277,
|
||||
'CullDistancePerViewNV' : 5278,
|
||||
'LayerPerViewNV' : 5279,
|
||||
'MeshViewCountNV' : 5280,
|
||||
'MeshViewIndicesNV' : 5281,
|
||||
'BaryCoordNV' : 5286,
|
||||
'BaryCoordNoPerspNV' : 5287,
|
||||
'FragSizeEXT' : 5292,
|
||||
'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,
|
||||
'HitTNV' : 5332,
|
||||
'HitKindKHR' : 5333,
|
||||
'HitKindNV' : 5333,
|
||||
'IncomingRayFlagsKHR' : 5351,
|
||||
'IncomingRayFlagsNV' : 5351,
|
||||
'RayGeometryIndexKHR' : 5352,
|
||||
'WarpsPerSMNV' : 5374,
|
||||
'SMCountNV' : 5375,
|
||||
'WarpIDNV' : 5376,
|
||||
'SMIDNV' : 5377,
|
||||
},
|
||||
|
||||
'SelectionControlShift' : {
|
||||
@@ -460,6 +647,19 @@ spv = {
|
||||
'DontUnroll' : 1,
|
||||
'DependencyInfinite' : 2,
|
||||
'DependencyLength' : 3,
|
||||
'MinIterations' : 4,
|
||||
'MaxIterations' : 5,
|
||||
'IterationMultiple' : 6,
|
||||
'PeelCount' : 7,
|
||||
'PartialCount' : 8,
|
||||
'InitiationIntervalINTEL' : 16,
|
||||
'MaxConcurrencyINTEL' : 17,
|
||||
'DependencyArrayINTEL' : 18,
|
||||
'PipelineEnableINTEL' : 19,
|
||||
'LoopCoalesceINTEL' : 20,
|
||||
'MaxInterleavingINTEL' : 21,
|
||||
'SpeculatedIterationsINTEL' : 22,
|
||||
'NoFusionINTEL' : 23,
|
||||
},
|
||||
|
||||
'LoopControlMask' : {
|
||||
@@ -468,6 +668,19 @@ spv = {
|
||||
'DontUnroll' : 0x00000002,
|
||||
'DependencyInfinite' : 0x00000004,
|
||||
'DependencyLength' : 0x00000008,
|
||||
'MinIterations' : 0x00000010,
|
||||
'MaxIterations' : 0x00000020,
|
||||
'IterationMultiple' : 0x00000040,
|
||||
'PeelCount' : 0x00000080,
|
||||
'PartialCount' : 0x00000100,
|
||||
'InitiationIntervalINTEL' : 0x00010000,
|
||||
'MaxConcurrencyINTEL' : 0x00020000,
|
||||
'DependencyArrayINTEL' : 0x00040000,
|
||||
'PipelineEnableINTEL' : 0x00080000,
|
||||
'LoopCoalesceINTEL' : 0x00100000,
|
||||
'MaxInterleavingINTEL' : 0x00200000,
|
||||
'SpeculatedIterationsINTEL' : 0x00400000,
|
||||
'NoFusionINTEL' : 0x00800000,
|
||||
},
|
||||
|
||||
'FunctionControlShift' : {
|
||||
@@ -496,6 +709,13 @@ spv = {
|
||||
'CrossWorkgroupMemory' : 9,
|
||||
'AtomicCounterMemory' : 10,
|
||||
'ImageMemory' : 11,
|
||||
'OutputMemory' : 12,
|
||||
'OutputMemoryKHR' : 12,
|
||||
'MakeAvailable' : 13,
|
||||
'MakeAvailableKHR' : 13,
|
||||
'MakeVisible' : 14,
|
||||
'MakeVisibleKHR' : 14,
|
||||
'Volatile' : 15,
|
||||
},
|
||||
|
||||
'MemorySemanticsMask' : {
|
||||
@@ -510,12 +730,25 @@ spv = {
|
||||
'CrossWorkgroupMemory' : 0x00000200,
|
||||
'AtomicCounterMemory' : 0x00000400,
|
||||
'ImageMemory' : 0x00000800,
|
||||
'OutputMemory' : 0x00001000,
|
||||
'OutputMemoryKHR' : 0x00001000,
|
||||
'MakeAvailable' : 0x00002000,
|
||||
'MakeAvailableKHR' : 0x00002000,
|
||||
'MakeVisible' : 0x00004000,
|
||||
'MakeVisibleKHR' : 0x00004000,
|
||||
'Volatile' : 0x00008000,
|
||||
},
|
||||
|
||||
'MemoryAccessShift' : {
|
||||
'Volatile' : 0,
|
||||
'Aligned' : 1,
|
||||
'Nontemporal' : 2,
|
||||
'MakePointerAvailable' : 3,
|
||||
'MakePointerAvailableKHR' : 3,
|
||||
'MakePointerVisible' : 4,
|
||||
'MakePointerVisibleKHR' : 4,
|
||||
'NonPrivatePointer' : 5,
|
||||
'NonPrivatePointerKHR' : 5,
|
||||
},
|
||||
|
||||
'MemoryAccessMask' : {
|
||||
@@ -523,6 +756,12 @@ spv = {
|
||||
'Volatile' : 0x00000001,
|
||||
'Aligned' : 0x00000002,
|
||||
'Nontemporal' : 0x00000004,
|
||||
'MakePointerAvailable' : 0x00000008,
|
||||
'MakePointerAvailableKHR' : 0x00000008,
|
||||
'MakePointerVisible' : 0x00000010,
|
||||
'MakePointerVisibleKHR' : 0x00000010,
|
||||
'NonPrivatePointer' : 0x00000020,
|
||||
'NonPrivatePointerKHR' : 0x00000020,
|
||||
},
|
||||
|
||||
'Scope' : {
|
||||
@@ -531,6 +770,9 @@ spv = {
|
||||
'Workgroup' : 2,
|
||||
'Subgroup' : 3,
|
||||
'Invocation' : 4,
|
||||
'QueueFamily' : 5,
|
||||
'QueueFamilyKHR' : 5,
|
||||
'ShaderCallKHR' : 6,
|
||||
},
|
||||
|
||||
'GroupOperation' : {
|
||||
@@ -626,8 +868,14 @@ spv = {
|
||||
'GroupNonUniformShuffleRelative' : 66,
|
||||
'GroupNonUniformClustered' : 67,
|
||||
'GroupNonUniformQuad' : 68,
|
||||
'ShaderLayer' : 69,
|
||||
'ShaderViewportIndex' : 70,
|
||||
'FragmentShadingRateKHR' : 4422,
|
||||
'SubgroupBallotKHR' : 4423,
|
||||
'DrawParameters' : 4427,
|
||||
'WorkgroupMemoryExplicitLayoutKHR' : 4428,
|
||||
'WorkgroupMemoryExplicitLayout8BitAccessKHR' : 4429,
|
||||
'WorkgroupMemoryExplicitLayout16BitAccessKHR' : 4430,
|
||||
'SubgroupVoteKHR' : 4431,
|
||||
'StorageBuffer16BitAccess' : 4433,
|
||||
'StorageUniformBufferBlock16' : 4433,
|
||||
@@ -644,11 +892,22 @@ spv = {
|
||||
'StorageBuffer8BitAccess' : 4448,
|
||||
'UniformAndStorageBuffer8BitAccess' : 4449,
|
||||
'StoragePushConstant8' : 4450,
|
||||
'DenormPreserve' : 4464,
|
||||
'DenormFlushToZero' : 4465,
|
||||
'SignedZeroInfNanPreserve' : 4466,
|
||||
'RoundingModeRTE' : 4467,
|
||||
'RoundingModeRTZ' : 4468,
|
||||
'RayQueryProvisionalKHR' : 4471,
|
||||
'RayQueryKHR' : 4472,
|
||||
'RayTraversalPrimitiveCullingKHR' : 4478,
|
||||
'RayTracingKHR' : 4479,
|
||||
'Float16ImageAMD' : 5008,
|
||||
'ImageGatherBiasLodAMD' : 5009,
|
||||
'FragmentMaskAMD' : 5010,
|
||||
'StencilExportEXT' : 5013,
|
||||
'ImageReadWriteLodAMD' : 5015,
|
||||
'Int64ImageEXT' : 5016,
|
||||
'ShaderClockKHR' : 5055,
|
||||
'SampleMaskOverrideCoverageNV' : 5249,
|
||||
'GeometryShaderPassthroughNV' : 5251,
|
||||
'ShaderViewportIndexLayerEXT' : 5254,
|
||||
@@ -657,22 +916,158 @@ spv = {
|
||||
'ShaderStereoViewNV' : 5259,
|
||||
'PerViewAttributesNV' : 5260,
|
||||
'FragmentFullyCoveredEXT' : 5265,
|
||||
'MeshShadingNV' : 5266,
|
||||
'ImageFootprintNV' : 5282,
|
||||
'FragmentBarycentricNV' : 5284,
|
||||
'ComputeDerivativeGroupQuadsNV' : 5288,
|
||||
'FragmentDensityEXT' : 5291,
|
||||
'ShadingRateNV' : 5291,
|
||||
'GroupNonUniformPartitionedNV' : 5297,
|
||||
'ShaderNonUniform' : 5301,
|
||||
'ShaderNonUniformEXT' : 5301,
|
||||
'RuntimeDescriptorArray' : 5302,
|
||||
'RuntimeDescriptorArrayEXT' : 5302,
|
||||
'InputAttachmentArrayDynamicIndexing' : 5303,
|
||||
'InputAttachmentArrayDynamicIndexingEXT' : 5303,
|
||||
'UniformTexelBufferArrayDynamicIndexing' : 5304,
|
||||
'UniformTexelBufferArrayDynamicIndexingEXT' : 5304,
|
||||
'StorageTexelBufferArrayDynamicIndexing' : 5305,
|
||||
'StorageTexelBufferArrayDynamicIndexingEXT' : 5305,
|
||||
'UniformBufferArrayNonUniformIndexing' : 5306,
|
||||
'UniformBufferArrayNonUniformIndexingEXT' : 5306,
|
||||
'SampledImageArrayNonUniformIndexing' : 5307,
|
||||
'SampledImageArrayNonUniformIndexingEXT' : 5307,
|
||||
'StorageBufferArrayNonUniformIndexing' : 5308,
|
||||
'StorageBufferArrayNonUniformIndexingEXT' : 5308,
|
||||
'StorageImageArrayNonUniformIndexing' : 5309,
|
||||
'StorageImageArrayNonUniformIndexingEXT' : 5309,
|
||||
'InputAttachmentArrayNonUniformIndexing' : 5310,
|
||||
'InputAttachmentArrayNonUniformIndexingEXT' : 5310,
|
||||
'UniformTexelBufferArrayNonUniformIndexing' : 5311,
|
||||
'UniformTexelBufferArrayNonUniformIndexingEXT' : 5311,
|
||||
'StorageTexelBufferArrayNonUniformIndexing' : 5312,
|
||||
'StorageTexelBufferArrayNonUniformIndexingEXT' : 5312,
|
||||
'RayTracingNV' : 5340,
|
||||
'VulkanMemoryModel' : 5345,
|
||||
'VulkanMemoryModelKHR' : 5345,
|
||||
'VulkanMemoryModelDeviceScope' : 5346,
|
||||
'VulkanMemoryModelDeviceScopeKHR' : 5346,
|
||||
'PhysicalStorageBufferAddresses' : 5347,
|
||||
'PhysicalStorageBufferAddressesEXT' : 5347,
|
||||
'ComputeDerivativeGroupLinearNV' : 5350,
|
||||
'RayTracingProvisionalKHR' : 5353,
|
||||
'CooperativeMatrixNV' : 5357,
|
||||
'FragmentShaderSampleInterlockEXT' : 5363,
|
||||
'FragmentShaderShadingRateInterlockEXT' : 5372,
|
||||
'ShaderSMBuiltinsNV' : 5373,
|
||||
'FragmentShaderPixelInterlockEXT' : 5378,
|
||||
'DemoteToHelperInvocationEXT' : 5379,
|
||||
'SubgroupShuffleINTEL' : 5568,
|
||||
'SubgroupBufferBlockIOINTEL' : 5569,
|
||||
'SubgroupImageBlockIOINTEL' : 5570,
|
||||
'SubgroupImageMediaBlockIOINTEL' : 5579,
|
||||
'RoundToInfinityINTEL' : 5582,
|
||||
'FloatingPointModeINTEL' : 5583,
|
||||
'IntegerFunctions2INTEL' : 5584,
|
||||
'FunctionPointersINTEL' : 5603,
|
||||
'IndirectReferencesINTEL' : 5604,
|
||||
'AsmINTEL' : 5606,
|
||||
'AtomicFloat32MinMaxEXT' : 5612,
|
||||
'AtomicFloat64MinMaxEXT' : 5613,
|
||||
'AtomicFloat16MinMaxEXT' : 5616,
|
||||
'VectorComputeINTEL' : 5617,
|
||||
'VectorAnyINTEL' : 5619,
|
||||
'SubgroupAvcMotionEstimationINTEL' : 5696,
|
||||
'SubgroupAvcMotionEstimationIntraINTEL' : 5697,
|
||||
'SubgroupAvcMotionEstimationChromaINTEL' : 5698,
|
||||
'VariableLengthArrayINTEL' : 5817,
|
||||
'FunctionFloatControlINTEL' : 5821,
|
||||
'FPGAMemoryAttributesINTEL' : 5824,
|
||||
'FPFastMathModeINTEL' : 5837,
|
||||
'ArbitraryPrecisionIntegersINTEL' : 5844,
|
||||
'UnstructuredLoopControlsINTEL' : 5886,
|
||||
'FPGALoopControlsINTEL' : 5888,
|
||||
'KernelAttributesINTEL' : 5892,
|
||||
'FPGAKernelAttributesINTEL' : 5897,
|
||||
'FPGAMemoryAccessesINTEL' : 5898,
|
||||
'FPGAClusterAttributesINTEL' : 5904,
|
||||
'LoopFuseINTEL' : 5906,
|
||||
'FPGABufferLocationINTEL' : 5920,
|
||||
'USMStorageClassesINTEL' : 5935,
|
||||
'IOPipesINTEL' : 5943,
|
||||
'BlockingPipesINTEL' : 5945,
|
||||
'FPGARegINTEL' : 5948,
|
||||
'AtomicFloat32AddEXT' : 6033,
|
||||
'AtomicFloat64AddEXT' : 6034,
|
||||
'LongConstantCompositeINTEL' : 6089,
|
||||
},
|
||||
|
||||
'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,
|
||||
},
|
||||
|
||||
'FragmentShadingRateShift' : {
|
||||
'Vertical2Pixels' : 0,
|
||||
'Vertical4Pixels' : 1,
|
||||
'Horizontal2Pixels' : 2,
|
||||
'Horizontal4Pixels' : 3,
|
||||
},
|
||||
|
||||
'FragmentShadingRateMask' : {
|
||||
'MaskNone' : 0,
|
||||
'Vertical2Pixels' : 0x00000001,
|
||||
'Vertical4Pixels' : 0x00000002,
|
||||
'Horizontal2Pixels' : 0x00000004,
|
||||
'Horizontal4Pixels' : 0x00000008,
|
||||
},
|
||||
|
||||
'FPDenormMode' : {
|
||||
'Preserve' : 0,
|
||||
'FlushToZero' : 1,
|
||||
},
|
||||
|
||||
'FPOperationMode' : {
|
||||
'IEEE' : 0,
|
||||
'ALT' : 1,
|
||||
},
|
||||
|
||||
'Op' : {
|
||||
@@ -1016,12 +1411,29 @@ spv = {
|
||||
'OpGroupNonUniformLogicalXor' : 364,
|
||||
'OpGroupNonUniformQuadBroadcast' : 365,
|
||||
'OpGroupNonUniformQuadSwap' : 366,
|
||||
'OpCopyLogical' : 400,
|
||||
'OpPtrEqual' : 401,
|
||||
'OpPtrNotEqual' : 402,
|
||||
'OpPtrDiff' : 403,
|
||||
'OpTerminateInvocation' : 4416,
|
||||
'OpSubgroupBallotKHR' : 4421,
|
||||
'OpSubgroupFirstInvocationKHR' : 4422,
|
||||
'OpSubgroupAllKHR' : 4428,
|
||||
'OpSubgroupAnyKHR' : 4429,
|
||||
'OpSubgroupAllEqualKHR' : 4430,
|
||||
'OpSubgroupReadInvocationKHR' : 4432,
|
||||
'OpTraceRayKHR' : 4445,
|
||||
'OpExecuteCallableKHR' : 4446,
|
||||
'OpConvertUToAccelerationStructureKHR' : 4447,
|
||||
'OpIgnoreIntersectionKHR' : 4448,
|
||||
'OpTerminateRayKHR' : 4449,
|
||||
'OpTypeRayQueryKHR' : 4472,
|
||||
'OpRayQueryInitializeKHR' : 4473,
|
||||
'OpRayQueryTerminateKHR' : 4474,
|
||||
'OpRayQueryGenerateIntersectionKHR' : 4475,
|
||||
'OpRayQueryConfirmIntersectionKHR' : 4476,
|
||||
'OpRayQueryProceedKHR' : 4477,
|
||||
'OpRayQueryGetIntersectionTypeKHR' : 4479,
|
||||
'OpGroupIAddNonUniformAMD' : 5000,
|
||||
'OpGroupFAddNonUniformAMD' : 5001,
|
||||
'OpGroupFMinNonUniformAMD' : 5002,
|
||||
@@ -1032,7 +1444,27 @@ spv = {
|
||||
'OpGroupSMaxNonUniformAMD' : 5007,
|
||||
'OpFragmentMaskFetchAMD' : 5011,
|
||||
'OpFragmentFetchAMD' : 5012,
|
||||
'OpReadClockKHR' : 5056,
|
||||
'OpImageSampleFootprintNV' : 5283,
|
||||
'OpGroupNonUniformPartitionNV' : 5296,
|
||||
'OpWritePackedPrimitiveIndices4x8NV' : 5299,
|
||||
'OpReportIntersectionKHR' : 5334,
|
||||
'OpReportIntersectionNV' : 5334,
|
||||
'OpIgnoreIntersectionNV' : 5335,
|
||||
'OpTerminateRayNV' : 5336,
|
||||
'OpTraceNV' : 5337,
|
||||
'OpTypeAccelerationStructureKHR' : 5341,
|
||||
'OpTypeAccelerationStructureNV' : 5341,
|
||||
'OpExecuteCallableNV' : 5344,
|
||||
'OpTypeCooperativeMatrixNV' : 5358,
|
||||
'OpCooperativeMatrixLoadNV' : 5359,
|
||||
'OpCooperativeMatrixStoreNV' : 5360,
|
||||
'OpCooperativeMatrixMulAddNV' : 5361,
|
||||
'OpCooperativeMatrixLengthNV' : 5362,
|
||||
'OpBeginInvocationInterlockEXT' : 5364,
|
||||
'OpEndInvocationInterlockEXT' : 5365,
|
||||
'OpDemoteToHelperInvocationEXT' : 5380,
|
||||
'OpIsHelperInvocationEXT' : 5381,
|
||||
'OpSubgroupShuffleINTEL' : 5571,
|
||||
'OpSubgroupShuffleDownINTEL' : 5572,
|
||||
'OpSubgroupShuffleUpINTEL' : 5573,
|
||||
@@ -1041,8 +1473,182 @@ spv = {
|
||||
'OpSubgroupBlockWriteINTEL' : 5576,
|
||||
'OpSubgroupImageBlockReadINTEL' : 5577,
|
||||
'OpSubgroupImageBlockWriteINTEL' : 5578,
|
||||
'OpSubgroupImageMediaBlockReadINTEL' : 5580,
|
||||
'OpSubgroupImageMediaBlockWriteINTEL' : 5581,
|
||||
'OpUCountLeadingZerosINTEL' : 5585,
|
||||
'OpUCountTrailingZerosINTEL' : 5586,
|
||||
'OpAbsISubINTEL' : 5587,
|
||||
'OpAbsUSubINTEL' : 5588,
|
||||
'OpIAddSatINTEL' : 5589,
|
||||
'OpUAddSatINTEL' : 5590,
|
||||
'OpIAverageINTEL' : 5591,
|
||||
'OpUAverageINTEL' : 5592,
|
||||
'OpIAverageRoundedINTEL' : 5593,
|
||||
'OpUAverageRoundedINTEL' : 5594,
|
||||
'OpISubSatINTEL' : 5595,
|
||||
'OpUSubSatINTEL' : 5596,
|
||||
'OpIMul32x16INTEL' : 5597,
|
||||
'OpUMul32x16INTEL' : 5598,
|
||||
'OpConstFunctionPointerINTEL' : 5600,
|
||||
'OpFunctionPointerCallINTEL' : 5601,
|
||||
'OpAsmTargetINTEL' : 5609,
|
||||
'OpAsmINTEL' : 5610,
|
||||
'OpAsmCallINTEL' : 5611,
|
||||
'OpAtomicFMinEXT' : 5614,
|
||||
'OpAtomicFMaxEXT' : 5615,
|
||||
'OpDecorateString' : 5632,
|
||||
'OpDecorateStringGOOGLE' : 5632,
|
||||
'OpMemberDecorateString' : 5633,
|
||||
'OpMemberDecorateStringGOOGLE' : 5633,
|
||||
'OpVmeImageINTEL' : 5699,
|
||||
'OpTypeVmeImageINTEL' : 5700,
|
||||
'OpTypeAvcImePayloadINTEL' : 5701,
|
||||
'OpTypeAvcRefPayloadINTEL' : 5702,
|
||||
'OpTypeAvcSicPayloadINTEL' : 5703,
|
||||
'OpTypeAvcMcePayloadINTEL' : 5704,
|
||||
'OpTypeAvcMceResultINTEL' : 5705,
|
||||
'OpTypeAvcImeResultINTEL' : 5706,
|
||||
'OpTypeAvcImeResultSingleReferenceStreamoutINTEL' : 5707,
|
||||
'OpTypeAvcImeResultDualReferenceStreamoutINTEL' : 5708,
|
||||
'OpTypeAvcImeSingleReferenceStreaminINTEL' : 5709,
|
||||
'OpTypeAvcImeDualReferenceStreaminINTEL' : 5710,
|
||||
'OpTypeAvcRefResultINTEL' : 5711,
|
||||
'OpTypeAvcSicResultINTEL' : 5712,
|
||||
'OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL' : 5713,
|
||||
'OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL' : 5714,
|
||||
'OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL' : 5715,
|
||||
'OpSubgroupAvcMceSetInterShapePenaltyINTEL' : 5716,
|
||||
'OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL' : 5717,
|
||||
'OpSubgroupAvcMceSetInterDirectionPenaltyINTEL' : 5718,
|
||||
'OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL' : 5719,
|
||||
'OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL' : 5720,
|
||||
'OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL' : 5721,
|
||||
'OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL' : 5722,
|
||||
'OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL' : 5723,
|
||||
'OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL' : 5724,
|
||||
'OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL' : 5725,
|
||||
'OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL' : 5726,
|
||||
'OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL' : 5727,
|
||||
'OpSubgroupAvcMceSetAcOnlyHaarINTEL' : 5728,
|
||||
'OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL' : 5729,
|
||||
'OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL' : 5730,
|
||||
'OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL' : 5731,
|
||||
'OpSubgroupAvcMceConvertToImePayloadINTEL' : 5732,
|
||||
'OpSubgroupAvcMceConvertToImeResultINTEL' : 5733,
|
||||
'OpSubgroupAvcMceConvertToRefPayloadINTEL' : 5734,
|
||||
'OpSubgroupAvcMceConvertToRefResultINTEL' : 5735,
|
||||
'OpSubgroupAvcMceConvertToSicPayloadINTEL' : 5736,
|
||||
'OpSubgroupAvcMceConvertToSicResultINTEL' : 5737,
|
||||
'OpSubgroupAvcMceGetMotionVectorsINTEL' : 5738,
|
||||
'OpSubgroupAvcMceGetInterDistortionsINTEL' : 5739,
|
||||
'OpSubgroupAvcMceGetBestInterDistortionsINTEL' : 5740,
|
||||
'OpSubgroupAvcMceGetInterMajorShapeINTEL' : 5741,
|
||||
'OpSubgroupAvcMceGetInterMinorShapeINTEL' : 5742,
|
||||
'OpSubgroupAvcMceGetInterDirectionsINTEL' : 5743,
|
||||
'OpSubgroupAvcMceGetInterMotionVectorCountINTEL' : 5744,
|
||||
'OpSubgroupAvcMceGetInterReferenceIdsINTEL' : 5745,
|
||||
'OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL' : 5746,
|
||||
'OpSubgroupAvcImeInitializeINTEL' : 5747,
|
||||
'OpSubgroupAvcImeSetSingleReferenceINTEL' : 5748,
|
||||
'OpSubgroupAvcImeSetDualReferenceINTEL' : 5749,
|
||||
'OpSubgroupAvcImeRefWindowSizeINTEL' : 5750,
|
||||
'OpSubgroupAvcImeAdjustRefOffsetINTEL' : 5751,
|
||||
'OpSubgroupAvcImeConvertToMcePayloadINTEL' : 5752,
|
||||
'OpSubgroupAvcImeSetMaxMotionVectorCountINTEL' : 5753,
|
||||
'OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL' : 5754,
|
||||
'OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL' : 5755,
|
||||
'OpSubgroupAvcImeSetWeightedSadINTEL' : 5756,
|
||||
'OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL' : 5757,
|
||||
'OpSubgroupAvcImeEvaluateWithDualReferenceINTEL' : 5758,
|
||||
'OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL' : 5759,
|
||||
'OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL' : 5760,
|
||||
'OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL' : 5761,
|
||||
'OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL' : 5762,
|
||||
'OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL' : 5763,
|
||||
'OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL' : 5764,
|
||||
'OpSubgroupAvcImeConvertToMceResultINTEL' : 5765,
|
||||
'OpSubgroupAvcImeGetSingleReferenceStreaminINTEL' : 5766,
|
||||
'OpSubgroupAvcImeGetDualReferenceStreaminINTEL' : 5767,
|
||||
'OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL' : 5768,
|
||||
'OpSubgroupAvcImeStripDualReferenceStreamoutINTEL' : 5769,
|
||||
'OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL' : 5770,
|
||||
'OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL' : 5771,
|
||||
'OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL' : 5772,
|
||||
'OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL' : 5773,
|
||||
'OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL' : 5774,
|
||||
'OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL' : 5775,
|
||||
'OpSubgroupAvcImeGetBorderReachedINTEL' : 5776,
|
||||
'OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL' : 5777,
|
||||
'OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL' : 5778,
|
||||
'OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL' : 5779,
|
||||
'OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL' : 5780,
|
||||
'OpSubgroupAvcFmeInitializeINTEL' : 5781,
|
||||
'OpSubgroupAvcBmeInitializeINTEL' : 5782,
|
||||
'OpSubgroupAvcRefConvertToMcePayloadINTEL' : 5783,
|
||||
'OpSubgroupAvcRefSetBidirectionalMixDisableINTEL' : 5784,
|
||||
'OpSubgroupAvcRefSetBilinearFilterEnableINTEL' : 5785,
|
||||
'OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL' : 5786,
|
||||
'OpSubgroupAvcRefEvaluateWithDualReferenceINTEL' : 5787,
|
||||
'OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL' : 5788,
|
||||
'OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL' : 5789,
|
||||
'OpSubgroupAvcRefConvertToMceResultINTEL' : 5790,
|
||||
'OpSubgroupAvcSicInitializeINTEL' : 5791,
|
||||
'OpSubgroupAvcSicConfigureSkcINTEL' : 5792,
|
||||
'OpSubgroupAvcSicConfigureIpeLumaINTEL' : 5793,
|
||||
'OpSubgroupAvcSicConfigureIpeLumaChromaINTEL' : 5794,
|
||||
'OpSubgroupAvcSicGetMotionVectorMaskINTEL' : 5795,
|
||||
'OpSubgroupAvcSicConvertToMcePayloadINTEL' : 5796,
|
||||
'OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL' : 5797,
|
||||
'OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL' : 5798,
|
||||
'OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL' : 5799,
|
||||
'OpSubgroupAvcSicSetBilinearFilterEnableINTEL' : 5800,
|
||||
'OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL' : 5801,
|
||||
'OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL' : 5802,
|
||||
'OpSubgroupAvcSicEvaluateIpeINTEL' : 5803,
|
||||
'OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL' : 5804,
|
||||
'OpSubgroupAvcSicEvaluateWithDualReferenceINTEL' : 5805,
|
||||
'OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL' : 5806,
|
||||
'OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL' : 5807,
|
||||
'OpSubgroupAvcSicConvertToMceResultINTEL' : 5808,
|
||||
'OpSubgroupAvcSicGetIpeLumaShapeINTEL' : 5809,
|
||||
'OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL' : 5810,
|
||||
'OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL' : 5811,
|
||||
'OpSubgroupAvcSicGetPackedIpeLumaModesINTEL' : 5812,
|
||||
'OpSubgroupAvcSicGetIpeChromaModeINTEL' : 5813,
|
||||
'OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL' : 5814,
|
||||
'OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL' : 5815,
|
||||
'OpSubgroupAvcSicGetInterRawSadsINTEL' : 5816,
|
||||
'OpVariableLengthArrayINTEL' : 5818,
|
||||
'OpSaveMemoryINTEL' : 5819,
|
||||
'OpRestoreMemoryINTEL' : 5820,
|
||||
'OpLoopControlINTEL' : 5887,
|
||||
'OpPtrCastToCrossWorkgroupINTEL' : 5934,
|
||||
'OpCrossWorkgroupCastToPtrINTEL' : 5938,
|
||||
'OpReadPipeBlockingINTEL' : 5946,
|
||||
'OpWritePipeBlockingINTEL' : 5947,
|
||||
'OpFPGARegINTEL' : 5949,
|
||||
'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,
|
||||
'OpAtomicFAddEXT' : 6035,
|
||||
'OpTypeBufferSurfaceINTEL' : 6086,
|
||||
'OpTypeStructContinuedINTEL' : 6090,
|
||||
'OpConstantCompositeContinuedINTEL' : 6091,
|
||||
'OpSpecConstantCompositeContinuedINTEL' : 6092,
|
||||
},
|
||||
|
||||
}
|
||||
|
1709
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/spv.d
vendored
Executable file
1709
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/spv.d
vendored
Executable file
File diff suppressed because it is too large
Load Diff
242
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/bin/generate_language_headers.py
vendored
Executable file
242
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/bin/generate_language_headers.py
vendored
Executable file
@@ -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()
|
28
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/bin/makeExtinstHeaders.py
vendored
Executable file
28
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/bin/makeExtinstHeaders.py
vendored
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/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')
|
||||
mk_extinst('NonSemanticClspvReflection', 'extinst.nonsemantic.clspvreflection.grammar.json')
|
@@ -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.*
|
||||
dos2unix spirv.* SpirV.* spv.*
|
||||
|
@@ -1,19 +1,19 @@
|
||||
// Copyright (c) 2014-2018 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"),
|
||||
// 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/
|
||||
//
|
||||
// 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
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <cctype>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <set>
|
||||
|
||||
#include "jsoncpp/dist/json/json.h"
|
||||
|
||||
@@ -68,9 +69,9 @@ namespace {
|
||||
TPrinter();
|
||||
|
||||
static const int DocMagicNumber = 0x07230203;
|
||||
static const int DocVersion = 0x00010300;
|
||||
static const int DocRevision = 1;
|
||||
#define DocRevisionString "1"
|
||||
static const int DocVersion = 0x00010500;
|
||||
static const int DocRevision = 4;
|
||||
#define DocRevisionString "4"
|
||||
static const std::string DocCopyright;
|
||||
static const std::string DocComment1;
|
||||
static const std::string DocComment2;
|
||||
@@ -97,7 +98,8 @@ namespace {
|
||||
virtual void printEpilogue(std::ostream&) const { }
|
||||
virtual void printMeta(std::ostream&) const;
|
||||
virtual void printTypes(std::ostream&) const { }
|
||||
|
||||
virtual void printHasResultType(std::ostream&) const { };
|
||||
|
||||
virtual std::string escapeComment(const std::string& s) const;
|
||||
|
||||
// Default printComments() uses these comment strings
|
||||
@@ -107,7 +109,7 @@ namespace {
|
||||
virtual std::string commentEOL(bool isLast) const { return ""; }
|
||||
|
||||
typedef std::pair<unsigned, std::string> valpair_t;
|
||||
|
||||
|
||||
// for printing enum values
|
||||
virtual std::string enumBeg(const std::string&, enumStyle_t) const { return ""; }
|
||||
virtual std::string enumEnd(const std::string&, enumStyle_t, bool isLast = false) const {
|
||||
@@ -126,7 +128,7 @@ namespace {
|
||||
const char* fmt, bool isLast = false) const {
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
std::vector<valpair_t> getSortedVals(const Json::Value&) const;
|
||||
|
||||
virtual std::string indent(int count = 1) const {
|
||||
@@ -149,7 +151,7 @@ namespace {
|
||||
}
|
||||
|
||||
void addComment(Json::Value& node, const std::string& str);
|
||||
|
||||
|
||||
Json::Value spvRoot; // JSON SPIR-V data
|
||||
};
|
||||
|
||||
@@ -167,7 +169,7 @@ namespace {
|
||||
}
|
||||
|
||||
const std::string TPrinter::DocCopyright =
|
||||
"Copyright (c) 2014-2018 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"
|
||||
@@ -197,13 +199,16 @@ namespace {
|
||||
|
||||
const std::string TPrinter::DocComment2 =
|
||||
"Enumeration tokens for SPIR-V, in various styles:\n"
|
||||
" C, C++, C++11, JSON, Lua, Python\n"
|
||||
" C, C++, C++11, JSON, Lua, Python, C#, D\n"
|
||||
"\n"
|
||||
"- C will have tokens with a \"Spv\" prefix, e.g.: SpvSourceLanguageGLSL\n"
|
||||
"- C++ will have tokens in the \"spv\" name space, e.g.: spv::SourceLanguageGLSL\n"
|
||||
"- C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL\n"
|
||||
"- Lua will use tables, e.g.: spv.SourceLanguage.GLSL\n"
|
||||
"- Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL']\n"
|
||||
"- C# will use enum classes in the Specification class located in the \"Spv\" namespace,\n"
|
||||
" e.g.: Spv.Specification.SourceLanguage.GLSL\n"
|
||||
"- D will have tokens under the \"spv\" module, e.g: spv.SourceLanguage.GLSL\n"
|
||||
"\n"
|
||||
"Some tokens act like mask values, which can be OR'd together,\n"
|
||||
"while others are mutually exclusive. The mask-like ones have\n"
|
||||
@@ -290,7 +295,7 @@ namespace {
|
||||
{
|
||||
const int commentCount = spvRoot["spv"]["meta"]["Comment"].size();
|
||||
int commentNum = 0;
|
||||
|
||||
|
||||
for (const auto& comment : spvRoot["spv"]["meta"]["Comment"]) {
|
||||
out << commentBeg();
|
||||
|
||||
@@ -322,7 +327,7 @@ namespace {
|
||||
void TPrinter::printDefs(std::ostream& out) const
|
||||
{
|
||||
const Json::Value& enums = spvRoot["spv"]["enum"];
|
||||
|
||||
|
||||
for (auto opClass = enums.begin(); opClass != enums.end(); ++opClass) {
|
||||
const bool isMask = (*opClass)["Type"].asString() == "Bit";
|
||||
const auto opName = (*opClass)["Name"].asString();
|
||||
@@ -337,13 +342,13 @@ namespace {
|
||||
out << enumFmt(opPrefix, valpair_t(0, "MaskNone"), enumNoMask);
|
||||
|
||||
const auto sorted = getSortedVals((*opClass)["Values"]);
|
||||
|
||||
std::string maxEnum = maxEnumFmt(opName, valpair_t(0x7FFFFFFF, "Max"), enumHex);
|
||||
|
||||
std::string maxEnum = maxEnumFmt(opName, valpair_t(0x7FFFFFFF, "Max"), enumHex);
|
||||
|
||||
bool printMax = (style != enumMask && maxEnum.size() > 0);
|
||||
|
||||
for (const auto& v : sorted)
|
||||
out << enumFmt(opPrefix, v, style, !printMax && v.first == sorted.back().first);
|
||||
out << enumFmt(opPrefix, v, style, !printMax && v.second == sorted.back().second);
|
||||
|
||||
if (printMax)
|
||||
out << maxEnum;
|
||||
@@ -361,6 +366,7 @@ namespace {
|
||||
printTypes(out);
|
||||
printMeta(out);
|
||||
printDefs(out);
|
||||
printHasResultType(out);
|
||||
printEpilogue(out);
|
||||
}
|
||||
|
||||
@@ -390,7 +396,7 @@ namespace {
|
||||
}
|
||||
return newStr;
|
||||
}
|
||||
|
||||
|
||||
std::string fmtConstInt(unsigned val, const std::string& name,
|
||||
const char* fmt, bool isLast) const override {
|
||||
return indent(3) + '"' + name + "\": " + fmtNum("%d", val) + (isLast ? "\n" : ",\n");
|
||||
@@ -475,7 +481,7 @@ namespace {
|
||||
}
|
||||
|
||||
virtual void printEpilogue(std::ostream& out) const override {
|
||||
out << "#endif // #ifndef spirv_" << headerGuardSuffix() << std::endl;
|
||||
out << "#endif" << std::endl;
|
||||
}
|
||||
|
||||
virtual void printTypes(std::ostream& out) const override {
|
||||
@@ -488,9 +494,48 @@ namespace {
|
||||
return std::string("static const unsigned int ") + pre() + name +
|
||||
" = " + fmtNum(fmt, val) + (isLast ? ";\n\n" : ";\n");
|
||||
}
|
||||
|
||||
|
||||
virtual std::string pre() const { return ""; } // C name prefix
|
||||
virtual std::string headerGuardSuffix() const = 0;
|
||||
|
||||
virtual std::string fmtEnumUse(const std::string& opPrefix, const std::string& name) const { return pre() + name; }
|
||||
|
||||
virtual void printHasResultType(std::ostream& out) const
|
||||
{
|
||||
const Json::Value& enums = spvRoot["spv"]["enum"];
|
||||
|
||||
std::set<unsigned> seenValues;
|
||||
|
||||
for (auto opClass = enums.begin(); opClass != enums.end(); ++opClass) {
|
||||
const auto opName = (*opClass)["Name"].asString();
|
||||
if (opName != "Op") {
|
||||
continue;
|
||||
}
|
||||
|
||||
out << "#ifdef SPV_ENABLE_UTILITY_CODE" << std::endl;
|
||||
out << "inline void " << pre() << "HasResultAndType(" << pre() << opName << " opcode, bool *hasResult, bool *hasResultType) {" << std::endl;
|
||||
out << " *hasResult = *hasResultType = false;" << std::endl;
|
||||
out << " switch (opcode) {" << std::endl;
|
||||
out << " default: /* unknown opcode */ break;" << std::endl;
|
||||
|
||||
for (auto& inst : spv::InstructionDesc) {
|
||||
|
||||
// Filter out duplicate enum values, which would break the switch statement.
|
||||
// These are probably just extension enums promoted to core.
|
||||
if (seenValues.find(inst.value) != seenValues.end()) {
|
||||
continue;
|
||||
}
|
||||
seenValues.insert(inst.value);
|
||||
|
||||
std::string name = inst.name;
|
||||
out << " case " << fmtEnumUse("Op", name) << ": *hasResult = " << (inst.hasResult() ? "true" : "false") << "; *hasResultType = " << (inst.hasType() ? "true" : "false") << "; break;" << std::endl;
|
||||
}
|
||||
|
||||
out << " }" << std::endl;
|
||||
out << "}" << std::endl;
|
||||
out << "#endif /* SPV_ENABLE_UTILITY_CODE */" << std::endl << std::endl;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// C printer
|
||||
@@ -542,19 +587,19 @@ namespace {
|
||||
|
||||
if (isMask) {
|
||||
const auto typeName = opName + styleStr(enumMask);
|
||||
|
||||
|
||||
out << "inline " + typeName + " operator|(" + typeName + " a, " + typeName + " b) { return " +
|
||||
typeName + "(unsigned(a) | unsigned(b)); }\n";
|
||||
}
|
||||
}
|
||||
|
||||
out << "\n} // end namespace spv\n\n";
|
||||
TPrinterCBase::printEpilogue(out);
|
||||
out << "#endif // #ifndef spirv_" << headerGuardSuffix() << std::endl;
|
||||
}
|
||||
|
||||
std::string commentBOL() const override { return "// "; }
|
||||
|
||||
|
||||
|
||||
virtual std::string enumBeg(const std::string& s, enumStyle_t style) const override {
|
||||
return std::string("enum ") + s + styleStr(style) + " {\n";
|
||||
}
|
||||
@@ -597,6 +642,9 @@ namespace {
|
||||
return enumFmt(s, v, style, true);
|
||||
}
|
||||
|
||||
// Add type prefix for scoped enum
|
||||
virtual std::string fmtEnumUse(const std::string& opPrefix, const std::string& name) const { return opPrefix + "::" + name; }
|
||||
|
||||
std::string headerGuardSuffix() const override { return "HPP"; }
|
||||
};
|
||||
|
||||
@@ -658,6 +706,76 @@ namespace {
|
||||
}
|
||||
};
|
||||
|
||||
// C# printer
|
||||
class TPrinterCSharp final : public TPrinter {
|
||||
private:
|
||||
std::string commentBOL() const override { return "// "; }
|
||||
|
||||
void printPrologue(std::ostream& out) const override {
|
||||
out << "namespace Spv\n{\n\n";
|
||||
out << indent() << "public static class Specification\n";
|
||||
out << indent() << "{\n";
|
||||
}
|
||||
|
||||
void printEpilogue(std::ostream& out) const override {
|
||||
out << indent() << "}\n";
|
||||
out << "}\n";
|
||||
}
|
||||
|
||||
std::string enumBeg(const std::string& s, enumStyle_t style) const override {
|
||||
return indent(2) + "public enum " + s + styleStr(style) + "\n" + indent(2) + "{\n";
|
||||
}
|
||||
|
||||
std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
|
||||
return indent(2) + "}" + + (isLast ? "\n" : "\n\n");
|
||||
}
|
||||
|
||||
std::string enumFmt(const std::string& s, const valpair_t& v,
|
||||
enumStyle_t style, bool isLast) const override {
|
||||
return indent(3) + prependIfDigit(s, v.second) + " = " + fmtStyleVal(v.first, style) + ",\n";
|
||||
}
|
||||
|
||||
std::string fmtConstInt(unsigned val, const std::string& name,
|
||||
const char* fmt, bool isLast) const override {
|
||||
return indent(2) + std::string("public const uint ") + name +
|
||||
" = " + fmtNum(fmt, val) + (isLast ? ";\n\n" : ";\n");
|
||||
}
|
||||
};
|
||||
|
||||
// D printer
|
||||
class TPrinterD final : public TPrinter {
|
||||
private:
|
||||
std::string commentBeg() const override { return "/+\n"; }
|
||||
std::string commentBOL() const override { return " + "; }
|
||||
std::string commentEnd(bool isLast) const override { return " +/\n"; }
|
||||
|
||||
void printPrologue(std::ostream& out) const override {
|
||||
out << "module spv;\n\n";
|
||||
}
|
||||
|
||||
void printEpilogue(std::ostream& out) const override {
|
||||
}
|
||||
|
||||
std::string enumBeg(const std::string& s, enumStyle_t style) const override {
|
||||
return "enum " + s + styleStr(style) + " : uint\n{\n";
|
||||
}
|
||||
|
||||
std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
|
||||
return std::string("}\n\n");
|
||||
}
|
||||
|
||||
std::string enumFmt(const std::string& s, const valpair_t& v,
|
||||
enumStyle_t style, bool isLast) const override {
|
||||
return indent() + prependIfDigit("_", v.second) + " = " + fmtStyleVal(v.first, style) + ",\n";
|
||||
}
|
||||
|
||||
std::string fmtConstInt(unsigned val, const std::string& name,
|
||||
const char* fmt, bool isLast) const override {
|
||||
return std::string("enum uint ") + name +
|
||||
" = " + fmtNum(fmt, val) + (isLast ? ";\n\n" : ";\n");
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace spv {
|
||||
@@ -672,6 +790,8 @@ namespace spv {
|
||||
langInfo.push_back(std::make_pair(ELangJSON, "spirv.json"));
|
||||
langInfo.push_back(std::make_pair(ELangLua, "spirv.lua"));
|
||||
langInfo.push_back(std::make_pair(ELangPython, "spirv.py"));
|
||||
langInfo.push_back(std::make_pair(ELangCSharp, "spirv.cs"));
|
||||
langInfo.push_back(std::make_pair(ELangD, "spv.d"));
|
||||
|
||||
for (const auto& lang : langInfo) {
|
||||
std::ofstream out(lang.second, std::ios::out);
|
||||
@@ -697,6 +817,8 @@ namespace spv {
|
||||
case ELangJSON: p = TPrinterPtr(new TPrinterJSON); break;
|
||||
case ELangLua: p = TPrinterPtr(new TPrinterLua); break;
|
||||
case ELangPython: p = TPrinterPtr(new TPrinterPython); break;
|
||||
case ELangCSharp: p = TPrinterPtr(new TPrinterCSharp); break;
|
||||
case ELangD: p = TPrinterPtr(new TPrinterD); break;
|
||||
case ELangAll: PrintAllHeaders(); break;
|
||||
default:
|
||||
std::cerr << "Unknown language." << std::endl;
|
||||
|
@@ -1,19 +1,19 @@
|
||||
// Copyright (c) 2014-2018 The Khronos Group Inc.
|
||||
//
|
||||
// Copyright (c) 2014-2019 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/
|
||||
//
|
||||
// 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
|
||||
@@ -41,6 +41,8 @@ namespace spv {
|
||||
ELangJSON, // JSON
|
||||
ELangLua, // Lua
|
||||
ELangPython, // Python
|
||||
ELangCSharp, // CSharp
|
||||
ELangD, // D
|
||||
|
||||
ELangAll, // print headers in all languages to files
|
||||
};
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2014-2018 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"),
|
||||
@@ -25,8 +25,10 @@
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
#include <fstream>
|
||||
|
||||
@@ -40,6 +42,10 @@ namespace spv {
|
||||
// parameterization information.
|
||||
InstructionValues InstructionDesc;
|
||||
|
||||
// The ordered list (in printing order) of printing classes
|
||||
// (specification subsections).
|
||||
PrintingClasses InstructionPrintingClasses;
|
||||
|
||||
// Note: There is no entry for OperandOpcode. Use InstructionDesc instead.
|
||||
EnumDefinition OperandClassParams[OperandOpcode];
|
||||
EnumValues SourceLanguageParams;
|
||||
@@ -56,6 +62,8 @@ EnumValues ImageChannelDataTypeParams;
|
||||
EnumValues ImageOperandsParams;
|
||||
EnumValues FPFastMathParams;
|
||||
EnumValues FPRoundingModeParams;
|
||||
EnumValues FPDenormModeParams;
|
||||
EnumValues FPOperationModeParams;
|
||||
EnumValues LinkageTypeParams;
|
||||
EnumValues DecorationParams;
|
||||
EnumValues BuiltInParams;
|
||||
@@ -72,6 +80,11 @@ EnumValues ScopeParams;
|
||||
EnumValues KernelEnqueueFlagsParams;
|
||||
EnumValues KernelProfilingInfoParams;
|
||||
EnumValues CapabilityParams;
|
||||
EnumValues RayFlagsParams;
|
||||
EnumValues RayQueryIntersectionParams;
|
||||
EnumValues RayQueryCommittedIntersectionTypeParams;
|
||||
EnumValues RayQueryCandidateIntersectionTypeParams;
|
||||
EnumValues FragmentShadingRateParams;
|
||||
|
||||
std::pair<bool, std::string> ReadFile(const std::string& path)
|
||||
{
|
||||
@@ -119,8 +132,7 @@ ClassOptionality ToOperandClassAndOptionality(const std::string& operandKind, co
|
||||
else if (quantifier == "?")
|
||||
return {OperandLiteralString, true};
|
||||
else {
|
||||
assert(0 && "this case should not exist");
|
||||
return {OperandNone, false};
|
||||
return {OperandOptionalLiteralStrings, false};
|
||||
}
|
||||
} else if (operandKind == "PairLiteralIntegerIdRef") {
|
||||
// Used by OpSwitch in the grammar
|
||||
@@ -142,7 +154,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") {
|
||||
@@ -169,6 +181,10 @@ ClassOptionality ToOperandClassAndOptionality(const std::string& operandKind, co
|
||||
type = OperandImageChannelDataType;
|
||||
} else if (operandKind == "FPRoundingMode") {
|
||||
type = OperandFPRoundingMode;
|
||||
} else if (operandKind == "FPDenormMode") {
|
||||
type = OperandFPDenormMode;
|
||||
} else if (operandKind == "FPOperationMode") {
|
||||
type = OperandFPOperationMode;
|
||||
} else if (operandKind == "LinkageType") {
|
||||
type = OperandLinkageType;
|
||||
} else if (operandKind == "AccessQualifier") {
|
||||
@@ -198,7 +214,17 @@ ClassOptionality ToOperandClassAndOptionality(const std::string& operandKind, co
|
||||
} else if (operandKind == "FunctionControl") {
|
||||
type = OperandFunction;
|
||||
} else if (operandKind == "MemoryAccess") {
|
||||
type = OperandMemoryAccess;
|
||||
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;
|
||||
} else if (operandKind == "FragmentShadingRate") {
|
||||
type = OperandFragmentShadingRate;
|
||||
}
|
||||
|
||||
if (type == OperandNone) {
|
||||
@@ -230,7 +256,7 @@ unsigned int NumberStringToBit(const std::string& str)
|
||||
return bit;
|
||||
}
|
||||
|
||||
void jsonToSpirv(const std::string& jsonPath)
|
||||
void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders)
|
||||
{
|
||||
// only do this once.
|
||||
static bool initialized = false;
|
||||
@@ -285,12 +311,55 @@ void jsonToSpirv(const std::string& jsonPath)
|
||||
return result;
|
||||
};
|
||||
|
||||
// set up the printing classes
|
||||
std::unordered_set<std::string> tags; // short-lived local for error checking below
|
||||
const Json::Value printingClasses = root["instruction_printing_class"];
|
||||
for (const auto& printingClass : printingClasses) {
|
||||
if (printingClass["tag"].asString().size() > 0)
|
||||
tags.insert(printingClass["tag"].asString()); // just for error checking
|
||||
else
|
||||
std::cerr << "Error: each instruction_printing_class requires a non-empty \"tag\"" << std::endl;
|
||||
if (buildingHeaders || printingClass["tag"].asString() != "@exclude") {
|
||||
InstructionPrintingClasses.push_back({printingClass["tag"].asString(),
|
||||
printingClass["heading"].asString()});
|
||||
}
|
||||
}
|
||||
|
||||
// process the instructions
|
||||
const Json::Value insts = root["instructions"];
|
||||
unsigned maxOpcode = 0;
|
||||
bool firstOpcode = true;
|
||||
for (const auto& inst : insts) {
|
||||
const unsigned int opcode = inst["opcode"].asUInt();
|
||||
const auto printingClass = inst["class"].asString();
|
||||
if (printingClass.size() == 0) {
|
||||
std::cerr << "Error: " << inst["opname"].asString()
|
||||
<< " requires a non-empty printing \"class\" tag" << std::endl;
|
||||
}
|
||||
if (!buildingHeaders && printingClass == "@exclude")
|
||||
continue;
|
||||
if (tags.find(printingClass) == tags.end()) {
|
||||
std::cerr << "Error: " << inst["opname"].asString()
|
||||
<< " requires a \"class\" declared as a \"tag\" in \"instruction printing_class\""
|
||||
<< std::endl;
|
||||
}
|
||||
const auto opcode = inst["opcode"].asUInt();
|
||||
const std::string name = inst["opname"].asString();
|
||||
if (firstOpcode) {
|
||||
maxOpcode = opcode;
|
||||
firstOpcode = false;
|
||||
} else {
|
||||
if (maxOpcode > opcode) {
|
||||
std::cerr << "Error: " << name
|
||||
<< " is out of order. It follows the instruction with opcode " << maxOpcode
|
||||
<< std::endl;
|
||||
std::exit(1);
|
||||
} else {
|
||||
maxOpcode = opcode;
|
||||
}
|
||||
}
|
||||
EnumCaps caps = getCaps(inst);
|
||||
std::string version = inst["version"].asString();
|
||||
std::string lastVersion = inst["lastVersion"].asString();
|
||||
Extensions exts = getExts(inst);
|
||||
OperandParameters operands;
|
||||
bool defResultId = false;
|
||||
@@ -306,9 +375,9 @@ void jsonToSpirv(const std::string& jsonPath)
|
||||
}
|
||||
InstructionDesc.emplace_back(
|
||||
std::move(EnumValue(opcode, name,
|
||||
std::move(caps), std::move(version), std::move(exts),
|
||||
std::move(caps), std::move(version), std::move(lastVersion), std::move(exts),
|
||||
std::move(operands))),
|
||||
defTypeId, defResultId);
|
||||
printingClass, defTypeId, defResultId);
|
||||
}
|
||||
|
||||
// Specific additional context-dependent operands
|
||||
@@ -331,14 +400,30 @@ void jsonToSpirv(const std::string& jsonPath)
|
||||
return result;
|
||||
};
|
||||
|
||||
unsigned maxValue = 0;
|
||||
bool firstValue = true;
|
||||
for (const auto& enumerant : source["enumerants"]) {
|
||||
unsigned value;
|
||||
bool skip_zero_in_bitfield;
|
||||
std::tie(value, skip_zero_in_bitfield) = getValue(enumerant);
|
||||
if (skip_zero_in_bitfield)
|
||||
continue;
|
||||
if (firstValue) {
|
||||
maxValue = value;
|
||||
firstValue = false;
|
||||
} else {
|
||||
if (maxValue > value) {
|
||||
std::cerr << "Error: " << source["kind"] << " enumerant " << enumerant["enumerant"]
|
||||
<< " is out of order. It has value " << value
|
||||
<< " but follows the enumerant with value " << maxValue << std::endl;
|
||||
std::exit(1);
|
||||
} else {
|
||||
maxValue = value;
|
||||
}
|
||||
}
|
||||
EnumCaps caps(getCaps(enumerant));
|
||||
std::string version = enumerant["version"].asString();
|
||||
std::string lastVersion = enumerant["lastVersion"].asString();
|
||||
Extensions exts(getExts(enumerant));
|
||||
OperandParameters params;
|
||||
const Json::Value& paramsJson = enumerant["parameters"];
|
||||
@@ -353,7 +438,7 @@ void jsonToSpirv(const std::string& jsonPath)
|
||||
}
|
||||
dest->emplace_back(
|
||||
value, enumerant["enumerant"].asString(),
|
||||
std::move(caps), std::move(version), std::move(exts), std::move(params));
|
||||
std::move(caps), std::move(version), std::move(lastVersion), std::move(exts), std::move(params));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -404,6 +489,10 @@ void jsonToSpirv(const std::string& jsonPath)
|
||||
establishOperandClass(enumName, OperandFPFastMath, &FPFastMathParams, operandEnum, category);
|
||||
} else if (enumName == "FPRoundingMode") {
|
||||
establishOperandClass(enumName, OperandFPRoundingMode, &FPRoundingModeParams, operandEnum, category);
|
||||
} else if (enumName == "FPDenormMode") {
|
||||
establishOperandClass(enumName, OperandFPDenormMode, &FPDenormModeParams, operandEnum, category);
|
||||
} else if (enumName == "FPOperationMode") {
|
||||
establishOperandClass(enumName, OperandFPOperationMode, &FPOperationModeParams, operandEnum, category);
|
||||
} else if (enumName == "LinkageType") {
|
||||
establishOperandClass(enumName, OperandLinkageType, &LinkageTypeParams, operandEnum, category);
|
||||
} else if (enumName == "FunctionParameterAttribute") {
|
||||
@@ -421,7 +510,7 @@ void jsonToSpirv(const std::string& jsonPath)
|
||||
} else if (enumName == "Dim") {
|
||||
establishOperandClass(enumName, OperandDimensionality, &DimensionalityParams, operandEnum, category);
|
||||
} else if (enumName == "MemoryAccess") {
|
||||
establishOperandClass(enumName, OperandMemoryAccess, &MemoryAccessParams, operandEnum, category);
|
||||
establishOperandClass(enumName, OperandMemoryOperands, &MemoryAccessParams, operandEnum, category);
|
||||
} else if (enumName == "Scope") {
|
||||
establishOperandClass(enumName, OperandScope, &ScopeParams, operandEnum, category);
|
||||
} else if (enumName == "GroupOperation") {
|
||||
@@ -430,6 +519,16 @@ void jsonToSpirv(const std::string& jsonPath)
|
||||
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);
|
||||
} else if (enumName == "FragmentShadingRate") {
|
||||
establishOperandClass(enumName, OperandFragmentShadingRate, &FragmentShadingRateParams, operandEnum, category);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2014-2018 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"),
|
||||
@@ -38,18 +38,22 @@ namespace spv {
|
||||
std::pair<bool, std::string> ReadFile(const std::string& path);
|
||||
|
||||
// Fill in all the parameters
|
||||
void jsonToSpirv(const std::string& jsonPath);
|
||||
void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders);
|
||||
|
||||
// For parameterizing operands.
|
||||
// The ordering here affects the printing order in the SPIR-V specification.
|
||||
// Please add new operand classes at the end.
|
||||
enum OperandClass {
|
||||
OperandNone,
|
||||
OperandId,
|
||||
OperandVariableIds,
|
||||
OperandOptionalLiteral,
|
||||
OperandOptionalLiteralString,
|
||||
OperandOptionalLiteralStrings,
|
||||
OperandVariableLiterals,
|
||||
OperandVariableIdLiteral,
|
||||
OperandVariableLiteralId,
|
||||
OperandAnySizeLiteralNumber,
|
||||
OperandLiteralNumber,
|
||||
OperandLiteralString,
|
||||
OperandSource,
|
||||
@@ -76,18 +80,32 @@ enum OperandClass {
|
||||
OperandLoop,
|
||||
OperandFunction,
|
||||
OperandMemorySemantics,
|
||||
OperandMemoryAccess,
|
||||
OperandMemoryOperands,
|
||||
OperandScope,
|
||||
OperandGroupOperation,
|
||||
OperandGroupOperation,
|
||||
OperandKernelEnqueueFlags,
|
||||
OperandKernelProfilingInfo,
|
||||
OperandCapability,
|
||||
OperandRayFlags,
|
||||
OperandRayQueryIntersection,
|
||||
OperandRayQueryCommittedIntersectionType,
|
||||
OperandRayQueryCandidateIntersectionType,
|
||||
OperandFragmentShadingRate,
|
||||
OperandFPDenormMode,
|
||||
OperandFPOperationMode,
|
||||
|
||||
OperandOpcode,
|
||||
|
||||
OperandCount
|
||||
};
|
||||
|
||||
// For direct representation of the JSON grammar "instruction_printing_class".
|
||||
struct PrintingClass {
|
||||
std::string tag;
|
||||
std::string heading;
|
||||
};
|
||||
using PrintingClasses = std::vector<PrintingClass>;
|
||||
|
||||
// Any specific enum can have a set of capabilities that allow it:
|
||||
typedef std::vector<std::string> EnumCaps;
|
||||
|
||||
@@ -145,6 +163,12 @@ public:
|
||||
assert((where != end()) && "Could not find enum in the enum list");
|
||||
return *where;
|
||||
}
|
||||
// gets *all* entries for the value, including the first one
|
||||
void gatherAliases(unsigned value, std::vector<EValue*>& aliases) {
|
||||
std::for_each(begin(), end(), [&](EValue& e) {
|
||||
if (value == e.value)
|
||||
aliases.push_back(&e);});
|
||||
}
|
||||
// Returns the EValue with the given name. We assume uniqueness
|
||||
// by name.
|
||||
EValue& at(std::string name) {
|
||||
@@ -167,9 +191,11 @@ private:
|
||||
class EnumValue {
|
||||
public:
|
||||
EnumValue() : value(0), desc(nullptr) {}
|
||||
EnumValue(unsigned int the_value, const std::string& the_name, EnumCaps&& the_caps, const std::string& the_version,
|
||||
Extensions&& the_extensions, OperandParameters&& the_operands) :
|
||||
value(the_value), name(the_name), capabilities(std::move(the_caps)), version(std::move(the_version)),
|
||||
EnumValue(unsigned int the_value, const std::string& the_name, EnumCaps&& the_caps,
|
||||
const std::string& the_firstVersion, const std::string& the_lastVersion,
|
||||
Extensions&& the_extensions, OperandParameters&& the_operands) :
|
||||
value(the_value), name(the_name), capabilities(std::move(the_caps)),
|
||||
firstVersion(std::move(the_firstVersion)), lastVersion(std::move(the_lastVersion)),
|
||||
extensions(std::move(the_extensions)), operands(std::move(the_operands)), desc(nullptr) { }
|
||||
|
||||
// For ValueEnum, the value from the JSON file.
|
||||
@@ -178,7 +204,8 @@ public:
|
||||
unsigned value;
|
||||
std::string name;
|
||||
EnumCaps capabilities;
|
||||
std::string version;
|
||||
std::string firstVersion;
|
||||
std::string lastVersion;
|
||||
// A feature only be enabled by certain extensions.
|
||||
// An empty list means the feature does not require an extension.
|
||||
// Normally, only Capability enums are enabled by extension. In turn,
|
||||
@@ -228,28 +255,39 @@ public:
|
||||
// per OperandParameters above.
|
||||
class InstructionValue : public EnumValue {
|
||||
public:
|
||||
InstructionValue(EnumValue&& e, bool has_type, bool has_result)
|
||||
InstructionValue(EnumValue&& e, const std::string& printClass, bool has_type, bool has_result)
|
||||
: EnumValue(std::move(e)),
|
||||
printingClass(printClass),
|
||||
opDesc("TBD"),
|
||||
opClass(0),
|
||||
typePresent(has_type),
|
||||
resultPresent(has_result) {}
|
||||
resultPresent(has_result),
|
||||
alias(this) { }
|
||||
InstructionValue(const InstructionValue& v)
|
||||
{
|
||||
*this = v;
|
||||
alias = this;
|
||||
}
|
||||
|
||||
bool hasResult() const { return resultPresent != 0; }
|
||||
bool hasType() const { return typePresent != 0; }
|
||||
void setAlias(const InstructionValue& a) { alias = &a; }
|
||||
const InstructionValue& getAlias() const { return *alias; }
|
||||
bool isAlias() const { return alias != this; }
|
||||
|
||||
std::string printingClass;
|
||||
const char* opDesc;
|
||||
int opClass;
|
||||
|
||||
protected:
|
||||
int typePresent : 1;
|
||||
int resultPresent : 1;
|
||||
const InstructionValue* alias; // correct only after discovering the aliases; otherwise points to this
|
||||
};
|
||||
|
||||
using InstructionValues = EnumValuesContainer<InstructionValue>;
|
||||
|
||||
// Parameterization info for all instructions.
|
||||
extern InstructionValues InstructionDesc;
|
||||
extern PrintingClasses InstructionPrintingClasses;
|
||||
|
||||
// These hold definitions of the enumerants used for operands.
|
||||
// This is indexed by OperandClass, but not including OperandOpcode.
|
||||
|
@@ -1,19 +1,19 @@
|
||||
// Copyright (c) 2014-2018 The Khronos Group Inc.
|
||||
//
|
||||
// Copyright (c) 2014-2019 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/
|
||||
//
|
||||
// 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
|
||||
@@ -50,6 +50,8 @@ void Usage()
|
||||
" JSON - JSON format data\n"
|
||||
" Lua - Lua module\n"
|
||||
" Python - Python module (also accepts Py)\n"
|
||||
" C# - C# module (also accepts CSharp)\n"
|
||||
" D - D module\n"
|
||||
" -H print header in all supported languages to files in current directory\n"
|
||||
);
|
||||
}
|
||||
@@ -90,6 +92,10 @@ bool ProcessArguments(int argc, char* argv[])
|
||||
Language = spv::ELangLua;
|
||||
} else if (language == "python" || language == "py") {
|
||||
Language = spv::ELangPython;
|
||||
} else if (language == "c#" || language == "csharp") {
|
||||
Language = spv::ELangCSharp;
|
||||
} else if (language == "d") {
|
||||
Language = spv::ELangD;
|
||||
} else
|
||||
return false;
|
||||
|
||||
@@ -113,7 +119,7 @@ int main(int argc, char* argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
spv::jsonToSpirv(jsonPath);
|
||||
spv::jsonToSpirv(jsonPath, (Options & EOptionPrintHeader) != 0);
|
||||
if (Options & EOptionPrintHeader)
|
||||
spv::PrintHeader(Language, std::cout);
|
||||
|
||||
|
541
externals/sirit/include/sirit/sirit.h
vendored
541
externals/sirit/include/sirit/sirit.h
vendored
@@ -6,25 +6,39 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <type_traits>
|
||||
#include <unordered_set>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
|
||||
#include <spirv/unified1/spirv.hpp11>
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
constexpr std::uint32_t GENERATOR_MAGIC_NUMBER = 0;
|
||||
|
||||
class Op;
|
||||
class Declarations;
|
||||
class Operand;
|
||||
class Stream;
|
||||
|
||||
using Literal =
|
||||
std::variant<std::uint32_t, std::uint64_t, std::int32_t, std::int64_t, float, double>;
|
||||
using Id = const Op*;
|
||||
|
||||
struct Id {
|
||||
std::uint32_t value;
|
||||
};
|
||||
|
||||
[[nodiscard]] inline bool ValidId(Id id) noexcept {
|
||||
return id.value != 0;
|
||||
}
|
||||
|
||||
class Module {
|
||||
public:
|
||||
@@ -39,6 +53,9 @@ public:
|
||||
*/
|
||||
std::vector<std::uint32_t> Assemble() const;
|
||||
|
||||
/// Patches deferred phi nodes calling the passed function on each phi argument
|
||||
void PatchDeferredPhi(const std::function<Id(std::size_t index)>& func);
|
||||
|
||||
/// Adds a SPIR-V extension.
|
||||
void AddExtension(std::string extension_name);
|
||||
|
||||
@@ -49,24 +66,29 @@ public:
|
||||
void SetMemoryModel(spv::AddressingModel addressing_model_, spv::MemoryModel memory_model_);
|
||||
|
||||
/// Adds an entry point.
|
||||
void AddEntryPoint(spv::ExecutionModel execution_model, Id entry_point, std::string name,
|
||||
const std::vector<Id>& interfaces = {});
|
||||
void AddEntryPoint(spv::ExecutionModel execution_model, Id entry_point, std::string_view name,
|
||||
std::span<const Id> interfaces = {});
|
||||
|
||||
/// Adds an entry point.
|
||||
// TODO: Change std::is_convertible_v to std::convertible_to when compilers
|
||||
// support it; same elsewhere.
|
||||
template <typename... Ts>
|
||||
void AddEntryPoint(spv::ExecutionModel execution_model, Id entry_point, std::string name,
|
||||
Ts&&... interfaces) {
|
||||
AddEntryPoint(execution_model, std::move(entry_point), name, {interfaces...});
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) void AddEntryPoint(
|
||||
spv::ExecutionModel execution_model, Id entry_point, std::string_view name,
|
||||
Ts&&... interfaces) {
|
||||
AddEntryPoint(execution_model, std::move(entry_point), name,
|
||||
std::span<const Id>({interfaces...}));
|
||||
}
|
||||
|
||||
/// Declare an execution mode for an entry point.
|
||||
void AddExecutionMode(Id entry_point, spv::ExecutionMode mode,
|
||||
const std::vector<Literal>& literals = {});
|
||||
std::span<const Literal> literals = {});
|
||||
|
||||
/// Declare an execution mode for an entry point.
|
||||
template <typename... Ts>
|
||||
void AddExecutionMode(Id entry_point, spv::ExecutionMode mode, Ts&&... literals) {
|
||||
AddExecutionMode(entry_point, mode, {literals...});
|
||||
requires(...&& std::is_convertible_v<Ts, Literal>) void AddExecutionMode(
|
||||
Id entry_point, spv::ExecutionMode mode, Ts&&... literals) {
|
||||
AddExecutionMode(entry_point, mode, std::span<const Literal>({literals...}));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,19 +106,13 @@ public:
|
||||
return AddLabel(OpLabel());
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a local variable to the code
|
||||
* @param variable Variable to insert into code.
|
||||
* @return Returns variable.
|
||||
*/
|
||||
Id AddLocalVariable(Id label);
|
||||
/// Adds a local variable to the code
|
||||
Id AddLocalVariable(Id result_type, spv::StorageClass storage_class,
|
||||
std::optional<Id> initializer = std::nullopt);
|
||||
|
||||
/**
|
||||
* Adds a global variable
|
||||
* @param variable Global variable to add.
|
||||
* @return Returns variable.
|
||||
*/
|
||||
Id AddGlobalVariable(Id variable);
|
||||
/// Adds a global variable
|
||||
Id AddGlobalVariable(Id result_type, spv::StorageClass storage_class,
|
||||
std::optional<Id> initializer = std::nullopt);
|
||||
|
||||
// Types
|
||||
|
||||
@@ -121,7 +137,7 @@ public:
|
||||
/// Returns type image.
|
||||
Id TypeImage(Id sampled_type, spv::Dim dim, int depth, bool arrayed, bool ms, int sampled,
|
||||
spv::ImageFormat image_format,
|
||||
std::optional<spv::AccessQualifier> access_qualifier = {});
|
||||
std::optional<spv::AccessQualifier> access_qualifier = std::nullopt);
|
||||
|
||||
/// Returns type sampler.
|
||||
Id TypeSampler();
|
||||
@@ -136,27 +152,28 @@ public:
|
||||
Id TypeRuntimeArray(Id element_type);
|
||||
|
||||
/// Returns type struct.
|
||||
Id TypeStruct(const std::vector<Id>& members = {});
|
||||
Id TypeStruct(std::span<const Id> members = {});
|
||||
|
||||
/// Returns type struct.
|
||||
template <typename... Ts>
|
||||
Id TypeStruct(Ts&&... members) {
|
||||
return TypeStruct({members...});
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id TypeStruct(Ts&&... members) {
|
||||
return TypeStruct(std::span<const Id>({members...}));
|
||||
}
|
||||
|
||||
/// Returns type opaque.
|
||||
Id TypeOpaque(std::string name);
|
||||
Id TypeOpaque(std::string_view name);
|
||||
|
||||
/// Returns type pointer.
|
||||
Id TypePointer(spv::StorageClass storage_class, Id type);
|
||||
|
||||
/// Returns type function.
|
||||
Id TypeFunction(Id return_type, const std::vector<Id>& arguments = {});
|
||||
Id TypeFunction(Id return_type, std::span<const Id> arguments = {});
|
||||
|
||||
/// Returns type function.
|
||||
template <typename... Ts>
|
||||
Id TypeFunction(Id return_type, Ts&&... arguments) {
|
||||
return OpTypeFunction(return_type, {arguments...});
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id
|
||||
TypeFunction(Id return_type, Ts&&... arguments) {
|
||||
return TypeFunction(return_type, std::span<const Id>({arguments...}));
|
||||
}
|
||||
|
||||
/// Returns type event.
|
||||
@@ -186,12 +203,13 @@ public:
|
||||
Id Constant(Id result_type, const Literal& literal);
|
||||
|
||||
/// Returns a numeric scalar constant.
|
||||
Id ConstantComposite(Id result_type, const std::vector<Id>& constituents);
|
||||
Id ConstantComposite(Id result_type, std::span<const Id> constituents);
|
||||
|
||||
/// Returns a numeric scalar constant.
|
||||
template <typename... Ts>
|
||||
Id ConstantComposite(Id result_type, Ts&&... constituents) {
|
||||
return ConstantComposite(result_type, {constituents...});
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id
|
||||
ConstantComposite(Id result_type, Ts&&... constituents) {
|
||||
return ConstantComposite(result_type, std::span<const Id>({constituents...}));
|
||||
}
|
||||
|
||||
/// Returns a sampler constant.
|
||||
@@ -207,28 +225,50 @@ public:
|
||||
Id OpFunction(Id result_type, spv::FunctionControlMask function_control, Id function_type);
|
||||
|
||||
/// Ends a function.
|
||||
Id OpFunctionEnd();
|
||||
void OpFunctionEnd();
|
||||
|
||||
/// Call a function.
|
||||
Id OpFunctionCall(Id result_type, Id function, const std::vector<Id>& arguments = {});
|
||||
Id OpFunctionCall(Id result_type, Id function, std::span<const Id> arguments = {});
|
||||
|
||||
/// Call a function.
|
||||
template <typename... Ts>
|
||||
Id OpFunctionCall(Id result_type, Id function, Ts&&... arguments) {
|
||||
return OpFunctionCall(result_type, function, {arguments...});
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id
|
||||
OpFunctionCall(Id result_type, Id function, Ts&&... arguments) {
|
||||
return OpFunctionCall(result_type, function, std::span<const Id>({arguments...}));
|
||||
}
|
||||
|
||||
/// Declare a formal parameter of the current function.
|
||||
Id OpFunctionParameter(Id result_type);
|
||||
|
||||
// Flow
|
||||
|
||||
/**
|
||||
* The SSA phi function.
|
||||
*
|
||||
* @param result_type The result type.
|
||||
* @param operands An immutable span of variable, parent block pairs
|
||||
*/
|
||||
Id OpPhi(Id result_type, std::span<const Id> operands);
|
||||
|
||||
/**
|
||||
* The SSA phi function. This instruction will be revisited when patching phi nodes.
|
||||
*
|
||||
* @param result_type The result type.
|
||||
* @param blocks An immutable span of block pairs.
|
||||
*/
|
||||
Id DeferredOpPhi(Id result_type, std::span<const Id> blocks);
|
||||
|
||||
/// Declare a structured loop.
|
||||
Id OpLoopMerge(Id merge_block, Id continue_target, spv::LoopControlMask loop_control,
|
||||
const std::vector<Id>& literals = {});
|
||||
std::span<const Id> literals = {});
|
||||
|
||||
/// Declare a structured loop.
|
||||
template <typename... Ts>
|
||||
Id OpLoopMerge(Id merge_block, Id continue_target, spv::LoopControlMask loop_control,
|
||||
Ts&&... literals) {
|
||||
return OpLoopMerge(merge_block, continue_target, loop_control, {literals...});
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id
|
||||
OpLoopMerge(Id merge_block, Id continue_target, spv::LoopControlMask loop_control,
|
||||
Ts&&... literals) {
|
||||
return OpLoopMerge(merge_block, continue_target, loop_control,
|
||||
std::span<const Id>({literals...}));
|
||||
}
|
||||
|
||||
/// Declare a structured selection.
|
||||
@@ -238,8 +278,8 @@ public:
|
||||
Id OpLabel();
|
||||
|
||||
/// The block label instruction: Any reference to a block is through this ref.
|
||||
Id OpLabel(std::string label_name) {
|
||||
return Name(OpLabel(), std::move(label_name));
|
||||
Id OpLabel(std::string_view label_name) {
|
||||
return Name(OpLabel(), label_name);
|
||||
}
|
||||
|
||||
/// Unconditional jump to label.
|
||||
@@ -251,55 +291,62 @@ public:
|
||||
std::uint32_t true_weight = 0, std::uint32_t false_weight = 0);
|
||||
|
||||
/// Multi-way branch to one of the operand label.
|
||||
Id OpSwitch(Id selector, Id default_label, const std::vector<Literal>& literals,
|
||||
const std::vector<Id>& labels);
|
||||
Id OpSwitch(Id selector, Id default_label, std::span<const Literal> literals,
|
||||
std::span<const Id> labels);
|
||||
|
||||
/// Returns with no value from a function with void return type.
|
||||
Id OpReturn();
|
||||
void OpReturn();
|
||||
|
||||
/// Behavior is undefined if this instruction is executed.
|
||||
void OpUnreachable();
|
||||
|
||||
/// Return a value from a function.
|
||||
Id OpReturnValue(Id value);
|
||||
|
||||
/// Fragment-shader discard.
|
||||
Id OpKill();
|
||||
void OpKill();
|
||||
|
||||
/// Demote fragment shader invocation to a helper invocation
|
||||
void OpDemoteToHelperInvocationEXT();
|
||||
|
||||
// Debug
|
||||
|
||||
/// Assign a name string to a reference.
|
||||
/// @return target
|
||||
Id Name(Id target, std::string name);
|
||||
Id Name(Id target, std::string_view name);
|
||||
|
||||
/// Assign a name string to a member of a structure type.
|
||||
/// @return type
|
||||
Id MemberName(Id type, std::uint32_t member, std::string name);
|
||||
Id MemberName(Id type, std::uint32_t member, std::string_view name);
|
||||
|
||||
/// Assign a Result <id> to a string for use by other debug instructions.
|
||||
Id String(std::string string);
|
||||
Id String(std::string_view string);
|
||||
|
||||
/// Add source-level location information
|
||||
Id OpLine(Id file, Literal line, Literal column);
|
||||
|
||||
// Memory
|
||||
|
||||
/// Allocate an object in memory, resulting in a copy to it.
|
||||
Id OpVariable(Id result_type, spv::StorageClass storage_class, Id initializer = nullptr);
|
||||
|
||||
/// Form a pointer to a texel of an image. Use of such a pointer is limited to atomic operations.
|
||||
/// Form a pointer to a texel of an image. Use of such a pointer is limited to atomic
|
||||
/// operations.
|
||||
Id OpImageTexelPointer(Id result_type, Id image, Id coordinate, Id sample);
|
||||
|
||||
/// Load through a pointer.
|
||||
Id OpLoad(Id result_type, Id pointer, std::optional<spv::MemoryAccessMask> memory_access = {});
|
||||
Id OpLoad(Id result_type, Id pointer,
|
||||
std::optional<spv::MemoryAccessMask> memory_access = std::nullopt);
|
||||
|
||||
/// Store through a pointer.
|
||||
Id OpStore(Id pointer, Id object, std::optional<spv::MemoryAccessMask> memory_access = {});
|
||||
Id OpStore(Id pointer, Id object,
|
||||
std::optional<spv::MemoryAccessMask> memory_access = std::nullopt);
|
||||
|
||||
/// Create a pointer into a composite object that can be used with OpLoad and OpStore.
|
||||
Id OpAccessChain(Id result_type, Id base, const std::vector<Id>& indexes = {});
|
||||
Id OpAccessChain(Id result_type, Id base, std::span<const Id> indexes = {});
|
||||
|
||||
/// Create a pointer into a composite object that can be used with OpLoad and OpStore.
|
||||
template <typename... Ts>
|
||||
Id OpAccessChain(Id result_type, Id base, Ts&&... indexes) {
|
||||
return OpAccessChain(result_type, base, {indexes...});
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id
|
||||
OpAccessChain(Id result_type, Id base, Ts&&... indexes) {
|
||||
return OpAccessChain(result_type, base, std::span<const Id>({indexes...}));
|
||||
}
|
||||
|
||||
/// Extract a single, dynamically selected, component of a vector.
|
||||
@@ -310,50 +357,67 @@ public:
|
||||
|
||||
/// Make a copy of a composite object, while modifying one part of it.
|
||||
Id OpCompositeInsert(Id result_type, Id object, Id composite,
|
||||
const std::vector<Literal>& indexes = {});
|
||||
std::span<const Literal> indexes = {});
|
||||
|
||||
/// Make a copy of a composite object, while modifying one part of it.
|
||||
template <typename... Ts>
|
||||
Id OpCompositeInsert(Id result_type, Id object, Id composite, Ts&&... indexes) {
|
||||
return OpCompositeInsert(result_type, object, composite, {indexes...});
|
||||
requires(...&& std::is_convertible_v<Ts, Literal>) Id
|
||||
OpCompositeInsert(Id result_type, Id object, Id composite, Ts&&... indexes) {
|
||||
const Literal stack_indexes[] = {std::forward<Ts>(indexes)...};
|
||||
return OpCompositeInsert(result_type, object, composite,
|
||||
std::span<const Literal>{stack_indexes});
|
||||
}
|
||||
|
||||
/// Extract a part of a composite object.
|
||||
Id OpCompositeExtract(Id result_type, Id composite, const std::vector<Literal>& indexes = {});
|
||||
Id OpCompositeExtract(Id result_type, Id composite, std::span<const Literal> indexes = {});
|
||||
|
||||
/// Extract a part of a composite object.
|
||||
template <typename... Ts>
|
||||
Id OpCompositeExtract(Id result_type, Id composite, Ts&&... indexes) {
|
||||
return OpCompositeExtract(result_type, composite, {indexes...});
|
||||
requires(...&& std::is_convertible_v<Ts, Literal>) Id
|
||||
OpCompositeExtract(Id result_type, Id composite, Ts&&... indexes) {
|
||||
const Literal stack_indexes[] = {std::forward<Ts>(indexes)...};
|
||||
return OpCompositeExtract(result_type, composite, std::span<const Literal>{stack_indexes});
|
||||
}
|
||||
|
||||
/// Construct a new composite object from a set of constituent objects that will fully form it.
|
||||
Id OpCompositeConstruct(Id result_type, const std::vector<Id>& ids);
|
||||
Id OpCompositeConstruct(Id result_type, std::span<const Id> ids);
|
||||
|
||||
/// Construct a new composite object from a set of constituent objects that will fully form it.
|
||||
template <typename... Ts>
|
||||
Id OpCompositeConstruct(Id result_type, Ts&&... ids) {
|
||||
return OpCompositeConstruct(result_type, {ids...});
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id
|
||||
OpCompositeConstruct(Id result_type, Ts&&... ids) {
|
||||
return OpCompositeConstruct(result_type, std::span<const Id>({ids...}));
|
||||
}
|
||||
|
||||
// Annotation
|
||||
|
||||
/// Add a decoration to target.
|
||||
Id Decorate(Id target, spv::Decoration decoration, const std::vector<Literal>& literals = {});
|
||||
Id Decorate(Id target, spv::Decoration decoration, std::span<const Literal> literals = {});
|
||||
|
||||
/// Add a decoration to target.
|
||||
template <typename... Ts>
|
||||
Id Decorate(Id target, spv::Decoration decoration, Ts&&... literals) {
|
||||
return Decorate(target, decoration, {literals...});
|
||||
requires(...&& std::is_convertible_v<Ts, Literal>) Id
|
||||
Decorate(Id target, spv::Decoration decoration, Ts&&... literals) {
|
||||
const Literal stack_literals[] = {std::forward<Ts>(literals)...};
|
||||
return Decorate(target, decoration, std::span<const Literal>{stack_literals});
|
||||
}
|
||||
|
||||
/// Add a decoration to target.
|
||||
template <typename T>
|
||||
requires std::is_enum_v<T> Id Decorate(Id target, spv::Decoration decoration, T literal) {
|
||||
return Decorate(target, decoration, static_cast<std::uint32_t>(literal));
|
||||
}
|
||||
|
||||
Id MemberDecorate(Id structure_type, Literal member, spv::Decoration decoration,
|
||||
const std::vector<Literal>& literals = {});
|
||||
std::span<const Literal> literals = {});
|
||||
|
||||
template <typename... Ts>
|
||||
Id MemberDecorate(Id structure_type, Literal member, spv::Decoration decoration,
|
||||
Ts&&... literals) {
|
||||
return MemberDecorate(structure_type, member, decoration, {literals...});
|
||||
requires(...&& std::is_convertible_v<Ts, Literal>) Id
|
||||
MemberDecorate(Id structure_type, Literal member, spv::Decoration decoration,
|
||||
Ts&&... literals) {
|
||||
const Literal stack_literals[] = {std::forward<Ts>(literals)...};
|
||||
return MemberDecorate(structure_type, member, decoration,
|
||||
std::span<const Literal>{stack_literals});
|
||||
}
|
||||
|
||||
// Misc
|
||||
@@ -362,10 +426,17 @@ public:
|
||||
Id OpUndef(Id result_type);
|
||||
|
||||
/// Emits the current values of all output variables to the current output primitive.
|
||||
Id OpEmitVertex();
|
||||
void OpEmitVertex();
|
||||
|
||||
/// Finish the current primitive and start a new one. No vertex is emitted.
|
||||
Id OpEndPrimitive();
|
||||
void OpEndPrimitive();
|
||||
|
||||
/// Emits the current values of all output variables to the current output primitive. After
|
||||
/// execution, the values of all output variables are undefined.
|
||||
void OpEmitStreamVertex(Id stream);
|
||||
|
||||
/// Finish the current primitive and start a new one. No vertex is emitted.
|
||||
void OpEndStreamPrimitive(Id stream);
|
||||
|
||||
// Barrier
|
||||
|
||||
@@ -569,7 +640,7 @@ public:
|
||||
/// Integer substraction of Operand 1 and Operand 2.
|
||||
Id OpISub(Id result_type, Id operand_1, Id operand_2);
|
||||
|
||||
/// Floating-point substraction of Operand 1 and Operand 2.
|
||||
/// Floating-point subtraction of Operand 1 and Operand 2.
|
||||
Id OpFSub(Id result_type, Id operand_1, Id operand_2);
|
||||
|
||||
/// Integer multiplication of Operand 1 and Operand 2.
|
||||
@@ -608,13 +679,13 @@ public:
|
||||
// Extensions
|
||||
|
||||
/// Execute an instruction in an imported set of extended instructions.
|
||||
Id OpExtInst(Id result_type, Id set, std::uint32_t instruction,
|
||||
const std::vector<Id>& operands);
|
||||
Id OpExtInst(Id result_type, Id set, std::uint32_t instruction, std::span<const Id> operands);
|
||||
|
||||
/// Execute an instruction in an imported set of extended instructions.
|
||||
template <typename... Ts>
|
||||
Id OpExtInst(Id result_type, Id set, std::uint32_t instruction, Ts&&... operands) {
|
||||
return OpExtInst(result_type, set, instruction, {operands...});
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id
|
||||
OpExtInst(Id result_type, Id set, std::uint32_t instruction, Ts&&... operands) {
|
||||
return OpExtInst(result_type, set, instruction, std::span<const Id>({operands...}));
|
||||
}
|
||||
|
||||
/// Result is x if x >= 0; otherwise result is -x.
|
||||
@@ -756,6 +827,52 @@ public:
|
||||
/// of the pixel specified by offset.
|
||||
Id OpInterpolateAtOffset(Id result_type, Id interpolant, Id offset);
|
||||
|
||||
// Derivatives
|
||||
|
||||
/// Same result as either OpDPdxFine or OpDPdxCoarse on the input.
|
||||
/// Selection of which one is based on external factors.
|
||||
Id OpDPdx(Id result_type, Id operand);
|
||||
|
||||
/// Same result as either OpDPdyFine or OpDPdyCoarse on the input.
|
||||
/// Selection of which one is based on external factors.
|
||||
Id OpDPdy(Id result_type, Id operand);
|
||||
|
||||
/// Result is the same as computing the sum of the absolute values of OpDPdx and OpDPdy
|
||||
/// on the input.
|
||||
Id OpFwidth(Id result_type, Id operand);
|
||||
|
||||
/// Result is the partial derivative of the input with respect to the window x coordinate.
|
||||
/// Uses local differencing based on the value of the input for the current fragment and
|
||||
/// its immediate neighbor(s).
|
||||
Id OpDPdxFine(Id result_type, Id operand);
|
||||
|
||||
/// Result is the partial derivative of the input with respect to the window y coordinate.
|
||||
/// Uses local differencing based on the value of the input for the current fragment and
|
||||
/// its immediate neighbor(s).
|
||||
Id OpDPdyFine(Id result_type, Id operand);
|
||||
|
||||
/// Result is the same as computing the sum of the absolute values of OpDPdxFine and OpDPdyFine
|
||||
/// on the input.
|
||||
Id OpFwidthFine(Id result_type, Id operand);
|
||||
|
||||
/// Result is the partial derivative of the input with respect to the window x coordinate.
|
||||
/// Uses local differencing based on the value of the input for the current fragment's
|
||||
/// neighbors, and possibly, but not necessarily, includes the value of the input for the
|
||||
/// current fragment. That is, over a given area, the implementation can compute x derivatives
|
||||
/// in fewer unique locations than would be allowed for OpDPdxFine.
|
||||
Id OpDPdxCoarse(Id result_type, Id operand);
|
||||
|
||||
/// Result is the partial derivative of the input with respect to the window y coordinate.
|
||||
/// Uses local differencing based on the value of the input for the current fragment's
|
||||
/// neighbors, and possibly, but not necessarily, includes the value of the input for the
|
||||
/// current fragment. That is, over a given area, the implementation can compute y derivatives
|
||||
/// in fewer unique locations than would be allowed for OpDPdyFine.
|
||||
Id OpDPdyCoarse(Id result_type, Id operand);
|
||||
|
||||
/// Result is the same as computing the sum of the absolute values of OpDPdxCoarse and
|
||||
/// OpDPdyCoarse on the input.
|
||||
Id OpFwidthCoarse(Id result_type, Id operand);
|
||||
|
||||
// Image
|
||||
|
||||
/// Create a sampled image, containing both a sampler and an image.
|
||||
@@ -763,172 +880,191 @@ public:
|
||||
|
||||
/// Sample an image with an implicit level of detail.
|
||||
Id OpImageSampleImplicitLod(Id result_type, Id sampled_image, Id coordinate,
|
||||
std::optional<spv::ImageOperandsMask> image_operands = {},
|
||||
const std::vector<Id>& operands = {});
|
||||
std::optional<spv::ImageOperandsMask> image_operands = std::nullopt,
|
||||
std::span<const Id> operands = {});
|
||||
|
||||
/// Sample an image with an implicit level of detail.
|
||||
template <typename... Ts>
|
||||
Id OpImageSampleImplicitLod(Id result_type, Id sampled_image, Id coordinate,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id
|
||||
OpImageSampleImplicitLod(Id result_type, Id sampled_image, Id coordinate,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
return OpImageSampleImplicitLod(result_type, sampled_image, coordinate, image_operands,
|
||||
{operands...});
|
||||
std::span<const Id>({operands...}));
|
||||
}
|
||||
|
||||
/// Sample an image using an explicit level of detail.
|
||||
Id OpImageSampleExplicitLod(Id result_type, Id sampled_image, Id coordinate,
|
||||
spv::ImageOperandsMask image_operands,
|
||||
const std::vector<Id>& operands = {});
|
||||
std::span<const Id> operands = {});
|
||||
|
||||
/// Sample an image using an explicit level of detail.
|
||||
template <typename... Ts>
|
||||
Id OpImageSampleExplicitLod(Id result_type, Id sampled_image, Id coordinate,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id
|
||||
OpImageSampleExplicitLod(Id result_type, Id sampled_image, Id coordinate,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
return OpImageSampleExplicitLod(result_type, sampled_image, coordinate, image_operands,
|
||||
{operands...});
|
||||
std::span<const Id>({operands...}));
|
||||
}
|
||||
|
||||
/// Sample an image doing depth-comparison with an implicit level of detail.
|
||||
Id OpImageSampleDrefImplicitLod(Id result_type, Id sampled_image, Id coordinate, Id dref,
|
||||
std::optional<spv::ImageOperandsMask> image_operands = {},
|
||||
const std::vector<Id>& operands = {});
|
||||
Id OpImageSampleDrefImplicitLod(
|
||||
Id result_type, Id sampled_image, Id coordinate, Id dref,
|
||||
std::optional<spv::ImageOperandsMask> image_operands = std::nullopt,
|
||||
std::span<const Id> operands = {});
|
||||
|
||||
/// Sample an image doing depth-comparison with an implicit level of detail.
|
||||
template <typename... Ts>
|
||||
Id OpImageSampleDrefImplicitLod(Id result_type, Id sampled_image, Id coordinate, Id dref,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id
|
||||
OpImageSampleDrefImplicitLod(Id result_type, Id sampled_image, Id coordinate, Id dref,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
return OpImageSampleDrefImplicitLod(result_type, sampled_image, coordinate, dref,
|
||||
image_operands, {operands...});
|
||||
image_operands, std::span<const Id>({operands...}));
|
||||
}
|
||||
|
||||
/// Sample an image doing depth-comparison using an explicit level of detail.
|
||||
Id OpImageSampleDrefExplicitLod(Id result_type, Id sampled_image, Id coordinate, Id dref,
|
||||
spv::ImageOperandsMask image_operands,
|
||||
const std::vector<Id>& operands = {});
|
||||
std::span<const Id> operands = {});
|
||||
|
||||
/// Sample an image doing depth-comparison using an explicit level of detail.
|
||||
template <typename... Ts>
|
||||
Id OpImageSampleDrefExplicitLod(Id result_type, Id sampled_image, Id coordinate, Id dref,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id
|
||||
OpImageSampleDrefExplicitLod(Id result_type, Id sampled_image, Id coordinate, Id dref,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
return OpImageSampleDrefExplicitLod(result_type, sampled_image, coordinate, dref,
|
||||
image_operands, {operands...});
|
||||
image_operands, std::span<const Id>({operands...}));
|
||||
}
|
||||
|
||||
/// Sample an image with with a project coordinate and an implicit level of detail.
|
||||
Id OpImageSampleProjImplicitLod(Id result_type, Id sampled_image, Id coordinate,
|
||||
std::optional<spv::ImageOperandsMask> image_operands = {},
|
||||
const std::vector<Id>& operands = {});
|
||||
Id OpImageSampleProjImplicitLod(
|
||||
Id result_type, Id sampled_image, Id coordinate,
|
||||
std::optional<spv::ImageOperandsMask> image_operands = std::nullopt,
|
||||
std::span<const Id> operands = {});
|
||||
|
||||
/// Sample an image with with a project coordinate and an implicit level of detail.
|
||||
template <typename... Ts>
|
||||
Id OpImageSampleProjImplicitLod(Id result_type, Id sampled_image, Id coordinate,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id
|
||||
OpImageSampleProjImplicitLod(Id result_type, Id sampled_image, Id coordinate,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
return OpImageSampleProjImplicitLod(result_type, sampled_image, coordinate, image_operands,
|
||||
{operands...});
|
||||
std::span<const Id>({operands...}));
|
||||
}
|
||||
|
||||
/// Sample an image with a project coordinate using an explicit level of detail.
|
||||
Id OpImageSampleProjExplicitLod(Id result_type, Id sampled_image, Id coordinate,
|
||||
spv::ImageOperandsMask image_operands,
|
||||
const std::vector<Id>& operands = {});
|
||||
std::span<const Id> operands = {});
|
||||
|
||||
/// Sample an image with a project coordinate using an explicit level of detail.
|
||||
template <typename... Ts>
|
||||
Id OpImageSampleProjExplicitLod(Id result_type, Id sampled_image, Id coordinate,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id
|
||||
OpImageSampleProjExplicitLod(Id result_type, Id sampled_image, Id coordinate,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
return OpImageSampleProjExplicitLod(result_type, sampled_image, coordinate, image_operands,
|
||||
{operands...});
|
||||
std::span<const Id>({operands...}));
|
||||
}
|
||||
|
||||
/// Sample an image with a project coordinate, doing depth-comparison, with an implicit level of
|
||||
/// detail.
|
||||
Id OpImageSampleProjDrefImplicitLod(Id result_type, Id sampled_image, Id coordinate, Id dref,
|
||||
std::optional<spv::ImageOperandsMask> image_operands = {},
|
||||
const std::vector<Id>& operands = {});
|
||||
Id OpImageSampleProjDrefImplicitLod(
|
||||
Id result_type, Id sampled_image, Id coordinate, Id dref,
|
||||
std::optional<spv::ImageOperandsMask> image_operands = std::nullopt,
|
||||
std::span<const Id> operands = {});
|
||||
|
||||
/// Sample an image with a project coordinate, doing depth-comparison, with an implicit level of
|
||||
/// detail.
|
||||
template <typename... Ts>
|
||||
Id OpImageSampleProjDrefImplicitLod(Id result_type, Id sampled_image, Id coordinate, Id dref,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id
|
||||
OpImageSampleProjDrefImplicitLod(Id result_type, Id sampled_image, Id coordinate, Id dref,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
return OpImageSampleProjDrefImplicitLod(result_type, sampled_image, coordinate, dref,
|
||||
image_operands, {operands...});
|
||||
image_operands, std::span<const Id>({operands...}));
|
||||
}
|
||||
|
||||
/// Sample an image with a project coordinate, doing depth-comparison, using an explicit level
|
||||
/// of detail.
|
||||
Id OpImageSampleProjDrefExplicitLod(Id result_type, Id sampled_image, Id coordinate, Id dref,
|
||||
spv::ImageOperandsMask image_operands,
|
||||
const std::vector<Id>& operands = {});
|
||||
std::span<const Id> operands = {});
|
||||
|
||||
/// Sample an image with a project coordinate, doing depth-comparison, using an explicit level
|
||||
/// of detail.
|
||||
template <typename... Ts>
|
||||
Id OpImageSampleProjDrefExplicitLod(Id result_type, Id sampled_image, Id coordinate, Id dref,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id
|
||||
OpImageSampleProjDrefExplicitLod(Id result_type, Id sampled_image, Id coordinate, Id dref,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
return OpImageSampleProjDrefExplicitLod(result_type, sampled_image, coordinate, dref,
|
||||
image_operands, {operands...});
|
||||
image_operands, std::span<const Id>({operands...}));
|
||||
}
|
||||
|
||||
/// Fetch a single texel from an image whose Sampled operand is 1.
|
||||
Id OpImageFetch(Id result_type, Id sampled_image, Id coordinate,
|
||||
std::optional<spv::ImageOperandsMask> image_operands = {},
|
||||
const std::vector<Id>& operands = {});
|
||||
std::optional<spv::ImageOperandsMask> image_operands = std::nullopt,
|
||||
std::span<const Id> operands = {});
|
||||
|
||||
/// Fetch a single texel from an image whose Sampled operand is 1.
|
||||
template <typename... Ts>
|
||||
Id OpImageFetch(Id result_type, Id sampled_image, Id coordinate,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
return OpImageFetch(result_type, sampled_image, coordinate, image_operands, {operands...});
|
||||
}
|
||||
|
||||
/// Gathers the requested component from four texels.
|
||||
Id OpImageGather(Id result_type, Id sampled_image, Id coordinate, Id component,
|
||||
std::optional<spv::ImageOperandsMask> image_operands = {},
|
||||
const std::vector<Id>& operands = {});
|
||||
|
||||
/// Gathers the requested component from four texels.
|
||||
template <typename... Ts>
|
||||
Id OpImageGather(Id result_type, Id sampled_image, Id coordinate, Id component,
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id
|
||||
OpImageFetch(Id result_type, Id sampled_image, Id coordinate,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
return OpImageFetch(result_type, sampled_image, coordinate, image_operands,
|
||||
std::span<const Id>({operands...}));
|
||||
}
|
||||
|
||||
/// Gathers the requested component from four texels.
|
||||
Id OpImageGather(Id result_type, Id sampled_image, Id coordinate, Id component,
|
||||
std::optional<spv::ImageOperandsMask> image_operands = std::nullopt,
|
||||
std::span<const Id> operands = {});
|
||||
|
||||
/// Gathers the requested component from four texels.
|
||||
template <typename... Ts>
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id
|
||||
OpImageGather(Id result_type, Id sampled_image, Id coordinate, Id component,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
return OpImageGather(result_type, sampled_image, coordinate, component, image_operands,
|
||||
{operands...});
|
||||
std::span<const Id>({operands...}));
|
||||
}
|
||||
|
||||
/// Gathers the requested depth-comparison from four texels.
|
||||
Id OpImageDrefGather(Id result_type, Id sampled_image, Id coordinate, Id dref,
|
||||
std::optional<spv::ImageOperandsMask> image_operands = {},
|
||||
const std::vector<Id>& operands = {});
|
||||
std::optional<spv::ImageOperandsMask> image_operands = std::nullopt,
|
||||
std::span<const Id> operands = {});
|
||||
|
||||
/// Gathers the requested depth-comparison from four texels.
|
||||
template <typename... Ts>
|
||||
Id OpImageDrefGather(Id result_type, Id sampled_image, Id coordinate, Id dref,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id
|
||||
OpImageDrefGather(Id result_type, Id sampled_image, Id coordinate, Id dref,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
return OpImageDrefGather(result_type, sampled_image, coordinate, dref, image_operands,
|
||||
{operands...});
|
||||
std::span<const Id>({operands...}));
|
||||
}
|
||||
|
||||
/// Read a texel from an image without a sampler.
|
||||
Id OpImageRead(Id result_type, Id sampled_image, Id coordinate,
|
||||
std::optional<spv::ImageOperandsMask> image_operands = {},
|
||||
const std::vector<Id>& operands = {});
|
||||
std::optional<spv::ImageOperandsMask> image_operands = std::nullopt,
|
||||
std::span<const Id> operands = {});
|
||||
|
||||
/// Read a texel from an image without a sampler.
|
||||
template <typename... Ts>
|
||||
Id OpImageRead(Id result_type, Id sampled_image, Id coordinate,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
return OpImageRead(result_type, sampled_image, coordinate, image_operands, {operands...});
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id
|
||||
OpImageRead(Id result_type, Id sampled_image, Id coordinate,
|
||||
spv::ImageOperandsMask image_operands, Ts&&... operands) {
|
||||
return OpImageRead(result_type, sampled_image, coordinate, image_operands,
|
||||
std::span<const Id>({operands...}));
|
||||
}
|
||||
|
||||
/// Write a texel to an image without a sampler.
|
||||
Id OpImageWrite(Id image, Id coordinate, Id texel,
|
||||
std::optional<spv::ImageOperandsMask> image_operands = {},
|
||||
const std::vector<Id>& operands = {});
|
||||
std::optional<spv::ImageOperandsMask> image_operands = std::nullopt,
|
||||
std::span<const Id> operands = {});
|
||||
|
||||
/// Write a texel to an image without a sampler.
|
||||
template <typename... Ts>
|
||||
Id OpImageWrite(Id image, Id coordinate, Id texel, spv::ImageOperandsMask image_operands,
|
||||
Ts&&... operands) {
|
||||
return OpImageWrite(image, coordinate, texel, image_operands, {operands...});
|
||||
requires(...&& std::is_convertible_v<Ts, Id>) Id
|
||||
OpImageWrite(Id image, Id coordinate, Id texel, spv::ImageOperandsMask image_operands,
|
||||
Ts&&... operands) {
|
||||
return OpImageWrite(image, coordinate, texel, image_operands,
|
||||
std::span<const Id>({operands...}));
|
||||
}
|
||||
|
||||
/// Extract the image from a sampled image.
|
||||
@@ -950,6 +1086,50 @@ public:
|
||||
/// Query the number of samples available per texel fetch in a multisample image.
|
||||
Id OpImageQuerySamples(Id result_type, Id image);
|
||||
|
||||
/// Sample a sparse image with an implicit level of detail.
|
||||
Id OpImageSparseSampleImplicitLod(Id result_type, Id sampled_image, Id coordinate,
|
||||
std::optional<spv::ImageOperandsMask> image_operands,
|
||||
std::span<const Id> operands);
|
||||
|
||||
/// Sample a sparse image using an explicit level of detail.
|
||||
Id OpImageSparseSampleExplicitLod(Id result_type, Id sampled_image, Id coordinate,
|
||||
spv::ImageOperandsMask image_operands,
|
||||
std::span<const Id> operands);
|
||||
|
||||
/// Sample a sparse image doing depth-comparison with an implicit level of detail.
|
||||
Id OpImageSparseSampleDrefImplicitLod(Id result_type, Id sampled_image, Id coordinate, Id dref,
|
||||
std::optional<spv::ImageOperandsMask> image_operands,
|
||||
std::span<const Id> operands);
|
||||
|
||||
/// Sample a sparse image doing depth-comparison using an explicit level of detail.
|
||||
Id OpImageSparseSampleDrefExplicitLod(Id result_type, Id sampled_image, Id coordinate, Id dref,
|
||||
spv::ImageOperandsMask image_operands,
|
||||
std::span<const Id> operands);
|
||||
|
||||
/// Fetch a single texel from a sampled sparse image.
|
||||
Id OpImageSparseFetch(Id result_type, Id image, Id coordinate,
|
||||
std::optional<spv::ImageOperandsMask> image_operands,
|
||||
std::span<const Id> operands);
|
||||
|
||||
/// Gathers the requested component from four texels of a sparse image.
|
||||
Id OpImageSparseGather(Id result_type, Id sampled_image, Id coordinate, Id component,
|
||||
std::optional<spv::ImageOperandsMask> image_operands,
|
||||
std::span<const Id> operands);
|
||||
|
||||
/// Gathers the requested depth-comparison from four texels of a sparse image.
|
||||
Id OpImageSparseDrefGather(Id result_type, Id sampled_image, Id coordinate, Id dref,
|
||||
std::optional<spv::ImageOperandsMask> image_operands,
|
||||
std::span<const Id> operands);
|
||||
|
||||
/// Translates a Resident Code into a Boolean. Result is false if any of the texels were in
|
||||
/// uncommitted texture memory, and true otherwise.
|
||||
Id OpImageSparseTexelsResident(Id result_type, Id resident_code);
|
||||
|
||||
/// Read a texel from a sparse image without a sampler.
|
||||
Id OpImageSparseRead(Id result_type, Id image, Id coordinate,
|
||||
std::optional<spv::ImageOperandsMask> image_operands,
|
||||
std::span<const Id> operands);
|
||||
|
||||
// Group
|
||||
|
||||
/// Computes a bitfield value combining the Predicate value from all invocations in the current
|
||||
@@ -972,7 +1152,29 @@ public:
|
||||
|
||||
/// Return the value of the invocation identified by the current invocation's id within the
|
||||
/// group xor'ed with mask.
|
||||
Id OpGroupNonUniformShuffleXor(Id result_type, spv::Scope scope, Id value, Id mask);
|
||||
Id OpGroupNonUniformShuffleXor(Id result_type, Id scope, Id value, Id mask);
|
||||
|
||||
/// Evaluates a predicate for all active invocations in the group, resulting in
|
||||
/// true if predicate evaluates to true for all active invocations in the
|
||||
/// group, otherwise the result is false.
|
||||
Id OpGroupNonUniformAll(Id result_type, Id scope, Id predicate);
|
||||
|
||||
/// Evaluates a predicate for all active invocations in the group,
|
||||
/// resulting in true if predicate evaluates to true for any active
|
||||
/// invocation in the group, otherwise the result is false.
|
||||
Id OpGroupNonUniformAny(Id result_type, Id scope, Id predicate);
|
||||
|
||||
/// Evaluates a value for all active invocations in the group. The result
|
||||
/// is true if Value is equal for all active invocations in the group.
|
||||
/// Otherwise, the result is false.
|
||||
Id OpGroupNonUniformAllEqual(Id result_type, Id scope, Id value);
|
||||
|
||||
/// Result is a bitfield value combining the Predicate value from all
|
||||
/// invocations in the group that execute the same dynamic instance of this
|
||||
/// instruction. The bit is set to one if the corresponding invocation is
|
||||
/// active and the Predicate for that invocation evaluated to true;
|
||||
/// otherwise, it is set to zero.
|
||||
Id OpGroupNonUniformBallot(Id result_type, Id scope, Id predicate);
|
||||
|
||||
// Atomic
|
||||
|
||||
@@ -1077,38 +1279,27 @@ public:
|
||||
Id OpAtomicXor(Id result_type, Id pointer, Id memory, Id semantics, Id value);
|
||||
|
||||
private:
|
||||
Id AddCode(std::unique_ptr<Op> op);
|
||||
|
||||
Id AddCode(spv::Op opcode, std::optional<std::uint32_t> id = {});
|
||||
|
||||
Id AddDeclaration(std::unique_ptr<Op> op);
|
||||
|
||||
void AddAnnotation(std::unique_ptr<Op> op);
|
||||
|
||||
Id GetGLSLstd450();
|
||||
|
||||
std::uint32_t version{};
|
||||
std::uint32_t bound{1};
|
||||
std::uint32_t bound{};
|
||||
|
||||
std::unordered_set<std::string> extensions;
|
||||
std::unordered_set<spv::Capability> capabilities;
|
||||
std::unordered_set<std::unique_ptr<Op>> ext_inst_import;
|
||||
std::unique_ptr<Op> glsl_std_450;
|
||||
std::optional<Id> glsl_std_450;
|
||||
|
||||
spv::AddressingModel addressing_model{spv::AddressingModel::Logical};
|
||||
spv::MemoryModel memory_model{spv::MemoryModel::GLSL450};
|
||||
|
||||
std::vector<std::unique_ptr<Op>> entry_points;
|
||||
std::vector<std::unique_ptr<Op>> execution_modes;
|
||||
std::vector<std::unique_ptr<Op>> debug;
|
||||
std::vector<std::unique_ptr<Op>> annotations;
|
||||
std::vector<std::unique_ptr<Op>> declarations;
|
||||
|
||||
std::vector<Id> global_variables;
|
||||
|
||||
std::vector<Id> code;
|
||||
|
||||
std::vector<std::unique_ptr<Op>> code_store;
|
||||
std::unique_ptr<Stream> ext_inst_imports;
|
||||
std::unique_ptr<Stream> entry_points;
|
||||
std::unique_ptr<Stream> execution_modes;
|
||||
std::unique_ptr<Stream> debug;
|
||||
std::unique_ptr<Stream> annotations;
|
||||
std::unique_ptr<Declarations> declarations;
|
||||
std::unique_ptr<Stream> global_variables;
|
||||
std::unique_ptr<Stream> code;
|
||||
std::vector<std::uint32_t> deferred_phi_nodes;
|
||||
};
|
||||
|
||||
} // namespace Sirit
|
||||
|
10
externals/sirit/src/CMakeLists.txt
vendored
10
externals/sirit/src/CMakeLists.txt
vendored
@@ -1,22 +1,14 @@
|
||||
add_library(sirit
|
||||
../include/sirit/sirit.h
|
||||
sirit.cpp
|
||||
op.cpp
|
||||
op.h
|
||||
stream.cpp
|
||||
stream.h
|
||||
operand.cpp
|
||||
operand.h
|
||||
literal_number.cpp
|
||||
literal_number.h
|
||||
literal_string.cpp
|
||||
literal_string.h
|
||||
common_types.h
|
||||
instructions/type.cpp
|
||||
instructions/constant.cpp
|
||||
instructions/function.cpp
|
||||
instructions/flow.cpp
|
||||
instructions/debug.cpp
|
||||
instructions/derivatives.cpp
|
||||
instructions/memory.cpp
|
||||
instructions/annotation.cpp
|
||||
instructions/misc.cpp
|
||||
|
30
externals/sirit/src/instructions/annotation.cpp
vendored
30
externals/sirit/src/instructions/annotation.cpp
vendored
@@ -4,32 +4,24 @@
|
||||
* 3-Clause BSD License
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include "common_types.h"
|
||||
#include "op.h"
|
||||
#include <span>
|
||||
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::Decorate(Id target, spv::Decoration decoration, const std::vector<Literal>& literals) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpDecorate)};
|
||||
op->Add(target);
|
||||
op->Add(static_cast<u32>(decoration));
|
||||
op->Add(literals);
|
||||
AddAnnotation(std::move(op));
|
||||
return target;
|
||||
Id Module::Decorate(Id target, spv::Decoration decoration, std::span<const Literal> literals) {
|
||||
annotations->Reserve(3 + literals.size());
|
||||
return *annotations << spv::Op::OpDecorate << target << decoration << literals << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::MemberDecorate(Id structure_type, Literal member, spv::Decoration decoration,
|
||||
const std::vector<Literal>& literals) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpMemberDecorate)};
|
||||
op->Add(structure_type);
|
||||
op->Add(member);
|
||||
op->Add(static_cast<u32>(decoration));
|
||||
op->Add(literals);
|
||||
AddAnnotation(std::move(op));
|
||||
return structure_type;
|
||||
std::span<const Literal> literals) {
|
||||
annotations->Reserve(4 + literals.size());
|
||||
return *annotations << spv::Op::OpMemberDecorate << structure_type << member << decoration
|
||||
<< literals << EndOp{};
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
25
externals/sirit/src/instructions/arithmetic.cpp
vendored
25
externals/sirit/src/instructions/arithmetic.cpp
vendored
@@ -4,35 +4,22 @@
|
||||
* 3-Clause BSD License
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include "common_types.h"
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
#define DEFINE_UNARY(funcname, opcode) \
|
||||
Id Module::funcname(Id result_type, Id operand) { \
|
||||
auto op{std::make_unique<Op>(opcode, bound++, result_type)}; \
|
||||
op->Add(operand); \
|
||||
return AddCode(std::move(op)); \
|
||||
code->Reserve(4); \
|
||||
return *code << OpId{opcode, result_type} << operand << EndOp{}; \
|
||||
}
|
||||
|
||||
#define DEFINE_BINARY(funcname, opcode) \
|
||||
Id Module::funcname(Id result_type, Id operand_1, Id operand_2) { \
|
||||
auto op{std::make_unique<Op>(opcode, bound++, result_type)}; \
|
||||
op->Add(operand_1); \
|
||||
op->Add(operand_2); \
|
||||
return AddCode(std::move(op)); \
|
||||
}
|
||||
|
||||
#define DEFINE_TRINARY(funcname, opcode) \
|
||||
Id Module::funcname(Id result_type, Id operand_1, Id operand_2, Id operand_3) { \
|
||||
auto op{std::make_unique<Op>(opcode, bound++, result_type)}; \
|
||||
op->Add(operand_1); \
|
||||
op->Add(operand_2); \
|
||||
op->Add(operand_3); \
|
||||
return AddCode(std::move(op)); \
|
||||
code->Reserve(5); \
|
||||
return *code << OpId{opcode, result_type} << operand_1 << operand_2 << EndOp{}; \
|
||||
}
|
||||
|
||||
DEFINE_UNARY(OpSNegate, spv::Op::OpSNegate)
|
||||
|
138
externals/sirit/src/instructions/atomic.cpp
vendored
138
externals/sirit/src/instructions/atomic.cpp
vendored
@@ -4,145 +4,101 @@
|
||||
* 3-Clause BSD License
|
||||
*/
|
||||
|
||||
#include "common_types.h"
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::OpAtomicLoad(Id result_type, Id pointer, Id memory, Id semantics) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpAtomicLoad, bound++, result_type)};
|
||||
op->Add(pointer);
|
||||
op->Add(memory);
|
||||
op->Add(semantics);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(6);
|
||||
return *code << OpId{spv::Op::OpAtomicLoad, result_type} << pointer << memory << semantics
|
||||
<< EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpAtomicStore(Id pointer, Id memory, Id semantics, Id value) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpAtomicStore)};
|
||||
op->Add(pointer);
|
||||
op->Add(memory);
|
||||
op->Add(semantics);
|
||||
op->Add(value);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(5);
|
||||
return *code << OpId{spv::Op::OpAtomicStore} << pointer << memory << semantics << value
|
||||
<< EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpAtomicExchange(Id result_type, Id pointer, Id memory, Id semantics, Id value) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpAtomicExchange, bound++, result_type)};
|
||||
op->Add(pointer);
|
||||
op->Add(memory);
|
||||
op->Add(semantics);
|
||||
op->Add(value);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(7);
|
||||
return *code << OpId{spv::Op::OpAtomicExchange, result_type} << pointer << memory << semantics
|
||||
<< value << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpAtomicCompareExchange(Id result_type, Id pointer, Id memory, Id equal, Id unequal,
|
||||
Id value, Id comparator) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpAtomicCompareExchange, bound++, result_type)};
|
||||
op->Add(pointer);
|
||||
op->Add(memory);
|
||||
op->Add(equal);
|
||||
op->Add(unequal);
|
||||
op->Add(value);
|
||||
op->Add(comparator);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(9);
|
||||
return *code << OpId{spv::Op::OpAtomicCompareExchange, result_type} << pointer << memory
|
||||
<< equal << unequal << value << comparator << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpAtomicIIncrement(Id result_type, Id pointer, Id memory, Id semantics) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpAtomicIIncrement, bound++, result_type)};
|
||||
op->Add(pointer);
|
||||
op->Add(memory);
|
||||
op->Add(semantics);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(6);
|
||||
return *code << OpId{spv::Op::OpAtomicIIncrement, result_type} << pointer << memory << semantics
|
||||
<< EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpAtomicIDecrement(Id result_type, Id pointer, Id memory, Id semantics) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpAtomicIDecrement, bound++, result_type)};
|
||||
op->Add(pointer);
|
||||
op->Add(memory);
|
||||
op->Add(semantics);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(6);
|
||||
return *code << OpId{spv::Op::OpAtomicIDecrement, result_type} << pointer << memory << semantics
|
||||
<< EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpAtomicIAdd(Id result_type, Id pointer, Id memory, Id semantics, Id value) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpAtomicIAdd, bound++, result_type)};
|
||||
op->Add(pointer);
|
||||
op->Add(memory);
|
||||
op->Add(semantics);
|
||||
op->Add(value);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(7);
|
||||
return *code << OpId{spv::Op::OpAtomicIAdd, result_type} << pointer << memory << semantics
|
||||
<< value << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpAtomicISub(Id result_type, Id pointer, Id memory, Id semantics, Id value) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpAtomicISub, bound++, result_type)};
|
||||
op->Add(pointer);
|
||||
op->Add(memory);
|
||||
op->Add(semantics);
|
||||
op->Add(value);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(7);
|
||||
return *code << OpId{spv::Op::OpAtomicISub, result_type} << pointer << memory << semantics
|
||||
<< value << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpAtomicSMin(Id result_type, Id pointer, Id memory, Id semantics, Id value) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpAtomicSMin, bound++, result_type)};
|
||||
op->Add(pointer);
|
||||
op->Add(memory);
|
||||
op->Add(semantics);
|
||||
op->Add(value);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(7);
|
||||
return *code << OpId{spv::Op::OpAtomicSMin, result_type} << pointer << memory << semantics
|
||||
<< value << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpAtomicUMin(Id result_type, Id pointer, Id memory, Id semantics, Id value) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpAtomicUMin, bound++, result_type)};
|
||||
op->Add(pointer);
|
||||
op->Add(memory);
|
||||
op->Add(semantics);
|
||||
op->Add(value);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(7);
|
||||
return *code << OpId{spv::Op::OpAtomicUMin, result_type} << pointer << memory << semantics
|
||||
<< value << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpAtomicSMax(Id result_type, Id pointer, Id memory, Id semantics, Id value) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpAtomicSMax, bound++, result_type)};
|
||||
op->Add(pointer);
|
||||
op->Add(memory);
|
||||
op->Add(semantics);
|
||||
op->Add(value);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(7);
|
||||
return *code << OpId{spv::Op::OpAtomicSMax, result_type} << pointer << memory << semantics
|
||||
<< value << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpAtomicUMax(Id result_type, Id pointer, Id memory, Id semantics, Id value) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpAtomicUMax, bound++, result_type)};
|
||||
op->Add(pointer);
|
||||
op->Add(memory);
|
||||
op->Add(semantics);
|
||||
op->Add(value);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(7);
|
||||
return *code << OpId{spv::Op::OpAtomicUMax, result_type} << pointer << memory << semantics
|
||||
<< value << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpAtomicAnd(Id result_type, Id pointer, Id memory, Id semantics, Id value) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpAtomicAnd, bound++, result_type)};
|
||||
op->Add(pointer);
|
||||
op->Add(memory);
|
||||
op->Add(semantics);
|
||||
op->Add(value);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(7);
|
||||
return *code << OpId{spv::Op::OpAtomicAnd, result_type} << pointer << memory << semantics
|
||||
<< value << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpAtomicOr(Id result_type, Id pointer, Id memory, Id semantics, Id value) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpAtomicOr, bound++, result_type)};
|
||||
op->Add(pointer);
|
||||
op->Add(memory);
|
||||
op->Add(semantics);
|
||||
op->Add(value);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(7);
|
||||
return *code << OpId{spv::Op::OpAtomicOr, result_type} << pointer << memory << semantics
|
||||
<< value << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpAtomicXor(Id result_type, Id pointer, Id memory, Id semantics, Id value) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpAtomicXor, bound++, result_type)};
|
||||
op->Add(pointer);
|
||||
op->Add(memory);
|
||||
op->Add(semantics);
|
||||
op->Add(value);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(7);
|
||||
return *code << OpId{spv::Op::OpAtomicXor, result_type} << pointer << memory << semantics
|
||||
<< value << EndOp{};
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
17
externals/sirit/src/instructions/barrier.cpp
vendored
17
externals/sirit/src/instructions/barrier.cpp
vendored
@@ -4,25 +4,20 @@
|
||||
* 3-Clause BSD License
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::OpControlBarrier(Id execution, Id memory, Id semantics) {
|
||||
auto op = std::make_unique<Op>(spv::Op::OpControlBarrier);
|
||||
op->Add(execution);
|
||||
op->Add(memory);
|
||||
op->Add(semantics);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(4);
|
||||
return *code << spv::Op::OpControlBarrier << execution << memory << semantics << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpMemoryBarrier(Id scope, Id semantics) {
|
||||
auto op = std::make_unique<Op>(spv::Op::OpMemoryBarrier);
|
||||
op->Add(scope);
|
||||
op->Add(semantics);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(3);
|
||||
return *code << spv::Op::OpMemoryBarrier << scope << semantics << EndOp{};
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
81
externals/sirit/src/instructions/bit.cpp
vendored
81
externals/sirit/src/instructions/bit.cpp
vendored
@@ -4,96 +4,73 @@
|
||||
* 3-Clause BSD License
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include "common_types.h"
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::OpShiftRightLogical(Id result_type, Id base, Id shift) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpShiftRightLogical, bound++, result_type)};
|
||||
op->Add(base);
|
||||
op->Add(shift);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(5);
|
||||
return *code << OpId{spv::Op::OpShiftRightLogical, result_type} << base << shift << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpShiftRightArithmetic(Id result_type, Id base, Id shift) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpShiftRightArithmetic, bound++, result_type)};
|
||||
op->Add(base);
|
||||
op->Add(shift);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(5);
|
||||
return *code << OpId{spv::Op::OpShiftRightArithmetic, result_type} << base << shift << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpShiftLeftLogical(Id result_type, Id base, Id shift) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpShiftLeftLogical, bound++, result_type)};
|
||||
op->Add(base);
|
||||
op->Add(shift);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(5);
|
||||
return *code << OpId{spv::Op::OpShiftLeftLogical, result_type} << base << shift << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpBitwiseOr(Id result_type, Id operand_1, Id operand_2) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpBitwiseOr, bound++, result_type)};
|
||||
op->Add(operand_1);
|
||||
op->Add(operand_2);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(5);
|
||||
return *code << OpId{spv::Op::OpBitwiseOr, result_type} << operand_1 << operand_2 << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpBitwiseXor(Id result_type, Id operand_1, Id operand_2) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpBitwiseXor, bound++, result_type)};
|
||||
op->Add(operand_1);
|
||||
op->Add(operand_2);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(5);
|
||||
return *code << OpId{spv::Op::OpBitwiseXor, result_type} << operand_1 << operand_2 << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpBitwiseAnd(Id result_type, Id operand_1, Id operand_2) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpBitwiseAnd, bound++, result_type)};
|
||||
op->Add(operand_1);
|
||||
op->Add(operand_2);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(5);
|
||||
return *code << OpId{spv::Op::OpBitwiseAnd, result_type} << operand_1 << operand_2 << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpNot(Id result_type, Id operand) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpNot, bound++, result_type)};
|
||||
op->Add(operand);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(4);
|
||||
return *code << OpId{spv::Op::OpNot, result_type} << operand << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpBitFieldInsert(Id result_type, Id base, Id insert, Id offset, Id count) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpBitFieldInsert, bound++, result_type)};
|
||||
op->Add(base);
|
||||
op->Add(insert);
|
||||
op->Add(offset);
|
||||
op->Add(count);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(7);
|
||||
return *code << OpId{spv::Op::OpBitFieldInsert, result_type} << base << insert << offset
|
||||
<< count << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpBitFieldSExtract(Id result_type, Id base, Id offset, Id count) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpBitFieldSExtract, bound++, result_type)};
|
||||
op->Add(base);
|
||||
op->Add(offset);
|
||||
op->Add(count);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(6);
|
||||
return *code << OpId{spv::Op::OpBitFieldSExtract, result_type} << base << offset << count
|
||||
<< EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpBitFieldUExtract(Id result_type, Id base, Id offset, Id count) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpBitFieldUExtract, bound++, result_type)};
|
||||
op->Add(base);
|
||||
op->Add(offset);
|
||||
op->Add(count);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(6);
|
||||
return *code << OpId{spv::Op::OpBitFieldUExtract, result_type} << base << offset << count
|
||||
<< EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpBitReverse(Id result_type, Id base) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpBitReverse, bound++, result_type)};
|
||||
op->Add(base);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(4);
|
||||
return *code << OpId{spv::Op::OpBitReverse, result_type} << base << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpBitCount(Id result_type, Id base) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpBitCount, bound++, result_type)};
|
||||
op->Add(base);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(4);
|
||||
return *code << OpId{spv::Op::OpBitCount, result_type} << base << EndOp{};
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
34
externals/sirit/src/instructions/constant.cpp
vendored
34
externals/sirit/src/instructions/constant.cpp
vendored
@@ -5,42 +5,44 @@
|
||||
*/
|
||||
|
||||
#include <cassert>
|
||||
#include "op.h"
|
||||
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::ConstantTrue(Id result_type) {
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpConstantTrue, bound, result_type));
|
||||
declarations->Reserve(3);
|
||||
return *declarations << OpId{spv::Op::OpConstantTrue, result_type} << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::ConstantFalse(Id result_type) {
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpConstantFalse, bound, result_type));
|
||||
declarations->Reserve(3);
|
||||
return *declarations << OpId{spv::Op::OpConstantFalse, result_type} << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::Constant(Id result_type, const Literal& literal) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpConstant, bound, result_type)};
|
||||
op->Add(literal);
|
||||
return AddDeclaration(std::move(op));
|
||||
declarations->Reserve(3 + 2);
|
||||
return *declarations << OpId{spv::Op::OpConstant, result_type} << literal << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::ConstantComposite(Id result_type, const std::vector<Id>& constituents) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpConstantComposite, bound, result_type)};
|
||||
op->Add(constituents);
|
||||
return AddDeclaration(std::move(op));
|
||||
Id Module::ConstantComposite(Id result_type, std::span<const Id> constituents) {
|
||||
declarations->Reserve(3 + constituents.size());
|
||||
return *declarations << OpId{spv::Op::OpConstantComposite, result_type} << constituents
|
||||
<< EndOp{};
|
||||
}
|
||||
|
||||
Id Module::ConstantSampler(Id result_type, spv::SamplerAddressingMode addressing_mode,
|
||||
bool normalized, spv::SamplerFilterMode filter_mode) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpConstantSampler, bound, result_type)};
|
||||
op->Add(static_cast<u32>(addressing_mode));
|
||||
op->Add(normalized ? 1 : 0);
|
||||
op->Add(static_cast<u32>(filter_mode));
|
||||
return AddDeclaration(std::move(op));
|
||||
declarations->Reserve(6);
|
||||
return *declarations << OpId{spv::Op::OpConstantSampler, result_type} << addressing_mode
|
||||
<< normalized << filter_mode << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::ConstantNull(Id result_type) {
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpConstantNull, bound, result_type));
|
||||
declarations->Reserve(3);
|
||||
return *declarations << OpId{spv::Op::OpConstantNull, result_type} << EndOp{};
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
10
externals/sirit/src/instructions/conversion.cpp
vendored
10
externals/sirit/src/instructions/conversion.cpp
vendored
@@ -4,18 +4,16 @@
|
||||
* 3-Clause BSD License
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include "common_types.h"
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
#define DEFINE_UNARY(opcode) \
|
||||
Id Module::opcode(Id result_type, Id operand) { \
|
||||
auto op{std::make_unique<Op>(spv::Op::opcode, bound++, result_type)}; \
|
||||
op->Add(operand); \
|
||||
return AddCode(std::move(op)); \
|
||||
code->Reserve(4); \
|
||||
return *code << OpId{spv::Op::opcode, result_type} << operand << EndOp{}; \
|
||||
}
|
||||
|
||||
DEFINE_UNARY(OpConvertFToU)
|
||||
|
39
externals/sirit/src/instructions/debug.cpp
vendored
39
externals/sirit/src/instructions/debug.cpp
vendored
@@ -4,44 +4,33 @@
|
||||
* 3-Clause BSD License
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
#include "common_types.h"
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::Name(Id target, std::string name) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpName)};
|
||||
op->Add(target);
|
||||
op->Add(std::move(name));
|
||||
debug.push_back(std::move(op));
|
||||
Id Module::Name(Id target, std::string_view name) {
|
||||
debug->Reserve(3 + WordsInString(name));
|
||||
*debug << spv::Op::OpName << target << name << EndOp{};
|
||||
return target;
|
||||
}
|
||||
|
||||
Id Module::MemberName(Id type, u32 member, std::string name) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpMemberName)};
|
||||
op->Add(type);
|
||||
op->Add(member);
|
||||
op->Add(std::move(name));
|
||||
debug.push_back(std::move(op));
|
||||
Id Module::MemberName(Id type, u32 member, std::string_view name) {
|
||||
debug->Reserve(4 + WordsInString(name));
|
||||
*debug << spv::Op::OpMemberName << type << member << name << EndOp{};
|
||||
return type;
|
||||
}
|
||||
|
||||
Id Module::String(std::string string) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpString, bound++)};
|
||||
op->Add(std::move(string));
|
||||
const auto id = op.get();
|
||||
debug.push_back(std::move(op));
|
||||
return id;
|
||||
Id Module::String(std::string_view string) {
|
||||
debug->Reserve(3 + WordsInString(string));
|
||||
return *debug << OpId{spv::Op::OpString} << string << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpLine(Id file, Literal line, Literal column) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpLine)};
|
||||
op->Add(file);
|
||||
op->Add(line);
|
||||
op->Add(column);
|
||||
return AddCode(std::move(op));
|
||||
debug->Reserve(4);
|
||||
return *debug << spv::Op::OpLine << file << line << column << EndOp{};
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
29
externals/sirit/src/instructions/derivatives.cpp
vendored
Executable file
29
externals/sirit/src/instructions/derivatives.cpp
vendored
Executable file
@@ -0,0 +1,29 @@
|
||||
/* This file is part of the sirit project.
|
||||
* Copyright (c) 2021 sirit
|
||||
* This software may be used and distributed according to the terms of the
|
||||
* 3-Clause BSD License
|
||||
*/
|
||||
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
#define DEFINE_UNARY(funcname, opcode) \
|
||||
Id Module::funcname(Id result_type, Id operand) { \
|
||||
code->Reserve(4); \
|
||||
return *code << OpId{opcode, result_type} << operand << EndOp{}; \
|
||||
}
|
||||
|
||||
DEFINE_UNARY(OpDPdx, spv::Op::OpDPdx)
|
||||
DEFINE_UNARY(OpDPdy, spv::Op::OpDPdy)
|
||||
DEFINE_UNARY(OpFwidth, spv::Op::OpFwidth)
|
||||
DEFINE_UNARY(OpDPdxFine, spv::Op::OpDPdxFine)
|
||||
DEFINE_UNARY(OpDPdyFine, spv::Op::OpDPdyFine)
|
||||
DEFINE_UNARY(OpFwidthFine, spv::Op::OpFwidthFine)
|
||||
DEFINE_UNARY(OpDPdxCoarse, spv::Op::OpDPdxCoarse)
|
||||
DEFINE_UNARY(OpDPdyCoarse, spv::Op::OpDPdyCoarse)
|
||||
DEFINE_UNARY(OpFwidthCoarse, spv::Op::OpFwidthCoarse)
|
||||
|
||||
} // namespace Sirit
|
17
externals/sirit/src/instructions/extension.cpp
vendored
17
externals/sirit/src/instructions/extension.cpp
vendored
@@ -4,20 +4,18 @@
|
||||
* 3-Clause BSD License
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include <spirv/unified1/GLSL.std.450.h>
|
||||
#include "common_types.h"
|
||||
#include "op.h"
|
||||
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::OpExtInst(Id result_type, Id set, u32 instruction, const std::vector<Id>& operands) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpExtInst, bound++, result_type)};
|
||||
op->Add(set);
|
||||
op->Add(instruction);
|
||||
op->Add(operands);
|
||||
return AddCode(std::move(op));
|
||||
Id Module::OpExtInst(Id result_type, Id set, u32 instruction, std::span<const Id> operands) {
|
||||
code->Reserve(5 + operands.size());
|
||||
return *code << OpId{spv::Op::OpExtInst, result_type} << set << instruction << operands
|
||||
<< EndOp{};
|
||||
}
|
||||
|
||||
#define DEFINE_UNARY(funcname, opcode) \
|
||||
@@ -74,4 +72,5 @@ DEFINE_UNARY(OpFindUMsb, GLSLstd450FindUMsb)
|
||||
DEFINE_UNARY(OpInterpolateAtCentroid, GLSLstd450InterpolateAtCentroid)
|
||||
DEFINE_BINARY(OpInterpolateAtSample, GLSLstd450InterpolateAtSample)
|
||||
DEFINE_BINARY(OpInterpolateAtOffset, GLSLstd450InterpolateAtOffset)
|
||||
|
||||
} // namespace Sirit
|
||||
|
99
externals/sirit/src/instructions/flow.cpp
vendored
99
externals/sirit/src/instructions/flow.cpp
vendored
@@ -5,79 +5,96 @@
|
||||
*/
|
||||
|
||||
#include <cassert>
|
||||
#include <vector>
|
||||
#include "common_types.h"
|
||||
#include "op.h"
|
||||
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::OpPhi(Id result_type, std::span<const Id> operands) {
|
||||
assert(operands.size() % 2 == 0);
|
||||
code->Reserve(3 + operands.size());
|
||||
return *code << OpId{spv::Op::OpPhi, result_type} << operands << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::DeferredOpPhi(Id result_type, std::span<const Id> blocks) {
|
||||
deferred_phi_nodes.push_back(code->LocalAddress());
|
||||
code->Reserve(3 + blocks.size() * 2);
|
||||
*code << OpId{spv::Op::OpPhi, result_type};
|
||||
for (const Id block : blocks) {
|
||||
*code << u32{0} << block;
|
||||
}
|
||||
return *code << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpLoopMerge(Id merge_block, Id continue_target, spv::LoopControlMask loop_control,
|
||||
const std::vector<Id>& literals) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpLoopMerge)};
|
||||
op->Add(merge_block);
|
||||
op->Add(continue_target);
|
||||
op->Add(static_cast<u32>(loop_control));
|
||||
op->Add(literals);
|
||||
return AddCode(std::move(op));
|
||||
std::span<const Id> literals) {
|
||||
code->Reserve(4 + literals.size());
|
||||
return *code << spv::Op::OpLoopMerge << merge_block << continue_target << loop_control
|
||||
<< literals << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpSelectionMerge(Id merge_block, spv::SelectionControlMask selection_control) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpSelectionMerge)};
|
||||
op->Add(merge_block);
|
||||
op->Add(static_cast<u32>(selection_control));
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(3);
|
||||
return *code << spv::Op::OpSelectionMerge << merge_block << selection_control << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpLabel() {
|
||||
return code_store.emplace_back(std::make_unique<Op>(spv::Op::OpLabel, bound++)).get();
|
||||
return Id{++bound};
|
||||
}
|
||||
|
||||
Id Module::OpBranch(Id target_label) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpBranch)};
|
||||
op->Add(target_label);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(2);
|
||||
return *code << spv::Op::OpBranch << target_label << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpBranchConditional(Id condition, Id true_label, Id false_label, u32 true_weight,
|
||||
u32 false_weight) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpBranchConditional)};
|
||||
op->Add(condition);
|
||||
op->Add(true_label);
|
||||
op->Add(false_label);
|
||||
code->Reserve(6);
|
||||
*code << spv::Op::OpBranchConditional << condition << true_label << false_label;
|
||||
if (true_weight != 0 || false_weight != 0) {
|
||||
op->Add(true_weight);
|
||||
op->Add(false_weight);
|
||||
*code << true_weight << false_weight;
|
||||
}
|
||||
return AddCode(std::move(op));
|
||||
return *code << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpSwitch(Id selector, Id default_label, const std::vector<Literal>& literals,
|
||||
const std::vector<Id>& labels) {
|
||||
const std::size_t size = literals.size();
|
||||
Id Module::OpSwitch(Id selector, Id default_label, std::span<const Literal> literals,
|
||||
std::span<const Id> labels) {
|
||||
assert(literals.size() == labels.size());
|
||||
auto op{std::make_unique<Op>(spv::Op::OpSwitch)};
|
||||
op->Add(selector);
|
||||
op->Add(default_label);
|
||||
const size_t size = literals.size();
|
||||
code->Reserve(3 + size * 2);
|
||||
|
||||
*code << spv::Op::OpSwitch << selector << default_label;
|
||||
for (std::size_t i = 0; i < size; ++i) {
|
||||
op->Add(literals[i]);
|
||||
op->Add(labels[i]);
|
||||
*code << literals[i] << labels[i];
|
||||
}
|
||||
return AddCode(std::move(op));
|
||||
return *code << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpReturn() {
|
||||
return AddCode(spv::Op::OpReturn);
|
||||
void Module::OpReturn() {
|
||||
code->Reserve(1);
|
||||
*code << spv::Op::OpReturn << EndOp{};
|
||||
}
|
||||
|
||||
void Module::OpUnreachable() {
|
||||
code->Reserve(1);
|
||||
*code << spv::Op::OpUnreachable << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpReturnValue(Id value) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpReturnValue)};
|
||||
op->Add(value);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(2);
|
||||
return *code << spv::Op::OpReturnValue << value << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpKill() {
|
||||
return AddCode(std::make_unique<Op>(spv::Op::OpKill));
|
||||
void Module::OpKill() {
|
||||
code->Reserve(1);
|
||||
*code << spv::Op::OpKill << EndOp{};
|
||||
}
|
||||
|
||||
void Module::OpDemoteToHelperInvocationEXT() {
|
||||
code->Reserve(1);
|
||||
*code << spv::Op::OpDemoteToHelperInvocationEXT << EndOp{};
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
29
externals/sirit/src/instructions/function.cpp
vendored
29
externals/sirit/src/instructions/function.cpp
vendored
@@ -4,28 +4,31 @@
|
||||
* 3-Clause BSD License
|
||||
*/
|
||||
|
||||
#include "common_types.h"
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::OpFunction(Id result_type, spv::FunctionControlMask function_control, Id function_type) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpFunction, bound++, result_type)};
|
||||
op->Add(static_cast<u32>(function_control));
|
||||
op->Add(function_type);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(5);
|
||||
return *code << OpId{spv::Op::OpFunction, result_type} << function_control << function_type
|
||||
<< EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpFunctionEnd() {
|
||||
return AddCode(spv::Op::OpFunctionEnd);
|
||||
void Module::OpFunctionEnd() {
|
||||
code->Reserve(1);
|
||||
*code << spv::Op::OpFunctionEnd << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpFunctionCall(Id result_type, Id function, const std::vector<Id>& arguments) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpFunctionCall, bound++, result_type)};
|
||||
op->Add(function);
|
||||
op->Add(arguments);
|
||||
return AddCode(std::move(op));
|
||||
Id Module::OpFunctionCall(Id result_type, Id function, std::span<const Id> arguments) {
|
||||
code->Reserve(4 + arguments.size());
|
||||
return *code << OpId{spv::Op::OpFunctionCall, result_type} << function << arguments << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpFunctionParameter(Id result_type) {
|
||||
code->Reserve(3);
|
||||
return *code << OpId{spv::Op::OpFunctionParameter, result_type} << EndOp{};
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
60
externals/sirit/src/instructions/group.cpp
vendored
60
externals/sirit/src/instructions/group.cpp
vendored
@@ -4,48 +4,62 @@
|
||||
* 3-Clause BSD License
|
||||
*/
|
||||
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::OpSubgroupBallotKHR(Id result_type, Id predicate) {
|
||||
auto op = std::make_unique<Op>(spv::Op::OpSubgroupBallotKHR, bound++, result_type);
|
||||
op->Add(predicate);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(4);
|
||||
return *code << OpId{spv::Op::OpSubgroupBallotKHR, result_type} << predicate << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpSubgroupReadInvocationKHR(Id result_type, Id value, Id index) {
|
||||
auto op = std::make_unique<Op>(spv::Op::OpSubgroupReadInvocationKHR, bound++, result_type);
|
||||
op->Add(value);
|
||||
op->Add(index);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(5);
|
||||
return *code << OpId{spv::Op::OpSubgroupReadInvocationKHR, result_type} << value << index
|
||||
<< EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpSubgroupAllKHR(Id result_type, Id predicate) {
|
||||
auto op = std::make_unique<Op>(spv::Op::OpSubgroupAllKHR, bound++, result_type);
|
||||
op->Add(predicate);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(4);
|
||||
return *code << OpId{spv::Op::OpSubgroupAllKHR, result_type} << predicate << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpSubgroupAnyKHR(Id result_type, Id predicate) {
|
||||
auto op = std::make_unique<Op>(spv::Op::OpSubgroupAnyKHR, bound++, result_type);
|
||||
op->Add(predicate);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(4);
|
||||
return *code << OpId{spv::Op::OpSubgroupAnyKHR, result_type} << predicate << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpSubgroupAllEqualKHR(Id result_type, Id predicate) {
|
||||
auto op = std::make_unique<Op>(spv::Op::OpSubgroupAllEqualKHR, bound++, result_type);
|
||||
op->Add(predicate);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(4);
|
||||
return *code << OpId{spv::Op::OpSubgroupAllEqualKHR, result_type} << predicate << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpGroupNonUniformShuffleXor(Id result_type, spv::Scope scope, Id value, Id mask) {
|
||||
auto op = std::make_unique<Op>(spv::Op::OpGroupNonUniformShuffleXor, bound++, result_type);
|
||||
op->Add(static_cast<u32>(scope));
|
||||
op->Add(value);
|
||||
op->Add(mask);
|
||||
return AddCode(std::move(op));
|
||||
Id Module::OpGroupNonUniformShuffleXor(Id result_type, Id scope, Id value, Id mask) {
|
||||
code->Reserve(6);
|
||||
return *code << OpId{spv::Op::OpGroupNonUniformShuffleXor, result_type} << scope << value
|
||||
<< mask << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpGroupNonUniformAll(Id result_type, Id scope, Id predicate) {
|
||||
code->Reserve(5);
|
||||
return *code << OpId{spv::Op::OpGroupNonUniformAll, result_type} << scope << predicate << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpGroupNonUniformAny(Id result_type, Id scope, Id predicate) {
|
||||
code->Reserve(5);
|
||||
return *code << OpId{spv::Op::OpGroupNonUniformAny, result_type} << scope << predicate << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpGroupNonUniformAllEqual(Id result_type, Id scope, Id value) {
|
||||
code->Reserve(5);
|
||||
return *code << OpId{spv::Op::OpGroupNonUniformAllEqual, result_type} << scope << value << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpGroupNonUniformBallot(Id result_type, Id scope, Id predicate) {
|
||||
code->Reserve(5);
|
||||
return *code << OpId{spv::Op::OpGroupNonUniformBallot, result_type} << scope << predicate << EndOp{};
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
163
externals/sirit/src/instructions/image.cpp
vendored
163
externals/sirit/src/instructions/image.cpp
vendored
@@ -4,79 +4,58 @@
|
||||
* 3-Clause BSD License
|
||||
*/
|
||||
|
||||
#include "common_types.h"
|
||||
#include "op.h"
|
||||
#include <cassert>
|
||||
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
namespace Sirit {
|
||||
#include "stream.h"
|
||||
|
||||
static void AddImageOperands(Op* op, std::optional<spv::ImageOperandsMask> image_operands,
|
||||
const std::vector<Id>& operands) {
|
||||
if (!image_operands)
|
||||
return;
|
||||
op->Add(static_cast<u32>(*image_operands));
|
||||
op->Add(operands);
|
||||
}
|
||||
namespace Sirit {
|
||||
|
||||
#define DEFINE_IMAGE_OP(opcode) \
|
||||
Id Module::opcode(Id result_type, Id sampled_image, Id coordinate, \
|
||||
std::optional<spv::ImageOperandsMask> image_operands, \
|
||||
const std::vector<Id>& operands) { \
|
||||
auto op{std::make_unique<Op>(spv::Op::opcode, bound++, result_type)}; \
|
||||
op->Add(sampled_image); \
|
||||
op->Add(coordinate); \
|
||||
AddImageOperands(op.get(), image_operands, operands); \
|
||||
return AddCode(std::move(op)); \
|
||||
std::span<const Id> operands) { \
|
||||
code->Reserve(6 + operands.size()); \
|
||||
return *code << OpId{spv::Op::opcode, result_type} << sampled_image << coordinate \
|
||||
<< image_operands << operands << EndOp{}; \
|
||||
}
|
||||
|
||||
#define DEFINE_IMAGE_EXP_OP(opcode) \
|
||||
Id Module::opcode(Id result_type, Id sampled_image, Id coordinate, \
|
||||
spv::ImageOperandsMask image_operands, const std::vector<Id>& operands) { \
|
||||
auto op{std::make_unique<Op>(spv::Op::opcode, bound++, result_type)}; \
|
||||
op->Add(sampled_image); \
|
||||
op->Add(coordinate); \
|
||||
op->Add(static_cast<u32>(image_operands)); \
|
||||
op->Add(operands); \
|
||||
return AddCode(std::move(op)); \
|
||||
spv::ImageOperandsMask image_operands, std::span<const Id> operands) { \
|
||||
code->Reserve(6 + operands.size()); \
|
||||
return *code << OpId{spv::Op::opcode, result_type} << sampled_image << coordinate \
|
||||
<< image_operands << operands << EndOp{}; \
|
||||
}
|
||||
|
||||
#define DEFINE_IMAGE_EXTRA_OP(opcode) \
|
||||
Id Module::opcode(Id result_type, Id sampled_image, Id coordinate, Id extra, \
|
||||
std::optional<spv::ImageOperandsMask> image_operands, \
|
||||
const std::vector<Id>& operands) { \
|
||||
auto op{std::make_unique<Op>(spv::Op::opcode, bound++, result_type)}; \
|
||||
op->Add(sampled_image); \
|
||||
op->Add(coordinate); \
|
||||
op->Add(extra); \
|
||||
AddImageOperands(op.get(), image_operands, operands); \
|
||||
return AddCode(std::move(op)); \
|
||||
std::span<const Id> operands) { \
|
||||
code->Reserve(7 + operands.size()); \
|
||||
return *code << OpId{spv::Op::opcode, result_type} << sampled_image << coordinate << extra \
|
||||
<< image_operands << operands << EndOp{}; \
|
||||
}
|
||||
|
||||
#define DEFINE_IMAGE_EXTRA_EXP_OP(opcode) \
|
||||
Id Module::opcode(Id result_type, Id sampled_image, Id coordinate, Id extra, \
|
||||
spv::ImageOperandsMask image_operands, const std::vector<Id>& operands) { \
|
||||
auto op{std::make_unique<Op>(spv::Op::opcode, bound++, result_type)}; \
|
||||
op->Add(sampled_image); \
|
||||
op->Add(coordinate); \
|
||||
op->Add(extra); \
|
||||
op->Add(static_cast<u32>(image_operands)); \
|
||||
op->Add(operands); \
|
||||
return AddCode(std::move(op)); \
|
||||
spv::ImageOperandsMask image_operands, std::span<const Id> operands) { \
|
||||
code->Reserve(8 + operands.size()); \
|
||||
return *code << OpId{spv::Op::opcode, result_type} << sampled_image << coordinate << extra \
|
||||
<< image_operands << operands << EndOp{}; \
|
||||
}
|
||||
|
||||
#define DEFINE_IMAGE_QUERY_OP(opcode) \
|
||||
Id Module::opcode(Id result_type, Id image) { \
|
||||
auto op{std::make_unique<Op>(spv::Op::opcode, bound++, result_type)}; \
|
||||
op->Add(image); \
|
||||
return AddCode(std::move(op)); \
|
||||
code->Reserve(5); \
|
||||
return *code << OpId{spv::Op::opcode, result_type} << image << EndOp{}; \
|
||||
}
|
||||
|
||||
#define DEFINE_IMAGE_QUERY_BIN_OP(opcode) \
|
||||
Id Module::opcode(Id result_type, Id image, Id extra) { \
|
||||
auto op{std::make_unique<Op>(spv::Op::opcode, bound++, result_type)}; \
|
||||
op->Add(image); \
|
||||
op->Add(extra); \
|
||||
return AddCode(std::move(op)); \
|
||||
code->Reserve(5); \
|
||||
return *code << OpId{spv::Op::opcode, result_type} << image << extra << EndOp{}; \
|
||||
}
|
||||
|
||||
DEFINE_IMAGE_OP(OpImageSampleImplicitLod)
|
||||
@@ -98,27 +77,93 @@ DEFINE_IMAGE_QUERY_OP(OpImageQueryLevels)
|
||||
DEFINE_IMAGE_QUERY_OP(OpImageQuerySamples)
|
||||
|
||||
Id Module::OpSampledImage(Id result_type, Id image, Id sampler) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpSampledImage, bound++, result_type)};
|
||||
op->Add(image);
|
||||
op->Add(sampler);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(5);
|
||||
return *code << OpId{spv::Op::OpSampledImage, result_type} << image << sampler << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpImageWrite(Id image, Id coordinate, Id texel,
|
||||
std::optional<spv::ImageOperandsMask> image_operands,
|
||||
const std::vector<Id>& operands) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpImageWrite)};
|
||||
op->Add(image);
|
||||
op->Add(coordinate);
|
||||
op->Add(texel);
|
||||
AddImageOperands(op.get(), image_operands, operands);
|
||||
return AddCode(std::move(op));
|
||||
std::span<const Id> operands) {
|
||||
assert(image_operands.has_value() != operands.empty());
|
||||
code->Reserve(5 + operands.size());
|
||||
return *code << spv::Op::OpImageWrite << image << coordinate << texel << image_operands
|
||||
<< operands << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpImage(Id result_type, Id sampled_image) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpImage, bound++, result_type)};
|
||||
op->Add(sampled_image);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(4);
|
||||
return *code << OpId{spv::Op::OpImage, result_type} << sampled_image << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpImageSparseSampleImplicitLod(Id result_type, Id sampled_image, Id coordinate,
|
||||
std::optional<spv::ImageOperandsMask> image_operands,
|
||||
std::span<const Id> operands) {
|
||||
code->Reserve(5 + (image_operands.has_value() ? 1 : 0) + operands.size());
|
||||
return *code << OpId{spv::Op::OpImageSparseSampleImplicitLod, result_type} << sampled_image
|
||||
<< coordinate << image_operands << operands << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpImageSparseSampleExplicitLod(Id result_type, Id sampled_image, Id coordinate,
|
||||
spv::ImageOperandsMask image_operands,
|
||||
std::span<const Id> operands) {
|
||||
code->Reserve(6 + operands.size());
|
||||
return *code << OpId{spv::Op::OpImageSparseSampleExplicitLod, result_type} << sampled_image
|
||||
<< coordinate << image_operands << operands << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpImageSparseSampleDrefImplicitLod(Id result_type, Id sampled_image, Id coordinate,
|
||||
Id dref,
|
||||
std::optional<spv::ImageOperandsMask> image_operands,
|
||||
std::span<const Id> operands) {
|
||||
code->Reserve(6 + (image_operands.has_value() ? 1 : 0) + operands.size());
|
||||
return *code << OpId{spv::Op::OpImageSparseSampleDrefImplicitLod, result_type} << sampled_image
|
||||
<< coordinate << dref << image_operands << operands << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpImageSparseSampleDrefExplicitLod(Id result_type, Id sampled_image, Id coordinate,
|
||||
Id dref, spv::ImageOperandsMask image_operands,
|
||||
std::span<const Id> operands) {
|
||||
code->Reserve(7 + operands.size());
|
||||
return *code << OpId{spv::Op::OpImageSparseSampleDrefExplicitLod, result_type} << sampled_image
|
||||
<< coordinate << dref << image_operands << operands << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpImageSparseFetch(Id result_type, Id image, Id coordinate,
|
||||
std::optional<spv::ImageOperandsMask> image_operands,
|
||||
std::span<const Id> operands) {
|
||||
code->Reserve(5 + (image_operands.has_value() ? 1 : 0) + operands.size());
|
||||
return *code << OpId{spv::Op::OpImageSparseFetch, result_type} << image << coordinate
|
||||
<< image_operands << operands << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpImageSparseGather(Id result_type, Id sampled_image, Id coordinate, Id component,
|
||||
std::optional<spv::ImageOperandsMask> image_operands,
|
||||
std::span<const Id> operands) {
|
||||
code->Reserve(6 + operands.size());
|
||||
return *code << OpId{spv::Op::OpImageSparseGather, result_type} << sampled_image << coordinate
|
||||
<< component << image_operands << operands << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpImageSparseDrefGather(Id result_type, Id sampled_image, Id coordinate, Id dref,
|
||||
std::optional<spv::ImageOperandsMask> image_operands,
|
||||
std::span<const Id> operands) {
|
||||
code->Reserve(6 + operands.size());
|
||||
return *code << OpId{spv::Op::OpImageSparseDrefGather, result_type} << sampled_image
|
||||
<< coordinate << dref << image_operands << operands << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpImageSparseTexelsResident(Id result_type, Id resident_code) {
|
||||
code->Reserve(4);
|
||||
return *code << OpId{spv::Op::OpImageSparseTexelsResident, result_type} << resident_code
|
||||
<< EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpImageSparseRead(Id result_type, Id image, Id coordinate,
|
||||
std::optional<spv::ImageOperandsMask> image_operands,
|
||||
std::span<const Id> operands) {
|
||||
code->Reserve(5 + (image_operands.has_value() ? 1 : 0) + operands.size());
|
||||
return *code << OpId{spv::Op::OpImageSparseTexelsResident, result_type} << image << coordinate
|
||||
<< image_operands << operands << EndOp{};
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
100
externals/sirit/src/instructions/logical.cpp
vendored
100
externals/sirit/src/instructions/logical.cpp
vendored
@@ -4,68 +4,62 @@
|
||||
* 3-Clause BSD License
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include "common_types.h"
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
#define DEFINE_UNARY(funcname, opcode) \
|
||||
Id Module::funcname(Id result_type, Id operand) { \
|
||||
auto op{std::make_unique<Op>(opcode, bound++, result_type)}; \
|
||||
op->Add(operand); \
|
||||
return AddCode(std::move(op)); \
|
||||
#define DEFINE_UNARY(opcode) \
|
||||
Id Module::opcode(Id result_type, Id operand) { \
|
||||
code->Reserve(4); \
|
||||
return *code << OpId{spv::Op::opcode, result_type} << operand << EndOp{}; \
|
||||
}
|
||||
|
||||
#define DEFINE_BINARY(funcname, opcode) \
|
||||
Id Module::funcname(Id result_type, Id operand_1, Id operand_2) { \
|
||||
auto op{std::make_unique<Op>(opcode, bound++, result_type)}; \
|
||||
op->Add(operand_1); \
|
||||
op->Add(operand_2); \
|
||||
return AddCode(std::move(op)); \
|
||||
#define DEFINE_BINARY(opcode) \
|
||||
Id Module::opcode(Id result_type, Id operand_1, Id operand_2) { \
|
||||
code->Reserve(5); \
|
||||
return *code << OpId{spv::Op::opcode, result_type} << operand_1 << operand_2 << EndOp{}; \
|
||||
}
|
||||
|
||||
#define DEFINE_TRINARY(funcname, opcode) \
|
||||
Id Module::funcname(Id result_type, Id operand_1, Id operand_2, Id operand_3) { \
|
||||
auto op{std::make_unique<Op>(opcode, bound++, result_type)}; \
|
||||
op->Add(operand_1); \
|
||||
op->Add(operand_2); \
|
||||
op->Add(operand_3); \
|
||||
return AddCode(std::move(op)); \
|
||||
#define DEFINE_TRINARY(opcode) \
|
||||
Id Module::opcode(Id result_type, Id operand_1, Id operand_2, Id operand_3) { \
|
||||
code->Reserve(6); \
|
||||
return *code << OpId{spv::Op::opcode, result_type} << operand_1 << operand_2 << operand_3 \
|
||||
<< EndOp{}; \
|
||||
}
|
||||
|
||||
DEFINE_UNARY(OpAny, spv::Op::OpAny)
|
||||
DEFINE_UNARY(OpAll, spv::Op::OpAll)
|
||||
DEFINE_UNARY(OpIsNan, spv::Op::OpIsNan)
|
||||
DEFINE_UNARY(OpIsInf, spv::Op::OpIsInf)
|
||||
DEFINE_BINARY(OpLogicalEqual, spv::Op::OpLogicalEqual)
|
||||
DEFINE_BINARY(OpLogicalNotEqual, spv::Op::OpLogicalNotEqual)
|
||||
DEFINE_BINARY(OpLogicalOr, spv::Op::OpLogicalOr)
|
||||
DEFINE_BINARY(OpLogicalAnd, spv::Op::OpLogicalAnd)
|
||||
DEFINE_UNARY(OpLogicalNot, spv::Op::OpLogicalNot)
|
||||
DEFINE_TRINARY(OpSelect, spv::Op::OpSelect)
|
||||
DEFINE_BINARY(OpIEqual, spv::Op::OpIEqual)
|
||||
DEFINE_BINARY(OpINotEqual, spv::Op::OpINotEqual)
|
||||
DEFINE_BINARY(OpUGreaterThan, spv::Op::OpUGreaterThan)
|
||||
DEFINE_BINARY(OpSGreaterThan, spv::Op::OpSGreaterThan)
|
||||
DEFINE_BINARY(OpUGreaterThanEqual, spv::Op::OpUGreaterThanEqual)
|
||||
DEFINE_BINARY(OpSGreaterThanEqual, spv::Op::OpSGreaterThanEqual)
|
||||
DEFINE_BINARY(OpULessThan, spv::Op::OpULessThan)
|
||||
DEFINE_BINARY(OpSLessThan, spv::Op::OpSLessThan)
|
||||
DEFINE_BINARY(OpULessThanEqual, spv::Op::OpULessThanEqual)
|
||||
DEFINE_BINARY(OpSLessThanEqual, spv::Op::OpSLessThanEqual)
|
||||
DEFINE_BINARY(OpFOrdEqual, spv::Op::OpFOrdEqual)
|
||||
DEFINE_BINARY(OpFUnordEqual, spv::Op::OpFUnordEqual)
|
||||
DEFINE_BINARY(OpFOrdNotEqual, spv::Op::OpFOrdNotEqual)
|
||||
DEFINE_BINARY(OpFUnordNotEqual, spv::Op::OpFUnordNotEqual)
|
||||
DEFINE_BINARY(OpFOrdLessThan, spv::Op::OpFOrdLessThan)
|
||||
DEFINE_BINARY(OpFUnordLessThan, spv::Op::OpFUnordLessThan)
|
||||
DEFINE_BINARY(OpFOrdGreaterThan, spv::Op::OpFOrdGreaterThan)
|
||||
DEFINE_BINARY(OpFUnordGreaterThan, spv::Op::OpFUnordGreaterThan)
|
||||
DEFINE_BINARY(OpFOrdLessThanEqual, spv::Op::OpFOrdLessThanEqual)
|
||||
DEFINE_BINARY(OpFUnordLessThanEqual, spv::Op::OpFUnordLessThanEqual)
|
||||
DEFINE_BINARY(OpFOrdGreaterThanEqual, spv::Op::OpFOrdGreaterThanEqual)
|
||||
DEFINE_BINARY(OpFUnordGreaterThanEqual, spv::Op::OpFUnordGreaterThanEqual)
|
||||
DEFINE_UNARY(OpAny)
|
||||
DEFINE_UNARY(OpAll)
|
||||
DEFINE_UNARY(OpIsNan)
|
||||
DEFINE_UNARY(OpIsInf)
|
||||
DEFINE_BINARY(OpLogicalEqual)
|
||||
DEFINE_BINARY(OpLogicalNotEqual)
|
||||
DEFINE_BINARY(OpLogicalOr)
|
||||
DEFINE_BINARY(OpLogicalAnd)
|
||||
DEFINE_UNARY(OpLogicalNot)
|
||||
DEFINE_TRINARY(OpSelect)
|
||||
DEFINE_BINARY(OpIEqual)
|
||||
DEFINE_BINARY(OpINotEqual)
|
||||
DEFINE_BINARY(OpUGreaterThan)
|
||||
DEFINE_BINARY(OpSGreaterThan)
|
||||
DEFINE_BINARY(OpUGreaterThanEqual)
|
||||
DEFINE_BINARY(OpSGreaterThanEqual)
|
||||
DEFINE_BINARY(OpULessThan)
|
||||
DEFINE_BINARY(OpSLessThan)
|
||||
DEFINE_BINARY(OpULessThanEqual)
|
||||
DEFINE_BINARY(OpSLessThanEqual)
|
||||
DEFINE_BINARY(OpFOrdEqual)
|
||||
DEFINE_BINARY(OpFUnordEqual)
|
||||
DEFINE_BINARY(OpFOrdNotEqual)
|
||||
DEFINE_BINARY(OpFUnordNotEqual)
|
||||
DEFINE_BINARY(OpFOrdLessThan)
|
||||
DEFINE_BINARY(OpFUnordLessThan)
|
||||
DEFINE_BINARY(OpFOrdGreaterThan)
|
||||
DEFINE_BINARY(OpFUnordGreaterThan)
|
||||
DEFINE_BINARY(OpFOrdLessThanEqual)
|
||||
DEFINE_BINARY(OpFUnordLessThanEqual)
|
||||
DEFINE_BINARY(OpFOrdGreaterThanEqual)
|
||||
DEFINE_BINARY(OpFUnordGreaterThanEqual)
|
||||
|
||||
} // namespace Sirit
|
||||
|
89
externals/sirit/src/instructions/memory.cpp
vendored
89
externals/sirit/src/instructions/memory.cpp
vendored
@@ -5,91 +5,64 @@
|
||||
*/
|
||||
|
||||
#include <cassert>
|
||||
#include "op.h"
|
||||
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::OpVariable(Id result_type, spv::StorageClass storage_class, Id initializer) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpVariable, bound++, result_type)};
|
||||
op->Add(static_cast<u32>(storage_class));
|
||||
if (initializer) {
|
||||
op->Add(initializer);
|
||||
}
|
||||
return code_store.emplace_back(std::move(op)).get();
|
||||
}
|
||||
|
||||
Id Module::OpImageTexelPointer(Id result_type, Id image, Id coordinate, Id sample) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpImageTexelPointer, bound++, result_type)};
|
||||
op->Add(image);
|
||||
op->Add(coordinate);
|
||||
op->Add(sample);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(6);
|
||||
return *code << OpId{spv::Op::OpImageTexelPointer, result_type} << image << coordinate << sample
|
||||
<< EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpLoad(Id result_type, Id pointer, std::optional<spv::MemoryAccessMask> memory_access) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpLoad, bound++, result_type)};
|
||||
op->Add(pointer);
|
||||
if (memory_access) {
|
||||
op->Add(static_cast<u32>(*memory_access));
|
||||
}
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(5);
|
||||
return *code << OpId{spv::Op::OpLoad, result_type} << pointer << memory_access << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpStore(Id pointer, Id object, std::optional<spv::MemoryAccessMask> memory_access) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpStore)};
|
||||
op->Add(pointer);
|
||||
op->Add(object);
|
||||
if (memory_access) {
|
||||
op->Add(static_cast<u32>(*memory_access));
|
||||
}
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(4);
|
||||
return *code << spv::Op::OpStore << pointer << object << memory_access << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpAccessChain(Id result_type, Id base, const std::vector<Id>& indexes) {
|
||||
assert(indexes.size() > 0);
|
||||
auto op{std::make_unique<Op>(spv::Op::OpAccessChain, bound++, result_type)};
|
||||
op->Add(base);
|
||||
op->Add(indexes);
|
||||
return AddCode(std::move(op));
|
||||
Id Module::OpAccessChain(Id result_type, Id base, std::span<const Id> indexes) {
|
||||
assert(!indexes.empty());
|
||||
code->Reserve(4 + indexes.size());
|
||||
return *code << OpId{spv::Op::OpAccessChain, result_type} << base << indexes << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpVectorExtractDynamic(Id result_type, Id vector, Id index) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpVectorExtractDynamic, bound++, result_type)};
|
||||
op->Add(vector);
|
||||
op->Add(index);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(5);
|
||||
return *code << OpId{spv::Op::OpVectorExtractDynamic, result_type} << vector << index
|
||||
<< EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpVectorInsertDynamic(Id result_type, Id vector, Id component, Id index) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpVectorInsertDynamic, bound++, result_type)};
|
||||
op->Add(vector);
|
||||
op->Add(component);
|
||||
op->Add(index);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(6);
|
||||
return *code << OpId{spv::Op::OpVectorInsertDynamic, result_type} << vector << component
|
||||
<< index << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpCompositeInsert(Id result_type, Id object, Id composite,
|
||||
const std::vector<Literal>& indexes) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpCompositeInsert, bound++, result_type)};
|
||||
op->Add(object);
|
||||
op->Add(composite);
|
||||
op->Add(indexes);
|
||||
return AddCode(std::move(op));
|
||||
std::span<const Literal> indexes) {
|
||||
code->Reserve(5 + indexes.size());
|
||||
return *code << OpId{spv::Op::OpCompositeInsert, result_type} << object << composite << indexes
|
||||
<< EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpCompositeExtract(Id result_type, Id composite, const std::vector<Literal>& indexes) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpCompositeExtract, bound++, result_type)};
|
||||
op->Add(composite);
|
||||
op->Add(indexes);
|
||||
return AddCode(std::move(op));
|
||||
Id Module::OpCompositeExtract(Id result_type, Id composite, std::span<const Literal> indexes) {
|
||||
code->Reserve(4 + indexes.size());
|
||||
return *code << OpId{spv::Op::OpCompositeExtract, result_type} << composite << indexes
|
||||
<< EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpCompositeConstruct(Id result_type, const std::vector<Id>& ids) {
|
||||
Id Module::OpCompositeConstruct(Id result_type, std::span<const Id> ids) {
|
||||
assert(ids.size() >= 1);
|
||||
auto op{std::make_unique<Op>(spv::Op::OpCompositeConstruct, bound++, result_type)};
|
||||
op->Add(ids);
|
||||
return AddCode(std::move(op));
|
||||
code->Reserve(3 + ids.size());
|
||||
return *code << OpId{spv::Op::OpCompositeConstruct, result_type} << ids << EndOp{};
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
26
externals/sirit/src/instructions/misc.cpp
vendored
26
externals/sirit/src/instructions/misc.cpp
vendored
@@ -4,21 +4,35 @@
|
||||
* 3-Clause BSD License
|
||||
*/
|
||||
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::OpUndef(Id result_type) {
|
||||
return AddCode(std::make_unique<Op>(spv::Op::OpUndef, bound++, result_type));
|
||||
code->Reserve(3);
|
||||
return *code << OpId{spv::Op::OpUndef, result_type} << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpEmitVertex() {
|
||||
return AddCode(std::make_unique<Op>(spv::Op::OpEmitVertex));
|
||||
void Module::OpEmitVertex() {
|
||||
code->Reserve(1);
|
||||
*code << spv::Op::OpEmitVertex << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::OpEndPrimitive() {
|
||||
return AddCode(std::make_unique<Op>(spv::Op::OpEndPrimitive));
|
||||
void Module::OpEndPrimitive() {
|
||||
code->Reserve(1);
|
||||
*code << spv::Op::OpEndPrimitive << EndOp{};
|
||||
}
|
||||
|
||||
void Module::OpEmitStreamVertex(Id stream) {
|
||||
code->Reserve(2);
|
||||
*code << spv::Op::OpEmitStreamVertex << stream << EndOp{};
|
||||
}
|
||||
|
||||
void Module::OpEndStreamPrimitive(Id stream) {
|
||||
code->Reserve(2);
|
||||
*code << spv::Op::OpEndStreamPrimitive << stream << EndOp{};
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
113
externals/sirit/src/instructions/type.cpp
vendored
113
externals/sirit/src/instructions/type.cpp
vendored
@@ -5,137 +5,118 @@
|
||||
*/
|
||||
|
||||
#include <cassert>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::TypeVoid() {
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpTypeVoid, bound));
|
||||
declarations->Reserve(2);
|
||||
return *declarations << OpId{spv::Op::OpTypeVoid} << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::TypeBool() {
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpTypeBool, bound));
|
||||
declarations->Reserve(2);
|
||||
return *declarations << OpId{spv::Op::OpTypeBool} << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::TypeInt(int width, bool is_signed) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpTypeInt, bound)};
|
||||
op->Add(width);
|
||||
op->Add(is_signed ? 1 : 0);
|
||||
return AddDeclaration(std::move(op));
|
||||
declarations->Reserve(4);
|
||||
return *declarations << OpId{spv::Op::OpTypeInt} << width << is_signed << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::TypeFloat(int width) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpTypeFloat, bound)};
|
||||
op->Add(width);
|
||||
return AddDeclaration(std::move(op));
|
||||
declarations->Reserve(3);
|
||||
return *declarations << OpId{spv::Op::OpTypeFloat} << width << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::TypeVector(Id component_type, int component_count) {
|
||||
assert(component_count >= 2);
|
||||
auto op{std::make_unique<Op>(spv::Op::OpTypeVector, bound)};
|
||||
op->Add(component_type);
|
||||
op->Add(component_count);
|
||||
return AddDeclaration(std::move(op));
|
||||
declarations->Reserve(4);
|
||||
return *declarations << OpId{spv::Op::OpTypeVector} << component_type << component_count
|
||||
<< EndOp{};
|
||||
}
|
||||
|
||||
Id Module::TypeMatrix(Id column_type, int column_count) {
|
||||
assert(column_count >= 2);
|
||||
auto op{std::make_unique<Op>(spv::Op::OpTypeMatrix, bound)};
|
||||
op->Add(column_type);
|
||||
op->Add(column_count);
|
||||
return AddDeclaration(std::move(op));
|
||||
declarations->Reserve(4);
|
||||
return *declarations << OpId{spv::Op::OpTypeMatrix} << column_type << column_count << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::TypeImage(Id sampled_type, spv::Dim dim, int depth, bool arrayed, bool ms, int sampled,
|
||||
spv::ImageFormat image_format,
|
||||
std::optional<spv::AccessQualifier> access_qualifier) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpTypeImage, bound)};
|
||||
op->Add(sampled_type);
|
||||
op->Add(static_cast<u32>(dim));
|
||||
op->Add(depth);
|
||||
op->Add(arrayed ? 1 : 0);
|
||||
op->Add(ms ? 1 : 0);
|
||||
op->Add(sampled);
|
||||
op->Add(static_cast<u32>(image_format));
|
||||
if (access_qualifier.has_value()) {
|
||||
op->Add(static_cast<u32>(access_qualifier.value()));
|
||||
}
|
||||
return AddDeclaration(std::move(op));
|
||||
declarations->Reserve(10);
|
||||
return *declarations << OpId{spv::Op::OpTypeImage} << sampled_type << dim << depth << arrayed
|
||||
<< ms << sampled << image_format << access_qualifier << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::TypeSampler() {
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpTypeSampler, bound));
|
||||
declarations->Reserve(2);
|
||||
return *declarations << OpId{spv::Op::OpTypeSampler} << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::TypeSampledImage(Id image_type) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpTypeSampledImage, bound)};
|
||||
op->Add(image_type);
|
||||
return AddDeclaration(std::move(op));
|
||||
declarations->Reserve(3);
|
||||
return *declarations << OpId{spv::Op::OpTypeSampledImage} << image_type << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::TypeArray(Id element_type, Id length) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpTypeArray, bound)};
|
||||
op->Add(element_type);
|
||||
op->Add(length);
|
||||
return AddDeclaration(std::move(op));
|
||||
declarations->Reserve(4);
|
||||
return *declarations << OpId{spv::Op::OpTypeArray} << element_type << length << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::TypeRuntimeArray(Id element_type) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpTypeRuntimeArray, bound)};
|
||||
op->Add(element_type);
|
||||
return AddDeclaration(std::move(op));
|
||||
declarations->Reserve(3);
|
||||
return *declarations << OpId{spv::Op::OpTypeRuntimeArray} << element_type << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::TypeStruct(const std::vector<Id>& members) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpTypeStruct, bound)};
|
||||
op->Add(members);
|
||||
return AddDeclaration(std::move(op));
|
||||
Id Module::TypeStruct(std::span<const Id> members) {
|
||||
declarations->Reserve(2 + members.size());
|
||||
return *declarations << OpId{spv::Op::OpTypeStruct} << members << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::TypeOpaque(std::string name) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpTypeOpaque, bound)};
|
||||
op->Add(std::move(name));
|
||||
return AddDeclaration(std::move(op));
|
||||
Id Module::TypeOpaque(std::string_view name) {
|
||||
declarations->Reserve(3 + WordsInString(name));
|
||||
return *declarations << OpId{spv::Op::OpTypeOpaque} << name << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::TypePointer(spv::StorageClass storage_class, Id type) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpTypePointer, bound)};
|
||||
op->Add(static_cast<u32>(storage_class));
|
||||
op->Add(type);
|
||||
return AddDeclaration(std::move(op));
|
||||
declarations->Reserve(4);
|
||||
return *declarations << OpId{spv::Op::OpTypePointer} << storage_class << type << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::TypeFunction(Id return_type, const std::vector<Id>& arguments) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpTypeFunction, bound)};
|
||||
op->Add(return_type);
|
||||
op->Add(arguments);
|
||||
return AddDeclaration(std::move(op));
|
||||
Id Module::TypeFunction(Id return_type, std::span<const Id> arguments) {
|
||||
declarations->Reserve(3 + arguments.size());
|
||||
return *declarations << OpId{spv::Op::OpTypeFunction} << return_type << arguments << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::TypeEvent() {
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpTypeEvent, bound));
|
||||
declarations->Reserve(2);
|
||||
return *declarations << OpId{spv::Op::OpTypeEvent} << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::TypeDeviceEvent() {
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpTypeDeviceEvent, bound));
|
||||
declarations->Reserve(2);
|
||||
return *declarations << OpId{spv::Op::OpTypeDeviceEvent} << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::TypeReserveId() {
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpTypeReserveId, bound));
|
||||
declarations->Reserve(2);
|
||||
return *declarations << OpId{spv::Op::OpTypeReserveId} << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::TypeQueue() {
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpTypeQueue, bound));
|
||||
declarations->Reserve(2);
|
||||
return *declarations << OpId{spv::Op::OpTypeQueue} << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::TypePipe(spv::AccessQualifier access_qualifier) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpTypePipe, bound)};
|
||||
op->Add(static_cast<u32>(access_qualifier));
|
||||
return AddDeclaration(std::move(op));
|
||||
declarations->Reserve(2);
|
||||
return *declarations << OpId{spv::Op::OpTypePipe} << access_qualifier << EndOp{};
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
181
externals/sirit/src/sirit.cpp
vendored
181
externals/sirit/src/sirit.cpp
vendored
@@ -4,66 +4,82 @@
|
||||
* 3-Clause BSD License
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include "common_types.h"
|
||||
#include "op.h"
|
||||
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
#include "common_types.h"
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
template <typename T>
|
||||
static void WriteSet(Stream& stream, const T& set) {
|
||||
for (const auto& item : set) {
|
||||
item->Write(stream);
|
||||
}
|
||||
constexpr u32 MakeWord0(spv::Op op, size_t word_count) {
|
||||
return static_cast<u32>(op) | static_cast<u32>(word_count) << 16;
|
||||
}
|
||||
|
||||
Module::Module(u32 version_) : version{version_} {}
|
||||
Module::Module(u32 version_)
|
||||
: version{version_}, ext_inst_imports{std::make_unique<Stream>(&bound)},
|
||||
entry_points{std::make_unique<Stream>(&bound)},
|
||||
execution_modes{std::make_unique<Stream>(&bound)}, debug{std::make_unique<Stream>(&bound)},
|
||||
annotations{std::make_unique<Stream>(&bound)}, declarations{std::make_unique<Declarations>(
|
||||
&bound)},
|
||||
global_variables{std::make_unique<Stream>(&bound)}, code{std::make_unique<Stream>(&bound)} {}
|
||||
|
||||
Module::~Module() = default;
|
||||
|
||||
std::vector<u32> Module::Assemble() const {
|
||||
std::vector<u32> bytes;
|
||||
Stream stream{bytes};
|
||||
std::vector<u32> words = {spv::MagicNumber, version, GENERATOR_MAGIC_NUMBER, bound + 1, 0};
|
||||
const auto insert = [&words](std::span<const u32> input) {
|
||||
words.insert(words.end(), input.begin(), input.end());
|
||||
};
|
||||
|
||||
stream.Write(spv::MagicNumber);
|
||||
stream.Write(version);
|
||||
stream.Write(GENERATOR_MAGIC_NUMBER);
|
||||
stream.Write(bound);
|
||||
stream.Write(static_cast<u32>(0));
|
||||
|
||||
for (const auto capability : capabilities) {
|
||||
Op op(spv::Op::OpCapability);
|
||||
op.Add(static_cast<u32>(capability));
|
||||
op.Write(stream);
|
||||
words.reserve(words.size() + capabilities.size() * 2);
|
||||
for (const spv::Capability capability : capabilities) {
|
||||
insert(std::array{
|
||||
MakeWord0(spv::Op::OpCapability, 2),
|
||||
static_cast<u32>(capability),
|
||||
});
|
||||
}
|
||||
|
||||
for (const auto& extension_name : extensions) {
|
||||
Op op(spv::Op::OpExtension);
|
||||
op.Add(extension_name);
|
||||
op.Write(stream);
|
||||
for (const std::string_view extension_name : extensions) {
|
||||
size_t string_words = WordsInString(extension_name);
|
||||
words.push_back(MakeWord0(spv::Op::OpExtension, string_words + 1));
|
||||
size_t insert_index = words.size();
|
||||
words.resize(words.size() + string_words);
|
||||
InsertStringView(words, insert_index, extension_name);
|
||||
}
|
||||
|
||||
if (glsl_std_450) {
|
||||
glsl_std_450->Write(stream);
|
||||
insert(ext_inst_imports->Words());
|
||||
|
||||
insert(std::array{
|
||||
MakeWord0(spv::Op::OpMemoryModel, 3),
|
||||
static_cast<u32>(addressing_model),
|
||||
static_cast<u32>(memory_model),
|
||||
});
|
||||
|
||||
insert(entry_points->Words());
|
||||
insert(execution_modes->Words());
|
||||
insert(debug->Words());
|
||||
insert(annotations->Words());
|
||||
insert(declarations->Words());
|
||||
insert(global_variables->Words());
|
||||
insert(code->Words());
|
||||
|
||||
return words;
|
||||
}
|
||||
|
||||
void Module::PatchDeferredPhi(const std::function<Id(std::size_t index)>& func) {
|
||||
for (const u32 phi_index : deferred_phi_nodes) {
|
||||
const u32 first_word = code->Value(phi_index);
|
||||
[[maybe_unused]] const spv::Op op = static_cast<spv::Op>(first_word & 0xffff);
|
||||
assert(op == spv::Op::OpPhi);
|
||||
const u32 num_words = first_word >> 16;
|
||||
const u32 num_args = (num_words - 3) / 2;
|
||||
u32 cursor = phi_index + 3;
|
||||
for (u32 arg = 0; arg < num_args; ++arg, cursor += 2) {
|
||||
code->SetValue(cursor, func(arg).value);
|
||||
}
|
||||
}
|
||||
|
||||
Op memory_model_ref{spv::Op::OpMemoryModel};
|
||||
memory_model_ref.Add(static_cast<u32>(addressing_model));
|
||||
memory_model_ref.Add(static_cast<u32>(memory_model));
|
||||
memory_model_ref.Write(stream);
|
||||
|
||||
WriteSet(stream, entry_points);
|
||||
WriteSet(stream, execution_modes);
|
||||
WriteSet(stream, debug);
|
||||
WriteSet(stream, annotations);
|
||||
WriteSet(stream, declarations);
|
||||
WriteSet(stream, global_variables);
|
||||
WriteSet(stream, code);
|
||||
|
||||
return bytes;
|
||||
}
|
||||
|
||||
void Module::AddExtension(std::string extension_name) {
|
||||
@@ -74,76 +90,53 @@ void Module::AddCapability(spv::Capability capability) {
|
||||
capabilities.insert(capability);
|
||||
}
|
||||
|
||||
void Module::SetMemoryModel(spv::AddressingModel addressing_model_, spv::MemoryModel memory_model_) {
|
||||
this->addressing_model = addressing_model_;
|
||||
this->memory_model = memory_model_;
|
||||
void Module::SetMemoryModel(spv::AddressingModel addressing_model_,
|
||||
spv::MemoryModel memory_model_) {
|
||||
addressing_model = addressing_model_;
|
||||
memory_model = memory_model_;
|
||||
}
|
||||
|
||||
void Module::AddEntryPoint(spv::ExecutionModel execution_model, Id entry_point,
|
||||
std::string name, const std::vector<Id>& interfaces) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpEntryPoint)};
|
||||
op->Add(static_cast<u32>(execution_model));
|
||||
op->Add(entry_point);
|
||||
op->Add(std::move(name));
|
||||
op->Add(interfaces);
|
||||
entry_points.push_back(std::move(op));
|
||||
std::string_view name, std::span<const Id> interfaces) {
|
||||
entry_points->Reserve(4 + WordsInString(name) + interfaces.size());
|
||||
*entry_points << spv::Op::OpEntryPoint << execution_model << entry_point << name << interfaces
|
||||
<< EndOp{};
|
||||
}
|
||||
|
||||
void Module::AddExecutionMode(Id entry_point, spv::ExecutionMode mode,
|
||||
const std::vector<Literal>& literals) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpExecutionMode)};
|
||||
op->Add(entry_point);
|
||||
op->Add(static_cast<u32>(mode));
|
||||
op->Add(literals);
|
||||
execution_modes.push_back(std::move(op));
|
||||
std::span<const Literal> literals) {
|
||||
execution_modes->Reserve(3 + literals.size());
|
||||
*execution_modes << spv::Op::OpExecutionMode << entry_point << mode << literals << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::AddLabel(Id label) {
|
||||
assert(label != nullptr);
|
||||
return code.emplace_back(label);
|
||||
assert(label.value != 0);
|
||||
code->Reserve(2);
|
||||
*code << MakeWord0(spv::Op::OpLabel, 2) << label.value;
|
||||
return label;
|
||||
}
|
||||
|
||||
Id Module::AddLocalVariable(Id variable) {
|
||||
assert(variable != nullptr);
|
||||
return code.emplace_back(variable);
|
||||
Id Module::AddLocalVariable(Id result_type, spv::StorageClass storage_class,
|
||||
std::optional<Id> initializer) {
|
||||
code->Reserve(5);
|
||||
return *code << OpId{spv::Op::OpVariable, result_type} << storage_class << initializer
|
||||
<< EndOp{};
|
||||
}
|
||||
|
||||
Id Module::AddGlobalVariable(Id variable) {
|
||||
assert(variable);
|
||||
return global_variables.emplace_back(variable);
|
||||
}
|
||||
|
||||
Id Module::AddCode(std::unique_ptr<Op> op) {
|
||||
const Id id = code_store.emplace_back(std::move(op)).get();
|
||||
return code.emplace_back(id);
|
||||
}
|
||||
|
||||
Id Module::AddCode(spv::Op opcode, std::optional<u32> id) {
|
||||
return AddCode(std::make_unique<Op>(opcode, id));
|
||||
}
|
||||
|
||||
Id Module::AddDeclaration(std::unique_ptr<Op> op) {
|
||||
const auto& found{std::find_if(declarations.begin(), declarations.end(),
|
||||
[&op](const auto& other) { return *other == *op; })};
|
||||
if (found != declarations.end()) {
|
||||
return found->get();
|
||||
}
|
||||
const auto id = op.get();
|
||||
declarations.push_back(std::move(op));
|
||||
bound++;
|
||||
return id;
|
||||
}
|
||||
|
||||
void Module::AddAnnotation(std::unique_ptr<Op> op) {
|
||||
annotations.push_back(std::move(op));
|
||||
Id Module::AddGlobalVariable(Id result_type, spv::StorageClass storage_class,
|
||||
std::optional<Id> initializer) {
|
||||
global_variables->Reserve(5);
|
||||
return *global_variables << OpId{spv::Op::OpVariable, result_type} << storage_class
|
||||
<< initializer << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::GetGLSLstd450() {
|
||||
if (!glsl_std_450) {
|
||||
glsl_std_450 = std::make_unique<Op>(spv::Op::OpExtInstImport, bound++);
|
||||
glsl_std_450->Add("GLSL.std.450");
|
||||
ext_inst_imports->Reserve(3 + 4);
|
||||
glsl_std_450 = *ext_inst_imports << OpId{spv::Op::OpExtInstImport} << "GLSL.std.450"
|
||||
<< EndOp{};
|
||||
}
|
||||
return glsl_std_450.get();
|
||||
return *glsl_std_450;
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
51
externals/sirit/src/stream.cpp
vendored
51
externals/sirit/src/stream.cpp
vendored
@@ -1,51 +0,0 @@
|
||||
/* This file is part of the sirit project.
|
||||
* Copyright (c) 2019 sirit
|
||||
* This software may be used and distributed according to the terms of the
|
||||
* 3-Clause BSD License
|
||||
*/
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Stream::Stream(std::vector<u32>& words_) : words{words_} {}
|
||||
|
||||
Stream::~Stream() = default;
|
||||
|
||||
void Stream::Write(std::string_view string) {
|
||||
constexpr std::size_t word_size = 4;
|
||||
const auto size = string.size();
|
||||
const auto read = [string, size](std::size_t offset) {
|
||||
return offset < size ? static_cast<u8>(string[offset]) : u8(0);
|
||||
};
|
||||
|
||||
words.reserve(words.size() + size / word_size + 1);
|
||||
for (std::size_t i = 0; i < size; i += word_size) {
|
||||
Write(read(i), read(i + 1), read(i + 2), read(i + 3));
|
||||
}
|
||||
if (size % word_size == 0) {
|
||||
Write(u32(0));
|
||||
}
|
||||
}
|
||||
|
||||
void Stream::Write(u64 value) {
|
||||
const u32 dword[] = {static_cast<u32>(value), static_cast<u32>(value >> 32)};
|
||||
words.insert(std::begin(words), std::cbegin(dword), std::cend(dword));
|
||||
}
|
||||
|
||||
void Stream::Write(u32 value) {
|
||||
words.push_back(value);
|
||||
}
|
||||
|
||||
void Stream::Write(u16 first, u16 second) {
|
||||
const u32 word = static_cast<u32>(first) | static_cast<u32>(second) << 16;
|
||||
Write(word);
|
||||
}
|
||||
|
||||
void Stream::Write(u8 first, u8 second, u8 third, u8 fourth) {
|
||||
const u32 word = static_cast<u32>(first) | static_cast<u32>(second) << 8 |
|
||||
static_cast<u32>(third) << 16 | static_cast<u32>(fourth) << 24;
|
||||
Write(word);
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
247
externals/sirit/src/stream.h
vendored
247
externals/sirit/src/stream.h
vendored
@@ -6,29 +6,260 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <bit>
|
||||
#include <cassert>
|
||||
#include <concepts>
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <string_view>
|
||||
#include <unordered_map>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
|
||||
#ifndef __cpp_lib_bit_cast
|
||||
#include <cstring>
|
||||
#endif
|
||||
|
||||
#include <spirv/unified1/spirv.hpp>
|
||||
|
||||
#include "common_types.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
class Declarations;
|
||||
|
||||
struct OpId {
|
||||
OpId(spv::Op opcode_) : opcode{opcode_} {}
|
||||
OpId(spv::Op opcode_, Id result_type_) : opcode{opcode_}, result_type{result_type_} {
|
||||
assert(result_type.value != 0);
|
||||
}
|
||||
|
||||
spv::Op opcode{};
|
||||
Id result_type{};
|
||||
};
|
||||
|
||||
struct EndOp {};
|
||||
|
||||
inline size_t WordsInString(std::string_view string) {
|
||||
return string.size() / sizeof(u32) + 1;
|
||||
}
|
||||
|
||||
inline void InsertStringView(std::vector<u32>& words, size_t& insert_index,
|
||||
std::string_view string) {
|
||||
const size_t size = string.size();
|
||||
const auto read = [string, size](size_t offset) {
|
||||
return offset < size ? static_cast<u32>(string[offset]) : 0u;
|
||||
};
|
||||
|
||||
for (size_t i = 0; i < size; i += sizeof(u32)) {
|
||||
words[insert_index++] = read(i) | read(i + 1) << 8 | read(i + 2) << 16 | read(i + 3) << 24;
|
||||
}
|
||||
if (size % sizeof(u32) == 0) {
|
||||
words[insert_index++] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
class Stream {
|
||||
friend Declarations;
|
||||
|
||||
public:
|
||||
explicit Stream(std::vector<u32>& words);
|
||||
~Stream();
|
||||
explicit Stream(u32* bound_) : bound{bound_} {}
|
||||
|
||||
void Write(std::string_view string);
|
||||
void Reserve(size_t num_words) {
|
||||
if (insert_index + num_words <= words.size()) {
|
||||
return;
|
||||
}
|
||||
words.resize(insert_index + num_words);
|
||||
}
|
||||
|
||||
void Write(u64 value);
|
||||
std::span<const u32> Words() const noexcept {
|
||||
return std::span(words.data(), insert_index);
|
||||
}
|
||||
|
||||
void Write(u32 value);
|
||||
u32 LocalAddress() const noexcept {
|
||||
return static_cast<u32>(words.size());
|
||||
}
|
||||
|
||||
void Write(u16 first, u16 second);
|
||||
u32 Value(u32 index) const noexcept {
|
||||
return words[index];
|
||||
}
|
||||
|
||||
void Write(u8 first, u8 second, u8 third, u8 fourth);
|
||||
void SetValue(u32 index, u32 value) noexcept {
|
||||
words[index] = value;
|
||||
}
|
||||
|
||||
Stream& operator<<(spv::Op op) {
|
||||
op_index = insert_index;
|
||||
words[insert_index++] = static_cast<u32>(op);
|
||||
return *this;
|
||||
}
|
||||
|
||||
Stream& operator<<(OpId op) {
|
||||
op_index = insert_index;
|
||||
words[insert_index++] = static_cast<u32>(op.opcode);
|
||||
if (op.result_type.value != 0) {
|
||||
words[insert_index++] = op.result_type.value;
|
||||
}
|
||||
words[insert_index++] = ++*bound;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Id operator<<(EndOp) {
|
||||
const size_t num_words = insert_index - op_index;
|
||||
words[op_index] |= static_cast<u32>(num_words) << 16;
|
||||
return Id{*bound};
|
||||
}
|
||||
|
||||
Stream& operator<<(u32 value) {
|
||||
words[insert_index++] = value;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Stream& operator<<(s32 value) {
|
||||
return *this << static_cast<u32>(value);
|
||||
}
|
||||
|
||||
Stream& operator<<(u64 value) {
|
||||
return *this << static_cast<u32>(value) << static_cast<u32>(value >> 32);
|
||||
}
|
||||
|
||||
Stream& operator<<(s64 value) {
|
||||
return *this << static_cast<u64>(value);
|
||||
}
|
||||
|
||||
Stream& operator<<(float value) {
|
||||
#ifdef __cpp_lib_bit_cast
|
||||
return *this << std::bit_cast<u32>(value);
|
||||
#else
|
||||
static_assert(sizeof(float) == sizeof(u32));
|
||||
u32 int_value;
|
||||
std::memcpy(&int_value, &value, sizeof(int_value));
|
||||
return *this << int_value;
|
||||
#endif
|
||||
}
|
||||
|
||||
Stream& operator<<(double value) {
|
||||
#ifdef __cpp_lib_bit_cast
|
||||
return *this << std::bit_cast<u64>(value);
|
||||
#else
|
||||
static_assert(sizeof(double) == sizeof(u64));
|
||||
u64 int_value;
|
||||
std::memcpy(&int_value, &value, sizeof(int_value));
|
||||
return *this << int_value;
|
||||
#endif
|
||||
}
|
||||
|
||||
Stream& operator<<(bool value) {
|
||||
return *this << static_cast<u32>(value ? 1 : 0);
|
||||
}
|
||||
|
||||
Stream& operator<<(Id value) {
|
||||
assert(value.value != 0);
|
||||
return *this << value.value;
|
||||
}
|
||||
|
||||
Stream& operator<<(const Literal& literal) {
|
||||
std::visit([this](auto value) { *this << value; }, literal);
|
||||
return *this;
|
||||
}
|
||||
|
||||
Stream& operator<<(std::string_view string) {
|
||||
InsertStringView(words, insert_index, string);
|
||||
return *this;
|
||||
}
|
||||
|
||||
Stream& operator<<(const char* string) {
|
||||
return *this << std::string_view{string};
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
requires std::is_enum_v<T> Stream& operator<<(T value) {
|
||||
static_assert(sizeof(T) == sizeof(u32));
|
||||
return *this << static_cast<u32>(value);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
Stream& operator<<(std::optional<T> value) {
|
||||
if (value) {
|
||||
*this << *value;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
Stream& operator<<(std::span<const T> values) {
|
||||
for (const auto& value : values) {
|
||||
*this << value;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<u32>& words;
|
||||
u32* bound = nullptr;
|
||||
std::vector<u32> words;
|
||||
size_t insert_index = 0;
|
||||
size_t op_index = 0;
|
||||
};
|
||||
|
||||
class Declarations {
|
||||
public:
|
||||
explicit Declarations(u32* bound) : stream{bound} {}
|
||||
|
||||
void Reserve(size_t num_words) {
|
||||
return stream.Reserve(num_words);
|
||||
}
|
||||
|
||||
std::span<const u32> Words() const noexcept {
|
||||
return stream.Words();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
Declarations& operator<<(const T& value) {
|
||||
stream << value;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Declarations without an id don't exist
|
||||
Declarations& operator<<(spv::Op) = delete;
|
||||
|
||||
Declarations& operator<<(OpId op) {
|
||||
id_index = op.result_type.value != 0 ? 2 : 1;
|
||||
stream << op;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Id operator<<(EndOp) {
|
||||
const auto begin = stream.words.data();
|
||||
std::vector<u32> declarations(begin + stream.op_index, begin + stream.insert_index);
|
||||
|
||||
// Normalize result id for lookups
|
||||
const u32 id = std::exchange(declarations[id_index], 0);
|
||||
|
||||
const auto [entry, inserted] = existing_declarations.emplace(declarations, id);
|
||||
if (inserted) {
|
||||
return stream << EndOp{};
|
||||
}
|
||||
// If the declaration already exists, undo the operation
|
||||
stream.insert_index = stream.op_index;
|
||||
--*stream.bound;
|
||||
|
||||
return Id{entry->second};
|
||||
}
|
||||
|
||||
private:
|
||||
struct HashVector {
|
||||
size_t operator()(const std::vector<u32>& vector) const noexcept {
|
||||
size_t hash = std::hash<size_t>{}(vector.size());
|
||||
for (const u32 value : vector) {
|
||||
hash ^= std::hash<u32>{}(value);
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
};
|
||||
|
||||
Stream stream;
|
||||
std::unordered_map<std::vector<u32>, u32, HashVector> existing_declarations;
|
||||
size_t id_index = 0;
|
||||
};
|
||||
|
||||
} // namespace Sirit
|
||||
|
15
externals/sirit/tests/main.cpp
vendored
15
externals/sirit/tests/main.cpp
vendored
@@ -7,6 +7,7 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#include <sirit/sirit.h>
|
||||
|
||||
class MyModule : public Sirit::Module {
|
||||
@@ -31,9 +32,9 @@ public:
|
||||
const auto gl_per_vertex_ptr =
|
||||
Name(TypePointer(spv::StorageClass::Output, gl_per_vertex), "out_gl_PerVertex");
|
||||
|
||||
const auto in_pos = Name(OpVariable(in_float4, spv::StorageClass::Input), "in_pos");
|
||||
const auto in_pos = Name(AddGlobalVariable(in_float4, spv::StorageClass::Input), "in_pos");
|
||||
const auto per_vertex =
|
||||
Name(OpVariable(gl_per_vertex_ptr, spv::StorageClass::Output), "per_vertex");
|
||||
Name(AddGlobalVariable(gl_per_vertex_ptr, spv::StorageClass::Output), "per_vertex");
|
||||
|
||||
Decorate(in_pos, spv::Decoration::Location, 0);
|
||||
Decorate(gl_per_vertex, spv::Decoration::Block);
|
||||
@@ -41,9 +42,6 @@ public:
|
||||
MemberDecorate(gl_per_vertex, 0, spv::Decoration::BuiltIn,
|
||||
static_cast<std::uint32_t>(spv::BuiltIn::Position));
|
||||
|
||||
AddGlobalVariable(in_pos);
|
||||
AddGlobalVariable(per_vertex);
|
||||
|
||||
const auto main_func = Name(
|
||||
OpFunction(t_void, spv::FunctionControlMask::MaskNone, TypeFunction(t_void)), "main");
|
||||
AddLabel();
|
||||
@@ -57,8 +55,8 @@ public:
|
||||
auto tmp_position = OpUndef(float4);
|
||||
tmp_position = OpCompositeInsert(float4, pos_x, tmp_position, 0);
|
||||
tmp_position = OpCompositeInsert(float4, pos_y, tmp_position, 1);
|
||||
tmp_position = OpCompositeInsert(float4, Constant(t_float, 0.f), tmp_position, 2);
|
||||
tmp_position = OpCompositeInsert(float4, Constant(t_float, 1.f), tmp_position, 3);
|
||||
tmp_position = OpCompositeInsert(float4, Constant(t_float, 0.0f), tmp_position, 2);
|
||||
tmp_position = OpCompositeInsert(float4, Constant(t_float, 1.0f), tmp_position, 3);
|
||||
|
||||
const auto gl_position = OpAccessChain(out_float4, per_vertex, Constant(t_uint, 0u));
|
||||
OpStore(gl_position, tmp_position);
|
||||
@@ -123,7 +121,8 @@ static constexpr std::uint8_t expected_binary[] = {
|
||||
0x1b, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x41, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x0f, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00,
|
||||
0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00};
|
||||
0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00,
|
||||
};
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
MyModule module;
|
||||
|
Reference in New Issue
Block a user