early-access version 1255
This commit is contained in:
88
externals/sirit/.clang-format
vendored
Executable file
88
externals/sirit/.clang-format
vendored
Executable file
@@ -0,0 +1,88 @@
|
||||
---
|
||||
Language: Cpp
|
||||
# BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -4
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignEscapedNewlinesLeft: false
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: true
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BraceWrapping:
|
||||
AfterClass: false
|
||||
AfterControlStatement: false
|
||||
AfterEnum: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeBraces: Attach
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
ColumnLimit: 100
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
|
||||
IncludeCategories:
|
||||
- Regex: '^\<[^Q][^/.>]*\>'
|
||||
Priority: -2
|
||||
- Regex: '^\<'
|
||||
Priority: -1
|
||||
- Regex: '^\"'
|
||||
Priority: 0
|
||||
IndentCaseLabels: false
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: false
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: None
|
||||
ObjCBlockIndentWidth: 2
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 150
|
||||
PointerAlignment: Left
|
||||
ReflowComments: true
|
||||
SortIncludes: true
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInContainerLiterals: true
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Cpp11
|
||||
TabWidth: 4
|
||||
UseTab: Never
|
||||
...
|
||||
2
externals/sirit/.gitignore
vendored
Executable file
2
externals/sirit/.gitignore
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
build
|
||||
*.o
|
||||
3
externals/sirit/.gitmodules
vendored
Executable file
3
externals/sirit/.gitmodules
vendored
Executable file
@@ -0,0 +1,3 @@
|
||||
[submodule "externals/SPIRV-Headers"]
|
||||
path = externals/SPIRV-Headers
|
||||
url = https://github.com/KhronosGroup/SPIRV-Headers
|
||||
90
externals/sirit/CMakeLists.txt
vendored
Executable file
90
externals/sirit/CMakeLists.txt
vendored
Executable file
@@ -0,0 +1,90 @@
|
||||
# This file has been adapted from dynarmic
|
||||
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
project(sirit CXX)
|
||||
|
||||
# Determine if we're built as a subproject (using add_subdirectory)
|
||||
# or if this is the master project.
|
||||
set(MASTER_PROJECT OFF)
|
||||
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
|
||||
set(MASTER_PROJECT ON)
|
||||
endif()
|
||||
|
||||
# Default to a Release build
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
|
||||
message(STATUS "Defaulting to a Release build")
|
||||
endif()
|
||||
|
||||
# Set hard requirements for C++
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
# Warn on CMake API deprecations
|
||||
set(CMAKE_WARN_DEPRECATED ON)
|
||||
|
||||
# Disable in-source builds
|
||||
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
|
||||
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
|
||||
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
|
||||
message(SEND_ERROR "In-source builds are not allowed.")
|
||||
endif()
|
||||
|
||||
# Add the module directory to the list of paths
|
||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMakeModules")
|
||||
|
||||
# Compiler flags
|
||||
if (MSVC)
|
||||
set(SIRIT_CXX_FLAGS
|
||||
/std:c++latest # CMAKE_CXX_STANDARD as no effect on MSVC until CMake 3.10.
|
||||
/W4
|
||||
/w34263 # Non-virtual member function hides base class virtual function
|
||||
/w44265 # Class has virtual functions, but destructor is not virtual
|
||||
/w34456 # Declaration of 'var' hides previous local declaration
|
||||
/w34457 # Declaration of 'var' hides function parameter
|
||||
/w34458 # Declaration of 'var' hides class member
|
||||
/w34459 # Declaration of 'var' hides global definition
|
||||
/w34946 # Reinterpret-cast between related types
|
||||
/wd4592 # Symbol will be dynamically initialized (implementation limitation)
|
||||
/permissive- # Stricter C++ standards conformance
|
||||
/MP
|
||||
/Zi
|
||||
/Zo
|
||||
/EHsc
|
||||
/Zc:throwingNew # Assumes new never returns null
|
||||
/Zc:inline # Omits inline functions from object-file output
|
||||
/DNOMINMAX
|
||||
/WX)
|
||||
|
||||
if (CMAKE_VS_PLATFORM_TOOLSET MATCHES "LLVM-vs[0-9]+")
|
||||
list(APPEND SIRIT_CXX_FLAGS
|
||||
-Qunused-arguments
|
||||
-Wno-missing-braces)
|
||||
endif()
|
||||
else()
|
||||
set(SIRIT_CXX_FLAGS
|
||||
-Wall
|
||||
-Wextra
|
||||
-Wcast-qual
|
||||
-pedantic
|
||||
-pedantic-errors
|
||||
-Wfatal-errors
|
||||
-Wno-missing-braces
|
||||
-Wconversion
|
||||
-Wsign-conversion
|
||||
-Wshadow
|
||||
-Werror)
|
||||
endif()
|
||||
|
||||
# Enable unit-testing.
|
||||
enable_testing(true)
|
||||
|
||||
# SPIR-V headers
|
||||
add_subdirectory(externals/SPIRV-Headers EXCLUDE_FROM_ALL)
|
||||
|
||||
# Sirit project files
|
||||
add_subdirectory(src)
|
||||
if (SIRIT_TESTS)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
24
externals/sirit/LICENSE.txt
vendored
Executable file
24
externals/sirit/LICENSE.txt
vendored
Executable file
@@ -0,0 +1,24 @@
|
||||
Copyright (c) 2019, sirit
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the <organization> nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
53
externals/sirit/README.md
vendored
Executable file
53
externals/sirit/README.md
vendored
Executable file
@@ -0,0 +1,53 @@
|
||||
Sirit
|
||||
=====
|
||||
A runtime SPIR-V assembler. It aims to ease dynamic SPIR-V code generation
|
||||
without calling external applications (like Khronos' `spirv-as`)
|
||||
|
||||
Its design aims to move code that does not belong in the application to the
|
||||
library, without limiting its functionality.
|
||||
|
||||
What Sirit does for you:
|
||||
* Sort declaration opcodes
|
||||
* Handle types and constant duplicates
|
||||
* Emit SPIR-V opcodes
|
||||
|
||||
What Sirit won't do for you:
|
||||
* Avoid ID duplicates (e.g. emitting the same label twice)
|
||||
* Dump code to disk
|
||||
* Handle control flow
|
||||
* Compile from a higher level language
|
||||
|
||||
|
||||
It's in early stages of development, many instructions are missing since
|
||||
they are written manually instead of being generated from a file.
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
```cpp
|
||||
class MyModule : public Sirit::Module {
|
||||
public:
|
||||
MyModule() {}
|
||||
~MyModule() = default;
|
||||
|
||||
void Generate() {
|
||||
AddCapability(spv::Capability::Shader);
|
||||
SetMemoryModel(spv::AddressingModel::Logical, spv::MemoryModel::GLSL450);
|
||||
|
||||
auto main_type{TypeFunction(TypeVoid())};
|
||||
auto main_func{OpFunction(TypeVoid(), spv::FunctionControlMask::MaskNone, main_type)};
|
||||
AddLabel(OpLabel());
|
||||
OpReturn();
|
||||
OpFunctionEnd();
|
||||
|
||||
AddEntryPoint(spv::ExecutionModel::Vertex, main_func, "main");
|
||||
}
|
||||
};
|
||||
|
||||
// Then...
|
||||
|
||||
MyModule module;
|
||||
module.Generate();
|
||||
|
||||
std::vector<std::uint32_t> code{module.Assemble()};
|
||||
```
|
||||
7
externals/sirit/externals/SPIRV-Headers/.gitattributes
vendored
Executable file
7
externals/sirit/externals/SPIRV-Headers/.gitattributes
vendored
Executable file
@@ -0,0 +1,7 @@
|
||||
*.json text
|
||||
*.h text
|
||||
*.hpp text
|
||||
*.hpp11 text
|
||||
*.lua text
|
||||
*.py text
|
||||
*.xml
|
||||
2
externals/sirit/externals/SPIRV-Headers/.gitignore
vendored
Executable file
2
externals/sirit/externals/SPIRV-Headers/.gitignore
vendored
Executable file
@@ -0,0 +1,2 @@
|
||||
build
|
||||
out
|
||||
60
externals/sirit/externals/SPIRV-Headers/CMakeLists.txt
vendored
Executable file
60
externals/sirit/externals/SPIRV-Headers/CMakeLists.txt
vendored
Executable file
@@ -0,0 +1,60 @@
|
||||
# Copyright (c) 2015-2016 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.
|
||||
|
||||
#
|
||||
# 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)
|
||||
|
||||
# There are two ways to use this project.
|
||||
#
|
||||
# Using this source tree directly from a CMake-based project:
|
||||
# 1. Add an add_subdirectory directive to include this sub directory.
|
||||
# 2. Use ${SPIRV-Headers_SOURCE_DIR}/include} in a target_include_directories
|
||||
# command.
|
||||
#
|
||||
# Installing the headers first, then using them with an implicit include
|
||||
# directory. To install the headers:
|
||||
# 1. mkdir build ; cd build
|
||||
# 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)
|
||||
25
externals/sirit/externals/SPIRV-Headers/LICENSE
vendored
Executable file
25
externals/sirit/externals/SPIRV-Headers/LICENSE
vendored
Executable file
@@ -0,0 +1,25 @@
|
||||
Copyright (c) 2015-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.
|
||||
124
externals/sirit/externals/SPIRV-Headers/README.md
vendored
Executable file
124
externals/sirit/externals/SPIRV-Headers/README.md
vendored
Executable file
@@ -0,0 +1,124 @@
|
||||
# SPIR-V Headers
|
||||
|
||||
This repository contains machine-readable files for the
|
||||
[SPIR-V Registry](https://www.khronos.org/registry/spir-v/).
|
||||
This includes:
|
||||
|
||||
* Header files for various languages.
|
||||
* JSON files describing the grammar for the SPIR-V core instruction set
|
||||
and the extended instruction sets.
|
||||
* The XML registry file.
|
||||
* A tool to build the headers from the JSON grammar.
|
||||
|
||||
Headers are provided in the [include](include) directory, with up-to-date
|
||||
headers in the `unified1` subdirectory. Older headers are provided according to
|
||||
their version.
|
||||
|
||||
In contrast, the XML registry file has a linear history, so it is
|
||||
not tied to SPIR-V specification versions.
|
||||
|
||||
## How is this repository updated?
|
||||
|
||||
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.
|
||||
|
||||
Pull requests can be made to
|
||||
- request allocation of new enum ranges in the XML registry file
|
||||
- reserve specific tokens in the JSON grammar
|
||||
|
||||
## How to install the headers
|
||||
|
||||
```
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
cmake --build . --target install
|
||||
```
|
||||
|
||||
Then, for example, you will have `/usr/local/include/spirv/unified1/spirv.h`
|
||||
|
||||
If you want to install them somewhere else, then use
|
||||
`-DCMAKE_INSTALL_PREFIX=/other/path` on the first `cmake` command.
|
||||
|
||||
## Using the headers without installing
|
||||
|
||||
A CMake-based project can use the headers without installing, as follows:
|
||||
|
||||
1. Add an `add_subdirectory` directive to include this source tree.
|
||||
2. Use `${SPIRV-Headers_SOURCE_DIR}/include}` in a `target_include_directories`
|
||||
directive.
|
||||
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"
|
||||
```
|
||||
|
||||
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
|
||||
|
||||
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,
|
||||
and can be used to test a PR, or even to include the results in the PR.
|
||||
This is not required though.
|
||||
|
||||
The header-generation project is under the `tools/buildHeaders` directory.
|
||||
Use CMake to build the project, in a `build` subdirectory (under `tools/buildHeaders`).
|
||||
There is then a bash script at `bin/makeHeaders` that shows how to use the built
|
||||
header-generator binary to generate the headers from the JSON grammar.
|
||||
(Execute `bin/makeHeaders` from the `tools/buildHeaders` directory.)
|
||||
|
||||
Notes:
|
||||
- this generator is used in a broader context within Khronos to generate the specification,
|
||||
and that influences the languages used, for legacy reasons
|
||||
- the C++ structures built may similarly include more than strictly necessary, for the same reason
|
||||
|
||||
## FAQ
|
||||
|
||||
* *How are different versions published?*
|
||||
|
||||
The multiple versions of the headers have been simplified into a
|
||||
single `unified1` view. The JSON grammar has a "version" field saying
|
||||
what version things first showed up in.
|
||||
|
||||
* *How do you handle the evolution of extended instruction sets?*
|
||||
|
||||
Extended instruction sets evolve asynchronously from the core spec.
|
||||
Right now there is only a single version of both the GLSL and OpenCL
|
||||
headers. So we don't yet have a problematic example to resolve.
|
||||
|
||||
## License
|
||||
<a name="license"></a>
|
||||
```
|
||||
Copyright (c) 2015-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.
|
||||
```
|
||||
9
externals/sirit/externals/SPIRV-Headers/example/CMakeLists.txt
vendored
Executable file
9
externals/sirit/externals/SPIRV-Headers/example/CMakeLists.txt
vendored
Executable file
@@ -0,0 +1,9 @@
|
||||
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)
|
||||
42
externals/sirit/externals/SPIRV-Headers/example/example-1.1.cpp
vendored
Executable file
42
externals/sirit/externals/SPIRV-Headers/example/example-1.1.cpp
vendored
Executable file
@@ -0,0 +1,42 @@
|
||||
// Copyright (c) 2016 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.
|
||||
|
||||
// Use the SPIR-V 1.1 core instruction set, but with 1.0 versions
|
||||
// of the GLSL and OpenCL extended instruction sets.
|
||||
#include <spirv/1.0/GLSL.std.450.h>
|
||||
#include <spirv/1.0/OpenCL.std.h>
|
||||
#include <spirv/1.1/spirv.hpp>
|
||||
|
||||
namespace {
|
||||
|
||||
const GLSLstd450 kSin = GLSLstd450Sin;
|
||||
const OpenCLLIB::Entrypoints kNative_cos = OpenCLLIB::Native_cos;
|
||||
const spv::Op kNop = spv::OpNop;
|
||||
|
||||
// This instruction is new in SPIR-V 1.1.
|
||||
const spv::Op kNamedBarrierInit = spv::OpNamedBarrierInitialize;
|
||||
|
||||
} // anonymous namespace
|
||||
37
externals/sirit/externals/SPIRV-Headers/example/example.cpp
vendored
Executable file
37
externals/sirit/externals/SPIRV-Headers/example/example.cpp
vendored
Executable file
@@ -0,0 +1,37 @@
|
||||
// Copyright (c) 2016 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.
|
||||
|
||||
#include <spirv/1.0/GLSL.std.450.h>
|
||||
#include <spirv/1.0/OpenCL.std.h>
|
||||
#include <spirv/1.0/spirv.hpp>
|
||||
|
||||
namespace {
|
||||
|
||||
const GLSLstd450 kSin = GLSLstd450Sin;
|
||||
const OpenCLLIB::Entrypoints kNative_cos = OpenCLLIB::Native_cos;
|
||||
const spv::Op kNop = spv::OpNop;
|
||||
|
||||
} // anonymous namespace
|
||||
131
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/GLSL.std.450.h
vendored
Executable file
131
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/GLSL.std.450.h
vendored
Executable file
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
** Copyright (c) 2014-2016 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 GLSLstd450_H
|
||||
#define GLSLstd450_H
|
||||
|
||||
static const int GLSLstd450Version = 100;
|
||||
static const int GLSLstd450Revision = 3;
|
||||
|
||||
enum GLSLstd450 {
|
||||
GLSLstd450Bad = 0, // Don't use
|
||||
|
||||
GLSLstd450Round = 1,
|
||||
GLSLstd450RoundEven = 2,
|
||||
GLSLstd450Trunc = 3,
|
||||
GLSLstd450FAbs = 4,
|
||||
GLSLstd450SAbs = 5,
|
||||
GLSLstd450FSign = 6,
|
||||
GLSLstd450SSign = 7,
|
||||
GLSLstd450Floor = 8,
|
||||
GLSLstd450Ceil = 9,
|
||||
GLSLstd450Fract = 10,
|
||||
|
||||
GLSLstd450Radians = 11,
|
||||
GLSLstd450Degrees = 12,
|
||||
GLSLstd450Sin = 13,
|
||||
GLSLstd450Cos = 14,
|
||||
GLSLstd450Tan = 15,
|
||||
GLSLstd450Asin = 16,
|
||||
GLSLstd450Acos = 17,
|
||||
GLSLstd450Atan = 18,
|
||||
GLSLstd450Sinh = 19,
|
||||
GLSLstd450Cosh = 20,
|
||||
GLSLstd450Tanh = 21,
|
||||
GLSLstd450Asinh = 22,
|
||||
GLSLstd450Acosh = 23,
|
||||
GLSLstd450Atanh = 24,
|
||||
GLSLstd450Atan2 = 25,
|
||||
|
||||
GLSLstd450Pow = 26,
|
||||
GLSLstd450Exp = 27,
|
||||
GLSLstd450Log = 28,
|
||||
GLSLstd450Exp2 = 29,
|
||||
GLSLstd450Log2 = 30,
|
||||
GLSLstd450Sqrt = 31,
|
||||
GLSLstd450InverseSqrt = 32,
|
||||
|
||||
GLSLstd450Determinant = 33,
|
||||
GLSLstd450MatrixInverse = 34,
|
||||
|
||||
GLSLstd450Modf = 35, // second operand needs an OpVariable to write to
|
||||
GLSLstd450ModfStruct = 36, // no OpVariable operand
|
||||
GLSLstd450FMin = 37,
|
||||
GLSLstd450UMin = 38,
|
||||
GLSLstd450SMin = 39,
|
||||
GLSLstd450FMax = 40,
|
||||
GLSLstd450UMax = 41,
|
||||
GLSLstd450SMax = 42,
|
||||
GLSLstd450FClamp = 43,
|
||||
GLSLstd450UClamp = 44,
|
||||
GLSLstd450SClamp = 45,
|
||||
GLSLstd450FMix = 46,
|
||||
GLSLstd450IMix = 47, // Reserved
|
||||
GLSLstd450Step = 48,
|
||||
GLSLstd450SmoothStep = 49,
|
||||
|
||||
GLSLstd450Fma = 50,
|
||||
GLSLstd450Frexp = 51, // second operand needs an OpVariable to write to
|
||||
GLSLstd450FrexpStruct = 52, // no OpVariable operand
|
||||
GLSLstd450Ldexp = 53,
|
||||
|
||||
GLSLstd450PackSnorm4x8 = 54,
|
||||
GLSLstd450PackUnorm4x8 = 55,
|
||||
GLSLstd450PackSnorm2x16 = 56,
|
||||
GLSLstd450PackUnorm2x16 = 57,
|
||||
GLSLstd450PackHalf2x16 = 58,
|
||||
GLSLstd450PackDouble2x32 = 59,
|
||||
GLSLstd450UnpackSnorm2x16 = 60,
|
||||
GLSLstd450UnpackUnorm2x16 = 61,
|
||||
GLSLstd450UnpackHalf2x16 = 62,
|
||||
GLSLstd450UnpackSnorm4x8 = 63,
|
||||
GLSLstd450UnpackUnorm4x8 = 64,
|
||||
GLSLstd450UnpackDouble2x32 = 65,
|
||||
|
||||
GLSLstd450Length = 66,
|
||||
GLSLstd450Distance = 67,
|
||||
GLSLstd450Cross = 68,
|
||||
GLSLstd450Normalize = 69,
|
||||
GLSLstd450FaceForward = 70,
|
||||
GLSLstd450Reflect = 71,
|
||||
GLSLstd450Refract = 72,
|
||||
|
||||
GLSLstd450FindILsb = 73,
|
||||
GLSLstd450FindSMsb = 74,
|
||||
GLSLstd450FindUMsb = 75,
|
||||
|
||||
GLSLstd450InterpolateAtCentroid = 76,
|
||||
GLSLstd450InterpolateAtSample = 77,
|
||||
GLSLstd450InterpolateAtOffset = 78,
|
||||
|
||||
GLSLstd450NMin = 79,
|
||||
GLSLstd450NMax = 80,
|
||||
GLSLstd450NClamp = 81,
|
||||
|
||||
GLSLstd450Count
|
||||
};
|
||||
|
||||
#endif // #ifndef GLSLstd450_H
|
||||
210
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/OpenCL.std.h
vendored
Executable file
210
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/OpenCL.std.h
vendored
Executable file
@@ -0,0 +1,210 @@
|
||||
/*
|
||||
** Copyright (c) 2015-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.
|
||||
*/
|
||||
|
||||
namespace OpenCLLIB {
|
||||
|
||||
enum Entrypoints {
|
||||
|
||||
// Section 2.1: Math extended instructions
|
||||
Acos = 0,
|
||||
Acosh = 1,
|
||||
Acospi = 2,
|
||||
Asin = 3,
|
||||
Asinh = 4,
|
||||
Asinpi = 5,
|
||||
Atan = 6,
|
||||
Atan2 = 7,
|
||||
Atanh = 8,
|
||||
Atanpi = 9,
|
||||
Atan2pi = 10,
|
||||
Cbrt = 11,
|
||||
Ceil = 12,
|
||||
Copysign = 13,
|
||||
Cos = 14,
|
||||
Cosh = 15,
|
||||
Cospi = 16,
|
||||
Erfc = 17,
|
||||
Erf = 18,
|
||||
Exp = 19,
|
||||
Exp2 = 20,
|
||||
Exp10 = 21,
|
||||
Expm1 = 22,
|
||||
Fabs = 23,
|
||||
Fdim = 24,
|
||||
Floor = 25,
|
||||
Fma = 26,
|
||||
Fmax = 27,
|
||||
Fmin = 28,
|
||||
Fmod = 29,
|
||||
Fract = 30,
|
||||
Frexp = 31,
|
||||
Hypot = 32,
|
||||
Ilogb = 33,
|
||||
Ldexp = 34,
|
||||
Lgamma = 35,
|
||||
Lgamma_r = 36,
|
||||
Log = 37,
|
||||
Log2 = 38,
|
||||
Log10 = 39,
|
||||
Log1p = 40,
|
||||
Logb = 41,
|
||||
Mad = 42,
|
||||
Maxmag = 43,
|
||||
Minmag = 44,
|
||||
Modf = 45,
|
||||
Nan = 46,
|
||||
Nextafter = 47,
|
||||
Pow = 48,
|
||||
Pown = 49,
|
||||
Powr = 50,
|
||||
Remainder = 51,
|
||||
Remquo = 52,
|
||||
Rint = 53,
|
||||
Rootn = 54,
|
||||
Round = 55,
|
||||
Rsqrt = 56,
|
||||
Sin = 57,
|
||||
Sincos = 58,
|
||||
Sinh = 59,
|
||||
Sinpi = 60,
|
||||
Sqrt = 61,
|
||||
Tan = 62,
|
||||
Tanh = 63,
|
||||
Tanpi = 64,
|
||||
Tgamma = 65,
|
||||
Trunc = 66,
|
||||
Half_cos = 67,
|
||||
Half_divide = 68,
|
||||
Half_exp = 69,
|
||||
Half_exp2 = 70,
|
||||
Half_exp10 = 71,
|
||||
Half_log = 72,
|
||||
Half_log2 = 73,
|
||||
Half_log10 = 74,
|
||||
Half_powr = 75,
|
||||
Half_recip = 76,
|
||||
Half_rsqrt = 77,
|
||||
Half_sin = 78,
|
||||
Half_sqrt = 79,
|
||||
Half_tan = 80,
|
||||
Native_cos = 81,
|
||||
Native_divide = 82,
|
||||
Native_exp = 83,
|
||||
Native_exp2 = 84,
|
||||
Native_exp10 = 85,
|
||||
Native_log = 86,
|
||||
Native_log2 = 87,
|
||||
Native_log10 = 88,
|
||||
Native_powr = 89,
|
||||
Native_recip = 90,
|
||||
Native_rsqrt = 91,
|
||||
Native_sin = 92,
|
||||
Native_sqrt = 93,
|
||||
Native_tan = 94,
|
||||
|
||||
// Section 2.2: Integer instructions
|
||||
SAbs = 141,
|
||||
SAbs_diff = 142,
|
||||
SAdd_sat = 143,
|
||||
UAdd_sat = 144,
|
||||
SHadd = 145,
|
||||
UHadd = 146,
|
||||
SRhadd = 147,
|
||||
URhadd = 148,
|
||||
SClamp = 149,
|
||||
UClamp = 150,
|
||||
Clz = 151,
|
||||
Ctz = 152,
|
||||
SMad_hi = 153,
|
||||
UMad_sat = 154,
|
||||
SMad_sat = 155,
|
||||
SMax = 156,
|
||||
UMax = 157,
|
||||
SMin = 158,
|
||||
UMin = 159,
|
||||
SMul_hi = 160,
|
||||
Rotate = 161,
|
||||
SSub_sat = 162,
|
||||
USub_sat = 163,
|
||||
U_Upsample = 164,
|
||||
S_Upsample = 165,
|
||||
Popcount = 166,
|
||||
SMad24 = 167,
|
||||
UMad24 = 168,
|
||||
SMul24 = 169,
|
||||
UMul24 = 170,
|
||||
UAbs = 201,
|
||||
UAbs_diff = 202,
|
||||
UMul_hi = 203,
|
||||
UMad_hi = 204,
|
||||
|
||||
// Section 2.3: Common instructions
|
||||
FClamp = 95,
|
||||
Degrees = 96,
|
||||
FMax_common = 97,
|
||||
FMin_common = 98,
|
||||
Mix = 99,
|
||||
Radians = 100,
|
||||
Step = 101,
|
||||
Smoothstep = 102,
|
||||
Sign = 103,
|
||||
|
||||
// Section 2.4: Geometric instructions
|
||||
Cross = 104,
|
||||
Distance = 105,
|
||||
Length = 106,
|
||||
Normalize = 107,
|
||||
Fast_distance = 108,
|
||||
Fast_length = 109,
|
||||
Fast_normalize = 110,
|
||||
|
||||
// Section 2.5: Relational instructions
|
||||
Bitselect = 186,
|
||||
Select = 187,
|
||||
|
||||
// Section 2.6: Vector Data Load and Store instructions
|
||||
Vloadn = 171,
|
||||
Vstoren = 172,
|
||||
Vload_half = 173,
|
||||
Vload_halfn = 174,
|
||||
Vstore_half = 175,
|
||||
Vstore_half_r = 176,
|
||||
Vstore_halfn = 177,
|
||||
Vstore_halfn_r = 178,
|
||||
Vloada_halfn = 179,
|
||||
Vstorea_halfn = 180,
|
||||
Vstorea_halfn_r = 181,
|
||||
|
||||
// Section 2.7: Miscellaneous Vector instructions
|
||||
Shuffle = 182,
|
||||
Shuffle2 = 183,
|
||||
|
||||
// Section 2.8: Misc instructions
|
||||
Printf = 184,
|
||||
Prefetch = 185,
|
||||
};
|
||||
|
||||
} // end namespace OpenCLLIB
|
||||
642
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/extinst.glsl.std.450.grammar.json
vendored
Executable file
642
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/extinst.glsl.std.450.grammar.json
vendored
Executable file
@@ -0,0 +1,642 @@
|
||||
{
|
||||
"copyright" : [
|
||||
"Copyright (c) 2014-2016 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" : 2,
|
||||
"instructions" : [
|
||||
{
|
||||
"opname" : "Round",
|
||||
"opcode" : 1,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "RoundEven",
|
||||
"opcode" : 2,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Trunc",
|
||||
"opcode" : 3,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FAbs",
|
||||
"opcode" : 4,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SAbs",
|
||||
"opcode" : 5,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FSign",
|
||||
"opcode" : 6,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SSign",
|
||||
"opcode" : 7,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Floor",
|
||||
"opcode" : 8,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Ceil",
|
||||
"opcode" : 9,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Fract",
|
||||
"opcode" : 10,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Radians",
|
||||
"opcode" : 11,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'degrees'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Degrees",
|
||||
"opcode" : 12,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'radians'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Sin",
|
||||
"opcode" : 13,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Cos",
|
||||
"opcode" : 14,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Tan",
|
||||
"opcode" : 15,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Asin",
|
||||
"opcode" : 16,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Acos",
|
||||
"opcode" : 17,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Atan",
|
||||
"opcode" : 18,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'y_over_x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Sinh",
|
||||
"opcode" : 19,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Cosh",
|
||||
"opcode" : 20,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Tanh",
|
||||
"opcode" : 21,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Asinh",
|
||||
"opcode" : 22,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Acosh",
|
||||
"opcode" : 23,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Atanh",
|
||||
"opcode" : 24,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Atan2",
|
||||
"opcode" : 25,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'y'" },
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Pow",
|
||||
"opcode" : 26,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Exp",
|
||||
"opcode" : 27,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Log",
|
||||
"opcode" : 28,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Exp2",
|
||||
"opcode" : 29,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Log2",
|
||||
"opcode" : 30,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Sqrt",
|
||||
"opcode" : 31,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "InverseSqrt",
|
||||
"opcode" : 32,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Determinant",
|
||||
"opcode" : 33,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "MatrixInverse",
|
||||
"opcode" : 34,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Modf",
|
||||
"opcode" : 35,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'i'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "ModfStruct",
|
||||
"opcode" : 36,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FMin",
|
||||
"opcode" : 37,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UMin",
|
||||
"opcode" : 38,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SMin",
|
||||
"opcode" : 39,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FMax",
|
||||
"opcode" : 40,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UMax",
|
||||
"opcode" : 41,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SMax",
|
||||
"opcode" : 42,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FClamp",
|
||||
"opcode" : 43,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'minVal'" },
|
||||
{ "kind" : "IdRef", "name" : "'maxVal'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UClamp",
|
||||
"opcode" : 44,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'minVal'" },
|
||||
{ "kind" : "IdRef", "name" : "'maxVal'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SClamp",
|
||||
"opcode" : 45,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'minVal'" },
|
||||
{ "kind" : "IdRef", "name" : "'maxVal'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FMix",
|
||||
"opcode" : 46,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" },
|
||||
{ "kind" : "IdRef", "name" : "'a'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "IMix",
|
||||
"opcode" : 47,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" },
|
||||
{ "kind" : "IdRef", "name" : "'a'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Step",
|
||||
"opcode" : 48,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'edge'" },
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SmoothStep",
|
||||
"opcode" : 49,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'edge0'" },
|
||||
{ "kind" : "IdRef", "name" : "'edge1'" },
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Fma",
|
||||
"opcode" : 50,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'a'" },
|
||||
{ "kind" : "IdRef", "name" : "'b'" },
|
||||
{ "kind" : "IdRef", "name" : "'c'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Frexp",
|
||||
"opcode" : 51,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'exp'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FrexpStruct",
|
||||
"opcode" : 52,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Ldexp",
|
||||
"opcode" : 53,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'exp'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackSnorm4x8",
|
||||
"opcode" : 54,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackUnorm4x8",
|
||||
"opcode" : 55,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackSnorm2x16",
|
||||
"opcode" : 56,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackUnorm2x16",
|
||||
"opcode" : 57,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackHalf2x16",
|
||||
"opcode" : 58,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackDouble2x32",
|
||||
"opcode" : 59,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
],
|
||||
"capabilities" : [ "Float64" ]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackSnorm2x16",
|
||||
"opcode" : 60,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'p'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackUnorm2x16",
|
||||
"opcode" : 61,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'p'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackHalf2x16",
|
||||
"opcode" : 62,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackSnorm4x8",
|
||||
"opcode" : 63,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'p'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackUnorm4x8",
|
||||
"opcode" : 64,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'p'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackDouble2x32",
|
||||
"opcode" : 65,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
],
|
||||
"capabilities" : [ "Float64" ]
|
||||
},
|
||||
{
|
||||
"opname" : "Length",
|
||||
"opcode" : 66,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Distance",
|
||||
"opcode" : 67,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'p0'" },
|
||||
{ "kind" : "IdRef", "name" : "'p1'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Cross",
|
||||
"opcode" : 68,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Normalize",
|
||||
"opcode" : 69,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FaceForward",
|
||||
"opcode" : 70,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'N'" },
|
||||
{ "kind" : "IdRef", "name" : "'I'" },
|
||||
{ "kind" : "IdRef", "name" : "'Nref'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Reflect",
|
||||
"opcode" : 71,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'I'" },
|
||||
{ "kind" : "IdRef", "name" : "'N'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Refract",
|
||||
"opcode" : 72,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'I'" },
|
||||
{ "kind" : "IdRef", "name" : "'N'" },
|
||||
{ "kind" : "IdRef", "name" : "'eta'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FindILsb",
|
||||
"opcode" : 73,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'Value'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FindSMsb",
|
||||
"opcode" : 74,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'Value'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FindUMsb",
|
||||
"opcode" : 75,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'Value'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "InterpolateAtCentroid",
|
||||
"opcode" : 76,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'interpolant'" }
|
||||
],
|
||||
"capabilities" : [ "InterpolationFunction" ]
|
||||
},
|
||||
{
|
||||
"opname" : "InterpolateAtSample",
|
||||
"opcode" : 77,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'interpolant'" },
|
||||
{ "kind" : "IdRef", "name" : "'sample'" }
|
||||
],
|
||||
"capabilities" : [ "InterpolationFunction" ]
|
||||
},
|
||||
{
|
||||
"opname" : "InterpolateAtOffset",
|
||||
"opcode" : 78,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'interpolant'" },
|
||||
{ "kind" : "IdRef", "name" : "'offset'" }
|
||||
],
|
||||
"capabilities" : [ "InterpolationFunction" ]
|
||||
},
|
||||
{
|
||||
"opname" : "NMin",
|
||||
"opcode" : 79,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "NMax",
|
||||
"opcode" : 80,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "NClamp",
|
||||
"opcode" : 81,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'minVal'" },
|
||||
{ "kind" : "IdRef", "name" : "'maxVal'" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
1279
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/extinst.opencl.std.100.grammar.json
vendored
Executable file
1279
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/extinst.opencl.std.100.grammar.json
vendored
Executable file
File diff suppressed because it is too large
Load Diff
5775
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/spirv.core.grammar.json
vendored
Executable file
5775
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/spirv.core.grammar.json
vendored
Executable file
File diff suppressed because it is too large
Load Diff
993
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/spirv.h
vendored
Executable file
993
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/spirv.h
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 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']
|
||||
**
|
||||
** 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.
|
||||
*/
|
||||
|
||||
#ifndef spirv_H
|
||||
#define spirv_H
|
||||
|
||||
typedef unsigned int SpvId;
|
||||
|
||||
#define SPV_VERSION 0x10000
|
||||
#define SPV_REVISION 12
|
||||
|
||||
static const unsigned int SpvMagicNumber = 0x07230203;
|
||||
static const unsigned int SpvVersion = 0x00010000;
|
||||
static const unsigned int SpvRevision = 12;
|
||||
static const unsigned int SpvOpCodeMask = 0xffff;
|
||||
static const unsigned int SpvWordCountShift = 16;
|
||||
|
||||
typedef enum SpvSourceLanguage_ {
|
||||
SpvSourceLanguageUnknown = 0,
|
||||
SpvSourceLanguageESSL = 1,
|
||||
SpvSourceLanguageGLSL = 2,
|
||||
SpvSourceLanguageOpenCL_C = 3,
|
||||
SpvSourceLanguageOpenCL_CPP = 4,
|
||||
SpvSourceLanguageHLSL = 5,
|
||||
SpvSourceLanguageMax = 0x7fffffff,
|
||||
} SpvSourceLanguage;
|
||||
|
||||
typedef enum SpvExecutionModel_ {
|
||||
SpvExecutionModelVertex = 0,
|
||||
SpvExecutionModelTessellationControl = 1,
|
||||
SpvExecutionModelTessellationEvaluation = 2,
|
||||
SpvExecutionModelGeometry = 3,
|
||||
SpvExecutionModelFragment = 4,
|
||||
SpvExecutionModelGLCompute = 5,
|
||||
SpvExecutionModelKernel = 6,
|
||||
SpvExecutionModelMax = 0x7fffffff,
|
||||
} SpvExecutionModel;
|
||||
|
||||
typedef enum SpvAddressingModel_ {
|
||||
SpvAddressingModelLogical = 0,
|
||||
SpvAddressingModelPhysical32 = 1,
|
||||
SpvAddressingModelPhysical64 = 2,
|
||||
SpvAddressingModelMax = 0x7fffffff,
|
||||
} SpvAddressingModel;
|
||||
|
||||
typedef enum SpvMemoryModel_ {
|
||||
SpvMemoryModelSimple = 0,
|
||||
SpvMemoryModelGLSL450 = 1,
|
||||
SpvMemoryModelOpenCL = 2,
|
||||
SpvMemoryModelMax = 0x7fffffff,
|
||||
} SpvMemoryModel;
|
||||
|
||||
typedef enum SpvExecutionMode_ {
|
||||
SpvExecutionModeInvocations = 0,
|
||||
SpvExecutionModeSpacingEqual = 1,
|
||||
SpvExecutionModeSpacingFractionalEven = 2,
|
||||
SpvExecutionModeSpacingFractionalOdd = 3,
|
||||
SpvExecutionModeVertexOrderCw = 4,
|
||||
SpvExecutionModeVertexOrderCcw = 5,
|
||||
SpvExecutionModePixelCenterInteger = 6,
|
||||
SpvExecutionModeOriginUpperLeft = 7,
|
||||
SpvExecutionModeOriginLowerLeft = 8,
|
||||
SpvExecutionModeEarlyFragmentTests = 9,
|
||||
SpvExecutionModePointMode = 10,
|
||||
SpvExecutionModeXfb = 11,
|
||||
SpvExecutionModeDepthReplacing = 12,
|
||||
SpvExecutionModeDepthGreater = 14,
|
||||
SpvExecutionModeDepthLess = 15,
|
||||
SpvExecutionModeDepthUnchanged = 16,
|
||||
SpvExecutionModeLocalSize = 17,
|
||||
SpvExecutionModeLocalSizeHint = 18,
|
||||
SpvExecutionModeInputPoints = 19,
|
||||
SpvExecutionModeInputLines = 20,
|
||||
SpvExecutionModeInputLinesAdjacency = 21,
|
||||
SpvExecutionModeTriangles = 22,
|
||||
SpvExecutionModeInputTrianglesAdjacency = 23,
|
||||
SpvExecutionModeQuads = 24,
|
||||
SpvExecutionModeIsolines = 25,
|
||||
SpvExecutionModeOutputVertices = 26,
|
||||
SpvExecutionModeOutputPoints = 27,
|
||||
SpvExecutionModeOutputLineStrip = 28,
|
||||
SpvExecutionModeOutputTriangleStrip = 29,
|
||||
SpvExecutionModeVecTypeHint = 30,
|
||||
SpvExecutionModeContractionOff = 31,
|
||||
SpvExecutionModePostDepthCoverage = 4446,
|
||||
SpvExecutionModeStencilRefReplacingEXT = 5027,
|
||||
SpvExecutionModeMax = 0x7fffffff,
|
||||
} SpvExecutionMode;
|
||||
|
||||
typedef enum SpvStorageClass_ {
|
||||
SpvStorageClassUniformConstant = 0,
|
||||
SpvStorageClassInput = 1,
|
||||
SpvStorageClassUniform = 2,
|
||||
SpvStorageClassOutput = 3,
|
||||
SpvStorageClassWorkgroup = 4,
|
||||
SpvStorageClassCrossWorkgroup = 5,
|
||||
SpvStorageClassPrivate = 6,
|
||||
SpvStorageClassFunction = 7,
|
||||
SpvStorageClassGeneric = 8,
|
||||
SpvStorageClassPushConstant = 9,
|
||||
SpvStorageClassAtomicCounter = 10,
|
||||
SpvStorageClassImage = 11,
|
||||
SpvStorageClassStorageBuffer = 12,
|
||||
SpvStorageClassMax = 0x7fffffff,
|
||||
} SpvStorageClass;
|
||||
|
||||
typedef enum SpvDim_ {
|
||||
SpvDim1D = 0,
|
||||
SpvDim2D = 1,
|
||||
SpvDim3D = 2,
|
||||
SpvDimCube = 3,
|
||||
SpvDimRect = 4,
|
||||
SpvDimBuffer = 5,
|
||||
SpvDimSubpassData = 6,
|
||||
SpvDimMax = 0x7fffffff,
|
||||
} SpvDim;
|
||||
|
||||
typedef enum SpvSamplerAddressingMode_ {
|
||||
SpvSamplerAddressingModeNone = 0,
|
||||
SpvSamplerAddressingModeClampToEdge = 1,
|
||||
SpvSamplerAddressingModeClamp = 2,
|
||||
SpvSamplerAddressingModeRepeat = 3,
|
||||
SpvSamplerAddressingModeRepeatMirrored = 4,
|
||||
SpvSamplerAddressingModeMax = 0x7fffffff,
|
||||
} SpvSamplerAddressingMode;
|
||||
|
||||
typedef enum SpvSamplerFilterMode_ {
|
||||
SpvSamplerFilterModeNearest = 0,
|
||||
SpvSamplerFilterModeLinear = 1,
|
||||
SpvSamplerFilterModeMax = 0x7fffffff,
|
||||
} SpvSamplerFilterMode;
|
||||
|
||||
typedef enum SpvImageFormat_ {
|
||||
SpvImageFormatUnknown = 0,
|
||||
SpvImageFormatRgba32f = 1,
|
||||
SpvImageFormatRgba16f = 2,
|
||||
SpvImageFormatR32f = 3,
|
||||
SpvImageFormatRgba8 = 4,
|
||||
SpvImageFormatRgba8Snorm = 5,
|
||||
SpvImageFormatRg32f = 6,
|
||||
SpvImageFormatRg16f = 7,
|
||||
SpvImageFormatR11fG11fB10f = 8,
|
||||
SpvImageFormatR16f = 9,
|
||||
SpvImageFormatRgba16 = 10,
|
||||
SpvImageFormatRgb10A2 = 11,
|
||||
SpvImageFormatRg16 = 12,
|
||||
SpvImageFormatRg8 = 13,
|
||||
SpvImageFormatR16 = 14,
|
||||
SpvImageFormatR8 = 15,
|
||||
SpvImageFormatRgba16Snorm = 16,
|
||||
SpvImageFormatRg16Snorm = 17,
|
||||
SpvImageFormatRg8Snorm = 18,
|
||||
SpvImageFormatR16Snorm = 19,
|
||||
SpvImageFormatR8Snorm = 20,
|
||||
SpvImageFormatRgba32i = 21,
|
||||
SpvImageFormatRgba16i = 22,
|
||||
SpvImageFormatRgba8i = 23,
|
||||
SpvImageFormatR32i = 24,
|
||||
SpvImageFormatRg32i = 25,
|
||||
SpvImageFormatRg16i = 26,
|
||||
SpvImageFormatRg8i = 27,
|
||||
SpvImageFormatR16i = 28,
|
||||
SpvImageFormatR8i = 29,
|
||||
SpvImageFormatRgba32ui = 30,
|
||||
SpvImageFormatRgba16ui = 31,
|
||||
SpvImageFormatRgba8ui = 32,
|
||||
SpvImageFormatR32ui = 33,
|
||||
SpvImageFormatRgb10a2ui = 34,
|
||||
SpvImageFormatRg32ui = 35,
|
||||
SpvImageFormatRg16ui = 36,
|
||||
SpvImageFormatRg8ui = 37,
|
||||
SpvImageFormatR16ui = 38,
|
||||
SpvImageFormatR8ui = 39,
|
||||
SpvImageFormatMax = 0x7fffffff,
|
||||
} SpvImageFormat;
|
||||
|
||||
typedef enum SpvImageChannelOrder_ {
|
||||
SpvImageChannelOrderR = 0,
|
||||
SpvImageChannelOrderA = 1,
|
||||
SpvImageChannelOrderRG = 2,
|
||||
SpvImageChannelOrderRA = 3,
|
||||
SpvImageChannelOrderRGB = 4,
|
||||
SpvImageChannelOrderRGBA = 5,
|
||||
SpvImageChannelOrderBGRA = 6,
|
||||
SpvImageChannelOrderARGB = 7,
|
||||
SpvImageChannelOrderIntensity = 8,
|
||||
SpvImageChannelOrderLuminance = 9,
|
||||
SpvImageChannelOrderRx = 10,
|
||||
SpvImageChannelOrderRGx = 11,
|
||||
SpvImageChannelOrderRGBx = 12,
|
||||
SpvImageChannelOrderDepth = 13,
|
||||
SpvImageChannelOrderDepthStencil = 14,
|
||||
SpvImageChannelOrdersRGB = 15,
|
||||
SpvImageChannelOrdersRGBx = 16,
|
||||
SpvImageChannelOrdersRGBA = 17,
|
||||
SpvImageChannelOrdersBGRA = 18,
|
||||
SpvImageChannelOrderABGR = 19,
|
||||
SpvImageChannelOrderMax = 0x7fffffff,
|
||||
} SpvImageChannelOrder;
|
||||
|
||||
typedef enum SpvImageChannelDataType_ {
|
||||
SpvImageChannelDataTypeSnormInt8 = 0,
|
||||
SpvImageChannelDataTypeSnormInt16 = 1,
|
||||
SpvImageChannelDataTypeUnormInt8 = 2,
|
||||
SpvImageChannelDataTypeUnormInt16 = 3,
|
||||
SpvImageChannelDataTypeUnormShort565 = 4,
|
||||
SpvImageChannelDataTypeUnormShort555 = 5,
|
||||
SpvImageChannelDataTypeUnormInt101010 = 6,
|
||||
SpvImageChannelDataTypeSignedInt8 = 7,
|
||||
SpvImageChannelDataTypeSignedInt16 = 8,
|
||||
SpvImageChannelDataTypeSignedInt32 = 9,
|
||||
SpvImageChannelDataTypeUnsignedInt8 = 10,
|
||||
SpvImageChannelDataTypeUnsignedInt16 = 11,
|
||||
SpvImageChannelDataTypeUnsignedInt32 = 12,
|
||||
SpvImageChannelDataTypeHalfFloat = 13,
|
||||
SpvImageChannelDataTypeFloat = 14,
|
||||
SpvImageChannelDataTypeUnormInt24 = 15,
|
||||
SpvImageChannelDataTypeUnormInt101010_2 = 16,
|
||||
SpvImageChannelDataTypeMax = 0x7fffffff,
|
||||
} SpvImageChannelDataType;
|
||||
|
||||
typedef enum SpvImageOperandsShift_ {
|
||||
SpvImageOperandsBiasShift = 0,
|
||||
SpvImageOperandsLodShift = 1,
|
||||
SpvImageOperandsGradShift = 2,
|
||||
SpvImageOperandsConstOffsetShift = 3,
|
||||
SpvImageOperandsOffsetShift = 4,
|
||||
SpvImageOperandsConstOffsetsShift = 5,
|
||||
SpvImageOperandsSampleShift = 6,
|
||||
SpvImageOperandsMinLodShift = 7,
|
||||
SpvImageOperandsMax = 0x7fffffff,
|
||||
} SpvImageOperandsShift;
|
||||
|
||||
typedef enum SpvImageOperandsMask_ {
|
||||
SpvImageOperandsMaskNone = 0,
|
||||
SpvImageOperandsBiasMask = 0x00000001,
|
||||
SpvImageOperandsLodMask = 0x00000002,
|
||||
SpvImageOperandsGradMask = 0x00000004,
|
||||
SpvImageOperandsConstOffsetMask = 0x00000008,
|
||||
SpvImageOperandsOffsetMask = 0x00000010,
|
||||
SpvImageOperandsConstOffsetsMask = 0x00000020,
|
||||
SpvImageOperandsSampleMask = 0x00000040,
|
||||
SpvImageOperandsMinLodMask = 0x00000080,
|
||||
} SpvImageOperandsMask;
|
||||
|
||||
typedef enum SpvFPFastMathModeShift_ {
|
||||
SpvFPFastMathModeNotNaNShift = 0,
|
||||
SpvFPFastMathModeNotInfShift = 1,
|
||||
SpvFPFastMathModeNSZShift = 2,
|
||||
SpvFPFastMathModeAllowRecipShift = 3,
|
||||
SpvFPFastMathModeFastShift = 4,
|
||||
SpvFPFastMathModeMax = 0x7fffffff,
|
||||
} SpvFPFastMathModeShift;
|
||||
|
||||
typedef enum SpvFPFastMathModeMask_ {
|
||||
SpvFPFastMathModeMaskNone = 0,
|
||||
SpvFPFastMathModeNotNaNMask = 0x00000001,
|
||||
SpvFPFastMathModeNotInfMask = 0x00000002,
|
||||
SpvFPFastMathModeNSZMask = 0x00000004,
|
||||
SpvFPFastMathModeAllowRecipMask = 0x00000008,
|
||||
SpvFPFastMathModeFastMask = 0x00000010,
|
||||
} SpvFPFastMathModeMask;
|
||||
|
||||
typedef enum SpvFPRoundingMode_ {
|
||||
SpvFPRoundingModeRTE = 0,
|
||||
SpvFPRoundingModeRTZ = 1,
|
||||
SpvFPRoundingModeRTP = 2,
|
||||
SpvFPRoundingModeRTN = 3,
|
||||
SpvFPRoundingModeMax = 0x7fffffff,
|
||||
} SpvFPRoundingMode;
|
||||
|
||||
typedef enum SpvLinkageType_ {
|
||||
SpvLinkageTypeExport = 0,
|
||||
SpvLinkageTypeImport = 1,
|
||||
SpvLinkageTypeMax = 0x7fffffff,
|
||||
} SpvLinkageType;
|
||||
|
||||
typedef enum SpvAccessQualifier_ {
|
||||
SpvAccessQualifierReadOnly = 0,
|
||||
SpvAccessQualifierWriteOnly = 1,
|
||||
SpvAccessQualifierReadWrite = 2,
|
||||
SpvAccessQualifierMax = 0x7fffffff,
|
||||
} SpvAccessQualifier;
|
||||
|
||||
typedef enum SpvFunctionParameterAttribute_ {
|
||||
SpvFunctionParameterAttributeZext = 0,
|
||||
SpvFunctionParameterAttributeSext = 1,
|
||||
SpvFunctionParameterAttributeByVal = 2,
|
||||
SpvFunctionParameterAttributeSret = 3,
|
||||
SpvFunctionParameterAttributeNoAlias = 4,
|
||||
SpvFunctionParameterAttributeNoCapture = 5,
|
||||
SpvFunctionParameterAttributeNoWrite = 6,
|
||||
SpvFunctionParameterAttributeNoReadWrite = 7,
|
||||
SpvFunctionParameterAttributeMax = 0x7fffffff,
|
||||
} SpvFunctionParameterAttribute;
|
||||
|
||||
typedef enum SpvDecoration_ {
|
||||
SpvDecorationRelaxedPrecision = 0,
|
||||
SpvDecorationSpecId = 1,
|
||||
SpvDecorationBlock = 2,
|
||||
SpvDecorationBufferBlock = 3,
|
||||
SpvDecorationRowMajor = 4,
|
||||
SpvDecorationColMajor = 5,
|
||||
SpvDecorationArrayStride = 6,
|
||||
SpvDecorationMatrixStride = 7,
|
||||
SpvDecorationGLSLShared = 8,
|
||||
SpvDecorationGLSLPacked = 9,
|
||||
SpvDecorationCPacked = 10,
|
||||
SpvDecorationBuiltIn = 11,
|
||||
SpvDecorationNoPerspective = 13,
|
||||
SpvDecorationFlat = 14,
|
||||
SpvDecorationPatch = 15,
|
||||
SpvDecorationCentroid = 16,
|
||||
SpvDecorationSample = 17,
|
||||
SpvDecorationInvariant = 18,
|
||||
SpvDecorationRestrict = 19,
|
||||
SpvDecorationAliased = 20,
|
||||
SpvDecorationVolatile = 21,
|
||||
SpvDecorationConstant = 22,
|
||||
SpvDecorationCoherent = 23,
|
||||
SpvDecorationNonWritable = 24,
|
||||
SpvDecorationNonReadable = 25,
|
||||
SpvDecorationUniform = 26,
|
||||
SpvDecorationSaturatedConversion = 28,
|
||||
SpvDecorationStream = 29,
|
||||
SpvDecorationLocation = 30,
|
||||
SpvDecorationComponent = 31,
|
||||
SpvDecorationIndex = 32,
|
||||
SpvDecorationBinding = 33,
|
||||
SpvDecorationDescriptorSet = 34,
|
||||
SpvDecorationOffset = 35,
|
||||
SpvDecorationXfbBuffer = 36,
|
||||
SpvDecorationXfbStride = 37,
|
||||
SpvDecorationFuncParamAttr = 38,
|
||||
SpvDecorationFPRoundingMode = 39,
|
||||
SpvDecorationFPFastMathMode = 40,
|
||||
SpvDecorationLinkageAttributes = 41,
|
||||
SpvDecorationNoContraction = 42,
|
||||
SpvDecorationInputAttachmentIndex = 43,
|
||||
SpvDecorationAlignment = 44,
|
||||
SpvDecorationExplicitInterpAMD = 4999,
|
||||
SpvDecorationOverrideCoverageNV = 5248,
|
||||
SpvDecorationPassthroughNV = 5250,
|
||||
SpvDecorationViewportRelativeNV = 5252,
|
||||
SpvDecorationSecondaryViewportRelativeNV = 5256,
|
||||
SpvDecorationHlslCounterBufferGOOGLE = 5634,
|
||||
SpvDecorationHlslSemanticGOOGLE = 5635,
|
||||
SpvDecorationMax = 0x7fffffff,
|
||||
} SpvDecoration;
|
||||
|
||||
typedef enum SpvBuiltIn_ {
|
||||
SpvBuiltInPosition = 0,
|
||||
SpvBuiltInPointSize = 1,
|
||||
SpvBuiltInClipDistance = 3,
|
||||
SpvBuiltInCullDistance = 4,
|
||||
SpvBuiltInVertexId = 5,
|
||||
SpvBuiltInInstanceId = 6,
|
||||
SpvBuiltInPrimitiveId = 7,
|
||||
SpvBuiltInInvocationId = 8,
|
||||
SpvBuiltInLayer = 9,
|
||||
SpvBuiltInViewportIndex = 10,
|
||||
SpvBuiltInTessLevelOuter = 11,
|
||||
SpvBuiltInTessLevelInner = 12,
|
||||
SpvBuiltInTessCoord = 13,
|
||||
SpvBuiltInPatchVertices = 14,
|
||||
SpvBuiltInFragCoord = 15,
|
||||
SpvBuiltInPointCoord = 16,
|
||||
SpvBuiltInFrontFacing = 17,
|
||||
SpvBuiltInSampleId = 18,
|
||||
SpvBuiltInSamplePosition = 19,
|
||||
SpvBuiltInSampleMask = 20,
|
||||
SpvBuiltInFragDepth = 22,
|
||||
SpvBuiltInHelperInvocation = 23,
|
||||
SpvBuiltInNumWorkgroups = 24,
|
||||
SpvBuiltInWorkgroupSize = 25,
|
||||
SpvBuiltInWorkgroupId = 26,
|
||||
SpvBuiltInLocalInvocationId = 27,
|
||||
SpvBuiltInGlobalInvocationId = 28,
|
||||
SpvBuiltInLocalInvocationIndex = 29,
|
||||
SpvBuiltInWorkDim = 30,
|
||||
SpvBuiltInGlobalSize = 31,
|
||||
SpvBuiltInEnqueuedWorkgroupSize = 32,
|
||||
SpvBuiltInGlobalOffset = 33,
|
||||
SpvBuiltInGlobalLinearId = 34,
|
||||
SpvBuiltInSubgroupSize = 36,
|
||||
SpvBuiltInSubgroupMaxSize = 37,
|
||||
SpvBuiltInNumSubgroups = 38,
|
||||
SpvBuiltInNumEnqueuedSubgroups = 39,
|
||||
SpvBuiltInSubgroupId = 40,
|
||||
SpvBuiltInSubgroupLocalInvocationId = 41,
|
||||
SpvBuiltInVertexIndex = 42,
|
||||
SpvBuiltInInstanceIndex = 43,
|
||||
SpvBuiltInSubgroupEqMaskKHR = 4416,
|
||||
SpvBuiltInSubgroupGeMaskKHR = 4417,
|
||||
SpvBuiltInSubgroupGtMaskKHR = 4418,
|
||||
SpvBuiltInSubgroupLeMaskKHR = 4419,
|
||||
SpvBuiltInSubgroupLtMaskKHR = 4420,
|
||||
SpvBuiltInBaseVertex = 4424,
|
||||
SpvBuiltInBaseInstance = 4425,
|
||||
SpvBuiltInDrawIndex = 4426,
|
||||
SpvBuiltInDeviceIndex = 4438,
|
||||
SpvBuiltInViewIndex = 4440,
|
||||
SpvBuiltInBaryCoordNoPerspAMD = 4992,
|
||||
SpvBuiltInBaryCoordNoPerspCentroidAMD = 4993,
|
||||
SpvBuiltInBaryCoordNoPerspSampleAMD = 4994,
|
||||
SpvBuiltInBaryCoordSmoothAMD = 4995,
|
||||
SpvBuiltInBaryCoordSmoothCentroidAMD = 4996,
|
||||
SpvBuiltInBaryCoordSmoothSampleAMD = 4997,
|
||||
SpvBuiltInBaryCoordPullModelAMD = 4998,
|
||||
SpvBuiltInFragStencilRefEXT = 5014,
|
||||
SpvBuiltInViewportMaskNV = 5253,
|
||||
SpvBuiltInSecondaryPositionNV = 5257,
|
||||
SpvBuiltInSecondaryViewportMaskNV = 5258,
|
||||
SpvBuiltInPositionPerViewNV = 5261,
|
||||
SpvBuiltInViewportMaskPerViewNV = 5262,
|
||||
SpvBuiltInMax = 0x7fffffff,
|
||||
} SpvBuiltIn;
|
||||
|
||||
typedef enum SpvSelectionControlShift_ {
|
||||
SpvSelectionControlFlattenShift = 0,
|
||||
SpvSelectionControlDontFlattenShift = 1,
|
||||
SpvSelectionControlMax = 0x7fffffff,
|
||||
} SpvSelectionControlShift;
|
||||
|
||||
typedef enum SpvSelectionControlMask_ {
|
||||
SpvSelectionControlMaskNone = 0,
|
||||
SpvSelectionControlFlattenMask = 0x00000001,
|
||||
SpvSelectionControlDontFlattenMask = 0x00000002,
|
||||
} SpvSelectionControlMask;
|
||||
|
||||
typedef enum SpvLoopControlShift_ {
|
||||
SpvLoopControlUnrollShift = 0,
|
||||
SpvLoopControlDontUnrollShift = 1,
|
||||
SpvLoopControlMax = 0x7fffffff,
|
||||
} SpvLoopControlShift;
|
||||
|
||||
typedef enum SpvLoopControlMask_ {
|
||||
SpvLoopControlMaskNone = 0,
|
||||
SpvLoopControlUnrollMask = 0x00000001,
|
||||
SpvLoopControlDontUnrollMask = 0x00000002,
|
||||
} SpvLoopControlMask;
|
||||
|
||||
typedef enum SpvFunctionControlShift_ {
|
||||
SpvFunctionControlInlineShift = 0,
|
||||
SpvFunctionControlDontInlineShift = 1,
|
||||
SpvFunctionControlPureShift = 2,
|
||||
SpvFunctionControlConstShift = 3,
|
||||
SpvFunctionControlMax = 0x7fffffff,
|
||||
} SpvFunctionControlShift;
|
||||
|
||||
typedef enum SpvFunctionControlMask_ {
|
||||
SpvFunctionControlMaskNone = 0,
|
||||
SpvFunctionControlInlineMask = 0x00000001,
|
||||
SpvFunctionControlDontInlineMask = 0x00000002,
|
||||
SpvFunctionControlPureMask = 0x00000004,
|
||||
SpvFunctionControlConstMask = 0x00000008,
|
||||
} SpvFunctionControlMask;
|
||||
|
||||
typedef enum SpvMemorySemanticsShift_ {
|
||||
SpvMemorySemanticsAcquireShift = 1,
|
||||
SpvMemorySemanticsReleaseShift = 2,
|
||||
SpvMemorySemanticsAcquireReleaseShift = 3,
|
||||
SpvMemorySemanticsSequentiallyConsistentShift = 4,
|
||||
SpvMemorySemanticsUniformMemoryShift = 6,
|
||||
SpvMemorySemanticsSubgroupMemoryShift = 7,
|
||||
SpvMemorySemanticsWorkgroupMemoryShift = 8,
|
||||
SpvMemorySemanticsCrossWorkgroupMemoryShift = 9,
|
||||
SpvMemorySemanticsAtomicCounterMemoryShift = 10,
|
||||
SpvMemorySemanticsImageMemoryShift = 11,
|
||||
SpvMemorySemanticsMax = 0x7fffffff,
|
||||
} SpvMemorySemanticsShift;
|
||||
|
||||
typedef enum SpvMemorySemanticsMask_ {
|
||||
SpvMemorySemanticsMaskNone = 0,
|
||||
SpvMemorySemanticsAcquireMask = 0x00000002,
|
||||
SpvMemorySemanticsReleaseMask = 0x00000004,
|
||||
SpvMemorySemanticsAcquireReleaseMask = 0x00000008,
|
||||
SpvMemorySemanticsSequentiallyConsistentMask = 0x00000010,
|
||||
SpvMemorySemanticsUniformMemoryMask = 0x00000040,
|
||||
SpvMemorySemanticsSubgroupMemoryMask = 0x00000080,
|
||||
SpvMemorySemanticsWorkgroupMemoryMask = 0x00000100,
|
||||
SpvMemorySemanticsCrossWorkgroupMemoryMask = 0x00000200,
|
||||
SpvMemorySemanticsAtomicCounterMemoryMask = 0x00000400,
|
||||
SpvMemorySemanticsImageMemoryMask = 0x00000800,
|
||||
} SpvMemorySemanticsMask;
|
||||
|
||||
typedef enum SpvMemoryAccessShift_ {
|
||||
SpvMemoryAccessVolatileShift = 0,
|
||||
SpvMemoryAccessAlignedShift = 1,
|
||||
SpvMemoryAccessNontemporalShift = 2,
|
||||
SpvMemoryAccessMax = 0x7fffffff,
|
||||
} SpvMemoryAccessShift;
|
||||
|
||||
typedef enum SpvMemoryAccessMask_ {
|
||||
SpvMemoryAccessMaskNone = 0,
|
||||
SpvMemoryAccessVolatileMask = 0x00000001,
|
||||
SpvMemoryAccessAlignedMask = 0x00000002,
|
||||
SpvMemoryAccessNontemporalMask = 0x00000004,
|
||||
} SpvMemoryAccessMask;
|
||||
|
||||
typedef enum SpvScope_ {
|
||||
SpvScopeCrossDevice = 0,
|
||||
SpvScopeDevice = 1,
|
||||
SpvScopeWorkgroup = 2,
|
||||
SpvScopeSubgroup = 3,
|
||||
SpvScopeInvocation = 4,
|
||||
SpvScopeMax = 0x7fffffff,
|
||||
} SpvScope;
|
||||
|
||||
typedef enum SpvGroupOperation_ {
|
||||
SpvGroupOperationReduce = 0,
|
||||
SpvGroupOperationInclusiveScan = 1,
|
||||
SpvGroupOperationExclusiveScan = 2,
|
||||
SpvGroupOperationMax = 0x7fffffff,
|
||||
} SpvGroupOperation;
|
||||
|
||||
typedef enum SpvKernelEnqueueFlags_ {
|
||||
SpvKernelEnqueueFlagsNoWait = 0,
|
||||
SpvKernelEnqueueFlagsWaitKernel = 1,
|
||||
SpvKernelEnqueueFlagsWaitWorkGroup = 2,
|
||||
SpvKernelEnqueueFlagsMax = 0x7fffffff,
|
||||
} SpvKernelEnqueueFlags;
|
||||
|
||||
typedef enum SpvKernelProfilingInfoShift_ {
|
||||
SpvKernelProfilingInfoCmdExecTimeShift = 0,
|
||||
SpvKernelProfilingInfoMax = 0x7fffffff,
|
||||
} SpvKernelProfilingInfoShift;
|
||||
|
||||
typedef enum SpvKernelProfilingInfoMask_ {
|
||||
SpvKernelProfilingInfoMaskNone = 0,
|
||||
SpvKernelProfilingInfoCmdExecTimeMask = 0x00000001,
|
||||
} SpvKernelProfilingInfoMask;
|
||||
|
||||
typedef enum SpvCapability_ {
|
||||
SpvCapabilityMatrix = 0,
|
||||
SpvCapabilityShader = 1,
|
||||
SpvCapabilityGeometry = 2,
|
||||
SpvCapabilityTessellation = 3,
|
||||
SpvCapabilityAddresses = 4,
|
||||
SpvCapabilityLinkage = 5,
|
||||
SpvCapabilityKernel = 6,
|
||||
SpvCapabilityVector16 = 7,
|
||||
SpvCapabilityFloat16Buffer = 8,
|
||||
SpvCapabilityFloat16 = 9,
|
||||
SpvCapabilityFloat64 = 10,
|
||||
SpvCapabilityInt64 = 11,
|
||||
SpvCapabilityInt64Atomics = 12,
|
||||
SpvCapabilityImageBasic = 13,
|
||||
SpvCapabilityImageReadWrite = 14,
|
||||
SpvCapabilityImageMipmap = 15,
|
||||
SpvCapabilityPipes = 17,
|
||||
SpvCapabilityGroups = 18,
|
||||
SpvCapabilityDeviceEnqueue = 19,
|
||||
SpvCapabilityLiteralSampler = 20,
|
||||
SpvCapabilityAtomicStorage = 21,
|
||||
SpvCapabilityInt16 = 22,
|
||||
SpvCapabilityTessellationPointSize = 23,
|
||||
SpvCapabilityGeometryPointSize = 24,
|
||||
SpvCapabilityImageGatherExtended = 25,
|
||||
SpvCapabilityStorageImageMultisample = 27,
|
||||
SpvCapabilityUniformBufferArrayDynamicIndexing = 28,
|
||||
SpvCapabilitySampledImageArrayDynamicIndexing = 29,
|
||||
SpvCapabilityStorageBufferArrayDynamicIndexing = 30,
|
||||
SpvCapabilityStorageImageArrayDynamicIndexing = 31,
|
||||
SpvCapabilityClipDistance = 32,
|
||||
SpvCapabilityCullDistance = 33,
|
||||
SpvCapabilityImageCubeArray = 34,
|
||||
SpvCapabilitySampleRateShading = 35,
|
||||
SpvCapabilityImageRect = 36,
|
||||
SpvCapabilitySampledRect = 37,
|
||||
SpvCapabilityGenericPointer = 38,
|
||||
SpvCapabilityInt8 = 39,
|
||||
SpvCapabilityInputAttachment = 40,
|
||||
SpvCapabilitySparseResidency = 41,
|
||||
SpvCapabilityMinLod = 42,
|
||||
SpvCapabilitySampled1D = 43,
|
||||
SpvCapabilityImage1D = 44,
|
||||
SpvCapabilitySampledCubeArray = 45,
|
||||
SpvCapabilitySampledBuffer = 46,
|
||||
SpvCapabilityImageBuffer = 47,
|
||||
SpvCapabilityImageMSArray = 48,
|
||||
SpvCapabilityStorageImageExtendedFormats = 49,
|
||||
SpvCapabilityImageQuery = 50,
|
||||
SpvCapabilityDerivativeControl = 51,
|
||||
SpvCapabilityInterpolationFunction = 52,
|
||||
SpvCapabilityTransformFeedback = 53,
|
||||
SpvCapabilityGeometryStreams = 54,
|
||||
SpvCapabilityStorageImageReadWithoutFormat = 55,
|
||||
SpvCapabilityStorageImageWriteWithoutFormat = 56,
|
||||
SpvCapabilityMultiViewport = 57,
|
||||
SpvCapabilitySubgroupBallotKHR = 4423,
|
||||
SpvCapabilityDrawParameters = 4427,
|
||||
SpvCapabilitySubgroupVoteKHR = 4431,
|
||||
SpvCapabilityStorageBuffer16BitAccess = 4433,
|
||||
SpvCapabilityStorageUniformBufferBlock16 = 4433,
|
||||
SpvCapabilityStorageUniform16 = 4434,
|
||||
SpvCapabilityUniformAndStorageBuffer16BitAccess = 4434,
|
||||
SpvCapabilityStoragePushConstant16 = 4435,
|
||||
SpvCapabilityStorageInputOutput16 = 4436,
|
||||
SpvCapabilityDeviceGroup = 4437,
|
||||
SpvCapabilityMultiView = 4439,
|
||||
SpvCapabilityVariablePointersStorageBuffer = 4441,
|
||||
SpvCapabilityVariablePointers = 4442,
|
||||
SpvCapabilityAtomicStorageOps = 4445,
|
||||
SpvCapabilitySampleMaskPostDepthCoverage = 4447,
|
||||
SpvCapabilityImageGatherBiasLodAMD = 5009,
|
||||
SpvCapabilityFragmentMaskAMD = 5010,
|
||||
SpvCapabilityStencilExportEXT = 5013,
|
||||
SpvCapabilityImageReadWriteLodAMD = 5015,
|
||||
SpvCapabilitySampleMaskOverrideCoverageNV = 5249,
|
||||
SpvCapabilityGeometryShaderPassthroughNV = 5251,
|
||||
SpvCapabilityShaderViewportIndexLayerEXT = 5254,
|
||||
SpvCapabilityShaderViewportIndexLayerNV = 5254,
|
||||
SpvCapabilityShaderViewportMaskNV = 5255,
|
||||
SpvCapabilityShaderStereoViewNV = 5259,
|
||||
SpvCapabilityPerViewAttributesNV = 5260,
|
||||
SpvCapabilitySubgroupShuffleINTEL = 5568,
|
||||
SpvCapabilitySubgroupBufferBlockIOINTEL = 5569,
|
||||
SpvCapabilitySubgroupImageBlockIOINTEL = 5570,
|
||||
SpvCapabilityMax = 0x7fffffff,
|
||||
} SpvCapability;
|
||||
|
||||
typedef enum SpvOp_ {
|
||||
SpvOpNop = 0,
|
||||
SpvOpUndef = 1,
|
||||
SpvOpSourceContinued = 2,
|
||||
SpvOpSource = 3,
|
||||
SpvOpSourceExtension = 4,
|
||||
SpvOpName = 5,
|
||||
SpvOpMemberName = 6,
|
||||
SpvOpString = 7,
|
||||
SpvOpLine = 8,
|
||||
SpvOpExtension = 10,
|
||||
SpvOpExtInstImport = 11,
|
||||
SpvOpExtInst = 12,
|
||||
SpvOpMemoryModel = 14,
|
||||
SpvOpEntryPoint = 15,
|
||||
SpvOpExecutionMode = 16,
|
||||
SpvOpCapability = 17,
|
||||
SpvOpTypeVoid = 19,
|
||||
SpvOpTypeBool = 20,
|
||||
SpvOpTypeInt = 21,
|
||||
SpvOpTypeFloat = 22,
|
||||
SpvOpTypeVector = 23,
|
||||
SpvOpTypeMatrix = 24,
|
||||
SpvOpTypeImage = 25,
|
||||
SpvOpTypeSampler = 26,
|
||||
SpvOpTypeSampledImage = 27,
|
||||
SpvOpTypeArray = 28,
|
||||
SpvOpTypeRuntimeArray = 29,
|
||||
SpvOpTypeStruct = 30,
|
||||
SpvOpTypeOpaque = 31,
|
||||
SpvOpTypePointer = 32,
|
||||
SpvOpTypeFunction = 33,
|
||||
SpvOpTypeEvent = 34,
|
||||
SpvOpTypeDeviceEvent = 35,
|
||||
SpvOpTypeReserveId = 36,
|
||||
SpvOpTypeQueue = 37,
|
||||
SpvOpTypePipe = 38,
|
||||
SpvOpTypeForwardPointer = 39,
|
||||
SpvOpConstantTrue = 41,
|
||||
SpvOpConstantFalse = 42,
|
||||
SpvOpConstant = 43,
|
||||
SpvOpConstantComposite = 44,
|
||||
SpvOpConstantSampler = 45,
|
||||
SpvOpConstantNull = 46,
|
||||
SpvOpSpecConstantTrue = 48,
|
||||
SpvOpSpecConstantFalse = 49,
|
||||
SpvOpSpecConstant = 50,
|
||||
SpvOpSpecConstantComposite = 51,
|
||||
SpvOpSpecConstantOp = 52,
|
||||
SpvOpFunction = 54,
|
||||
SpvOpFunctionParameter = 55,
|
||||
SpvOpFunctionEnd = 56,
|
||||
SpvOpFunctionCall = 57,
|
||||
SpvOpVariable = 59,
|
||||
SpvOpImageTexelPointer = 60,
|
||||
SpvOpLoad = 61,
|
||||
SpvOpStore = 62,
|
||||
SpvOpCopyMemory = 63,
|
||||
SpvOpCopyMemorySized = 64,
|
||||
SpvOpAccessChain = 65,
|
||||
SpvOpInBoundsAccessChain = 66,
|
||||
SpvOpPtrAccessChain = 67,
|
||||
SpvOpArrayLength = 68,
|
||||
SpvOpGenericPtrMemSemantics = 69,
|
||||
SpvOpInBoundsPtrAccessChain = 70,
|
||||
SpvOpDecorate = 71,
|
||||
SpvOpMemberDecorate = 72,
|
||||
SpvOpDecorationGroup = 73,
|
||||
SpvOpGroupDecorate = 74,
|
||||
SpvOpGroupMemberDecorate = 75,
|
||||
SpvOpVectorExtractDynamic = 77,
|
||||
SpvOpVectorInsertDynamic = 78,
|
||||
SpvOpVectorShuffle = 79,
|
||||
SpvOpCompositeConstruct = 80,
|
||||
SpvOpCompositeExtract = 81,
|
||||
SpvOpCompositeInsert = 82,
|
||||
SpvOpCopyObject = 83,
|
||||
SpvOpTranspose = 84,
|
||||
SpvOpSampledImage = 86,
|
||||
SpvOpImageSampleImplicitLod = 87,
|
||||
SpvOpImageSampleExplicitLod = 88,
|
||||
SpvOpImageSampleDrefImplicitLod = 89,
|
||||
SpvOpImageSampleDrefExplicitLod = 90,
|
||||
SpvOpImageSampleProjImplicitLod = 91,
|
||||
SpvOpImageSampleProjExplicitLod = 92,
|
||||
SpvOpImageSampleProjDrefImplicitLod = 93,
|
||||
SpvOpImageSampleProjDrefExplicitLod = 94,
|
||||
SpvOpImageFetch = 95,
|
||||
SpvOpImageGather = 96,
|
||||
SpvOpImageDrefGather = 97,
|
||||
SpvOpImageRead = 98,
|
||||
SpvOpImageWrite = 99,
|
||||
SpvOpImage = 100,
|
||||
SpvOpImageQueryFormat = 101,
|
||||
SpvOpImageQueryOrder = 102,
|
||||
SpvOpImageQuerySizeLod = 103,
|
||||
SpvOpImageQuerySize = 104,
|
||||
SpvOpImageQueryLod = 105,
|
||||
SpvOpImageQueryLevels = 106,
|
||||
SpvOpImageQuerySamples = 107,
|
||||
SpvOpConvertFToU = 109,
|
||||
SpvOpConvertFToS = 110,
|
||||
SpvOpConvertSToF = 111,
|
||||
SpvOpConvertUToF = 112,
|
||||
SpvOpUConvert = 113,
|
||||
SpvOpSConvert = 114,
|
||||
SpvOpFConvert = 115,
|
||||
SpvOpQuantizeToF16 = 116,
|
||||
SpvOpConvertPtrToU = 117,
|
||||
SpvOpSatConvertSToU = 118,
|
||||
SpvOpSatConvertUToS = 119,
|
||||
SpvOpConvertUToPtr = 120,
|
||||
SpvOpPtrCastToGeneric = 121,
|
||||
SpvOpGenericCastToPtr = 122,
|
||||
SpvOpGenericCastToPtrExplicit = 123,
|
||||
SpvOpBitcast = 124,
|
||||
SpvOpSNegate = 126,
|
||||
SpvOpFNegate = 127,
|
||||
SpvOpIAdd = 128,
|
||||
SpvOpFAdd = 129,
|
||||
SpvOpISub = 130,
|
||||
SpvOpFSub = 131,
|
||||
SpvOpIMul = 132,
|
||||
SpvOpFMul = 133,
|
||||
SpvOpUDiv = 134,
|
||||
SpvOpSDiv = 135,
|
||||
SpvOpFDiv = 136,
|
||||
SpvOpUMod = 137,
|
||||
SpvOpSRem = 138,
|
||||
SpvOpSMod = 139,
|
||||
SpvOpFRem = 140,
|
||||
SpvOpFMod = 141,
|
||||
SpvOpVectorTimesScalar = 142,
|
||||
SpvOpMatrixTimesScalar = 143,
|
||||
SpvOpVectorTimesMatrix = 144,
|
||||
SpvOpMatrixTimesVector = 145,
|
||||
SpvOpMatrixTimesMatrix = 146,
|
||||
SpvOpOuterProduct = 147,
|
||||
SpvOpDot = 148,
|
||||
SpvOpIAddCarry = 149,
|
||||
SpvOpISubBorrow = 150,
|
||||
SpvOpUMulExtended = 151,
|
||||
SpvOpSMulExtended = 152,
|
||||
SpvOpAny = 154,
|
||||
SpvOpAll = 155,
|
||||
SpvOpIsNan = 156,
|
||||
SpvOpIsInf = 157,
|
||||
SpvOpIsFinite = 158,
|
||||
SpvOpIsNormal = 159,
|
||||
SpvOpSignBitSet = 160,
|
||||
SpvOpLessOrGreater = 161,
|
||||
SpvOpOrdered = 162,
|
||||
SpvOpUnordered = 163,
|
||||
SpvOpLogicalEqual = 164,
|
||||
SpvOpLogicalNotEqual = 165,
|
||||
SpvOpLogicalOr = 166,
|
||||
SpvOpLogicalAnd = 167,
|
||||
SpvOpLogicalNot = 168,
|
||||
SpvOpSelect = 169,
|
||||
SpvOpIEqual = 170,
|
||||
SpvOpINotEqual = 171,
|
||||
SpvOpUGreaterThan = 172,
|
||||
SpvOpSGreaterThan = 173,
|
||||
SpvOpUGreaterThanEqual = 174,
|
||||
SpvOpSGreaterThanEqual = 175,
|
||||
SpvOpULessThan = 176,
|
||||
SpvOpSLessThan = 177,
|
||||
SpvOpULessThanEqual = 178,
|
||||
SpvOpSLessThanEqual = 179,
|
||||
SpvOpFOrdEqual = 180,
|
||||
SpvOpFUnordEqual = 181,
|
||||
SpvOpFOrdNotEqual = 182,
|
||||
SpvOpFUnordNotEqual = 183,
|
||||
SpvOpFOrdLessThan = 184,
|
||||
SpvOpFUnordLessThan = 185,
|
||||
SpvOpFOrdGreaterThan = 186,
|
||||
SpvOpFUnordGreaterThan = 187,
|
||||
SpvOpFOrdLessThanEqual = 188,
|
||||
SpvOpFUnordLessThanEqual = 189,
|
||||
SpvOpFOrdGreaterThanEqual = 190,
|
||||
SpvOpFUnordGreaterThanEqual = 191,
|
||||
SpvOpShiftRightLogical = 194,
|
||||
SpvOpShiftRightArithmetic = 195,
|
||||
SpvOpShiftLeftLogical = 196,
|
||||
SpvOpBitwiseOr = 197,
|
||||
SpvOpBitwiseXor = 198,
|
||||
SpvOpBitwiseAnd = 199,
|
||||
SpvOpNot = 200,
|
||||
SpvOpBitFieldInsert = 201,
|
||||
SpvOpBitFieldSExtract = 202,
|
||||
SpvOpBitFieldUExtract = 203,
|
||||
SpvOpBitReverse = 204,
|
||||
SpvOpBitCount = 205,
|
||||
SpvOpDPdx = 207,
|
||||
SpvOpDPdy = 208,
|
||||
SpvOpFwidth = 209,
|
||||
SpvOpDPdxFine = 210,
|
||||
SpvOpDPdyFine = 211,
|
||||
SpvOpFwidthFine = 212,
|
||||
SpvOpDPdxCoarse = 213,
|
||||
SpvOpDPdyCoarse = 214,
|
||||
SpvOpFwidthCoarse = 215,
|
||||
SpvOpEmitVertex = 218,
|
||||
SpvOpEndPrimitive = 219,
|
||||
SpvOpEmitStreamVertex = 220,
|
||||
SpvOpEndStreamPrimitive = 221,
|
||||
SpvOpControlBarrier = 224,
|
||||
SpvOpMemoryBarrier = 225,
|
||||
SpvOpAtomicLoad = 227,
|
||||
SpvOpAtomicStore = 228,
|
||||
SpvOpAtomicExchange = 229,
|
||||
SpvOpAtomicCompareExchange = 230,
|
||||
SpvOpAtomicCompareExchangeWeak = 231,
|
||||
SpvOpAtomicIIncrement = 232,
|
||||
SpvOpAtomicIDecrement = 233,
|
||||
SpvOpAtomicIAdd = 234,
|
||||
SpvOpAtomicISub = 235,
|
||||
SpvOpAtomicSMin = 236,
|
||||
SpvOpAtomicUMin = 237,
|
||||
SpvOpAtomicSMax = 238,
|
||||
SpvOpAtomicUMax = 239,
|
||||
SpvOpAtomicAnd = 240,
|
||||
SpvOpAtomicOr = 241,
|
||||
SpvOpAtomicXor = 242,
|
||||
SpvOpPhi = 245,
|
||||
SpvOpLoopMerge = 246,
|
||||
SpvOpSelectionMerge = 247,
|
||||
SpvOpLabel = 248,
|
||||
SpvOpBranch = 249,
|
||||
SpvOpBranchConditional = 250,
|
||||
SpvOpSwitch = 251,
|
||||
SpvOpKill = 252,
|
||||
SpvOpReturn = 253,
|
||||
SpvOpReturnValue = 254,
|
||||
SpvOpUnreachable = 255,
|
||||
SpvOpLifetimeStart = 256,
|
||||
SpvOpLifetimeStop = 257,
|
||||
SpvOpGroupAsyncCopy = 259,
|
||||
SpvOpGroupWaitEvents = 260,
|
||||
SpvOpGroupAll = 261,
|
||||
SpvOpGroupAny = 262,
|
||||
SpvOpGroupBroadcast = 263,
|
||||
SpvOpGroupIAdd = 264,
|
||||
SpvOpGroupFAdd = 265,
|
||||
SpvOpGroupFMin = 266,
|
||||
SpvOpGroupUMin = 267,
|
||||
SpvOpGroupSMin = 268,
|
||||
SpvOpGroupFMax = 269,
|
||||
SpvOpGroupUMax = 270,
|
||||
SpvOpGroupSMax = 271,
|
||||
SpvOpReadPipe = 274,
|
||||
SpvOpWritePipe = 275,
|
||||
SpvOpReservedReadPipe = 276,
|
||||
SpvOpReservedWritePipe = 277,
|
||||
SpvOpReserveReadPipePackets = 278,
|
||||
SpvOpReserveWritePipePackets = 279,
|
||||
SpvOpCommitReadPipe = 280,
|
||||
SpvOpCommitWritePipe = 281,
|
||||
SpvOpIsValidReserveId = 282,
|
||||
SpvOpGetNumPipePackets = 283,
|
||||
SpvOpGetMaxPipePackets = 284,
|
||||
SpvOpGroupReserveReadPipePackets = 285,
|
||||
SpvOpGroupReserveWritePipePackets = 286,
|
||||
SpvOpGroupCommitReadPipe = 287,
|
||||
SpvOpGroupCommitWritePipe = 288,
|
||||
SpvOpEnqueueMarker = 291,
|
||||
SpvOpEnqueueKernel = 292,
|
||||
SpvOpGetKernelNDrangeSubGroupCount = 293,
|
||||
SpvOpGetKernelNDrangeMaxSubGroupSize = 294,
|
||||
SpvOpGetKernelWorkGroupSize = 295,
|
||||
SpvOpGetKernelPreferredWorkGroupSizeMultiple = 296,
|
||||
SpvOpRetainEvent = 297,
|
||||
SpvOpReleaseEvent = 298,
|
||||
SpvOpCreateUserEvent = 299,
|
||||
SpvOpIsValidEvent = 300,
|
||||
SpvOpSetUserEventStatus = 301,
|
||||
SpvOpCaptureEventProfilingInfo = 302,
|
||||
SpvOpGetDefaultQueue = 303,
|
||||
SpvOpBuildNDRange = 304,
|
||||
SpvOpImageSparseSampleImplicitLod = 305,
|
||||
SpvOpImageSparseSampleExplicitLod = 306,
|
||||
SpvOpImageSparseSampleDrefImplicitLod = 307,
|
||||
SpvOpImageSparseSampleDrefExplicitLod = 308,
|
||||
SpvOpImageSparseSampleProjImplicitLod = 309,
|
||||
SpvOpImageSparseSampleProjExplicitLod = 310,
|
||||
SpvOpImageSparseSampleProjDrefImplicitLod = 311,
|
||||
SpvOpImageSparseSampleProjDrefExplicitLod = 312,
|
||||
SpvOpImageSparseFetch = 313,
|
||||
SpvOpImageSparseGather = 314,
|
||||
SpvOpImageSparseDrefGather = 315,
|
||||
SpvOpImageSparseTexelsResident = 316,
|
||||
SpvOpNoLine = 317,
|
||||
SpvOpAtomicFlagTestAndSet = 318,
|
||||
SpvOpAtomicFlagClear = 319,
|
||||
SpvOpImageSparseRead = 320,
|
||||
SpvOpDecorateId = 332,
|
||||
SpvOpSubgroupBallotKHR = 4421,
|
||||
SpvOpSubgroupFirstInvocationKHR = 4422,
|
||||
SpvOpSubgroupAllKHR = 4428,
|
||||
SpvOpSubgroupAnyKHR = 4429,
|
||||
SpvOpSubgroupAllEqualKHR = 4430,
|
||||
SpvOpSubgroupReadInvocationKHR = 4432,
|
||||
SpvOpGroupIAddNonUniformAMD = 5000,
|
||||
SpvOpGroupFAddNonUniformAMD = 5001,
|
||||
SpvOpGroupFMinNonUniformAMD = 5002,
|
||||
SpvOpGroupUMinNonUniformAMD = 5003,
|
||||
SpvOpGroupSMinNonUniformAMD = 5004,
|
||||
SpvOpGroupFMaxNonUniformAMD = 5005,
|
||||
SpvOpGroupUMaxNonUniformAMD = 5006,
|
||||
SpvOpGroupSMaxNonUniformAMD = 5007,
|
||||
SpvOpFragmentMaskFetchAMD = 5011,
|
||||
SpvOpFragmentFetchAMD = 5012,
|
||||
SpvOpSubgroupShuffleINTEL = 5571,
|
||||
SpvOpSubgroupShuffleDownINTEL = 5572,
|
||||
SpvOpSubgroupShuffleUpINTEL = 5573,
|
||||
SpvOpSubgroupShuffleXorINTEL = 5574,
|
||||
SpvOpSubgroupBlockReadINTEL = 5575,
|
||||
SpvOpSubgroupBlockWriteINTEL = 5576,
|
||||
SpvOpSubgroupImageBlockReadINTEL = 5577,
|
||||
SpvOpSubgroupImageBlockWriteINTEL = 5578,
|
||||
SpvOpDecorateStringGOOGLE = 5632,
|
||||
SpvOpMemberDecorateStringGOOGLE = 5633,
|
||||
SpvOpMax = 0x7fffffff,
|
||||
} SpvOp;
|
||||
|
||||
#endif // #ifndef spirv_H
|
||||
|
||||
1002
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/spirv.hpp
vendored
Executable file
1002
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/spirv.hpp
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1002
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/spirv.hpp11
vendored
Executable file
1002
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/spirv.hpp11
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1020
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/spirv.json
vendored
Executable file
1020
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/spirv.json
vendored
Executable file
File diff suppressed because it is too large
Load Diff
949
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/spirv.lua
vendored
Executable file
949
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/spirv.lua
vendored
Executable file
@@ -0,0 +1,949 @@
|
||||
-- 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 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']
|
||||
--
|
||||
-- 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.
|
||||
|
||||
spv = {
|
||||
MagicNumber = 0x07230203,
|
||||
Version = 0x00010000,
|
||||
Revision = 12,
|
||||
OpCodeMask = 0xffff,
|
||||
WordCountShift = 16,
|
||||
|
||||
SourceLanguage = {
|
||||
Unknown = 0,
|
||||
ESSL = 1,
|
||||
GLSL = 2,
|
||||
OpenCL_C = 3,
|
||||
OpenCL_CPP = 4,
|
||||
HLSL = 5,
|
||||
},
|
||||
|
||||
ExecutionModel = {
|
||||
Vertex = 0,
|
||||
TessellationControl = 1,
|
||||
TessellationEvaluation = 2,
|
||||
Geometry = 3,
|
||||
Fragment = 4,
|
||||
GLCompute = 5,
|
||||
Kernel = 6,
|
||||
},
|
||||
|
||||
AddressingModel = {
|
||||
Logical = 0,
|
||||
Physical32 = 1,
|
||||
Physical64 = 2,
|
||||
},
|
||||
|
||||
MemoryModel = {
|
||||
Simple = 0,
|
||||
GLSL450 = 1,
|
||||
OpenCL = 2,
|
||||
},
|
||||
|
||||
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,
|
||||
},
|
||||
|
||||
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,
|
||||
},
|
||||
|
||||
Dim = {
|
||||
Dim1D = 0,
|
||||
Dim2D = 1,
|
||||
Dim3D = 2,
|
||||
Cube = 3,
|
||||
Rect = 4,
|
||||
Buffer = 5,
|
||||
SubpassData = 6,
|
||||
},
|
||||
|
||||
SamplerAddressingMode = {
|
||||
None = 0,
|
||||
ClampToEdge = 1,
|
||||
Clamp = 2,
|
||||
Repeat = 3,
|
||||
RepeatMirrored = 4,
|
||||
},
|
||||
|
||||
SamplerFilterMode = {
|
||||
Nearest = 0,
|
||||
Linear = 1,
|
||||
},
|
||||
|
||||
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,
|
||||
},
|
||||
|
||||
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,
|
||||
},
|
||||
|
||||
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,
|
||||
},
|
||||
|
||||
ImageOperandsShift = {
|
||||
Bias = 0,
|
||||
Lod = 1,
|
||||
Grad = 2,
|
||||
ConstOffset = 3,
|
||||
Offset = 4,
|
||||
ConstOffsets = 5,
|
||||
Sample = 6,
|
||||
MinLod = 7,
|
||||
},
|
||||
|
||||
ImageOperandsMask = {
|
||||
MaskNone = 0,
|
||||
Bias = 0x00000001,
|
||||
Lod = 0x00000002,
|
||||
Grad = 0x00000004,
|
||||
ConstOffset = 0x00000008,
|
||||
Offset = 0x00000010,
|
||||
ConstOffsets = 0x00000020,
|
||||
Sample = 0x00000040,
|
||||
MinLod = 0x00000080,
|
||||
},
|
||||
|
||||
FPFastMathModeShift = {
|
||||
NotNaN = 0,
|
||||
NotInf = 1,
|
||||
NSZ = 2,
|
||||
AllowRecip = 3,
|
||||
Fast = 4,
|
||||
},
|
||||
|
||||
FPFastMathModeMask = {
|
||||
MaskNone = 0,
|
||||
NotNaN = 0x00000001,
|
||||
NotInf = 0x00000002,
|
||||
NSZ = 0x00000004,
|
||||
AllowRecip = 0x00000008,
|
||||
Fast = 0x00000010,
|
||||
},
|
||||
|
||||
FPRoundingMode = {
|
||||
RTE = 0,
|
||||
RTZ = 1,
|
||||
RTP = 2,
|
||||
RTN = 3,
|
||||
},
|
||||
|
||||
LinkageType = {
|
||||
Export = 0,
|
||||
Import = 1,
|
||||
},
|
||||
|
||||
AccessQualifier = {
|
||||
ReadOnly = 0,
|
||||
WriteOnly = 1,
|
||||
ReadWrite = 2,
|
||||
},
|
||||
|
||||
FunctionParameterAttribute = {
|
||||
Zext = 0,
|
||||
Sext = 1,
|
||||
ByVal = 2,
|
||||
Sret = 3,
|
||||
NoAlias = 4,
|
||||
NoCapture = 5,
|
||||
NoWrite = 6,
|
||||
NoReadWrite = 7,
|
||||
},
|
||||
|
||||
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,
|
||||
},
|
||||
|
||||
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,
|
||||
},
|
||||
|
||||
SelectionControlShift = {
|
||||
Flatten = 0,
|
||||
DontFlatten = 1,
|
||||
},
|
||||
|
||||
SelectionControlMask = {
|
||||
MaskNone = 0,
|
||||
Flatten = 0x00000001,
|
||||
DontFlatten = 0x00000002,
|
||||
},
|
||||
|
||||
LoopControlShift = {
|
||||
Unroll = 0,
|
||||
DontUnroll = 1,
|
||||
},
|
||||
|
||||
LoopControlMask = {
|
||||
MaskNone = 0,
|
||||
Unroll = 0x00000001,
|
||||
DontUnroll = 0x00000002,
|
||||
},
|
||||
|
||||
FunctionControlShift = {
|
||||
Inline = 0,
|
||||
DontInline = 1,
|
||||
Pure = 2,
|
||||
Const = 3,
|
||||
},
|
||||
|
||||
FunctionControlMask = {
|
||||
MaskNone = 0,
|
||||
Inline = 0x00000001,
|
||||
DontInline = 0x00000002,
|
||||
Pure = 0x00000004,
|
||||
Const = 0x00000008,
|
||||
},
|
||||
|
||||
MemorySemanticsShift = {
|
||||
Acquire = 1,
|
||||
Release = 2,
|
||||
AcquireRelease = 3,
|
||||
SequentiallyConsistent = 4,
|
||||
UniformMemory = 6,
|
||||
SubgroupMemory = 7,
|
||||
WorkgroupMemory = 8,
|
||||
CrossWorkgroupMemory = 9,
|
||||
AtomicCounterMemory = 10,
|
||||
ImageMemory = 11,
|
||||
},
|
||||
|
||||
MemorySemanticsMask = {
|
||||
MaskNone = 0,
|
||||
Acquire = 0x00000002,
|
||||
Release = 0x00000004,
|
||||
AcquireRelease = 0x00000008,
|
||||
SequentiallyConsistent = 0x00000010,
|
||||
UniformMemory = 0x00000040,
|
||||
SubgroupMemory = 0x00000080,
|
||||
WorkgroupMemory = 0x00000100,
|
||||
CrossWorkgroupMemory = 0x00000200,
|
||||
AtomicCounterMemory = 0x00000400,
|
||||
ImageMemory = 0x00000800,
|
||||
},
|
||||
|
||||
MemoryAccessShift = {
|
||||
Volatile = 0,
|
||||
Aligned = 1,
|
||||
Nontemporal = 2,
|
||||
},
|
||||
|
||||
MemoryAccessMask = {
|
||||
MaskNone = 0,
|
||||
Volatile = 0x00000001,
|
||||
Aligned = 0x00000002,
|
||||
Nontemporal = 0x00000004,
|
||||
},
|
||||
|
||||
Scope = {
|
||||
CrossDevice = 0,
|
||||
Device = 1,
|
||||
Workgroup = 2,
|
||||
Subgroup = 3,
|
||||
Invocation = 4,
|
||||
},
|
||||
|
||||
GroupOperation = {
|
||||
Reduce = 0,
|
||||
InclusiveScan = 1,
|
||||
ExclusiveScan = 2,
|
||||
},
|
||||
|
||||
KernelEnqueueFlags = {
|
||||
NoWait = 0,
|
||||
WaitKernel = 1,
|
||||
WaitWorkGroup = 2,
|
||||
},
|
||||
|
||||
KernelProfilingInfoShift = {
|
||||
CmdExecTime = 0,
|
||||
},
|
||||
|
||||
KernelProfilingInfoMask = {
|
||||
MaskNone = 0,
|
||||
CmdExecTime = 0x00000001,
|
||||
},
|
||||
|
||||
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,
|
||||
},
|
||||
|
||||
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,
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
949
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/spirv.py
vendored
Executable file
949
externals/sirit/externals/SPIRV-Headers/include/spirv/1.0/spirv.py
vendored
Executable file
@@ -0,0 +1,949 @@
|
||||
# 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 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']
|
||||
#
|
||||
# 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.
|
||||
|
||||
spv = {
|
||||
'MagicNumber' : 0x07230203,
|
||||
'Version' : 0x00010000,
|
||||
'Revision' : 12,
|
||||
'OpCodeMask' : 0xffff,
|
||||
'WordCountShift' : 16,
|
||||
|
||||
'SourceLanguage' : {
|
||||
'Unknown' : 0,
|
||||
'ESSL' : 1,
|
||||
'GLSL' : 2,
|
||||
'OpenCL_C' : 3,
|
||||
'OpenCL_CPP' : 4,
|
||||
'HLSL' : 5,
|
||||
},
|
||||
|
||||
'ExecutionModel' : {
|
||||
'Vertex' : 0,
|
||||
'TessellationControl' : 1,
|
||||
'TessellationEvaluation' : 2,
|
||||
'Geometry' : 3,
|
||||
'Fragment' : 4,
|
||||
'GLCompute' : 5,
|
||||
'Kernel' : 6,
|
||||
},
|
||||
|
||||
'AddressingModel' : {
|
||||
'Logical' : 0,
|
||||
'Physical32' : 1,
|
||||
'Physical64' : 2,
|
||||
},
|
||||
|
||||
'MemoryModel' : {
|
||||
'Simple' : 0,
|
||||
'GLSL450' : 1,
|
||||
'OpenCL' : 2,
|
||||
},
|
||||
|
||||
'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,
|
||||
},
|
||||
|
||||
'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,
|
||||
},
|
||||
|
||||
'Dim' : {
|
||||
'Dim1D' : 0,
|
||||
'Dim2D' : 1,
|
||||
'Dim3D' : 2,
|
||||
'Cube' : 3,
|
||||
'Rect' : 4,
|
||||
'Buffer' : 5,
|
||||
'SubpassData' : 6,
|
||||
},
|
||||
|
||||
'SamplerAddressingMode' : {
|
||||
'None' : 0,
|
||||
'ClampToEdge' : 1,
|
||||
'Clamp' : 2,
|
||||
'Repeat' : 3,
|
||||
'RepeatMirrored' : 4,
|
||||
},
|
||||
|
||||
'SamplerFilterMode' : {
|
||||
'Nearest' : 0,
|
||||
'Linear' : 1,
|
||||
},
|
||||
|
||||
'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,
|
||||
},
|
||||
|
||||
'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,
|
||||
},
|
||||
|
||||
'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,
|
||||
},
|
||||
|
||||
'ImageOperandsShift' : {
|
||||
'Bias' : 0,
|
||||
'Lod' : 1,
|
||||
'Grad' : 2,
|
||||
'ConstOffset' : 3,
|
||||
'Offset' : 4,
|
||||
'ConstOffsets' : 5,
|
||||
'Sample' : 6,
|
||||
'MinLod' : 7,
|
||||
},
|
||||
|
||||
'ImageOperandsMask' : {
|
||||
'MaskNone' : 0,
|
||||
'Bias' : 0x00000001,
|
||||
'Lod' : 0x00000002,
|
||||
'Grad' : 0x00000004,
|
||||
'ConstOffset' : 0x00000008,
|
||||
'Offset' : 0x00000010,
|
||||
'ConstOffsets' : 0x00000020,
|
||||
'Sample' : 0x00000040,
|
||||
'MinLod' : 0x00000080,
|
||||
},
|
||||
|
||||
'FPFastMathModeShift' : {
|
||||
'NotNaN' : 0,
|
||||
'NotInf' : 1,
|
||||
'NSZ' : 2,
|
||||
'AllowRecip' : 3,
|
||||
'Fast' : 4,
|
||||
},
|
||||
|
||||
'FPFastMathModeMask' : {
|
||||
'MaskNone' : 0,
|
||||
'NotNaN' : 0x00000001,
|
||||
'NotInf' : 0x00000002,
|
||||
'NSZ' : 0x00000004,
|
||||
'AllowRecip' : 0x00000008,
|
||||
'Fast' : 0x00000010,
|
||||
},
|
||||
|
||||
'FPRoundingMode' : {
|
||||
'RTE' : 0,
|
||||
'RTZ' : 1,
|
||||
'RTP' : 2,
|
||||
'RTN' : 3,
|
||||
},
|
||||
|
||||
'LinkageType' : {
|
||||
'Export' : 0,
|
||||
'Import' : 1,
|
||||
},
|
||||
|
||||
'AccessQualifier' : {
|
||||
'ReadOnly' : 0,
|
||||
'WriteOnly' : 1,
|
||||
'ReadWrite' : 2,
|
||||
},
|
||||
|
||||
'FunctionParameterAttribute' : {
|
||||
'Zext' : 0,
|
||||
'Sext' : 1,
|
||||
'ByVal' : 2,
|
||||
'Sret' : 3,
|
||||
'NoAlias' : 4,
|
||||
'NoCapture' : 5,
|
||||
'NoWrite' : 6,
|
||||
'NoReadWrite' : 7,
|
||||
},
|
||||
|
||||
'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,
|
||||
},
|
||||
|
||||
'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,
|
||||
},
|
||||
|
||||
'SelectionControlShift' : {
|
||||
'Flatten' : 0,
|
||||
'DontFlatten' : 1,
|
||||
},
|
||||
|
||||
'SelectionControlMask' : {
|
||||
'MaskNone' : 0,
|
||||
'Flatten' : 0x00000001,
|
||||
'DontFlatten' : 0x00000002,
|
||||
},
|
||||
|
||||
'LoopControlShift' : {
|
||||
'Unroll' : 0,
|
||||
'DontUnroll' : 1,
|
||||
},
|
||||
|
||||
'LoopControlMask' : {
|
||||
'MaskNone' : 0,
|
||||
'Unroll' : 0x00000001,
|
||||
'DontUnroll' : 0x00000002,
|
||||
},
|
||||
|
||||
'FunctionControlShift' : {
|
||||
'Inline' : 0,
|
||||
'DontInline' : 1,
|
||||
'Pure' : 2,
|
||||
'Const' : 3,
|
||||
},
|
||||
|
||||
'FunctionControlMask' : {
|
||||
'MaskNone' : 0,
|
||||
'Inline' : 0x00000001,
|
||||
'DontInline' : 0x00000002,
|
||||
'Pure' : 0x00000004,
|
||||
'Const' : 0x00000008,
|
||||
},
|
||||
|
||||
'MemorySemanticsShift' : {
|
||||
'Acquire' : 1,
|
||||
'Release' : 2,
|
||||
'AcquireRelease' : 3,
|
||||
'SequentiallyConsistent' : 4,
|
||||
'UniformMemory' : 6,
|
||||
'SubgroupMemory' : 7,
|
||||
'WorkgroupMemory' : 8,
|
||||
'CrossWorkgroupMemory' : 9,
|
||||
'AtomicCounterMemory' : 10,
|
||||
'ImageMemory' : 11,
|
||||
},
|
||||
|
||||
'MemorySemanticsMask' : {
|
||||
'MaskNone' : 0,
|
||||
'Acquire' : 0x00000002,
|
||||
'Release' : 0x00000004,
|
||||
'AcquireRelease' : 0x00000008,
|
||||
'SequentiallyConsistent' : 0x00000010,
|
||||
'UniformMemory' : 0x00000040,
|
||||
'SubgroupMemory' : 0x00000080,
|
||||
'WorkgroupMemory' : 0x00000100,
|
||||
'CrossWorkgroupMemory' : 0x00000200,
|
||||
'AtomicCounterMemory' : 0x00000400,
|
||||
'ImageMemory' : 0x00000800,
|
||||
},
|
||||
|
||||
'MemoryAccessShift' : {
|
||||
'Volatile' : 0,
|
||||
'Aligned' : 1,
|
||||
'Nontemporal' : 2,
|
||||
},
|
||||
|
||||
'MemoryAccessMask' : {
|
||||
'MaskNone' : 0,
|
||||
'Volatile' : 0x00000001,
|
||||
'Aligned' : 0x00000002,
|
||||
'Nontemporal' : 0x00000004,
|
||||
},
|
||||
|
||||
'Scope' : {
|
||||
'CrossDevice' : 0,
|
||||
'Device' : 1,
|
||||
'Workgroup' : 2,
|
||||
'Subgroup' : 3,
|
||||
'Invocation' : 4,
|
||||
},
|
||||
|
||||
'GroupOperation' : {
|
||||
'Reduce' : 0,
|
||||
'InclusiveScan' : 1,
|
||||
'ExclusiveScan' : 2,
|
||||
},
|
||||
|
||||
'KernelEnqueueFlags' : {
|
||||
'NoWait' : 0,
|
||||
'WaitKernel' : 1,
|
||||
'WaitWorkGroup' : 2,
|
||||
},
|
||||
|
||||
'KernelProfilingInfoShift' : {
|
||||
'CmdExecTime' : 0,
|
||||
},
|
||||
|
||||
'KernelProfilingInfoMask' : {
|
||||
'MaskNone' : 0,
|
||||
'CmdExecTime' : 0x00000001,
|
||||
},
|
||||
|
||||
'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,
|
||||
},
|
||||
|
||||
'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,
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
131
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/GLSL.std.450.h
vendored
Executable file
131
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/GLSL.std.450.h
vendored
Executable file
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
** Copyright (c) 2014-2016 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 GLSLstd450_H
|
||||
#define GLSLstd450_H
|
||||
|
||||
static const int GLSLstd450Version = 100;
|
||||
static const int GLSLstd450Revision = 3;
|
||||
|
||||
enum GLSLstd450 {
|
||||
GLSLstd450Bad = 0, // Don't use
|
||||
|
||||
GLSLstd450Round = 1,
|
||||
GLSLstd450RoundEven = 2,
|
||||
GLSLstd450Trunc = 3,
|
||||
GLSLstd450FAbs = 4,
|
||||
GLSLstd450SAbs = 5,
|
||||
GLSLstd450FSign = 6,
|
||||
GLSLstd450SSign = 7,
|
||||
GLSLstd450Floor = 8,
|
||||
GLSLstd450Ceil = 9,
|
||||
GLSLstd450Fract = 10,
|
||||
|
||||
GLSLstd450Radians = 11,
|
||||
GLSLstd450Degrees = 12,
|
||||
GLSLstd450Sin = 13,
|
||||
GLSLstd450Cos = 14,
|
||||
GLSLstd450Tan = 15,
|
||||
GLSLstd450Asin = 16,
|
||||
GLSLstd450Acos = 17,
|
||||
GLSLstd450Atan = 18,
|
||||
GLSLstd450Sinh = 19,
|
||||
GLSLstd450Cosh = 20,
|
||||
GLSLstd450Tanh = 21,
|
||||
GLSLstd450Asinh = 22,
|
||||
GLSLstd450Acosh = 23,
|
||||
GLSLstd450Atanh = 24,
|
||||
GLSLstd450Atan2 = 25,
|
||||
|
||||
GLSLstd450Pow = 26,
|
||||
GLSLstd450Exp = 27,
|
||||
GLSLstd450Log = 28,
|
||||
GLSLstd450Exp2 = 29,
|
||||
GLSLstd450Log2 = 30,
|
||||
GLSLstd450Sqrt = 31,
|
||||
GLSLstd450InverseSqrt = 32,
|
||||
|
||||
GLSLstd450Determinant = 33,
|
||||
GLSLstd450MatrixInverse = 34,
|
||||
|
||||
GLSLstd450Modf = 35, // second operand needs an OpVariable to write to
|
||||
GLSLstd450ModfStruct = 36, // no OpVariable operand
|
||||
GLSLstd450FMin = 37,
|
||||
GLSLstd450UMin = 38,
|
||||
GLSLstd450SMin = 39,
|
||||
GLSLstd450FMax = 40,
|
||||
GLSLstd450UMax = 41,
|
||||
GLSLstd450SMax = 42,
|
||||
GLSLstd450FClamp = 43,
|
||||
GLSLstd450UClamp = 44,
|
||||
GLSLstd450SClamp = 45,
|
||||
GLSLstd450FMix = 46,
|
||||
GLSLstd450IMix = 47, // Reserved
|
||||
GLSLstd450Step = 48,
|
||||
GLSLstd450SmoothStep = 49,
|
||||
|
||||
GLSLstd450Fma = 50,
|
||||
GLSLstd450Frexp = 51, // second operand needs an OpVariable to write to
|
||||
GLSLstd450FrexpStruct = 52, // no OpVariable operand
|
||||
GLSLstd450Ldexp = 53,
|
||||
|
||||
GLSLstd450PackSnorm4x8 = 54,
|
||||
GLSLstd450PackUnorm4x8 = 55,
|
||||
GLSLstd450PackSnorm2x16 = 56,
|
||||
GLSLstd450PackUnorm2x16 = 57,
|
||||
GLSLstd450PackHalf2x16 = 58,
|
||||
GLSLstd450PackDouble2x32 = 59,
|
||||
GLSLstd450UnpackSnorm2x16 = 60,
|
||||
GLSLstd450UnpackUnorm2x16 = 61,
|
||||
GLSLstd450UnpackHalf2x16 = 62,
|
||||
GLSLstd450UnpackSnorm4x8 = 63,
|
||||
GLSLstd450UnpackUnorm4x8 = 64,
|
||||
GLSLstd450UnpackDouble2x32 = 65,
|
||||
|
||||
GLSLstd450Length = 66,
|
||||
GLSLstd450Distance = 67,
|
||||
GLSLstd450Cross = 68,
|
||||
GLSLstd450Normalize = 69,
|
||||
GLSLstd450FaceForward = 70,
|
||||
GLSLstd450Reflect = 71,
|
||||
GLSLstd450Refract = 72,
|
||||
|
||||
GLSLstd450FindILsb = 73,
|
||||
GLSLstd450FindSMsb = 74,
|
||||
GLSLstd450FindUMsb = 75,
|
||||
|
||||
GLSLstd450InterpolateAtCentroid = 76,
|
||||
GLSLstd450InterpolateAtSample = 77,
|
||||
GLSLstd450InterpolateAtOffset = 78,
|
||||
|
||||
GLSLstd450NMin = 79,
|
||||
GLSLstd450NMax = 80,
|
||||
GLSLstd450NClamp = 81,
|
||||
|
||||
GLSLstd450Count
|
||||
};
|
||||
|
||||
#endif // #ifndef GLSLstd450_H
|
||||
210
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/OpenCL.std.h
vendored
Executable file
210
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/OpenCL.std.h
vendored
Executable file
@@ -0,0 +1,210 @@
|
||||
/*
|
||||
** Copyright (c) 2015-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.
|
||||
*/
|
||||
|
||||
namespace OpenCLLIB {
|
||||
|
||||
enum Entrypoints {
|
||||
|
||||
// Section 2.1: Math extended instructions
|
||||
Acos = 0,
|
||||
Acosh = 1,
|
||||
Acospi = 2,
|
||||
Asin = 3,
|
||||
Asinh = 4,
|
||||
Asinpi = 5,
|
||||
Atan = 6,
|
||||
Atan2 = 7,
|
||||
Atanh = 8,
|
||||
Atanpi = 9,
|
||||
Atan2pi = 10,
|
||||
Cbrt = 11,
|
||||
Ceil = 12,
|
||||
Copysign = 13,
|
||||
Cos = 14,
|
||||
Cosh = 15,
|
||||
Cospi = 16,
|
||||
Erfc = 17,
|
||||
Erf = 18,
|
||||
Exp = 19,
|
||||
Exp2 = 20,
|
||||
Exp10 = 21,
|
||||
Expm1 = 22,
|
||||
Fabs = 23,
|
||||
Fdim = 24,
|
||||
Floor = 25,
|
||||
Fma = 26,
|
||||
Fmax = 27,
|
||||
Fmin = 28,
|
||||
Fmod = 29,
|
||||
Fract = 30,
|
||||
Frexp = 31,
|
||||
Hypot = 32,
|
||||
Ilogb = 33,
|
||||
Ldexp = 34,
|
||||
Lgamma = 35,
|
||||
Lgamma_r = 36,
|
||||
Log = 37,
|
||||
Log2 = 38,
|
||||
Log10 = 39,
|
||||
Log1p = 40,
|
||||
Logb = 41,
|
||||
Mad = 42,
|
||||
Maxmag = 43,
|
||||
Minmag = 44,
|
||||
Modf = 45,
|
||||
Nan = 46,
|
||||
Nextafter = 47,
|
||||
Pow = 48,
|
||||
Pown = 49,
|
||||
Powr = 50,
|
||||
Remainder = 51,
|
||||
Remquo = 52,
|
||||
Rint = 53,
|
||||
Rootn = 54,
|
||||
Round = 55,
|
||||
Rsqrt = 56,
|
||||
Sin = 57,
|
||||
Sincos = 58,
|
||||
Sinh = 59,
|
||||
Sinpi = 60,
|
||||
Sqrt = 61,
|
||||
Tan = 62,
|
||||
Tanh = 63,
|
||||
Tanpi = 64,
|
||||
Tgamma = 65,
|
||||
Trunc = 66,
|
||||
Half_cos = 67,
|
||||
Half_divide = 68,
|
||||
Half_exp = 69,
|
||||
Half_exp2 = 70,
|
||||
Half_exp10 = 71,
|
||||
Half_log = 72,
|
||||
Half_log2 = 73,
|
||||
Half_log10 = 74,
|
||||
Half_powr = 75,
|
||||
Half_recip = 76,
|
||||
Half_rsqrt = 77,
|
||||
Half_sin = 78,
|
||||
Half_sqrt = 79,
|
||||
Half_tan = 80,
|
||||
Native_cos = 81,
|
||||
Native_divide = 82,
|
||||
Native_exp = 83,
|
||||
Native_exp2 = 84,
|
||||
Native_exp10 = 85,
|
||||
Native_log = 86,
|
||||
Native_log2 = 87,
|
||||
Native_log10 = 88,
|
||||
Native_powr = 89,
|
||||
Native_recip = 90,
|
||||
Native_rsqrt = 91,
|
||||
Native_sin = 92,
|
||||
Native_sqrt = 93,
|
||||
Native_tan = 94,
|
||||
|
||||
// Section 2.2: Integer instructions
|
||||
SAbs = 141,
|
||||
SAbs_diff = 142,
|
||||
SAdd_sat = 143,
|
||||
UAdd_sat = 144,
|
||||
SHadd = 145,
|
||||
UHadd = 146,
|
||||
SRhadd = 147,
|
||||
URhadd = 148,
|
||||
SClamp = 149,
|
||||
UClamp = 150,
|
||||
Clz = 151,
|
||||
Ctz = 152,
|
||||
SMad_hi = 153,
|
||||
UMad_sat = 154,
|
||||
SMad_sat = 155,
|
||||
SMax = 156,
|
||||
UMax = 157,
|
||||
SMin = 158,
|
||||
UMin = 159,
|
||||
SMul_hi = 160,
|
||||
Rotate = 161,
|
||||
SSub_sat = 162,
|
||||
USub_sat = 163,
|
||||
U_Upsample = 164,
|
||||
S_Upsample = 165,
|
||||
Popcount = 166,
|
||||
SMad24 = 167,
|
||||
UMad24 = 168,
|
||||
SMul24 = 169,
|
||||
UMul24 = 170,
|
||||
UAbs = 201,
|
||||
UAbs_diff = 202,
|
||||
UMul_hi = 203,
|
||||
UMad_hi = 204,
|
||||
|
||||
// Section 2.3: Common instructions
|
||||
FClamp = 95,
|
||||
Degrees = 96,
|
||||
FMax_common = 97,
|
||||
FMin_common = 98,
|
||||
Mix = 99,
|
||||
Radians = 100,
|
||||
Step = 101,
|
||||
Smoothstep = 102,
|
||||
Sign = 103,
|
||||
|
||||
// Section 2.4: Geometric instructions
|
||||
Cross = 104,
|
||||
Distance = 105,
|
||||
Length = 106,
|
||||
Normalize = 107,
|
||||
Fast_distance = 108,
|
||||
Fast_length = 109,
|
||||
Fast_normalize = 110,
|
||||
|
||||
// Section 2.5: Relational instructions
|
||||
Bitselect = 186,
|
||||
Select = 187,
|
||||
|
||||
// Section 2.6: Vector Data Load and Store instructions
|
||||
Vloadn = 171,
|
||||
Vstoren = 172,
|
||||
Vload_half = 173,
|
||||
Vload_halfn = 174,
|
||||
Vstore_half = 175,
|
||||
Vstore_half_r = 176,
|
||||
Vstore_halfn = 177,
|
||||
Vstore_halfn_r = 178,
|
||||
Vloada_halfn = 179,
|
||||
Vstorea_halfn = 180,
|
||||
Vstorea_halfn_r = 181,
|
||||
|
||||
// Section 2.7: Miscellaneous Vector instructions
|
||||
Shuffle = 182,
|
||||
Shuffle2 = 183,
|
||||
|
||||
// Section 2.8: Misc instructions
|
||||
Printf = 184,
|
||||
Prefetch = 185,
|
||||
};
|
||||
|
||||
} // end namespace OpenCLLIB
|
||||
642
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/extinst.glsl.std.450.grammar.json
vendored
Executable file
642
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/extinst.glsl.std.450.grammar.json
vendored
Executable file
@@ -0,0 +1,642 @@
|
||||
{
|
||||
"copyright" : [
|
||||
"Copyright (c) 2014-2016 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" : 2,
|
||||
"instructions" : [
|
||||
{
|
||||
"opname" : "Round",
|
||||
"opcode" : 1,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "RoundEven",
|
||||
"opcode" : 2,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Trunc",
|
||||
"opcode" : 3,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FAbs",
|
||||
"opcode" : 4,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SAbs",
|
||||
"opcode" : 5,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FSign",
|
||||
"opcode" : 6,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SSign",
|
||||
"opcode" : 7,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Floor",
|
||||
"opcode" : 8,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Ceil",
|
||||
"opcode" : 9,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Fract",
|
||||
"opcode" : 10,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Radians",
|
||||
"opcode" : 11,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'degrees'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Degrees",
|
||||
"opcode" : 12,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'radians'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Sin",
|
||||
"opcode" : 13,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Cos",
|
||||
"opcode" : 14,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Tan",
|
||||
"opcode" : 15,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Asin",
|
||||
"opcode" : 16,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Acos",
|
||||
"opcode" : 17,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Atan",
|
||||
"opcode" : 18,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'y_over_x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Sinh",
|
||||
"opcode" : 19,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Cosh",
|
||||
"opcode" : 20,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Tanh",
|
||||
"opcode" : 21,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Asinh",
|
||||
"opcode" : 22,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Acosh",
|
||||
"opcode" : 23,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Atanh",
|
||||
"opcode" : 24,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Atan2",
|
||||
"opcode" : 25,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'y'" },
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Pow",
|
||||
"opcode" : 26,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Exp",
|
||||
"opcode" : 27,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Log",
|
||||
"opcode" : 28,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Exp2",
|
||||
"opcode" : 29,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Log2",
|
||||
"opcode" : 30,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Sqrt",
|
||||
"opcode" : 31,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "InverseSqrt",
|
||||
"opcode" : 32,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Determinant",
|
||||
"opcode" : 33,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "MatrixInverse",
|
||||
"opcode" : 34,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Modf",
|
||||
"opcode" : 35,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'i'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "ModfStruct",
|
||||
"opcode" : 36,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FMin",
|
||||
"opcode" : 37,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UMin",
|
||||
"opcode" : 38,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SMin",
|
||||
"opcode" : 39,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FMax",
|
||||
"opcode" : 40,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UMax",
|
||||
"opcode" : 41,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SMax",
|
||||
"opcode" : 42,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FClamp",
|
||||
"opcode" : 43,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'minVal'" },
|
||||
{ "kind" : "IdRef", "name" : "'maxVal'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UClamp",
|
||||
"opcode" : 44,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'minVal'" },
|
||||
{ "kind" : "IdRef", "name" : "'maxVal'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SClamp",
|
||||
"opcode" : 45,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'minVal'" },
|
||||
{ "kind" : "IdRef", "name" : "'maxVal'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FMix",
|
||||
"opcode" : 46,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" },
|
||||
{ "kind" : "IdRef", "name" : "'a'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "IMix",
|
||||
"opcode" : 47,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" },
|
||||
{ "kind" : "IdRef", "name" : "'a'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Step",
|
||||
"opcode" : 48,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'edge'" },
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SmoothStep",
|
||||
"opcode" : 49,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'edge0'" },
|
||||
{ "kind" : "IdRef", "name" : "'edge1'" },
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Fma",
|
||||
"opcode" : 50,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'a'" },
|
||||
{ "kind" : "IdRef", "name" : "'b'" },
|
||||
{ "kind" : "IdRef", "name" : "'c'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Frexp",
|
||||
"opcode" : 51,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'exp'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FrexpStruct",
|
||||
"opcode" : 52,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Ldexp",
|
||||
"opcode" : 53,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'exp'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackSnorm4x8",
|
||||
"opcode" : 54,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackUnorm4x8",
|
||||
"opcode" : 55,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackSnorm2x16",
|
||||
"opcode" : 56,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackUnorm2x16",
|
||||
"opcode" : 57,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackHalf2x16",
|
||||
"opcode" : 58,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackDouble2x32",
|
||||
"opcode" : 59,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
],
|
||||
"capabilities" : [ "Float64" ]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackSnorm2x16",
|
||||
"opcode" : 60,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'p'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackUnorm2x16",
|
||||
"opcode" : 61,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'p'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackHalf2x16",
|
||||
"opcode" : 62,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackSnorm4x8",
|
||||
"opcode" : 63,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'p'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackUnorm4x8",
|
||||
"opcode" : 64,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'p'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackDouble2x32",
|
||||
"opcode" : 65,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
],
|
||||
"capabilities" : [ "Float64" ]
|
||||
},
|
||||
{
|
||||
"opname" : "Length",
|
||||
"opcode" : 66,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Distance",
|
||||
"opcode" : 67,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'p0'" },
|
||||
{ "kind" : "IdRef", "name" : "'p1'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Cross",
|
||||
"opcode" : 68,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Normalize",
|
||||
"opcode" : 69,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FaceForward",
|
||||
"opcode" : 70,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'N'" },
|
||||
{ "kind" : "IdRef", "name" : "'I'" },
|
||||
{ "kind" : "IdRef", "name" : "'Nref'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Reflect",
|
||||
"opcode" : 71,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'I'" },
|
||||
{ "kind" : "IdRef", "name" : "'N'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Refract",
|
||||
"opcode" : 72,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'I'" },
|
||||
{ "kind" : "IdRef", "name" : "'N'" },
|
||||
{ "kind" : "IdRef", "name" : "'eta'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FindILsb",
|
||||
"opcode" : 73,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'Value'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FindSMsb",
|
||||
"opcode" : 74,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'Value'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FindUMsb",
|
||||
"opcode" : 75,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'Value'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "InterpolateAtCentroid",
|
||||
"opcode" : 76,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'interpolant'" }
|
||||
],
|
||||
"capabilities" : [ "InterpolationFunction" ]
|
||||
},
|
||||
{
|
||||
"opname" : "InterpolateAtSample",
|
||||
"opcode" : 77,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'interpolant'" },
|
||||
{ "kind" : "IdRef", "name" : "'sample'" }
|
||||
],
|
||||
"capabilities" : [ "InterpolationFunction" ]
|
||||
},
|
||||
{
|
||||
"opname" : "InterpolateAtOffset",
|
||||
"opcode" : 78,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'interpolant'" },
|
||||
{ "kind" : "IdRef", "name" : "'offset'" }
|
||||
],
|
||||
"capabilities" : [ "InterpolationFunction" ]
|
||||
},
|
||||
{
|
||||
"opname" : "NMin",
|
||||
"opcode" : 79,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "NMax",
|
||||
"opcode" : 80,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "NClamp",
|
||||
"opcode" : 81,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'minVal'" },
|
||||
{ "kind" : "IdRef", "name" : "'maxVal'" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
1279
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/extinst.opencl.std.100.grammar.json
vendored
Executable file
1279
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/extinst.opencl.std.100.grammar.json
vendored
Executable file
File diff suppressed because it is too large
Load Diff
5938
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/spirv.core.grammar.json
vendored
Executable file
5938
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/spirv.core.grammar.json
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1015
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/spirv.h
vendored
Executable file
1015
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/spirv.h
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1024
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/spirv.hpp
vendored
Executable file
1024
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/spirv.hpp
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1024
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/spirv.hpp11
vendored
Executable file
1024
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/spirv.hpp11
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1040
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/spirv.json
vendored
Executable file
1040
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/spirv.json
vendored
Executable file
File diff suppressed because it is too large
Load Diff
971
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/spirv.lua
vendored
Executable file
971
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/spirv.lua
vendored
Executable file
@@ -0,0 +1,971 @@
|
||||
-- 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 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']
|
||||
--
|
||||
-- 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.
|
||||
|
||||
spv = {
|
||||
MagicNumber = 0x07230203,
|
||||
Version = 0x00010100,
|
||||
Revision = 8,
|
||||
OpCodeMask = 0xffff,
|
||||
WordCountShift = 16,
|
||||
|
||||
SourceLanguage = {
|
||||
Unknown = 0,
|
||||
ESSL = 1,
|
||||
GLSL = 2,
|
||||
OpenCL_C = 3,
|
||||
OpenCL_CPP = 4,
|
||||
HLSL = 5,
|
||||
},
|
||||
|
||||
ExecutionModel = {
|
||||
Vertex = 0,
|
||||
TessellationControl = 1,
|
||||
TessellationEvaluation = 2,
|
||||
Geometry = 3,
|
||||
Fragment = 4,
|
||||
GLCompute = 5,
|
||||
Kernel = 6,
|
||||
},
|
||||
|
||||
AddressingModel = {
|
||||
Logical = 0,
|
||||
Physical32 = 1,
|
||||
Physical64 = 2,
|
||||
},
|
||||
|
||||
MemoryModel = {
|
||||
Simple = 0,
|
||||
GLSL450 = 1,
|
||||
OpenCL = 2,
|
||||
},
|
||||
|
||||
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,
|
||||
Initializer = 33,
|
||||
Finalizer = 34,
|
||||
SubgroupSize = 35,
|
||||
SubgroupsPerWorkgroup = 36,
|
||||
PostDepthCoverage = 4446,
|
||||
StencilRefReplacingEXT = 5027,
|
||||
},
|
||||
|
||||
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,
|
||||
},
|
||||
|
||||
Dim = {
|
||||
Dim1D = 0,
|
||||
Dim2D = 1,
|
||||
Dim3D = 2,
|
||||
Cube = 3,
|
||||
Rect = 4,
|
||||
Buffer = 5,
|
||||
SubpassData = 6,
|
||||
},
|
||||
|
||||
SamplerAddressingMode = {
|
||||
None = 0,
|
||||
ClampToEdge = 1,
|
||||
Clamp = 2,
|
||||
Repeat = 3,
|
||||
RepeatMirrored = 4,
|
||||
},
|
||||
|
||||
SamplerFilterMode = {
|
||||
Nearest = 0,
|
||||
Linear = 1,
|
||||
},
|
||||
|
||||
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,
|
||||
},
|
||||
|
||||
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,
|
||||
},
|
||||
|
||||
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,
|
||||
},
|
||||
|
||||
ImageOperandsShift = {
|
||||
Bias = 0,
|
||||
Lod = 1,
|
||||
Grad = 2,
|
||||
ConstOffset = 3,
|
||||
Offset = 4,
|
||||
ConstOffsets = 5,
|
||||
Sample = 6,
|
||||
MinLod = 7,
|
||||
},
|
||||
|
||||
ImageOperandsMask = {
|
||||
MaskNone = 0,
|
||||
Bias = 0x00000001,
|
||||
Lod = 0x00000002,
|
||||
Grad = 0x00000004,
|
||||
ConstOffset = 0x00000008,
|
||||
Offset = 0x00000010,
|
||||
ConstOffsets = 0x00000020,
|
||||
Sample = 0x00000040,
|
||||
MinLod = 0x00000080,
|
||||
},
|
||||
|
||||
FPFastMathModeShift = {
|
||||
NotNaN = 0,
|
||||
NotInf = 1,
|
||||
NSZ = 2,
|
||||
AllowRecip = 3,
|
||||
Fast = 4,
|
||||
},
|
||||
|
||||
FPFastMathModeMask = {
|
||||
MaskNone = 0,
|
||||
NotNaN = 0x00000001,
|
||||
NotInf = 0x00000002,
|
||||
NSZ = 0x00000004,
|
||||
AllowRecip = 0x00000008,
|
||||
Fast = 0x00000010,
|
||||
},
|
||||
|
||||
FPRoundingMode = {
|
||||
RTE = 0,
|
||||
RTZ = 1,
|
||||
RTP = 2,
|
||||
RTN = 3,
|
||||
},
|
||||
|
||||
LinkageType = {
|
||||
Export = 0,
|
||||
Import = 1,
|
||||
},
|
||||
|
||||
AccessQualifier = {
|
||||
ReadOnly = 0,
|
||||
WriteOnly = 1,
|
||||
ReadWrite = 2,
|
||||
},
|
||||
|
||||
FunctionParameterAttribute = {
|
||||
Zext = 0,
|
||||
Sext = 1,
|
||||
ByVal = 2,
|
||||
Sret = 3,
|
||||
NoAlias = 4,
|
||||
NoCapture = 5,
|
||||
NoWrite = 6,
|
||||
NoReadWrite = 7,
|
||||
},
|
||||
|
||||
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,
|
||||
MaxByteOffset = 45,
|
||||
ExplicitInterpAMD = 4999,
|
||||
OverrideCoverageNV = 5248,
|
||||
PassthroughNV = 5250,
|
||||
ViewportRelativeNV = 5252,
|
||||
SecondaryViewportRelativeNV = 5256,
|
||||
HlslCounterBufferGOOGLE = 5634,
|
||||
HlslSemanticGOOGLE = 5635,
|
||||
},
|
||||
|
||||
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,
|
||||
},
|
||||
|
||||
SelectionControlShift = {
|
||||
Flatten = 0,
|
||||
DontFlatten = 1,
|
||||
},
|
||||
|
||||
SelectionControlMask = {
|
||||
MaskNone = 0,
|
||||
Flatten = 0x00000001,
|
||||
DontFlatten = 0x00000002,
|
||||
},
|
||||
|
||||
LoopControlShift = {
|
||||
Unroll = 0,
|
||||
DontUnroll = 1,
|
||||
DependencyInfinite = 2,
|
||||
DependencyLength = 3,
|
||||
},
|
||||
|
||||
LoopControlMask = {
|
||||
MaskNone = 0,
|
||||
Unroll = 0x00000001,
|
||||
DontUnroll = 0x00000002,
|
||||
DependencyInfinite = 0x00000004,
|
||||
DependencyLength = 0x00000008,
|
||||
},
|
||||
|
||||
FunctionControlShift = {
|
||||
Inline = 0,
|
||||
DontInline = 1,
|
||||
Pure = 2,
|
||||
Const = 3,
|
||||
},
|
||||
|
||||
FunctionControlMask = {
|
||||
MaskNone = 0,
|
||||
Inline = 0x00000001,
|
||||
DontInline = 0x00000002,
|
||||
Pure = 0x00000004,
|
||||
Const = 0x00000008,
|
||||
},
|
||||
|
||||
MemorySemanticsShift = {
|
||||
Acquire = 1,
|
||||
Release = 2,
|
||||
AcquireRelease = 3,
|
||||
SequentiallyConsistent = 4,
|
||||
UniformMemory = 6,
|
||||
SubgroupMemory = 7,
|
||||
WorkgroupMemory = 8,
|
||||
CrossWorkgroupMemory = 9,
|
||||
AtomicCounterMemory = 10,
|
||||
ImageMemory = 11,
|
||||
},
|
||||
|
||||
MemorySemanticsMask = {
|
||||
MaskNone = 0,
|
||||
Acquire = 0x00000002,
|
||||
Release = 0x00000004,
|
||||
AcquireRelease = 0x00000008,
|
||||
SequentiallyConsistent = 0x00000010,
|
||||
UniformMemory = 0x00000040,
|
||||
SubgroupMemory = 0x00000080,
|
||||
WorkgroupMemory = 0x00000100,
|
||||
CrossWorkgroupMemory = 0x00000200,
|
||||
AtomicCounterMemory = 0x00000400,
|
||||
ImageMemory = 0x00000800,
|
||||
},
|
||||
|
||||
MemoryAccessShift = {
|
||||
Volatile = 0,
|
||||
Aligned = 1,
|
||||
Nontemporal = 2,
|
||||
},
|
||||
|
||||
MemoryAccessMask = {
|
||||
MaskNone = 0,
|
||||
Volatile = 0x00000001,
|
||||
Aligned = 0x00000002,
|
||||
Nontemporal = 0x00000004,
|
||||
},
|
||||
|
||||
Scope = {
|
||||
CrossDevice = 0,
|
||||
Device = 1,
|
||||
Workgroup = 2,
|
||||
Subgroup = 3,
|
||||
Invocation = 4,
|
||||
},
|
||||
|
||||
GroupOperation = {
|
||||
Reduce = 0,
|
||||
InclusiveScan = 1,
|
||||
ExclusiveScan = 2,
|
||||
},
|
||||
|
||||
KernelEnqueueFlags = {
|
||||
NoWait = 0,
|
||||
WaitKernel = 1,
|
||||
WaitWorkGroup = 2,
|
||||
},
|
||||
|
||||
KernelProfilingInfoShift = {
|
||||
CmdExecTime = 0,
|
||||
},
|
||||
|
||||
KernelProfilingInfoMask = {
|
||||
MaskNone = 0,
|
||||
CmdExecTime = 0x00000001,
|
||||
},
|
||||
|
||||
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,
|
||||
SubgroupDispatch = 58,
|
||||
NamedBarrier = 59,
|
||||
PipeStorage = 60,
|
||||
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,
|
||||
},
|
||||
|
||||
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,
|
||||
OpSizeOf = 321,
|
||||
OpTypePipeStorage = 322,
|
||||
OpConstantPipeStorage = 323,
|
||||
OpCreatePipeFromPipeStorage = 324,
|
||||
OpGetKernelLocalSizeForSubgroupCount = 325,
|
||||
OpGetKernelMaxNumSubgroups = 326,
|
||||
OpTypeNamedBarrier = 327,
|
||||
OpNamedBarrierInitialize = 328,
|
||||
OpMemoryNamedBarrier = 329,
|
||||
OpModuleProcessed = 330,
|
||||
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,
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
971
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/spirv.py
vendored
Executable file
971
externals/sirit/externals/SPIRV-Headers/include/spirv/1.1/spirv.py
vendored
Executable file
@@ -0,0 +1,971 @@
|
||||
# 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 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']
|
||||
#
|
||||
# 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.
|
||||
|
||||
spv = {
|
||||
'MagicNumber' : 0x07230203,
|
||||
'Version' : 0x00010100,
|
||||
'Revision' : 8,
|
||||
'OpCodeMask' : 0xffff,
|
||||
'WordCountShift' : 16,
|
||||
|
||||
'SourceLanguage' : {
|
||||
'Unknown' : 0,
|
||||
'ESSL' : 1,
|
||||
'GLSL' : 2,
|
||||
'OpenCL_C' : 3,
|
||||
'OpenCL_CPP' : 4,
|
||||
'HLSL' : 5,
|
||||
},
|
||||
|
||||
'ExecutionModel' : {
|
||||
'Vertex' : 0,
|
||||
'TessellationControl' : 1,
|
||||
'TessellationEvaluation' : 2,
|
||||
'Geometry' : 3,
|
||||
'Fragment' : 4,
|
||||
'GLCompute' : 5,
|
||||
'Kernel' : 6,
|
||||
},
|
||||
|
||||
'AddressingModel' : {
|
||||
'Logical' : 0,
|
||||
'Physical32' : 1,
|
||||
'Physical64' : 2,
|
||||
},
|
||||
|
||||
'MemoryModel' : {
|
||||
'Simple' : 0,
|
||||
'GLSL450' : 1,
|
||||
'OpenCL' : 2,
|
||||
},
|
||||
|
||||
'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,
|
||||
'Initializer' : 33,
|
||||
'Finalizer' : 34,
|
||||
'SubgroupSize' : 35,
|
||||
'SubgroupsPerWorkgroup' : 36,
|
||||
'PostDepthCoverage' : 4446,
|
||||
'StencilRefReplacingEXT' : 5027,
|
||||
},
|
||||
|
||||
'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,
|
||||
},
|
||||
|
||||
'Dim' : {
|
||||
'Dim1D' : 0,
|
||||
'Dim2D' : 1,
|
||||
'Dim3D' : 2,
|
||||
'Cube' : 3,
|
||||
'Rect' : 4,
|
||||
'Buffer' : 5,
|
||||
'SubpassData' : 6,
|
||||
},
|
||||
|
||||
'SamplerAddressingMode' : {
|
||||
'None' : 0,
|
||||
'ClampToEdge' : 1,
|
||||
'Clamp' : 2,
|
||||
'Repeat' : 3,
|
||||
'RepeatMirrored' : 4,
|
||||
},
|
||||
|
||||
'SamplerFilterMode' : {
|
||||
'Nearest' : 0,
|
||||
'Linear' : 1,
|
||||
},
|
||||
|
||||
'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,
|
||||
},
|
||||
|
||||
'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,
|
||||
},
|
||||
|
||||
'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,
|
||||
},
|
||||
|
||||
'ImageOperandsShift' : {
|
||||
'Bias' : 0,
|
||||
'Lod' : 1,
|
||||
'Grad' : 2,
|
||||
'ConstOffset' : 3,
|
||||
'Offset' : 4,
|
||||
'ConstOffsets' : 5,
|
||||
'Sample' : 6,
|
||||
'MinLod' : 7,
|
||||
},
|
||||
|
||||
'ImageOperandsMask' : {
|
||||
'MaskNone' : 0,
|
||||
'Bias' : 0x00000001,
|
||||
'Lod' : 0x00000002,
|
||||
'Grad' : 0x00000004,
|
||||
'ConstOffset' : 0x00000008,
|
||||
'Offset' : 0x00000010,
|
||||
'ConstOffsets' : 0x00000020,
|
||||
'Sample' : 0x00000040,
|
||||
'MinLod' : 0x00000080,
|
||||
},
|
||||
|
||||
'FPFastMathModeShift' : {
|
||||
'NotNaN' : 0,
|
||||
'NotInf' : 1,
|
||||
'NSZ' : 2,
|
||||
'AllowRecip' : 3,
|
||||
'Fast' : 4,
|
||||
},
|
||||
|
||||
'FPFastMathModeMask' : {
|
||||
'MaskNone' : 0,
|
||||
'NotNaN' : 0x00000001,
|
||||
'NotInf' : 0x00000002,
|
||||
'NSZ' : 0x00000004,
|
||||
'AllowRecip' : 0x00000008,
|
||||
'Fast' : 0x00000010,
|
||||
},
|
||||
|
||||
'FPRoundingMode' : {
|
||||
'RTE' : 0,
|
||||
'RTZ' : 1,
|
||||
'RTP' : 2,
|
||||
'RTN' : 3,
|
||||
},
|
||||
|
||||
'LinkageType' : {
|
||||
'Export' : 0,
|
||||
'Import' : 1,
|
||||
},
|
||||
|
||||
'AccessQualifier' : {
|
||||
'ReadOnly' : 0,
|
||||
'WriteOnly' : 1,
|
||||
'ReadWrite' : 2,
|
||||
},
|
||||
|
||||
'FunctionParameterAttribute' : {
|
||||
'Zext' : 0,
|
||||
'Sext' : 1,
|
||||
'ByVal' : 2,
|
||||
'Sret' : 3,
|
||||
'NoAlias' : 4,
|
||||
'NoCapture' : 5,
|
||||
'NoWrite' : 6,
|
||||
'NoReadWrite' : 7,
|
||||
},
|
||||
|
||||
'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,
|
||||
'MaxByteOffset' : 45,
|
||||
'ExplicitInterpAMD' : 4999,
|
||||
'OverrideCoverageNV' : 5248,
|
||||
'PassthroughNV' : 5250,
|
||||
'ViewportRelativeNV' : 5252,
|
||||
'SecondaryViewportRelativeNV' : 5256,
|
||||
'HlslCounterBufferGOOGLE' : 5634,
|
||||
'HlslSemanticGOOGLE' : 5635,
|
||||
},
|
||||
|
||||
'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,
|
||||
},
|
||||
|
||||
'SelectionControlShift' : {
|
||||
'Flatten' : 0,
|
||||
'DontFlatten' : 1,
|
||||
},
|
||||
|
||||
'SelectionControlMask' : {
|
||||
'MaskNone' : 0,
|
||||
'Flatten' : 0x00000001,
|
||||
'DontFlatten' : 0x00000002,
|
||||
},
|
||||
|
||||
'LoopControlShift' : {
|
||||
'Unroll' : 0,
|
||||
'DontUnroll' : 1,
|
||||
'DependencyInfinite' : 2,
|
||||
'DependencyLength' : 3,
|
||||
},
|
||||
|
||||
'LoopControlMask' : {
|
||||
'MaskNone' : 0,
|
||||
'Unroll' : 0x00000001,
|
||||
'DontUnroll' : 0x00000002,
|
||||
'DependencyInfinite' : 0x00000004,
|
||||
'DependencyLength' : 0x00000008,
|
||||
},
|
||||
|
||||
'FunctionControlShift' : {
|
||||
'Inline' : 0,
|
||||
'DontInline' : 1,
|
||||
'Pure' : 2,
|
||||
'Const' : 3,
|
||||
},
|
||||
|
||||
'FunctionControlMask' : {
|
||||
'MaskNone' : 0,
|
||||
'Inline' : 0x00000001,
|
||||
'DontInline' : 0x00000002,
|
||||
'Pure' : 0x00000004,
|
||||
'Const' : 0x00000008,
|
||||
},
|
||||
|
||||
'MemorySemanticsShift' : {
|
||||
'Acquire' : 1,
|
||||
'Release' : 2,
|
||||
'AcquireRelease' : 3,
|
||||
'SequentiallyConsistent' : 4,
|
||||
'UniformMemory' : 6,
|
||||
'SubgroupMemory' : 7,
|
||||
'WorkgroupMemory' : 8,
|
||||
'CrossWorkgroupMemory' : 9,
|
||||
'AtomicCounterMemory' : 10,
|
||||
'ImageMemory' : 11,
|
||||
},
|
||||
|
||||
'MemorySemanticsMask' : {
|
||||
'MaskNone' : 0,
|
||||
'Acquire' : 0x00000002,
|
||||
'Release' : 0x00000004,
|
||||
'AcquireRelease' : 0x00000008,
|
||||
'SequentiallyConsistent' : 0x00000010,
|
||||
'UniformMemory' : 0x00000040,
|
||||
'SubgroupMemory' : 0x00000080,
|
||||
'WorkgroupMemory' : 0x00000100,
|
||||
'CrossWorkgroupMemory' : 0x00000200,
|
||||
'AtomicCounterMemory' : 0x00000400,
|
||||
'ImageMemory' : 0x00000800,
|
||||
},
|
||||
|
||||
'MemoryAccessShift' : {
|
||||
'Volatile' : 0,
|
||||
'Aligned' : 1,
|
||||
'Nontemporal' : 2,
|
||||
},
|
||||
|
||||
'MemoryAccessMask' : {
|
||||
'MaskNone' : 0,
|
||||
'Volatile' : 0x00000001,
|
||||
'Aligned' : 0x00000002,
|
||||
'Nontemporal' : 0x00000004,
|
||||
},
|
||||
|
||||
'Scope' : {
|
||||
'CrossDevice' : 0,
|
||||
'Device' : 1,
|
||||
'Workgroup' : 2,
|
||||
'Subgroup' : 3,
|
||||
'Invocation' : 4,
|
||||
},
|
||||
|
||||
'GroupOperation' : {
|
||||
'Reduce' : 0,
|
||||
'InclusiveScan' : 1,
|
||||
'ExclusiveScan' : 2,
|
||||
},
|
||||
|
||||
'KernelEnqueueFlags' : {
|
||||
'NoWait' : 0,
|
||||
'WaitKernel' : 1,
|
||||
'WaitWorkGroup' : 2,
|
||||
},
|
||||
|
||||
'KernelProfilingInfoShift' : {
|
||||
'CmdExecTime' : 0,
|
||||
},
|
||||
|
||||
'KernelProfilingInfoMask' : {
|
||||
'MaskNone' : 0,
|
||||
'CmdExecTime' : 0x00000001,
|
||||
},
|
||||
|
||||
'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,
|
||||
'SubgroupDispatch' : 58,
|
||||
'NamedBarrier' : 59,
|
||||
'PipeStorage' : 60,
|
||||
'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,
|
||||
},
|
||||
|
||||
'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,
|
||||
'OpSizeOf' : 321,
|
||||
'OpTypePipeStorage' : 322,
|
||||
'OpConstantPipeStorage' : 323,
|
||||
'OpCreatePipeFromPipeStorage' : 324,
|
||||
'OpGetKernelLocalSizeForSubgroupCount' : 325,
|
||||
'OpGetKernelMaxNumSubgroups' : 326,
|
||||
'OpTypeNamedBarrier' : 327,
|
||||
'OpNamedBarrierInitialize' : 328,
|
||||
'OpMemoryNamedBarrier' : 329,
|
||||
'OpModuleProcessed' : 330,
|
||||
'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,
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
131
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/GLSL.std.450.h
vendored
Executable file
131
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/GLSL.std.450.h
vendored
Executable file
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
** Copyright (c) 2014-2016 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 GLSLstd450_H
|
||||
#define GLSLstd450_H
|
||||
|
||||
static const int GLSLstd450Version = 100;
|
||||
static const int GLSLstd450Revision = 3;
|
||||
|
||||
enum GLSLstd450 {
|
||||
GLSLstd450Bad = 0, // Don't use
|
||||
|
||||
GLSLstd450Round = 1,
|
||||
GLSLstd450RoundEven = 2,
|
||||
GLSLstd450Trunc = 3,
|
||||
GLSLstd450FAbs = 4,
|
||||
GLSLstd450SAbs = 5,
|
||||
GLSLstd450FSign = 6,
|
||||
GLSLstd450SSign = 7,
|
||||
GLSLstd450Floor = 8,
|
||||
GLSLstd450Ceil = 9,
|
||||
GLSLstd450Fract = 10,
|
||||
|
||||
GLSLstd450Radians = 11,
|
||||
GLSLstd450Degrees = 12,
|
||||
GLSLstd450Sin = 13,
|
||||
GLSLstd450Cos = 14,
|
||||
GLSLstd450Tan = 15,
|
||||
GLSLstd450Asin = 16,
|
||||
GLSLstd450Acos = 17,
|
||||
GLSLstd450Atan = 18,
|
||||
GLSLstd450Sinh = 19,
|
||||
GLSLstd450Cosh = 20,
|
||||
GLSLstd450Tanh = 21,
|
||||
GLSLstd450Asinh = 22,
|
||||
GLSLstd450Acosh = 23,
|
||||
GLSLstd450Atanh = 24,
|
||||
GLSLstd450Atan2 = 25,
|
||||
|
||||
GLSLstd450Pow = 26,
|
||||
GLSLstd450Exp = 27,
|
||||
GLSLstd450Log = 28,
|
||||
GLSLstd450Exp2 = 29,
|
||||
GLSLstd450Log2 = 30,
|
||||
GLSLstd450Sqrt = 31,
|
||||
GLSLstd450InverseSqrt = 32,
|
||||
|
||||
GLSLstd450Determinant = 33,
|
||||
GLSLstd450MatrixInverse = 34,
|
||||
|
||||
GLSLstd450Modf = 35, // second operand needs an OpVariable to write to
|
||||
GLSLstd450ModfStruct = 36, // no OpVariable operand
|
||||
GLSLstd450FMin = 37,
|
||||
GLSLstd450UMin = 38,
|
||||
GLSLstd450SMin = 39,
|
||||
GLSLstd450FMax = 40,
|
||||
GLSLstd450UMax = 41,
|
||||
GLSLstd450SMax = 42,
|
||||
GLSLstd450FClamp = 43,
|
||||
GLSLstd450UClamp = 44,
|
||||
GLSLstd450SClamp = 45,
|
||||
GLSLstd450FMix = 46,
|
||||
GLSLstd450IMix = 47, // Reserved
|
||||
GLSLstd450Step = 48,
|
||||
GLSLstd450SmoothStep = 49,
|
||||
|
||||
GLSLstd450Fma = 50,
|
||||
GLSLstd450Frexp = 51, // second operand needs an OpVariable to write to
|
||||
GLSLstd450FrexpStruct = 52, // no OpVariable operand
|
||||
GLSLstd450Ldexp = 53,
|
||||
|
||||
GLSLstd450PackSnorm4x8 = 54,
|
||||
GLSLstd450PackUnorm4x8 = 55,
|
||||
GLSLstd450PackSnorm2x16 = 56,
|
||||
GLSLstd450PackUnorm2x16 = 57,
|
||||
GLSLstd450PackHalf2x16 = 58,
|
||||
GLSLstd450PackDouble2x32 = 59,
|
||||
GLSLstd450UnpackSnorm2x16 = 60,
|
||||
GLSLstd450UnpackUnorm2x16 = 61,
|
||||
GLSLstd450UnpackHalf2x16 = 62,
|
||||
GLSLstd450UnpackSnorm4x8 = 63,
|
||||
GLSLstd450UnpackUnorm4x8 = 64,
|
||||
GLSLstd450UnpackDouble2x32 = 65,
|
||||
|
||||
GLSLstd450Length = 66,
|
||||
GLSLstd450Distance = 67,
|
||||
GLSLstd450Cross = 68,
|
||||
GLSLstd450Normalize = 69,
|
||||
GLSLstd450FaceForward = 70,
|
||||
GLSLstd450Reflect = 71,
|
||||
GLSLstd450Refract = 72,
|
||||
|
||||
GLSLstd450FindILsb = 73,
|
||||
GLSLstd450FindSMsb = 74,
|
||||
GLSLstd450FindUMsb = 75,
|
||||
|
||||
GLSLstd450InterpolateAtCentroid = 76,
|
||||
GLSLstd450InterpolateAtSample = 77,
|
||||
GLSLstd450InterpolateAtOffset = 78,
|
||||
|
||||
GLSLstd450NMin = 79,
|
||||
GLSLstd450NMax = 80,
|
||||
GLSLstd450NClamp = 81,
|
||||
|
||||
GLSLstd450Count
|
||||
};
|
||||
|
||||
#endif // #ifndef GLSLstd450_H
|
||||
210
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/OpenCL.std.h
vendored
Executable file
210
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/OpenCL.std.h
vendored
Executable file
@@ -0,0 +1,210 @@
|
||||
/*
|
||||
** Copyright (c) 2015-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.
|
||||
*/
|
||||
|
||||
namespace OpenCLLIB {
|
||||
|
||||
enum Entrypoints {
|
||||
|
||||
// Section 2.1: Math extended instructions
|
||||
Acos = 0,
|
||||
Acosh = 1,
|
||||
Acospi = 2,
|
||||
Asin = 3,
|
||||
Asinh = 4,
|
||||
Asinpi = 5,
|
||||
Atan = 6,
|
||||
Atan2 = 7,
|
||||
Atanh = 8,
|
||||
Atanpi = 9,
|
||||
Atan2pi = 10,
|
||||
Cbrt = 11,
|
||||
Ceil = 12,
|
||||
Copysign = 13,
|
||||
Cos = 14,
|
||||
Cosh = 15,
|
||||
Cospi = 16,
|
||||
Erfc = 17,
|
||||
Erf = 18,
|
||||
Exp = 19,
|
||||
Exp2 = 20,
|
||||
Exp10 = 21,
|
||||
Expm1 = 22,
|
||||
Fabs = 23,
|
||||
Fdim = 24,
|
||||
Floor = 25,
|
||||
Fma = 26,
|
||||
Fmax = 27,
|
||||
Fmin = 28,
|
||||
Fmod = 29,
|
||||
Fract = 30,
|
||||
Frexp = 31,
|
||||
Hypot = 32,
|
||||
Ilogb = 33,
|
||||
Ldexp = 34,
|
||||
Lgamma = 35,
|
||||
Lgamma_r = 36,
|
||||
Log = 37,
|
||||
Log2 = 38,
|
||||
Log10 = 39,
|
||||
Log1p = 40,
|
||||
Logb = 41,
|
||||
Mad = 42,
|
||||
Maxmag = 43,
|
||||
Minmag = 44,
|
||||
Modf = 45,
|
||||
Nan = 46,
|
||||
Nextafter = 47,
|
||||
Pow = 48,
|
||||
Pown = 49,
|
||||
Powr = 50,
|
||||
Remainder = 51,
|
||||
Remquo = 52,
|
||||
Rint = 53,
|
||||
Rootn = 54,
|
||||
Round = 55,
|
||||
Rsqrt = 56,
|
||||
Sin = 57,
|
||||
Sincos = 58,
|
||||
Sinh = 59,
|
||||
Sinpi = 60,
|
||||
Sqrt = 61,
|
||||
Tan = 62,
|
||||
Tanh = 63,
|
||||
Tanpi = 64,
|
||||
Tgamma = 65,
|
||||
Trunc = 66,
|
||||
Half_cos = 67,
|
||||
Half_divide = 68,
|
||||
Half_exp = 69,
|
||||
Half_exp2 = 70,
|
||||
Half_exp10 = 71,
|
||||
Half_log = 72,
|
||||
Half_log2 = 73,
|
||||
Half_log10 = 74,
|
||||
Half_powr = 75,
|
||||
Half_recip = 76,
|
||||
Half_rsqrt = 77,
|
||||
Half_sin = 78,
|
||||
Half_sqrt = 79,
|
||||
Half_tan = 80,
|
||||
Native_cos = 81,
|
||||
Native_divide = 82,
|
||||
Native_exp = 83,
|
||||
Native_exp2 = 84,
|
||||
Native_exp10 = 85,
|
||||
Native_log = 86,
|
||||
Native_log2 = 87,
|
||||
Native_log10 = 88,
|
||||
Native_powr = 89,
|
||||
Native_recip = 90,
|
||||
Native_rsqrt = 91,
|
||||
Native_sin = 92,
|
||||
Native_sqrt = 93,
|
||||
Native_tan = 94,
|
||||
|
||||
// Section 2.2: Integer instructions
|
||||
SAbs = 141,
|
||||
SAbs_diff = 142,
|
||||
SAdd_sat = 143,
|
||||
UAdd_sat = 144,
|
||||
SHadd = 145,
|
||||
UHadd = 146,
|
||||
SRhadd = 147,
|
||||
URhadd = 148,
|
||||
SClamp = 149,
|
||||
UClamp = 150,
|
||||
Clz = 151,
|
||||
Ctz = 152,
|
||||
SMad_hi = 153,
|
||||
UMad_sat = 154,
|
||||
SMad_sat = 155,
|
||||
SMax = 156,
|
||||
UMax = 157,
|
||||
SMin = 158,
|
||||
UMin = 159,
|
||||
SMul_hi = 160,
|
||||
Rotate = 161,
|
||||
SSub_sat = 162,
|
||||
USub_sat = 163,
|
||||
U_Upsample = 164,
|
||||
S_Upsample = 165,
|
||||
Popcount = 166,
|
||||
SMad24 = 167,
|
||||
UMad24 = 168,
|
||||
SMul24 = 169,
|
||||
UMul24 = 170,
|
||||
UAbs = 201,
|
||||
UAbs_diff = 202,
|
||||
UMul_hi = 203,
|
||||
UMad_hi = 204,
|
||||
|
||||
// Section 2.3: Common instructions
|
||||
FClamp = 95,
|
||||
Degrees = 96,
|
||||
FMax_common = 97,
|
||||
FMin_common = 98,
|
||||
Mix = 99,
|
||||
Radians = 100,
|
||||
Step = 101,
|
||||
Smoothstep = 102,
|
||||
Sign = 103,
|
||||
|
||||
// Section 2.4: Geometric instructions
|
||||
Cross = 104,
|
||||
Distance = 105,
|
||||
Length = 106,
|
||||
Normalize = 107,
|
||||
Fast_distance = 108,
|
||||
Fast_length = 109,
|
||||
Fast_normalize = 110,
|
||||
|
||||
// Section 2.5: Relational instructions
|
||||
Bitselect = 186,
|
||||
Select = 187,
|
||||
|
||||
// Section 2.6: Vector Data Load and Store instructions
|
||||
Vloadn = 171,
|
||||
Vstoren = 172,
|
||||
Vload_half = 173,
|
||||
Vload_halfn = 174,
|
||||
Vstore_half = 175,
|
||||
Vstore_half_r = 176,
|
||||
Vstore_halfn = 177,
|
||||
Vstore_halfn_r = 178,
|
||||
Vloada_halfn = 179,
|
||||
Vstorea_halfn = 180,
|
||||
Vstorea_halfn_r = 181,
|
||||
|
||||
// Section 2.7: Miscellaneous Vector instructions
|
||||
Shuffle = 182,
|
||||
Shuffle2 = 183,
|
||||
|
||||
// Section 2.8: Misc instructions
|
||||
Printf = 184,
|
||||
Prefetch = 185,
|
||||
};
|
||||
|
||||
} // end namespace OpenCLLIB
|
||||
642
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/extinst.glsl.std.450.grammar.json
vendored
Executable file
642
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/extinst.glsl.std.450.grammar.json
vendored
Executable file
@@ -0,0 +1,642 @@
|
||||
{
|
||||
"copyright" : [
|
||||
"Copyright (c) 2014-2016 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" : 2,
|
||||
"instructions" : [
|
||||
{
|
||||
"opname" : "Round",
|
||||
"opcode" : 1,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "RoundEven",
|
||||
"opcode" : 2,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Trunc",
|
||||
"opcode" : 3,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FAbs",
|
||||
"opcode" : 4,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SAbs",
|
||||
"opcode" : 5,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FSign",
|
||||
"opcode" : 6,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SSign",
|
||||
"opcode" : 7,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Floor",
|
||||
"opcode" : 8,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Ceil",
|
||||
"opcode" : 9,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Fract",
|
||||
"opcode" : 10,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Radians",
|
||||
"opcode" : 11,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'degrees'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Degrees",
|
||||
"opcode" : 12,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'radians'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Sin",
|
||||
"opcode" : 13,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Cos",
|
||||
"opcode" : 14,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Tan",
|
||||
"opcode" : 15,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Asin",
|
||||
"opcode" : 16,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Acos",
|
||||
"opcode" : 17,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Atan",
|
||||
"opcode" : 18,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'y_over_x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Sinh",
|
||||
"opcode" : 19,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Cosh",
|
||||
"opcode" : 20,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Tanh",
|
||||
"opcode" : 21,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Asinh",
|
||||
"opcode" : 22,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Acosh",
|
||||
"opcode" : 23,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Atanh",
|
||||
"opcode" : 24,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Atan2",
|
||||
"opcode" : 25,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'y'" },
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Pow",
|
||||
"opcode" : 26,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Exp",
|
||||
"opcode" : 27,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Log",
|
||||
"opcode" : 28,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Exp2",
|
||||
"opcode" : 29,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Log2",
|
||||
"opcode" : 30,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Sqrt",
|
||||
"opcode" : 31,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "InverseSqrt",
|
||||
"opcode" : 32,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Determinant",
|
||||
"opcode" : 33,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "MatrixInverse",
|
||||
"opcode" : 34,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Modf",
|
||||
"opcode" : 35,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'i'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "ModfStruct",
|
||||
"opcode" : 36,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FMin",
|
||||
"opcode" : 37,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UMin",
|
||||
"opcode" : 38,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SMin",
|
||||
"opcode" : 39,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FMax",
|
||||
"opcode" : 40,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UMax",
|
||||
"opcode" : 41,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SMax",
|
||||
"opcode" : 42,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FClamp",
|
||||
"opcode" : 43,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'minVal'" },
|
||||
{ "kind" : "IdRef", "name" : "'maxVal'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UClamp",
|
||||
"opcode" : 44,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'minVal'" },
|
||||
{ "kind" : "IdRef", "name" : "'maxVal'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SClamp",
|
||||
"opcode" : 45,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'minVal'" },
|
||||
{ "kind" : "IdRef", "name" : "'maxVal'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FMix",
|
||||
"opcode" : 46,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" },
|
||||
{ "kind" : "IdRef", "name" : "'a'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "IMix",
|
||||
"opcode" : 47,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" },
|
||||
{ "kind" : "IdRef", "name" : "'a'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Step",
|
||||
"opcode" : 48,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'edge'" },
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SmoothStep",
|
||||
"opcode" : 49,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'edge0'" },
|
||||
{ "kind" : "IdRef", "name" : "'edge1'" },
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Fma",
|
||||
"opcode" : 50,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'a'" },
|
||||
{ "kind" : "IdRef", "name" : "'b'" },
|
||||
{ "kind" : "IdRef", "name" : "'c'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Frexp",
|
||||
"opcode" : 51,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'exp'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FrexpStruct",
|
||||
"opcode" : 52,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Ldexp",
|
||||
"opcode" : 53,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'exp'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackSnorm4x8",
|
||||
"opcode" : 54,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackUnorm4x8",
|
||||
"opcode" : 55,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackSnorm2x16",
|
||||
"opcode" : 56,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackUnorm2x16",
|
||||
"opcode" : 57,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackHalf2x16",
|
||||
"opcode" : 58,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackDouble2x32",
|
||||
"opcode" : 59,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
],
|
||||
"capabilities" : [ "Float64" ]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackSnorm2x16",
|
||||
"opcode" : 60,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'p'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackUnorm2x16",
|
||||
"opcode" : 61,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'p'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackHalf2x16",
|
||||
"opcode" : 62,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackSnorm4x8",
|
||||
"opcode" : 63,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'p'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackUnorm4x8",
|
||||
"opcode" : 64,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'p'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackDouble2x32",
|
||||
"opcode" : 65,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
],
|
||||
"capabilities" : [ "Float64" ]
|
||||
},
|
||||
{
|
||||
"opname" : "Length",
|
||||
"opcode" : 66,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Distance",
|
||||
"opcode" : 67,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'p0'" },
|
||||
{ "kind" : "IdRef", "name" : "'p1'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Cross",
|
||||
"opcode" : 68,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Normalize",
|
||||
"opcode" : 69,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FaceForward",
|
||||
"opcode" : 70,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'N'" },
|
||||
{ "kind" : "IdRef", "name" : "'I'" },
|
||||
{ "kind" : "IdRef", "name" : "'Nref'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Reflect",
|
||||
"opcode" : 71,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'I'" },
|
||||
{ "kind" : "IdRef", "name" : "'N'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Refract",
|
||||
"opcode" : 72,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'I'" },
|
||||
{ "kind" : "IdRef", "name" : "'N'" },
|
||||
{ "kind" : "IdRef", "name" : "'eta'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FindILsb",
|
||||
"opcode" : 73,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'Value'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FindSMsb",
|
||||
"opcode" : 74,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'Value'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FindUMsb",
|
||||
"opcode" : 75,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'Value'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "InterpolateAtCentroid",
|
||||
"opcode" : 76,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'interpolant'" }
|
||||
],
|
||||
"capabilities" : [ "InterpolationFunction" ]
|
||||
},
|
||||
{
|
||||
"opname" : "InterpolateAtSample",
|
||||
"opcode" : 77,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'interpolant'" },
|
||||
{ "kind" : "IdRef", "name" : "'sample'" }
|
||||
],
|
||||
"capabilities" : [ "InterpolationFunction" ]
|
||||
},
|
||||
{
|
||||
"opname" : "InterpolateAtOffset",
|
||||
"opcode" : 78,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'interpolant'" },
|
||||
{ "kind" : "IdRef", "name" : "'offset'" }
|
||||
],
|
||||
"capabilities" : [ "InterpolationFunction" ]
|
||||
},
|
||||
{
|
||||
"opname" : "NMin",
|
||||
"opcode" : 79,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "NMax",
|
||||
"opcode" : 80,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "NClamp",
|
||||
"opcode" : 81,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'minVal'" },
|
||||
{ "kind" : "IdRef", "name" : "'maxVal'" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
1279
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/extinst.opencl.std.100.grammar.json
vendored
Executable file
1279
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/extinst.opencl.std.100.grammar.json
vendored
Executable file
File diff suppressed because it is too large
Load Diff
5986
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/spirv.core.grammar.json
vendored
Executable file
5986
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/spirv.core.grammar.json
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1021
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/spirv.h
vendored
Executable file
1021
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/spirv.h
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1030
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/spirv.hpp
vendored
Executable file
1030
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/spirv.hpp
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1030
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/spirv.hpp11
vendored
Executable file
1030
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/spirv.hpp11
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1046
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/spirv.json
vendored
Executable file
1046
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/spirv.json
vendored
Executable file
File diff suppressed because it is too large
Load Diff
977
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/spirv.lua
vendored
Executable file
977
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/spirv.lua
vendored
Executable file
@@ -0,0 +1,977 @@
|
||||
-- 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 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']
|
||||
--
|
||||
-- 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.
|
||||
|
||||
spv = {
|
||||
MagicNumber = 0x07230203,
|
||||
Version = 0x00010200,
|
||||
Revision = 2,
|
||||
OpCodeMask = 0xffff,
|
||||
WordCountShift = 16,
|
||||
|
||||
SourceLanguage = {
|
||||
Unknown = 0,
|
||||
ESSL = 1,
|
||||
GLSL = 2,
|
||||
OpenCL_C = 3,
|
||||
OpenCL_CPP = 4,
|
||||
HLSL = 5,
|
||||
},
|
||||
|
||||
ExecutionModel = {
|
||||
Vertex = 0,
|
||||
TessellationControl = 1,
|
||||
TessellationEvaluation = 2,
|
||||
Geometry = 3,
|
||||
Fragment = 4,
|
||||
GLCompute = 5,
|
||||
Kernel = 6,
|
||||
},
|
||||
|
||||
AddressingModel = {
|
||||
Logical = 0,
|
||||
Physical32 = 1,
|
||||
Physical64 = 2,
|
||||
},
|
||||
|
||||
MemoryModel = {
|
||||
Simple = 0,
|
||||
GLSL450 = 1,
|
||||
OpenCL = 2,
|
||||
},
|
||||
|
||||
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,
|
||||
Initializer = 33,
|
||||
Finalizer = 34,
|
||||
SubgroupSize = 35,
|
||||
SubgroupsPerWorkgroup = 36,
|
||||
SubgroupsPerWorkgroupId = 37,
|
||||
LocalSizeId = 38,
|
||||
LocalSizeHintId = 39,
|
||||
PostDepthCoverage = 4446,
|
||||
StencilRefReplacingEXT = 5027,
|
||||
},
|
||||
|
||||
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,
|
||||
},
|
||||
|
||||
Dim = {
|
||||
Dim1D = 0,
|
||||
Dim2D = 1,
|
||||
Dim3D = 2,
|
||||
Cube = 3,
|
||||
Rect = 4,
|
||||
Buffer = 5,
|
||||
SubpassData = 6,
|
||||
},
|
||||
|
||||
SamplerAddressingMode = {
|
||||
None = 0,
|
||||
ClampToEdge = 1,
|
||||
Clamp = 2,
|
||||
Repeat = 3,
|
||||
RepeatMirrored = 4,
|
||||
},
|
||||
|
||||
SamplerFilterMode = {
|
||||
Nearest = 0,
|
||||
Linear = 1,
|
||||
},
|
||||
|
||||
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,
|
||||
},
|
||||
|
||||
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,
|
||||
},
|
||||
|
||||
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,
|
||||
},
|
||||
|
||||
ImageOperandsShift = {
|
||||
Bias = 0,
|
||||
Lod = 1,
|
||||
Grad = 2,
|
||||
ConstOffset = 3,
|
||||
Offset = 4,
|
||||
ConstOffsets = 5,
|
||||
Sample = 6,
|
||||
MinLod = 7,
|
||||
},
|
||||
|
||||
ImageOperandsMask = {
|
||||
MaskNone = 0,
|
||||
Bias = 0x00000001,
|
||||
Lod = 0x00000002,
|
||||
Grad = 0x00000004,
|
||||
ConstOffset = 0x00000008,
|
||||
Offset = 0x00000010,
|
||||
ConstOffsets = 0x00000020,
|
||||
Sample = 0x00000040,
|
||||
MinLod = 0x00000080,
|
||||
},
|
||||
|
||||
FPFastMathModeShift = {
|
||||
NotNaN = 0,
|
||||
NotInf = 1,
|
||||
NSZ = 2,
|
||||
AllowRecip = 3,
|
||||
Fast = 4,
|
||||
},
|
||||
|
||||
FPFastMathModeMask = {
|
||||
MaskNone = 0,
|
||||
NotNaN = 0x00000001,
|
||||
NotInf = 0x00000002,
|
||||
NSZ = 0x00000004,
|
||||
AllowRecip = 0x00000008,
|
||||
Fast = 0x00000010,
|
||||
},
|
||||
|
||||
FPRoundingMode = {
|
||||
RTE = 0,
|
||||
RTZ = 1,
|
||||
RTP = 2,
|
||||
RTN = 3,
|
||||
},
|
||||
|
||||
LinkageType = {
|
||||
Export = 0,
|
||||
Import = 1,
|
||||
},
|
||||
|
||||
AccessQualifier = {
|
||||
ReadOnly = 0,
|
||||
WriteOnly = 1,
|
||||
ReadWrite = 2,
|
||||
},
|
||||
|
||||
FunctionParameterAttribute = {
|
||||
Zext = 0,
|
||||
Sext = 1,
|
||||
ByVal = 2,
|
||||
Sret = 3,
|
||||
NoAlias = 4,
|
||||
NoCapture = 5,
|
||||
NoWrite = 6,
|
||||
NoReadWrite = 7,
|
||||
},
|
||||
|
||||
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,
|
||||
MaxByteOffset = 45,
|
||||
AlignmentId = 46,
|
||||
MaxByteOffsetId = 47,
|
||||
ExplicitInterpAMD = 4999,
|
||||
OverrideCoverageNV = 5248,
|
||||
PassthroughNV = 5250,
|
||||
ViewportRelativeNV = 5252,
|
||||
SecondaryViewportRelativeNV = 5256,
|
||||
HlslCounterBufferGOOGLE = 5634,
|
||||
HlslSemanticGOOGLE = 5635,
|
||||
},
|
||||
|
||||
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,
|
||||
},
|
||||
|
||||
SelectionControlShift = {
|
||||
Flatten = 0,
|
||||
DontFlatten = 1,
|
||||
},
|
||||
|
||||
SelectionControlMask = {
|
||||
MaskNone = 0,
|
||||
Flatten = 0x00000001,
|
||||
DontFlatten = 0x00000002,
|
||||
},
|
||||
|
||||
LoopControlShift = {
|
||||
Unroll = 0,
|
||||
DontUnroll = 1,
|
||||
DependencyInfinite = 2,
|
||||
DependencyLength = 3,
|
||||
},
|
||||
|
||||
LoopControlMask = {
|
||||
MaskNone = 0,
|
||||
Unroll = 0x00000001,
|
||||
DontUnroll = 0x00000002,
|
||||
DependencyInfinite = 0x00000004,
|
||||
DependencyLength = 0x00000008,
|
||||
},
|
||||
|
||||
FunctionControlShift = {
|
||||
Inline = 0,
|
||||
DontInline = 1,
|
||||
Pure = 2,
|
||||
Const = 3,
|
||||
},
|
||||
|
||||
FunctionControlMask = {
|
||||
MaskNone = 0,
|
||||
Inline = 0x00000001,
|
||||
DontInline = 0x00000002,
|
||||
Pure = 0x00000004,
|
||||
Const = 0x00000008,
|
||||
},
|
||||
|
||||
MemorySemanticsShift = {
|
||||
Acquire = 1,
|
||||
Release = 2,
|
||||
AcquireRelease = 3,
|
||||
SequentiallyConsistent = 4,
|
||||
UniformMemory = 6,
|
||||
SubgroupMemory = 7,
|
||||
WorkgroupMemory = 8,
|
||||
CrossWorkgroupMemory = 9,
|
||||
AtomicCounterMemory = 10,
|
||||
ImageMemory = 11,
|
||||
},
|
||||
|
||||
MemorySemanticsMask = {
|
||||
MaskNone = 0,
|
||||
Acquire = 0x00000002,
|
||||
Release = 0x00000004,
|
||||
AcquireRelease = 0x00000008,
|
||||
SequentiallyConsistent = 0x00000010,
|
||||
UniformMemory = 0x00000040,
|
||||
SubgroupMemory = 0x00000080,
|
||||
WorkgroupMemory = 0x00000100,
|
||||
CrossWorkgroupMemory = 0x00000200,
|
||||
AtomicCounterMemory = 0x00000400,
|
||||
ImageMemory = 0x00000800,
|
||||
},
|
||||
|
||||
MemoryAccessShift = {
|
||||
Volatile = 0,
|
||||
Aligned = 1,
|
||||
Nontemporal = 2,
|
||||
},
|
||||
|
||||
MemoryAccessMask = {
|
||||
MaskNone = 0,
|
||||
Volatile = 0x00000001,
|
||||
Aligned = 0x00000002,
|
||||
Nontemporal = 0x00000004,
|
||||
},
|
||||
|
||||
Scope = {
|
||||
CrossDevice = 0,
|
||||
Device = 1,
|
||||
Workgroup = 2,
|
||||
Subgroup = 3,
|
||||
Invocation = 4,
|
||||
},
|
||||
|
||||
GroupOperation = {
|
||||
Reduce = 0,
|
||||
InclusiveScan = 1,
|
||||
ExclusiveScan = 2,
|
||||
},
|
||||
|
||||
KernelEnqueueFlags = {
|
||||
NoWait = 0,
|
||||
WaitKernel = 1,
|
||||
WaitWorkGroup = 2,
|
||||
},
|
||||
|
||||
KernelProfilingInfoShift = {
|
||||
CmdExecTime = 0,
|
||||
},
|
||||
|
||||
KernelProfilingInfoMask = {
|
||||
MaskNone = 0,
|
||||
CmdExecTime = 0x00000001,
|
||||
},
|
||||
|
||||
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,
|
||||
SubgroupDispatch = 58,
|
||||
NamedBarrier = 59,
|
||||
PipeStorage = 60,
|
||||
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,
|
||||
},
|
||||
|
||||
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,
|
||||
OpSizeOf = 321,
|
||||
OpTypePipeStorage = 322,
|
||||
OpConstantPipeStorage = 323,
|
||||
OpCreatePipeFromPipeStorage = 324,
|
||||
OpGetKernelLocalSizeForSubgroupCount = 325,
|
||||
OpGetKernelMaxNumSubgroups = 326,
|
||||
OpTypeNamedBarrier = 327,
|
||||
OpNamedBarrierInitialize = 328,
|
||||
OpMemoryNamedBarrier = 329,
|
||||
OpModuleProcessed = 330,
|
||||
OpExecutionModeId = 331,
|
||||
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,
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
977
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/spirv.py
vendored
Executable file
977
externals/sirit/externals/SPIRV-Headers/include/spirv/1.2/spirv.py
vendored
Executable file
@@ -0,0 +1,977 @@
|
||||
# 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 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']
|
||||
#
|
||||
# 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.
|
||||
|
||||
spv = {
|
||||
'MagicNumber' : 0x07230203,
|
||||
'Version' : 0x00010200,
|
||||
'Revision' : 2,
|
||||
'OpCodeMask' : 0xffff,
|
||||
'WordCountShift' : 16,
|
||||
|
||||
'SourceLanguage' : {
|
||||
'Unknown' : 0,
|
||||
'ESSL' : 1,
|
||||
'GLSL' : 2,
|
||||
'OpenCL_C' : 3,
|
||||
'OpenCL_CPP' : 4,
|
||||
'HLSL' : 5,
|
||||
},
|
||||
|
||||
'ExecutionModel' : {
|
||||
'Vertex' : 0,
|
||||
'TessellationControl' : 1,
|
||||
'TessellationEvaluation' : 2,
|
||||
'Geometry' : 3,
|
||||
'Fragment' : 4,
|
||||
'GLCompute' : 5,
|
||||
'Kernel' : 6,
|
||||
},
|
||||
|
||||
'AddressingModel' : {
|
||||
'Logical' : 0,
|
||||
'Physical32' : 1,
|
||||
'Physical64' : 2,
|
||||
},
|
||||
|
||||
'MemoryModel' : {
|
||||
'Simple' : 0,
|
||||
'GLSL450' : 1,
|
||||
'OpenCL' : 2,
|
||||
},
|
||||
|
||||
'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,
|
||||
'Initializer' : 33,
|
||||
'Finalizer' : 34,
|
||||
'SubgroupSize' : 35,
|
||||
'SubgroupsPerWorkgroup' : 36,
|
||||
'SubgroupsPerWorkgroupId' : 37,
|
||||
'LocalSizeId' : 38,
|
||||
'LocalSizeHintId' : 39,
|
||||
'PostDepthCoverage' : 4446,
|
||||
'StencilRefReplacingEXT' : 5027,
|
||||
},
|
||||
|
||||
'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,
|
||||
},
|
||||
|
||||
'Dim' : {
|
||||
'Dim1D' : 0,
|
||||
'Dim2D' : 1,
|
||||
'Dim3D' : 2,
|
||||
'Cube' : 3,
|
||||
'Rect' : 4,
|
||||
'Buffer' : 5,
|
||||
'SubpassData' : 6,
|
||||
},
|
||||
|
||||
'SamplerAddressingMode' : {
|
||||
'None' : 0,
|
||||
'ClampToEdge' : 1,
|
||||
'Clamp' : 2,
|
||||
'Repeat' : 3,
|
||||
'RepeatMirrored' : 4,
|
||||
},
|
||||
|
||||
'SamplerFilterMode' : {
|
||||
'Nearest' : 0,
|
||||
'Linear' : 1,
|
||||
},
|
||||
|
||||
'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,
|
||||
},
|
||||
|
||||
'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,
|
||||
},
|
||||
|
||||
'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,
|
||||
},
|
||||
|
||||
'ImageOperandsShift' : {
|
||||
'Bias' : 0,
|
||||
'Lod' : 1,
|
||||
'Grad' : 2,
|
||||
'ConstOffset' : 3,
|
||||
'Offset' : 4,
|
||||
'ConstOffsets' : 5,
|
||||
'Sample' : 6,
|
||||
'MinLod' : 7,
|
||||
},
|
||||
|
||||
'ImageOperandsMask' : {
|
||||
'MaskNone' : 0,
|
||||
'Bias' : 0x00000001,
|
||||
'Lod' : 0x00000002,
|
||||
'Grad' : 0x00000004,
|
||||
'ConstOffset' : 0x00000008,
|
||||
'Offset' : 0x00000010,
|
||||
'ConstOffsets' : 0x00000020,
|
||||
'Sample' : 0x00000040,
|
||||
'MinLod' : 0x00000080,
|
||||
},
|
||||
|
||||
'FPFastMathModeShift' : {
|
||||
'NotNaN' : 0,
|
||||
'NotInf' : 1,
|
||||
'NSZ' : 2,
|
||||
'AllowRecip' : 3,
|
||||
'Fast' : 4,
|
||||
},
|
||||
|
||||
'FPFastMathModeMask' : {
|
||||
'MaskNone' : 0,
|
||||
'NotNaN' : 0x00000001,
|
||||
'NotInf' : 0x00000002,
|
||||
'NSZ' : 0x00000004,
|
||||
'AllowRecip' : 0x00000008,
|
||||
'Fast' : 0x00000010,
|
||||
},
|
||||
|
||||
'FPRoundingMode' : {
|
||||
'RTE' : 0,
|
||||
'RTZ' : 1,
|
||||
'RTP' : 2,
|
||||
'RTN' : 3,
|
||||
},
|
||||
|
||||
'LinkageType' : {
|
||||
'Export' : 0,
|
||||
'Import' : 1,
|
||||
},
|
||||
|
||||
'AccessQualifier' : {
|
||||
'ReadOnly' : 0,
|
||||
'WriteOnly' : 1,
|
||||
'ReadWrite' : 2,
|
||||
},
|
||||
|
||||
'FunctionParameterAttribute' : {
|
||||
'Zext' : 0,
|
||||
'Sext' : 1,
|
||||
'ByVal' : 2,
|
||||
'Sret' : 3,
|
||||
'NoAlias' : 4,
|
||||
'NoCapture' : 5,
|
||||
'NoWrite' : 6,
|
||||
'NoReadWrite' : 7,
|
||||
},
|
||||
|
||||
'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,
|
||||
'MaxByteOffset' : 45,
|
||||
'AlignmentId' : 46,
|
||||
'MaxByteOffsetId' : 47,
|
||||
'ExplicitInterpAMD' : 4999,
|
||||
'OverrideCoverageNV' : 5248,
|
||||
'PassthroughNV' : 5250,
|
||||
'ViewportRelativeNV' : 5252,
|
||||
'SecondaryViewportRelativeNV' : 5256,
|
||||
'HlslCounterBufferGOOGLE' : 5634,
|
||||
'HlslSemanticGOOGLE' : 5635,
|
||||
},
|
||||
|
||||
'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,
|
||||
},
|
||||
|
||||
'SelectionControlShift' : {
|
||||
'Flatten' : 0,
|
||||
'DontFlatten' : 1,
|
||||
},
|
||||
|
||||
'SelectionControlMask' : {
|
||||
'MaskNone' : 0,
|
||||
'Flatten' : 0x00000001,
|
||||
'DontFlatten' : 0x00000002,
|
||||
},
|
||||
|
||||
'LoopControlShift' : {
|
||||
'Unroll' : 0,
|
||||
'DontUnroll' : 1,
|
||||
'DependencyInfinite' : 2,
|
||||
'DependencyLength' : 3,
|
||||
},
|
||||
|
||||
'LoopControlMask' : {
|
||||
'MaskNone' : 0,
|
||||
'Unroll' : 0x00000001,
|
||||
'DontUnroll' : 0x00000002,
|
||||
'DependencyInfinite' : 0x00000004,
|
||||
'DependencyLength' : 0x00000008,
|
||||
},
|
||||
|
||||
'FunctionControlShift' : {
|
||||
'Inline' : 0,
|
||||
'DontInline' : 1,
|
||||
'Pure' : 2,
|
||||
'Const' : 3,
|
||||
},
|
||||
|
||||
'FunctionControlMask' : {
|
||||
'MaskNone' : 0,
|
||||
'Inline' : 0x00000001,
|
||||
'DontInline' : 0x00000002,
|
||||
'Pure' : 0x00000004,
|
||||
'Const' : 0x00000008,
|
||||
},
|
||||
|
||||
'MemorySemanticsShift' : {
|
||||
'Acquire' : 1,
|
||||
'Release' : 2,
|
||||
'AcquireRelease' : 3,
|
||||
'SequentiallyConsistent' : 4,
|
||||
'UniformMemory' : 6,
|
||||
'SubgroupMemory' : 7,
|
||||
'WorkgroupMemory' : 8,
|
||||
'CrossWorkgroupMemory' : 9,
|
||||
'AtomicCounterMemory' : 10,
|
||||
'ImageMemory' : 11,
|
||||
},
|
||||
|
||||
'MemorySemanticsMask' : {
|
||||
'MaskNone' : 0,
|
||||
'Acquire' : 0x00000002,
|
||||
'Release' : 0x00000004,
|
||||
'AcquireRelease' : 0x00000008,
|
||||
'SequentiallyConsistent' : 0x00000010,
|
||||
'UniformMemory' : 0x00000040,
|
||||
'SubgroupMemory' : 0x00000080,
|
||||
'WorkgroupMemory' : 0x00000100,
|
||||
'CrossWorkgroupMemory' : 0x00000200,
|
||||
'AtomicCounterMemory' : 0x00000400,
|
||||
'ImageMemory' : 0x00000800,
|
||||
},
|
||||
|
||||
'MemoryAccessShift' : {
|
||||
'Volatile' : 0,
|
||||
'Aligned' : 1,
|
||||
'Nontemporal' : 2,
|
||||
},
|
||||
|
||||
'MemoryAccessMask' : {
|
||||
'MaskNone' : 0,
|
||||
'Volatile' : 0x00000001,
|
||||
'Aligned' : 0x00000002,
|
||||
'Nontemporal' : 0x00000004,
|
||||
},
|
||||
|
||||
'Scope' : {
|
||||
'CrossDevice' : 0,
|
||||
'Device' : 1,
|
||||
'Workgroup' : 2,
|
||||
'Subgroup' : 3,
|
||||
'Invocation' : 4,
|
||||
},
|
||||
|
||||
'GroupOperation' : {
|
||||
'Reduce' : 0,
|
||||
'InclusiveScan' : 1,
|
||||
'ExclusiveScan' : 2,
|
||||
},
|
||||
|
||||
'KernelEnqueueFlags' : {
|
||||
'NoWait' : 0,
|
||||
'WaitKernel' : 1,
|
||||
'WaitWorkGroup' : 2,
|
||||
},
|
||||
|
||||
'KernelProfilingInfoShift' : {
|
||||
'CmdExecTime' : 0,
|
||||
},
|
||||
|
||||
'KernelProfilingInfoMask' : {
|
||||
'MaskNone' : 0,
|
||||
'CmdExecTime' : 0x00000001,
|
||||
},
|
||||
|
||||
'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,
|
||||
'SubgroupDispatch' : 58,
|
||||
'NamedBarrier' : 59,
|
||||
'PipeStorage' : 60,
|
||||
'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,
|
||||
},
|
||||
|
||||
'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,
|
||||
'OpSizeOf' : 321,
|
||||
'OpTypePipeStorage' : 322,
|
||||
'OpConstantPipeStorage' : 323,
|
||||
'OpCreatePipeFromPipeStorage' : 324,
|
||||
'OpGetKernelLocalSizeForSubgroupCount' : 325,
|
||||
'OpGetKernelMaxNumSubgroups' : 326,
|
||||
'OpTypeNamedBarrier' : 327,
|
||||
'OpNamedBarrierInitialize' : 328,
|
||||
'OpMemoryNamedBarrier' : 329,
|
||||
'OpModuleProcessed' : 330,
|
||||
'OpExecutionModeId' : 331,
|
||||
'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,
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
119
externals/sirit/externals/SPIRV-Headers/include/spirv/spir-v.xml
vendored
Executable file
119
externals/sirit/externals/SPIRV-Headers/include/spirv/spir-v.xml
vendored
Executable file
@@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<registry>
|
||||
<!--
|
||||
Copyright (c) 2015 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.
|
||||
|
||||
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 file, spir-v.xml, is the SPIR-V Tool ID and Opcode 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/
|
||||
-->
|
||||
|
||||
<!-- SECTION: SPIR-V Tool ID Definitions -->
|
||||
|
||||
<!-- A SPIR-V Generator Magic Number is a 32 bit word: The high order 16
|
||||
bits are a tool ID, which should be unique across all SPIR-V
|
||||
generators. The low order 16 bits are reserved for use as a tool
|
||||
version number, or any other purpose the tool supplier chooses.
|
||||
Only the tool IDs are reserved with Khronos.
|
||||
|
||||
Add new tool ID reservations contiguously with the first available
|
||||
number (the "start" attribute of the <unused> tag below), and
|
||||
modify that <unused> tag accordingly. Please add a vendor/tool
|
||||
supplier name in a 'vendor="name"' attribute; a tool name in a
|
||||
'tool="name"' attribute; and a contact person/address in a
|
||||
'comment' attribute. Remember that this value is the high 16 bits
|
||||
of a 32-bit word.
|
||||
|
||||
Note: a single vendor/tool supplier may have multiple tool IDs
|
||||
reserved for different SPIR-V generators -->
|
||||
|
||||
<ids type="vendor" start="0" end="0xFFFF" comment="SPIR-V Tool IDs">
|
||||
<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="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"/>
|
||||
<id value="7" vendor="Khronos" tool="SPIR-V Tools Assembler" comment="Contact David Neto, dneto@google.com"/>
|
||||
<id value="8" vendor="Khronos" tool="Glslang Reference Front End" comment="Contact John Kessenich, johnkessenich@google.com"/>
|
||||
<id value="9" vendor="Qualcomm" comment="Contact weifengz@qti.qualcomm.com"/>
|
||||
<id value="10" vendor="AMD" comment="Contact Daniel Rakos, daniel.rakos@amd.com"/>
|
||||
<id value="11" vendor="Intel" comment="Contact Alexey, alexey.bader@intel.com"/>
|
||||
<id value="12" vendor="Imagination" comment="Contact James Jones"/>
|
||||
<id value="13" vendor="Google" tool="Shaderc over Glslang" comment="Contact David Neto, dneto@google.com"/>
|
||||
<id value="14" vendor="Google" tool="spiregg" comment="Contact Lei Zhang, antiagainst@google.com"/>
|
||||
<id value="15" vendor="Google" tool="rspirv" comment="Contact Lei Zhang, antiagainst@gmail.com"/>
|
||||
<id value="16" vendor="X-LEGEND" tool="Mesa-IR/SPIR-V Translator" comment="Contact Metora Wang, github:metora/MesaGLSLCompiler"/>
|
||||
<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"/>
|
||||
</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.
|
||||
|
||||
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.
|
||||
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. -->
|
||||
|
||||
<!-- 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"/>
|
||||
|
||||
</registry>
|
||||
131
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/GLSL.std.450.h
vendored
Executable file
131
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/GLSL.std.450.h
vendored
Executable file
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
** Copyright (c) 2014-2016 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 GLSLstd450_H
|
||||
#define GLSLstd450_H
|
||||
|
||||
static const int GLSLstd450Version = 100;
|
||||
static const int GLSLstd450Revision = 3;
|
||||
|
||||
enum GLSLstd450 {
|
||||
GLSLstd450Bad = 0, // Don't use
|
||||
|
||||
GLSLstd450Round = 1,
|
||||
GLSLstd450RoundEven = 2,
|
||||
GLSLstd450Trunc = 3,
|
||||
GLSLstd450FAbs = 4,
|
||||
GLSLstd450SAbs = 5,
|
||||
GLSLstd450FSign = 6,
|
||||
GLSLstd450SSign = 7,
|
||||
GLSLstd450Floor = 8,
|
||||
GLSLstd450Ceil = 9,
|
||||
GLSLstd450Fract = 10,
|
||||
|
||||
GLSLstd450Radians = 11,
|
||||
GLSLstd450Degrees = 12,
|
||||
GLSLstd450Sin = 13,
|
||||
GLSLstd450Cos = 14,
|
||||
GLSLstd450Tan = 15,
|
||||
GLSLstd450Asin = 16,
|
||||
GLSLstd450Acos = 17,
|
||||
GLSLstd450Atan = 18,
|
||||
GLSLstd450Sinh = 19,
|
||||
GLSLstd450Cosh = 20,
|
||||
GLSLstd450Tanh = 21,
|
||||
GLSLstd450Asinh = 22,
|
||||
GLSLstd450Acosh = 23,
|
||||
GLSLstd450Atanh = 24,
|
||||
GLSLstd450Atan2 = 25,
|
||||
|
||||
GLSLstd450Pow = 26,
|
||||
GLSLstd450Exp = 27,
|
||||
GLSLstd450Log = 28,
|
||||
GLSLstd450Exp2 = 29,
|
||||
GLSLstd450Log2 = 30,
|
||||
GLSLstd450Sqrt = 31,
|
||||
GLSLstd450InverseSqrt = 32,
|
||||
|
||||
GLSLstd450Determinant = 33,
|
||||
GLSLstd450MatrixInverse = 34,
|
||||
|
||||
GLSLstd450Modf = 35, // second operand needs an OpVariable to write to
|
||||
GLSLstd450ModfStruct = 36, // no OpVariable operand
|
||||
GLSLstd450FMin = 37,
|
||||
GLSLstd450UMin = 38,
|
||||
GLSLstd450SMin = 39,
|
||||
GLSLstd450FMax = 40,
|
||||
GLSLstd450UMax = 41,
|
||||
GLSLstd450SMax = 42,
|
||||
GLSLstd450FClamp = 43,
|
||||
GLSLstd450UClamp = 44,
|
||||
GLSLstd450SClamp = 45,
|
||||
GLSLstd450FMix = 46,
|
||||
GLSLstd450IMix = 47, // Reserved
|
||||
GLSLstd450Step = 48,
|
||||
GLSLstd450SmoothStep = 49,
|
||||
|
||||
GLSLstd450Fma = 50,
|
||||
GLSLstd450Frexp = 51, // second operand needs an OpVariable to write to
|
||||
GLSLstd450FrexpStruct = 52, // no OpVariable operand
|
||||
GLSLstd450Ldexp = 53,
|
||||
|
||||
GLSLstd450PackSnorm4x8 = 54,
|
||||
GLSLstd450PackUnorm4x8 = 55,
|
||||
GLSLstd450PackSnorm2x16 = 56,
|
||||
GLSLstd450PackUnorm2x16 = 57,
|
||||
GLSLstd450PackHalf2x16 = 58,
|
||||
GLSLstd450PackDouble2x32 = 59,
|
||||
GLSLstd450UnpackSnorm2x16 = 60,
|
||||
GLSLstd450UnpackUnorm2x16 = 61,
|
||||
GLSLstd450UnpackHalf2x16 = 62,
|
||||
GLSLstd450UnpackSnorm4x8 = 63,
|
||||
GLSLstd450UnpackUnorm4x8 = 64,
|
||||
GLSLstd450UnpackDouble2x32 = 65,
|
||||
|
||||
GLSLstd450Length = 66,
|
||||
GLSLstd450Distance = 67,
|
||||
GLSLstd450Cross = 68,
|
||||
GLSLstd450Normalize = 69,
|
||||
GLSLstd450FaceForward = 70,
|
||||
GLSLstd450Reflect = 71,
|
||||
GLSLstd450Refract = 72,
|
||||
|
||||
GLSLstd450FindILsb = 73,
|
||||
GLSLstd450FindSMsb = 74,
|
||||
GLSLstd450FindUMsb = 75,
|
||||
|
||||
GLSLstd450InterpolateAtCentroid = 76,
|
||||
GLSLstd450InterpolateAtSample = 77,
|
||||
GLSLstd450InterpolateAtOffset = 78,
|
||||
|
||||
GLSLstd450NMin = 79,
|
||||
GLSLstd450NMax = 80,
|
||||
GLSLstd450NClamp = 81,
|
||||
|
||||
GLSLstd450Count
|
||||
};
|
||||
|
||||
#endif // #ifndef GLSLstd450_H
|
||||
215
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/OpenCL.std.h
vendored
Executable file
215
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/OpenCL.std.h
vendored
Executable file
@@ -0,0 +1,215 @@
|
||||
/*
|
||||
** Copyright (c) 2015-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 OPENCLstd_H
|
||||
#define OPENCLstd_H
|
||||
|
||||
namespace OpenCLLIB {
|
||||
|
||||
enum Entrypoints {
|
||||
|
||||
// Section 2.1: Math extended instructions
|
||||
Acos = 0,
|
||||
Acosh = 1,
|
||||
Acospi = 2,
|
||||
Asin = 3,
|
||||
Asinh = 4,
|
||||
Asinpi = 5,
|
||||
Atan = 6,
|
||||
Atan2 = 7,
|
||||
Atanh = 8,
|
||||
Atanpi = 9,
|
||||
Atan2pi = 10,
|
||||
Cbrt = 11,
|
||||
Ceil = 12,
|
||||
Copysign = 13,
|
||||
Cos = 14,
|
||||
Cosh = 15,
|
||||
Cospi = 16,
|
||||
Erfc = 17,
|
||||
Erf = 18,
|
||||
Exp = 19,
|
||||
Exp2 = 20,
|
||||
Exp10 = 21,
|
||||
Expm1 = 22,
|
||||
Fabs = 23,
|
||||
Fdim = 24,
|
||||
Floor = 25,
|
||||
Fma = 26,
|
||||
Fmax = 27,
|
||||
Fmin = 28,
|
||||
Fmod = 29,
|
||||
Fract = 30,
|
||||
Frexp = 31,
|
||||
Hypot = 32,
|
||||
Ilogb = 33,
|
||||
Ldexp = 34,
|
||||
Lgamma = 35,
|
||||
Lgamma_r = 36,
|
||||
Log = 37,
|
||||
Log2 = 38,
|
||||
Log10 = 39,
|
||||
Log1p = 40,
|
||||
Logb = 41,
|
||||
Mad = 42,
|
||||
Maxmag = 43,
|
||||
Minmag = 44,
|
||||
Modf = 45,
|
||||
Nan = 46,
|
||||
Nextafter = 47,
|
||||
Pow = 48,
|
||||
Pown = 49,
|
||||
Powr = 50,
|
||||
Remainder = 51,
|
||||
Remquo = 52,
|
||||
Rint = 53,
|
||||
Rootn = 54,
|
||||
Round = 55,
|
||||
Rsqrt = 56,
|
||||
Sin = 57,
|
||||
Sincos = 58,
|
||||
Sinh = 59,
|
||||
Sinpi = 60,
|
||||
Sqrt = 61,
|
||||
Tan = 62,
|
||||
Tanh = 63,
|
||||
Tanpi = 64,
|
||||
Tgamma = 65,
|
||||
Trunc = 66,
|
||||
Half_cos = 67,
|
||||
Half_divide = 68,
|
||||
Half_exp = 69,
|
||||
Half_exp2 = 70,
|
||||
Half_exp10 = 71,
|
||||
Half_log = 72,
|
||||
Half_log2 = 73,
|
||||
Half_log10 = 74,
|
||||
Half_powr = 75,
|
||||
Half_recip = 76,
|
||||
Half_rsqrt = 77,
|
||||
Half_sin = 78,
|
||||
Half_sqrt = 79,
|
||||
Half_tan = 80,
|
||||
Native_cos = 81,
|
||||
Native_divide = 82,
|
||||
Native_exp = 83,
|
||||
Native_exp2 = 84,
|
||||
Native_exp10 = 85,
|
||||
Native_log = 86,
|
||||
Native_log2 = 87,
|
||||
Native_log10 = 88,
|
||||
Native_powr = 89,
|
||||
Native_recip = 90,
|
||||
Native_rsqrt = 91,
|
||||
Native_sin = 92,
|
||||
Native_sqrt = 93,
|
||||
Native_tan = 94,
|
||||
|
||||
// Section 2.2: Integer instructions
|
||||
SAbs = 141,
|
||||
SAbs_diff = 142,
|
||||
SAdd_sat = 143,
|
||||
UAdd_sat = 144,
|
||||
SHadd = 145,
|
||||
UHadd = 146,
|
||||
SRhadd = 147,
|
||||
URhadd = 148,
|
||||
SClamp = 149,
|
||||
UClamp = 150,
|
||||
Clz = 151,
|
||||
Ctz = 152,
|
||||
SMad_hi = 153,
|
||||
UMad_sat = 154,
|
||||
SMad_sat = 155,
|
||||
SMax = 156,
|
||||
UMax = 157,
|
||||
SMin = 158,
|
||||
UMin = 159,
|
||||
SMul_hi = 160,
|
||||
Rotate = 161,
|
||||
SSub_sat = 162,
|
||||
USub_sat = 163,
|
||||
U_Upsample = 164,
|
||||
S_Upsample = 165,
|
||||
Popcount = 166,
|
||||
SMad24 = 167,
|
||||
UMad24 = 168,
|
||||
SMul24 = 169,
|
||||
UMul24 = 170,
|
||||
UAbs = 201,
|
||||
UAbs_diff = 202,
|
||||
UMul_hi = 203,
|
||||
UMad_hi = 204,
|
||||
|
||||
// Section 2.3: Common instructions
|
||||
FClamp = 95,
|
||||
Degrees = 96,
|
||||
FMax_common = 97,
|
||||
FMin_common = 98,
|
||||
Mix = 99,
|
||||
Radians = 100,
|
||||
Step = 101,
|
||||
Smoothstep = 102,
|
||||
Sign = 103,
|
||||
|
||||
// Section 2.4: Geometric instructions
|
||||
Cross = 104,
|
||||
Distance = 105,
|
||||
Length = 106,
|
||||
Normalize = 107,
|
||||
Fast_distance = 108,
|
||||
Fast_length = 109,
|
||||
Fast_normalize = 110,
|
||||
|
||||
// Section 2.5: Relational instructions
|
||||
Bitselect = 186,
|
||||
Select = 187,
|
||||
|
||||
// Section 2.6: Vector Data Load and Store instructions
|
||||
Vloadn = 171,
|
||||
Vstoren = 172,
|
||||
Vload_half = 173,
|
||||
Vload_halfn = 174,
|
||||
Vstore_half = 175,
|
||||
Vstore_half_r = 176,
|
||||
Vstore_halfn = 177,
|
||||
Vstore_halfn_r = 178,
|
||||
Vloada_halfn = 179,
|
||||
Vstorea_halfn = 180,
|
||||
Vstorea_halfn_r = 181,
|
||||
|
||||
// Section 2.7: Miscellaneous Vector instructions
|
||||
Shuffle = 182,
|
||||
Shuffle2 = 183,
|
||||
|
||||
// Section 2.8: Misc instructions
|
||||
Printf = 184,
|
||||
Prefetch = 185,
|
||||
};
|
||||
|
||||
} // end namespace OpenCLLIB
|
||||
|
||||
#endif // #ifndef OPENCLstd_H
|
||||
642
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json
vendored
Executable file
642
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/extinst.glsl.std.450.grammar.json
vendored
Executable file
@@ -0,0 +1,642 @@
|
||||
{
|
||||
"copyright" : [
|
||||
"Copyright (c) 2014-2016 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" : 2,
|
||||
"instructions" : [
|
||||
{
|
||||
"opname" : "Round",
|
||||
"opcode" : 1,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "RoundEven",
|
||||
"opcode" : 2,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Trunc",
|
||||
"opcode" : 3,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FAbs",
|
||||
"opcode" : 4,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SAbs",
|
||||
"opcode" : 5,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FSign",
|
||||
"opcode" : 6,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SSign",
|
||||
"opcode" : 7,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Floor",
|
||||
"opcode" : 8,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Ceil",
|
||||
"opcode" : 9,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Fract",
|
||||
"opcode" : 10,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Radians",
|
||||
"opcode" : 11,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'degrees'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Degrees",
|
||||
"opcode" : 12,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'radians'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Sin",
|
||||
"opcode" : 13,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Cos",
|
||||
"opcode" : 14,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Tan",
|
||||
"opcode" : 15,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Asin",
|
||||
"opcode" : 16,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Acos",
|
||||
"opcode" : 17,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Atan",
|
||||
"opcode" : 18,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'y_over_x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Sinh",
|
||||
"opcode" : 19,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Cosh",
|
||||
"opcode" : 20,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Tanh",
|
||||
"opcode" : 21,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Asinh",
|
||||
"opcode" : 22,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Acosh",
|
||||
"opcode" : 23,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Atanh",
|
||||
"opcode" : 24,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Atan2",
|
||||
"opcode" : 25,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'y'" },
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Pow",
|
||||
"opcode" : 26,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Exp",
|
||||
"opcode" : 27,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Log",
|
||||
"opcode" : 28,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Exp2",
|
||||
"opcode" : 29,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Log2",
|
||||
"opcode" : 30,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Sqrt",
|
||||
"opcode" : 31,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "InverseSqrt",
|
||||
"opcode" : 32,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Determinant",
|
||||
"opcode" : 33,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "MatrixInverse",
|
||||
"opcode" : 34,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Modf",
|
||||
"opcode" : 35,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'i'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "ModfStruct",
|
||||
"opcode" : 36,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FMin",
|
||||
"opcode" : 37,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UMin",
|
||||
"opcode" : 38,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SMin",
|
||||
"opcode" : 39,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FMax",
|
||||
"opcode" : 40,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UMax",
|
||||
"opcode" : 41,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SMax",
|
||||
"opcode" : 42,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FClamp",
|
||||
"opcode" : 43,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'minVal'" },
|
||||
{ "kind" : "IdRef", "name" : "'maxVal'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UClamp",
|
||||
"opcode" : 44,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'minVal'" },
|
||||
{ "kind" : "IdRef", "name" : "'maxVal'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SClamp",
|
||||
"opcode" : 45,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'minVal'" },
|
||||
{ "kind" : "IdRef", "name" : "'maxVal'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FMix",
|
||||
"opcode" : 46,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" },
|
||||
{ "kind" : "IdRef", "name" : "'a'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "IMix",
|
||||
"opcode" : 47,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" },
|
||||
{ "kind" : "IdRef", "name" : "'a'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Step",
|
||||
"opcode" : 48,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'edge'" },
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "SmoothStep",
|
||||
"opcode" : 49,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'edge0'" },
|
||||
{ "kind" : "IdRef", "name" : "'edge1'" },
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Fma",
|
||||
"opcode" : 50,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'a'" },
|
||||
{ "kind" : "IdRef", "name" : "'b'" },
|
||||
{ "kind" : "IdRef", "name" : "'c'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Frexp",
|
||||
"opcode" : 51,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'exp'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FrexpStruct",
|
||||
"opcode" : 52,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Ldexp",
|
||||
"opcode" : 53,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'exp'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackSnorm4x8",
|
||||
"opcode" : 54,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackUnorm4x8",
|
||||
"opcode" : 55,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackSnorm2x16",
|
||||
"opcode" : 56,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackUnorm2x16",
|
||||
"opcode" : 57,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackHalf2x16",
|
||||
"opcode" : 58,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "PackDouble2x32",
|
||||
"opcode" : 59,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
],
|
||||
"capabilities" : [ "Float64" ]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackSnorm2x16",
|
||||
"opcode" : 60,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'p'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackUnorm2x16",
|
||||
"opcode" : 61,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'p'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackHalf2x16",
|
||||
"opcode" : 62,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackSnorm4x8",
|
||||
"opcode" : 63,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'p'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackUnorm4x8",
|
||||
"opcode" : 64,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'p'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "UnpackDouble2x32",
|
||||
"opcode" : 65,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'v'" }
|
||||
],
|
||||
"capabilities" : [ "Float64" ]
|
||||
},
|
||||
{
|
||||
"opname" : "Length",
|
||||
"opcode" : 66,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Distance",
|
||||
"opcode" : 67,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'p0'" },
|
||||
{ "kind" : "IdRef", "name" : "'p1'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Cross",
|
||||
"opcode" : 68,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Normalize",
|
||||
"opcode" : 69,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FaceForward",
|
||||
"opcode" : 70,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'N'" },
|
||||
{ "kind" : "IdRef", "name" : "'I'" },
|
||||
{ "kind" : "IdRef", "name" : "'Nref'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Reflect",
|
||||
"opcode" : 71,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'I'" },
|
||||
{ "kind" : "IdRef", "name" : "'N'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "Refract",
|
||||
"opcode" : 72,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'I'" },
|
||||
{ "kind" : "IdRef", "name" : "'N'" },
|
||||
{ "kind" : "IdRef", "name" : "'eta'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FindILsb",
|
||||
"opcode" : 73,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'Value'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FindSMsb",
|
||||
"opcode" : 74,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'Value'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "FindUMsb",
|
||||
"opcode" : 75,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'Value'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "InterpolateAtCentroid",
|
||||
"opcode" : 76,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'interpolant'" }
|
||||
],
|
||||
"capabilities" : [ "InterpolationFunction" ]
|
||||
},
|
||||
{
|
||||
"opname" : "InterpolateAtSample",
|
||||
"opcode" : 77,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'interpolant'" },
|
||||
{ "kind" : "IdRef", "name" : "'sample'" }
|
||||
],
|
||||
"capabilities" : [ "InterpolationFunction" ]
|
||||
},
|
||||
{
|
||||
"opname" : "InterpolateAtOffset",
|
||||
"opcode" : 78,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'interpolant'" },
|
||||
{ "kind" : "IdRef", "name" : "'offset'" }
|
||||
],
|
||||
"capabilities" : [ "InterpolationFunction" ]
|
||||
},
|
||||
{
|
||||
"opname" : "NMin",
|
||||
"opcode" : 79,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "NMax",
|
||||
"opcode" : 80,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'y'" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"opname" : "NClamp",
|
||||
"opcode" : 81,
|
||||
"operands" : [
|
||||
{ "kind" : "IdRef", "name" : "'x'" },
|
||||
{ "kind" : "IdRef", "name" : "'minVal'" },
|
||||
{ "kind" : "IdRef", "name" : "'maxVal'" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
1279
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/extinst.opencl.std.100.grammar.json
vendored
Executable file
1279
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/extinst.opencl.std.100.grammar.json
vendored
Executable file
File diff suppressed because it is too large
Load Diff
6818
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/spirv.core.grammar.json
vendored
Executable file
6818
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/spirv.core.grammar.json
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1093
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/spirv.h
vendored
Executable file
1093
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/spirv.h
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1102
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/spirv.hpp
vendored
Executable file
1102
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/spirv.hpp
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1102
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/spirv.hpp11
vendored
Executable file
1102
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/spirv.hpp11
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1118
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/spirv.json
vendored
Executable file
1118
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/spirv.json
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1049
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/spirv.lua
vendored
Executable file
1049
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/spirv.lua
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1049
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/spirv.py
vendored
Executable file
1049
externals/sirit/externals/SPIRV-Headers/include/spirv/unified1/spirv.py
vendored
Executable file
File diff suppressed because it is too large
Load Diff
26
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/CMakeLists.txt
vendored
Executable file
26
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/CMakeLists.txt
vendored
Executable file
@@ -0,0 +1,26 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "prefix" FORCE)
|
||||
|
||||
project(buildSpvHeaders)
|
||||
|
||||
set(SOURCES
|
||||
main.cpp
|
||||
jsonToSpirv.cpp
|
||||
header.cpp
|
||||
jsoncpp/dist/jsoncpp.cpp)
|
||||
|
||||
set(HEADERS
|
||||
jsonToSpirv.h
|
||||
header.h
|
||||
jsoncpp/dist/json/json.h)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
add_definitions(-std=c++11)
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
add_definitions(-std=c++11)
|
||||
endif()
|
||||
|
||||
add_executable(buildSpvHeaders ${SOURCES} ${HEADERS})
|
||||
|
||||
install(TARGETS buildSpvHeaders RUNTIME DESTINATION bin)
|
||||
5
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/bin/makeHeaders
vendored
Executable file
5
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/bin/makeHeaders
vendored
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd ../../include/spirv/unified1
|
||||
../../../tools/buildHeaders/build/install/bin/buildSpvHeaders -H spirv.core.grammar.json
|
||||
dos2unix spirv.*
|
||||
713
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/header.cpp
vendored
Executable file
713
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/header.cpp
vendored
Executable file
@@ -0,0 +1,713 @@
|
||||
// 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.
|
||||
|
||||
//
|
||||
// Print headers for SPIR-V in several languages.
|
||||
//
|
||||
// To change the header information, change the C++-built database in doc.*.
|
||||
//
|
||||
// Then, use "spriv -h <language>" - e.g, spriv.{h,hpp,lua,py,etc}:
|
||||
// replace the auto-generated header, or "spirv -H" to generate all
|
||||
// supported language headers to predefined names in the current directory.
|
||||
//
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <cctype>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
|
||||
#include "jsoncpp/dist/json/json.h"
|
||||
|
||||
#include "header.h"
|
||||
#include "jsonToSpirv.h"
|
||||
|
||||
// snprintf and _snprintf are not quite the same, but close enough
|
||||
// for our use.
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4996)
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
// This file converts SPIR-V definitions to an internal JSON
|
||||
// representation, and then generates language specific
|
||||
// data from that single internal form.
|
||||
|
||||
// Initially, the internal form is created from C++ data,
|
||||
// though this can be changed to a JSON master in time.
|
||||
|
||||
namespace {
|
||||
class TPrinter {
|
||||
protected:
|
||||
TPrinter();
|
||||
|
||||
static const int DocMagicNumber = 0x07230203;
|
||||
static const int DocVersion = 0x00010300;
|
||||
static const int DocRevision = 1;
|
||||
#define DocRevisionString "1"
|
||||
static const std::string DocCopyright;
|
||||
static const std::string DocComment1;
|
||||
static const std::string DocComment2;
|
||||
|
||||
enum enumStyle_t {
|
||||
enumNoMask,
|
||||
enumCount,
|
||||
enumShift,
|
||||
enumMask,
|
||||
enumHex,
|
||||
};
|
||||
|
||||
static std::string styleStr(enumStyle_t s) {
|
||||
return s == enumShift ? "Shift" :
|
||||
s == enumMask ? "Mask" : "";
|
||||
}
|
||||
|
||||
friend std::ostream& operator<<(std::ostream&, const TPrinter&);
|
||||
|
||||
virtual void printAll(std::ostream&) const;
|
||||
virtual void printComments(std::ostream&) const;
|
||||
virtual void printPrologue(std::ostream&) const { }
|
||||
virtual void printDefs(std::ostream&) const;
|
||||
virtual void printEpilogue(std::ostream&) const { }
|
||||
virtual void printMeta(std::ostream&) const;
|
||||
virtual void printTypes(std::ostream&) const { }
|
||||
|
||||
virtual std::string escapeComment(const std::string& s) const;
|
||||
|
||||
// Default printComments() uses these comment strings
|
||||
virtual std::string commentBeg() const { return ""; }
|
||||
virtual std::string commentEnd(bool isLast) const { return ""; }
|
||||
virtual std::string commentBOL() const { return ""; }
|
||||
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 {
|
||||
return "";
|
||||
}
|
||||
virtual std::string enumFmt(const std::string&, const valpair_t&,
|
||||
enumStyle_t, bool isLast = false) const {
|
||||
return "";
|
||||
}
|
||||
virtual std::string maxEnumFmt(const std::string&, const valpair_t&,
|
||||
enumStyle_t) const {
|
||||
return "";
|
||||
}
|
||||
|
||||
virtual std::string fmtConstInt(unsigned val, const std::string& name,
|
||||
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 {
|
||||
return std::string(count * 4, ' '); // default indent level = 4
|
||||
}
|
||||
|
||||
static std::string fmtNum(const char* fmt, unsigned val) {
|
||||
char buff[16]; // ample for 8 hex digits + 0x
|
||||
snprintf(buff, sizeof(buff), fmt, val);
|
||||
buff[sizeof(buff)-1] = '\0'; // MSVC doesn't promise null termination
|
||||
return buff;
|
||||
}
|
||||
|
||||
static std::string fmtStyleVal(unsigned v, enumStyle_t style);
|
||||
|
||||
// If the enum value name would start with a sigit, prepend the enum name.
|
||||
// E.g, "3D" -> "Dim3D".
|
||||
static std::string prependIfDigit(const std::string& ename, const std::string& vname) {
|
||||
return (std::isdigit(vname[0]) ? ename : std::string("")) + vname;
|
||||
}
|
||||
|
||||
void addComment(Json::Value& node, const std::string& str);
|
||||
|
||||
Json::Value spvRoot; // JSON SPIR-V data
|
||||
};
|
||||
|
||||
// Format value as mask or value
|
||||
std::string TPrinter::fmtStyleVal(unsigned v, enumStyle_t style)
|
||||
{
|
||||
switch (style) {
|
||||
case enumMask:
|
||||
return fmtNum("0x%08x", 1<<v);
|
||||
case enumHex:
|
||||
return fmtNum("0x%08x", v);
|
||||
default:
|
||||
return std::to_string(v);
|
||||
}
|
||||
}
|
||||
|
||||
const std::string TPrinter::DocCopyright =
|
||||
"Copyright (c) 2014-2018 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"
|
||||
"to deal in the Materials without restriction, including without limitation\n"
|
||||
"the rights to use, copy, modify, merge, publish, distribute, sublicense,\n"
|
||||
"and/or sell copies of the Materials, and to permit persons to whom the\n"
|
||||
"Materials are furnished to do so, subject to the following conditions:\n"
|
||||
"\n"
|
||||
"The above copyright notice and this permission notice shall be included in\n"
|
||||
"all copies or substantial portions of the Materials.\n"
|
||||
"\n"
|
||||
"MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS\n"
|
||||
"STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND\n"
|
||||
"HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ \n"
|
||||
"\n"
|
||||
"THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n"
|
||||
"OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n"
|
||||
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n"
|
||||
"THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n"
|
||||
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n"
|
||||
"FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS\n"
|
||||
"IN THE MATERIALS.\n";
|
||||
|
||||
const std::string TPrinter::DocComment1 =
|
||||
"This header is automatically generated by the same tool that creates\n"
|
||||
"the Binary Section of the SPIR-V specification.\n";
|
||||
|
||||
const std::string TPrinter::DocComment2 =
|
||||
"Enumeration tokens for SPIR-V, in various styles:\n"
|
||||
" C, C++, C++11, JSON, Lua, Python\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"
|
||||
"\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"
|
||||
"\"Mask\" in their name, and a parallel enum that has the shift\n"
|
||||
"amount (1 << x) for each corresponding enumerant.\n";
|
||||
|
||||
// Construct
|
||||
TPrinter::TPrinter()
|
||||
{
|
||||
Json::Value& meta = spvRoot["spv"]["meta"];
|
||||
Json::Value& enums = spvRoot["spv"]["enum"];
|
||||
|
||||
meta["MagicNumber"] = DocMagicNumber;
|
||||
meta["Version"] = DocVersion;
|
||||
meta["Revision"] = DocRevision;
|
||||
meta["OpCodeMask"] = 0xffff;
|
||||
meta["WordCountShift"] = 16;
|
||||
|
||||
int commentId = 0;
|
||||
addComment(meta["Comment"][commentId++], DocCopyright);
|
||||
addComment(meta["Comment"][commentId++], DocComment1);
|
||||
addComment(meta["Comment"][commentId++], DocComment2);
|
||||
|
||||
for (int e = spv::OperandSource; e < spv::OperandOpcode; ++e) {
|
||||
auto& enumSet = spv::OperandClassParams[e];
|
||||
const bool mask = enumSet.bitmask;
|
||||
const std::string enumName = enumSet.codeName;
|
||||
|
||||
for (auto& enumRow : enumSet) {
|
||||
std::string name = enumRow.name;
|
||||
enums[e - spv::OperandSource]["Values"][name] = enumRow.value;
|
||||
}
|
||||
|
||||
enums[e - spv::OperandSource]["Type"] = mask ? "Bit" : "Value";
|
||||
enums[e - spv::OperandSource]["Name"] = enumName;
|
||||
}
|
||||
|
||||
// Instructions are in their own different table
|
||||
{
|
||||
auto& entry = enums[spv::OperandOpcode - spv::OperandSource];
|
||||
for (auto& enumRow : spv::InstructionDesc) {
|
||||
std::string name = enumRow.name;
|
||||
entry["Values"][name] = enumRow.value;
|
||||
}
|
||||
entry["Type"] = "Value";
|
||||
entry["Name"] = "Op";
|
||||
}
|
||||
}
|
||||
|
||||
// Create comment
|
||||
void TPrinter::addComment(Json::Value& node, const std::string& str)
|
||||
{
|
||||
std::istringstream cstream(str);
|
||||
std::string cline;
|
||||
|
||||
int line = 0;
|
||||
while (std::getline(cstream, cline)) // fmt each line
|
||||
node[line++] = cline;
|
||||
}
|
||||
|
||||
|
||||
// Return a list of values sorted by enum value. The std::vector
|
||||
// returned by value is okay in c++11 due to move semantics.
|
||||
std::vector<TPrinter::valpair_t>
|
||||
TPrinter::getSortedVals(const Json::Value& p) const
|
||||
{
|
||||
std::vector<valpair_t> values;
|
||||
|
||||
for (auto e = p.begin(); e != p.end(); ++e)
|
||||
values.push_back(valpair_t(e->asUInt(), e.name()));
|
||||
|
||||
// Use a stable sort because we might have aliases, e.g.
|
||||
// SubgropuBallot (might be in future core) vs. SubgroupBallotKHR.
|
||||
std::stable_sort(values.begin(), values.end());
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
// Escape comment characters if needed
|
||||
std::string TPrinter::escapeComment(const std::string& s) const { return s; }
|
||||
|
||||
// Format comments in language specific way
|
||||
void TPrinter::printComments(std::ostream& out) const
|
||||
{
|
||||
const int commentCount = spvRoot["spv"]["meta"]["Comment"].size();
|
||||
int commentNum = 0;
|
||||
|
||||
for (const auto& comment : spvRoot["spv"]["meta"]["Comment"]) {
|
||||
out << commentBeg();
|
||||
|
||||
for (int line = 0; line < int(comment.size()); ++line)
|
||||
out << commentBOL() << escapeComment(comment[line].asString()) <<
|
||||
commentEOL((line+1) == comment.size()) << std::endl;
|
||||
|
||||
out << commentEnd(++commentNum == commentCount) << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
// Format header metadata
|
||||
void TPrinter::printMeta(std::ostream& out) const
|
||||
{
|
||||
const Json::Value& meta = spvRoot["spv"]["meta"];
|
||||
|
||||
const auto print = [&](const char* name, const char* fmt, bool isLast) {
|
||||
out << fmtConstInt(meta[name].asUInt(), name, fmt, isLast);
|
||||
};
|
||||
|
||||
print("MagicNumber", "0x%08lx", false);
|
||||
print("Version", "0x%08lx", false);
|
||||
print("Revision", "%d", false);
|
||||
print("OpCodeMask", "0x%04x", false);
|
||||
print("WordCountShift", "%d", true);
|
||||
}
|
||||
|
||||
// Format value definitions in language specific way
|
||||
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();
|
||||
const auto opPrefix = opName == "Op" ? "" : opName;
|
||||
|
||||
for (enumStyle_t style = (isMask ? enumShift : enumCount);
|
||||
style <= (isMask ? enumMask : enumCount); style = enumStyle_t(int(style)+1)) {
|
||||
|
||||
out << enumBeg(opName, style);
|
||||
|
||||
if (style == enumMask)
|
||||
out << enumFmt(opPrefix, valpair_t(0, "MaskNone"), enumNoMask);
|
||||
|
||||
const auto sorted = getSortedVals((*opClass)["Values"]);
|
||||
|
||||
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);
|
||||
|
||||
if (printMax)
|
||||
out << maxEnum;
|
||||
|
||||
auto nextOpClass = opClass;
|
||||
out << enumEnd(opName, style, ++nextOpClass == enums.end());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TPrinter::printAll(std::ostream& out) const
|
||||
{
|
||||
printComments(out);
|
||||
printPrologue(out);
|
||||
printTypes(out);
|
||||
printMeta(out);
|
||||
printDefs(out);
|
||||
printEpilogue(out);
|
||||
}
|
||||
|
||||
// Stream entire header to output
|
||||
std::ostream& operator<<(std::ostream& out, const TPrinter &p)
|
||||
{
|
||||
p.printAll(out);
|
||||
return out;
|
||||
}
|
||||
|
||||
// JSON printer. Rather than use the default printer, we supply our own so
|
||||
// we can control the printing order within various containers.
|
||||
class TPrinterJSON final : public TPrinter {
|
||||
private:
|
||||
void printPrologue(std::ostream& out) const override { out << "{\n" + indent() + "\"spv\":\n" + indent() + "{\n"; }
|
||||
void printEpilogue(std::ostream& out) const override { out << indent() + "}\n}\n"; }
|
||||
|
||||
std::string escapeComment(const std::string& s) const override {
|
||||
std::string newStr;
|
||||
for (auto c : s) {
|
||||
if (c == '"') {
|
||||
newStr += '\\';
|
||||
newStr += c;
|
||||
} else {
|
||||
newStr += c;
|
||||
}
|
||||
}
|
||||
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");
|
||||
}
|
||||
|
||||
void printMeta(std::ostream& out) const override
|
||||
{
|
||||
out << indent(2) + "\"meta\":\n" + indent(2) + "{\n";
|
||||
printComments(out);
|
||||
TPrinter::printMeta(out);
|
||||
out << indent(2) + "},\n";
|
||||
}
|
||||
|
||||
std::string commentBeg() const override { return indent(4) + "[\n"; }
|
||||
std::string commentEnd(bool isLast) const override { return indent(4) + (isLast ? "]" : "],"); }
|
||||
std::string commentBOL() const override { return indent(5) + '"'; }
|
||||
std::string commentEOL(bool isLast) const override { return (isLast ? "\"" : "\","); }
|
||||
|
||||
void printComments(std::ostream& out) const override
|
||||
{
|
||||
out << indent(3) + "\"Comment\":\n" + indent(3) + "[\n";
|
||||
TPrinter::printComments(out);
|
||||
out << indent(3) + "],\n";
|
||||
}
|
||||
|
||||
void printDefs(std::ostream& out) const override
|
||||
{
|
||||
out << indent(2) + "\"enum\":\n" + indent(2) + "[\n";
|
||||
TPrinter::printDefs(out);
|
||||
out << indent(2) + "]\n";
|
||||
}
|
||||
|
||||
void printAll(std::ostream& out) const override
|
||||
{
|
||||
printPrologue(out);
|
||||
printMeta(out);
|
||||
printDefs(out);
|
||||
printEpilogue(out);
|
||||
}
|
||||
|
||||
std::string enumBeg(const std::string& s, enumStyle_t style) const override {
|
||||
if (style == enumMask)
|
||||
return "";
|
||||
return indent(3) + "{\n" +
|
||||
indent(4) + "\"Name\": \"" + s + "\",\n" +
|
||||
indent(4) + "\"Type\": " + (style == enumShift ? "\"Bit\"" : "\"Value\"") + ",\n" +
|
||||
indent(4) + "\"Values\":\n" +
|
||||
indent(4) + "{\n";
|
||||
}
|
||||
|
||||
std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
|
||||
if (style == enumMask)
|
||||
return "";
|
||||
return indent(4) + "}\n" +
|
||||
indent(3) + "}" + (isLast ? "" : ",") + "\n";
|
||||
}
|
||||
|
||||
std::string enumFmt(const std::string& s, const valpair_t& v,
|
||||
enumStyle_t style, bool isLast) const override {
|
||||
if (style == enumMask || style == enumNoMask)
|
||||
return "";
|
||||
return indent(5) + '"' + prependIfDigit(s, v.second) + "\": " + fmtNum("%d", v.first) +
|
||||
(isLast ? "\n" : ",\n");
|
||||
}
|
||||
};
|
||||
|
||||
// base for C and C++
|
||||
class TPrinterCBase : public TPrinter {
|
||||
protected:
|
||||
virtual void printPrologue(std::ostream& out) const override {
|
||||
out << "#ifndef spirv_" << headerGuardSuffix() << std::endl
|
||||
<< "#define spirv_" << headerGuardSuffix() << std::endl
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
void printMeta(std::ostream& out) const override {
|
||||
out << "#define SPV_VERSION 0x" << std::hex << DocVersion << std::dec << "\n";
|
||||
out << "#define SPV_REVISION " << DocRevision << "\n";
|
||||
out << "\n";
|
||||
|
||||
return TPrinter::printMeta(out);
|
||||
}
|
||||
|
||||
virtual void printEpilogue(std::ostream& out) const override {
|
||||
out << "#endif // #ifndef spirv_" << headerGuardSuffix() << std::endl;
|
||||
}
|
||||
|
||||
virtual void printTypes(std::ostream& out) const override {
|
||||
out << "typedef unsigned int " << pre() << "Id;\n\n";
|
||||
}
|
||||
|
||||
virtual std::string fmtConstInt(unsigned val, const std::string& name,
|
||||
const char* fmt, bool isLast) const override
|
||||
{
|
||||
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;
|
||||
};
|
||||
|
||||
// C printer
|
||||
class TPrinterC final : public TPrinterCBase {
|
||||
private:
|
||||
std::string commentBeg() const override { return "/*\n"; }
|
||||
std::string commentEnd(bool isLast) const override { return "*/\n"; }
|
||||
std::string commentBOL() const override { return "** "; }
|
||||
|
||||
std::string enumBeg(const std::string& s, enumStyle_t style) const override {
|
||||
return std::string("typedef enum ") + pre() + s + styleStr(style) + "_ {\n";
|
||||
}
|
||||
|
||||
std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
|
||||
return "} " + pre() + s + styleStr(style) + ";\n\n";
|
||||
}
|
||||
|
||||
std::string enumFmt(const std::string& s, const valpair_t& v,
|
||||
enumStyle_t style, bool isLast) const override {
|
||||
return indent() + pre() + s + v.second + styleStr(style) + " = " + fmtStyleVal(v.first, style) + ",\n";
|
||||
}
|
||||
|
||||
std::string maxEnumFmt(const std::string& s, const valpair_t& v,
|
||||
enumStyle_t style) const override {
|
||||
return enumFmt(s, v, style, true);
|
||||
}
|
||||
|
||||
std::string pre() const override { return "Spv"; } // C name prefix
|
||||
std::string headerGuardSuffix() const override { return "H"; }
|
||||
};
|
||||
|
||||
// C++ printer
|
||||
class TPrinterCPP : public TPrinterCBase {
|
||||
private:
|
||||
void printPrologue(std::ostream& out) const override {
|
||||
TPrinterCBase::printPrologue(out);
|
||||
out << "namespace spv {\n\n";
|
||||
}
|
||||
|
||||
void printEpilogue(std::ostream& out) const override {
|
||||
const Json::Value& enums = spvRoot["spv"]["enum"];
|
||||
|
||||
// Create overloaded operator| for mask types
|
||||
out << "// Overload operator| for mask bit combining\n\n";
|
||||
|
||||
for (auto opClass = enums.begin(); opClass != enums.end(); ++opClass) {
|
||||
const bool isMask = (*opClass)["Type"].asString() == "Bit";
|
||||
const auto opName = (*opClass)["Name"].asString();
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
|
||||
return "};\n\n";
|
||||
}
|
||||
|
||||
virtual std::string enumFmt(const std::string& s, const valpair_t& v,
|
||||
enumStyle_t style, bool isLast) const override {
|
||||
return indent() + s + v.second + styleStr(style) + " = " + fmtStyleVal(v.first, style) + ",\n";
|
||||
}
|
||||
|
||||
virtual std::string maxEnumFmt(const std::string& s, const valpair_t& v,
|
||||
enumStyle_t style) const override {
|
||||
return enumFmt(s, v, style, true);
|
||||
}
|
||||
|
||||
// The C++ and C++11 headers define types with the same name. So they
|
||||
// should use the same header guard.
|
||||
std::string headerGuardSuffix() const override { return "HPP"; }
|
||||
|
||||
std::string operators;
|
||||
};
|
||||
|
||||
// C++11 printer (uses enum classes)
|
||||
class TPrinterCPP11 final : public TPrinterCPP {
|
||||
private:
|
||||
std::string enumBeg(const std::string& s, enumStyle_t style) const override {
|
||||
return std::string("enum class ") + s + styleStr(style) + " : unsigned {\n";
|
||||
}
|
||||
|
||||
std::string enumFmt(const std::string& s, const valpair_t& v,
|
||||
enumStyle_t style, bool isLast) const override {
|
||||
return indent() + prependIfDigit(s, v.second) + " = " + fmtStyleVal(v.first, style) + ",\n";
|
||||
}
|
||||
|
||||
std::string maxEnumFmt(const std::string& s, const valpair_t& v,
|
||||
enumStyle_t style) const override {
|
||||
return enumFmt(s, v, style, true);
|
||||
}
|
||||
|
||||
std::string headerGuardSuffix() const override { return "HPP"; }
|
||||
};
|
||||
|
||||
// LUA printer
|
||||
class TPrinterLua final : public TPrinter {
|
||||
private:
|
||||
void printPrologue(std::ostream& out) const override { out << "spv = {\n"; }
|
||||
|
||||
void printEpilogue(std::ostream& out) const override { out << "}\n"; }
|
||||
|
||||
std::string commentBOL() const override { return "-- "; }
|
||||
|
||||
std::string enumBeg(const std::string& s, enumStyle_t style) const override {
|
||||
return indent() + s + styleStr(style) + " = {\n";
|
||||
}
|
||||
|
||||
std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
|
||||
return indent() + "},\n\n";
|
||||
}
|
||||
|
||||
std::string enumFmt(const std::string& s, const valpair_t& v,
|
||||
enumStyle_t style, bool isLast) const override {
|
||||
return indent(2) + prependIfDigit(s, v.second) + " = " + fmtStyleVal(v.first, style) + ",\n";
|
||||
}
|
||||
|
||||
virtual std::string fmtConstInt(unsigned val, const std::string& name,
|
||||
const char* fmt, bool isLast) const override
|
||||
{
|
||||
return indent() + name + " = " + fmtNum(fmt, val) + (isLast ? ",\n\n" : ",\n");
|
||||
}
|
||||
};
|
||||
|
||||
// Python printer
|
||||
class TPrinterPython final : public TPrinter {
|
||||
private:
|
||||
void printPrologue(std::ostream& out) const override { out << "spv = {\n"; }
|
||||
|
||||
void printEpilogue(std::ostream& out) const override { out << "}\n"; }
|
||||
|
||||
std::string commentBOL() const override { return "# "; }
|
||||
|
||||
std::string enumBeg(const std::string& s, enumStyle_t style) const override {
|
||||
return indent() + "'" + s + styleStr(style) + "'" + " : {\n";
|
||||
}
|
||||
|
||||
std::string enumEnd(const std::string& s, enumStyle_t style, bool isLast) const override {
|
||||
return indent() + "},\n\n";
|
||||
}
|
||||
|
||||
std::string enumFmt(const std::string& s, const valpair_t& v,
|
||||
enumStyle_t style, bool isLast) const override {
|
||||
return indent(2) + "'" + 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() + "'" + name + "'" + " : " + fmtNum(fmt, val) + (isLast ? ",\n\n" : ",\n");
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace spv {
|
||||
void PrintAllHeaders()
|
||||
{
|
||||
// TODO: Once MSVC 2012 is no longer a factor, use brace initializers here
|
||||
std::vector<std::pair<TLanguage, std::string>> langInfo;
|
||||
|
||||
langInfo.push_back(std::make_pair(ELangC, "spirv.h"));
|
||||
langInfo.push_back(std::make_pair(ELangCPP, "spirv.hpp"));
|
||||
langInfo.push_back(std::make_pair(ELangCPP11, "spirv.hpp11"));
|
||||
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"));
|
||||
|
||||
for (const auto& lang : langInfo) {
|
||||
std::ofstream out(lang.second, std::ios::out);
|
||||
|
||||
if ((out.rdstate() & std::ifstream::failbit)) {
|
||||
std::cerr << "Unable to open file: " << lang.second << std::endl;
|
||||
} else {
|
||||
PrintHeader(lang.first, out);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Print header for given language to given output stream
|
||||
void PrintHeader(TLanguage lang, std::ostream& out)
|
||||
{
|
||||
typedef std::unique_ptr<TPrinter> TPrinterPtr;
|
||||
TPrinterPtr p;
|
||||
|
||||
switch (lang) {
|
||||
case ELangC: p = TPrinterPtr(new TPrinterC); break;
|
||||
case ELangCPP: p = TPrinterPtr(new TPrinterCPP); break;
|
||||
case ELangCPP11: p = TPrinterPtr(new TPrinterCPP11); break;
|
||||
case ELangJSON: p = TPrinterPtr(new TPrinterJSON); break;
|
||||
case ELangLua: p = TPrinterPtr(new TPrinterLua); break;
|
||||
case ELangPython: p = TPrinterPtr(new TPrinterPython); break;
|
||||
case ELangAll: PrintAllHeaders(); break;
|
||||
default:
|
||||
std::cerr << "Unknown language." << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
// Print the data in the requested format
|
||||
if (p)
|
||||
out << *p << std::endl;
|
||||
|
||||
// object is auto-deleted
|
||||
}
|
||||
|
||||
} // namespace spv
|
||||
52
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/header.h
vendored
Executable file
52
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/header.h
vendored
Executable file
@@ -0,0 +1,52 @@
|
||||
// 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.
|
||||
|
||||
//
|
||||
// Print headers for SPIR-V in several languages.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
#ifndef header
|
||||
#define header
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace spv {
|
||||
// Languages supported
|
||||
enum TLanguage {
|
||||
ELangC, // C
|
||||
ELangCPP, // C++03
|
||||
ELangCPP11, // C++11
|
||||
ELangJSON, // JSON
|
||||
ELangLua, // Lua
|
||||
ELangPython, // Python
|
||||
|
||||
ELangAll, // print headers in all languages to files
|
||||
};
|
||||
|
||||
// Generate header for requested language
|
||||
void PrintHeader(TLanguage, std::ostream&);
|
||||
} // namespace spv
|
||||
|
||||
#endif // header
|
||||
437
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/jsonToSpirv.cpp
vendored
Executable file
437
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/jsonToSpirv.cpp
vendored
Executable file
@@ -0,0 +1,437 @@
|
||||
// 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.
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <fstream>
|
||||
|
||||
#include "jsoncpp/dist/json/json.h"
|
||||
|
||||
#include "jsonToSpirv.h"
|
||||
|
||||
namespace spv {
|
||||
|
||||
// The set of objects that hold all the instruction/operand
|
||||
// parameterization information.
|
||||
InstructionValues InstructionDesc;
|
||||
|
||||
// Note: There is no entry for OperandOpcode. Use InstructionDesc instead.
|
||||
EnumDefinition OperandClassParams[OperandOpcode];
|
||||
EnumValues SourceLanguageParams;
|
||||
EnumValues ExecutionModelParams;
|
||||
EnumValues AddressingParams;
|
||||
EnumValues MemoryParams;
|
||||
EnumValues ExecutionModeParams;
|
||||
EnumValues StorageParams;
|
||||
EnumValues SamplerAddressingModeParams;
|
||||
EnumValues SamplerFilterModeParams;
|
||||
EnumValues ImageFormatParams;
|
||||
EnumValues ImageChannelOrderParams;
|
||||
EnumValues ImageChannelDataTypeParams;
|
||||
EnumValues ImageOperandsParams;
|
||||
EnumValues FPFastMathParams;
|
||||
EnumValues FPRoundingModeParams;
|
||||
EnumValues LinkageTypeParams;
|
||||
EnumValues DecorationParams;
|
||||
EnumValues BuiltInParams;
|
||||
EnumValues DimensionalityParams;
|
||||
EnumValues FuncParamAttrParams;
|
||||
EnumValues AccessQualifierParams;
|
||||
EnumValues GroupOperationParams;
|
||||
EnumValues LoopControlParams;
|
||||
EnumValues SelectionControlParams;
|
||||
EnumValues FunctionControlParams;
|
||||
EnumValues MemorySemanticsParams;
|
||||
EnumValues MemoryAccessParams;
|
||||
EnumValues ScopeParams;
|
||||
EnumValues KernelEnqueueFlagsParams;
|
||||
EnumValues KernelProfilingInfoParams;
|
||||
EnumValues CapabilityParams;
|
||||
|
||||
std::pair<bool, std::string> ReadFile(const std::string& path)
|
||||
{
|
||||
std::ifstream fstream(path, std::ios::in);
|
||||
if (fstream) {
|
||||
std::string contents;
|
||||
fstream.seekg(0, std::ios::end);
|
||||
contents.reserve((unsigned int)fstream.tellg());
|
||||
fstream.seekg(0, std::ios::beg);
|
||||
contents.assign((std::istreambuf_iterator<char>(fstream)),
|
||||
std::istreambuf_iterator<char>());
|
||||
return std::make_pair(true, contents);
|
||||
}
|
||||
return std::make_pair(false, "");
|
||||
}
|
||||
|
||||
struct ClassOptionality {
|
||||
OperandClass type;
|
||||
bool optional;
|
||||
};
|
||||
|
||||
// Converts the |operandKind| and |quantifier| pair used to describe operands
|
||||
// in the JSON grammar to OperandClass and optionality used in this repo.
|
||||
ClassOptionality ToOperandClassAndOptionality(const std::string& operandKind, const std::string& quantifier)
|
||||
{
|
||||
assert(quantifier.empty() || quantifier == "?" || quantifier == "*");
|
||||
|
||||
if (operandKind == "IdRef") {
|
||||
if (quantifier.empty())
|
||||
return {OperandId, false};
|
||||
else if (quantifier == "?")
|
||||
return {OperandId, true};
|
||||
else
|
||||
return {OperandVariableIds, false};
|
||||
} else if (operandKind == "LiteralInteger") {
|
||||
if (quantifier.empty())
|
||||
return {OperandLiteralNumber, false};
|
||||
if (quantifier == "?")
|
||||
return {OperandOptionalLiteral, true};
|
||||
else
|
||||
return {OperandVariableLiterals, false};
|
||||
} else if (operandKind == "LiteralString") {
|
||||
if (quantifier.empty())
|
||||
return {OperandLiteralString, false};
|
||||
else if (quantifier == "?")
|
||||
return {OperandLiteralString, true};
|
||||
else {
|
||||
assert(0 && "this case should not exist");
|
||||
return {OperandNone, false};
|
||||
}
|
||||
} else if (operandKind == "PairLiteralIntegerIdRef") {
|
||||
// Used by OpSwitch in the grammar
|
||||
return {OperandVariableLiteralId, false};
|
||||
} else if (operandKind == "PairIdRefLiteralInteger") {
|
||||
// Used by OpGroupMemberDecorate in the grammar
|
||||
return {OperandVariableIdLiteral, false};
|
||||
} else if (operandKind == "PairIdRefIdRef") {
|
||||
// Used by OpPhi in the grammar
|
||||
return {OperandVariableIds, false};
|
||||
} else {
|
||||
OperandClass type = OperandNone;
|
||||
if (operandKind == "IdMemorySemantics" || operandKind == "MemorySemantics") {
|
||||
type = OperandMemorySemantics;
|
||||
} else if (operandKind == "IdScope" || operandKind == "Scope") {
|
||||
type = OperandScope;
|
||||
} else if (operandKind == "LiteralExtInstInteger") {
|
||||
type = OperandLiteralNumber;
|
||||
} else if (operandKind == "LiteralSpecConstantOpInteger") {
|
||||
type = OperandLiteralNumber;
|
||||
} else if (operandKind == "LiteralContextDependentNumber") {
|
||||
type = OperandVariableLiterals;
|
||||
} else if (operandKind == "SourceLanguage") {
|
||||
type = OperandSource;
|
||||
} else if (operandKind == "ExecutionModel") {
|
||||
type = OperandExecutionModel;
|
||||
} else if (operandKind == "AddressingModel") {
|
||||
type = OperandAddressing;
|
||||
} else if (operandKind == "MemoryModel") {
|
||||
type = OperandMemory;
|
||||
} else if (operandKind == "ExecutionMode") {
|
||||
type = OperandExecutionMode;
|
||||
} else if (operandKind == "StorageClass") {
|
||||
type = OperandStorage;
|
||||
} else if (operandKind == "Dim") {
|
||||
type = OperandDimensionality;
|
||||
} else if (operandKind == "SamplerAddressingMode") {
|
||||
type = OperandSamplerAddressingMode;
|
||||
} else if (operandKind == "SamplerFilterMode") {
|
||||
type = OperandSamplerFilterMode;
|
||||
} else if (operandKind == "ImageFormat") {
|
||||
type = OperandSamplerImageFormat;
|
||||
} else if (operandKind == "ImageChannelOrder") {
|
||||
type = OperandImageChannelOrder;
|
||||
} else if (operandKind == "ImageChannelDataType") {
|
||||
type = OperandImageChannelDataType;
|
||||
} else if (operandKind == "FPRoundingMode") {
|
||||
type = OperandFPRoundingMode;
|
||||
} else if (operandKind == "LinkageType") {
|
||||
type = OperandLinkageType;
|
||||
} else if (operandKind == "AccessQualifier") {
|
||||
type = OperandAccessQualifier;
|
||||
} else if (operandKind == "FunctionParameterAttribute") {
|
||||
type = OperandFuncParamAttr;
|
||||
} else if (operandKind == "Decoration") {
|
||||
type = OperandDecoration;
|
||||
} else if (operandKind == "BuiltIn") {
|
||||
type = OperandBuiltIn;
|
||||
} else if (operandKind == "GroupOperation") {
|
||||
type = OperandGroupOperation;
|
||||
} else if (operandKind == "KernelEnqueueFlags") {
|
||||
type = OperandKernelEnqueueFlags;
|
||||
} else if (operandKind == "KernelProfilingInfo") {
|
||||
type = OperandKernelProfilingInfo;
|
||||
} else if (operandKind == "Capability") {
|
||||
type = OperandCapability;
|
||||
} else if (operandKind == "ImageOperands") {
|
||||
type = OperandImageOperands;
|
||||
} else if (operandKind == "FPFastMathMode") {
|
||||
type = OperandFPFastMath;
|
||||
} else if (operandKind == "SelectionControl") {
|
||||
type = OperandSelect;
|
||||
} else if (operandKind == "LoopControl") {
|
||||
type = OperandLoop;
|
||||
} else if (operandKind == "FunctionControl") {
|
||||
type = OperandFunction;
|
||||
} else if (operandKind == "MemoryAccess") {
|
||||
type = OperandMemoryAccess;
|
||||
}
|
||||
|
||||
if (type == OperandNone) {
|
||||
std::cerr << "Unhandled operand kind found: " << operandKind << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
return {type, !quantifier.empty()};
|
||||
}
|
||||
}
|
||||
|
||||
bool IsTypeOrResultId(const std::string& str, bool* isType, bool* isResult)
|
||||
{
|
||||
if (str == "IdResultType")
|
||||
return *isType = true;
|
||||
if (str == "IdResult")
|
||||
return *isResult = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Given a number string, returns the position of the only bits set in the number.
|
||||
// So it requires the number is a power of two.
|
||||
unsigned int NumberStringToBit(const std::string& str)
|
||||
{
|
||||
char* parseEnd;
|
||||
unsigned int value = (unsigned int)std::strtol(str.c_str(), &parseEnd, 16);
|
||||
assert(!(value & (value - 1)) && "input number is not a power of 2");
|
||||
unsigned int bit = 0;
|
||||
for (; value; value >>= 1) ++bit;
|
||||
return bit;
|
||||
}
|
||||
|
||||
void jsonToSpirv(const std::string& jsonPath)
|
||||
{
|
||||
// only do this once.
|
||||
static bool initialized = false;
|
||||
if (initialized)
|
||||
return;
|
||||
initialized = true;
|
||||
|
||||
// Read the JSON grammar file.
|
||||
bool fileReadOk = false;
|
||||
std::string content;
|
||||
std::tie(fileReadOk, content) = ReadFile(jsonPath);
|
||||
if (!fileReadOk) {
|
||||
std::cerr << "Failed to read JSON grammar file: "
|
||||
<< jsonPath << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Decode the JSON grammar file.
|
||||
Json::Reader reader;
|
||||
Json::Value root;
|
||||
if (!reader.parse(content, root)) {
|
||||
std::cerr << "Failed to parse JSON grammar:\n"
|
||||
<< reader.getFormattedErrorMessages();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Layouts for all instructions.
|
||||
|
||||
// A lambda for returning capabilities from a JSON object as strings.
|
||||
const auto getCaps = [](const Json::Value& object) {
|
||||
EnumCaps result;
|
||||
const auto& caps = object["capabilities"];
|
||||
if (!caps.empty()) {
|
||||
assert(caps.isArray());
|
||||
for (const auto& cap : caps) {
|
||||
result.emplace_back(cap.asString());
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
// A lambda for returning extensions from a JSON object as strings.
|
||||
const auto getExts = [](const Json::Value& object) {
|
||||
Extensions result;
|
||||
const auto& exts = object["extensions"];
|
||||
if (!exts.empty()) {
|
||||
assert(exts.isArray());
|
||||
for (const auto& ext : exts) {
|
||||
result.emplace_back(ext.asString());
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
const Json::Value insts = root["instructions"];
|
||||
for (const auto& inst : insts) {
|
||||
const unsigned int opcode = inst["opcode"].asUInt();
|
||||
const std::string name = inst["opname"].asString();
|
||||
EnumCaps caps = getCaps(inst);
|
||||
std::string version = inst["version"].asString();
|
||||
Extensions exts = getExts(inst);
|
||||
OperandParameters operands;
|
||||
bool defResultId = false;
|
||||
bool defTypeId = false;
|
||||
for (const auto& operand : inst["operands"]) {
|
||||
const std::string kind = operand["kind"].asString();
|
||||
const std::string quantifier = operand.get("quantifier", "").asString();
|
||||
const std::string doc = operand.get("name", "").asString();
|
||||
if (!IsTypeOrResultId(kind, &defTypeId, &defResultId)) {
|
||||
const auto p = ToOperandClassAndOptionality(kind, quantifier);
|
||||
operands.push(p.type, doc, p.optional);
|
||||
}
|
||||
}
|
||||
InstructionDesc.emplace_back(
|
||||
std::move(EnumValue(opcode, name,
|
||||
std::move(caps), std::move(version), std::move(exts),
|
||||
std::move(operands))),
|
||||
defTypeId, defResultId);
|
||||
}
|
||||
|
||||
// Specific additional context-dependent operands
|
||||
|
||||
// Populate dest with EnumValue objects constructed from source.
|
||||
const auto populateEnumValues = [&getCaps,&getExts](EnumValues* dest, const Json::Value& source, bool bitEnum) {
|
||||
// A lambda for determining the numeric value to be used for a given
|
||||
// enumerant in JSON form, and whether that value is a 0 in a bitfield.
|
||||
auto getValue = [&bitEnum](const Json::Value& enumerant) {
|
||||
std::pair<unsigned, bool> result{0u,false};
|
||||
if (!bitEnum) {
|
||||
result.first = enumerant["value"].asUInt();
|
||||
} else {
|
||||
const unsigned int bit = NumberStringToBit(enumerant["value"].asString());
|
||||
if (bit == 0)
|
||||
result.second = true;
|
||||
else
|
||||
result.first = bit - 1; // This is the *shift* amount.
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
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;
|
||||
EnumCaps caps(getCaps(enumerant));
|
||||
std::string version = enumerant["version"].asString();
|
||||
Extensions exts(getExts(enumerant));
|
||||
OperandParameters params;
|
||||
const Json::Value& paramsJson = enumerant["parameters"];
|
||||
if (!paramsJson.empty()) { // This enumerant has parameters.
|
||||
assert(paramsJson.isArray());
|
||||
for (const auto& param : paramsJson) {
|
||||
const std::string kind = param["kind"].asString();
|
||||
const std::string doc = param.get("name", "").asString();
|
||||
const auto p = ToOperandClassAndOptionality(kind, ""); // All parameters are required!
|
||||
params.push(p.type, doc);
|
||||
}
|
||||
}
|
||||
dest->emplace_back(
|
||||
value, enumerant["enumerant"].asString(),
|
||||
std::move(caps), std::move(version), std::move(exts), std::move(params));
|
||||
}
|
||||
};
|
||||
|
||||
const auto establishOperandClass = [&populateEnumValues](
|
||||
const std::string& enumName, spv::OperandClass operandClass,
|
||||
spv::EnumValues* enumValues, const Json::Value& operandEnum, const std::string& category) {
|
||||
assert(category == "BitEnum" || category == "ValueEnum");
|
||||
bool bitEnum = (category == "BitEnum");
|
||||
populateEnumValues(enumValues, operandEnum, bitEnum);
|
||||
OperandClassParams[operandClass].set(enumName, enumValues, bitEnum);
|
||||
};
|
||||
|
||||
const Json::Value operandEnums = root["operand_kinds"];
|
||||
for (const auto& operandEnum : operandEnums) {
|
||||
const std::string enumName = operandEnum["kind"].asString();
|
||||
const std::string category = operandEnum["category"].asString();
|
||||
if (enumName == "SourceLanguage") {
|
||||
establishOperandClass(enumName, OperandSource, &SourceLanguageParams, operandEnum, category);
|
||||
} else if (enumName == "Decoration") {
|
||||
establishOperandClass(enumName, OperandDecoration, &DecorationParams, operandEnum, category);
|
||||
} else if (enumName == "ExecutionMode") {
|
||||
establishOperandClass(enumName, OperandExecutionMode, &ExecutionModeParams, operandEnum, category);
|
||||
} else if (enumName == "Capability") {
|
||||
establishOperandClass(enumName, OperandCapability, &CapabilityParams, operandEnum, category);
|
||||
} else if (enumName == "AddressingModel") {
|
||||
establishOperandClass(enumName, OperandAddressing, &AddressingParams, operandEnum, category);
|
||||
} else if (enumName == "MemoryModel") {
|
||||
establishOperandClass(enumName, OperandMemory, &MemoryParams, operandEnum, category);
|
||||
} else if (enumName == "MemorySemantics") {
|
||||
establishOperandClass(enumName, OperandMemorySemantics, &MemorySemanticsParams, operandEnum, category);
|
||||
} else if (enumName == "ExecutionModel") {
|
||||
establishOperandClass(enumName, OperandExecutionModel, &ExecutionModelParams, operandEnum, category);
|
||||
} else if (enumName == "StorageClass") {
|
||||
establishOperandClass(enumName, OperandStorage, &StorageParams, operandEnum, category);
|
||||
} else if (enumName == "SamplerAddressingMode") {
|
||||
establishOperandClass(enumName, OperandSamplerAddressingMode, &SamplerAddressingModeParams, operandEnum, category);
|
||||
} else if (enumName == "SamplerFilterMode") {
|
||||
establishOperandClass(enumName, OperandSamplerFilterMode, &SamplerFilterModeParams, operandEnum, category);
|
||||
} else if (enumName == "ImageFormat") {
|
||||
establishOperandClass(enumName, OperandSamplerImageFormat, &ImageFormatParams, operandEnum, category);
|
||||
} else if (enumName == "ImageChannelOrder") {
|
||||
establishOperandClass(enumName, OperandImageChannelOrder, &ImageChannelOrderParams, operandEnum, category);
|
||||
} else if (enumName == "ImageChannelDataType") {
|
||||
establishOperandClass(enumName, OperandImageChannelDataType, &ImageChannelDataTypeParams, operandEnum, category);
|
||||
} else if (enumName == "ImageOperands") {
|
||||
establishOperandClass(enumName, OperandImageOperands, &ImageOperandsParams, operandEnum, category);
|
||||
} else if (enumName == "FPFastMathMode") {
|
||||
establishOperandClass(enumName, OperandFPFastMath, &FPFastMathParams, operandEnum, category);
|
||||
} else if (enumName == "FPRoundingMode") {
|
||||
establishOperandClass(enumName, OperandFPRoundingMode, &FPRoundingModeParams, operandEnum, category);
|
||||
} else if (enumName == "LinkageType") {
|
||||
establishOperandClass(enumName, OperandLinkageType, &LinkageTypeParams, operandEnum, category);
|
||||
} else if (enumName == "FunctionParameterAttribute") {
|
||||
establishOperandClass(enumName, OperandFuncParamAttr, &FuncParamAttrParams, operandEnum, category);
|
||||
} else if (enumName == "AccessQualifier") {
|
||||
establishOperandClass(enumName, OperandAccessQualifier, &AccessQualifierParams, operandEnum, category);
|
||||
} else if (enumName == "BuiltIn") {
|
||||
establishOperandClass(enumName, OperandBuiltIn, &BuiltInParams, operandEnum, category);
|
||||
} else if (enumName == "SelectionControl") {
|
||||
establishOperandClass(enumName, OperandSelect, &SelectionControlParams, operandEnum, category);
|
||||
} else if (enumName == "LoopControl") {
|
||||
establishOperandClass(enumName, OperandLoop, &LoopControlParams, operandEnum, category);
|
||||
} else if (enumName == "FunctionControl") {
|
||||
establishOperandClass(enumName, OperandFunction, &FunctionControlParams, operandEnum, category);
|
||||
} else if (enumName == "Dim") {
|
||||
establishOperandClass(enumName, OperandDimensionality, &DimensionalityParams, operandEnum, category);
|
||||
} else if (enumName == "MemoryAccess") {
|
||||
establishOperandClass(enumName, OperandMemoryAccess, &MemoryAccessParams, operandEnum, category);
|
||||
} else if (enumName == "Scope") {
|
||||
establishOperandClass(enumName, OperandScope, &ScopeParams, operandEnum, category);
|
||||
} else if (enumName == "GroupOperation") {
|
||||
establishOperandClass(enumName, OperandGroupOperation, &GroupOperationParams, operandEnum, category);
|
||||
} else if (enumName == "KernelEnqueueFlags") {
|
||||
establishOperandClass(enumName, OperandKernelEnqueueFlags, &KernelEnqueueFlagsParams, operandEnum, category);
|
||||
} else if (enumName == "KernelProfilingInfo") {
|
||||
establishOperandClass(enumName, OperandKernelProfilingInfo, &KernelProfilingInfoParams, operandEnum, category);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}; // end namespace spv
|
||||
260
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/jsonToSpirv.h
vendored
Executable file
260
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/jsonToSpirv.h
vendored
Executable file
@@ -0,0 +1,260 @@
|
||||
// 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.
|
||||
|
||||
#pragma once
|
||||
#ifndef JSON_TO_SPIRV
|
||||
#define JSON_TO_SPIRV
|
||||
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <assert.h>
|
||||
|
||||
namespace spv {
|
||||
|
||||
// Reads the file in the given |path|. Returns true and the contents of the
|
||||
// file on success; otherwise, returns false and an empty string.
|
||||
std::pair<bool, std::string> ReadFile(const std::string& path);
|
||||
|
||||
// Fill in all the parameters
|
||||
void jsonToSpirv(const std::string& jsonPath);
|
||||
|
||||
// For parameterizing operands.
|
||||
enum OperandClass {
|
||||
OperandNone,
|
||||
OperandId,
|
||||
OperandVariableIds,
|
||||
OperandOptionalLiteral,
|
||||
OperandOptionalLiteralString,
|
||||
OperandVariableLiterals,
|
||||
OperandVariableIdLiteral,
|
||||
OperandVariableLiteralId,
|
||||
OperandLiteralNumber,
|
||||
OperandLiteralString,
|
||||
OperandSource,
|
||||
OperandExecutionModel,
|
||||
OperandAddressing,
|
||||
OperandMemory,
|
||||
OperandExecutionMode,
|
||||
OperandStorage,
|
||||
OperandDimensionality,
|
||||
OperandSamplerAddressingMode,
|
||||
OperandSamplerFilterMode,
|
||||
OperandSamplerImageFormat,
|
||||
OperandImageChannelOrder,
|
||||
OperandImageChannelDataType,
|
||||
OperandImageOperands,
|
||||
OperandFPFastMath,
|
||||
OperandFPRoundingMode,
|
||||
OperandLinkageType,
|
||||
OperandAccessQualifier,
|
||||
OperandFuncParamAttr,
|
||||
OperandDecoration,
|
||||
OperandBuiltIn,
|
||||
OperandSelect,
|
||||
OperandLoop,
|
||||
OperandFunction,
|
||||
OperandMemorySemantics,
|
||||
OperandMemoryAccess,
|
||||
OperandScope,
|
||||
OperandGroupOperation,
|
||||
OperandKernelEnqueueFlags,
|
||||
OperandKernelProfilingInfo,
|
||||
OperandCapability,
|
||||
|
||||
OperandOpcode,
|
||||
|
||||
OperandCount
|
||||
};
|
||||
|
||||
// Any specific enum can have a set of capabilities that allow it:
|
||||
typedef std::vector<std::string> EnumCaps;
|
||||
|
||||
// A set of extensions.
|
||||
typedef std::vector<std::string> Extensions;
|
||||
|
||||
// Parameterize a set of operands with their OperandClass(es) and descriptions.
|
||||
class OperandParameters {
|
||||
public:
|
||||
OperandParameters() { }
|
||||
void push(OperandClass oc, const std::string& d, bool opt = false)
|
||||
{
|
||||
opClass.push_back(oc);
|
||||
desc.push_back(d);
|
||||
optional.push_back(opt);
|
||||
}
|
||||
void setOptional();
|
||||
OperandClass getClass(int op) const { return opClass[op]; }
|
||||
const char* getDesc(int op) const { return desc[op].c_str(); }
|
||||
bool isOptional(int op) const { return optional[op]; }
|
||||
int getNum() const { return (int)opClass.size(); }
|
||||
|
||||
protected:
|
||||
std::vector<OperandClass> opClass;
|
||||
std::vector<std::string> desc;
|
||||
std::vector<bool> optional;
|
||||
};
|
||||
|
||||
// An ordered sequence of EValue. We'll preserve the order found in the
|
||||
// JSON file. You can look up a value by enum or by name. If there are
|
||||
// duplicate values, then take the first. We assume names are unique.
|
||||
// The EValue must have an unsigned |value| field and a string |name| field.
|
||||
template <typename EValue>
|
||||
class EnumValuesContainer {
|
||||
public:
|
||||
using ContainerType = std::vector<EValue>;
|
||||
using iterator = typename ContainerType::iterator;
|
||||
using const_iterator = typename ContainerType::const_iterator;
|
||||
|
||||
EnumValuesContainer() {}
|
||||
|
||||
// Constructs an EValue in place as a new element at the end of the
|
||||
// sequence.
|
||||
template <typename... Args>
|
||||
void emplace_back(Args&&... args) {
|
||||
values.emplace_back(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
// Returns the first EValue in the sequence with the given value.
|
||||
// More than one EValue might have the same value.
|
||||
EValue& operator[](unsigned value) {
|
||||
auto where = std::find_if(begin(), end(), [&value](const EValue& e) {
|
||||
return value == e.value;
|
||||
});
|
||||
assert((where != end()) && "Could not find enum in the enum list");
|
||||
return *where;
|
||||
}
|
||||
// Returns the EValue with the given name. We assume uniqueness
|
||||
// by name.
|
||||
EValue& at(std::string name) {
|
||||
auto where = std::find_if(begin(), end(), [&name](const EValue& e) {
|
||||
return name == e.name;
|
||||
});
|
||||
assert((where != end()) && "Could not find name in the enum list");
|
||||
return *where;
|
||||
}
|
||||
|
||||
iterator begin() { return values.begin(); }
|
||||
iterator end() { return values.end(); }
|
||||
|
||||
private:
|
||||
ContainerType values;
|
||||
};
|
||||
|
||||
// A single enumerant value. Corresponds to a row in an enumeration table
|
||||
// in the spec.
|
||||
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)),
|
||||
extensions(std::move(the_extensions)), operands(std::move(the_operands)), desc(nullptr) { }
|
||||
|
||||
// For ValueEnum, the value from the JSON file.
|
||||
// For BitEnum, the index of the bit position represented by this mask.
|
||||
// (That is, what you shift 1 by to get the mask.)
|
||||
unsigned value;
|
||||
std::string name;
|
||||
EnumCaps capabilities;
|
||||
std::string version;
|
||||
// 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,
|
||||
// other enums and instructions are enabled by those capabilities.
|
||||
Extensions extensions;
|
||||
OperandParameters operands;
|
||||
const char* desc;
|
||||
};
|
||||
|
||||
using EnumValues = EnumValuesContainer<EnumValue>;
|
||||
|
||||
// Parameterize a set of enumerants that form an enum
|
||||
class EnumDefinition {
|
||||
public:
|
||||
EnumDefinition() :
|
||||
desc(0), bitmask(false), enumValues(nullptr) { }
|
||||
void set(const std::string& enumName, EnumValues* enumValuesArg, bool mask = false)
|
||||
{
|
||||
codeName = enumName;
|
||||
bitmask = mask;
|
||||
enumValues = enumValuesArg;
|
||||
}
|
||||
// Returns the first EnumValue in the sequence with the given value.
|
||||
// More than one EnumValue might have the same value. Only valid
|
||||
// if enumValues has been populated.
|
||||
EnumValue& operator[](unsigned value) {
|
||||
assert(enumValues != nullptr);
|
||||
return (*enumValues)[value];
|
||||
}
|
||||
// Returns the name of the first EnumValue with the given value.
|
||||
// Assumes enumValues has been populated.
|
||||
const char* getName(unsigned value) {
|
||||
return (*this)[value].name.c_str();
|
||||
}
|
||||
|
||||
using iterator = EnumValues::iterator;
|
||||
iterator begin() { return enumValues->begin(); }
|
||||
iterator end() { return enumValues->end(); }
|
||||
|
||||
std::string codeName; // name to use when declaring headers for code
|
||||
const char* desc;
|
||||
bool bitmask; // true if these enumerants combine into a bitmask
|
||||
EnumValues* enumValues; // parameters for each individual enumerant
|
||||
};
|
||||
|
||||
// Parameterize an instruction's logical format, including its known set of operands,
|
||||
// per OperandParameters above.
|
||||
class InstructionValue : public EnumValue {
|
||||
public:
|
||||
InstructionValue(EnumValue&& e, bool has_type, bool has_result)
|
||||
: EnumValue(std::move(e)),
|
||||
opDesc("TBD"),
|
||||
opClass(0),
|
||||
typePresent(has_type),
|
||||
resultPresent(has_result) {}
|
||||
|
||||
bool hasResult() const { return resultPresent != 0; }
|
||||
bool hasType() const { return typePresent != 0; }
|
||||
|
||||
const char* opDesc;
|
||||
int opClass;
|
||||
|
||||
protected:
|
||||
int typePresent : 1;
|
||||
int resultPresent : 1;
|
||||
};
|
||||
|
||||
using InstructionValues = EnumValuesContainer<InstructionValue>;
|
||||
|
||||
// Parameterization info for all instructions.
|
||||
extern InstructionValues InstructionDesc;
|
||||
|
||||
// These hold definitions of the enumerants used for operands.
|
||||
// This is indexed by OperandClass, but not including OperandOpcode.
|
||||
extern EnumDefinition OperandClassParams[];
|
||||
|
||||
}; // end namespace spv
|
||||
|
||||
#endif // JSON_TO_SPIRV
|
||||
255
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/jsoncpp/dist/json/json-forwards.h
vendored
Executable file
255
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/jsoncpp/dist/json/json-forwards.h
vendored
Executable file
@@ -0,0 +1,255 @@
|
||||
/// Json-cpp amalgated forward header (http://jsoncpp.sourceforge.net/).
|
||||
/// It is intended to be used with #include "json/json-forwards.h"
|
||||
/// This header provides forward declaration for all JsonCpp types.
|
||||
|
||||
// //////////////////////////////////////////////////////////////////////
|
||||
// Beginning of content of file: LICENSE
|
||||
// //////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
The JsonCpp library's source code, including accompanying documentation,
|
||||
tests and demonstration applications, are licensed under the following
|
||||
conditions...
|
||||
|
||||
The author (Baptiste Lepilleur) explicitly disclaims copyright in all
|
||||
jurisdictions which recognize such a disclaimer. In such jurisdictions,
|
||||
this software is released into the Public Domain.
|
||||
|
||||
In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
|
||||
2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is
|
||||
released under the terms of the MIT License (see below).
|
||||
|
||||
In jurisdictions which recognize Public Domain property, the user of this
|
||||
software may choose to accept it either as 1) Public Domain, 2) under the
|
||||
conditions of the MIT License (see below), or 3) under the terms of dual
|
||||
Public Domain/MIT License conditions described here, as they choose.
|
||||
|
||||
The MIT License is about as close to Public Domain as a license can get, and is
|
||||
described in clear, concise terms at:
|
||||
|
||||
http://en.wikipedia.org/wiki/MIT_License
|
||||
|
||||
The full text of the MIT License follows:
|
||||
|
||||
========================================================================
|
||||
Copyright (c) 2007-2010 Baptiste Lepilleur
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use, copy,
|
||||
modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is
|
||||
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 Software.
|
||||
|
||||
THE SOFTWARE IS 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
========================================================================
|
||||
(END LICENSE TEXT)
|
||||
|
||||
The MIT license is compatible with both the GPL and commercial
|
||||
software, affording one all of the rights of Public Domain with the
|
||||
minor nuisance of being required to keep the above copyright notice
|
||||
and license text in the source code. Note also that by accepting the
|
||||
Public Domain "license" you can re-license your copy using whatever
|
||||
license you like.
|
||||
|
||||
*/
|
||||
|
||||
// //////////////////////////////////////////////////////////////////////
|
||||
// End of content of file: LICENSE
|
||||
// //////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef JSON_FORWARD_AMALGATED_H_INCLUDED
|
||||
# define JSON_FORWARD_AMALGATED_H_INCLUDED
|
||||
/// If defined, indicates that the source file is amalgated
|
||||
/// to prevent private header inclusion.
|
||||
#define JSON_IS_AMALGAMATION
|
||||
|
||||
// //////////////////////////////////////////////////////////////////////
|
||||
// Beginning of content of file: include/json/config.h
|
||||
// //////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Copyright 2007-2010 Baptiste Lepilleur
|
||||
// Distributed under MIT license, or public domain if desired and
|
||||
// recognized in your jurisdiction.
|
||||
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
|
||||
|
||||
#ifndef JSON_CONFIG_H_INCLUDED
|
||||
#define JSON_CONFIG_H_INCLUDED
|
||||
|
||||
/// If defined, indicates that json library is embedded in CppTL library.
|
||||
//# define JSON_IN_CPPTL 1
|
||||
|
||||
/// If defined, indicates that json may leverage CppTL library
|
||||
//# define JSON_USE_CPPTL 1
|
||||
/// If defined, indicates that cpptl vector based map should be used instead of
|
||||
/// std::map
|
||||
/// as Value container.
|
||||
//# define JSON_USE_CPPTL_SMALLMAP 1
|
||||
|
||||
// If non-zero, the library uses exceptions to report bad input instead of C
|
||||
// assertion macros. The default is to use exceptions.
|
||||
#ifndef JSON_USE_EXCEPTION
|
||||
#define JSON_USE_EXCEPTION 1
|
||||
#endif
|
||||
|
||||
/// If defined, indicates that the source file is amalgated
|
||||
/// to prevent private header inclusion.
|
||||
/// Remarks: it is automatically defined in the generated amalgated header.
|
||||
// #define JSON_IS_AMALGAMATION
|
||||
|
||||
#ifdef JSON_IN_CPPTL
|
||||
#include <cpptl/config.h>
|
||||
#ifndef JSON_USE_CPPTL
|
||||
#define JSON_USE_CPPTL 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef JSON_IN_CPPTL
|
||||
#define JSON_API CPPTL_API
|
||||
#elif defined(JSON_DLL_BUILD)
|
||||
#if defined(_MSC_VER)
|
||||
#define JSON_API __declspec(dllexport)
|
||||
#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
|
||||
#endif // if defined(_MSC_VER)
|
||||
#elif defined(JSON_DLL)
|
||||
#if defined(_MSC_VER)
|
||||
#define JSON_API __declspec(dllimport)
|
||||
#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
|
||||
#endif // if defined(_MSC_VER)
|
||||
#endif // ifdef JSON_IN_CPPTL
|
||||
#if !defined(JSON_API)
|
||||
#define JSON_API
|
||||
#endif
|
||||
|
||||
// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for
|
||||
// integer
|
||||
// Storages, and 64 bits integer support is disabled.
|
||||
// #define JSON_NO_INT64 1
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6
|
||||
// Microsoft Visual Studio 6 only support conversion from __int64 to double
|
||||
// (no conversion from unsigned __int64).
|
||||
#define JSON_USE_INT64_DOUBLE_CONVERSION 1
|
||||
// Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255'
|
||||
// characters in the debug information)
|
||||
// All projects I've ever seen with VS6 were using this globally (not bothering
|
||||
// with pragma push/pop).
|
||||
#pragma warning(disable : 4786)
|
||||
#endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008
|
||||
/// Indicates that the following function is deprecated.
|
||||
#define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
|
||||
#elif defined(__clang__) && defined(__has_feature)
|
||||
#if __has_feature(attribute_deprecated_with_message)
|
||||
#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
|
||||
#endif
|
||||
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
|
||||
#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
|
||||
#elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
|
||||
#define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__))
|
||||
#endif
|
||||
|
||||
#if !defined(JSONCPP_DEPRECATED)
|
||||
#define JSONCPP_DEPRECATED(message)
|
||||
#endif // if !defined(JSONCPP_DEPRECATED)
|
||||
|
||||
namespace Json {
|
||||
typedef int Int;
|
||||
typedef unsigned int UInt;
|
||||
#if defined(JSON_NO_INT64)
|
||||
typedef int LargestInt;
|
||||
typedef unsigned int LargestUInt;
|
||||
#undef JSON_HAS_INT64
|
||||
#else // if defined(JSON_NO_INT64)
|
||||
// For Microsoft Visual use specific types as long long is not supported
|
||||
#if defined(_MSC_VER) // Microsoft Visual Studio
|
||||
typedef __int64 Int64;
|
||||
typedef unsigned __int64 UInt64;
|
||||
#else // if defined(_MSC_VER) // Other platforms, use long long
|
||||
typedef long long int Int64;
|
||||
typedef unsigned long long int UInt64;
|
||||
#endif // if defined(_MSC_VER)
|
||||
typedef Int64 LargestInt;
|
||||
typedef UInt64 LargestUInt;
|
||||
#define JSON_HAS_INT64
|
||||
#endif // if defined(JSON_NO_INT64)
|
||||
} // end namespace Json
|
||||
|
||||
#endif // JSON_CONFIG_H_INCLUDED
|
||||
|
||||
// //////////////////////////////////////////////////////////////////////
|
||||
// End of content of file: include/json/config.h
|
||||
// //////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// //////////////////////////////////////////////////////////////////////
|
||||
// Beginning of content of file: include/json/forwards.h
|
||||
// //////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Copyright 2007-2010 Baptiste Lepilleur
|
||||
// Distributed under MIT license, or public domain if desired and
|
||||
// recognized in your jurisdiction.
|
||||
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
|
||||
|
||||
#ifndef JSON_FORWARDS_H_INCLUDED
|
||||
#define JSON_FORWARDS_H_INCLUDED
|
||||
|
||||
#if !defined(JSON_IS_AMALGAMATION)
|
||||
#include "config.h"
|
||||
#endif // if !defined(JSON_IS_AMALGAMATION)
|
||||
|
||||
namespace Json {
|
||||
|
||||
// writer.h
|
||||
class FastWriter;
|
||||
class StyledWriter;
|
||||
|
||||
// reader.h
|
||||
class Reader;
|
||||
|
||||
// features.h
|
||||
class Features;
|
||||
|
||||
// value.h
|
||||
typedef unsigned int ArrayIndex;
|
||||
class StaticString;
|
||||
class Path;
|
||||
class PathArgument;
|
||||
class Value;
|
||||
class ValueIteratorBase;
|
||||
class ValueIterator;
|
||||
class ValueConstIterator;
|
||||
|
||||
} // namespace Json
|
||||
|
||||
#endif // JSON_FORWARDS_H_INCLUDED
|
||||
|
||||
// //////////////////////////////////////////////////////////////////////
|
||||
// End of content of file: include/json/forwards.h
|
||||
// //////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif //ifndef JSON_FORWARD_AMALGATED_H_INCLUDED
|
||||
2017
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/jsoncpp/dist/json/json.h
vendored
Executable file
2017
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/jsoncpp/dist/json/json.h
vendored
Executable file
File diff suppressed because it is too large
Load Diff
5124
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/jsoncpp/dist/jsoncpp.cpp
vendored
Executable file
5124
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/jsoncpp/dist/jsoncpp.cpp
vendored
Executable file
File diff suppressed because it is too large
Load Diff
121
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/main.cpp
vendored
Executable file
121
externals/sirit/externals/SPIRV-Headers/tools/buildHeaders/main.cpp
vendored
Executable file
@@ -0,0 +1,121 @@
|
||||
// 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.
|
||||
|
||||
//#include <fstream>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
|
||||
#include "jsonToSpirv.h"
|
||||
#include "header.h"
|
||||
|
||||
// Command-line options
|
||||
enum TOptions {
|
||||
EOptionNone = 0x000,
|
||||
EOptionPrintHeader = 0x008,
|
||||
};
|
||||
|
||||
std::string jsonPath;
|
||||
int Options;
|
||||
spv::TLanguage Language;
|
||||
|
||||
void Usage()
|
||||
{
|
||||
printf("Usage: spirv option [file]\n"
|
||||
"\n"
|
||||
" -h <language> print header for given language to stdout, from one of:\n"
|
||||
" C - C99 header\n"
|
||||
" C++ - C++03 or greater header (also accepts C++03)\n"
|
||||
" C++11 - C++11 or greater header\n"
|
||||
" JSON - JSON format data\n"
|
||||
" Lua - Lua module\n"
|
||||
" Python - Python module (also accepts Py)\n"
|
||||
" -H print header in all supported languages to files in current directory\n"
|
||||
);
|
||||
}
|
||||
|
||||
std::string tolower_s(std::string s)
|
||||
{
|
||||
std::transform(s.begin(), s.end(), s.begin(), ::tolower);
|
||||
return s;
|
||||
}
|
||||
|
||||
bool ProcessArguments(int argc, char* argv[])
|
||||
{
|
||||
argc--;
|
||||
argv++;
|
||||
for (; argc >= 1; argc--, argv++) {
|
||||
if (argv[0][0] == '-') {
|
||||
switch (argv[0][1]) {
|
||||
case 'H':
|
||||
Options |= EOptionPrintHeader;
|
||||
Language = spv::ELangAll;
|
||||
break;
|
||||
case 'h': {
|
||||
if (argc < 2)
|
||||
return false;
|
||||
|
||||
Options |= EOptionPrintHeader;
|
||||
const std::string language(tolower_s(argv[1]));
|
||||
|
||||
if (language == "c") {
|
||||
Language = spv::ELangC;
|
||||
} else if (language == "c++" || language == "c++03") {
|
||||
Language = spv::ELangCPP;
|
||||
} else if (language == "c++11") {
|
||||
Language = spv::ELangCPP11;
|
||||
} else if (language == "json") {
|
||||
Language = spv::ELangJSON;
|
||||
} else if (language == "lua") {
|
||||
Language = spv::ELangLua;
|
||||
} else if (language == "python" || language == "py") {
|
||||
Language = spv::ELangPython;
|
||||
} else
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
jsonPath = std::string(argv[0]);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
if (argc < 2 || ! ProcessArguments(argc, argv)) {
|
||||
Usage();
|
||||
return 1;
|
||||
}
|
||||
|
||||
spv::jsonToSpirv(jsonPath);
|
||||
if (Options & EOptionPrintHeader)
|
||||
spv::PrintHeader(Language, std::cout);
|
||||
|
||||
return 0;
|
||||
}
|
||||
1114
externals/sirit/include/sirit/sirit.h
vendored
Executable file
1114
externals/sirit/include/sirit/sirit.h
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1
externals/sirit/src/.gitignore
vendored
Executable file
1
externals/sirit/src/.gitignore
vendored
Executable file
@@ -0,0 +1 @@
|
||||
sirit.h
|
||||
39
externals/sirit/src/CMakeLists.txt
vendored
Executable file
39
externals/sirit/src/CMakeLists.txt
vendored
Executable file
@@ -0,0 +1,39 @@
|
||||
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/memory.cpp
|
||||
instructions/annotation.cpp
|
||||
instructions/misc.cpp
|
||||
instructions/logical.cpp
|
||||
instructions/conversion.cpp
|
||||
instructions/bit.cpp
|
||||
instructions/arithmetic.cpp
|
||||
instructions/extension.cpp
|
||||
instructions/image.cpp
|
||||
instructions/group.cpp
|
||||
instructions/barrier.cpp
|
||||
instructions/atomic.cpp
|
||||
)
|
||||
|
||||
target_compile_options(sirit PRIVATE ${SIRIT_CXX_FLAGS})
|
||||
|
||||
target_include_directories(sirit
|
||||
PUBLIC ../include
|
||||
PRIVATE . ${SPIRV-Headers_SOURCE_DIR}/include
|
||||
INTERFACE ${SPIRV-Headers_SOURCE_DIR}/include)
|
||||
31
externals/sirit/src/common_types.h
vendored
Executable file
31
externals/sirit/src/common_types.h
vendored
Executable file
@@ -0,0 +1,31 @@
|
||||
/* 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
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
using u8 = std::uint8_t;
|
||||
using u16 = std::uint16_t;
|
||||
using u32 = std::uint32_t;
|
||||
using u64 = std::uint64_t;
|
||||
using uptr = std::uintptr_t;
|
||||
|
||||
using s8 = std::int8_t;
|
||||
using s16 = std::int16_t;
|
||||
using s32 = std::int32_t;
|
||||
using s64 = std::int64_t;
|
||||
using sptr = std::intptr_t;
|
||||
|
||||
using f32 = float;
|
||||
using f64 = double;
|
||||
static_assert(sizeof(f32) == sizeof(u32), "f32 must be 32 bits wide");
|
||||
static_assert(sizeof(f64) == sizeof(u64), "f64 must be 64 bits wide");
|
||||
|
||||
} // namespace Sirit
|
||||
35
externals/sirit/src/instructions/annotation.cpp
vendored
Executable file
35
externals/sirit/src/instructions/annotation.cpp
vendored
Executable file
@@ -0,0 +1,35 @@
|
||||
/* 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 <memory>
|
||||
#include <vector>
|
||||
#include "common_types.h"
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.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::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;
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
57
externals/sirit/src/instructions/arithmetic.cpp
vendored
Executable file
57
externals/sirit/src/instructions/arithmetic.cpp
vendored
Executable file
@@ -0,0 +1,57 @@
|
||||
/* 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 <memory>
|
||||
#include "common_types.h"
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.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_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)); \
|
||||
}
|
||||
|
||||
DEFINE_UNARY(OpSNegate, spv::Op::OpSNegate)
|
||||
DEFINE_UNARY(OpFNegate, spv::Op::OpFNegate)
|
||||
|
||||
DEFINE_BINARY(OpIAdd, spv::Op::OpIAdd)
|
||||
DEFINE_BINARY(OpFAdd, spv::Op::OpFAdd)
|
||||
DEFINE_BINARY(OpISub, spv::Op::OpISub)
|
||||
DEFINE_BINARY(OpFSub, spv::Op::OpFSub)
|
||||
DEFINE_BINARY(OpIMul, spv::Op::OpIMul)
|
||||
DEFINE_BINARY(OpFMul, spv::Op::OpFMul)
|
||||
DEFINE_BINARY(OpUDiv, spv::Op::OpUDiv)
|
||||
DEFINE_BINARY(OpSDiv, spv::Op::OpSDiv)
|
||||
DEFINE_BINARY(OpFDiv, spv::Op::OpFDiv)
|
||||
DEFINE_BINARY(OpUMod, spv::Op::OpUMod)
|
||||
DEFINE_BINARY(OpSMod, spv::Op::OpSMod)
|
||||
DEFINE_BINARY(OpFMod, spv::Op::OpFMod)
|
||||
DEFINE_BINARY(OpSRem, spv::Op::OpSRem)
|
||||
DEFINE_BINARY(OpFRem, spv::Op::OpFRem)
|
||||
DEFINE_BINARY(OpIAddCarry, spv::Op::OpIAddCarry)
|
||||
|
||||
} // namespace Sirit
|
||||
148
externals/sirit/src/instructions/atomic.cpp
vendored
Executable file
148
externals/sirit/src/instructions/atomic.cpp
vendored
Executable file
@@ -0,0 +1,148 @@
|
||||
/* 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 "common_types.h"
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
28
externals/sirit/src/instructions/barrier.cpp
vendored
Executable file
28
externals/sirit/src/instructions/barrier.cpp
vendored
Executable file
@@ -0,0 +1,28 @@
|
||||
/* 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 <memory>
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
99
externals/sirit/src/instructions/bit.cpp
vendored
Executable file
99
externals/sirit/src/instructions/bit.cpp
vendored
Executable file
@@ -0,0 +1,99 @@
|
||||
/* 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 <memory>
|
||||
#include "common_types.h"
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
46
externals/sirit/src/instructions/constant.cpp
vendored
Executable file
46
externals/sirit/src/instructions/constant.cpp
vendored
Executable file
@@ -0,0 +1,46 @@
|
||||
/* 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 <cassert>
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::ConstantTrue(Id result_type) {
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpConstantTrue, bound, result_type));
|
||||
}
|
||||
|
||||
Id Module::ConstantFalse(Id result_type) {
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpConstantFalse, bound, result_type));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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::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));
|
||||
}
|
||||
|
||||
Id Module::ConstantNull(Id result_type) {
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpConstantNull, bound, result_type));
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
31
externals/sirit/src/instructions/conversion.cpp
vendored
Executable file
31
externals/sirit/src/instructions/conversion.cpp
vendored
Executable file
@@ -0,0 +1,31 @@
|
||||
/* 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 <memory>
|
||||
#include "common_types.h"
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.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)); \
|
||||
}
|
||||
|
||||
DEFINE_UNARY(OpConvertFToU)
|
||||
DEFINE_UNARY(OpConvertFToS)
|
||||
DEFINE_UNARY(OpConvertSToF)
|
||||
DEFINE_UNARY(OpConvertUToF)
|
||||
DEFINE_UNARY(OpUConvert)
|
||||
DEFINE_UNARY(OpSConvert)
|
||||
DEFINE_UNARY(OpFConvert)
|
||||
DEFINE_UNARY(OpQuantizeToF16)
|
||||
DEFINE_UNARY(OpBitcast)
|
||||
|
||||
} // namespace Sirit
|
||||
47
externals/sirit/src/instructions/debug.cpp
vendored
Executable file
47
externals/sirit/src/instructions/debug.cpp
vendored
Executable file
@@ -0,0 +1,47 @@
|
||||
/* 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 <memory>
|
||||
#include <string>
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.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));
|
||||
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));
|
||||
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::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));
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
77
externals/sirit/src/instructions/extension.cpp
vendored
Executable file
77
externals/sirit/src/instructions/extension.cpp
vendored
Executable file
@@ -0,0 +1,77 @@
|
||||
/* 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 <memory>
|
||||
#include <spirv/unified1/GLSL.std.450.h>
|
||||
#include "common_types.h"
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.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));
|
||||
}
|
||||
|
||||
#define DEFINE_UNARY(funcname, opcode) \
|
||||
Id Module::funcname(Id result_type, Id operand) { \
|
||||
return OpExtInst(result_type, GetGLSLstd450(), opcode, operand); \
|
||||
}
|
||||
|
||||
#define DEFINE_BINARY(funcname, opcode) \
|
||||
Id Module::funcname(Id result_type, Id operand_1, Id operand_2) { \
|
||||
return OpExtInst(result_type, GetGLSLstd450(), opcode, operand_1, operand_2); \
|
||||
}
|
||||
|
||||
#define DEFINE_TRINARY(funcname, opcode) \
|
||||
Id Module::funcname(Id result_type, Id operand_1, Id operand_2, Id operand_3) { \
|
||||
return OpExtInst(result_type, GetGLSLstd450(), opcode, operand_1, operand_2, operand_3); \
|
||||
}
|
||||
|
||||
DEFINE_UNARY(OpFAbs, GLSLstd450FAbs)
|
||||
DEFINE_UNARY(OpSAbs, GLSLstd450SAbs)
|
||||
DEFINE_UNARY(OpRound, GLSLstd450Round)
|
||||
DEFINE_UNARY(OpRoundEven, GLSLstd450RoundEven)
|
||||
DEFINE_UNARY(OpTrunc, GLSLstd450Trunc)
|
||||
DEFINE_UNARY(OpFSign, GLSLstd450FSign)
|
||||
DEFINE_UNARY(OpSSign, GLSLstd450SSign)
|
||||
DEFINE_UNARY(OpFloor, GLSLstd450Floor)
|
||||
DEFINE_UNARY(OpCeil, GLSLstd450Ceil)
|
||||
DEFINE_UNARY(OpFract, GLSLstd450Fract)
|
||||
DEFINE_UNARY(OpSin, GLSLstd450Sin)
|
||||
DEFINE_UNARY(OpCos, GLSLstd450Cos)
|
||||
DEFINE_UNARY(OpAsin, GLSLstd450Asin)
|
||||
DEFINE_UNARY(OpAcos, GLSLstd450Acos)
|
||||
DEFINE_BINARY(OpPow, GLSLstd450Pow)
|
||||
DEFINE_UNARY(OpExp, GLSLstd450Exp)
|
||||
DEFINE_UNARY(OpLog, GLSLstd450Log)
|
||||
DEFINE_UNARY(OpExp2, GLSLstd450Exp2)
|
||||
DEFINE_UNARY(OpLog2, GLSLstd450Log2)
|
||||
DEFINE_UNARY(OpSqrt, GLSLstd450Sqrt)
|
||||
DEFINE_UNARY(OpInverseSqrt, GLSLstd450InverseSqrt)
|
||||
DEFINE_BINARY(OpFMin, GLSLstd450FMin)
|
||||
DEFINE_BINARY(OpUMin, GLSLstd450UMin)
|
||||
DEFINE_BINARY(OpSMin, GLSLstd450SMin)
|
||||
DEFINE_BINARY(OpFMax, GLSLstd450FMax)
|
||||
DEFINE_BINARY(OpUMax, GLSLstd450UMax)
|
||||
DEFINE_BINARY(OpSMax, GLSLstd450SMax)
|
||||
DEFINE_TRINARY(OpFClamp, GLSLstd450FClamp)
|
||||
DEFINE_TRINARY(OpUClamp, GLSLstd450UClamp)
|
||||
DEFINE_TRINARY(OpSClamp, GLSLstd450SClamp)
|
||||
DEFINE_TRINARY(OpFma, GLSLstd450Fma)
|
||||
DEFINE_UNARY(OpPackHalf2x16, GLSLstd450PackHalf2x16)
|
||||
DEFINE_UNARY(OpUnpackHalf2x16, GLSLstd450UnpackHalf2x16)
|
||||
DEFINE_UNARY(OpFindILsb, GLSLstd450FindILsb)
|
||||
DEFINE_UNARY(OpFindSMsb, GLSLstd450FindSMsb)
|
||||
DEFINE_UNARY(OpFindUMsb, GLSLstd450FindUMsb)
|
||||
DEFINE_UNARY(OpInterpolateAtCentroid, GLSLstd450InterpolateAtCentroid)
|
||||
DEFINE_BINARY(OpInterpolateAtSample, GLSLstd450InterpolateAtSample)
|
||||
DEFINE_BINARY(OpInterpolateAtOffset, GLSLstd450InterpolateAtOffset)
|
||||
} // namespace Sirit
|
||||
83
externals/sirit/src/instructions/flow.cpp
vendored
Executable file
83
externals/sirit/src/instructions/flow.cpp
vendored
Executable file
@@ -0,0 +1,83 @@
|
||||
/* 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 <cassert>
|
||||
#include <vector>
|
||||
#include "common_types.h"
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
Id Module::OpLabel() {
|
||||
return code_store.emplace_back(std::make_unique<Op>(spv::Op::OpLabel, bound++)).get();
|
||||
}
|
||||
|
||||
Id Module::OpBranch(Id target_label) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpBranch)};
|
||||
op->Add(target_label);
|
||||
return AddCode(std::move(op));
|
||||
}
|
||||
|
||||
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);
|
||||
if (true_weight != 0 || false_weight != 0) {
|
||||
op->Add(true_weight);
|
||||
op->Add(false_weight);
|
||||
}
|
||||
return AddCode(std::move(op));
|
||||
}
|
||||
|
||||
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();
|
||||
assert(literals.size() == labels.size());
|
||||
auto op{std::make_unique<Op>(spv::Op::OpSwitch)};
|
||||
op->Add(selector);
|
||||
op->Add(default_label);
|
||||
for (std::size_t i = 0; i < size; ++i) {
|
||||
op->Add(literals[i]);
|
||||
op->Add(labels[i]);
|
||||
}
|
||||
return AddCode(std::move(op));
|
||||
}
|
||||
|
||||
Id Module::OpReturn() {
|
||||
return AddCode(spv::Op::OpReturn);
|
||||
}
|
||||
|
||||
Id Module::OpReturnValue(Id value) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpReturnValue)};
|
||||
op->Add(value);
|
||||
return AddCode(std::move(op));
|
||||
}
|
||||
|
||||
Id Module::OpKill() {
|
||||
return AddCode(std::make_unique<Op>(spv::Op::OpKill));
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
31
externals/sirit/src/instructions/function.cpp
vendored
Executable file
31
externals/sirit/src/instructions/function.cpp
vendored
Executable file
@@ -0,0 +1,31 @@
|
||||
/* 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 "common_types.h"
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.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));
|
||||
}
|
||||
|
||||
Id Module::OpFunctionEnd() {
|
||||
return AddCode(spv::Op::OpFunctionEnd);
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
51
externals/sirit/src/instructions/group.cpp
vendored
Executable file
51
externals/sirit/src/instructions/group.cpp
vendored
Executable file
@@ -0,0 +1,51 @@
|
||||
/* 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 "op.h"
|
||||
#include "sirit/sirit.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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
124
externals/sirit/src/instructions/image.cpp
vendored
Executable file
124
externals/sirit/src/instructions/image.cpp
vendored
Executable file
@@ -0,0 +1,124 @@
|
||||
/* 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 "common_types.h"
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
#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)); \
|
||||
}
|
||||
|
||||
#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)); \
|
||||
}
|
||||
|
||||
#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)); \
|
||||
}
|
||||
|
||||
#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)); \
|
||||
}
|
||||
|
||||
#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)); \
|
||||
}
|
||||
|
||||
#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)); \
|
||||
}
|
||||
|
||||
DEFINE_IMAGE_OP(OpImageSampleImplicitLod)
|
||||
DEFINE_IMAGE_EXP_OP(OpImageSampleExplicitLod)
|
||||
DEFINE_IMAGE_EXTRA_OP(OpImageSampleDrefImplicitLod)
|
||||
DEFINE_IMAGE_EXTRA_EXP_OP(OpImageSampleDrefExplicitLod)
|
||||
DEFINE_IMAGE_OP(OpImageSampleProjImplicitLod)
|
||||
DEFINE_IMAGE_EXP_OP(OpImageSampleProjExplicitLod)
|
||||
DEFINE_IMAGE_EXTRA_OP(OpImageSampleProjDrefImplicitLod)
|
||||
DEFINE_IMAGE_EXTRA_EXP_OP(OpImageSampleProjDrefExplicitLod)
|
||||
DEFINE_IMAGE_OP(OpImageFetch)
|
||||
DEFINE_IMAGE_EXTRA_OP(OpImageGather)
|
||||
DEFINE_IMAGE_EXTRA_OP(OpImageDrefGather)
|
||||
DEFINE_IMAGE_OP(OpImageRead)
|
||||
DEFINE_IMAGE_QUERY_BIN_OP(OpImageQuerySizeLod)
|
||||
DEFINE_IMAGE_QUERY_OP(OpImageQuerySize)
|
||||
DEFINE_IMAGE_QUERY_BIN_OP(OpImageQueryLod)
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
71
externals/sirit/src/instructions/logical.cpp
vendored
Executable file
71
externals/sirit/src/instructions/logical.cpp
vendored
Executable file
@@ -0,0 +1,71 @@
|
||||
/* 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 <memory>
|
||||
#include "common_types.h"
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.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_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)); \
|
||||
}
|
||||
|
||||
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)
|
||||
|
||||
} // namespace Sirit
|
||||
95
externals/sirit/src/instructions/memory.cpp
vendored
Executable file
95
externals/sirit/src/instructions/memory.cpp
vendored
Executable file
@@ -0,0 +1,95 @@
|
||||
/* 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 <cassert>
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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::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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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::OpCompositeConstruct(Id result_type, const std::vector<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));
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
24
externals/sirit/src/instructions/misc.cpp
vendored
Executable file
24
externals/sirit/src/instructions/misc.cpp
vendored
Executable file
@@ -0,0 +1,24 @@
|
||||
/* 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 "op.h"
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::OpUndef(Id result_type) {
|
||||
return AddCode(std::make_unique<Op>(spv::Op::OpUndef, bound++, result_type));
|
||||
}
|
||||
|
||||
Id Module::OpEmitVertex() {
|
||||
return AddCode(std::make_unique<Op>(spv::Op::OpEmitVertex));
|
||||
}
|
||||
|
||||
Id Module::OpEndPrimitive() {
|
||||
return AddCode(std::make_unique<Op>(spv::Op::OpEndPrimitive));
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
141
externals/sirit/src/instructions/type.cpp
vendored
Executable file
141
externals/sirit/src/instructions/type.cpp
vendored
Executable file
@@ -0,0 +1,141 @@
|
||||
/* 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 <cassert>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::TypeVoid() {
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpTypeVoid, bound));
|
||||
}
|
||||
|
||||
Id Module::TypeBool() {
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpTypeBool, bound));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
Id Module::TypeFloat(int width) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpTypeFloat, bound)};
|
||||
op->Add(width);
|
||||
return AddDeclaration(std::move(op));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
Id Module::TypeSampler() {
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpTypeSampler, bound));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
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::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::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));
|
||||
}
|
||||
|
||||
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::TypeEvent() {
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpTypeEvent, bound));
|
||||
}
|
||||
|
||||
Id Module::TypeDeviceEvent() {
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpTypeDeviceEvent, bound));
|
||||
}
|
||||
|
||||
Id Module::TypeReserveId() {
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpTypeReserveId, bound));
|
||||
}
|
||||
|
||||
Id Module::TypeQueue() {
|
||||
return AddDeclaration(std::make_unique<Op>(spv::Op::OpTypeQueue, bound));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
37
externals/sirit/src/literal_number.cpp
vendored
Executable file
37
externals/sirit/src/literal_number.cpp
vendored
Executable file
@@ -0,0 +1,37 @@
|
||||
/* 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 <cassert>
|
||||
#include "literal_number.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
LiteralNumber::LiteralNumber(u64 raw_, bool is_32_)
|
||||
: Operand{OperandType::Number}, raw{raw_}, is_32{is_32_} {}
|
||||
|
||||
LiteralNumber::~LiteralNumber() = default;
|
||||
|
||||
void LiteralNumber::Fetch(Stream& stream) const {
|
||||
if (is_32) {
|
||||
stream.Write(static_cast<u32>(raw));
|
||||
} else {
|
||||
stream.Write(raw);
|
||||
}
|
||||
}
|
||||
|
||||
std::size_t LiteralNumber::GetWordCount() const noexcept {
|
||||
return is_32 ? 1 : 2;
|
||||
}
|
||||
|
||||
bool LiteralNumber::operator==(const Operand& other) const noexcept {
|
||||
if (!EqualType(other)) {
|
||||
return false;
|
||||
}
|
||||
const auto& o{static_cast<const LiteralNumber&>(other)};
|
||||
return o.raw == raw && o.is_32 == is_32;
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
43
externals/sirit/src/literal_number.h
vendored
Executable file
43
externals/sirit/src/literal_number.h
vendored
Executable file
@@ -0,0 +1,43 @@
|
||||
/* 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
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
|
||||
#include "operand.h"
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
class LiteralNumber final : public Operand {
|
||||
public:
|
||||
explicit LiteralNumber(u64 raw, bool is_32);
|
||||
~LiteralNumber() override;
|
||||
|
||||
void Fetch(Stream& stream) const override;
|
||||
|
||||
std::size_t GetWordCount() const noexcept override;
|
||||
|
||||
bool operator==(const Operand& other) const noexcept override;
|
||||
|
||||
template <typename T>
|
||||
static std::unique_ptr<LiteralNumber> Create(T value) {
|
||||
static_assert(sizeof(T) == 4 || sizeof(T) == 8);
|
||||
|
||||
u64 raw{};
|
||||
std::memcpy(&raw, &value, sizeof(T));
|
||||
return std::make_unique<LiteralNumber>(raw, sizeof(T) == 4);
|
||||
}
|
||||
|
||||
private:
|
||||
u64 raw{};
|
||||
bool is_32{};
|
||||
};
|
||||
|
||||
} // namespace Sirit
|
||||
33
externals/sirit/src/literal_string.cpp
vendored
Executable file
33
externals/sirit/src/literal_string.cpp
vendored
Executable file
@@ -0,0 +1,33 @@
|
||||
/* 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 <string>
|
||||
#include "common_types.h"
|
||||
#include "literal_string.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
LiteralString::LiteralString(std::string string_)
|
||||
: Operand{OperandType::String}, string{std::move(string_)} {}
|
||||
|
||||
LiteralString::~LiteralString() = default;
|
||||
|
||||
void LiteralString::Fetch(Stream& stream) const {
|
||||
stream.Write(string);
|
||||
}
|
||||
|
||||
std::size_t LiteralString::GetWordCount() const noexcept {
|
||||
return string.size() / 4 + 1;
|
||||
}
|
||||
|
||||
bool LiteralString::operator==(const Operand& other) const noexcept {
|
||||
if (!EqualType(other)) {
|
||||
return false;
|
||||
}
|
||||
return static_cast<const LiteralString&>(other).string == string;
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
30
externals/sirit/src/literal_string.h
vendored
Executable file
30
externals/sirit/src/literal_string.h
vendored
Executable file
@@ -0,0 +1,30 @@
|
||||
/* 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
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "operand.h"
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
class LiteralString final : public Operand {
|
||||
public:
|
||||
LiteralString(std::string string);
|
||||
~LiteralString() override;
|
||||
|
||||
void Fetch(Stream& stream) const override;
|
||||
|
||||
std::size_t GetWordCount() const noexcept override;
|
||||
|
||||
bool operator==(const Operand& other) const noexcept override;
|
||||
|
||||
private:
|
||||
std::string string;
|
||||
};
|
||||
|
||||
} // namespace Sirit
|
||||
135
externals/sirit/src/op.cpp
vendored
Executable file
135
externals/sirit/src/op.cpp
vendored
Executable file
@@ -0,0 +1,135 @@
|
||||
/* 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 <algorithm>
|
||||
#include <cassert>
|
||||
#include <limits>
|
||||
|
||||
#include "common_types.h"
|
||||
#include "literal_number.h"
|
||||
#include "literal_string.h"
|
||||
#include "op.h"
|
||||
#include "operand.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Op::Op(spv::Op opcode_, std::optional<u32> id_, Id result_type_)
|
||||
: Operand{OperandType::Op}, opcode{opcode_}, result_type{result_type_}, id{id_} {}
|
||||
|
||||
Op::~Op() = default;
|
||||
|
||||
void Op::Fetch(Stream& stream) const {
|
||||
assert(id.has_value());
|
||||
stream.Write(id.value());
|
||||
}
|
||||
|
||||
std::size_t Op::GetWordCount() const noexcept {
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool Op::operator==(const Operand& other) const noexcept {
|
||||
if (!EqualType(other)) {
|
||||
return false;
|
||||
}
|
||||
const auto& op = static_cast<const Op&>(other);
|
||||
if (op.opcode == opcode && result_type == op.result_type &&
|
||||
operands.size() == op.operands.size()) {
|
||||
for (std::size_t i = 0; i < operands.size(); i++) {
|
||||
if (*operands[i] != *op.operands[i]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Op::Write(Stream& stream) const {
|
||||
stream.Write(static_cast<u16>(opcode), CalculateTotalWords());
|
||||
|
||||
if (result_type) {
|
||||
result_type->Fetch(stream);
|
||||
}
|
||||
if (id.has_value()) {
|
||||
stream.Write(id.value());
|
||||
}
|
||||
for (const auto* operand : operands) {
|
||||
operand->Fetch(stream);
|
||||
}
|
||||
}
|
||||
|
||||
void Op::Sink(std::unique_ptr<Operand> operand) {
|
||||
Add(static_cast<const Operand*>(operand.get()));
|
||||
operand_store.push_back(std::move(operand));
|
||||
}
|
||||
|
||||
void Op::Add(const Literal& literal) {
|
||||
Sink([&] {
|
||||
switch (literal.index()) {
|
||||
case 0:
|
||||
return LiteralNumber::Create(std::get<0>(literal));
|
||||
case 1:
|
||||
return LiteralNumber::Create(std::get<1>(literal));
|
||||
case 2:
|
||||
return LiteralNumber::Create(std::get<2>(literal));
|
||||
case 3:
|
||||
return LiteralNumber::Create(std::get<3>(literal));
|
||||
case 4:
|
||||
return LiteralNumber::Create(std::get<4>(literal));
|
||||
case 5:
|
||||
return LiteralNumber::Create(std::get<5>(literal));
|
||||
default:
|
||||
// Invalid literal type
|
||||
assert(0);
|
||||
abort();
|
||||
}
|
||||
}());
|
||||
}
|
||||
|
||||
void Op::Add(const std::vector<Literal>& literals) {
|
||||
for (const auto& literal : literals) {
|
||||
Add(literal);
|
||||
}
|
||||
}
|
||||
|
||||
void Op::Add(const Operand* operand) {
|
||||
assert(operand);
|
||||
operands.push_back(operand);
|
||||
}
|
||||
|
||||
void Op::Add(u32 integer) {
|
||||
Sink(LiteralNumber::Create(integer));
|
||||
}
|
||||
|
||||
void Op::Add(s32 integer) {
|
||||
Sink(LiteralNumber::Create(integer));
|
||||
}
|
||||
|
||||
void Op::Add(std::string string) {
|
||||
Sink(std::make_unique<LiteralString>(std::move(string)));
|
||||
}
|
||||
|
||||
void Op::Add(const std::vector<Id>& ids) {
|
||||
assert(std::all_of(ids.begin(), ids.end(), [](auto id_) { return id_; }));
|
||||
operands.insert(operands.end(), ids.begin(), ids.end());
|
||||
}
|
||||
|
||||
u16 Op::CalculateTotalWords() const noexcept {
|
||||
std::size_t count = 1;
|
||||
if (result_type) {
|
||||
++count;
|
||||
}
|
||||
if (id.has_value()) {
|
||||
++count;
|
||||
}
|
||||
for (const Operand* operand : operands) {
|
||||
count += operand->GetWordCount();
|
||||
}
|
||||
assert(count < std::numeric_limits<u16>::max());
|
||||
return static_cast<u16>(count);
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
63
externals/sirit/src/op.h
vendored
Executable file
63
externals/sirit/src/op.h
vendored
Executable file
@@ -0,0 +1,63 @@
|
||||
/* 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
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
#include "common_types.h"
|
||||
#include "operand.h"
|
||||
#include "sirit/sirit.h"
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
class Op final : public Operand {
|
||||
public:
|
||||
explicit Op(spv::Op opcode, std::optional<u32> id = {}, Id result_type = nullptr);
|
||||
~Op() override;
|
||||
|
||||
void Fetch(Stream& stream) const override;
|
||||
|
||||
std::size_t GetWordCount() const noexcept override;
|
||||
|
||||
bool operator==(const Operand& other) const noexcept override;
|
||||
|
||||
void Write(Stream& stream) const;
|
||||
|
||||
void Sink(std::unique_ptr<Operand> operand);
|
||||
|
||||
void Add(const Literal& literal);
|
||||
|
||||
void Add(const std::vector<Literal>& literals);
|
||||
|
||||
void Add(const Operand* operand);
|
||||
|
||||
void Add(u32 integer);
|
||||
|
||||
void Add(s32 integer);
|
||||
|
||||
void Add(std::string string);
|
||||
|
||||
void Add(const std::vector<Id>& ids);
|
||||
|
||||
private:
|
||||
u16 CalculateTotalWords() const noexcept;
|
||||
|
||||
spv::Op opcode;
|
||||
|
||||
Id result_type;
|
||||
|
||||
std::optional<u32> id;
|
||||
|
||||
std::vector<const Operand*> operands;
|
||||
|
||||
std::vector<std::unique_ptr<Operand>> operand_store;
|
||||
};
|
||||
|
||||
} // namespace Sirit
|
||||
16
externals/sirit/src/operand.cpp
vendored
Executable file
16
externals/sirit/src/operand.cpp
vendored
Executable file
@@ -0,0 +1,16 @@
|
||||
/* 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 <cassert>
|
||||
#include "operand.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Operand::Operand(OperandType operand_type_) : operand_type{operand_type_} {}
|
||||
|
||||
Operand::~Operand() = default;
|
||||
|
||||
} // namespace Sirit
|
||||
40
externals/sirit/src/operand.h
vendored
Executable file
40
externals/sirit/src/operand.h
vendored
Executable file
@@ -0,0 +1,40 @@
|
||||
/* 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
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
enum class OperandType { Invalid, Op, Number, String };
|
||||
|
||||
class Operand {
|
||||
public:
|
||||
explicit Operand(OperandType operand_type);
|
||||
virtual ~Operand();
|
||||
|
||||
virtual void Fetch(Stream& stream) const = 0;
|
||||
|
||||
virtual std::size_t GetWordCount() const noexcept = 0;
|
||||
|
||||
virtual bool operator==(const Operand& other) const noexcept = 0;
|
||||
|
||||
bool operator!=(const Operand& other) const noexcept {
|
||||
return !operator==(other);
|
||||
}
|
||||
|
||||
bool EqualType(const Operand& other) const noexcept {
|
||||
return operand_type == other.operand_type;
|
||||
}
|
||||
|
||||
private:
|
||||
OperandType operand_type;
|
||||
};
|
||||
|
||||
} // namespace Sirit
|
||||
149
externals/sirit/src/sirit.cpp
vendored
Executable file
149
externals/sirit/src/sirit.cpp
vendored
Executable file
@@ -0,0 +1,149 @@
|
||||
/* 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 <algorithm>
|
||||
#include <cassert>
|
||||
#include "common_types.h"
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.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);
|
||||
}
|
||||
}
|
||||
|
||||
Module::Module(u32 version_) : version{version_} {}
|
||||
|
||||
Module::~Module() = default;
|
||||
|
||||
std::vector<u32> Module::Assemble() const {
|
||||
std::vector<u32> bytes;
|
||||
Stream stream{bytes};
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
for (const auto& extension_name : extensions) {
|
||||
Op op(spv::Op::OpExtension);
|
||||
op.Add(extension_name);
|
||||
op.Write(stream);
|
||||
}
|
||||
|
||||
if (glsl_std_450) {
|
||||
glsl_std_450->Write(stream);
|
||||
}
|
||||
|
||||
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) {
|
||||
extensions.insert(std::move(extension_name));
|
||||
}
|
||||
|
||||
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::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));
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
Id Module::AddLabel(Id label) {
|
||||
assert(label != nullptr);
|
||||
return code.emplace_back(label);
|
||||
}
|
||||
|
||||
Id Module::AddLocalVariable(Id variable) {
|
||||
assert(variable != nullptr);
|
||||
return code.emplace_back(variable);
|
||||
}
|
||||
|
||||
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::GetGLSLstd450() {
|
||||
if (!glsl_std_450) {
|
||||
glsl_std_450 = std::make_unique<Op>(spv::Op::OpExtInstImport, bound++);
|
||||
glsl_std_450->Add("GLSL.std.450");
|
||||
}
|
||||
return glsl_std_450.get();
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
51
externals/sirit/src/stream.cpp
vendored
Executable file
51
externals/sirit/src/stream.cpp
vendored
Executable file
@@ -0,0 +1,51 @@
|
||||
/* 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
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user