移植spirv-tools,适配vkgl测试套件的编译

Signed-off-by: wangshi <wangshi@kaihong.com>
This commit is contained in:
wangshi 2022-11-15 15:44:19 +08:00
parent b930e734ea
commit 73accd27fe
458 changed files with 97168 additions and 15538 deletions

2
.gitignore vendored
View File

@ -20,7 +20,7 @@ bazel-bin
bazel-genfiles
bazel-out
bazel-spirv-tools
bazel-SPIRV-Tools
bazel-spirv-tools
bazel-testlogs
# Vim

1665
BUILD.gn

File diff suppressed because it is too large Load Diff

4
cmake/Config.cmake.in Normal file
View File

@ -0,0 +1,4 @@
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
check_required_components("@PROJECT_NAME@")

View File

@ -1,28 +1,14 @@
# Downloads
Download the latest builds.
## Latest builds
Download the latest builds of the [master](https://github.com/KhronosGroup/SPIRV-Tools/tree/master) branch.
### Release build
## Release
| Windows | Linux | MacOS |
| --- | --- | --- |
| [MSVC 2017](https://storage.googleapis.com/spirv-tools/badges/build_link_windows_vs2017_release.html) | [clang](https://storage.googleapis.com/spirv-tools/badges/build_link_linux_clang_release.html) | [clang](https://storage.googleapis.com/spirv-tools/badges/build_link_macos_clang_release.html) |
| | [gcc](https://storage.googleapis.com/spirv-tools/badges/build_link_linux_gcc_release.html) | |
### Debug build
## Debug
| Windows | Linux | MacOS |
| --- | --- | --- |
| [MSVC 2017](https://storage.googleapis.com/spirv-tools/badges/build_link_windows_vs2017_debug.html) | [clang](https://storage.googleapis.com/spirv-tools/badges/build_link_linux_clang_debug.html) | [clang](https://storage.googleapis.com/spirv-tools/badges/build_link_macos_clang_debug.html) |
| | [gcc](https://storage.googleapis.com/spirv-tools/badges/build_link_linux_gcc_debug.html) | |
## Vulkan SDK
SPIRV-Tools is published as part of the [LunarG Vulkan SDK](https://www.lunarg.com/vulkan-sdk/).
The Vulkan SDK is updated approximately every six weeks.
## Android NDK
SPIRV-Tools host executables, and library sources are published as
part of the [Android NDK](https://developer.android.com/ndk/downloads).

View File

@ -309,7 +309,7 @@ typedef enum spv_ext_inst_type_t {
SPV_EXT_INST_TYPE_DEBUGINFO,
SPV_EXT_INST_TYPE_OPENCL_DEBUGINFO_100,
SPV_EXT_INST_TYPE_NONSEMANTIC_CLSPVREFLECTION,
SPV_EXT_INST_TYPE_NONSEMANTIC_SHADER_DEBUGINFO_100,
SPV_EXT_INST_TYPE_NONSEMANTIC_VULKAN_DEBUGINFO_100,
// Multiple distinct extended instruction set types could return this
// value, if they are prefixed with NonSemantic. and are otherwise
@ -482,7 +482,6 @@ SPIRV_TOOLS_EXPORT const char* spvSoftwareVersionDetailsString(void);
// SPV_ENV_VULKAN_1_1 -> SPIR-V 1.3
// SPV_ENV_VULKAN_1_1_SPIRV_1_4 -> SPIR-V 1.4
// SPV_ENV_VULKAN_1_2 -> SPIR-V 1.5
// SPV_ENV_VULKAN_1_3 -> SPIR-V 1.6
// Consult the description of API entry points for specific rules.
typedef enum {
SPV_ENV_UNIVERSAL_1_0, // SPIR-V 1.0 latest revision, no other restrictions.
@ -517,11 +516,6 @@ typedef enum {
SPV_ENV_UNIVERSAL_1_5, // SPIR-V 1.5 latest revision, no other restrictions.
SPV_ENV_VULKAN_1_2, // Vulkan 1.2 latest revision.
SPV_ENV_UNIVERSAL_1_6, // SPIR-V 1.6 latest revision, no other restrictions.
SPV_ENV_VULKAN_1_3, // Vulkan 1.3 latest revision.
SPV_ENV_MAX // Keep this as the last enum value.
} spv_target_env;
// SPIR-V Validator can be parameterized with the following Universal Limits.
@ -560,7 +554,7 @@ SPIRV_TOOLS_EXPORT bool spvParseVulkanEnv(uint32_t vulkan_ver,
// Creates a context object for most of the SPIRV-Tools API.
// Returns null if env is invalid.
//
// See specific API calls for how the target environment is interpreted
// See specific API calls for how the target environment is interpeted
// (particularly assembly and validation).
SPIRV_TOOLS_EXPORT spv_context spvContextCreate(spv_target_env env);
@ -612,7 +606,7 @@ SPIRV_TOOLS_EXPORT void spvValidatorOptionsSetRelaxLogicalPointer(
// set that option.
// 2) Pointers that are pass as parameters to function calls do not have to
// match the storage class of the formal parameter.
// 3) Pointers that are actual parameters on function calls do not have to point
// 3) Pointers that are actaul parameters on function calls do not have to point
// to the same type pointed as the formal parameter. The types just need to
// logically match.
// 4) GLSLstd450 Interpolate* instructions can have a load of an interpolant
@ -638,7 +632,7 @@ SPIRV_TOOLS_EXPORT void spvValidatorOptionsSetUniformBufferStandardLayout(
// Records whether the validator should use "scalar" block layout rules.
// Scalar layout rules are more permissive than relaxed block layout.
//
// See Vulkan extension VK_EXT_scalar_block_layout. The scalar alignment is
// See Vulkan extnesion VK_EXT_scalar_block_layout. The scalar alignment is
// defined as follows:
// - scalar alignment of a scalar is the scalar size
// - scalar alignment of a vector is the scalar alignment of its component

View File

@ -36,7 +36,7 @@ class Context {
public:
// Constructs a context targeting the given environment |env|.
//
// See specific API calls for how the target environment is interpreted
// See specific API calls for how the target environment is interpeted
// (particularly assembly and validation).
//
// The constructed instance will have an empty message consumer, which just
@ -139,7 +139,7 @@ class ValidatorOptions {
// set that option.
// 2) Pointers that are pass as parameters to function calls do not have to
// match the storage class of the formal parameter.
// 3) Pointers that are actual parameters on function calls do not have to
// 3) Pointers that are actaul parameters on function calls do not have to
// point to the same type pointed as the formal parameter. The types just
// need to logically match.
// 4) GLSLstd450 Interpolate* instructions can have a load of an interpolant

View File

@ -35,7 +35,7 @@ class Linter {
void SetMessageConsumer(MessageConsumer consumer);
// Returns a reference to the registered message consumer.
const MessageConsumer& Consumer() const;
const MessageConsumer& consumer() const;
bool Run(const uint32_t* binary, size_t binary_size);

View File

@ -29,7 +29,7 @@ namespace spvtools {
namespace opt {
class Pass;
struct DescriptorSetAndBinding;
} // namespace opt
}
// C++ interface for SPIR-V optimization functionalities. It wraps the context
// (including target environment and the corresponding SPIR-V grammar) and
@ -43,7 +43,7 @@ class Optimizer {
// consumed by the RegisterPass() method. Tokens are one-time objects that
// only support move; copying is not allowed.
struct PassToken {
struct Impl; // Opaque struct for holding internal data.
struct Impl; // Opaque struct for holding inernal data.
PassToken(std::unique_ptr<Impl>);
@ -227,17 +227,16 @@ Optimizer::PassToken CreateNullPass();
// Creates a strip-debug-info pass.
// A strip-debug-info pass removes all debug instructions (as documented in
// Section 3.42.2 of the SPIR-V spec) of the SPIR-V module to be optimized.
// Section 3.32.2 of the SPIR-V spec) of the SPIR-V module to be optimized.
Optimizer::PassToken CreateStripDebugInfoPass();
// [Deprecated] This will create a strip-nonsemantic-info pass. See below.
// Creates a strip-reflect-info pass.
// A strip-reflect-info pass removes all reflections instructions.
// For now, this is limited to removing decorations defined in
// SPV_GOOGLE_hlsl_functionality1. The coverage may expand in
// the future.
Optimizer::PassToken CreateStripReflectInfoPass();
// Creates a strip-nonsemantic-info pass.
// A strip-nonsemantic-info pass removes all reflections and explicitly
// non-semantic instructions.
Optimizer::PassToken CreateStripNonSemanticInfoPass();
// Creates an eliminate-dead-functions pass.
// An eliminate-dead-functions pass will remove all functions that are not in
// the call trees rooted at entry points and exported functions. These
@ -296,11 +295,11 @@ Optimizer::PassToken CreateFreezeSpecConstantValuePass();
// and can be changed in future. A spec constant is foldable if all of its
// value(s) can be determined from the module. E.g., an integer spec constant
// defined with OpSpecConstantOp instruction can be folded if its value won't
// change later. This pass will replace the original OpSpecConstantOp
// instruction with an OpConstant instruction. When folding composite spec
// constants, new instructions may be inserted to define the components of the
// composite constant first, then the original spec constants will be replaced
// by OpConstantComposite instructions.
// change later. This pass will replace the original OpSpecContantOp instruction
// with an OpConstant instruction. When folding composite spec constants,
// new instructions may be inserted to define the components of the composite
// constant first, then the original spec constants will be replaced by
// OpConstantComposite instructions.
//
// There are some operations not supported yet:
// OpSConvert, OpFConvert, OpQuantizeToF16 and
@ -326,7 +325,7 @@ Optimizer::PassToken CreateUnifyConstantPass();
// Creates a eliminate-dead-constant pass.
// A eliminate-dead-constant pass removes dead constants, including normal
// constants defined by OpConstant, OpConstantComposite, OpConstantTrue, or
// contants defined by OpConstant, OpConstantComposite, OpConstantTrue, or
// OpConstantFalse and spec constants defined by OpSpecConstant,
// OpSpecConstantComposite, OpSpecConstantTrue, OpSpecConstantFalse or
// OpSpecConstantOp.
@ -390,7 +389,7 @@ Optimizer::PassToken CreateInlineOpaquePass();
// Only modules with relaxed logical addressing (see opt/instruction.h) are
// currently processed.
//
// This pass is most effective if preceded by Inlining and
// This pass is most effective if preceeded by Inlining and
// LocalAccessChainConvert. This pass will reduce the work needed to be done
// by LocalSingleStoreElim and LocalMultiStoreElim.
//
@ -408,7 +407,7 @@ Optimizer::PassToken CreateLocalSingleBlockLoadStoreElimPass();
// Note that some branches and blocks may be left to avoid creating invalid
// control flow. Improving this is left to future work.
//
// This pass is most effective when preceded by passes which eliminate
// This pass is most effective when preceeded by passes which eliminate
// local loads and stores, effectively propagating constant values where
// possible.
Optimizer::PassToken CreateDeadBranchElimPass();
@ -425,7 +424,7 @@ Optimizer::PassToken CreateDeadBranchElimPass();
// are currently processed. Currently modules with any extensions enabled are
// not processed. This is left for future work.
//
// This pass is most effective if preceded by Inlining and
// This pass is most effective if preceeded by Inlining and
// LocalAccessChainConvert. LocalSingleStoreElim and LocalSingleBlockElim
// will reduce the work that this pass has to do.
Optimizer::PassToken CreateLocalMultiStoreElimPass();
@ -515,13 +514,7 @@ Optimizer::PassToken CreateDeadInsertElimPass();
// Conversion, which tends to cause cycles of dead code to be left after
// Store/Load elimination passes are completed. These cycles cannot be
// eliminated with standard dead code elimination.
//
// If |preserve_interface| is true, all non-io variables in the entry point
// interface are considered live and are not eliminated. This mode is needed
// by GPU-Assisted validation instrumentation, where a change in the interface
// is not allowed.
Optimizer::PassToken CreateAggressiveDCEPass();
Optimizer::PassToken CreateAggressiveDCEPass(bool preserve_interface);
// Creates a remove-unused-interface-variables pass.
// Removes variables referenced on the |OpEntryPoint| instruction that are not
@ -630,7 +623,7 @@ Optimizer::PassToken CreateRedundancyEliminationPass();
Optimizer::PassToken CreateScalarReplacementPass(uint32_t size_limit = 100);
// Create a private to local pass.
// This pass looks for variables declared in the private storage class that are
// This pass looks for variables delcared in the private storage class that are
// used in only one function. Those variables are moved to the function storage
// class in the function that they are used.
Optimizer::PassToken CreatePrivateToLocalPass();
@ -708,11 +701,8 @@ Optimizer::PassToken CreateVectorDCEPass();
// Create a pass to reduce the size of loads.
// This pass looks for loads of structures where only a few of its members are
// used. It replaces the loads feeding an OpExtract with an OpAccessChain and
// a load of the specific elements. The parameter is a threshold to determine
// whether we have to replace the load or not. If the ratio of the used
// components of the load is less than the threshold, we replace the load.
Optimizer::PassToken CreateReduceLoadSizePass(
double load_replacement_threshold = 0.9);
// a load of the specific elements.
Optimizer::PassToken CreateReduceLoadSizePass();
// Create a pass to combine chained access chains.
// This pass looks for access chains fed by other access chains and combines
@ -835,26 +825,6 @@ Optimizer::PassToken CreateFixStorageClassPass();
// inclusive.
Optimizer::PassToken CreateGraphicsRobustAccessPass();
// Create a pass to spread Volatile semantics to variables with SMIDNV,
// WarpIDNV, SubgroupSize, SubgroupLocalInvocationId, SubgroupEqMask,
// SubgroupGeMask, SubgroupGtMask, SubgroupLeMask, or SubgroupLtMask BuiltIn
// decorations or OpLoad for them when the shader model is the ray generation,
// closest hit, miss, intersection, or callable. This pass can be used for
// VUID-StandaloneSpirv-VulkanMemoryModel-04678 and
// VUID-StandaloneSpirv-VulkanMemoryModel-04679 (See "Standalone SPIR-V
// Validation" section of Vulkan spec "Appendix A: Vulkan Environment for
// SPIR-V"). When the SPIR-V version is 1.6 or above, the pass also spreads
// the Volatile semantics to a variable with HelperInvocation BuiltIn decoration
// in the fragement shader.
Optimizer::PassToken CreateSpreadVolatileSemanticsPass();
// Create a pass to replace a descriptor access using variable index.
// This pass replaces every access using a variable index to array variable
// |desc| that has a DescriptorSet and Binding decorations with a constant
// element of the array. In order to replace the access using a variable index
// with the constant element, it uses a switch statement.
Optimizer::PassToken CreateReplaceDescArrayAccessUsingVarIndexPass();
// Create descriptor scalar replacement pass.
// This pass replaces every array variable |desc| that has a DescriptorSet and
// Binding decorations with a new variable for each element of the array.
@ -886,13 +856,6 @@ Optimizer::PassToken CreateAmdExtToKhrPass();
// propagated into their final positions.
Optimizer::PassToken CreateInterpolateFixupPass();
// Removes unused components from composite input variables. Current
// implementation just removes trailing unused components from input arrays.
// The pass performs best after maximizing dead code removal. A subsequent dead
// code elimination pass would be beneficial in removing newly unused component
// types.
Optimizer::PassToken CreateEliminateDeadInputComponentsPass();
// Creates a convert-to-sampled-image pass to convert images and/or
// samplers with given pairs of descriptor set and binding to sampled image.
// If a pair of an image and a sampler have the same pair of descriptor set and
@ -903,20 +866,6 @@ Optimizer::PassToken CreateConvertToSampledImagePass(
const std::vector<opt::DescriptorSetAndBinding>&
descriptor_set_binding_pairs);
// Create an interface-variable-scalar-replacement pass that replaces array or
// matrix interface variables with a series of scalar or vector interface
// variables. For example, it replaces `float3 foo[2]` with `float3 foo0, foo1`.
Optimizer::PassToken CreateInterfaceVariableScalarReplacementPass();
// Creates a remove-dont-inline pass to remove the |DontInline| function control
// from every function in the module. This is useful if you want the inliner to
// inline these functions some reason.
Optimizer::PassToken CreateRemoveDontInlinePass();
// Create a fix-func-call-param pass to fix non memory argument for the function
// call, as spirv-validation requires function parameters to be an memory
// object, currently the pass would remove accesschain pointer argument passed
// to the function
Optimizer::PassToken CreateFixFuncCallArgumentsPass();
} // namespace spvtools
#endif // INCLUDE_SPIRV_TOOLS_OPTIMIZER_HPP_

View 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

View 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

View 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'" }
]
}
]
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

993
include/spirv/1.0/spirv.cs Normal file
View File

@ -0,0 +1,993 @@
// Copyright (c) 2014-2018 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"),
// to deal in the Materials without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Materials, and to permit persons to whom the
// Materials are furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Materials.
//
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
//
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
// IN THE MATERIALS.
// This header is automatically generated by the same tool that creates
// the Binary Section of the SPIR-V specification.
// Enumeration tokens for SPIR-V, in various styles:
// C, C++, C++11, JSON, Lua, Python, C#
//
// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL
// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL
// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL
// - Lua will use tables, e.g.: spv.SourceLanguage.GLSL
// - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL']
// - C# will use enum classes in the Specification class located in the "Spv" namespace, e.g.: Spv.Specification.SourceLanguage.GLSL
//
// Some tokens act like mask values, which can be OR'd together,
// while others are mutually exclusive. The mask-like ones have
// "Mask" in their name, and a parallel enum that has the shift
// amount (1 << x) for each corresponding enumerant.
namespace Spv
{
public static class Specification
{
public const uint MagicNumber = 0x07230203;
public const uint Version = 0x00010000;
public const uint Revision = 12;
public const uint OpCodeMask = 0xffff;
public const uint WordCountShift = 16;
public enum SourceLanguage
{
Unknown = 0,
ESSL = 1,
GLSL = 2,
OpenCL_C = 3,
OpenCL_CPP = 4,
HLSL = 5,
}
public enum ExecutionModel
{
Vertex = 0,
TessellationControl = 1,
TessellationEvaluation = 2,
Geometry = 3,
Fragment = 4,
GLCompute = 5,
Kernel = 6,
}
public enum AddressingModel
{
Logical = 0,
Physical32 = 1,
Physical64 = 2,
}
public enum MemoryModel
{
Simple = 0,
GLSL450 = 1,
OpenCL = 2,
}
public enum ExecutionMode
{
Invocations = 0,
SpacingEqual = 1,
SpacingFractionalEven = 2,
SpacingFractionalOdd = 3,
VertexOrderCw = 4,
VertexOrderCcw = 5,
PixelCenterInteger = 6,
OriginUpperLeft = 7,
OriginLowerLeft = 8,
EarlyFragmentTests = 9,
PointMode = 10,
Xfb = 11,
DepthReplacing = 12,
DepthGreater = 14,
DepthLess = 15,
DepthUnchanged = 16,
LocalSize = 17,
LocalSizeHint = 18,
InputPoints = 19,
InputLines = 20,
InputLinesAdjacency = 21,
Triangles = 22,
InputTrianglesAdjacency = 23,
Quads = 24,
Isolines = 25,
OutputVertices = 26,
OutputPoints = 27,
OutputLineStrip = 28,
OutputTriangleStrip = 29,
VecTypeHint = 30,
ContractionOff = 31,
PostDepthCoverage = 4446,
StencilRefReplacingEXT = 5027,
}
public enum StorageClass
{
UniformConstant = 0,
Input = 1,
Uniform = 2,
Output = 3,
Workgroup = 4,
CrossWorkgroup = 5,
Private = 6,
Function = 7,
Generic = 8,
PushConstant = 9,
AtomicCounter = 10,
Image = 11,
StorageBuffer = 12,
}
public enum Dim
{
Dim1D = 0,
Dim2D = 1,
Dim3D = 2,
Cube = 3,
Rect = 4,
Buffer = 5,
SubpassData = 6,
}
public enum SamplerAddressingMode
{
None = 0,
ClampToEdge = 1,
Clamp = 2,
Repeat = 3,
RepeatMirrored = 4,
}
public enum SamplerFilterMode
{
Nearest = 0,
Linear = 1,
}
public enum ImageFormat
{
Unknown = 0,
Rgba32f = 1,
Rgba16f = 2,
R32f = 3,
Rgba8 = 4,
Rgba8Snorm = 5,
Rg32f = 6,
Rg16f = 7,
R11fG11fB10f = 8,
R16f = 9,
Rgba16 = 10,
Rgb10A2 = 11,
Rg16 = 12,
Rg8 = 13,
R16 = 14,
R8 = 15,
Rgba16Snorm = 16,
Rg16Snorm = 17,
Rg8Snorm = 18,
R16Snorm = 19,
R8Snorm = 20,
Rgba32i = 21,
Rgba16i = 22,
Rgba8i = 23,
R32i = 24,
Rg32i = 25,
Rg16i = 26,
Rg8i = 27,
R16i = 28,
R8i = 29,
Rgba32ui = 30,
Rgba16ui = 31,
Rgba8ui = 32,
R32ui = 33,
Rgb10a2ui = 34,
Rg32ui = 35,
Rg16ui = 36,
Rg8ui = 37,
R16ui = 38,
R8ui = 39,
}
public enum ImageChannelOrder
{
R = 0,
A = 1,
RG = 2,
RA = 3,
RGB = 4,
RGBA = 5,
BGRA = 6,
ARGB = 7,
Intensity = 8,
Luminance = 9,
Rx = 10,
RGx = 11,
RGBx = 12,
Depth = 13,
DepthStencil = 14,
sRGB = 15,
sRGBx = 16,
sRGBA = 17,
sBGRA = 18,
ABGR = 19,
}
public enum ImageChannelDataType
{
SnormInt8 = 0,
SnormInt16 = 1,
UnormInt8 = 2,
UnormInt16 = 3,
UnormShort565 = 4,
UnormShort555 = 5,
UnormInt101010 = 6,
SignedInt8 = 7,
SignedInt16 = 8,
SignedInt32 = 9,
UnsignedInt8 = 10,
UnsignedInt16 = 11,
UnsignedInt32 = 12,
HalfFloat = 13,
Float = 14,
UnormInt24 = 15,
UnormInt101010_2 = 16,
}
public enum ImageOperandsShift
{
Bias = 0,
Lod = 1,
Grad = 2,
ConstOffset = 3,
Offset = 4,
ConstOffsets = 5,
Sample = 6,
MinLod = 7,
}
public enum ImageOperandsMask
{
MaskNone = 0,
Bias = 0x00000001,
Lod = 0x00000002,
Grad = 0x00000004,
ConstOffset = 0x00000008,
Offset = 0x00000010,
ConstOffsets = 0x00000020,
Sample = 0x00000040,
MinLod = 0x00000080,
}
public enum FPFastMathModeShift
{
NotNaN = 0,
NotInf = 1,
NSZ = 2,
AllowRecip = 3,
Fast = 4,
}
public enum FPFastMathModeMask
{
MaskNone = 0,
NotNaN = 0x00000001,
NotInf = 0x00000002,
NSZ = 0x00000004,
AllowRecip = 0x00000008,
Fast = 0x00000010,
}
public enum FPRoundingMode
{
RTE = 0,
RTZ = 1,
RTP = 2,
RTN = 3,
}
public enum LinkageType
{
Export = 0,
Import = 1,
}
public enum AccessQualifier
{
ReadOnly = 0,
WriteOnly = 1,
ReadWrite = 2,
}
public enum FunctionParameterAttribute
{
Zext = 0,
Sext = 1,
ByVal = 2,
Sret = 3,
NoAlias = 4,
NoCapture = 5,
NoWrite = 6,
NoReadWrite = 7,
}
public enum Decoration
{
RelaxedPrecision = 0,
SpecId = 1,
Block = 2,
BufferBlock = 3,
RowMajor = 4,
ColMajor = 5,
ArrayStride = 6,
MatrixStride = 7,
GLSLShared = 8,
GLSLPacked = 9,
CPacked = 10,
BuiltIn = 11,
NoPerspective = 13,
Flat = 14,
Patch = 15,
Centroid = 16,
Sample = 17,
Invariant = 18,
Restrict = 19,
Aliased = 20,
Volatile = 21,
Constant = 22,
Coherent = 23,
NonWritable = 24,
NonReadable = 25,
Uniform = 26,
SaturatedConversion = 28,
Stream = 29,
Location = 30,
Component = 31,
Index = 32,
Binding = 33,
DescriptorSet = 34,
Offset = 35,
XfbBuffer = 36,
XfbStride = 37,
FuncParamAttr = 38,
FPRoundingMode = 39,
FPFastMathMode = 40,
LinkageAttributes = 41,
NoContraction = 42,
InputAttachmentIndex = 43,
Alignment = 44,
ExplicitInterpAMD = 4999,
OverrideCoverageNV = 5248,
PassthroughNV = 5250,
ViewportRelativeNV = 5252,
SecondaryViewportRelativeNV = 5256,
HlslCounterBufferGOOGLE = 5634,
HlslSemanticGOOGLE = 5635,
}
public enum BuiltIn
{
Position = 0,
PointSize = 1,
ClipDistance = 3,
CullDistance = 4,
VertexId = 5,
InstanceId = 6,
PrimitiveId = 7,
InvocationId = 8,
Layer = 9,
ViewportIndex = 10,
TessLevelOuter = 11,
TessLevelInner = 12,
TessCoord = 13,
PatchVertices = 14,
FragCoord = 15,
PointCoord = 16,
FrontFacing = 17,
SampleId = 18,
SamplePosition = 19,
SampleMask = 20,
FragDepth = 22,
HelperInvocation = 23,
NumWorkgroups = 24,
WorkgroupSize = 25,
WorkgroupId = 26,
LocalInvocationId = 27,
GlobalInvocationId = 28,
LocalInvocationIndex = 29,
WorkDim = 30,
GlobalSize = 31,
EnqueuedWorkgroupSize = 32,
GlobalOffset = 33,
GlobalLinearId = 34,
SubgroupSize = 36,
SubgroupMaxSize = 37,
NumSubgroups = 38,
NumEnqueuedSubgroups = 39,
SubgroupId = 40,
SubgroupLocalInvocationId = 41,
VertexIndex = 42,
InstanceIndex = 43,
SubgroupEqMaskKHR = 4416,
SubgroupGeMaskKHR = 4417,
SubgroupGtMaskKHR = 4418,
SubgroupLeMaskKHR = 4419,
SubgroupLtMaskKHR = 4420,
BaseVertex = 4424,
BaseInstance = 4425,
DrawIndex = 4426,
DeviceIndex = 4438,
ViewIndex = 4440,
BaryCoordNoPerspAMD = 4992,
BaryCoordNoPerspCentroidAMD = 4993,
BaryCoordNoPerspSampleAMD = 4994,
BaryCoordSmoothAMD = 4995,
BaryCoordSmoothCentroidAMD = 4996,
BaryCoordSmoothSampleAMD = 4997,
BaryCoordPullModelAMD = 4998,
FragStencilRefEXT = 5014,
ViewportMaskNV = 5253,
SecondaryPositionNV = 5257,
SecondaryViewportMaskNV = 5258,
PositionPerViewNV = 5261,
ViewportMaskPerViewNV = 5262,
}
public enum SelectionControlShift
{
Flatten = 0,
DontFlatten = 1,
}
public enum SelectionControlMask
{
MaskNone = 0,
Flatten = 0x00000001,
DontFlatten = 0x00000002,
}
public enum LoopControlShift
{
Unroll = 0,
DontUnroll = 1,
}
public enum LoopControlMask
{
MaskNone = 0,
Unroll = 0x00000001,
DontUnroll = 0x00000002,
}
public enum FunctionControlShift
{
Inline = 0,
DontInline = 1,
Pure = 2,
Const = 3,
}
public enum FunctionControlMask
{
MaskNone = 0,
Inline = 0x00000001,
DontInline = 0x00000002,
Pure = 0x00000004,
Const = 0x00000008,
}
public enum MemorySemanticsShift
{
Acquire = 1,
Release = 2,
AcquireRelease = 3,
SequentiallyConsistent = 4,
UniformMemory = 6,
SubgroupMemory = 7,
WorkgroupMemory = 8,
CrossWorkgroupMemory = 9,
AtomicCounterMemory = 10,
ImageMemory = 11,
}
public enum MemorySemanticsMask
{
MaskNone = 0,
Acquire = 0x00000002,
Release = 0x00000004,
AcquireRelease = 0x00000008,
SequentiallyConsistent = 0x00000010,
UniformMemory = 0x00000040,
SubgroupMemory = 0x00000080,
WorkgroupMemory = 0x00000100,
CrossWorkgroupMemory = 0x00000200,
AtomicCounterMemory = 0x00000400,
ImageMemory = 0x00000800,
}
public enum MemoryAccessShift
{
Volatile = 0,
Aligned = 1,
Nontemporal = 2,
}
public enum MemoryAccessMask
{
MaskNone = 0,
Volatile = 0x00000001,
Aligned = 0x00000002,
Nontemporal = 0x00000004,
}
public enum Scope
{
CrossDevice = 0,
Device = 1,
Workgroup = 2,
Subgroup = 3,
Invocation = 4,
}
public enum GroupOperation
{
Reduce = 0,
InclusiveScan = 1,
ExclusiveScan = 2,
}
public enum KernelEnqueueFlags
{
NoWait = 0,
WaitKernel = 1,
WaitWorkGroup = 2,
}
public enum KernelProfilingInfoShift
{
CmdExecTime = 0,
}
public enum KernelProfilingInfoMask
{
MaskNone = 0,
CmdExecTime = 0x00000001,
}
public enum Capability
{
Matrix = 0,
Shader = 1,
Geometry = 2,
Tessellation = 3,
Addresses = 4,
Linkage = 5,
Kernel = 6,
Vector16 = 7,
Float16Buffer = 8,
Float16 = 9,
Float64 = 10,
Int64 = 11,
Int64Atomics = 12,
ImageBasic = 13,
ImageReadWrite = 14,
ImageMipmap = 15,
Pipes = 17,
Groups = 18,
DeviceEnqueue = 19,
LiteralSampler = 20,
AtomicStorage = 21,
Int16 = 22,
TessellationPointSize = 23,
GeometryPointSize = 24,
ImageGatherExtended = 25,
StorageImageMultisample = 27,
UniformBufferArrayDynamicIndexing = 28,
SampledImageArrayDynamicIndexing = 29,
StorageBufferArrayDynamicIndexing = 30,
StorageImageArrayDynamicIndexing = 31,
ClipDistance = 32,
CullDistance = 33,
ImageCubeArray = 34,
SampleRateShading = 35,
ImageRect = 36,
SampledRect = 37,
GenericPointer = 38,
Int8 = 39,
InputAttachment = 40,
SparseResidency = 41,
MinLod = 42,
Sampled1D = 43,
Image1D = 44,
SampledCubeArray = 45,
SampledBuffer = 46,
ImageBuffer = 47,
ImageMSArray = 48,
StorageImageExtendedFormats = 49,
ImageQuery = 50,
DerivativeControl = 51,
InterpolationFunction = 52,
TransformFeedback = 53,
GeometryStreams = 54,
StorageImageReadWithoutFormat = 55,
StorageImageWriteWithoutFormat = 56,
MultiViewport = 57,
SubgroupBallotKHR = 4423,
DrawParameters = 4427,
SubgroupVoteKHR = 4431,
StorageBuffer16BitAccess = 4433,
StorageUniformBufferBlock16 = 4433,
StorageUniform16 = 4434,
UniformAndStorageBuffer16BitAccess = 4434,
StoragePushConstant16 = 4435,
StorageInputOutput16 = 4436,
DeviceGroup = 4437,
MultiView = 4439,
VariablePointersStorageBuffer = 4441,
VariablePointers = 4442,
AtomicStorageOps = 4445,
SampleMaskPostDepthCoverage = 4447,
ImageGatherBiasLodAMD = 5009,
FragmentMaskAMD = 5010,
StencilExportEXT = 5013,
ImageReadWriteLodAMD = 5015,
SampleMaskOverrideCoverageNV = 5249,
GeometryShaderPassthroughNV = 5251,
ShaderViewportIndexLayerEXT = 5254,
ShaderViewportIndexLayerNV = 5254,
ShaderViewportMaskNV = 5255,
ShaderStereoViewNV = 5259,
PerViewAttributesNV = 5260,
SubgroupShuffleINTEL = 5568,
SubgroupBufferBlockIOINTEL = 5569,
SubgroupImageBlockIOINTEL = 5570,
}
public enum Op
{
OpNop = 0,
OpUndef = 1,
OpSourceContinued = 2,
OpSource = 3,
OpSourceExtension = 4,
OpName = 5,
OpMemberName = 6,
OpString = 7,
OpLine = 8,
OpExtension = 10,
OpExtInstImport = 11,
OpExtInst = 12,
OpMemoryModel = 14,
OpEntryPoint = 15,
OpExecutionMode = 16,
OpCapability = 17,
OpTypeVoid = 19,
OpTypeBool = 20,
OpTypeInt = 21,
OpTypeFloat = 22,
OpTypeVector = 23,
OpTypeMatrix = 24,
OpTypeImage = 25,
OpTypeSampler = 26,
OpTypeSampledImage = 27,
OpTypeArray = 28,
OpTypeRuntimeArray = 29,
OpTypeStruct = 30,
OpTypeOpaque = 31,
OpTypePointer = 32,
OpTypeFunction = 33,
OpTypeEvent = 34,
OpTypeDeviceEvent = 35,
OpTypeReserveId = 36,
OpTypeQueue = 37,
OpTypePipe = 38,
OpTypeForwardPointer = 39,
OpConstantTrue = 41,
OpConstantFalse = 42,
OpConstant = 43,
OpConstantComposite = 44,
OpConstantSampler = 45,
OpConstantNull = 46,
OpSpecConstantTrue = 48,
OpSpecConstantFalse = 49,
OpSpecConstant = 50,
OpSpecConstantComposite = 51,
OpSpecConstantOp = 52,
OpFunction = 54,
OpFunctionParameter = 55,
OpFunctionEnd = 56,
OpFunctionCall = 57,
OpVariable = 59,
OpImageTexelPointer = 60,
OpLoad = 61,
OpStore = 62,
OpCopyMemory = 63,
OpCopyMemorySized = 64,
OpAccessChain = 65,
OpInBoundsAccessChain = 66,
OpPtrAccessChain = 67,
OpArrayLength = 68,
OpGenericPtrMemSemantics = 69,
OpInBoundsPtrAccessChain = 70,
OpDecorate = 71,
OpMemberDecorate = 72,
OpDecorationGroup = 73,
OpGroupDecorate = 74,
OpGroupMemberDecorate = 75,
OpVectorExtractDynamic = 77,
OpVectorInsertDynamic = 78,
OpVectorShuffle = 79,
OpCompositeConstruct = 80,
OpCompositeExtract = 81,
OpCompositeInsert = 82,
OpCopyObject = 83,
OpTranspose = 84,
OpSampledImage = 86,
OpImageSampleImplicitLod = 87,
OpImageSampleExplicitLod = 88,
OpImageSampleDrefImplicitLod = 89,
OpImageSampleDrefExplicitLod = 90,
OpImageSampleProjImplicitLod = 91,
OpImageSampleProjExplicitLod = 92,
OpImageSampleProjDrefImplicitLod = 93,
OpImageSampleProjDrefExplicitLod = 94,
OpImageFetch = 95,
OpImageGather = 96,
OpImageDrefGather = 97,
OpImageRead = 98,
OpImageWrite = 99,
OpImage = 100,
OpImageQueryFormat = 101,
OpImageQueryOrder = 102,
OpImageQuerySizeLod = 103,
OpImageQuerySize = 104,
OpImageQueryLod = 105,
OpImageQueryLevels = 106,
OpImageQuerySamples = 107,
OpConvertFToU = 109,
OpConvertFToS = 110,
OpConvertSToF = 111,
OpConvertUToF = 112,
OpUConvert = 113,
OpSConvert = 114,
OpFConvert = 115,
OpQuantizeToF16 = 116,
OpConvertPtrToU = 117,
OpSatConvertSToU = 118,
OpSatConvertUToS = 119,
OpConvertUToPtr = 120,
OpPtrCastToGeneric = 121,
OpGenericCastToPtr = 122,
OpGenericCastToPtrExplicit = 123,
OpBitcast = 124,
OpSNegate = 126,
OpFNegate = 127,
OpIAdd = 128,
OpFAdd = 129,
OpISub = 130,
OpFSub = 131,
OpIMul = 132,
OpFMul = 133,
OpUDiv = 134,
OpSDiv = 135,
OpFDiv = 136,
OpUMod = 137,
OpSRem = 138,
OpSMod = 139,
OpFRem = 140,
OpFMod = 141,
OpVectorTimesScalar = 142,
OpMatrixTimesScalar = 143,
OpVectorTimesMatrix = 144,
OpMatrixTimesVector = 145,
OpMatrixTimesMatrix = 146,
OpOuterProduct = 147,
OpDot = 148,
OpIAddCarry = 149,
OpISubBorrow = 150,
OpUMulExtended = 151,
OpSMulExtended = 152,
OpAny = 154,
OpAll = 155,
OpIsNan = 156,
OpIsInf = 157,
OpIsFinite = 158,
OpIsNormal = 159,
OpSignBitSet = 160,
OpLessOrGreater = 161,
OpOrdered = 162,
OpUnordered = 163,
OpLogicalEqual = 164,
OpLogicalNotEqual = 165,
OpLogicalOr = 166,
OpLogicalAnd = 167,
OpLogicalNot = 168,
OpSelect = 169,
OpIEqual = 170,
OpINotEqual = 171,
OpUGreaterThan = 172,
OpSGreaterThan = 173,
OpUGreaterThanEqual = 174,
OpSGreaterThanEqual = 175,
OpULessThan = 176,
OpSLessThan = 177,
OpULessThanEqual = 178,
OpSLessThanEqual = 179,
OpFOrdEqual = 180,
OpFUnordEqual = 181,
OpFOrdNotEqual = 182,
OpFUnordNotEqual = 183,
OpFOrdLessThan = 184,
OpFUnordLessThan = 185,
OpFOrdGreaterThan = 186,
OpFUnordGreaterThan = 187,
OpFOrdLessThanEqual = 188,
OpFUnordLessThanEqual = 189,
OpFOrdGreaterThanEqual = 190,
OpFUnordGreaterThanEqual = 191,
OpShiftRightLogical = 194,
OpShiftRightArithmetic = 195,
OpShiftLeftLogical = 196,
OpBitwiseOr = 197,
OpBitwiseXor = 198,
OpBitwiseAnd = 199,
OpNot = 200,
OpBitFieldInsert = 201,
OpBitFieldSExtract = 202,
OpBitFieldUExtract = 203,
OpBitReverse = 204,
OpBitCount = 205,
OpDPdx = 207,
OpDPdy = 208,
OpFwidth = 209,
OpDPdxFine = 210,
OpDPdyFine = 211,
OpFwidthFine = 212,
OpDPdxCoarse = 213,
OpDPdyCoarse = 214,
OpFwidthCoarse = 215,
OpEmitVertex = 218,
OpEndPrimitive = 219,
OpEmitStreamVertex = 220,
OpEndStreamPrimitive = 221,
OpControlBarrier = 224,
OpMemoryBarrier = 225,
OpAtomicLoad = 227,
OpAtomicStore = 228,
OpAtomicExchange = 229,
OpAtomicCompareExchange = 230,
OpAtomicCompareExchangeWeak = 231,
OpAtomicIIncrement = 232,
OpAtomicIDecrement = 233,
OpAtomicIAdd = 234,
OpAtomicISub = 235,
OpAtomicSMin = 236,
OpAtomicUMin = 237,
OpAtomicSMax = 238,
OpAtomicUMax = 239,
OpAtomicAnd = 240,
OpAtomicOr = 241,
OpAtomicXor = 242,
OpPhi = 245,
OpLoopMerge = 246,
OpSelectionMerge = 247,
OpLabel = 248,
OpBranch = 249,
OpBranchConditional = 250,
OpSwitch = 251,
OpKill = 252,
OpReturn = 253,
OpReturnValue = 254,
OpUnreachable = 255,
OpLifetimeStart = 256,
OpLifetimeStop = 257,
OpGroupAsyncCopy = 259,
OpGroupWaitEvents = 260,
OpGroupAll = 261,
OpGroupAny = 262,
OpGroupBroadcast = 263,
OpGroupIAdd = 264,
OpGroupFAdd = 265,
OpGroupFMin = 266,
OpGroupUMin = 267,
OpGroupSMin = 268,
OpGroupFMax = 269,
OpGroupUMax = 270,
OpGroupSMax = 271,
OpReadPipe = 274,
OpWritePipe = 275,
OpReservedReadPipe = 276,
OpReservedWritePipe = 277,
OpReserveReadPipePackets = 278,
OpReserveWritePipePackets = 279,
OpCommitReadPipe = 280,
OpCommitWritePipe = 281,
OpIsValidReserveId = 282,
OpGetNumPipePackets = 283,
OpGetMaxPipePackets = 284,
OpGroupReserveReadPipePackets = 285,
OpGroupReserveWritePipePackets = 286,
OpGroupCommitReadPipe = 287,
OpGroupCommitWritePipe = 288,
OpEnqueueMarker = 291,
OpEnqueueKernel = 292,
OpGetKernelNDrangeSubGroupCount = 293,
OpGetKernelNDrangeMaxSubGroupSize = 294,
OpGetKernelWorkGroupSize = 295,
OpGetKernelPreferredWorkGroupSizeMultiple = 296,
OpRetainEvent = 297,
OpReleaseEvent = 298,
OpCreateUserEvent = 299,
OpIsValidEvent = 300,
OpSetUserEventStatus = 301,
OpCaptureEventProfilingInfo = 302,
OpGetDefaultQueue = 303,
OpBuildNDRange = 304,
OpImageSparseSampleImplicitLod = 305,
OpImageSparseSampleExplicitLod = 306,
OpImageSparseSampleDrefImplicitLod = 307,
OpImageSparseSampleDrefExplicitLod = 308,
OpImageSparseSampleProjImplicitLod = 309,
OpImageSparseSampleProjExplicitLod = 310,
OpImageSparseSampleProjDrefImplicitLod = 311,
OpImageSparseSampleProjDrefExplicitLod = 312,
OpImageSparseFetch = 313,
OpImageSparseGather = 314,
OpImageSparseDrefGather = 315,
OpImageSparseTexelsResident = 316,
OpNoLine = 317,
OpAtomicFlagTestAndSet = 318,
OpAtomicFlagClear = 319,
OpImageSparseRead = 320,
OpDecorateId = 332,
OpSubgroupBallotKHR = 4421,
OpSubgroupFirstInvocationKHR = 4422,
OpSubgroupAllKHR = 4428,
OpSubgroupAnyKHR = 4429,
OpSubgroupAllEqualKHR = 4430,
OpSubgroupReadInvocationKHR = 4432,
OpGroupIAddNonUniformAMD = 5000,
OpGroupFAddNonUniformAMD = 5001,
OpGroupFMinNonUniformAMD = 5002,
OpGroupUMinNonUniformAMD = 5003,
OpGroupSMinNonUniformAMD = 5004,
OpGroupFMaxNonUniformAMD = 5005,
OpGroupUMaxNonUniformAMD = 5006,
OpGroupSMaxNonUniformAMD = 5007,
OpFragmentMaskFetchAMD = 5011,
OpFragmentFetchAMD = 5012,
OpSubgroupShuffleINTEL = 5571,
OpSubgroupShuffleDownINTEL = 5572,
OpSubgroupShuffleUpINTEL = 5573,
OpSubgroupShuffleXorINTEL = 5574,
OpSubgroupBlockReadINTEL = 5575,
OpSubgroupBlockWriteINTEL = 5576,
OpSubgroupImageBlockReadINTEL = 5577,
OpSubgroupImageBlockWriteINTEL = 5578,
OpDecorateStringGOOGLE = 5632,
OpMemberDecorateStringGOOGLE = 5633,
}
}
}

993
include/spirv/1.0/spirv.h Normal file
View 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
include/spirv/1.0/spirv.hpp Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1020
include/spirv/1.0/spirv.json Normal file

File diff suppressed because it is too large Load Diff

949
include/spirv/1.0/spirv.lua Normal file
View 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
include/spirv/1.0/spirv.py Normal file
View 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,
},
}

View 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

View 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

View 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'" }
]
}
]
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1015
include/spirv/1.1/spirv.cs Normal file

File diff suppressed because it is too large Load Diff

1015
include/spirv/1.1/spirv.h Normal file

File diff suppressed because it is too large Load Diff

1024
include/spirv/1.1/spirv.hpp Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1040
include/spirv/1.1/spirv.json Normal file

File diff suppressed because it is too large Load Diff

971
include/spirv/1.1/spirv.lua Normal file
View 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
include/spirv/1.1/spirv.py Normal file
View 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,
},
}

View 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

View 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

View 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'" }
]
}
]
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1021
include/spirv/1.2/spirv.cs Normal file

File diff suppressed because it is too large Load Diff

1021
include/spirv/1.2/spirv.h Normal file

File diff suppressed because it is too large Load Diff

1030
include/spirv/1.2/spirv.hpp Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1046
include/spirv/1.2/spirv.json Normal file

File diff suppressed because it is too large Load Diff

977
include/spirv/1.2/spirv.lua Normal file
View 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
include/spirv/1.2/spirv.py Normal file
View 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,
},
}

254
include/spirv/spir-v.xml Normal file
View File

@ -0,0 +1,254 @@
<?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, opcode and enumerant registry.
The canonical version of the registry, together with related schema and
documentation, can be found in the Khronos Registry at
include/spirv/spir-v.xml in the master branch at
https://github.com/KhronosGroup/SPIRV-Headers
-->
<!-- 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 Victor Lomuller, victor@codeplay.com"/>
<id value="4" vendor="NVIDIA" comment="Contact Kerch Holt, kholt@nvidia.com"/>
<id value="5" vendor="ARM" comment="Contact Alexander Galazin, alexander.galazin@arm.com"/>
<id value="6" vendor="Khronos" tool="LLVM/SPIR-V Translator" comment="Contact Yaxun (Sam) Liu, yaxun.liu@amd.com"/>
<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="Tellusim" tool="Clay Shader Compiler" comment="Contact info@tellusim.com"/>
<id value="20" vendor="W3C WebGPU Group" tool="WHLSL Shader Translator" comment="https://github.com/gpuweb/WHLSL"/>
<id value="21" vendor="Google" tool="Clspv" comment="Contact David Neto, dneto@google.com"/>
<id value="22" vendor="Google" tool="MLIR SPIR-V Serializer" comment="Contact Lei Zhang, antiagainst@google.com"/>
<id value="23" vendor="Google" tool="Tint Compiler" comment="Contact David Neto, dneto@google.com"/>
<id value="24" vendor="Google" tool="ANGLE Shader Compiler" comment="Contact Shahbaz Youssefi, syoussefi@google.com"/>
<id value="25" vendor="Netease Games" tool="Messiah Shader Compiler" comment="Contact Yuwen Wu, atyuwen@gmail.com"/>
<id value="26" vendor="Xenia" tool="Xenia Emulator Microcode Translator" comment="Contact Vitaliy Kuzmin, triang3l@yandex.ru, https://github.com/xenia-project/xenia"/>
<id value="27" vendor="Embark Studios" tool="Rust GPU Compiler Backend" comment="https://github.com/embarkstudios/rust-gpu"/>
<id value="28" vendor="gfx-rs community" tool="Naga" comment="https://github.com/gfx-rs/naga"/>
<id value="29" vendor="Mikkosoft Productions" tool="MSP Shader Compiler" comment="Contact Mikko Rasa, tdb@tdb.fi"/>
<id value="30" vendor="SpvGenTwo community" tool="SpvGenTwo SPIR-V IR Tools" comment="https://github.com/rAzoR8/SpvGenTwo"/>
<unused start="31" end="0xFFFF" comment="Tool ID range reservable for future use by vendors"/>
</ids>
<!-- SECTION: SPIR-V Opcodes and Enumerants -->
<!-- Vendors reserve new ranges of:
- opcode enumerants in the "opcode" list below, and
- non-opcode enumerants in the non-opcodes "enumerant" list below.
Both are reserved by contiguous blocks of 64, preceding the given
"Future use" blocks.
SPIR-V background:
- SPIR-V currently has well over 30 enums, including the opcode enum
- each enum has its own name space, allowing reuse of enumerants
- SPIR-V restricts opcode enumerants to 16 bits
- all other enums use 32-bit enumerants
Reservation rules:
- opcode reservations ("opcode") are only valid for opcodes
- non-opcode reservations ("enumerant") are not valid for opcodes
- reservations in the enumerant list are valid for all non-opcode enums
- it is simpler to use each non-opcode enumerant for only one purpose
but this is left to the discretion of the vendor
- all enumerants in a range should be used before allocating a new range
(several extensions can use enumerants from the same range)
Each vendor determines the use of enumerants in the ranges they
reserve. Vendors are not required to disclose those uses. If the use
of an enumerant is included in an extension that is adopted by a Khronos
extension or specification, then that enumerant's use may be permanently
fixed as if originally reserved in a Khronos range.
-->
<!-- Begin reservations of opcode enumerants -->
<ids type="opcode" start="0" end="4095" vendor="Khronos" comment="Reserved opcodes, not available to vendors - see the SPIR-V Specification"/>
<ids type="opcode" start="4096" end="4159" vendor="Mesa" comment="Contact TBD"/>
<ids type="opcode" start="4160" end="4415" vendor="ARM"/>
<ids type="opcode" start="4416" end="4479" vendor="Khronos" comment="SPV_ARB_shader_ballot - contact Neil Henning, neil.henning@amd.com"/>
<ids type="opcode" start="4480" end="4991" vendor="Qualcomm" comment="Contact weifengz@qti.qualcomm.com"/>
<ids type="opcode" start="4992" end="5247" vendor="AMD"/>
<ids type="opcode" start="5248" end="5503" vendor="NVIDIA"/>
<ids type="opcode" start="5504" end="5567" vendor="Imagination"/>
<ids type="opcode" start="5568" end="5631" vendor="Intel" comment="Contact ben.ashbaugh@intel.com"/>
<ids type="opcode" start="5632" end="5695" vendor="Google" comment="Contact dneto@google.com"/>
<ids type="opcode" start="5696" end="5823" vendor="Intel" comment="Contact ben.ashbaugh@intel.com"/>
<ids type="opcode" start="5824" end="5951" vendor="Intel" comment="Contact michael.kinsner@intel.com"/>
<ids type="opcode" start="5952" end="6015" vendor="Codeplay" comment="Contact victor@codeplay.com"/>
<ids type="opcode" start="6016" end="6079" vendor="Khronos" comment="Contact @tobski"/>
<ids type="opcode" start="6080" end="6143" vendor="Intel" comment="Contact mariusz.merecki@intel.com"/>
<ids type="opcode" start="6144" end="6271" vendor="Intel" comment="Contact michael.kinsner@intel.com"/>
<ids type="opcode" start="6272" end="6399" vendor="Huawei" comment="Contact wanghuilong2@xunweitech.com"/>
<!-- Opcode enumerants to reserve for future use. To get a block, allocate
multiples of 64 starting at the lowest available point in this
block and add a corresponding <ids> tag immediately above. Make
sure to fill in the vendor attribute, and preferably add a contact
person/address in a comment attribute. -->
<!-- Example new block: <ids type="opcode" start="XXXX" end="XXXX+64n-1" vendor="Add vendor" comment="Contact TBD"/> -->
<ids type="opcode" start="6400" end="65535" comment="Opcode range reservable for future use by vendors"/>
<!-- End reservations of opcodes -->
<!-- Begin reservations of non-opcode enumerants -->
<ids type="enumerant" start="0" end="4095" vendor="Khronos" comment="Reserved enumerants, not available to vendors - see the SPIR-V Specification"/>
<ids type="enumerant" start="4096" end="4159" vendor="Mesa" comment="Contact TBD"/>
<ids type="enumerant" start="4160" end="4415" vendor="ARM"/>
<ids type="enumerant" start="4416" end="4479" vendor="Khronos" comment="SPV_ARB_shader_ballot - contact Neil Henning, neil.henning@amd.com"/>
<ids type="enumerant" start="4480" end="4991" vendor="Qualcomm" comment="Contact weifengz@qti.qualcomm.com"/>
<ids type="enumerant" start="4992" end="5247" vendor="AMD"/>
<ids type="enumerant" start="5248" end="5503" vendor="NVIDIA"/>
<ids type="enumerant" start="5504" end="5567" vendor="Imagination"/>
<ids type="enumerant" start="5568" end="5631" vendor="Intel" comment="Contact ben.ashbaugh@intel.com"/>
<ids type="enumerant" start="5632" end="5695" vendor="Google" comment="Contact dneto@google.com"/>
<ids type="enumerant" start="5696" end="5823" vendor="Intel" comment="Contact ben.ashbaugh@intel.com"/>
<ids type="enumerant" start="5824" end="5951" vendor="Intel" comment="Contact michael.kinsner@intel.com"/>
<ids type="enumerant" start="5952" end="6015" vendor="Codeplay" comment="Contact victor@codeplay.com"/>
<ids type="enumerant" start="6016" end="6079" vendor="Khronos" comment="Contact @tobski"/>
<ids type="enumerant" start="6080" end="6143" vendor="Intel" comment="Contact mariusz.merecki@intel.com"/>
<ids type="enumerant" start="6144" end="6271" vendor="Intel" comment="Contact michael.kinsner@intel.com"/>
<ids type="enumerant" start="6272" end="6399" vendor="Huawei" comment="Contact wanghuilong2@xunweitech.com"/>
<!-- Enumerants to reserve for future use. To get a block, allocate
multiples of 64 starting at the lowest available point in this
block and add a corresponding <ids> tag immediately above. Make
sure to fill in the vendor attribute, and preferably add a contact
person/address in a comment attribute. -->
<!-- Example new block: <ids type="enumerant" start="XXXX" end="XXXX+64n-1" vendor="Add vendor" comment="Contact TBD"/> -->
<ids type="enumerant" start="6400" end="4294967295" comment="Enumerant range reservable for future use by vendors"/>
<!-- End reservations of enumerants -->
<!-- SECTION: SPIR-V Loop Control Bit Reservations -->
<!-- Reserve ranges of bits in the loop control bitfield.
Each vendor determines the use of values in their own ranges.
Vendors are not required to disclose those uses. If the use of a
value is included in an extension that is adopted by a Khronos
extension or specification, then that value's use may be permanently
fixed as if originally reserved in a Khronos range.
The SPIR Working Group strongly recommends:
- Each value is used for only one purpose.
- All values in a range should be used before allocating a new range.
-->
<!-- Reserved loop control bits -->
<ids type="LoopControl" start="0" end="15" vendor="Khronos" comment="Reserved LoopControl bits, not available to vendors - see the SPIR-V Specification"/>
<ids type="LoopControl" start="16" end="24" vendor="Intel" comment="Contact michael.kinsner@intel.com"/>
<ids type="LoopControl" start="25" end="30" comment="Unreserved bits reservable for use by vendors"/>
<ids type="LoopControl" start="31" end="31" vendor="Khronos" comment="Reserved LoopControl bit, not available to vendors"/>
<!-- SECTION: SPIR-V Function Control Bit Reservations -->
<!-- Reserve ranges of bits in the function control bitfield.
Each vendor determines the use of values in their own ranges.
Vendors are not required to disclose those uses. If the use of a
value is included in an extension that is adopted by a Khronos
extension or specification, then that value's use may be permanently
fixed as if originally reserved in a Khronos range.
The SPIR Working Group strongly recommends:
- Each value is used for only one purpose.
- All values in a range should be used before allocating a new range.
-->
<!-- Reserved function control bits -->
<ids type="FunctionControl" start="0" end="15" vendor="Khronos" comment="Reserved FunctionControl bits, not available to vendors - see the SPIR-V Specification"/>
<ids type="FunctionControl" start="16" end="16" vendor="Intel" comment="Contact ben.ashbaugh@intel.com"/>
<ids type="FunctionControl" start="17" end="30" comment="Unreserved bits reservable for use by vendors"/>
<ids type="FunctionControl" start="31" end="31" vendor="Khronos" comment="Reserved FunctionControl bit, not available to vendors"/>
<!-- SECTION: SPIR-V FP Fast Math Mode Bit Reservations -->
<!-- Reserve ranges of bits in the "FP Fast Math Mode" bitfield.
Each vendor determines the use of values in their own ranges.
Vendors are not required to disclose those uses. If the use of a
value is included in an extension that is adopted by a Khronos
extension or specification, then that value's use may be permanently
fixed as if originally reserved in a Khronos range.
The SPIR Working Group strongly recommends:
- Each value is used for only one purpose.
- All values in a range should be used before allocating a new range.
-->
<!-- Reserved FP fast math mode bits -->
<ids type="FPFastMathMode" start="0" end="15" vendor="Khronos" comment="Reserved FPFastMathMode bits, not available to vendors - see the SPIR-V Specification"/>
<ids type="FPFastMathMode" start="16" end="17" vendor="Intel" comment="Contact michael.kinsner@intel.com"/>
<ids type="FPFastMathMode" start="18" end="31" comment="Unreserved bits reservable for use by vendors"/>
<!-- SECTION: SPIR-V Memory Operand Bit Reservations -->
<!-- Reserve ranges of bits in the memory operands bitfield.
Each vendor determines the use of values in their own ranges.
Vendors are not required to disclose those uses. If the use of a
value is included in an extension that is adopted by a Khronos
extension or specification, then that value's use may be permanently
fixed as if originally reserved in a Khronos range.
The SPIR Working Group strongly recommends:
- Each value is used for only one purpose.
- All values in a range should be used before allocating a new range.
-->
<!-- Reserved memory operand bits -->
<ids type="MemoryOperand" start="0" end="15" vendor="Khronos" comment="Reserved MemoryOperand bits, not available to vendors - see the SPIR-V Specification"/>
<ids type="MemoryOperand" start="16" end="17" vendor="Intel" comment="Contact michael.kinsner@intel.com"/>
<ids type="MemoryOperand" start="18" end="30" comment="Unreserved bits reservable for use by vendors"/>
<ids type="MemoryOperand" start="31" end="31" vendor="Khronos" comment="Reserved MemoryOperand bit, not available to vendors"/>
</registry>

View File

@ -0,0 +1,52 @@
// Copyright (c) 2020 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and/or associated documentation files (the
// "Materials"), to deal in the Materials without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Materials, and to
// permit persons to whom the Materials are furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Materials.
//
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
// KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
// SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
// https://www.khronos.org/registry/
//
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
//
#ifndef SPIRV_UNIFIED1_AMD_gcn_shader_H_
#define SPIRV_UNIFIED1_AMD_gcn_shader_H_
#ifdef __cplusplus
extern "C" {
#endif
enum {
AMD_gcn_shaderRevision = 2,
AMD_gcn_shaderRevision_BitWidthPadding = 0x7fffffff
};
enum AMD_gcn_shaderInstructions {
AMD_gcn_shaderCubeFaceIndexAMD = 1,
AMD_gcn_shaderCubeFaceCoordAMD = 2,
AMD_gcn_shaderTimeAMD = 3,
AMD_gcn_shaderInstructionsMax = 0x7fffffff
};
#ifdef __cplusplus
}
#endif
#endif // SPIRV_UNIFIED1_AMD_gcn_shader_H_

View File

@ -0,0 +1,53 @@
// Copyright (c) 2020 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and/or associated documentation files (the
// "Materials"), to deal in the Materials without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Materials, and to
// permit persons to whom the Materials are furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Materials.
//
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
// KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
// SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
// https://www.khronos.org/registry/
//
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
//
#ifndef SPIRV_UNIFIED1_AMD_shader_ballot_H_
#define SPIRV_UNIFIED1_AMD_shader_ballot_H_
#ifdef __cplusplus
extern "C" {
#endif
enum {
AMD_shader_ballotRevision = 5,
AMD_shader_ballotRevision_BitWidthPadding = 0x7fffffff
};
enum AMD_shader_ballotInstructions {
AMD_shader_ballotSwizzleInvocationsAMD = 1,
AMD_shader_ballotSwizzleInvocationsMaskedAMD = 2,
AMD_shader_ballotWriteInvocationAMD = 3,
AMD_shader_ballotMbcntAMD = 4,
AMD_shader_ballotInstructionsMax = 0x7fffffff
};
#ifdef __cplusplus
}
#endif
#endif // SPIRV_UNIFIED1_AMD_shader_ballot_H_

View File

@ -0,0 +1,50 @@
// Copyright (c) 2020 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and/or associated documentation files (the
// "Materials"), to deal in the Materials without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Materials, and to
// permit persons to whom the Materials are furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Materials.
//
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
// KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
// SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
// https://www.khronos.org/registry/
//
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
//
#ifndef SPIRV_UNIFIED1_AMD_shader_explicit_vertex_parameter_H_
#define SPIRV_UNIFIED1_AMD_shader_explicit_vertex_parameter_H_
#ifdef __cplusplus
extern "C" {
#endif
enum {
AMD_shader_explicit_vertex_parameterRevision = 4,
AMD_shader_explicit_vertex_parameterRevision_BitWidthPadding = 0x7fffffff
};
enum AMD_shader_explicit_vertex_parameterInstructions {
AMD_shader_explicit_vertex_parameterInterpolateAtVertexAMD = 1,
AMD_shader_explicit_vertex_parameterInstructionsMax = 0x7fffffff
};
#ifdef __cplusplus
}
#endif
#endif // SPIRV_UNIFIED1_AMD_shader_explicit_vertex_parameter_H_

View File

@ -0,0 +1,58 @@
// Copyright (c) 2020 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and/or associated documentation files (the
// "Materials"), to deal in the Materials without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Materials, and to
// permit persons to whom the Materials are furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Materials.
//
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
// KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
// SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
// https://www.khronos.org/registry/
//
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
//
#ifndef SPIRV_UNIFIED1_AMD_shader_trinary_minmax_H_
#define SPIRV_UNIFIED1_AMD_shader_trinary_minmax_H_
#ifdef __cplusplus
extern "C" {
#endif
enum {
AMD_shader_trinary_minmaxRevision = 4,
AMD_shader_trinary_minmaxRevision_BitWidthPadding = 0x7fffffff
};
enum AMD_shader_trinary_minmaxInstructions {
AMD_shader_trinary_minmaxFMin3AMD = 1,
AMD_shader_trinary_minmaxUMin3AMD = 2,
AMD_shader_trinary_minmaxSMin3AMD = 3,
AMD_shader_trinary_minmaxFMax3AMD = 4,
AMD_shader_trinary_minmaxUMax3AMD = 5,
AMD_shader_trinary_minmaxSMax3AMD = 6,
AMD_shader_trinary_minmaxFMid3AMD = 7,
AMD_shader_trinary_minmaxUMid3AMD = 8,
AMD_shader_trinary_minmaxSMid3AMD = 9,
AMD_shader_trinary_minmaxInstructionsMax = 0x7fffffff
};
#ifdef __cplusplus
}
#endif
#endif // SPIRV_UNIFIED1_AMD_shader_trinary_minmax_H_

View File

@ -0,0 +1,144 @@
// Copyright (c) 2017 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"),
// to deal in the Materials without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Materials, and to permit persons to whom the
// Materials are furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Materials.
//
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
//
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
// IN THE MATERIALS.
#ifndef SPIRV_UNIFIED1_DebugInfo_H_
#define SPIRV_UNIFIED1_DebugInfo_H_
#ifdef __cplusplus
extern "C" {
#endif
enum {
DebugInfoVersion = 100,
DebugInfoVersion_BitWidthPadding = 0x7fffffff
};
enum {
DebugInfoRevision = 1,
DebugInfoRevision_BitWidthPadding = 0x7fffffff
};
enum DebugInfoInstructions {
DebugInfoDebugInfoNone = 0,
DebugInfoDebugCompilationUnit = 1,
DebugInfoDebugTypeBasic = 2,
DebugInfoDebugTypePointer = 3,
DebugInfoDebugTypeQualifier = 4,
DebugInfoDebugTypeArray = 5,
DebugInfoDebugTypeVector = 6,
DebugInfoDebugTypedef = 7,
DebugInfoDebugTypeFunction = 8,
DebugInfoDebugTypeEnum = 9,
DebugInfoDebugTypeComposite = 10,
DebugInfoDebugTypeMember = 11,
DebugInfoDebugTypeInheritance = 12,
DebugInfoDebugTypePtrToMember = 13,
DebugInfoDebugTypeTemplate = 14,
DebugInfoDebugTypeTemplateParameter = 15,
DebugInfoDebugTypeTemplateTemplateParameter = 16,
DebugInfoDebugTypeTemplateParameterPack = 17,
DebugInfoDebugGlobalVariable = 18,
DebugInfoDebugFunctionDeclaration = 19,
DebugInfoDebugFunction = 20,
DebugInfoDebugLexicalBlock = 21,
DebugInfoDebugLexicalBlockDiscriminator = 22,
DebugInfoDebugScope = 23,
DebugInfoDebugNoScope = 24,
DebugInfoDebugInlinedAt = 25,
DebugInfoDebugLocalVariable = 26,
DebugInfoDebugInlinedVariable = 27,
DebugInfoDebugDeclare = 28,
DebugInfoDebugValue = 29,
DebugInfoDebugOperation = 30,
DebugInfoDebugExpression = 31,
DebugInfoDebugMacroDef = 32,
DebugInfoDebugMacroUndef = 33,
DebugInfoInstructionsMax = 0x7fffffff
};
enum DebugInfoDebugInfoFlags {
DebugInfoNone = 0x0000,
DebugInfoFlagIsProtected = 0x01,
DebugInfoFlagIsPrivate = 0x02,
DebugInfoFlagIsPublic = 0x03,
DebugInfoFlagIsLocal = 0x04,
DebugInfoFlagIsDefinition = 0x08,
DebugInfoFlagFwdDecl = 0x10,
DebugInfoFlagArtificial = 0x20,
DebugInfoFlagExplicit = 0x40,
DebugInfoFlagPrototyped = 0x80,
DebugInfoFlagObjectPointer = 0x100,
DebugInfoFlagStaticMember = 0x200,
DebugInfoFlagIndirectVariable = 0x400,
DebugInfoFlagLValueReference = 0x800,
DebugInfoFlagRValueReference = 0x1000,
DebugInfoFlagIsOptimized = 0x2000,
DebugInfoDebugInfoFlagsMax = 0x7fffffff
};
enum DebugInfoDebugBaseTypeAttributeEncoding {
DebugInfoUnspecified = 0,
DebugInfoAddress = 1,
DebugInfoBoolean = 2,
DebugInfoFloat = 4,
DebugInfoSigned = 5,
DebugInfoSignedChar = 6,
DebugInfoUnsigned = 7,
DebugInfoUnsignedChar = 8,
DebugInfoDebugBaseTypeAttributeEncodingMax = 0x7fffffff
};
enum DebugInfoDebugCompositeType {
DebugInfoClass = 0,
DebugInfoStructure = 1,
DebugInfoUnion = 2,
DebugInfoDebugCompositeTypeMax = 0x7fffffff
};
enum DebugInfoDebugTypeQualifier {
DebugInfoConstType = 0,
DebugInfoVolatileType = 1,
DebugInfoRestrictType = 2,
DebugInfoDebugTypeQualifierMax = 0x7fffffff
};
enum DebugInfoDebugOperation {
DebugInfoDeref = 0,
DebugInfoPlus = 1,
DebugInfoMinus = 2,
DebugInfoPlusUconst = 3,
DebugInfoBitPiece = 4,
DebugInfoSwap = 5,
DebugInfoXderef = 6,
DebugInfoStackValue = 7,
DebugInfoConstu = 8,
DebugInfoDebugOperationMax = 0x7fffffff
};
#ifdef __cplusplus
}
#endif
#endif // SPIRV_UNIFIED1_DebugInfo_H_

View 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

View File

@ -0,0 +1,73 @@
// Copyright (c) 2020 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and/or associated documentation files (the
// "Materials"), to deal in the Materials without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Materials, and to
// permit persons to whom the Materials are furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Materials.
//
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
// KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
// SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
// https://www.khronos.org/registry/
//
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
//
#ifndef SPIRV_UNIFIED1_NonSemanticClspvReflection_H_
#define SPIRV_UNIFIED1_NonSemanticClspvReflection_H_
#ifdef __cplusplus
extern "C" {
#endif
enum {
NonSemanticClspvReflectionRevision = 1,
NonSemanticClspvReflectionRevision_BitWidthPadding = 0x7fffffff
};
enum NonSemanticClspvReflectionInstructions {
NonSemanticClspvReflectionKernel = 1,
NonSemanticClspvReflectionArgumentInfo = 2,
NonSemanticClspvReflectionArgumentStorageBuffer = 3,
NonSemanticClspvReflectionArgumentUniform = 4,
NonSemanticClspvReflectionArgumentPodStorageBuffer = 5,
NonSemanticClspvReflectionArgumentPodUniform = 6,
NonSemanticClspvReflectionArgumentPodPushConstant = 7,
NonSemanticClspvReflectionArgumentSampledImage = 8,
NonSemanticClspvReflectionArgumentStorageImage = 9,
NonSemanticClspvReflectionArgumentSampler = 10,
NonSemanticClspvReflectionArgumentWorkgroup = 11,
NonSemanticClspvReflectionSpecConstantWorkgroupSize = 12,
NonSemanticClspvReflectionSpecConstantGlobalOffset = 13,
NonSemanticClspvReflectionSpecConstantWorkDim = 14,
NonSemanticClspvReflectionPushConstantGlobalOffset = 15,
NonSemanticClspvReflectionPushConstantEnqueuedLocalSize = 16,
NonSemanticClspvReflectionPushConstantGlobalSize = 17,
NonSemanticClspvReflectionPushConstantRegionOffset = 18,
NonSemanticClspvReflectionPushConstantNumWorkgroups = 19,
NonSemanticClspvReflectionPushConstantRegionGroupOffset = 20,
NonSemanticClspvReflectionConstantDataStorageBuffer = 21,
NonSemanticClspvReflectionConstantDataUniform = 22,
NonSemanticClspvReflectionLiteralSampler = 23,
NonSemanticClspvReflectionPropertyRequiredWorkgroupSize = 24,
NonSemanticClspvReflectionInstructionsMax = 0x7fffffff
};
#ifdef __cplusplus
}
#endif
#endif // SPIRV_UNIFIED1_NonSemanticClspvReflection_H_

View File

@ -0,0 +1,50 @@
// Copyright (c) 2020 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and/or associated documentation files (the
// "Materials"), to deal in the Materials without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Materials, and to
// permit persons to whom the Materials are furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Materials.
//
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
// KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
// SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
// https://www.khronos.org/registry/
//
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
//
#ifndef SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_
#define SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_
#ifdef __cplusplus
extern "C" {
#endif
enum {
NonSemanticDebugPrintfRevision = 1,
NonSemanticDebugPrintfRevision_BitWidthPadding = 0x7fffffff
};
enum NonSemanticDebugPrintfInstructions {
NonSemanticDebugPrintfDebugPrintf = 1,
NonSemanticDebugPrintfInstructionsMax = 0x7fffffff
};
#ifdef __cplusplus
}
#endif
#endif // SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_

View File

@ -0,0 +1,171 @@
// Copyright (c) 2018 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"),
// to deal in the Materials without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Materials, and to permit persons to whom the
// Materials are furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Materials.
//
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
//
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
// IN THE MATERIALS.
#ifndef SPIRV_UNIFIED1_NonSemanticShaderDebugInfo100_H_
#define SPIRV_UNIFIED1_NonSemanticShaderDebugInfo100_H_
#ifdef __cplusplus
extern "C" {
#endif
enum {
NonSemanticShaderDebugInfo100Version = 100,
NonSemanticShaderDebugInfo100Version_BitWidthPadding = 0x7fffffff
};
enum {
NonSemanticShaderDebugInfo100Revision = 6,
NonSemanticShaderDebugInfo100Revision_BitWidthPadding = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100Instructions {
NonSemanticShaderDebugInfo100DebugInfoNone = 0,
NonSemanticShaderDebugInfo100DebugCompilationUnit = 1,
NonSemanticShaderDebugInfo100DebugTypeBasic = 2,
NonSemanticShaderDebugInfo100DebugTypePointer = 3,
NonSemanticShaderDebugInfo100DebugTypeQualifier = 4,
NonSemanticShaderDebugInfo100DebugTypeArray = 5,
NonSemanticShaderDebugInfo100DebugTypeVector = 6,
NonSemanticShaderDebugInfo100DebugTypedef = 7,
NonSemanticShaderDebugInfo100DebugTypeFunction = 8,
NonSemanticShaderDebugInfo100DebugTypeEnum = 9,
NonSemanticShaderDebugInfo100DebugTypeComposite = 10,
NonSemanticShaderDebugInfo100DebugTypeMember = 11,
NonSemanticShaderDebugInfo100DebugTypeInheritance = 12,
NonSemanticShaderDebugInfo100DebugTypePtrToMember = 13,
NonSemanticShaderDebugInfo100DebugTypeTemplate = 14,
NonSemanticShaderDebugInfo100DebugTypeTemplateParameter = 15,
NonSemanticShaderDebugInfo100DebugTypeTemplateTemplateParameter = 16,
NonSemanticShaderDebugInfo100DebugTypeTemplateParameterPack = 17,
NonSemanticShaderDebugInfo100DebugGlobalVariable = 18,
NonSemanticShaderDebugInfo100DebugFunctionDeclaration = 19,
NonSemanticShaderDebugInfo100DebugFunction = 20,
NonSemanticShaderDebugInfo100DebugLexicalBlock = 21,
NonSemanticShaderDebugInfo100DebugLexicalBlockDiscriminator = 22,
NonSemanticShaderDebugInfo100DebugScope = 23,
NonSemanticShaderDebugInfo100DebugNoScope = 24,
NonSemanticShaderDebugInfo100DebugInlinedAt = 25,
NonSemanticShaderDebugInfo100DebugLocalVariable = 26,
NonSemanticShaderDebugInfo100DebugInlinedVariable = 27,
NonSemanticShaderDebugInfo100DebugDeclare = 28,
NonSemanticShaderDebugInfo100DebugValue = 29,
NonSemanticShaderDebugInfo100DebugOperation = 30,
NonSemanticShaderDebugInfo100DebugExpression = 31,
NonSemanticShaderDebugInfo100DebugMacroDef = 32,
NonSemanticShaderDebugInfo100DebugMacroUndef = 33,
NonSemanticShaderDebugInfo100DebugImportedEntity = 34,
NonSemanticShaderDebugInfo100DebugSource = 35,
NonSemanticShaderDebugInfo100DebugFunctionDefinition = 101,
NonSemanticShaderDebugInfo100DebugSourceContinued = 102,
NonSemanticShaderDebugInfo100DebugLine = 103,
NonSemanticShaderDebugInfo100DebugNoLine = 104,
NonSemanticShaderDebugInfo100DebugBuildIdentifier = 105,
NonSemanticShaderDebugInfo100DebugStoragePath = 106,
NonSemanticShaderDebugInfo100DebugEntryPoint = 107,
NonSemanticShaderDebugInfo100DebugTypeMatrix = 108,
NonSemanticShaderDebugInfo100InstructionsMax = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100DebugInfoFlags {
NonSemanticShaderDebugInfo100None = 0x0000,
NonSemanticShaderDebugInfo100FlagIsProtected = 0x01,
NonSemanticShaderDebugInfo100FlagIsPrivate = 0x02,
NonSemanticShaderDebugInfo100FlagIsPublic = 0x03,
NonSemanticShaderDebugInfo100FlagIsLocal = 0x04,
NonSemanticShaderDebugInfo100FlagIsDefinition = 0x08,
NonSemanticShaderDebugInfo100FlagFwdDecl = 0x10,
NonSemanticShaderDebugInfo100FlagArtificial = 0x20,
NonSemanticShaderDebugInfo100FlagExplicit = 0x40,
NonSemanticShaderDebugInfo100FlagPrototyped = 0x80,
NonSemanticShaderDebugInfo100FlagObjectPointer = 0x100,
NonSemanticShaderDebugInfo100FlagStaticMember = 0x200,
NonSemanticShaderDebugInfo100FlagIndirectVariable = 0x400,
NonSemanticShaderDebugInfo100FlagLValueReference = 0x800,
NonSemanticShaderDebugInfo100FlagRValueReference = 0x1000,
NonSemanticShaderDebugInfo100FlagIsOptimized = 0x2000,
NonSemanticShaderDebugInfo100FlagIsEnumClass = 0x4000,
NonSemanticShaderDebugInfo100FlagTypePassByValue = 0x8000,
NonSemanticShaderDebugInfo100FlagTypePassByReference = 0x10000,
NonSemanticShaderDebugInfo100FlagUnknownPhysicalLayout = 0x20000,
NonSemanticShaderDebugInfo100DebugInfoFlagsMax = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100BuildIdentifierFlags {
NonSemanticShaderDebugInfo100IdentifierPossibleDuplicates = 0x01,
NonSemanticShaderDebugInfo100BuildIdentifierFlagsMax = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100DebugBaseTypeAttributeEncoding {
NonSemanticShaderDebugInfo100Unspecified = 0,
NonSemanticShaderDebugInfo100Address = 1,
NonSemanticShaderDebugInfo100Boolean = 2,
NonSemanticShaderDebugInfo100Float = 3,
NonSemanticShaderDebugInfo100Signed = 4,
NonSemanticShaderDebugInfo100SignedChar = 5,
NonSemanticShaderDebugInfo100Unsigned = 6,
NonSemanticShaderDebugInfo100UnsignedChar = 7,
NonSemanticShaderDebugInfo100DebugBaseTypeAttributeEncodingMax = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100DebugCompositeType {
NonSemanticShaderDebugInfo100Class = 0,
NonSemanticShaderDebugInfo100Structure = 1,
NonSemanticShaderDebugInfo100Union = 2,
NonSemanticShaderDebugInfo100DebugCompositeTypeMax = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100DebugTypeQualifier {
NonSemanticShaderDebugInfo100ConstType = 0,
NonSemanticShaderDebugInfo100VolatileType = 1,
NonSemanticShaderDebugInfo100RestrictType = 2,
NonSemanticShaderDebugInfo100AtomicType = 3,
NonSemanticShaderDebugInfo100DebugTypeQualifierMax = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100DebugOperation {
NonSemanticShaderDebugInfo100Deref = 0,
NonSemanticShaderDebugInfo100Plus = 1,
NonSemanticShaderDebugInfo100Minus = 2,
NonSemanticShaderDebugInfo100PlusUconst = 3,
NonSemanticShaderDebugInfo100BitPiece = 4,
NonSemanticShaderDebugInfo100Swap = 5,
NonSemanticShaderDebugInfo100Xderef = 6,
NonSemanticShaderDebugInfo100StackValue = 7,
NonSemanticShaderDebugInfo100Constu = 8,
NonSemanticShaderDebugInfo100Fragment = 9,
NonSemanticShaderDebugInfo100DebugOperationMax = 0x7fffffff
};
enum NonSemanticShaderDebugInfo100DebugImportedEntity {
NonSemanticShaderDebugInfo100ImportedModule = 0,
NonSemanticShaderDebugInfo100ImportedDeclaration = 1,
NonSemanticShaderDebugInfo100DebugImportedEntityMax = 0x7fffffff
};
#ifdef __cplusplus
}
#endif
#endif // SPIRV_UNIFIED1_NonSemanticShaderDebugInfo100_H_

View File

@ -0,0 +1,401 @@
/*
** Copyright (c) 2015-2019 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a copy
** of this software and/or associated documentation files (the "Materials"),
** 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
#ifdef __cplusplus
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
#else
enum OpenCLstd_Entrypoints {
// Section 2.1: Math extended instructions
OpenCLstd_Acos = 0,
OpenCLstd_Acosh = 1,
OpenCLstd_Acospi = 2,
OpenCLstd_Asin = 3,
OpenCLstd_Asinh = 4,
OpenCLstd_Asinpi = 5,
OpenCLstd_Atan = 6,
OpenCLstd_Atan2 = 7,
OpenCLstd_Atanh = 8,
OpenCLstd_Atanpi = 9,
OpenCLstd_Atan2pi = 10,
OpenCLstd_Cbrt = 11,
OpenCLstd_Ceil = 12,
OpenCLstd_Copysign = 13,
OpenCLstd_Cos = 14,
OpenCLstd_Cosh = 15,
OpenCLstd_Cospi = 16,
OpenCLstd_Erfc = 17,
OpenCLstd_Erf = 18,
OpenCLstd_Exp = 19,
OpenCLstd_Exp2 = 20,
OpenCLstd_Exp10 = 21,
OpenCLstd_Expm1 = 22,
OpenCLstd_Fabs = 23,
OpenCLstd_Fdim = 24,
OpenCLstd_Floor = 25,
OpenCLstd_Fma = 26,
OpenCLstd_Fmax = 27,
OpenCLstd_Fmin = 28,
OpenCLstd_Fmod = 29,
OpenCLstd_Fract = 30,
OpenCLstd_Frexp = 31,
OpenCLstd_Hypot = 32,
OpenCLstd_Ilogb = 33,
OpenCLstd_Ldexp = 34,
OpenCLstd_Lgamma = 35,
OpenCLstd_Lgamma_r = 36,
OpenCLstd_Log = 37,
OpenCLstd_Log2 = 38,
OpenCLstd_Log10 = 39,
OpenCLstd_Log1p = 40,
OpenCLstd_Logb = 41,
OpenCLstd_Mad = 42,
OpenCLstd_Maxmag = 43,
OpenCLstd_Minmag = 44,
OpenCLstd_Modf = 45,
OpenCLstd_Nan = 46,
OpenCLstd_Nextafter = 47,
OpenCLstd_Pow = 48,
OpenCLstd_Pown = 49,
OpenCLstd_Powr = 50,
OpenCLstd_Remainder = 51,
OpenCLstd_Remquo = 52,
OpenCLstd_Rint = 53,
OpenCLstd_Rootn = 54,
OpenCLstd_Round = 55,
OpenCLstd_Rsqrt = 56,
OpenCLstd_Sin = 57,
OpenCLstd_Sincos = 58,
OpenCLstd_Sinh = 59,
OpenCLstd_Sinpi = 60,
OpenCLstd_Sqrt = 61,
OpenCLstd_Tan = 62,
OpenCLstd_Tanh = 63,
OpenCLstd_Tanpi = 64,
OpenCLstd_Tgamma = 65,
OpenCLstd_Trunc = 66,
OpenCLstd_Half_cos = 67,
OpenCLstd_Half_divide = 68,
OpenCLstd_Half_exp = 69,
OpenCLstd_Half_exp2 = 70,
OpenCLstd_Half_exp10 = 71,
OpenCLstd_Half_log = 72,
OpenCLstd_Half_log2 = 73,
OpenCLstd_Half_log10 = 74,
OpenCLstd_Half_powr = 75,
OpenCLstd_Half_recip = 76,
OpenCLstd_Half_rsqrt = 77,
OpenCLstd_Half_sin = 78,
OpenCLstd_Half_sqrt = 79,
OpenCLstd_Half_tan = 80,
OpenCLstd_Native_cos = 81,
OpenCLstd_Native_divide = 82,
OpenCLstd_Native_exp = 83,
OpenCLstd_Native_exp2 = 84,
OpenCLstd_Native_exp10 = 85,
OpenCLstd_Native_log = 86,
OpenCLstd_Native_log2 = 87,
OpenCLstd_Native_log10 = 88,
OpenCLstd_Native_powr = 89,
OpenCLstd_Native_recip = 90,
OpenCLstd_Native_rsqrt = 91,
OpenCLstd_Native_sin = 92,
OpenCLstd_Native_sqrt = 93,
OpenCLstd_Native_tan = 94,
// Section 2.2: Integer instructions
OpenCLstd_SAbs = 141,
OpenCLstd_SAbs_diff = 142,
OpenCLstd_SAdd_sat = 143,
OpenCLstd_UAdd_sat = 144,
OpenCLstd_SHadd = 145,
OpenCLstd_UHadd = 146,
OpenCLstd_SRhadd = 147,
OpenCLstd_URhadd = 148,
OpenCLstd_SClamp = 149,
OpenCLstd_UClamp = 150,
OpenCLstd_Clz = 151,
OpenCLstd_Ctz = 152,
OpenCLstd_SMad_hi = 153,
OpenCLstd_UMad_sat = 154,
OpenCLstd_SMad_sat = 155,
OpenCLstd_SMax = 156,
OpenCLstd_UMax = 157,
OpenCLstd_SMin = 158,
OpenCLstd_UMin = 159,
OpenCLstd_SMul_hi = 160,
OpenCLstd_Rotate = 161,
OpenCLstd_SSub_sat = 162,
OpenCLstd_USub_sat = 163,
OpenCLstd_U_Upsample = 164,
OpenCLstd_S_Upsample = 165,
OpenCLstd_Popcount = 166,
OpenCLstd_SMad24 = 167,
OpenCLstd_UMad24 = 168,
OpenCLstd_SMul24 = 169,
OpenCLstd_UMul24 = 170,
OpenCLstd_UAbs = 201,
OpenCLstd_UAbs_diff = 202,
OpenCLstd_UMul_hi = 203,
OpenCLstd_UMad_hi = 204,
// Section 2.3: Common instructions
OpenCLstd_FClamp = 95,
OpenCLstd_Degrees = 96,
OpenCLstd_FMax_common = 97,
OpenCLstd_FMin_common = 98,
OpenCLstd_Mix = 99,
OpenCLstd_Radians = 100,
OpenCLstd_Step = 101,
OpenCLstd_Smoothstep = 102,
OpenCLstd_Sign = 103,
// Section 2.4: Geometric instructions
OpenCLstd_Cross = 104,
OpenCLstd_Distance = 105,
OpenCLstd_Length = 106,
OpenCLstd_Normalize = 107,
OpenCLstd_Fast_distance = 108,
OpenCLstd_Fast_length = 109,
OpenCLstd_Fast_normalize = 110,
// Section 2.5: Relational instructions
OpenCLstd_Bitselect = 186,
OpenCLstd_Select = 187,
// Section 2.6: Vector Data Load and Store instructions
OpenCLstd_Vloadn = 171,
OpenCLstd_Vstoren = 172,
OpenCLstd_Vload_half = 173,
OpenCLstd_Vload_halfn = 174,
OpenCLstd_Vstore_half = 175,
OpenCLstd_Vstore_half_r = 176,
OpenCLstd_Vstore_halfn = 177,
OpenCLstd_Vstore_halfn_r = 178,
OpenCLstd_Vloada_halfn = 179,
OpenCLstd_Vstorea_halfn = 180,
OpenCLstd_Vstorea_halfn_r = 181,
// Section 2.7: Miscellaneous Vector instructions
OpenCLstd_Shuffle = 182,
OpenCLstd_Shuffle2 = 183,
// Section 2.8: Misc instructions
OpenCLstd_Printf = 184,
OpenCLstd_Prefetch = 185,
};
#endif
#endif // #ifndef OPENCLstd_H

View File

@ -0,0 +1,158 @@
// Copyright (c) 2018 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"),
// to deal in the Materials without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Materials, and to permit persons to whom the
// Materials are furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Materials.
//
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
//
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
// IN THE MATERIALS.
#ifndef SPIRV_UNIFIED1_OpenCLDebugInfo100_H_
#define SPIRV_UNIFIED1_OpenCLDebugInfo100_H_
#ifdef __cplusplus
extern "C" {
#endif
enum {
OpenCLDebugInfo100Version = 200,
OpenCLDebugInfo100Version_BitWidthPadding = 0x7fffffff
};
enum {
OpenCLDebugInfo100Revision = 2,
OpenCLDebugInfo100Revision_BitWidthPadding = 0x7fffffff
};
enum OpenCLDebugInfo100Instructions {
OpenCLDebugInfo100DebugInfoNone = 0,
OpenCLDebugInfo100DebugCompilationUnit = 1,
OpenCLDebugInfo100DebugTypeBasic = 2,
OpenCLDebugInfo100DebugTypePointer = 3,
OpenCLDebugInfo100DebugTypeQualifier = 4,
OpenCLDebugInfo100DebugTypeArray = 5,
OpenCLDebugInfo100DebugTypeVector = 6,
OpenCLDebugInfo100DebugTypedef = 7,
OpenCLDebugInfo100DebugTypeFunction = 8,
OpenCLDebugInfo100DebugTypeEnum = 9,
OpenCLDebugInfo100DebugTypeComposite = 10,
OpenCLDebugInfo100DebugTypeMember = 11,
OpenCLDebugInfo100DebugTypeInheritance = 12,
OpenCLDebugInfo100DebugTypePtrToMember = 13,
OpenCLDebugInfo100DebugTypeTemplate = 14,
OpenCLDebugInfo100DebugTypeTemplateParameter = 15,
OpenCLDebugInfo100DebugTypeTemplateTemplateParameter = 16,
OpenCLDebugInfo100DebugTypeTemplateParameterPack = 17,
OpenCLDebugInfo100DebugGlobalVariable = 18,
OpenCLDebugInfo100DebugFunctionDeclaration = 19,
OpenCLDebugInfo100DebugFunction = 20,
OpenCLDebugInfo100DebugLexicalBlock = 21,
OpenCLDebugInfo100DebugLexicalBlockDiscriminator = 22,
OpenCLDebugInfo100DebugScope = 23,
OpenCLDebugInfo100DebugNoScope = 24,
OpenCLDebugInfo100DebugInlinedAt = 25,
OpenCLDebugInfo100DebugLocalVariable = 26,
OpenCLDebugInfo100DebugInlinedVariable = 27,
OpenCLDebugInfo100DebugDeclare = 28,
OpenCLDebugInfo100DebugValue = 29,
OpenCLDebugInfo100DebugOperation = 30,
OpenCLDebugInfo100DebugExpression = 31,
OpenCLDebugInfo100DebugMacroDef = 32,
OpenCLDebugInfo100DebugMacroUndef = 33,
OpenCLDebugInfo100DebugImportedEntity = 34,
OpenCLDebugInfo100DebugSource = 35,
OpenCLDebugInfo100DebugModuleINTEL = 36,
OpenCLDebugInfo100InstructionsMax = 0x7fffffff
};
enum OpenCLDebugInfo100DebugInfoFlags {
OpenCLDebugInfo100None = 0x0000,
OpenCLDebugInfo100FlagIsProtected = 0x01,
OpenCLDebugInfo100FlagIsPrivate = 0x02,
OpenCLDebugInfo100FlagIsPublic = 0x03,
OpenCLDebugInfo100FlagIsLocal = 0x04,
OpenCLDebugInfo100FlagIsDefinition = 0x08,
OpenCLDebugInfo100FlagFwdDecl = 0x10,
OpenCLDebugInfo100FlagArtificial = 0x20,
OpenCLDebugInfo100FlagExplicit = 0x40,
OpenCLDebugInfo100FlagPrototyped = 0x80,
OpenCLDebugInfo100FlagObjectPointer = 0x100,
OpenCLDebugInfo100FlagStaticMember = 0x200,
OpenCLDebugInfo100FlagIndirectVariable = 0x400,
OpenCLDebugInfo100FlagLValueReference = 0x800,
OpenCLDebugInfo100FlagRValueReference = 0x1000,
OpenCLDebugInfo100FlagIsOptimized = 0x2000,
OpenCLDebugInfo100FlagIsEnumClass = 0x4000,
OpenCLDebugInfo100FlagTypePassByValue = 0x8000,
OpenCLDebugInfo100FlagTypePassByReference = 0x10000,
OpenCLDebugInfo100DebugInfoFlagsMax = 0x7fffffff
};
enum OpenCLDebugInfo100DebugBaseTypeAttributeEncoding {
OpenCLDebugInfo100Unspecified = 0,
OpenCLDebugInfo100Address = 1,
OpenCLDebugInfo100Boolean = 2,
OpenCLDebugInfo100Float = 3,
OpenCLDebugInfo100Signed = 4,
OpenCLDebugInfo100SignedChar = 5,
OpenCLDebugInfo100Unsigned = 6,
OpenCLDebugInfo100UnsignedChar = 7,
OpenCLDebugInfo100DebugBaseTypeAttributeEncodingMax = 0x7fffffff
};
enum OpenCLDebugInfo100DebugCompositeType {
OpenCLDebugInfo100Class = 0,
OpenCLDebugInfo100Structure = 1,
OpenCLDebugInfo100Union = 2,
OpenCLDebugInfo100DebugCompositeTypeMax = 0x7fffffff
};
enum OpenCLDebugInfo100DebugTypeQualifier {
OpenCLDebugInfo100ConstType = 0,
OpenCLDebugInfo100VolatileType = 1,
OpenCLDebugInfo100RestrictType = 2,
OpenCLDebugInfo100AtomicType = 3,
OpenCLDebugInfo100DebugTypeQualifierMax = 0x7fffffff
};
enum OpenCLDebugInfo100DebugOperation {
OpenCLDebugInfo100Deref = 0,
OpenCLDebugInfo100Plus = 1,
OpenCLDebugInfo100Minus = 2,
OpenCLDebugInfo100PlusUconst = 3,
OpenCLDebugInfo100BitPiece = 4,
OpenCLDebugInfo100Swap = 5,
OpenCLDebugInfo100Xderef = 6,
OpenCLDebugInfo100StackValue = 7,
OpenCLDebugInfo100Constu = 8,
OpenCLDebugInfo100Fragment = 9,
OpenCLDebugInfo100DebugOperationMax = 0x7fffffff
};
enum OpenCLDebugInfo100DebugImportedEntity {
OpenCLDebugInfo100ImportedModule = 0,
OpenCLDebugInfo100ImportedDeclaration = 1,
OpenCLDebugInfo100DebugImportedEntityMax = 0x7fffffff
};
#ifdef __cplusplus
}
#endif
#endif // SPIRV_UNIFIED1_OpenCLDebugInfo100_H_

View File

@ -0,0 +1,572 @@
{
"copyright" : [
"Copyright (c) 2017 The Khronos Group Inc.",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy",
"of this software and/or associated documentation files (the \"Materials\"),",
"to deal in the Materials without restriction, including without limitation",
"the rights to use, copy, modify, merge, publish, distribute, sublicense,",
"and/or sell copies of the Materials, and to permit persons to whom the",
"Materials are furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in",
"all copies or substantial portions of the Materials.",
"",
"MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS",
"STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND",
"HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ",
"",
"THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS",
"OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL",
"THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING",
"FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS",
"IN THE MATERIALS."
],
"version" : 100,
"revision" : 1,
"instructions" : [
{
"opname" : "DebugInfoNone",
"opcode" : 0
},
{
"opname" : "DebugCompilationUnit",
"opcode" : 1,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Version'" },
{ "kind" : "LiteralInteger", "name" : "'DWARF Version'" }
]
},
{
"opname" : "DebugTypeBasic",
"opcode" : 2,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "DebugBaseTypeAttributeEncoding", "name" : "'Encoding'" }
]
},
{
"opname" : "DebugTypePointer",
"opcode" : 3,
"operands" : [
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "StorageClass", "name" : "'Storage Class'" },
{ "kind" : "DebugInfoFlags", "name" : "'Literal Flags'" }
]
},
{
"opname" : "DebugTypeQualifier",
"opcode" : 4,
"operands" : [
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "DebugTypeQualifier", "name" : "'Type Qualifier'" }
]
},
{
"opname" : "DebugTypeArray",
"opcode" : 5,
"operands" : [
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "IdRef", "name" : "'Component Counts'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeVector",
"opcode" : 6,
"operands" : [
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "LiteralInteger", "name" : "'Component Count'" }
]
},
{
"opname" : "DebugTypedef",
"opcode" : 7,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" }
]
},
{
"opname" : "DebugTypeFunction",
"opcode" : 8,
"operands" : [
{ "kind" : "IdRef", "name" : "'Return Type'" },
{ "kind" : "IdRef", "name" : "'Paramter Types'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeEnum",
"opcode" : 9,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Underlying Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "DebugInfoFlags", "name" : "'Flags'" },
{ "kind" : "PairIdRefIdRef", "name" : "'Value, Name, Value, Name, ...'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeComposite",
"opcode" : 10,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "DebugCompositeType", "name" : "'Tag'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "DebugInfoFlags", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Members'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeMember",
"opcode" : 11,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Offset'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "DebugInfoFlags", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" }
]
},
{
"opname" : "DebugTypeInheritance",
"opcode" : 12,
"operands" : [
{ "kind" : "IdRef", "name" : "'Child'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Offset'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "DebugInfoFlags", "name" : "'Flags'" }
]
},
{
"opname" : "DebugTypePtrToMember",
"opcode" : 13,
"operands" : [
{ "kind" : "IdRef", "name" : "'Member Type'" },
{ "kind" : "IdRef", "name" : "'Parent'" }
]
},
{
"opname" : "DebugTypeTemplate",
"opcode" : 14,
"operands" : [
{ "kind" : "IdRef", "name" : "'Target'" },
{ "kind" : "IdRef", "name" : "'Parameters'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeTemplateParameter",
"opcode" : 15,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Actual Type'" },
{ "kind" : "IdRef", "name" : "'Value'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" }
]
},
{
"opname" : "DebugTypeTemplateTemplateParameter",
"opcode" : 16,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Template Name'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" }
]
},
{
"opname" : "DebugTypeTemplateParameterPack",
"opcode" : 17,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Template Parameters'", "quantifier" : "*" }
]
},
{
"opname" : "DebugGlobalVariable",
"opcode" : 18,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Linkage Name'" },
{ "kind" : "IdRef", "name" : "'Variable'" },
{ "kind" : "DebugInfoFlags", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Static Member Declaration'", "quantifier" : "?" }
]
},
{
"opname" : "DebugFunctionDeclaration",
"opcode" : 19,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Linkage Name'" },
{ "kind" : "DebugInfoFlags", "name" : "'Flags'" }
]
},
{
"opname" : "DebugFunction",
"opcode" : 20,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Linkage Name'" },
{ "kind" : "DebugInfoFlags", "name" : "'Flags'" },
{ "kind" : "LiteralInteger", "name" : "'Scope Line'" },
{ "kind" : "IdRef", "name" : "'Function'" },
{ "kind" : "IdRef", "name" : "'Declaration'", "quantifier" : "?" }
]
},
{
"opname" : "DebugLexicalBlock",
"opcode" : 21,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Name'", "quantifier" : "?" }
]
},
{
"opname" : "DebugLexicalBlockDiscriminator",
"opcode" : 22,
"operands" : [
{ "kind" : "IdRef", "name" : "'Scope'" },
{ "kind" : "LiteralInteger", "name" : "'Discriminator'" },
{ "kind" : "IdRef", "name" : "'Parent'" }
]
},
{
"opname" : "DebugScope",
"opcode" : 23,
"operands" : [
{ "kind" : "IdRef", "name" : "'Scope'" },
{ "kind" : "IdRef", "name" : "'Inlined At'", "quantifier" : "?" }
]
},
{
"opname" : "DebugNoScope",
"opcode" : 24
},
{
"opname" : "DebugInlinedAt",
"opcode" : 25,
"operands" : [
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Scope'" },
{ "kind" : "IdRef", "name" : "'Inlined'", "quantifier" : "?" }
]
},
{
"opname" : "DebugLocalVariable",
"opcode" : 26,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "LiteralInteger", "name" : "'Arg Number'", "quantifier" : "?" }
]
},
{
"opname" : "DebugInlinedVariable",
"opcode" : 27,
"operands" : [
{ "kind" : "IdRef", "name" : "'Variable'" },
{ "kind" : "IdRef", "name" : "'Inlined'" }
]
},
{
"opname" : "DebugDeclare",
"opcode" : 28,
"operands" : [
{ "kind" : "IdRef", "name" : "'Local Variable'" },
{ "kind" : "IdRef", "name" : "'Variable'" },
{ "kind" : "IdRef", "name" : "'Expression'" }
]
},
{
"opname" : "DebugValue",
"opcode" : 29,
"operands" : [
{ "kind" : "IdRef", "name" : "'Value'" },
{ "kind" : "IdRef", "name" : "'Expression'" },
{ "kind" : "IdRef", "name" : "'Indexes'", "quantifier" : "*" }
]
},
{
"opname" : "DebugOperation",
"opcode" : 30,
"operands" : [
{ "kind" : "DebugOperation", "name" : "'OpCode'" },
{ "kind" : "LiteralInteger", "name" : "'Operands ...'", "quantifier" : "*" }
]
},
{
"opname" : "DebugExpression",
"opcode" : 31,
"operands" : [
{ "kind" : "IdRef", "name" : "'Operands ...'", "quantifier" : "*" }
]
},
{
"opname" : "DebugMacroDef",
"opcode" : 32,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" }
]
},
{
"opname" : "DebugMacroUndef",
"opcode" : 33,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Macro'" }
]
}
],
"operand_kinds" : [
{
"category" : "BitEnum",
"kind" : "DebugInfoFlags",
"enumerants" : [
{
"enumerant" : "None",
"value" : "0x0000"
},
{
"enumerant" : "FlagIsProtected",
"value" : "0x01"
},
{
"enumerant" : "FlagIsPrivate",
"value" : "0x02"
},
{
"enumerant" : "FlagIsPublic",
"value" : "0x03"
},
{
"enumerant" : "FlagIsLocal",
"value" : "0x04"
},
{
"enumerant" : "FlagIsDefinition",
"value" : "0x08"
},
{
"enumerant" : "FlagFwdDecl",
"value" : "0x10"
},
{
"enumerant" : "FlagArtificial",
"value" : "0x20"
},
{
"enumerant" : "FlagExplicit",
"value" : "0x40"
},
{
"enumerant" : "FlagPrototyped",
"value" : "0x80"
},
{
"enumerant" : "FlagObjectPointer",
"value" : "0x100"
},
{
"enumerant" : "FlagStaticMember",
"value" : "0x200"
},
{
"enumerant" : "FlagIndirectVariable",
"value" : "0x400"
},
{
"enumerant" : "FlagLValueReference",
"value" : "0x800"
},
{
"enumerant" : "FlagRValueReference",
"value" : "0x1000"
},
{
"enumerant" : "FlagIsOptimized",
"value" : "0x2000"
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugBaseTypeAttributeEncoding",
"enumerants" : [
{
"enumerant" : "Unspecified",
"value" : "0"
},
{
"enumerant" : "Address",
"value" : "1"
},
{
"enumerant" : "Boolean",
"value" : "2"
},
{
"enumerant" : "Float",
"value" : "4"
},
{
"enumerant" : "Signed",
"value" : "5"
},
{
"enumerant" : "SignedChar",
"value" : "6"
},
{
"enumerant" : "Unsigned",
"value" : "7"
},
{
"enumerant" : "UnsignedChar",
"value" : "8"
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugCompositeType",
"enumerants" : [
{
"enumerant" : "Class",
"value" : "0"
},
{
"enumerant" : "Structure",
"value" : "1"
},
{
"enumerant" : "Union",
"value" : "2"
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugTypeQualifier",
"enumerants" : [
{
"enumerant" : "ConstType",
"value" : "0"
},
{
"enumerant" : "VolatileType",
"value" : "1"
},
{
"enumerant" : "RestrictType",
"value" : "2"
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugOperation",
"enumerants" : [
{
"enumerant" : "Deref",
"value" : "0"
},
{
"enumerant" : "Plus",
"value" : "1"
},
{
"enumerant" : "Minus",
"value" : "2"
},
{
"enumerant" : "PlusUconst",
"value" : "3",
"parameters" : [
{ "kind" : "LiteralInteger" }
]
},
{
"enumerant" : "BitPiece",
"value" : "4",
"parameters" : [
{ "kind" : "LiteralInteger" },
{ "kind" : "LiteralInteger" }
]
},
{
"enumerant" : "Swap",
"value" : "5"
},
{
"enumerant" : "Xderef",
"value" : "6"
},
{
"enumerant" : "StackValue",
"value" : "7"
},
{
"enumerant" : "Constu",
"value" : "8",
"parameters" : [
{ "kind" : "LiteralInteger" }
]
}
]
}
]
}

View 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'" }
]
}
]
}

View File

@ -0,0 +1,237 @@
{
"revision" : 1,
"instructions" : [
{
"opname" : "Kernel",
"opcode" : 1,
"operands" : [
{ "kind" : "IdRef", "name" : "Kernel" },
{ "kind" : "IdRef", "name" : "Name" }
]
},
{
"opname" : "ArgumentInfo",
"opcode" : 2,
"operands" : [
{ "kind" : "IdRef", "name" : "Name" },
{ "kind" : "IdRef", "name" : "Type Name", "quantifier" : "?" },
{ "kind" : "IdRef", "name" : "Address Qualifier", "quantifier" : "?" },
{ "kind" : "IdRef", "name" : "Access Qualifier", "quantifier" : "?" },
{ "kind" : "IdRef", "name" : "Type Qualifier", "quantifier" : "?" }
]
},
{
"opname" : "ArgumentStorageBuffer",
"opcode" : 3,
"operands" : [
{ "kind" : "IdRef", "name" : "Decl" },
{ "kind" : "IdRef", "name" : "Ordinal" },
{ "kind" : "IdRef", "name" : "DescriptorSet" },
{ "kind" : "IdRef", "name" : "Binding" },
{ "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" }
]
},
{
"opname" : "ArgumentUniform",
"opcode" : 4,
"operands" : [
{ "kind" : "IdRef", "name" : "Decl" },
{ "kind" : "IdRef", "name" : "Ordinal" },
{ "kind" : "IdRef", "name" : "DescriptorSet" },
{ "kind" : "IdRef", "name" : "Binding" },
{ "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" }
]
},
{
"opname" : "ArgumentPodStorageBuffer",
"opcode" : 5,
"operands" : [
{ "kind" : "IdRef", "name" : "Decl" },
{ "kind" : "IdRef", "name" : "Ordinal" },
{ "kind" : "IdRef", "name" : "DescriptorSet" },
{ "kind" : "IdRef", "name" : "Binding" },
{ "kind" : "IdRef", "name" : "Offset" },
{ "kind" : "IdRef", "name" : "Size" },
{ "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" }
]
},
{
"opname" : "ArgumentPodUniform",
"opcode" : 6,
"operands" : [
{ "kind" : "IdRef", "name" : "Decl" },
{ "kind" : "IdRef", "name" : "Ordinal" },
{ "kind" : "IdRef", "name" : "DescriptorSet" },
{ "kind" : "IdRef", "name" : "Binding" },
{ "kind" : "IdRef", "name" : "Offset" },
{ "kind" : "IdRef", "name" : "Size" },
{ "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" }
]
},
{
"opname" : "ArgumentPodPushConstant",
"opcode" : 7,
"operands" : [
{ "kind" : "IdRef", "name" : "Decl" },
{ "kind" : "IdRef", "name" : "Ordinal" },
{ "kind" : "IdRef", "name" : "Offset" },
{ "kind" : "IdRef", "name" : "Size" },
{ "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" }
]
},
{
"opname" : "ArgumentSampledImage",
"opcode" : 8,
"operands" : [
{ "kind" : "IdRef", "name" : "Decl" },
{ "kind" : "IdRef", "name" : "Ordinal" },
{ "kind" : "IdRef", "name" : "DescriptorSet" },
{ "kind" : "IdRef", "name" : "Binding" },
{ "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" }
]
},
{
"opname" : "ArgumentStorageImage",
"opcode" : 9,
"operands" : [
{ "kind" : "IdRef", "name" : "Decl" },
{ "kind" : "IdRef", "name" : "Ordinal" },
{ "kind" : "IdRef", "name" : "DescriptorSet" },
{ "kind" : "IdRef", "name" : "Binding" },
{ "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" }
]
},
{
"opname" : "ArgumentSampler",
"opcode" : 10,
"operands" : [
{ "kind" : "IdRef", "name" : "Decl" },
{ "kind" : "IdRef", "name" : "Ordinal" },
{ "kind" : "IdRef", "name" : "DescriptorSet" },
{ "kind" : "IdRef", "name" : "Binding" },
{ "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" }
]
},
{
"opname" : "ArgumentWorkgroup",
"opcode" : 11,
"operands" : [
{ "kind" : "IdRef", "name" : "Decl" },
{ "kind" : "IdRef", "name" : "Ordinal" },
{ "kind" : "IdRef", "name" : "SpecId" },
{ "kind" : "IdRef", "name" : "ElemSize" },
{ "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" }
]
},
{
"opname" : "SpecConstantWorkgroupSize",
"opcode" : 12,
"operands" : [
{ "kind" : "IdRef", "name" : "X" },
{ "kind" : "IdRef", "name" : "Y" },
{ "kind" : "IdRef", "name" : "Z" }
]
},
{
"opname" : "SpecConstantGlobalOffset",
"opcode" : 13,
"operands" : [
{ "kind" : "IdRef", "name" : "X" },
{ "kind" : "IdRef", "name" : "Y" },
{ "kind" : "IdRef", "name" : "Z" }
]
},
{
"opname" : "SpecConstantWorkDim",
"opcode" : 14,
"operands" : [
{ "kind" : "IdRef", "name" : "Dim" }
]
},
{
"opname" : "PushConstantGlobalOffset",
"opcode" : 15,
"operands" : [
{ "kind" : "IdRef", "name" : "Offset" },
{ "kind" : "IdRef", "name" : "Size" }
]
},
{
"opname" : "PushConstantEnqueuedLocalSize",
"opcode" : 16,
"operands" : [
{ "kind" : "IdRef", "name" : "Offset" },
{ "kind" : "IdRef", "name" : "Size" }
]
},
{
"opname" : "PushConstantGlobalSize",
"opcode" : 17,
"operands" : [
{ "kind" : "IdRef", "name" : "Offset" },
{ "kind" : "IdRef", "name" : "Size" }
]
},
{
"opname" : "PushConstantRegionOffset",
"opcode" : 18,
"operands" : [
{ "kind" : "IdRef", "name" : "Offset" },
{ "kind" : "IdRef", "name" : "Size" }
]
},
{
"opname" : "PushConstantNumWorkgroups",
"opcode" : 19,
"operands" : [
{ "kind" : "IdRef", "name" : "Offset" },
{ "kind" : "IdRef", "name" : "Size" }
]
},
{
"opname" : "PushConstantRegionGroupOffset",
"opcode" : 20,
"operands" : [
{ "kind" : "IdRef", "name" : "Offset" },
{ "kind" : "IdRef", "name" : "Size" }
]
},
{
"opname" : "ConstantDataStorageBuffer",
"opcode" : 21,
"operands" : [
{ "kind" : "IdRef", "name" : "DescriptorSet" },
{ "kind" : "IdRef", "name" : "Binding" },
{ "kind" : "IdRef", "name" : "Data" }
]
},
{
"opname" : "ConstantDataUniform",
"opcode" : 22,
"operands" : [
{ "kind" : "IdRef", "name" : "DescriptorSet" },
{ "kind" : "IdRef", "name" : "Binding" },
{ "kind" : "IdRef", "name" : "Data" }
]
},
{
"opname" : "LiteralSampler",
"opcode" : 23,
"operands" : [
{ "kind" : "IdRef", "name" : "DescriptorSet" },
{ "kind" : "IdRef", "name" : "Binding" },
{ "kind" : "IdRef", "name" : "Mask" }
]
},
{
"opname" : "PropertyRequiredWorkgroupSize",
"opcode" : 24,
"operands" : [
{ "kind" : "IdRef", "name" : "Kernel" },
{ "kind" : "IdRef", "name" : "X" },
{ "kind" : "IdRef", "name" : "Y" },
{ "kind" : "IdRef", "name" : "Z" }
]
}
]
}

View File

@ -0,0 +1,13 @@
{
"revision" : 1,
"instructions" : [
{
"opname" : "DebugPrintf",
"opcode" : 1,
"operands" : [
{ "kind" : "IdRef", "name" : "'Format'" },
{ "kind" : "IdRef", "quantifier" : "*" }
]
}
]
}

View File

@ -0,0 +1,713 @@
{
"copyright" : [
"Copyright (c) 2018 The Khronos Group Inc.",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy",
"of this software and/or associated documentation files (the \"Materials\"),",
"to deal in the Materials without restriction, including without limitation",
"the rights to use, copy, modify, merge, publish, distribute, sublicense,",
"and/or sell copies of the Materials, and to permit persons to whom the",
"Materials are furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in",
"all copies or substantial portions of the Materials.",
"",
"MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS",
"STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND",
"HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ",
"",
"THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS",
"OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL",
"THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING",
"FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS",
"IN THE MATERIALS."
],
"version" : 100,
"revision" : 6,
"instructions" : [
{
"opname" : "DebugInfoNone",
"opcode" : 0
},
{
"opname" : "DebugCompilationUnit",
"opcode" : 1,
"operands" : [
{ "kind" : "IdRef", "name" : "'Version'" },
{ "kind" : "IdRef", "name" : "'DWARF Version'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Language'" }
]
},
{
"opname" : "DebugTypeBasic",
"opcode" : 2,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "IdRef", "name" : "'Encoding'" },
{ "kind" : "IdRef", "name" : "'Flags'" }
]
},
{
"opname" : "DebugTypePointer",
"opcode" : 3,
"operands" : [
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "IdRef", "name" : "'Storage Class'" },
{ "kind" : "IdRef", "name" : "'Flags'" }
]
},
{
"opname" : "DebugTypeQualifier",
"opcode" : 4,
"operands" : [
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "IdRef", "name" : "'Type Qualifier'" }
]
},
{
"opname" : "DebugTypeArray",
"opcode" : 5,
"operands" : [
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "IdRef", "name" : "'Component Counts'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeVector",
"opcode" : 6,
"operands" : [
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "IdRef", "name" : "'Component Count'" }
]
},
{
"opname" : "DebugTypedef",
"opcode" : 7,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" }
]
},
{
"opname" : "DebugTypeFunction",
"opcode" : 8,
"operands" : [
{ "kind" : "IdRef", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Return Type'" },
{ "kind" : "IdRef", "name" : "'Parameter Types'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeEnum",
"opcode" : 9,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Underlying Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "IdRef", "name" : "'Flags'" },
{ "kind" : "PairIdRefIdRef", "name" : "'Value, Name, Value, Name, ...'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeComposite",
"opcode" : 10,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Tag'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Linkage Name'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "IdRef", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Members'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeMember",
"opcode" : 11,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Offset'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "IdRef", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" }
]
},
{
"opname" : "DebugTypeInheritance",
"opcode" : 12,
"operands" : [
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Offset'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "IdRef", "name" : "'Flags'" }
]
},
{
"opname" : "DebugTypePtrToMember",
"opcode" : 13,
"operands" : [
{ "kind" : "IdRef", "name" : "'Member Type'" },
{ "kind" : "IdRef", "name" : "'Parent'" }
]
},
{
"opname" : "DebugTypeTemplate",
"opcode" : 14,
"operands" : [
{ "kind" : "IdRef", "name" : "'Target'" },
{ "kind" : "IdRef", "name" : "'Parameters'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeTemplateParameter",
"opcode" : 15,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Actual Type'" },
{ "kind" : "IdRef", "name" : "'Value'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" }
]
},
{
"opname" : "DebugTypeTemplateTemplateParameter",
"opcode" : 16,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Template Name'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" }
]
},
{
"opname" : "DebugTypeTemplateParameterPack",
"opcode" : 17,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Template Parameters'", "quantifier" : "*" }
]
},
{
"opname" : "DebugGlobalVariable",
"opcode" : 18,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Linkage Name'" },
{ "kind" : "IdRef", "name" : "'Variable'" },
{ "kind" : "IdRef", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Static Member Declaration'", "quantifier" : "?" }
]
},
{
"opname" : "DebugFunctionDeclaration",
"opcode" : 19,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Linkage Name'" },
{ "kind" : "IdRef", "name" : "'Flags'" }
]
},
{
"opname" : "DebugFunction",
"opcode" : 20,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Linkage Name'" },
{ "kind" : "IdRef", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Scope Line'" },
{ "kind" : "IdRef", "name" : "'Declaration'", "quantifier" : "?" }
]
},
{
"opname" : "DebugLexicalBlock",
"opcode" : 21,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Name'", "quantifier" : "?" }
]
},
{
"opname" : "DebugLexicalBlockDiscriminator",
"opcode" : 22,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Discriminator'" },
{ "kind" : "IdRef", "name" : "'Parent'" }
]
},
{
"opname" : "DebugScope",
"opcode" : 23,
"operands" : [
{ "kind" : "IdRef", "name" : "'Scope'" },
{ "kind" : "IdRef", "name" : "'Inlined At'", "quantifier" : "?" }
]
},
{
"opname" : "DebugNoScope",
"opcode" : 24
},
{
"opname" : "DebugInlinedAt",
"opcode" : 25,
"operands" : [
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Scope'" },
{ "kind" : "IdRef", "name" : "'Inlined'", "quantifier" : "?" }
]
},
{
"opname" : "DebugLocalVariable",
"opcode" : 26,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Arg Number'", "quantifier" : "?" }
]
},
{
"opname" : "DebugInlinedVariable",
"opcode" : 27,
"operands" : [
{ "kind" : "IdRef", "name" : "'Variable'" },
{ "kind" : "IdRef", "name" : "'Inlined'" }
]
},
{
"opname" : "DebugDeclare",
"opcode" : 28,
"operands" : [
{ "kind" : "IdRef", "name" : "'Local Variable'" },
{ "kind" : "IdRef", "name" : "'Variable'" },
{ "kind" : "IdRef", "name" : "'Expression'" },
{ "kind" : "IdRef", "name" : "'Indexes'", "quantifier" : "*" }
]
},
{
"opname" : "DebugValue",
"opcode" : 29,
"operands" : [
{ "kind" : "IdRef", "name" : "'Local Variable'" },
{ "kind" : "IdRef", "name" : "'Value'" },
{ "kind" : "IdRef", "name" : "'Expression'" },
{ "kind" : "IdRef", "name" : "'Indexes'", "quantifier" : "*" }
]
},
{
"opname" : "DebugOperation",
"opcode" : 30,
"operands" : [
{ "kind" : "IdRef", "name" : "'OpCode'" },
{ "kind" : "IdRef", "name" : "'Operands ...'", "quantifier" : "*" }
]
},
{
"opname" : "DebugExpression",
"opcode" : 31,
"operands" : [
{ "kind" : "IdRef", "name" : "'Operands ...'", "quantifier" : "*" }
]
},
{
"opname" : "DebugMacroDef",
"opcode" : 32,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" }
]
},
{
"opname" : "DebugMacroUndef",
"opcode" : 33,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Macro'" }
]
},
{
"opname" : "DebugImportedEntity",
"opcode" : 34,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Tag'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Entity'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" }
]
},
{
"opname" : "DebugSource",
"opcode" : 35,
"operands" : [
{ "kind" : "IdRef", "name" : "'File'" },
{ "kind" : "IdRef", "name" : "'Text'", "quantifier" : "?" }
]
},
{
"opname" : "DebugFunctionDefinition",
"opcode" : 101,
"operands" : [
{ "kind" : "IdRef", "name" : "'Function'" },
{ "kind" : "IdRef", "name" : "'Definition'" }
]
},
{
"opname" : "DebugSourceContinued",
"opcode" : 102,
"operands" : [
{ "kind" : "IdRef", "name" : "'Text'" }
]
},
{
"opname" : "DebugLine",
"opcode" : 103,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line Start'" },
{ "kind" : "IdRef", "name" : "'Line End'" },
{ "kind" : "IdRef", "name" : "'Column Start'" },
{ "kind" : "IdRef", "name" : "'Column End'" }
]
},
{
"opname" : "DebugNoLine",
"opcode" : 104
},
{
"opname" : "DebugBuildIdentifier",
"opcode" : 105,
"operands" : [
{ "kind" : "IdRef", "name" : "'Identifier'" },
{ "kind" : "IdRef", "name" : "'Flags'" }
]
},
{
"opname" : "DebugStoragePath",
"opcode" : 106,
"operands" : [
{ "kind" : "IdRef", "name" : "'Path'" }
]
},
{
"opname" : "DebugEntryPoint",
"opcode" : 107,
"operands" : [
{ "kind" : "IdRef", "name" : "'Entry Point'" },
{ "kind" : "IdRef", "name" : "'Compilation Unit'" },
{ "kind" : "IdRef", "name" : "'Compiler Signature'" },
{ "kind" : "IdRef", "name" : "'Command-line Arguments'" }
]
},
{
"opname" : "DebugTypeMatrix",
"opcode" : 108,
"operands" : [
{ "kind" : "IdRef", "name" : "'Vector Type'" },
{ "kind" : "IdRef", "name" : "'Vector Count'" },
{ "kind" : "IdRef", "name" : "'Column Major'" }
]
}
],
"operand_kinds" : [
{
"category" : "BitEnum",
"kind" : "DebugInfoFlags",
"enumerants" : [
{
"enumerant" : "None",
"value" : "0x0000"
},
{
"enumerant" : "FlagIsProtected",
"value" : "0x01"
},
{
"enumerant" : "FlagIsPrivate",
"value" : "0x02"
},
{
"enumerant" : "FlagIsPublic",
"value" : "0x03"
},
{
"enumerant" : "FlagIsLocal",
"value" : "0x04"
},
{
"enumerant" : "FlagIsDefinition",
"value" : "0x08"
},
{
"enumerant" : "FlagFwdDecl",
"value" : "0x10"
},
{
"enumerant" : "FlagArtificial",
"value" : "0x20"
},
{
"enumerant" : "FlagExplicit",
"value" : "0x40"
},
{
"enumerant" : "FlagPrototyped",
"value" : "0x80"
},
{
"enumerant" : "FlagObjectPointer",
"value" : "0x100"
},
{
"enumerant" : "FlagStaticMember",
"value" : "0x200"
},
{
"enumerant" : "FlagIndirectVariable",
"value" : "0x400"
},
{
"enumerant" : "FlagLValueReference",
"value" : "0x800"
},
{
"enumerant" : "FlagRValueReference",
"value" : "0x1000"
},
{
"enumerant" : "FlagIsOptimized",
"value" : "0x2000"
},
{
"enumerant" : "FlagIsEnumClass",
"value" : "0x4000"
},
{
"enumerant" : "FlagTypePassByValue",
"value" : "0x8000"
},
{
"enumerant" : "FlagTypePassByReference",
"value" : "0x10000"
},
{
"enumerant" : "FlagUnknownPhysicalLayout",
"value" : "0x20000"
}
]
},
{
"category" : "BitEnum",
"kind" : "BuildIdentifierFlags",
"enumerants" : [
{
"enumerant" : "IdentifierPossibleDuplicates",
"value" : "0x01"
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugBaseTypeAttributeEncoding",
"enumerants" : [
{
"enumerant" : "Unspecified",
"value" : "0"
},
{
"enumerant" : "Address",
"value" : "1"
},
{
"enumerant" : "Boolean",
"value" : "2"
},
{
"enumerant" : "Float",
"value" : "3"
},
{
"enumerant" : "Signed",
"value" : "4"
},
{
"enumerant" : "SignedChar",
"value" : "5"
},
{
"enumerant" : "Unsigned",
"value" : "6"
},
{
"enumerant" : "UnsignedChar",
"value" : "7"
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugCompositeType",
"enumerants" : [
{
"enumerant" : "Class",
"value" : "0"
},
{
"enumerant" : "Structure",
"value" : "1"
},
{
"enumerant" : "Union",
"value" : "2"
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugTypeQualifier",
"enumerants" : [
{
"enumerant" : "ConstType",
"value" : "0"
},
{
"enumerant" : "VolatileType",
"value" : "1"
},
{
"enumerant" : "RestrictType",
"value" : "2"
},
{
"enumerant" : "AtomicType",
"value" : "3"
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugOperation",
"enumerants" : [
{
"enumerant" : "Deref",
"value" : "0"
},
{
"enumerant" : "Plus",
"value" : "1"
},
{
"enumerant" : "Minus",
"value" : "2"
},
{
"enumerant" : "PlusUconst",
"value" : "3",
"parameters" : [
{ "kind" : "IdRef" }
]
},
{
"enumerant" : "BitPiece",
"value" : "4",
"parameters" : [
{ "kind" : "IdRef" },
{ "kind" : "IdRef" }
]
},
{
"enumerant" : "Swap",
"value" : "5"
},
{
"enumerant" : "Xderef",
"value" : "6"
},
{
"enumerant" : "StackValue",
"value" : "7"
},
{
"enumerant" : "Constu",
"value" : "8",
"parameters" : [
{ "kind" : "IdRef" }
]
},
{
"enumerant" : "Fragment",
"value" : "9",
"parameters" : [
{ "kind" : "IdRef" },
{ "kind" : "IdRef" }
]
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugImportedEntity",
"enumerants" : [
{
"enumerant" : "ImportedModule",
"value" : "0"
},
{
"enumerant" : "ImportedDeclaration",
"value" : "1"
}
]
}
]
}

View File

@ -0,0 +1,651 @@
{
"copyright" : [
"Copyright (c) 2018 The Khronos Group Inc.",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy",
"of this software and/or associated documentation files (the \"Materials\"),",
"to deal in the Materials without restriction, including without limitation",
"the rights to use, copy, modify, merge, publish, distribute, sublicense,",
"and/or sell copies of the Materials, and to permit persons to whom the",
"Materials are furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in",
"all copies or substantial portions of the Materials.",
"",
"MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS",
"STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND",
"HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ",
"",
"THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS",
"OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL",
"THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING",
"FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS",
"IN THE MATERIALS."
],
"version" : 200,
"revision" : 2,
"instructions" : [
{
"opname" : "DebugInfoNone",
"opcode" : 0
},
{
"opname" : "DebugCompilationUnit",
"opcode" : 1,
"operands" : [
{ "kind" : "LiteralInteger", "name" : "'Version'" },
{ "kind" : "LiteralInteger", "name" : "'DWARF Version'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "SourceLanguage", "name" : "'Language'" }
]
},
{
"opname" : "DebugTypeBasic",
"opcode" : 2,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "DebugBaseTypeAttributeEncoding", "name" : "'Encoding'" }
]
},
{
"opname" : "DebugTypePointer",
"opcode" : 3,
"operands" : [
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "StorageClass", "name" : "'Storage Class'" },
{ "kind" : "DebugInfoFlags", "name" : "'Flags'" }
]
},
{
"opname" : "DebugTypeQualifier",
"opcode" : 4,
"operands" : [
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "DebugTypeQualifier", "name" : "'Type Qualifier'" }
]
},
{
"opname" : "DebugTypeArray",
"opcode" : 5,
"operands" : [
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "IdRef", "name" : "'Component Counts'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeVector",
"opcode" : 6,
"operands" : [
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "LiteralInteger", "name" : "'Component Count'" }
]
},
{
"opname" : "DebugTypedef",
"opcode" : 7,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" }
]
},
{
"opname" : "DebugTypeFunction",
"opcode" : 8,
"operands" : [
{ "kind" : "DebugInfoFlags", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Return Type'" },
{ "kind" : "IdRef", "name" : "'Parameter Types'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeEnum",
"opcode" : 9,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Underlying Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "DebugInfoFlags", "name" : "'Flags'" },
{ "kind" : "PairIdRefIdRef", "name" : "'Value, Name, Value, Name, ...'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeComposite",
"opcode" : 10,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "DebugCompositeType", "name" : "'Tag'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Linkage Name'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "DebugInfoFlags", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Members'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeMember",
"opcode" : 11,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Offset'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "DebugInfoFlags", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" }
]
},
{
"opname" : "DebugTypeInheritance",
"opcode" : 12,
"operands" : [
{ "kind" : "IdRef", "name" : "'Child'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Offset'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "DebugInfoFlags", "name" : "'Flags'" }
]
},
{
"opname" : "DebugTypePtrToMember",
"opcode" : 13,
"operands" : [
{ "kind" : "IdRef", "name" : "'Member Type'" },
{ "kind" : "IdRef", "name" : "'Parent'" }
]
},
{
"opname" : "DebugTypeTemplate",
"opcode" : 14,
"operands" : [
{ "kind" : "IdRef", "name" : "'Target'" },
{ "kind" : "IdRef", "name" : "'Parameters'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeTemplateParameter",
"opcode" : 15,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Actual Type'" },
{ "kind" : "IdRef", "name" : "'Value'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" }
]
},
{
"opname" : "DebugTypeTemplateTemplateParameter",
"opcode" : 16,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Template Name'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" }
]
},
{
"opname" : "DebugTypeTemplateParameterPack",
"opcode" : 17,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Template Parameters'", "quantifier" : "*" }
]
},
{
"opname" : "DebugGlobalVariable",
"opcode" : 18,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Linkage Name'" },
{ "kind" : "IdRef", "name" : "'Variable'" },
{ "kind" : "DebugInfoFlags", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Static Member Declaration'", "quantifier" : "?" }
]
},
{
"opname" : "DebugFunctionDeclaration",
"opcode" : 19,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Linkage Name'" },
{ "kind" : "DebugInfoFlags", "name" : "'Flags'" }
]
},
{
"opname" : "DebugFunction",
"opcode" : 20,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Linkage Name'" },
{ "kind" : "DebugInfoFlags", "name" : "'Flags'" },
{ "kind" : "LiteralInteger", "name" : "'Scope Line'" },
{ "kind" : "IdRef", "name" : "'Function'" },
{ "kind" : "IdRef", "name" : "'Declaration'", "quantifier" : "?" }
]
},
{
"opname" : "DebugLexicalBlock",
"opcode" : 21,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Name'", "quantifier" : "?" }
]
},
{
"opname" : "DebugLexicalBlockDiscriminator",
"opcode" : 22,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Discriminator'" },
{ "kind" : "IdRef", "name" : "'Parent'" }
]
},
{
"opname" : "DebugScope",
"opcode" : 23,
"operands" : [
{ "kind" : "IdRef", "name" : "'Scope'" },
{ "kind" : "IdRef", "name" : "'Inlined At'", "quantifier" : "?" }
]
},
{
"opname" : "DebugNoScope",
"opcode" : 24
},
{
"opname" : "DebugInlinedAt",
"opcode" : 25,
"operands" : [
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Scope'" },
{ "kind" : "IdRef", "name" : "'Inlined'", "quantifier" : "?" }
]
},
{
"opname" : "DebugLocalVariable",
"opcode" : 26,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "DebugInfoFlags", "name" : "'Flags'" },
{ "kind" : "LiteralInteger", "name" : "'Arg Number'", "quantifier" : "?" }
]
},
{
"opname" : "DebugInlinedVariable",
"opcode" : 27,
"operands" : [
{ "kind" : "IdRef", "name" : "'Variable'" },
{ "kind" : "IdRef", "name" : "'Inlined'" }
]
},
{
"opname" : "DebugDeclare",
"opcode" : 28,
"operands" : [
{ "kind" : "IdRef", "name" : "'Local Variable'" },
{ "kind" : "IdRef", "name" : "'Variable'" },
{ "kind" : "IdRef", "name" : "'Expression'" }
]
},
{
"opname" : "DebugValue",
"opcode" : 29,
"operands" : [
{ "kind" : "IdRef", "name" : "'Local Variable'" },
{ "kind" : "IdRef", "name" : "'Value'" },
{ "kind" : "IdRef", "name" : "'Expression'" },
{ "kind" : "IdRef", "name" : "'Indexes'", "quantifier" : "*" }
]
},
{
"opname" : "DebugOperation",
"opcode" : 30,
"operands" : [
{ "kind" : "DebugOperation", "name" : "'OpCode'" },
{ "kind" : "LiteralInteger", "name" : "'Operands ...'", "quantifier" : "*" }
]
},
{
"opname" : "DebugExpression",
"opcode" : 31,
"operands" : [
{ "kind" : "IdRef", "name" : "'Operands ...'", "quantifier" : "*" }
]
},
{
"opname" : "DebugMacroDef",
"opcode" : 32,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" }
]
},
{
"opname" : "DebugMacroUndef",
"opcode" : 33,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Macro'" }
]
},
{
"opname" : "DebugImportedEntity",
"opcode" : 34,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "DebugImportedEntity", "name" : "'Tag'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Entity'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "LiteralInteger", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" }
]
},
{
"opname" : "DebugSource",
"opcode" : 35,
"operands" : [
{ "kind" : "IdRef", "name" : "'File'" },
{ "kind" : "IdRef", "name" : "'Text'", "quantifier" : "?" }
]
},
{
"opname" : "DebugModuleINTEL",
"opcode" : 36,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "LiteralInteger", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'ConfigurationMacros'" },
{ "kind" : "IdRef", "name" : "'IncludePath'" },
{ "kind" : "IdRef", "name" : "'APINotesFile'" },
{ "kind" : "LiteralInteger", "name" : "'IsDeclaration'" }
],
"capability" : "DebugInfoModuleINTEL"
}
],
"operand_kinds" : [
{
"category" : "BitEnum",
"kind" : "DebugInfoFlags",
"enumerants" : [
{
"enumerant" : "None",
"value" : "0x0000"
},
{
"enumerant" : "FlagIsProtected",
"value" : "0x01"
},
{
"enumerant" : "FlagIsPrivate",
"value" : "0x02"
},
{
"enumerant" : "FlagIsPublic",
"value" : "0x03"
},
{
"enumerant" : "FlagIsLocal",
"value" : "0x04"
},
{
"enumerant" : "FlagIsDefinition",
"value" : "0x08"
},
{
"enumerant" : "FlagFwdDecl",
"value" : "0x10"
},
{
"enumerant" : "FlagArtificial",
"value" : "0x20"
},
{
"enumerant" : "FlagExplicit",
"value" : "0x40"
},
{
"enumerant" : "FlagPrototyped",
"value" : "0x80"
},
{
"enumerant" : "FlagObjectPointer",
"value" : "0x100"
},
{
"enumerant" : "FlagStaticMember",
"value" : "0x200"
},
{
"enumerant" : "FlagIndirectVariable",
"value" : "0x400"
},
{
"enumerant" : "FlagLValueReference",
"value" : "0x800"
},
{
"enumerant" : "FlagRValueReference",
"value" : "0x1000"
},
{
"enumerant" : "FlagIsOptimized",
"value" : "0x2000"
},
{
"enumerant" : "FlagIsEnumClass",
"value" : "0x4000"
},
{
"enumerant" : "FlagTypePassByValue",
"value" : "0x8000"
},
{
"enumerant" : "FlagTypePassByReference",
"value" : "0x10000"
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugBaseTypeAttributeEncoding",
"enumerants" : [
{
"enumerant" : "Unspecified",
"value" : "0"
},
{
"enumerant" : "Address",
"value" : "1"
},
{
"enumerant" : "Boolean",
"value" : "2"
},
{
"enumerant" : "Float",
"value" : "3"
},
{
"enumerant" : "Signed",
"value" : "4"
},
{
"enumerant" : "SignedChar",
"value" : "5"
},
{
"enumerant" : "Unsigned",
"value" : "6"
},
{
"enumerant" : "UnsignedChar",
"value" : "7"
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugCompositeType",
"enumerants" : [
{
"enumerant" : "Class",
"value" : "0"
},
{
"enumerant" : "Structure",
"value" : "1"
},
{
"enumerant" : "Union",
"value" : "2"
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugTypeQualifier",
"enumerants" : [
{
"enumerant" : "ConstType",
"value" : "0"
},
{
"enumerant" : "VolatileType",
"value" : "1"
},
{
"enumerant" : "RestrictType",
"value" : "2"
},
{
"enumerant" : "AtomicType",
"value" : "3"
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugOperation",
"enumerants" : [
{
"enumerant" : "Deref",
"value" : "0"
},
{
"enumerant" : "Plus",
"value" : "1"
},
{
"enumerant" : "Minus",
"value" : "2"
},
{
"enumerant" : "PlusUconst",
"value" : "3",
"parameters" : [
{ "kind" : "LiteralInteger" }
]
},
{
"enumerant" : "BitPiece",
"value" : "4",
"parameters" : [
{ "kind" : "LiteralInteger" },
{ "kind" : "LiteralInteger" }
]
},
{
"enumerant" : "Swap",
"value" : "5"
},
{
"enumerant" : "Xderef",
"value" : "6"
},
{
"enumerant" : "StackValue",
"value" : "7"
},
{
"enumerant" : "Constu",
"value" : "8",
"parameters" : [
{ "kind" : "LiteralInteger" }
]
},
{
"enumerant" : "Fragment",
"value" : "9",
"parameters" : [
{ "kind" : "LiteralInteger" },
{ "kind" : "LiteralInteger" }
]
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugImportedEntity",
"enumerants" : [
{
"enumerant" : "ImportedModule",
"value" : "0"
},
{
"enumerant" : "ImportedDeclaration",
"value" : "1"
}
]
}
]
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,26 @@
{
"revision" : 2,
"instructions" : [
{
"opname" : "CubeFaceIndexAMD",
"opcode" : 1,
"operands" : [
{ "kind" : "IdRef", "name" : "'P'" }
],
"extensions" : [ "SPV_AMD_gcn_shader" ]
},
{
"opname" : "CubeFaceCoordAMD",
"opcode" : 2,
"operands" : [
{ "kind" : "IdRef", "name" : "'P'" }
],
"extensions" : [ "SPV_AMD_gcn_shader" ]
},
{
"opname" : "TimeAMD",
"opcode" : 3,
"extensions" : [ "SPV_AMD_gcn_shader" ]
}
]
}

View File

@ -0,0 +1,41 @@
{
"revision" : 5,
"instructions" : [
{
"opname" : "SwizzleInvocationsAMD",
"opcode" : 1,
"operands" : [
{ "kind" : "IdRef", "name" : "'data'" },
{ "kind" : "IdRef", "name" : "'offset'" }
],
"extensions" : [ "SPV_AMD_shader_ballot" ]
},
{
"opname" : "SwizzleInvocationsMaskedAMD",
"opcode" : 2,
"operands" : [
{ "kind" : "IdRef", "name" : "'data'" },
{ "kind" : "IdRef", "name" : "'mask'" }
],
"extensions" : [ "SPV_AMD_shader_ballot" ]
},
{
"opname" : "WriteInvocationAMD",
"opcode" : 3,
"operands" : [
{ "kind" : "IdRef", "name" : "'inputValue'" },
{ "kind" : "IdRef", "name" : "'writeValue'" },
{ "kind" : "IdRef", "name" : "'invocationIndex'" }
],
"extensions" : [ "SPV_AMD_shader_ballot" ]
},
{
"opname" : "MbcntAMD",
"opcode" : 4,
"operands" : [
{ "kind" : "IdRef", "name" : "'mask'" }
],
"extensions" : [ "SPV_AMD_shader_ballot" ]
}
]
}

View File

@ -0,0 +1,14 @@
{
"revision" : 4,
"instructions" : [
{
"opname" : "InterpolateAtVertexAMD",
"opcode" : 1,
"operands" : [
{ "kind" : "IdRef", "name" : "'interpolant'" },
{ "kind" : "IdRef", "name" : "'vertexIdx'" }
],
"extensions" : [ "SPV_AMD_shader_explicit_vertex_parameter" ]
}
]
}

View File

@ -0,0 +1,95 @@
{
"revision" : 4,
"instructions" : [
{
"opname" : "FMin3AMD",
"opcode" : 1,
"operands" : [
{ "kind" : "IdRef", "name" : "'x'" },
{ "kind" : "IdRef", "name" : "'y'" },
{ "kind" : "IdRef", "name" : "'z'" }
],
"extensions" : [ "SPV_AMD_shader_trinary_minmax" ]
},
{
"opname" : "UMin3AMD",
"opcode" : 2,
"operands" : [
{ "kind" : "IdRef", "name" : "'x'" },
{ "kind" : "IdRef", "name" : "'y'" },
{ "kind" : "IdRef", "name" : "'z'" }
],
"extensions" : [ "SPV_AMD_shader_trinary_minmax" ]
},
{
"opname" : "SMin3AMD",
"opcode" : 3,
"operands" : [
{ "kind" : "IdRef", "name" : "'x'" },
{ "kind" : "IdRef", "name" : "'y'" },
{ "kind" : "IdRef", "name" : "'z'" }
],
"extensions" : [ "SPV_AMD_shader_trinary_minmax" ]
},
{
"opname" : "FMax3AMD",
"opcode" : 4,
"operands" : [
{ "kind" : "IdRef", "name" : "'x'" },
{ "kind" : "IdRef", "name" : "'y'" },
{ "kind" : "IdRef", "name" : "'z'" }
],
"extensions" : [ "SPV_AMD_shader_trinary_minmax" ]
},
{
"opname" : "UMax3AMD",
"opcode" : 5,
"operands" : [
{ "kind" : "IdRef", "name" : "'x'" },
{ "kind" : "IdRef", "name" : "'y'" },
{ "kind" : "IdRef", "name" : "'z'" }
],
"extensions" : [ "SPV_AMD_shader_trinary_minmax" ]
},
{
"opname" : "SMax3AMD",
"opcode" : 6,
"operands" : [
{ "kind" : "IdRef", "name" : "'x'" },
{ "kind" : "IdRef", "name" : "'y'" },
{ "kind" : "IdRef", "name" : "'z'" }
],
"extensions" : [ "SPV_AMD_shader_trinary_minmax" ]
},
{
"opname" : "FMid3AMD",
"opcode" : 7,
"operands" : [
{ "kind" : "IdRef", "name" : "'x'" },
{ "kind" : "IdRef", "name" : "'y'" },
{ "kind" : "IdRef", "name" : "'z'" }
],
"extensions" : [ "SPV_AMD_shader_trinary_minmax" ]
},
{
"opname" : "UMid3AMD",
"opcode" : 8,
"operands" : [
{ "kind" : "IdRef", "name" : "'x'" },
{ "kind" : "IdRef", "name" : "'y'" },
{ "kind" : "IdRef", "name" : "'z'" }
],
"extensions" : [ "SPV_AMD_shader_trinary_minmax" ]
},
{
"opname" : "SMid3AMD",
"opcode" : 9,
"operands" : [
{ "kind" : "IdRef", "name" : "'x'" },
{ "kind" : "IdRef", "name" : "'y'" },
{ "kind" : "IdRef", "name" : "'z'" }
],
"extensions" : [ "SPV_AMD_shader_trinary_minmax" ]
}
]
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1814
include/spirv/unified1/spv.d Normal file

File diff suppressed because it is too large Load Diff

View File

@ -31,14 +31,14 @@ cd external && cd googletest && git reset --hard 1fb1bb23bb8418dc73a5a9a82bbed31
git clone --depth=1 https://github.com/google/effcee external/effcee
git clone --depth=1 https://github.com/google/re2 external/re2
# Get bazel 5.0.0
gsutil cp gs://bazel/5.0.0/release/bazel-5.0.0-darwin-x86_64 .
chmod +x bazel-5.0.0-darwin-x86_64
# Get bazel 0.29.1.
gsutil cp gs://bazel/0.29.1/release/bazel-0.29.1-darwin-x86_64 .
chmod +x bazel-0.29.1-darwin-x86_64
echo $(date): Build everything...
./bazel-5.0.0-darwin-x86_64 build :all
./bazel-0.29.1-darwin-x86_64 build :all
echo $(date): Build completed.
echo $(date): Starting bazel test...
./bazel-5.0.0-darwin-x86_64 test :all
./bazel-0.29.1-darwin-x86_64 test :all
echo $(date): Bazel test completed.

View File

@ -58,7 +58,7 @@ if [ $TOOL = "cmake" ]; then
using ninja-1.10.0
# Possible configurations are:
# ASAN, UBSAN, COVERAGE, RELEASE, DEBUG, DEBUG_EXCEPTION, RELEASE_MINGW
# ASAN, COVERAGE, RELEASE, DEBUG, DEBUG_EXCEPTION, RELEASE_MINGW
BUILD_TYPE="Debug"
if [ $CONFIG = "RELEASE" ] || [ $CONFIG = "RELEASE_MINGW" ]; then
BUILD_TYPE="RelWithDebInfo"
@ -69,13 +69,6 @@ if [ $TOOL = "cmake" ]; then
if [ $CONFIG = "ASAN" ]; then
ADDITIONAL_CMAKE_FLAGS="-DSPIRV_USE_SANITIZER=address,bounds,null"
[ $COMPILER = "clang" ] || { echo "$CONFIG requires clang"; exit 1; }
elif [ $CONFIG = "UBSAN" ]; then
# UBSan requires RTTI, and by default UBSan does not exit when errors are
# encountered - additional compiler options are required to force this.
# The -DSPIRV_USE_SANITIZER=undefined option instructs SPIR-V Tools to be
# built with UBSan enabled.
ADDITIONAL_CMAKE_FLAGS="-DSPIRV_USE_SANITIZER=undefined -DENABLE_RTTI=ON -DCMAKE_C_FLAGS=-fno-sanitize-recover=all -DCMAKE_CXX_FLAGS=-fno-sanitize-recover=all"
[ $COMPILER = "clang" ] || { echo "$CONFIG requires clang"; exit 1; }
elif [ $CONFIG = "COVERAGE" ]; then
ADDITIONAL_CMAKE_FLAGS="-DENABLE_CODE_COVERAGE=ON"
SKIP_TESTS="True"
@ -195,7 +188,7 @@ elif [ $TOOL = "android-ndk-build" ]; then
echo $(date): ndk-build completed.
elif [ $TOOL = "bazel" ]; then
using bazel-5.0.0
using bazel-3.1.0
echo $(date): Build everything...
bazel build :all

View File

@ -26,9 +26,7 @@ COMPILER=$2
TOOL=$3
BUILD_SHA=${KOKORO_GITHUB_COMMIT:-$KOKORO_GITHUB_PULL_REQUEST_COMMIT}
# "--privileged" is required to run ptrace in the asan builds.
docker run --rm -i \
--privileged \
--volume "${ROOT_DIR}:${ROOT_DIR}" \
--volume "${KOKORO_ARTIFACTS_DIR}:${KOKORO_ARTIFACTS_DIR}" \
--workdir "${ROOT_DIR}" \

View File

@ -22,7 +22,7 @@ set BUILD_TYPE=%1
set VS_VERSION=%2
:: Force usage of python 3.6
set PATH=C:\python36;"C:\Program Files\cmake-3.23.1-windows-x86_64\bin";%PATH%
set PATH=C:\python36;"C:\Program Files\CMake\bin";%PATH%
cd %SRC%
git clone --depth=1 https://github.com/KhronosGroup/SPIRV-Headers external/spirv-headers

View File

@ -30,13 +30,14 @@ git clone --depth=1 https://github.com/google/effcee external/effce
git clone --depth=1 https://github.com/google/re2 external/re2
:: REM Install Bazel.
wget -q https://github.com/bazelbuild/bazel/releases/download/5.0.0/bazel-5.0.0-windows-x86_64.zip
unzip -q bazel-5.0.0-windows-x86_64.zip
wget -q https://github.com/bazelbuild/bazel/releases/download/0.29.1/bazel-0.29.1-windows-x86_64.zip
unzip -q bazel-0.29.1-windows-x86_64.zip
:: Set up MSVC
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
set BAZEL_VS=C:\Program Files (x86)\Microsoft Visual Studio 14.0
set BAZEL_VC=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
set BAZEL_SH=c:\tools\msys64\usr\bin\bash.exe
set BAZEL_PYTHON=c:\tools\python2\python.exe
:: #########################################

View File

@ -20,7 +20,10 @@ set(LANG_HEADER_PROCESSING_SCRIPT "${spirv-tools_SOURCE_DIR}/utils/generate_lang
# Pull in grammar files that have migrated to SPIRV-Headers
set(DEBUGINFO_GRAMMAR_JSON_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/unified1/extinst.debuginfo.grammar.json")
set(CLDEBUGINFO100_GRAMMAR_JSON_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/unified1/extinst.opencl.debuginfo.100.grammar.json")
set(VKDEBUGINFO100_GRAMMAR_JSON_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/unified1/extinst.nonsemantic.shader.debuginfo.100.grammar.json")
# For now, assume the NonSemantic.Vulkan.DebugInfo grammar file is in the current directory.
# It will later migrate to SPIRV-Headers.
set(VKDEBUGINFO100_GRAMMAR_JSON_FILE "${CMAKE_CURRENT_SOURCE_DIR}/extinst.nonsemantic.vulkan.debuginfo.100.grammar.json")
# macro() definitions are used in the following because we need to append .inc
# file paths into some global lists (*_CPP_DEPENDS). And those global lists are
@ -151,11 +154,11 @@ spvtools_vendor_tables("spv-amd-gcn-shader" "spv-amd-gs" "")
spvtools_vendor_tables("spv-amd-shader-ballot" "spv-amd-sb" "")
spvtools_vendor_tables("debuginfo" "debuginfo" "")
spvtools_vendor_tables("opencl.debuginfo.100" "cldi100" "CLDEBUG100_")
spvtools_vendor_tables("nonsemantic.shader.debuginfo.100" "shdi100" "SHDEBUG100_")
spvtools_vendor_tables("nonsemantic.vulkan.debuginfo.100" "vkdi100" "VKDEBUG100_")
spvtools_vendor_tables("nonsemantic.clspvreflection" "clspvreflection" "")
spvtools_extinst_lang_headers("DebugInfo" ${DEBUGINFO_GRAMMAR_JSON_FILE})
spvtools_extinst_lang_headers("OpenCLDebugInfo100" ${CLDEBUGINFO100_GRAMMAR_JSON_FILE})
spvtools_extinst_lang_headers("NonSemanticShaderDebugInfo100" ${VKDEBUGINFO100_GRAMMAR_JSON_FILE})
spvtools_extinst_lang_headers("NonSemanticVulkanDebugInfo100" ${VKDEBUGINFO100_GRAMMAR_JSON_FILE})
spvtools_vimsyntax("unified1" "1.0")
add_custom_target(spirv-tools-vimsyntax DEPENDS ${VIMSYNTAX_FILE})
@ -197,7 +200,7 @@ set(SPIRV_TOOLS_CHANGES_FILE
add_custom_command(OUTPUT ${SPIRV_TOOLS_BUILD_VERSION_INC}
COMMAND ${PYTHON_EXECUTABLE}
${SPIRV_TOOLS_BUILD_VERSION_INC_GENERATOR}
${SPIRV_TOOLS_CHANGES_FILE} ${SPIRV_TOOLS_BUILD_VERSION_INC}
${spirv-tools_SOURCE_DIR} ${SPIRV_TOOLS_BUILD_VERSION_INC}
DEPENDS ${SPIRV_TOOLS_BUILD_VERSION_INC_GENERATOR}
${SPIRV_TOOLS_CHANGES_FILE}
COMMENT "Update build-version.inc in the SPIRV-Tools build directory (if necessary).")
@ -217,18 +220,15 @@ add_subdirectory(reduce)
add_subdirectory(fuzz)
add_subdirectory(link)
add_subdirectory(lint)
add_subdirectory(diff)
set(SPIRV_SOURCES
${spirv-tools_SOURCE_DIR}/include/spirv-tools/libspirv.h
${CMAKE_CURRENT_SOURCE_DIR}/util/bitutils.h
${CMAKE_CURRENT_SOURCE_DIR}/util/bit_vector.h
${CMAKE_CURRENT_SOURCE_DIR}/util/hash_combine.h
${CMAKE_CURRENT_SOURCE_DIR}/util/hex_float.h
${CMAKE_CURRENT_SOURCE_DIR}/util/make_unique.h
${CMAKE_CURRENT_SOURCE_DIR}/util/parse_number.h
${CMAKE_CURRENT_SOURCE_DIR}/util/pooled_linked_list.h
${CMAKE_CURRENT_SOURCE_DIR}/util/small_vector.h
${CMAKE_CURRENT_SOURCE_DIR}/util/string_utils.h
${CMAKE_CURRENT_SOURCE_DIR}/util/timer.h
@ -407,7 +407,7 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
find_library(LIBRT rt)
if(LIBRT)
foreach(target ${SPIRV_TOOLS_TARGETS})
target_link_libraries(${target} rt)
target_link_libraries(${target} ${LIBRT})
endforeach()
endif()
endif()
@ -431,10 +431,8 @@ if(ENABLE_SPIRV_TOOLS_INSTALL)
# Special config file for root library compared to other libs.
file(WRITE ${CMAKE_BINARY_DIR}/${SPIRV_TOOLS}Config.cmake
"include(\${CMAKE_CURRENT_LIST_DIR}/${SPIRV_TOOLS}Target.cmake)\n"
"if(TARGET ${SPIRV_TOOLS})\n"
" set(${SPIRV_TOOLS}_LIBRARIES ${SPIRV_TOOLS})\n"
" get_target_property(${SPIRV_TOOLS}_INCLUDE_DIRS ${SPIRV_TOOLS} INTERFACE_INCLUDE_DIRECTORIES)\n"
"endif()\n")
"set(${SPIRV_TOOLS}_LIBRARIES ${SPIRV_TOOLS})\n"
"get_target_property(${SPIRV_TOOLS}_INCLUDE_DIRS ${SPIRV_TOOLS} INTERFACE_INCLUDE_DIRECTORIES)\n")
install(FILES ${CMAKE_BINARY_DIR}/${SPIRV_TOOLS}Config.cmake DESTINATION ${PACKAGE_DIR})
endif(ENABLE_SPIRV_TOOLS_INSTALL)

View File

@ -62,9 +62,9 @@ spv_result_t spvTextParseMaskOperand(spv_target_env env,
end = std::find(begin, text_end, separator);
spv_operand_desc entry = nullptr;
if (auto error = spvOperandTableNameLookup(env, operandTable, type, begin,
end - begin, &entry)) {
return error;
if (spvOperandTableNameLookup(env, operandTable, type, begin, end - begin,
&entry)) {
return SPV_ERROR_INVALID_TEXT;
}
value |= entry->value;

View File

@ -33,7 +33,6 @@
#include "source/operand.h"
#include "source/spirv_constant.h"
#include "source/spirv_endian.h"
#include "source/util/string_utils.h"
spv_result_t spvBinaryHeaderGet(const spv_const_binary binary,
const spv_endianness_t endian,
@ -63,15 +62,6 @@ spv_result_t spvBinaryHeaderGet(const spv_const_binary binary,
return SPV_SUCCESS;
}
std::string spvDecodeLiteralStringOperand(const spv_parsed_instruction_t& inst,
const uint16_t operand_index) {
assert(operand_index < inst.num_operands);
const spv_parsed_operand_t& operand = inst.operands[operand_index];
return spvtools::utils::MakeString(inst.words + operand.offset,
operand.num_words);
}
namespace {
// A SPIR-V binary parser. A parser instance communicates detailed parse
@ -215,7 +205,7 @@ class Parser {
size_t word_index; // The current position in words.
size_t instruction_count; // The count of processed instructions
spv_endianness_t endian; // The endianness of the binary.
// Is the SPIR-V binary in a different endianness from the host native
// Is the SPIR-V binary in a different endiannes from the host native
// endianness?
bool requires_endian_conversion;
@ -300,7 +290,7 @@ spv_result_t Parser::parseInstruction() {
const uint32_t first_word = peek();
// If the module's endianness is different from the host native endianness,
// then converted_words contains the endian-translated words in the
// then converted_words contains the the endian-translated words in the
// instruction.
_.endian_converted_words.clear();
_.endian_converted_words.push_back(first_word);
@ -517,8 +507,7 @@ spv_result_t Parser::parseOperand(size_t inst_offset,
case SPV_OPERAND_TYPE_SPEC_CONSTANT_OP_NUMBER: {
assert(SpvOpSpecConstantOp == opcode);
if (word > static_cast<uint32_t>(SpvOp::SpvOpMax) ||
grammar_.lookupSpecConstantOpcode(SpvOp(word))) {
if (grammar_.lookupSpecConstantOpcode(SpvOp(word))) {
return diagnostic()
<< "Invalid " << spvOperandTypeStr(type) << ": " << word;
}
@ -587,18 +576,27 @@ spv_result_t Parser::parseOperand(size_t inst_offset,
case SPV_OPERAND_TYPE_LITERAL_STRING:
case SPV_OPERAND_TYPE_OPTIONAL_LITERAL_STRING: {
const size_t max_words = _.num_words - _.word_index;
std::string string =
spvtools::utils::MakeString(_.words + _.word_index, max_words, false);
if (string.length() == max_words * 4)
convert_operand_endianness = false;
const char* string =
reinterpret_cast<const char*>(_.words + _.word_index);
// Compute the length of the string, but make sure we don't run off the
// end of the input.
const size_t remaining_input_bytes =
sizeof(uint32_t) * (_.num_words - _.word_index);
const size_t string_num_content_bytes =
spv_strnlen_s(string, remaining_input_bytes);
// If there was no terminating null byte, then that's an end-of-input
// error.
if (string_num_content_bytes == remaining_input_bytes)
return exhaustedInputDiagnostic(inst_offset, opcode, type);
// Account for null in the word length, so add 1 for null, then add 3 to
// make sure we round up. The following is equivalent to:
// (string_num_content_bytes + 1 + 3) / 4
const size_t string_num_words = string_num_content_bytes / 4 + 1;
// Make sure we can record the word count without overflow.
//
// This error can't currently be triggered because of validity
// checks elsewhere.
const size_t string_num_words = string.length() / 4 + 1;
if (string_num_words > std::numeric_limits<uint16_t>::max()) {
return diagnostic() << "Literal string is longer than "
<< std::numeric_limits<uint16_t>::max()
@ -612,7 +610,7 @@ spv_result_t Parser::parseOperand(size_t inst_offset,
// There is only one string literal argument to OpExtInstImport,
// so it's sufficient to guard this just on the opcode.
const spv_ext_inst_type_t ext_inst_type =
spvExtInstImportTypeGet(string.c_str());
spvExtInstImportTypeGet(string);
if (SPV_EXT_INST_TYPE_NONE == ext_inst_type) {
return diagnostic()
<< "Invalid extended instruction import '" << string << "'";

View File

@ -15,8 +15,6 @@
#ifndef SOURCE_BINARY_H_
#define SOURCE_BINARY_H_
#include <string>
#include "source/spirv_definition.h"
#include "spirv-tools/libspirv.h"
@ -35,9 +33,4 @@ spv_result_t spvBinaryHeaderGet(const spv_const_binary binary,
// replacement for C11's strnlen_s which might not exist in all environments.
size_t spv_strnlen_s(const char* str, size_t strsz);
// Decode the string literal operand with index operand_index from instruction
// inst.
std::string spvDecodeLiteralStringOperand(const spv_parsed_instruction_t& inst,
const uint16_t operand_index);
#endif // SOURCE_BINARY_H_

View File

@ -42,7 +42,7 @@ class CFA {
/// Returns true if a block with @p id is found in the @p work_list vector
///
/// @param[in] work_list Set of blocks visited in the depth first
/// @param[in] work_list Set of blocks visited in the the depth first
/// traversal
/// of the CFG
/// @param[in] id The ID of the block being checked

View File

@ -18,8 +18,8 @@
#define SOURCE_COMMON_DEBUG_INFO_HEADER_H_
// This enum defines the known common set of instructions that are the same
// between OpenCL.DebugInfo.100 and NonSemantic.Shader.DebugInfo.100.
// Note that NonSemantic.Shader.* instructions can still have slightly
// between OpenCL.DebugInfo.100 and NonSemantic.Vulkan.DebugInfo.100.
// note that NonSemantic.DebugInfo.100 instructions can still have slightly
// different encoding, as it does not use literals anywhere and only constants.
enum CommonDebugInfoInstructions {
CommonDebugInfoDebugInfoNone = 0,

View File

@ -17,8 +17,6 @@
// This file contains a disassembler: It converts a SPIR-V binary
// to text.
#include "source/disassemble.h"
#include <algorithm>
#include <cassert>
#include <cstring>
@ -30,7 +28,9 @@
#include "source/assembly_grammar.h"
#include "source/binary.h"
#include "source/diagnostic.h"
#include "source/disassemble.h"
#include "source/ext_inst.h"
#include "source/name_mapper.h"
#include "source/opcode.h"
#include "source/parsed_operand.h"
#include "source/print.h"
@ -40,21 +40,29 @@
#include "source/util/make_unique.h"
#include "spirv-tools/libspirv.h"
namespace spvtools {
namespace {
// A Disassembler instance converts a SPIR-V binary to its assembly
// representation.
class Disassembler {
public:
Disassembler(const AssemblyGrammar& grammar, uint32_t options,
NameMapper name_mapper)
: print_(spvIsInBitfield(SPV_BINARY_TO_TEXT_OPTION_PRINT, options)),
Disassembler(const spvtools::AssemblyGrammar& grammar, uint32_t options,
spvtools::NameMapper name_mapper)
: grammar_(grammar),
print_(spvIsInBitfield(SPV_BINARY_TO_TEXT_OPTION_PRINT, options)),
color_(spvIsInBitfield(SPV_BINARY_TO_TEXT_OPTION_COLOR, options)),
indent_(spvIsInBitfield(SPV_BINARY_TO_TEXT_OPTION_INDENT, options)
? kStandardIndent
: 0),
comment_(spvIsInBitfield(SPV_BINARY_TO_TEXT_OPTION_COMMENT, options)),
text_(),
out_(print_ ? out_stream() : out_stream(text_)),
instruction_disassembler_(grammar, out_.get(), options, name_mapper),
stream_(out_.get()),
header_(!spvIsInBitfield(SPV_BINARY_TO_TEXT_OPTION_NO_HEADER, options)),
byte_offset_(0) {}
show_byte_offset_(spvIsInBitfield(
SPV_BINARY_TO_TEXT_OPTION_SHOW_BYTE_OFFSET, options)),
byte_offset_(0),
name_mapper_(std::move(name_mapper)) {}
// Emits the assembly header for the module, and sets up internal state
// so subsequent callbacks can handle the cases where the entire module
@ -70,13 +78,56 @@ class Disassembler {
spv_result_t SaveTextResult(spv_text* text_result) const;
private:
enum { kStandardIndent = 15 };
using out_stream = spvtools::out_stream;
// Emits an operand for the given instruction, where the instruction
// is at offset words from the start of the binary.
void EmitOperand(const spv_parsed_instruction_t& inst,
const uint16_t operand_index);
// Emits a mask expression for the given mask word of the specified type.
void EmitMaskOperand(const spv_operand_type_t type, const uint32_t word);
// Resets the output color, if color is turned on.
void ResetColor() {
if (color_) out_.get() << spvtools::clr::reset{print_};
}
// Sets the output to grey, if color is turned on.
void SetGrey() {
if (color_) out_.get() << spvtools::clr::grey{print_};
}
// Sets the output to blue, if color is turned on.
void SetBlue() {
if (color_) out_.get() << spvtools::clr::blue{print_};
}
// Sets the output to yellow, if color is turned on.
void SetYellow() {
if (color_) out_.get() << spvtools::clr::yellow{print_};
}
// Sets the output to red, if color is turned on.
void SetRed() {
if (color_) out_.get() << spvtools::clr::red{print_};
}
// Sets the output to green, if color is turned on.
void SetGreen() {
if (color_) out_.get() << spvtools::clr::green{print_};
}
const spvtools::AssemblyGrammar& grammar_;
const bool print_; // Should we also print to the standard output stream?
const bool color_; // Should we print in colour?
const int indent_; // How much to indent. 0 means don't indent
const int comment_; // Should we comment the source
spv_endianness_t endian_; // The detected endianness of the binary.
std::stringstream text_; // Captures the text, if not printing.
out_stream out_; // The Output stream. Either to text_ or standard output.
disassemble::InstructionDisassembler instruction_disassembler_;
const bool header_; // Should we output header as the leading comment?
size_t byte_offset_; // The number of bytes processed so far.
std::ostream& stream_; // The output std::stream.
const bool header_; // Should we output header as the leading comment?
const bool show_byte_offset_; // Should we print byte offset, in hex?
size_t byte_offset_; // The number of bytes processed so far.
spvtools::NameMapper name_mapper_;
bool inserted_decoration_space_ = false;
bool inserted_debug_space_ = false;
bool inserted_type_space_ = false;
@ -88,11 +139,21 @@ spv_result_t Disassembler::HandleHeader(spv_endianness_t endian,
endian_ = endian;
if (header_) {
instruction_disassembler_.EmitHeaderSpirv();
instruction_disassembler_.EmitHeaderVersion(version);
instruction_disassembler_.EmitHeaderGenerator(generator);
instruction_disassembler_.EmitHeaderIdBound(id_bound);
instruction_disassembler_.EmitHeaderSchema(schema);
const char* generator_tool =
spvGeneratorStr(SPV_GENERATOR_TOOL_PART(generator));
stream_ << "; SPIR-V\n"
<< "; Version: " << SPV_SPIRV_VERSION_MAJOR_PART(version) << "."
<< SPV_SPIRV_VERSION_MINOR_PART(version) << "\n"
<< "; Generator: " << generator_tool;
// For unknown tools, print the numeric tool value.
if (0 == strcmp("Unknown", generator_tool)) {
stream_ << "(" << SPV_GENERATOR_TOOL_PART(generator) << ")";
}
// Print the miscellaneous part of the generator word on the same
// line as the tool name.
stream_ << "; " << SPV_GENERATOR_MISC_PART(generator) << "\n"
<< "; Bound: " << id_bound << "\n"
<< "; Schema: " << schema << "\n";
}
byte_offset_ = SPV_INDEX_INSTRUCTION * sizeof(uint32_t);
@ -102,17 +163,232 @@ spv_result_t Disassembler::HandleHeader(spv_endianness_t endian,
spv_result_t Disassembler::HandleInstruction(
const spv_parsed_instruction_t& inst) {
instruction_disassembler_.EmitSectionComment(inst, inserted_decoration_space_,
inserted_debug_space_,
inserted_type_space_);
auto opcode = static_cast<SpvOp>(inst.opcode);
if (comment_ && opcode == SpvOpFunction) {
stream_ << std::endl;
stream_ << std::string(indent_, ' ');
stream_ << "; Function " << name_mapper_(inst.result_id) << std::endl;
}
if (comment_ && !inserted_decoration_space_ &&
spvOpcodeIsDecoration(opcode)) {
inserted_decoration_space_ = true;
stream_ << std::endl;
stream_ << std::string(indent_, ' ');
stream_ << "; Annotations" << std::endl;
}
if (comment_ && !inserted_debug_space_ && spvOpcodeIsDebug(opcode)) {
inserted_debug_space_ = true;
stream_ << std::endl;
stream_ << std::string(indent_, ' ');
stream_ << "; Debug Information" << std::endl;
}
if (comment_ && !inserted_type_space_ && spvOpcodeGeneratesType(opcode)) {
inserted_type_space_ = true;
stream_ << std::endl;
stream_ << std::string(indent_, ' ');
stream_ << "; Types, variables and constants" << std::endl;
}
instruction_disassembler_.EmitInstruction(inst, byte_offset_);
if (inst.result_id) {
SetBlue();
const std::string id_name = name_mapper_(inst.result_id);
if (indent_)
stream_ << std::setw(std::max(0, indent_ - 3 - int(id_name.size())));
stream_ << "%" << id_name;
ResetColor();
stream_ << " = ";
} else {
stream_ << std::string(indent_, ' ');
}
stream_ << "Op" << spvOpcodeString(opcode);
for (uint16_t i = 0; i < inst.num_operands; i++) {
const spv_operand_type_t type = inst.operands[i].type;
assert(type != SPV_OPERAND_TYPE_NONE);
if (type == SPV_OPERAND_TYPE_RESULT_ID) continue;
stream_ << " ";
EmitOperand(inst, i);
}
if (comment_ && opcode == SpvOpName) {
const spv_parsed_operand_t& operand = inst.operands[0];
const uint32_t word = inst.words[operand.offset];
stream_ << " ; id %" << word;
}
if (show_byte_offset_) {
SetGrey();
auto saved_flags = stream_.flags();
auto saved_fill = stream_.fill();
stream_ << " ; 0x" << std::setw(8) << std::hex << std::setfill('0')
<< byte_offset_;
stream_.flags(saved_flags);
stream_.fill(saved_fill);
ResetColor();
}
byte_offset_ += inst.num_words * sizeof(uint32_t);
stream_ << "\n";
return SPV_SUCCESS;
}
void Disassembler::EmitOperand(const spv_parsed_instruction_t& inst,
const uint16_t operand_index) {
assert(operand_index < inst.num_operands);
const spv_parsed_operand_t& operand = inst.operands[operand_index];
const uint32_t word = inst.words[operand.offset];
switch (operand.type) {
case SPV_OPERAND_TYPE_RESULT_ID:
assert(false && "<result-id> is not supposed to be handled here");
SetBlue();
stream_ << "%" << name_mapper_(word);
break;
case SPV_OPERAND_TYPE_ID:
case SPV_OPERAND_TYPE_TYPE_ID:
case SPV_OPERAND_TYPE_SCOPE_ID:
case SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID:
SetYellow();
stream_ << "%" << name_mapper_(word);
break;
case SPV_OPERAND_TYPE_EXTENSION_INSTRUCTION_NUMBER: {
spv_ext_inst_desc ext_inst;
SetRed();
if (grammar_.lookupExtInst(inst.ext_inst_type, word, &ext_inst) ==
SPV_SUCCESS) {
stream_ << ext_inst->name;
} else {
if (!spvExtInstIsNonSemantic(inst.ext_inst_type)) {
assert(false && "should have caught this earlier");
} else {
// for non-semantic instruction sets we can just print the number
stream_ << word;
}
}
} break;
case SPV_OPERAND_TYPE_SPEC_CONSTANT_OP_NUMBER: {
spv_opcode_desc opcode_desc;
if (grammar_.lookupOpcode(SpvOp(word), &opcode_desc))
assert(false && "should have caught this earlier");
SetRed();
stream_ << opcode_desc->name;
} break;
case SPV_OPERAND_TYPE_LITERAL_INTEGER:
case SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER: {
SetRed();
spvtools::EmitNumericLiteral(&stream_, inst, operand);
ResetColor();
} break;
case SPV_OPERAND_TYPE_LITERAL_STRING: {
stream_ << "\"";
SetGreen();
// Strings are always little-endian, and null-terminated.
// Write out the characters, escaping as needed, and without copying
// the entire string.
auto c_str = reinterpret_cast<const char*>(inst.words + operand.offset);
for (auto p = c_str; *p; ++p) {
if (*p == '"' || *p == '\\') stream_ << '\\';
stream_ << *p;
}
ResetColor();
stream_ << '"';
} break;
case SPV_OPERAND_TYPE_CAPABILITY:
case SPV_OPERAND_TYPE_SOURCE_LANGUAGE:
case SPV_OPERAND_TYPE_EXECUTION_MODEL:
case SPV_OPERAND_TYPE_ADDRESSING_MODEL:
case SPV_OPERAND_TYPE_MEMORY_MODEL:
case SPV_OPERAND_TYPE_EXECUTION_MODE:
case SPV_OPERAND_TYPE_STORAGE_CLASS:
case SPV_OPERAND_TYPE_DIMENSIONALITY:
case SPV_OPERAND_TYPE_SAMPLER_ADDRESSING_MODE:
case SPV_OPERAND_TYPE_SAMPLER_FILTER_MODE:
case SPV_OPERAND_TYPE_SAMPLER_IMAGE_FORMAT:
case SPV_OPERAND_TYPE_FP_ROUNDING_MODE:
case SPV_OPERAND_TYPE_LINKAGE_TYPE:
case SPV_OPERAND_TYPE_ACCESS_QUALIFIER:
case SPV_OPERAND_TYPE_FUNCTION_PARAMETER_ATTRIBUTE:
case SPV_OPERAND_TYPE_DECORATION:
case SPV_OPERAND_TYPE_BUILT_IN:
case SPV_OPERAND_TYPE_GROUP_OPERATION:
case SPV_OPERAND_TYPE_KERNEL_ENQ_FLAGS:
case SPV_OPERAND_TYPE_KERNEL_PROFILING_INFO:
case SPV_OPERAND_TYPE_RAY_FLAGS:
case SPV_OPERAND_TYPE_RAY_QUERY_INTERSECTION:
case SPV_OPERAND_TYPE_RAY_QUERY_COMMITTED_INTERSECTION_TYPE:
case SPV_OPERAND_TYPE_RAY_QUERY_CANDIDATE_INTERSECTION_TYPE:
case SPV_OPERAND_TYPE_DEBUG_BASE_TYPE_ATTRIBUTE_ENCODING:
case SPV_OPERAND_TYPE_DEBUG_COMPOSITE_TYPE:
case SPV_OPERAND_TYPE_DEBUG_TYPE_QUALIFIER:
case SPV_OPERAND_TYPE_DEBUG_OPERATION:
case SPV_OPERAND_TYPE_CLDEBUG100_DEBUG_BASE_TYPE_ATTRIBUTE_ENCODING:
case SPV_OPERAND_TYPE_CLDEBUG100_DEBUG_COMPOSITE_TYPE:
case SPV_OPERAND_TYPE_CLDEBUG100_DEBUG_TYPE_QUALIFIER:
case SPV_OPERAND_TYPE_CLDEBUG100_DEBUG_OPERATION:
case SPV_OPERAND_TYPE_CLDEBUG100_DEBUG_IMPORTED_ENTITY:
case SPV_OPERAND_TYPE_FPDENORM_MODE:
case SPV_OPERAND_TYPE_FPOPERATION_MODE:
case SPV_OPERAND_TYPE_QUANTIZATION_MODES:
case SPV_OPERAND_TYPE_OVERFLOW_MODES: {
spv_operand_desc entry;
if (grammar_.lookupOperand(operand.type, word, &entry))
assert(false && "should have caught this earlier");
stream_ << entry->name;
} break;
case SPV_OPERAND_TYPE_FP_FAST_MATH_MODE:
case SPV_OPERAND_TYPE_FUNCTION_CONTROL:
case SPV_OPERAND_TYPE_LOOP_CONTROL:
case SPV_OPERAND_TYPE_IMAGE:
case SPV_OPERAND_TYPE_MEMORY_ACCESS:
case SPV_OPERAND_TYPE_SELECTION_CONTROL:
case SPV_OPERAND_TYPE_DEBUG_INFO_FLAGS:
case SPV_OPERAND_TYPE_CLDEBUG100_DEBUG_INFO_FLAGS:
EmitMaskOperand(operand.type, word);
break;
default:
if (spvOperandIsConcreteMask(operand.type)) {
EmitMaskOperand(operand.type, word);
} else if (spvOperandIsConcrete(operand.type)) {
spv_operand_desc entry;
if (grammar_.lookupOperand(operand.type, word, &entry))
assert(false && "should have caught this earlier");
stream_ << entry->name;
} else {
assert(false && "unhandled or invalid case");
}
break;
}
ResetColor();
}
void Disassembler::EmitMaskOperand(const spv_operand_type_t type,
const uint32_t word) {
// Scan the mask from least significant bit to most significant bit. For each
// set bit, emit the name of that bit. Separate multiple names with '|'.
uint32_t remaining_word = word;
uint32_t mask;
int num_emitted = 0;
for (mask = 1; remaining_word; mask <<= 1) {
if (remaining_word & mask) {
remaining_word ^= mask;
spv_operand_desc entry;
if (grammar_.lookupOperand(type, mask, &entry))
assert(false && "should have caught this earlier");
if (num_emitted) stream_ << "|";
stream_ << entry->name;
num_emitted++;
}
}
if (!num_emitted) {
// An operand value of 0 was provided, so represent it by the name
// of the 0 value. In many cases, that's "None".
spv_operand_desc entry;
if (SPV_SUCCESS == grammar_.lookupOperand(type, 0, &entry))
stream_ << entry->name;
}
}
spv_result_t Disassembler::SaveTextResult(spv_text* text_result) const {
if (!print_) {
size_t length = text_.str().size();
@ -194,342 +470,8 @@ spv_result_t DisassembleTargetInstruction(
return SPV_SUCCESS;
}
constexpr int kStandardIndent = 15;
} // namespace
namespace disassemble {
InstructionDisassembler::InstructionDisassembler(const AssemblyGrammar& grammar,
std::ostream& stream,
uint32_t options,
NameMapper name_mapper)
: grammar_(grammar),
stream_(stream),
print_(spvIsInBitfield(SPV_BINARY_TO_TEXT_OPTION_PRINT, options)),
color_(spvIsInBitfield(SPV_BINARY_TO_TEXT_OPTION_COLOR, options)),
indent_(spvIsInBitfield(SPV_BINARY_TO_TEXT_OPTION_INDENT, options)
? kStandardIndent
: 0),
comment_(spvIsInBitfield(SPV_BINARY_TO_TEXT_OPTION_COMMENT, options)),
show_byte_offset_(
spvIsInBitfield(SPV_BINARY_TO_TEXT_OPTION_SHOW_BYTE_OFFSET, options)),
name_mapper_(std::move(name_mapper)) {}
void InstructionDisassembler::EmitHeaderSpirv() { stream_ << "; SPIR-V\n"; }
void InstructionDisassembler::EmitHeaderVersion(uint32_t version) {
stream_ << "; Version: " << SPV_SPIRV_VERSION_MAJOR_PART(version) << "."
<< SPV_SPIRV_VERSION_MINOR_PART(version) << "\n";
}
void InstructionDisassembler::EmitHeaderGenerator(uint32_t generator) {
const char* generator_tool =
spvGeneratorStr(SPV_GENERATOR_TOOL_PART(generator));
stream_ << "; Generator: " << generator_tool;
// For unknown tools, print the numeric tool value.
if (0 == strcmp("Unknown", generator_tool)) {
stream_ << "(" << SPV_GENERATOR_TOOL_PART(generator) << ")";
}
// Print the miscellaneous part of the generator word on the same
// line as the tool name.
stream_ << "; " << SPV_GENERATOR_MISC_PART(generator) << "\n";
}
void InstructionDisassembler::EmitHeaderIdBound(uint32_t id_bound) {
stream_ << "; Bound: " << id_bound << "\n";
}
void InstructionDisassembler::EmitHeaderSchema(uint32_t schema) {
stream_ << "; Schema: " << schema << "\n";
}
void InstructionDisassembler::EmitInstruction(
const spv_parsed_instruction_t& inst, size_t inst_byte_offset) {
auto opcode = static_cast<SpvOp>(inst.opcode);
if (inst.result_id) {
SetBlue();
const std::string id_name = name_mapper_(inst.result_id);
if (indent_)
stream_ << std::setw(std::max(0, indent_ - 3 - int(id_name.size())));
stream_ << "%" << id_name;
ResetColor();
stream_ << " = ";
} else {
stream_ << std::string(indent_, ' ');
}
stream_ << "Op" << spvOpcodeString(opcode);
for (uint16_t i = 0; i < inst.num_operands; i++) {
const spv_operand_type_t type = inst.operands[i].type;
assert(type != SPV_OPERAND_TYPE_NONE);
if (type == SPV_OPERAND_TYPE_RESULT_ID) continue;
stream_ << " ";
EmitOperand(inst, i);
}
if (comment_ && opcode == SpvOpName) {
const spv_parsed_operand_t& operand = inst.operands[0];
const uint32_t word = inst.words[operand.offset];
stream_ << " ; id %" << word;
}
if (show_byte_offset_) {
SetGrey();
auto saved_flags = stream_.flags();
auto saved_fill = stream_.fill();
stream_ << " ; 0x" << std::setw(8) << std::hex << std::setfill('0')
<< inst_byte_offset;
stream_.flags(saved_flags);
stream_.fill(saved_fill);
ResetColor();
}
stream_ << "\n";
}
void InstructionDisassembler::EmitSectionComment(
const spv_parsed_instruction_t& inst, bool& inserted_decoration_space,
bool& inserted_debug_space, bool& inserted_type_space) {
auto opcode = static_cast<SpvOp>(inst.opcode);
if (comment_ && opcode == SpvOpFunction) {
stream_ << std::endl;
stream_ << std::string(indent_, ' ');
stream_ << "; Function " << name_mapper_(inst.result_id) << std::endl;
}
if (comment_ && !inserted_decoration_space && spvOpcodeIsDecoration(opcode)) {
inserted_decoration_space = true;
stream_ << std::endl;
stream_ << std::string(indent_, ' ');
stream_ << "; Annotations" << std::endl;
}
if (comment_ && !inserted_debug_space && spvOpcodeIsDebug(opcode)) {
inserted_debug_space = true;
stream_ << std::endl;
stream_ << std::string(indent_, ' ');
stream_ << "; Debug Information" << std::endl;
}
if (comment_ && !inserted_type_space && spvOpcodeGeneratesType(opcode)) {
inserted_type_space = true;
stream_ << std::endl;
stream_ << std::string(indent_, ' ');
stream_ << "; Types, variables and constants" << std::endl;
}
}
void InstructionDisassembler::EmitOperand(const spv_parsed_instruction_t& inst,
const uint16_t operand_index) {
assert(operand_index < inst.num_operands);
const spv_parsed_operand_t& operand = inst.operands[operand_index];
const uint32_t word = inst.words[operand.offset];
switch (operand.type) {
case SPV_OPERAND_TYPE_RESULT_ID:
assert(false && "<result-id> is not supposed to be handled here");
SetBlue();
stream_ << "%" << name_mapper_(word);
break;
case SPV_OPERAND_TYPE_ID:
case SPV_OPERAND_TYPE_TYPE_ID:
case SPV_OPERAND_TYPE_SCOPE_ID:
case SPV_OPERAND_TYPE_MEMORY_SEMANTICS_ID:
SetYellow();
stream_ << "%" << name_mapper_(word);
break;
case SPV_OPERAND_TYPE_EXTENSION_INSTRUCTION_NUMBER: {
spv_ext_inst_desc ext_inst;
SetRed();
if (grammar_.lookupExtInst(inst.ext_inst_type, word, &ext_inst) ==
SPV_SUCCESS) {
stream_ << ext_inst->name;
} else {
if (!spvExtInstIsNonSemantic(inst.ext_inst_type)) {
assert(false && "should have caught this earlier");
} else {
// for non-semantic instruction sets we can just print the number
stream_ << word;
}
}
} break;
case SPV_OPERAND_TYPE_SPEC_CONSTANT_OP_NUMBER: {
spv_opcode_desc opcode_desc;
if (grammar_.lookupOpcode(SpvOp(word), &opcode_desc))
assert(false && "should have caught this earlier");
SetRed();
stream_ << opcode_desc->name;
} break;
case SPV_OPERAND_TYPE_LITERAL_INTEGER:
case SPV_OPERAND_TYPE_TYPED_LITERAL_NUMBER: {
SetRed();
EmitNumericLiteral(&stream_, inst, operand);
ResetColor();
} break;
case SPV_OPERAND_TYPE_LITERAL_STRING: {
stream_ << "\"";
SetGreen();
std::string str = spvDecodeLiteralStringOperand(inst, operand_index);
for (char const& c : str) {
if (c == '"' || c == '\\') stream_ << '\\';
stream_ << c;
}
ResetColor();
stream_ << '"';
} break;
case SPV_OPERAND_TYPE_CAPABILITY:
case SPV_OPERAND_TYPE_SOURCE_LANGUAGE:
case SPV_OPERAND_TYPE_EXECUTION_MODEL:
case SPV_OPERAND_TYPE_ADDRESSING_MODEL:
case SPV_OPERAND_TYPE_MEMORY_MODEL:
case SPV_OPERAND_TYPE_EXECUTION_MODE:
case SPV_OPERAND_TYPE_STORAGE_CLASS:
case SPV_OPERAND_TYPE_DIMENSIONALITY:
case SPV_OPERAND_TYPE_SAMPLER_ADDRESSING_MODE:
case SPV_OPERAND_TYPE_SAMPLER_FILTER_MODE:
case SPV_OPERAND_TYPE_SAMPLER_IMAGE_FORMAT:
case SPV_OPERAND_TYPE_FP_ROUNDING_MODE:
case SPV_OPERAND_TYPE_LINKAGE_TYPE:
case SPV_OPERAND_TYPE_ACCESS_QUALIFIER:
case SPV_OPERAND_TYPE_FUNCTION_PARAMETER_ATTRIBUTE:
case SPV_OPERAND_TYPE_DECORATION:
case SPV_OPERAND_TYPE_BUILT_IN:
case SPV_OPERAND_TYPE_GROUP_OPERATION:
case SPV_OPERAND_TYPE_KERNEL_ENQ_FLAGS:
case SPV_OPERAND_TYPE_KERNEL_PROFILING_INFO:
case SPV_OPERAND_TYPE_RAY_FLAGS:
case SPV_OPERAND_TYPE_RAY_QUERY_INTERSECTION:
case SPV_OPERAND_TYPE_RAY_QUERY_COMMITTED_INTERSECTION_TYPE:
case SPV_OPERAND_TYPE_RAY_QUERY_CANDIDATE_INTERSECTION_TYPE:
case SPV_OPERAND_TYPE_DEBUG_BASE_TYPE_ATTRIBUTE_ENCODING:
case SPV_OPERAND_TYPE_DEBUG_COMPOSITE_TYPE:
case SPV_OPERAND_TYPE_DEBUG_TYPE_QUALIFIER:
case SPV_OPERAND_TYPE_DEBUG_OPERATION:
case SPV_OPERAND_TYPE_CLDEBUG100_DEBUG_BASE_TYPE_ATTRIBUTE_ENCODING:
case SPV_OPERAND_TYPE_CLDEBUG100_DEBUG_COMPOSITE_TYPE:
case SPV_OPERAND_TYPE_CLDEBUG100_DEBUG_TYPE_QUALIFIER:
case SPV_OPERAND_TYPE_CLDEBUG100_DEBUG_OPERATION:
case SPV_OPERAND_TYPE_CLDEBUG100_DEBUG_IMPORTED_ENTITY:
case SPV_OPERAND_TYPE_FPDENORM_MODE:
case SPV_OPERAND_TYPE_FPOPERATION_MODE:
case SPV_OPERAND_TYPE_QUANTIZATION_MODES:
case SPV_OPERAND_TYPE_OVERFLOW_MODES: {
spv_operand_desc entry;
if (grammar_.lookupOperand(operand.type, word, &entry))
assert(false && "should have caught this earlier");
stream_ << entry->name;
} break;
case SPV_OPERAND_TYPE_FP_FAST_MATH_MODE:
case SPV_OPERAND_TYPE_FUNCTION_CONTROL:
case SPV_OPERAND_TYPE_LOOP_CONTROL:
case SPV_OPERAND_TYPE_IMAGE:
case SPV_OPERAND_TYPE_MEMORY_ACCESS:
case SPV_OPERAND_TYPE_SELECTION_CONTROL:
case SPV_OPERAND_TYPE_DEBUG_INFO_FLAGS:
case SPV_OPERAND_TYPE_CLDEBUG100_DEBUG_INFO_FLAGS:
EmitMaskOperand(operand.type, word);
break;
default:
if (spvOperandIsConcreteMask(operand.type)) {
EmitMaskOperand(operand.type, word);
} else if (spvOperandIsConcrete(operand.type)) {
spv_operand_desc entry;
if (grammar_.lookupOperand(operand.type, word, &entry))
assert(false && "should have caught this earlier");
stream_ << entry->name;
} else {
assert(false && "unhandled or invalid case");
}
break;
}
ResetColor();
}
void InstructionDisassembler::EmitMaskOperand(const spv_operand_type_t type,
const uint32_t word) {
// Scan the mask from least significant bit to most significant bit. For each
// set bit, emit the name of that bit. Separate multiple names with '|'.
uint32_t remaining_word = word;
uint32_t mask;
int num_emitted = 0;
for (mask = 1; remaining_word; mask <<= 1) {
if (remaining_word & mask) {
remaining_word ^= mask;
spv_operand_desc entry;
if (grammar_.lookupOperand(type, mask, &entry))
assert(false && "should have caught this earlier");
if (num_emitted) stream_ << "|";
stream_ << entry->name;
num_emitted++;
}
}
if (!num_emitted) {
// An operand value of 0 was provided, so represent it by the name
// of the 0 value. In many cases, that's "None".
spv_operand_desc entry;
if (SPV_SUCCESS == grammar_.lookupOperand(type, 0, &entry))
stream_ << entry->name;
}
}
void InstructionDisassembler::ResetColor() {
if (color_) stream_ << spvtools::clr::reset{print_};
}
void InstructionDisassembler::SetGrey() {
if (color_) stream_ << spvtools::clr::grey{print_};
}
void InstructionDisassembler::SetBlue() {
if (color_) stream_ << spvtools::clr::blue{print_};
}
void InstructionDisassembler::SetYellow() {
if (color_) stream_ << spvtools::clr::yellow{print_};
}
void InstructionDisassembler::SetRed() {
if (color_) stream_ << spvtools::clr::red{print_};
}
void InstructionDisassembler::SetGreen() {
if (color_) stream_ << spvtools::clr::green{print_};
}
} // namespace disassemble
std::string spvInstructionBinaryToText(const spv_target_env env,
const uint32_t* instCode,
const size_t instWordCount,
const uint32_t* code,
const size_t wordCount,
const uint32_t options) {
spv_context context = spvContextCreate(env);
const AssemblyGrammar grammar(context);
if (!grammar.isValid()) {
spvContextDestroy(context);
return "";
}
// Generate friendly names for Ids if requested.
std::unique_ptr<FriendlyNameMapper> friendly_mapper;
NameMapper name_mapper = GetTrivialNameMapper();
if (options & SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES) {
friendly_mapper = MakeUnique<FriendlyNameMapper>(context, code, wordCount);
name_mapper = friendly_mapper->GetNameMapper();
}
// Now disassemble!
Disassembler disassembler(grammar, options, name_mapper);
WrappedDisassembler wrapped(&disassembler, instCode, instWordCount);
spvBinaryParse(context, &wrapped, code, wordCount, DisassembleTargetHeader,
DisassembleTargetInstruction, nullptr);
spv_text text = nullptr;
std::string output;
if (disassembler.SaveTextResult(&text) == SPV_SUCCESS) {
output.assign(text->str, text->str + text->length);
// Drop trailing newline characters.
while (!output.empty() && output.back() == '\n') output.pop_back();
}
spvTextDestroy(text);
spvContextDestroy(context);
return output;
}
} // namespace spvtools
spv_result_t spvBinaryToText(const spv_const_context context,
const uint32_t* code, const size_t wordCount,
const uint32_t options, spv_text* pText,
@ -553,13 +495,53 @@ spv_result_t spvBinaryToText(const spv_const_context context,
}
// Now disassemble!
spvtools::Disassembler disassembler(grammar, options, name_mapper);
if (auto error =
spvBinaryParse(&hijack_context, &disassembler, code, wordCount,
spvtools::DisassembleHeader,
spvtools::DisassembleInstruction, pDiagnostic)) {
Disassembler disassembler(grammar, options, name_mapper);
if (auto error = spvBinaryParse(&hijack_context, &disassembler, code,
wordCount, DisassembleHeader,
DisassembleInstruction, pDiagnostic)) {
return error;
}
return disassembler.SaveTextResult(pText);
}
std::string spvtools::spvInstructionBinaryToText(const spv_target_env env,
const uint32_t* instCode,
const size_t instWordCount,
const uint32_t* code,
const size_t wordCount,
const uint32_t options) {
spv_context context = spvContextCreate(env);
const spvtools::AssemblyGrammar grammar(context);
if (!grammar.isValid()) {
spvContextDestroy(context);
return "";
}
// Generate friendly names for Ids if requested.
std::unique_ptr<spvtools::FriendlyNameMapper> friendly_mapper;
spvtools::NameMapper name_mapper = spvtools::GetTrivialNameMapper();
if (options & SPV_BINARY_TO_TEXT_OPTION_FRIENDLY_NAMES) {
friendly_mapper = spvtools::MakeUnique<spvtools::FriendlyNameMapper>(
context, code, wordCount);
name_mapper = friendly_mapper->GetNameMapper();
}
// Now disassemble!
Disassembler disassembler(grammar, options, name_mapper);
WrappedDisassembler wrapped(&disassembler, instCode, instWordCount);
spvBinaryParse(context, &wrapped, code, wordCount, DisassembleTargetHeader,
DisassembleTargetInstruction, nullptr);
spv_text text = nullptr;
std::string output;
if (disassembler.SaveTextResult(&text) == SPV_SUCCESS) {
output.assign(text->str, text->str + text->length);
// Drop trailing newline characters.
while (!output.empty() && output.back() == '\n') output.pop_back();
}
spvTextDestroy(text);
spvContextDestroy(context);
return output;
}

View File

@ -15,10 +15,8 @@
#ifndef SOURCE_DISASSEMBLE_H_
#define SOURCE_DISASSEMBLE_H_
#include <iosfwd>
#include <string>
#include "source/name_mapper.h"
#include "spirv-tools/libspirv.h"
namespace spvtools {
@ -35,63 +33,6 @@ std::string spvInstructionBinaryToText(const spv_target_env env,
const size_t word_count,
const uint32_t options);
class AssemblyGrammar;
namespace disassemble {
// Shared code with other tools (than the disassembler) that might need to
// output disassembly. An InstructionDisassembler instance converts SPIR-V
// binary for an instruction to its assembly representation.
class InstructionDisassembler {
public:
InstructionDisassembler(const AssemblyGrammar& grammar, std::ostream& stream,
uint32_t options, NameMapper name_mapper);
// Emits the assembly header for the module.
void EmitHeaderSpirv();
void EmitHeaderVersion(uint32_t version);
void EmitHeaderGenerator(uint32_t generator);
void EmitHeaderIdBound(uint32_t id_bound);
void EmitHeaderSchema(uint32_t schema);
// Emits the assembly text for the given instruction.
void EmitInstruction(const spv_parsed_instruction_t& inst,
size_t inst_byte_offset);
// Emits a comment between different sections of the module.
void EmitSectionComment(const spv_parsed_instruction_t& inst,
bool& inserted_decoration_space,
bool& inserted_debug_space,
bool& inserted_type_space);
// Resets the output color, if color is turned on.
void ResetColor();
// Set the output color, if color is turned on.
void SetGrey();
void SetBlue();
void SetYellow();
void SetRed();
void SetGreen();
private:
// Emits an operand for the given instruction, where the instruction
// is at offset words from the start of the binary.
void EmitOperand(const spv_parsed_instruction_t& inst,
const uint16_t operand_index);
// Emits a mask expression for the given mask word of the specified type.
void EmitMaskOperand(const spv_operand_type_t type, const uint32_t word);
const spvtools::AssemblyGrammar& grammar_;
std::ostream& stream_;
const bool print_; // Should we also print to the standard output stream?
const bool color_; // Should we print in colour?
const int indent_; // How much to indent. 0 means don't indent
const int comment_; // Should we comment the source
const bool show_byte_offset_; // Should we print byte offset, in hex?
spvtools::NameMapper name_mapper_;
};
} // namespace disassemble
} // namespace spvtools
#endif // SOURCE_DISASSEMBLE_H_

View File

@ -29,7 +29,7 @@
#include "debuginfo.insts.inc"
#include "glsl.std.450.insts.inc"
#include "nonsemantic.clspvreflection.insts.inc"
#include "nonsemantic.shader.debuginfo.100.insts.inc"
#include "nonsemantic.vulkan.debuginfo.100.insts.inc"
#include "opencl.debuginfo.100.insts.inc"
#include "opencl.std.insts.inc"
@ -56,9 +56,9 @@ static const spv_ext_inst_group_t kGroups_1_0[] = {
debuginfo_entries},
{SPV_EXT_INST_TYPE_OPENCL_DEBUGINFO_100,
ARRAY_SIZE(opencl_debuginfo_100_entries), opencl_debuginfo_100_entries},
{SPV_EXT_INST_TYPE_NONSEMANTIC_SHADER_DEBUGINFO_100,
ARRAY_SIZE(nonsemantic_shader_debuginfo_100_entries),
nonsemantic_shader_debuginfo_100_entries},
{SPV_EXT_INST_TYPE_NONSEMANTIC_VULKAN_DEBUGINFO_100,
ARRAY_SIZE(nonsemantic_vulkan_debuginfo_100_entries),
nonsemantic_vulkan_debuginfo_100_entries},
{SPV_EXT_INST_TYPE_NONSEMANTIC_CLSPVREFLECTION,
ARRAY_SIZE(nonsemantic_clspvreflection_entries),
nonsemantic_clspvreflection_entries},
@ -96,8 +96,6 @@ spv_result_t spvExtInstTableGet(spv_ext_inst_table* pExtInstTable,
case SPV_ENV_UNIVERSAL_1_4:
case SPV_ENV_UNIVERSAL_1_5:
case SPV_ENV_VULKAN_1_2:
case SPV_ENV_UNIVERSAL_1_6:
case SPV_ENV_VULKAN_1_3:
*pExtInstTable = &kTable_1_0;
return SPV_SUCCESS;
default:
@ -132,8 +130,8 @@ spv_ext_inst_type_t spvExtInstImportTypeGet(const char* name) {
if (!strcmp("OpenCL.DebugInfo.100", name)) {
return SPV_EXT_INST_TYPE_OPENCL_DEBUGINFO_100;
}
if (!strcmp("NonSemantic.Shader.DebugInfo.100", name)) {
return SPV_EXT_INST_TYPE_NONSEMANTIC_SHADER_DEBUGINFO_100;
if (!strcmp("NonSemantic.Vulkan.DebugInfo.100", name)) {
return SPV_EXT_INST_TYPE_NONSEMANTIC_VULKAN_DEBUGINFO_100;
}
if (!strncmp("NonSemantic.ClspvReflection.", name, 28)) {
return SPV_EXT_INST_TYPE_NONSEMANTIC_CLSPVREFLECTION;
@ -148,7 +146,7 @@ spv_ext_inst_type_t spvExtInstImportTypeGet(const char* name) {
bool spvExtInstIsNonSemantic(const spv_ext_inst_type_t type) {
if (type == SPV_EXT_INST_TYPE_NONSEMANTIC_UNKNOWN ||
type == SPV_EXT_INST_TYPE_NONSEMANTIC_SHADER_DEBUGINFO_100 ||
type == SPV_EXT_INST_TYPE_NONSEMANTIC_VULKAN_DEBUGINFO_100 ||
type == SPV_EXT_INST_TYPE_NONSEMANTIC_CLSPVREFLECTION) {
return true;
}
@ -157,7 +155,7 @@ bool spvExtInstIsNonSemantic(const spv_ext_inst_type_t type) {
bool spvExtInstIsDebugInfo(const spv_ext_inst_type_t type) {
if (type == SPV_EXT_INST_TYPE_OPENCL_DEBUGINFO_100 ||
type == SPV_EXT_INST_TYPE_NONSEMANTIC_SHADER_DEBUGINFO_100 ||
type == SPV_EXT_INST_TYPE_NONSEMANTIC_VULKAN_DEBUGINFO_100 ||
type == SPV_EXT_INST_TYPE_DEBUGINFO) {
return true;
}

View File

@ -27,7 +27,7 @@ bool spvExtInstIsNonSemantic(const spv_ext_inst_type_t type);
// Returns true if the extended instruction set is debug info
bool spvExtInstIsDebugInfo(const spv_ext_inst_type_t type);
// Finds the named extended instruction of the given type in the given extended
// Finds the named extented instruction of the given type in the given extended
// instruction table. On success, returns SPV_SUCCESS and writes a handle of
// the instruction entry into *entry.
spv_result_t spvExtInstTableNameLookup(const spv_ext_inst_table table,
@ -35,7 +35,7 @@ spv_result_t spvExtInstTableNameLookup(const spv_ext_inst_table table,
const char* name,
spv_ext_inst_desc* entry);
// Finds the extended instruction of the given type in the given extended
// Finds the extented instruction of the given type in the given extended
// instruction table by value. On success, returns SPV_SUCCESS and writes a
// handle of the instruction entry into *entry.
spv_result_t spvExtInstTableValueLookup(const spv_ext_inst_table table,

View File

@ -18,7 +18,6 @@
#include <sstream>
#include <string>
#include "source/binary.h"
#include "source/enum_string_mapping.h"
namespace spvtools {
@ -31,9 +30,8 @@ std::string GetExtensionString(const spv_parsed_instruction_t* inst) {
const auto& operand = inst->operands[0];
assert(operand.type == SPV_OPERAND_TYPE_LITERAL_STRING);
assert(inst->num_words > operand.offset);
(void)operand; /* No unused variables in release builds. */
return spvDecodeLiteralStringOperand(*inst, 0);
return reinterpret_cast<const char*>(inst->words + operand.offset);
}
std::string ExtensionSetToString(const ExtensionSet& extensions) {

View File

@ -0,0 +1,638 @@
{
"copyright" : [
"Copyright (c) 2018 The Khronos Group Inc.",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy",
"of this software and/or associated documentation files (the \"Materials\"),",
"to deal in the Materials without restriction, including without limitation",
"the rights to use, copy, modify, merge, publish, distribute, sublicense,",
"and/or sell copies of the Materials, and to permit persons to whom the",
"Materials are furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in",
"all copies or substantial portions of the Materials.",
"",
"MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS",
"STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND",
"HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ",
"",
"THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS",
"OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL",
"THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING",
"FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS",
"IN THE MATERIALS."
],
"version" : 100,
"revision" : 2,
"instructions" : [
{
"opname" : "DebugInfoNone",
"opcode" : 0
},
{
"opname" : "DebugCompilationUnit",
"opcode" : 1,
"operands" : [
{ "kind" : "IdRef", "name" : "'Version'" },
{ "kind" : "IdRef", "name" : "'DWARF Version'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Language'" }
]
},
{
"opname" : "DebugTypeBasic",
"opcode" : 2,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "IdRef", "name" : "'Encoding'" },
{ "kind" : "IdRef", "name" : "'Flags'" }
]
},
{
"opname" : "DebugTypePointer",
"opcode" : 3,
"operands" : [
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "IdRef", "name" : "'Storage Class'" },
{ "kind" : "IdRef", "name" : "'Flags'" }
]
},
{
"opname" : "DebugTypeQualifier",
"opcode" : 4,
"operands" : [
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "IdRef", "name" : "'Type Qualifier'" }
]
},
{
"opname" : "DebugTypeArray",
"opcode" : 5,
"operands" : [
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "IdRef", "name" : "'Component Counts'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeVector",
"opcode" : 6,
"operands" : [
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "IdRef", "name" : "'Component Count'" }
]
},
{
"opname" : "DebugTypedef",
"opcode" : 7,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Base Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" }
]
},
{
"opname" : "DebugTypeFunction",
"opcode" : 8,
"operands" : [
{ "kind" : "IdRef", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Return Type'" },
{ "kind" : "IdRef", "name" : "'Parameter Types'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeEnum",
"opcode" : 9,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Underlying Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "IdRef", "name" : "'Flags'" },
{ "kind" : "PairIdRefIdRef", "name" : "'Value, Name, Value, Name, ...'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeComposite",
"opcode" : 10,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Tag'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Linkage Name'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "IdRef", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Members'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeMember",
"opcode" : 11,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Offset'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "IdRef", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" }
]
},
{
"opname" : "DebugTypeInheritance",
"opcode" : 12,
"operands" : [
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Offset'" },
{ "kind" : "IdRef", "name" : "'Size'" },
{ "kind" : "IdRef", "name" : "'Flags'" }
]
},
{
"opname" : "DebugTypePtrToMember",
"opcode" : 13,
"operands" : [
{ "kind" : "IdRef", "name" : "'Member Type'" },
{ "kind" : "IdRef", "name" : "'Parent'" }
]
},
{
"opname" : "DebugTypeTemplate",
"opcode" : 14,
"operands" : [
{ "kind" : "IdRef", "name" : "'Target'" },
{ "kind" : "IdRef", "name" : "'Parameters'", "quantifier" : "*" }
]
},
{
"opname" : "DebugTypeTemplateParameter",
"opcode" : 15,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Actual Type'" },
{ "kind" : "IdRef", "name" : "'Value'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" }
]
},
{
"opname" : "DebugTypeTemplateTemplateParameter",
"opcode" : 16,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Template Name'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" }
]
},
{
"opname" : "DebugTypeTemplateParameterPack",
"opcode" : 17,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Template Parameters'", "quantifier" : "*" }
]
},
{
"opname" : "DebugGlobalVariable",
"opcode" : 18,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Linkage Name'" },
{ "kind" : "IdRef", "name" : "'Variable'" },
{ "kind" : "IdRef", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Static Member Declaration'", "quantifier" : "?" }
]
},
{
"opname" : "DebugFunctionDeclaration",
"opcode" : 19,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Linkage Name'" },
{ "kind" : "IdRef", "name" : "'Flags'" }
]
},
{
"opname" : "DebugFunction",
"opcode" : 20,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Linkage Name'" },
{ "kind" : "IdRef", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Scope Line'" },
{ "kind" : "IdRef", "name" : "'Declaration'", "quantifier" : "?" }
]
},
{
"opname" : "DebugLexicalBlock",
"opcode" : 21,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Name'", "quantifier" : "?" }
]
},
{
"opname" : "DebugLexicalBlockDiscriminator",
"opcode" : 22,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Discriminator'" },
{ "kind" : "IdRef", "name" : "'Parent'" }
]
},
{
"opname" : "DebugScope",
"opcode" : 23,
"operands" : [
{ "kind" : "IdRef", "name" : "'Scope'" },
{ "kind" : "IdRef", "name" : "'Inlined At'", "quantifier" : "?" }
]
},
{
"opname" : "DebugNoScope",
"opcode" : 24
},
{
"opname" : "DebugInlinedAt",
"opcode" : 25,
"operands" : [
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Scope'" },
{ "kind" : "IdRef", "name" : "'Inlined'", "quantifier" : "?" }
]
},
{
"opname" : "DebugLocalVariable",
"opcode" : 26,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Type'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" },
{ "kind" : "IdRef", "name" : "'Flags'" },
{ "kind" : "IdRef", "name" : "'Arg Number'", "quantifier" : "?" }
]
},
{
"opname" : "DebugInlinedVariable",
"opcode" : 27,
"operands" : [
{ "kind" : "IdRef", "name" : "'Variable'" },
{ "kind" : "IdRef", "name" : "'Inlined'" }
]
},
{
"opname" : "DebugDeclare",
"opcode" : 28,
"operands" : [
{ "kind" : "IdRef", "name" : "'Local Variable'" },
{ "kind" : "IdRef", "name" : "'Variable'" },
{ "kind" : "IdRef", "name" : "'Expression'" }
]
},
{
"opname" : "DebugValue",
"opcode" : 29,
"operands" : [
{ "kind" : "IdRef", "name" : "'Local Variable'" },
{ "kind" : "IdRef", "name" : "'Value'" },
{ "kind" : "IdRef", "name" : "'Expression'" },
{ "kind" : "IdRef", "name" : "'Indexes'", "quantifier" : "*" }
]
},
{
"opname" : "DebugOperation",
"opcode" : 30,
"operands" : [
{ "kind" : "IdRef", "name" : "'OpCode'" },
{ "kind" : "IdRef", "name" : "'Operands ...'", "quantifier" : "*" }
]
},
{
"opname" : "DebugExpression",
"opcode" : 31,
"operands" : [
{ "kind" : "IdRef", "name" : "'Operands ...'", "quantifier" : "*" }
]
},
{
"opname" : "DebugMacroDef",
"opcode" : 32,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Value'", "quantifier" : "?" }
]
},
{
"opname" : "DebugMacroUndef",
"opcode" : 33,
"operands" : [
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Macro'" }
]
},
{
"opname" : "DebugImportedEntity",
"opcode" : 34,
"operands" : [
{ "kind" : "IdRef", "name" : "'Name'" },
{ "kind" : "IdRef", "name" : "'Tag'" },
{ "kind" : "IdRef", "name" : "'Source'" },
{ "kind" : "IdRef", "name" : "'Entity'" },
{ "kind" : "IdRef", "name" : "'Line'" },
{ "kind" : "IdRef", "name" : "'Column'" },
{ "kind" : "IdRef", "name" : "'Parent'" }
]
},
{
"opname" : "DebugSource",
"opcode" : 35,
"operands" : [
{ "kind" : "IdRef", "name" : "'File'" },
{ "kind" : "IdRef", "name" : "'Text'", "quantifier" : "?" }
]
},
{
"opname" : "DebugFunctionDefinition",
"opcode" : 101,
"operands" : [
{ "kind" : "IdRef", "name" : "'Function'" },
{ "kind" : "IdRef", "name" : "'Definition'" }
]
}
],
"operand_kinds" : [
{
"category" : "BitEnum",
"kind" : "DebugInfoFlags",
"enumerants" : [
{
"enumerant" : "FlagIsProtected",
"value" : "0x01"
},
{
"enumerant" : "FlagIsPrivate",
"value" : "0x02"
},
{
"enumerant" : "FlagIsPublic",
"value" : "0x03"
},
{
"enumerant" : "FlagIsLocal",
"value" : "0x04"
},
{
"enumerant" : "FlagIsDefinition",
"value" : "0x08"
},
{
"enumerant" : "FlagFwdDecl",
"value" : "0x10"
},
{
"enumerant" : "FlagArtificial",
"value" : "0x20"
},
{
"enumerant" : "FlagExplicit",
"value" : "0x40"
},
{
"enumerant" : "FlagPrototyped",
"value" : "0x80"
},
{
"enumerant" : "FlagObjectPointer",
"value" : "0x100"
},
{
"enumerant" : "FlagStaticMember",
"value" : "0x200"
},
{
"enumerant" : "FlagIndirectVariable",
"value" : "0x400"
},
{
"enumerant" : "FlagLValueReference",
"value" : "0x800"
},
{
"enumerant" : "FlagRValueReference",
"value" : "0x1000"
},
{
"enumerant" : "FlagIsOptimized",
"value" : "0x2000"
},
{
"enumerant" : "FlagIsEnumClass",
"value" : "0x4000"
},
{
"enumerant" : "FlagTypePassByValue",
"value" : "0x8000"
},
{
"enumerant" : "FlagTypePassByReference",
"value" : "0x10000"
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugBaseTypeAttributeEncoding",
"enumerants" : [
{
"enumerant" : "Unspecified",
"value" : "0"
},
{
"enumerant" : "Address",
"value" : "1"
},
{
"enumerant" : "Boolean",
"value" : "2"
},
{
"enumerant" : "Float",
"value" : "3"
},
{
"enumerant" : "Signed",
"value" : "4"
},
{
"enumerant" : "SignedChar",
"value" : "5"
},
{
"enumerant" : "Unsigned",
"value" : "6"
},
{
"enumerant" : "UnsignedChar",
"value" : "7"
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugCompositeType",
"enumerants" : [
{
"enumerant" : "Class",
"value" : "0"
},
{
"enumerant" : "Structure",
"value" : "1"
},
{
"enumerant" : "Union",
"value" : "2"
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugTypeQualifier",
"enumerants" : [
{
"enumerant" : "ConstType",
"value" : "0"
},
{
"enumerant" : "VolatileType",
"value" : "1"
},
{
"enumerant" : "RestrictType",
"value" : "2"
},
{
"enumerant" : "AtomicType",
"value" : "3"
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugOperation",
"enumerants" : [
{
"enumerant" : "Deref",
"value" : "0"
},
{
"enumerant" : "Plus",
"value" : "1"
},
{
"enumerant" : "Minus",
"value" : "2"
},
{
"enumerant" : "PlusUconst",
"value" : "3",
"parameters" : [
{ "kind" : "IdRef" }
]
},
{
"enumerant" : "BitPiece",
"value" : "4",
"parameters" : [
{ "kind" : "IdRef" },
{ "kind" : "IdRef" }
]
},
{
"enumerant" : "Swap",
"value" : "5"
},
{
"enumerant" : "Xderef",
"value" : "6"
},
{
"enumerant" : "StackValue",
"value" : "7"
},
{
"enumerant" : "Constu",
"value" : "8",
"parameters" : [
{ "kind" : "IdRef" }
]
},
{
"enumerant" : "Fragment",
"value" : "9",
"parameters" : [
{ "kind" : "IdRef" },
{ "kind" : "IdRef" }
]
}
]
},
{
"category" : "ValueEnum",
"kind" : "DebugImportedEntity",
"enumerants" : [
{
"enumerant" : "ImportedModule",
"value" : "0"
},
{
"enumerant" : "ImportedDeclaration",
"value" : "1"
}
]
}
]
}

View File

@ -163,7 +163,7 @@ class FactManager {
std::vector<const protobufs::DataDescriptor*> GetSynonymsForDataDescriptor(
const protobufs::DataDescriptor& data_descriptor) const;
// Returns true if and only if |data_descriptor1| and |data_descriptor2| are
// Returns true if and ony if |data_descriptor1| and |data_descriptor2| are
// known to be synonymous.
bool IsSynonymous(const protobufs::DataDescriptor& data_descriptor1,
const protobufs::DataDescriptor& data_descriptor2) const;
@ -174,7 +174,7 @@ class FactManager {
//==============================
// Querying facts about dead blocks
// Returns true if and only if |block_id| is the id of a block known to be
// Returns true if and ony if |block_id| is the id of a block known to be
// dynamically unreachable.
bool BlockIsDead(uint32_t block_id) const;
@ -184,7 +184,7 @@ class FactManager {
//==============================
// Querying facts about livesafe function
// Returns true if and only if |function_id| is the id of a function known
// Returns true if and ony if |function_id| is the id of a function known
// to be livesafe.
bool FunctionIsLivesafe(uint32_t function_id) const;
@ -194,7 +194,7 @@ class FactManager {
//==============================
// Querying facts about irrelevant values
// Returns true if and only if the value of the pointee associated with
// Returns true if and ony if the value of the pointee associated with
// |pointer_id| is irrelevant.
bool PointeeValueIsIrrelevant(uint32_t pointer_id) const;

View File

@ -21,7 +21,7 @@ namespace fuzz {
namespace {
// An offset between the module's id bound and the minimum fresh id.
// An offset between the the module's id bound and the minimum fresh id.
//
// TODO(https://github.com/KhronosGroup/SPIRV-Tools/issues/2541): consider
// the case where the maximum id bound is reached.

View File

@ -261,7 +261,7 @@ uint32_t FuzzerPass::FindOrCreateFloatType(uint32_t width) {
uint32_t FuzzerPass::FindOrCreateFunctionType(
uint32_t return_type_id, const std::vector<uint32_t>& argument_id) {
// FindFunctionType has a single argument for OpTypeFunction operands
// FindFunctionType has a sigle argument for OpTypeFunction operands
// so we will have to copy them all in this vector
std::vector<uint32_t> type_ids(argument_id.size() + 1);
type_ids[0] = return_type_id;

View File

@ -198,7 +198,7 @@ bool FuzzerPassApplyIdSynonyms::DataDescriptorsHaveCompatibleTypes(
GetIRContext(), base_object_type_id_2, dd2.index());
assert(type_id_1 && type_id_2 && "Data descriptors have invalid types");
return fuzzerutil::TypesAreCompatible(
return TransformationReplaceIdWithSynonym::TypesAreCompatible(
GetIRContext(), opcode, use_in_operand_index, type_id_1, type_id_2);
}

View File

@ -479,7 +479,7 @@ void FuzzerPassDonateModules::HandleTypeOrValue(
"should have been donated.");
// It is OK to have duplicate constant composite definitions, so add
// this to the module using remapped versions of all constituent ids and
// this to the module using remapped versions of all consituent ids and
// the result type.
new_result_id = GetFuzzerContext()->GetFreshId();
std::vector<uint32_t> constituent_ids;

View File

@ -55,29 +55,8 @@ void FuzzerPassWrapVectorSynonym::Apply() {
SpvOpCompositeConstruct, instruction_iterator)) {
return;
}
// Get the scalar operands from the original instruction.
opt::Instruction* operand1 = GetIRContext()->get_def_use_mgr()->GetDef(
instruction_iterator->GetSingleWordInOperand(0));
opt::Instruction* operand2 = GetIRContext()->get_def_use_mgr()->GetDef(
instruction_iterator->GetSingleWordInOperand(1));
// We need to be able to make a synonym of the scalar operation's result
// id, as well as the operand ids (for example, they cannot be
// irrelevant).
if (!fuzzerutil::CanMakeSynonymOf(GetIRContext(),
*GetTransformationContext(),
*instruction_iterator)) {
return;
}
if (!fuzzerutil::CanMakeSynonymOf(
GetIRContext(), *GetTransformationContext(), *operand1)) {
return;
}
if (!fuzzerutil::CanMakeSynonymOf(
GetIRContext(), *GetTransformationContext(), *operand2)) {
return;
}
// Get the scalar type represented by the targeted instruction id.
uint32_t operand_type_id = instruction_iterator->type_id();
// Get a random vector size from 2 to 4.
uint32_t vector_size = GetFuzzerContext()->GetWidthOfWrappingVector();
@ -88,6 +67,29 @@ void FuzzerPassWrapVectorSynonym::Apply() {
uint32_t position =
GetFuzzerContext()->GetRandomIndexForWrappingVector(vector_size);
// Target ids are the two scalar ids from the original instruction.
uint32_t target_id1 = instruction_iterator->GetSingleWordInOperand(0);
uint32_t target_id2 = instruction_iterator->GetSingleWordInOperand(1);
// We need to be able to make a synonym of the scalar operation's result
// id, as well as the operand ids (for example, they cannot be
// irrelevant).
if (!fuzzerutil::CanMakeSynonymOf(GetIRContext(),
*GetTransformationContext(),
*instruction_iterator)) {
return;
}
if (!fuzzerutil::CanMakeSynonymOf(
GetIRContext(), *GetTransformationContext(),
*GetIRContext()->get_def_use_mgr()->GetDef(target_id1))) {
return;
}
if (!fuzzerutil::CanMakeSynonymOf(
GetIRContext(), *GetTransformationContext(),
*GetIRContext()->get_def_use_mgr()->GetDef(target_id2))) {
return;
}
// Stores the ids of scalar constants.
std::vector<uint32_t> vec1_components;
std::vector<uint32_t> vec2_components;
@ -95,42 +97,33 @@ void FuzzerPassWrapVectorSynonym::Apply() {
// Populate components based on vector type and size.
for (uint32_t i = 0; i < vector_size; ++i) {
if (i == position) {
vec1_components.emplace_back(operand1->result_id());
vec2_components.emplace_back(operand2->result_id());
vec1_components.emplace_back(target_id1);
vec2_components.emplace_back(target_id2);
} else {
vec1_components.emplace_back(
FindOrCreateZeroConstant(operand1->type_id(), true));
FindOrCreateZeroConstant(operand_type_id, true));
vec2_components.emplace_back(
FindOrCreateZeroConstant(operand2->type_id(), true));
FindOrCreateZeroConstant(operand_type_id, true));
}
}
// Add two OpCompositeConstruct to the module with result id returned.
// The added vectors may have different types, for instance if the
// scalar instruction operates on integers with differing sign.
const uint32_t vector_type_id =
FindOrCreateVectorType(operand_type_id, vector_size);
// Add the first OpCompositeConstruct that wraps the id of the first
// operand.
uint32_t result_id1 = GetFuzzerContext()->GetFreshId();
ApplyTransformation(TransformationCompositeConstruct(
FindOrCreateVectorType(operand1->type_id(), vector_size),
vec1_components, instruction_descriptor, result_id1));
vector_type_id, vec1_components, instruction_descriptor,
result_id1));
// Add the second OpCompositeConstruct that wraps the id of the second
// operand.
uint32_t result_id2 = GetFuzzerContext()->GetFreshId();
ApplyTransformation(TransformationCompositeConstruct(
FindOrCreateVectorType(operand2->type_id(), vector_size),
vec2_components, instruction_descriptor, result_id2));
// The result of the vector instruction that
// TransformationWrapVectorSynonym will create should be a vector of the
// right size, with the scalar instruction's result type as its element
// type. This can be distinct from the types of the operands, if the
// scalar instruction adds two signed integers and stores the result in
// an unsigned id, for example. A transformation is applied to add the
// right type to the module.
FindOrCreateVectorType(instruction_iterator->type_id(), vector_size);
vector_type_id, vec2_components, instruction_descriptor,
result_id2));
// Apply transformation to do vector operation and add synonym between
// the result vector id and the id of the original instruction.

View File

@ -2018,93 +2018,6 @@ opt::Module::iterator GetFunctionIterator(opt::IRContext* ir_context,
});
}
// TODO(https://github.com/KhronosGroup/SPIRV-Tools/issues/3582): Add all
// opcodes that are agnostic to signedness of operands to function.
// This is not exhaustive yet.
bool IsAgnosticToSignednessOfOperand(SpvOp opcode,
uint32_t use_in_operand_index) {
switch (opcode) {
case SpvOpSNegate:
case SpvOpNot:
case SpvOpIAdd:
case SpvOpISub:
case SpvOpIMul:
case SpvOpSDiv:
case SpvOpSRem:
case SpvOpSMod:
case SpvOpShiftRightLogical:
case SpvOpShiftRightArithmetic:
case SpvOpShiftLeftLogical:
case SpvOpBitwiseOr:
case SpvOpBitwiseXor:
case SpvOpBitwiseAnd:
case SpvOpIEqual:
case SpvOpINotEqual:
case SpvOpULessThan:
case SpvOpSLessThan:
case SpvOpUGreaterThan:
case SpvOpSGreaterThan:
case SpvOpULessThanEqual:
case SpvOpSLessThanEqual:
case SpvOpUGreaterThanEqual:
case SpvOpSGreaterThanEqual:
return true;
case SpvOpAtomicStore:
case SpvOpAtomicExchange:
case SpvOpAtomicIAdd:
case SpvOpAtomicISub:
case SpvOpAtomicSMin:
case SpvOpAtomicUMin:
case SpvOpAtomicSMax:
case SpvOpAtomicUMax:
case SpvOpAtomicAnd:
case SpvOpAtomicOr:
case SpvOpAtomicXor:
case SpvOpAtomicFAddEXT: // Capability AtomicFloat32AddEXT,
// AtomicFloat64AddEXT.
assert(use_in_operand_index != 0 &&
"Signedness check should not occur on a pointer operand.");
return use_in_operand_index == 1 || use_in_operand_index == 2;
case SpvOpAtomicCompareExchange:
case SpvOpAtomicCompareExchangeWeak: // Capability Kernel.
assert(use_in_operand_index != 0 &&
"Signedness check should not occur on a pointer operand.");
return use_in_operand_index >= 1 && use_in_operand_index <= 3;
case SpvOpAtomicLoad:
case SpvOpAtomicIIncrement:
case SpvOpAtomicIDecrement:
case SpvOpAtomicFlagTestAndSet: // Capability Kernel.
case SpvOpAtomicFlagClear: // Capability Kernel.
assert(use_in_operand_index != 0 &&
"Signedness check should not occur on a pointer operand.");
return use_in_operand_index >= 1;
case SpvOpAccessChain:
// The signedness of indices does not matter.
return use_in_operand_index > 0;
default:
// Conservatively assume that the id cannot be swapped in other
// instructions.
return false;
}
}
bool TypesAreCompatible(opt::IRContext* ir_context, SpvOp opcode,
uint32_t use_in_operand_index, uint32_t type_id_1,
uint32_t type_id_2) {
assert(ir_context->get_type_mgr()->GetType(type_id_1) &&
ir_context->get_type_mgr()->GetType(type_id_2) &&
"Type ids are invalid");
return type_id_1 == type_id_2 ||
(IsAgnosticToSignednessOfOperand(opcode, use_in_operand_index) &&
fuzzerutil::TypesAreEqualUpToSign(ir_context, type_id_1, type_id_2));
}
} // namespace fuzzerutil
} // namespace fuzz
} // namespace spvtools

Some files were not shown because too many files have changed in this diff Show More