aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei Zhang <antiagainst@google.com>2017-08-07 22:57:43 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-08-07 22:57:43 +0000
commit9fb408acbf2a1fb70f1062675bb4ea3bea159838 (patch)
treed871dd8d2273481457c1c48ef975b9cabeb89528
parent19b22ee857adc4e5c503b9bfd8d1a23152f1a090 (diff)
parente74066145ef9fcd422f1e1231df6ccafe36299a9 (diff)
downloadspirv-headers-9fb408acbf2a1fb70f1062675bb4ea3bea159838.tar.gz
Merge remote-tracking branch 'aosp/upstream-master'
am: e74066145e Change-Id: I3c9c8b3217f4f9799c1f7c0286269d29b05f9edf
-rw-r--r--include/spirv/1.0/spirv.core.grammar.json11
-rw-r--r--include/spirv/1.0/spirv.h35
-rw-r--r--include/spirv/1.0/spirv.hpp35
-rw-r--r--include/spirv/1.0/spirv.hpp1135
-rw-r--r--include/spirv/1.0/spirv.json2
-rw-r--r--include/spirv/1.0/spirv.lua2
-rw-r--r--include/spirv/1.0/spirv.py2
-rw-r--r--include/spirv/1.1/GLSL.std.450.h131
-rw-r--r--include/spirv/1.1/OpenCL.std.h272
-rw-r--r--include/spirv/1.1/extinst.glsl.std.450.grammar.json642
-rw-r--r--include/spirv/1.1/spirv.core.grammar.json11
-rw-r--r--include/spirv/1.1/spirv.h35
-rw-r--r--include/spirv/1.1/spirv.hpp35
-rw-r--r--include/spirv/1.1/spirv.hpp1135
-rw-r--r--include/spirv/1.1/spirv.json2
-rw-r--r--include/spirv/1.1/spirv.lua2
-rw-r--r--include/spirv/1.1/spirv.py2
17 files changed, 1257 insertions, 32 deletions
diff --git a/include/spirv/1.0/spirv.core.grammar.json b/include/spirv/1.0/spirv.core.grammar.json
index 04278b2..0192b72 100644
--- a/include/spirv/1.0/spirv.core.grammar.json
+++ b/include/spirv/1.0/spirv.core.grammar.json
@@ -27,7 +27,7 @@
"magic_number" : "0x07230203",
"major_version" : 1,
"minor_version" : 0,
- "revision" : 5,
+ "revision" : 6,
"instructions" : [
{
"opname" : "OpNop",
@@ -3570,8 +3570,7 @@
},
{
"enumerant" : "Input",
- "value" : 1,
- "capabilities" : [ "Shader" ]
+ "value" : 1
},
{
"enumerant" : "Uniform",
@@ -4965,8 +4964,7 @@
},
{
"enumerant" : "Sampled1D",
- "value" : 43,
- "capabilities" : [ "Shader" ]
+ "value" : 43
},
{
"enumerant" : "Image1D",
@@ -4980,8 +4978,7 @@
},
{
"enumerant" : "SampledBuffer",
- "value" : 46,
- "capabilities" : [ "Shader" ]
+ "value" : 46
},
{
"enumerant" : "ImageBuffer",
diff --git a/include/spirv/1.0/spirv.h b/include/spirv/1.0/spirv.h
index 6f46053..3a3b0eb 100644
--- a/include/spirv/1.0/spirv.h
+++ b/include/spirv/1.0/spirv.h
@@ -51,11 +51,11 @@
typedef unsigned int SpvId;
#define SPV_VERSION 0x10000
-#define SPV_REVISION 5
+#define SPV_REVISION 6
static const unsigned int SpvMagicNumber = 0x07230203;
static const unsigned int SpvVersion = 0x00010000;
-static const unsigned int SpvRevision = 5;
+static const unsigned int SpvRevision = 6;
static const unsigned int SpvOpCodeMask = 0xffff;
static const unsigned int SpvWordCountShift = 16;
@@ -65,6 +65,7 @@ typedef enum SpvSourceLanguage_ {
SpvSourceLanguageGLSL = 2,
SpvSourceLanguageOpenCL_C = 3,
SpvSourceLanguageOpenCL_CPP = 4,
+ SpvSourceLanguageMax = 0x7fffffff,
} SpvSourceLanguage;
typedef enum SpvExecutionModel_ {
@@ -75,18 +76,21 @@ typedef enum SpvExecutionModel_ {
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_ {
@@ -121,6 +125,7 @@ typedef enum SpvExecutionMode_ {
SpvExecutionModeOutputTriangleStrip = 29,
SpvExecutionModeVecTypeHint = 30,
SpvExecutionModeContractionOff = 31,
+ SpvExecutionModeMax = 0x7fffffff,
} SpvExecutionMode;
typedef enum SpvStorageClass_ {
@@ -136,6 +141,7 @@ typedef enum SpvStorageClass_ {
SpvStorageClassPushConstant = 9,
SpvStorageClassAtomicCounter = 10,
SpvStorageClassImage = 11,
+ SpvStorageClassMax = 0x7fffffff,
} SpvStorageClass;
typedef enum SpvDim_ {
@@ -146,6 +152,7 @@ typedef enum SpvDim_ {
SpvDimRect = 4,
SpvDimBuffer = 5,
SpvDimSubpassData = 6,
+ SpvDimMax = 0x7fffffff,
} SpvDim;
typedef enum SpvSamplerAddressingMode_ {
@@ -154,11 +161,13 @@ typedef enum SpvSamplerAddressingMode_ {
SpvSamplerAddressingModeClamp = 2,
SpvSamplerAddressingModeRepeat = 3,
SpvSamplerAddressingModeRepeatMirrored = 4,
+ SpvSamplerAddressingModeMax = 0x7fffffff,
} SpvSamplerAddressingMode;
typedef enum SpvSamplerFilterMode_ {
SpvSamplerFilterModeNearest = 0,
SpvSamplerFilterModeLinear = 1,
+ SpvSamplerFilterModeMax = 0x7fffffff,
} SpvSamplerFilterMode;
typedef enum SpvImageFormat_ {
@@ -202,6 +211,7 @@ typedef enum SpvImageFormat_ {
SpvImageFormatRg8ui = 37,
SpvImageFormatR16ui = 38,
SpvImageFormatR8ui = 39,
+ SpvImageFormatMax = 0x7fffffff,
} SpvImageFormat;
typedef enum SpvImageChannelOrder_ {
@@ -225,6 +235,7 @@ typedef enum SpvImageChannelOrder_ {
SpvImageChannelOrdersRGBA = 17,
SpvImageChannelOrdersBGRA = 18,
SpvImageChannelOrderABGR = 19,
+ SpvImageChannelOrderMax = 0x7fffffff,
} SpvImageChannelOrder;
typedef enum SpvImageChannelDataType_ {
@@ -245,6 +256,7 @@ typedef enum SpvImageChannelDataType_ {
SpvImageChannelDataTypeFloat = 14,
SpvImageChannelDataTypeUnormInt24 = 15,
SpvImageChannelDataTypeUnormInt101010_2 = 16,
+ SpvImageChannelDataTypeMax = 0x7fffffff,
} SpvImageChannelDataType;
typedef enum SpvImageOperandsShift_ {
@@ -256,6 +268,7 @@ typedef enum SpvImageOperandsShift_ {
SpvImageOperandsConstOffsetsShift = 5,
SpvImageOperandsSampleShift = 6,
SpvImageOperandsMinLodShift = 7,
+ SpvImageOperandsMax = 0x7fffffff,
} SpvImageOperandsShift;
typedef enum SpvImageOperandsMask_ {
@@ -276,6 +289,7 @@ typedef enum SpvFPFastMathModeShift_ {
SpvFPFastMathModeNSZShift = 2,
SpvFPFastMathModeAllowRecipShift = 3,
SpvFPFastMathModeFastShift = 4,
+ SpvFPFastMathModeMax = 0x7fffffff,
} SpvFPFastMathModeShift;
typedef enum SpvFPFastMathModeMask_ {
@@ -292,17 +306,20 @@ typedef enum SpvFPRoundingMode_ {
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_ {
@@ -314,6 +331,7 @@ typedef enum SpvFunctionParameterAttribute_ {
SpvFunctionParameterAttributeNoCapture = 5,
SpvFunctionParameterAttributeNoWrite = 6,
SpvFunctionParameterAttributeNoReadWrite = 7,
+ SpvFunctionParameterAttributeMax = 0x7fffffff,
} SpvFunctionParameterAttribute;
typedef enum SpvDecoration_ {
@@ -360,6 +378,7 @@ typedef enum SpvDecoration_ {
SpvDecorationNoContraction = 42,
SpvDecorationInputAttachmentIndex = 43,
SpvDecorationAlignment = 44,
+ SpvDecorationMax = 0x7fffffff,
} SpvDecoration;
typedef enum SpvBuiltIn_ {
@@ -404,11 +423,13 @@ typedef enum SpvBuiltIn_ {
SpvBuiltInSubgroupLocalInvocationId = 41,
SpvBuiltInVertexIndex = 42,
SpvBuiltInInstanceIndex = 43,
+ SpvBuiltInMax = 0x7fffffff,
} SpvBuiltIn;
typedef enum SpvSelectionControlShift_ {
SpvSelectionControlFlattenShift = 0,
SpvSelectionControlDontFlattenShift = 1,
+ SpvSelectionControlMax = 0x7fffffff,
} SpvSelectionControlShift;
typedef enum SpvSelectionControlMask_ {
@@ -420,6 +441,7 @@ typedef enum SpvSelectionControlMask_ {
typedef enum SpvLoopControlShift_ {
SpvLoopControlUnrollShift = 0,
SpvLoopControlDontUnrollShift = 1,
+ SpvLoopControlMax = 0x7fffffff,
} SpvLoopControlShift;
typedef enum SpvLoopControlMask_ {
@@ -433,6 +455,7 @@ typedef enum SpvFunctionControlShift_ {
SpvFunctionControlDontInlineShift = 1,
SpvFunctionControlPureShift = 2,
SpvFunctionControlConstShift = 3,
+ SpvFunctionControlMax = 0x7fffffff,
} SpvFunctionControlShift;
typedef enum SpvFunctionControlMask_ {
@@ -454,6 +477,7 @@ typedef enum SpvMemorySemanticsShift_ {
SpvMemorySemanticsCrossWorkgroupMemoryShift = 9,
SpvMemorySemanticsAtomicCounterMemoryShift = 10,
SpvMemorySemanticsImageMemoryShift = 11,
+ SpvMemorySemanticsMax = 0x7fffffff,
} SpvMemorySemanticsShift;
typedef enum SpvMemorySemanticsMask_ {
@@ -474,6 +498,7 @@ typedef enum SpvMemoryAccessShift_ {
SpvMemoryAccessVolatileShift = 0,
SpvMemoryAccessAlignedShift = 1,
SpvMemoryAccessNontemporalShift = 2,
+ SpvMemoryAccessMax = 0x7fffffff,
} SpvMemoryAccessShift;
typedef enum SpvMemoryAccessMask_ {
@@ -489,22 +514,26 @@ typedef enum SpvScope_ {
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_ {
@@ -569,6 +598,7 @@ typedef enum SpvCapability_ {
SpvCapabilityStorageImageReadWithoutFormat = 55,
SpvCapabilityStorageImageWriteWithoutFormat = 56,
SpvCapabilityMultiViewport = 57,
+ SpvCapabilityMax = 0x7fffffff,
} SpvCapability;
typedef enum SpvOp_ {
@@ -866,6 +896,7 @@ typedef enum SpvOp_ {
SpvOpAtomicFlagTestAndSet = 318,
SpvOpAtomicFlagClear = 319,
SpvOpImageSparseRead = 320,
+ SpvOpMax = 0x7fffffff,
} SpvOp;
#endif // #ifndef spirv_H
diff --git a/include/spirv/1.0/spirv.hpp b/include/spirv/1.0/spirv.hpp
index 987f3c1..6580f4c 100644
--- a/include/spirv/1.0/spirv.hpp
+++ b/include/spirv/1.0/spirv.hpp
@@ -47,11 +47,11 @@ namespace spv {
typedef unsigned int Id;
#define SPV_VERSION 0x10000
-#define SPV_REVISION 5
+#define SPV_REVISION 6
static const unsigned int MagicNumber = 0x07230203;
static const unsigned int Version = 0x00010000;
-static const unsigned int Revision = 5;
+static const unsigned int Revision = 6;
static const unsigned int OpCodeMask = 0xffff;
static const unsigned int WordCountShift = 16;
@@ -61,6 +61,7 @@ enum SourceLanguage {
SourceLanguageGLSL = 2,
SourceLanguageOpenCL_C = 3,
SourceLanguageOpenCL_CPP = 4,
+ SourceLanguageMax = 0x7fffffff,
};
enum ExecutionModel {
@@ -71,18 +72,21 @@ enum ExecutionModel {
ExecutionModelFragment = 4,
ExecutionModelGLCompute = 5,
ExecutionModelKernel = 6,
+ ExecutionModelMax = 0x7fffffff,
};
enum AddressingModel {
AddressingModelLogical = 0,
AddressingModelPhysical32 = 1,
AddressingModelPhysical64 = 2,
+ AddressingModelMax = 0x7fffffff,
};
enum MemoryModel {
MemoryModelSimple = 0,
MemoryModelGLSL450 = 1,
MemoryModelOpenCL = 2,
+ MemoryModelMax = 0x7fffffff,
};
enum ExecutionMode {
@@ -117,6 +121,7 @@ enum ExecutionMode {
ExecutionModeOutputTriangleStrip = 29,
ExecutionModeVecTypeHint = 30,
ExecutionModeContractionOff = 31,
+ ExecutionModeMax = 0x7fffffff,
};
enum StorageClass {
@@ -132,6 +137,7 @@ enum StorageClass {
StorageClassPushConstant = 9,
StorageClassAtomicCounter = 10,
StorageClassImage = 11,
+ StorageClassMax = 0x7fffffff,
};
enum Dim {
@@ -142,6 +148,7 @@ enum Dim {
DimRect = 4,
DimBuffer = 5,
DimSubpassData = 6,
+ DimMax = 0x7fffffff,
};
enum SamplerAddressingMode {
@@ -150,11 +157,13 @@ enum SamplerAddressingMode {
SamplerAddressingModeClamp = 2,
SamplerAddressingModeRepeat = 3,
SamplerAddressingModeRepeatMirrored = 4,
+ SamplerAddressingModeMax = 0x7fffffff,
};
enum SamplerFilterMode {
SamplerFilterModeNearest = 0,
SamplerFilterModeLinear = 1,
+ SamplerFilterModeMax = 0x7fffffff,
};
enum ImageFormat {
@@ -198,6 +207,7 @@ enum ImageFormat {
ImageFormatRg8ui = 37,
ImageFormatR16ui = 38,
ImageFormatR8ui = 39,
+ ImageFormatMax = 0x7fffffff,
};
enum ImageChannelOrder {
@@ -221,6 +231,7 @@ enum ImageChannelOrder {
ImageChannelOrdersRGBA = 17,
ImageChannelOrdersBGRA = 18,
ImageChannelOrderABGR = 19,
+ ImageChannelOrderMax = 0x7fffffff,
};
enum ImageChannelDataType {
@@ -241,6 +252,7 @@ enum ImageChannelDataType {
ImageChannelDataTypeFloat = 14,
ImageChannelDataTypeUnormInt24 = 15,
ImageChannelDataTypeUnormInt101010_2 = 16,
+ ImageChannelDataTypeMax = 0x7fffffff,
};
enum ImageOperandsShift {
@@ -252,6 +264,7 @@ enum ImageOperandsShift {
ImageOperandsConstOffsetsShift = 5,
ImageOperandsSampleShift = 6,
ImageOperandsMinLodShift = 7,
+ ImageOperandsMax = 0x7fffffff,
};
enum ImageOperandsMask {
@@ -272,6 +285,7 @@ enum FPFastMathModeShift {
FPFastMathModeNSZShift = 2,
FPFastMathModeAllowRecipShift = 3,
FPFastMathModeFastShift = 4,
+ FPFastMathModeMax = 0x7fffffff,
};
enum FPFastMathModeMask {
@@ -288,17 +302,20 @@ enum FPRoundingMode {
FPRoundingModeRTZ = 1,
FPRoundingModeRTP = 2,
FPRoundingModeRTN = 3,
+ FPRoundingModeMax = 0x7fffffff,
};
enum LinkageType {
LinkageTypeExport = 0,
LinkageTypeImport = 1,
+ LinkageTypeMax = 0x7fffffff,
};
enum AccessQualifier {
AccessQualifierReadOnly = 0,
AccessQualifierWriteOnly = 1,
AccessQualifierReadWrite = 2,
+ AccessQualifierMax = 0x7fffffff,
};
enum FunctionParameterAttribute {
@@ -310,6 +327,7 @@ enum FunctionParameterAttribute {
FunctionParameterAttributeNoCapture = 5,
FunctionParameterAttributeNoWrite = 6,
FunctionParameterAttributeNoReadWrite = 7,
+ FunctionParameterAttributeMax = 0x7fffffff,
};
enum Decoration {
@@ -356,6 +374,7 @@ enum Decoration {
DecorationNoContraction = 42,
DecorationInputAttachmentIndex = 43,
DecorationAlignment = 44,
+ DecorationMax = 0x7fffffff,
};
enum BuiltIn {
@@ -400,11 +419,13 @@ enum BuiltIn {
BuiltInSubgroupLocalInvocationId = 41,
BuiltInVertexIndex = 42,
BuiltInInstanceIndex = 43,
+ BuiltInMax = 0x7fffffff,
};
enum SelectionControlShift {
SelectionControlFlattenShift = 0,
SelectionControlDontFlattenShift = 1,
+ SelectionControlMax = 0x7fffffff,
};
enum SelectionControlMask {
@@ -416,6 +437,7 @@ enum SelectionControlMask {
enum LoopControlShift {
LoopControlUnrollShift = 0,
LoopControlDontUnrollShift = 1,
+ LoopControlMax = 0x7fffffff,
};
enum LoopControlMask {
@@ -429,6 +451,7 @@ enum FunctionControlShift {
FunctionControlDontInlineShift = 1,
FunctionControlPureShift = 2,
FunctionControlConstShift = 3,
+ FunctionControlMax = 0x7fffffff,
};
enum FunctionControlMask {
@@ -450,6 +473,7 @@ enum MemorySemanticsShift {
MemorySemanticsCrossWorkgroupMemoryShift = 9,
MemorySemanticsAtomicCounterMemoryShift = 10,
MemorySemanticsImageMemoryShift = 11,
+ MemorySemanticsMax = 0x7fffffff,
};
enum MemorySemanticsMask {
@@ -470,6 +494,7 @@ enum MemoryAccessShift {
MemoryAccessVolatileShift = 0,
MemoryAccessAlignedShift = 1,
MemoryAccessNontemporalShift = 2,
+ MemoryAccessMax = 0x7fffffff,
};
enum MemoryAccessMask {
@@ -485,22 +510,26 @@ enum Scope {
ScopeWorkgroup = 2,
ScopeSubgroup = 3,
ScopeInvocation = 4,
+ ScopeMax = 0x7fffffff,
};
enum GroupOperation {
GroupOperationReduce = 0,
GroupOperationInclusiveScan = 1,
GroupOperationExclusiveScan = 2,
+ GroupOperationMax = 0x7fffffff,
};
enum KernelEnqueueFlags {
KernelEnqueueFlagsNoWait = 0,
KernelEnqueueFlagsWaitKernel = 1,
KernelEnqueueFlagsWaitWorkGroup = 2,
+ KernelEnqueueFlagsMax = 0x7fffffff,
};
enum KernelProfilingInfoShift {
KernelProfilingInfoCmdExecTimeShift = 0,
+ KernelProfilingInfoMax = 0x7fffffff,
};
enum KernelProfilingInfoMask {
@@ -565,6 +594,7 @@ enum Capability {
CapabilityStorageImageReadWithoutFormat = 55,
CapabilityStorageImageWriteWithoutFormat = 56,
CapabilityMultiViewport = 57,
+ CapabilityMax = 0x7fffffff,
};
enum Op {
@@ -862,6 +892,7 @@ enum Op {
OpAtomicFlagTestAndSet = 318,
OpAtomicFlagClear = 319,
OpImageSparseRead = 320,
+ OpMax = 0x7fffffff,
};
// Overload operator| for mask bit combining
diff --git a/include/spirv/1.0/spirv.hpp11 b/include/spirv/1.0/spirv.hpp11
index 8091e53..8216197 100644
--- a/include/spirv/1.0/spirv.hpp11
+++ b/include/spirv/1.0/spirv.hpp11
@@ -47,11 +47,11 @@ namespace spv {
typedef unsigned int Id;
#define SPV_VERSION 0x10000
-#define SPV_REVISION 5
+#define SPV_REVISION 6
static const unsigned int MagicNumber = 0x07230203;
static const unsigned int Version = 0x00010000;
-static const unsigned int Revision = 5;
+static const unsigned int Revision = 6;
static const unsigned int OpCodeMask = 0xffff;
static const unsigned int WordCountShift = 16;
@@ -61,6 +61,7 @@ enum class SourceLanguage : unsigned {
GLSL = 2,
OpenCL_C = 3,
OpenCL_CPP = 4,
+ Max = 0x7fffffff,
};
enum class ExecutionModel : unsigned {
@@ -71,18 +72,21 @@ enum class ExecutionModel : unsigned {
Fragment = 4,
GLCompute = 5,
Kernel = 6,
+ Max = 0x7fffffff,
};
enum class AddressingModel : unsigned {
Logical = 0,
Physical32 = 1,
Physical64 = 2,
+ Max = 0x7fffffff,
};
enum class MemoryModel : unsigned {
Simple = 0,
GLSL450 = 1,
OpenCL = 2,
+ Max = 0x7fffffff,
};
enum class ExecutionMode : unsigned {
@@ -117,6 +121,7 @@ enum class ExecutionMode : unsigned {
OutputTriangleStrip = 29,
VecTypeHint = 30,
ContractionOff = 31,
+ Max = 0x7fffffff,
};
enum class StorageClass : unsigned {
@@ -132,6 +137,7 @@ enum class StorageClass : unsigned {
PushConstant = 9,
AtomicCounter = 10,
Image = 11,
+ Max = 0x7fffffff,
};
enum class Dim : unsigned {
@@ -142,6 +148,7 @@ enum class Dim : unsigned {
Rect = 4,
Buffer = 5,
SubpassData = 6,
+ Max = 0x7fffffff,
};
enum class SamplerAddressingMode : unsigned {
@@ -150,11 +157,13 @@ enum class SamplerAddressingMode : unsigned {
Clamp = 2,
Repeat = 3,
RepeatMirrored = 4,
+ Max = 0x7fffffff,
};
enum class SamplerFilterMode : unsigned {
Nearest = 0,
Linear = 1,
+ Max = 0x7fffffff,
};
enum class ImageFormat : unsigned {
@@ -198,6 +207,7 @@ enum class ImageFormat : unsigned {
Rg8ui = 37,
R16ui = 38,
R8ui = 39,
+ Max = 0x7fffffff,
};
enum class ImageChannelOrder : unsigned {
@@ -221,6 +231,7 @@ enum class ImageChannelOrder : unsigned {
sRGBA = 17,
sBGRA = 18,
ABGR = 19,
+ Max = 0x7fffffff,
};
enum class ImageChannelDataType : unsigned {
@@ -241,6 +252,7 @@ enum class ImageChannelDataType : unsigned {
Float = 14,
UnormInt24 = 15,
UnormInt101010_2 = 16,
+ Max = 0x7fffffff,
};
enum class ImageOperandsShift : unsigned {
@@ -252,6 +264,7 @@ enum class ImageOperandsShift : unsigned {
ConstOffsets = 5,
Sample = 6,
MinLod = 7,
+ Max = 0x7fffffff,
};
enum class ImageOperandsMask : unsigned {
@@ -272,6 +285,7 @@ enum class FPFastMathModeShift : unsigned {
NSZ = 2,
AllowRecip = 3,
Fast = 4,
+ Max = 0x7fffffff,
};
enum class FPFastMathModeMask : unsigned {
@@ -288,17 +302,20 @@ enum class FPRoundingMode : unsigned {
RTZ = 1,
RTP = 2,
RTN = 3,
+ Max = 0x7fffffff,
};
enum class LinkageType : unsigned {
Export = 0,
Import = 1,
+ Max = 0x7fffffff,
};
enum class AccessQualifier : unsigned {
ReadOnly = 0,
WriteOnly = 1,
ReadWrite = 2,
+ Max = 0x7fffffff,
};
enum class FunctionParameterAttribute : unsigned {
@@ -310,6 +327,7 @@ enum class FunctionParameterAttribute : unsigned {
NoCapture = 5,
NoWrite = 6,
NoReadWrite = 7,
+ Max = 0x7fffffff,
};
enum class Decoration : unsigned {
@@ -356,6 +374,7 @@ enum class Decoration : unsigned {
NoContraction = 42,
InputAttachmentIndex = 43,
Alignment = 44,
+ Max = 0x7fffffff,
};
enum class BuiltIn : unsigned {
@@ -400,11 +419,13 @@ enum class BuiltIn : unsigned {
SubgroupLocalInvocationId = 41,
VertexIndex = 42,
InstanceIndex = 43,
+ Max = 0x7fffffff,
};
enum class SelectionControlShift : unsigned {
Flatten = 0,
DontFlatten = 1,
+ Max = 0x7fffffff,
};
enum class SelectionControlMask : unsigned {
@@ -416,6 +437,7 @@ enum class SelectionControlMask : unsigned {
enum class LoopControlShift : unsigned {
Unroll = 0,
DontUnroll = 1,
+ Max = 0x7fffffff,
};
enum class LoopControlMask : unsigned {
@@ -429,6 +451,7 @@ enum class FunctionControlShift : unsigned {
DontInline = 1,
Pure = 2,
Const = 3,
+ Max = 0x7fffffff,
};
enum class FunctionControlMask : unsigned {
@@ -450,6 +473,7 @@ enum class MemorySemanticsShift : unsigned {
CrossWorkgroupMemory = 9,
AtomicCounterMemory = 10,
ImageMemory = 11,
+ Max = 0x7fffffff,
};
enum class MemorySemanticsMask : unsigned {
@@ -470,6 +494,7 @@ enum class MemoryAccessShift : unsigned {
Volatile = 0,
Aligned = 1,
Nontemporal = 2,
+ Max = 0x7fffffff,
};
enum class MemoryAccessMask : unsigned {
@@ -485,22 +510,26 @@ enum class Scope : unsigned {
Workgroup = 2,
Subgroup = 3,
Invocation = 4,
+ Max = 0x7fffffff,
};
enum class GroupOperation : unsigned {
Reduce = 0,
InclusiveScan = 1,
ExclusiveScan = 2,
+ Max = 0x7fffffff,
};
enum class KernelEnqueueFlags : unsigned {
NoWait = 0,
WaitKernel = 1,
WaitWorkGroup = 2,
+ Max = 0x7fffffff,
};
enum class KernelProfilingInfoShift : unsigned {
CmdExecTime = 0,
+ Max = 0x7fffffff,
};
enum class KernelProfilingInfoMask : unsigned {
@@ -565,6 +594,7 @@ enum class Capability : unsigned {
StorageImageReadWithoutFormat = 55,
StorageImageWriteWithoutFormat = 56,
MultiViewport = 57,
+ Max = 0x7fffffff,
};
enum class Op : unsigned {
@@ -862,6 +892,7 @@ enum class Op : unsigned {
OpAtomicFlagTestAndSet = 318,
OpAtomicFlagClear = 319,
OpImageSparseRead = 320,
+ Max = 0x7fffffff,
};
// Overload operator| for mask bit combining
diff --git a/include/spirv/1.0/spirv.json b/include/spirv/1.0/spirv.json
index 593c14a..aa8a111 100644
--- a/include/spirv/1.0/spirv.json
+++ b/include/spirv/1.0/spirv.json
@@ -52,7 +52,7 @@
],
"MagicNumber": 119734787,
"Version": 65536,
- "Revision": 5,
+ "Revision": 6,
"OpCodeMask": 65535,
"WordCountShift": 16
},
diff --git a/include/spirv/1.0/spirv.lua b/include/spirv/1.0/spirv.lua
index 0008030..f346076 100644
--- a/include/spirv/1.0/spirv.lua
+++ b/include/spirv/1.0/spirv.lua
@@ -42,7 +42,7 @@
spv = {
MagicNumber = 0x07230203,
Version = 0x00010000,
- Revision = 5,
+ Revision = 6,
OpCodeMask = 0xffff,
WordCountShift = 16,
diff --git a/include/spirv/1.0/spirv.py b/include/spirv/1.0/spirv.py
index 137f289..c8949ec 100644
--- a/include/spirv/1.0/spirv.py
+++ b/include/spirv/1.0/spirv.py
@@ -42,7 +42,7 @@
spv = {
'MagicNumber' : 0x07230203,
'Version' : 0x00010000,
- 'Revision' : 5,
+ 'Revision' : 6,
'OpCodeMask' : 0xffff,
'WordCountShift' : 16,
diff --git a/include/spirv/1.1/GLSL.std.450.h b/include/spirv/1.1/GLSL.std.450.h
new file mode 100644
index 0000000..54cc00e
--- /dev/null
+++ b/include/spirv/1.1/GLSL.std.450.h
@@ -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
diff --git a/include/spirv/1.1/OpenCL.std.h b/include/spirv/1.1/OpenCL.std.h
new file mode 100644
index 0000000..a077bdc
--- /dev/null
+++ b/include/spirv/1.1/OpenCL.std.h
@@ -0,0 +1,272 @@
+/*
+** Copyright (c) 2015-2016 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a copy
+** of this software and/or associated documentation files (the "Materials"),
+** to deal in the Materials without restriction, including without limitation
+** the rights to use, copy, modify, merge, publish, distribute, sublicense,
+** and/or sell copies of the Materials, and to permit persons to whom the
+** Materials are furnished to do so, subject to the following conditions:
+**
+** The above copyright notice and this permission notice shall be included in
+** all copies or substantial portions of the Materials.
+**
+** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
+** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
+** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
+** IN THE MATERIALS.
+*/
+
+//
+// Author: Boaz Ouriel, Intel
+//
+
+namespace OpenCLLIB {
+
+enum Entrypoints {
+
+ // math functions
+ 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,
+
+ // Common
+ FClamp = 95,
+ Degrees = 96,
+ FMax_common = 97,
+ FMin_common = 98,
+ Mix = 99,
+ Radians = 100,
+ Step = 101,
+ Smoothstep = 102,
+ Sign = 103,
+
+ // Geometrics
+ Cross = 104,
+ Distance = 105,
+ Length = 106,
+ Normalize = 107,
+ Fast_distance = 108,
+ Fast_length = 109,
+ Fast_normalize = 110,
+
+ // Images - Deprecated
+ Read_imagef = 111,
+ Read_imagei = 112,
+ Read_imageui = 113,
+ Read_imageh = 114,
+
+ Read_imagef_samplerless = 115,
+ Read_imagei_samplerless = 116,
+ Read_imageui_samplerless = 117,
+ Read_imageh_samplerless = 118,
+
+ Write_imagef = 119,
+ Write_imagei = 120,
+ Write_imageui = 121,
+ Write_imageh = 122,
+ Read_imagef_mipmap_lod = 123,
+ Read_imagei_mipmap_lod = 124,
+ Read_imageui_mipmap_lod = 125,
+ Read_imagef_mipmap_grad = 126,
+ Read_imagei_mipmap_grad = 127,
+ Read_imageui_mipmap_grad = 128,
+
+ // Image write with LOD
+ Write_imagef_mipmap_lod = 129,
+ Write_imagei_mipmap_lod = 130,
+ Write_imageui_mipmap_lod = 131,
+
+ // Images - Deprecated
+ Get_image_width = 132,
+ Get_image_height = 133,
+ Get_image_depth = 134,
+ Get_image_channel_data_type = 135,
+ Get_image_channel_order = 136,
+ Get_image_dim = 137,
+ Get_image_array_size = 138,
+ Get_image_num_samples = 139,
+ Get_image_num_mip_levels = 140,
+
+ // Integers
+ 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,
+
+ // Vector Loads/Stores
+ 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,
+
+ // Vector Misc
+ Shuffle = 182,
+ Shuffle2 = 183,
+
+ //
+ Printf = 184,
+ Prefetch = 185,
+
+ // Relationals
+ Bitselect = 186,
+ Select = 187,
+
+ // pipes
+ Read_pipe = 188,
+ Write_pipe = 189,
+ Reserve_read_pipe = 190,
+ Reserve_write_pipe = 191,
+ Commit_read_pipe = 192,
+ Commit_write_pipe = 193,
+ Is_valid_reserve_id = 194,
+ Work_group_reserve_read_pipe = 195,
+ Work_group_reserve_write_pipe = 196,
+ Work_group_commit_read_pipe = 197,
+ Work_group_commit_write_pipe = 198,
+ Get_pipe_num_packets = 199,
+ Get_pipe_max_packets = 200,
+
+ // more integers
+ UAbs = 201,
+ UAbs_diff = 202,
+ UMul_hi = 203,
+ UMad_hi = 204
+};
+
+
+
+} // end namespace OpenCL20
+
diff --git a/include/spirv/1.1/extinst.glsl.std.450.grammar.json b/include/spirv/1.1/extinst.glsl.std.450.grammar.json
new file mode 100644
index 0000000..3d9f39e
--- /dev/null
+++ b/include/spirv/1.1/extinst.glsl.std.450.grammar.json
@@ -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'" }
+ ]
+ }
+ ]
+}
diff --git a/include/spirv/1.1/spirv.core.grammar.json b/include/spirv/1.1/spirv.core.grammar.json
index eb55ccb..0ab09f7 100644
--- a/include/spirv/1.1/spirv.core.grammar.json
+++ b/include/spirv/1.1/spirv.core.grammar.json
@@ -27,7 +27,7 @@
"magic_number" : "0x07230203",
"major_version" : 1,
"minor_version" : 1,
- "revision" : 1,
+ "revision" : 2,
"instructions" : [
{
"opname" : "OpNop",
@@ -3710,8 +3710,7 @@
},
{
"enumerant" : "Input",
- "value" : 1,
- "capabilities" : [ "Shader" ]
+ "value" : 1
},
{
"enumerant" : "Uniform",
@@ -5113,8 +5112,7 @@
},
{
"enumerant" : "Sampled1D",
- "value" : 43,
- "capabilities" : [ "Shader" ]
+ "value" : 43
},
{
"enumerant" : "Image1D",
@@ -5128,8 +5126,7 @@
},
{
"enumerant" : "SampledBuffer",
- "value" : 46,
- "capabilities" : [ "Shader" ]
+ "value" : 46
},
{
"enumerant" : "ImageBuffer",
diff --git a/include/spirv/1.1/spirv.h b/include/spirv/1.1/spirv.h
index 7b5281a..40e462f 100644
--- a/include/spirv/1.1/spirv.h
+++ b/include/spirv/1.1/spirv.h
@@ -51,11 +51,11 @@
typedef unsigned int SpvId;
#define SPV_VERSION 0x10100
-#define SPV_REVISION 1
+#define SPV_REVISION 2
static const unsigned int SpvMagicNumber = 0x07230203;
static const unsigned int SpvVersion = 0x00010100;
-static const unsigned int SpvRevision = 1;
+static const unsigned int SpvRevision = 2;
static const unsigned int SpvOpCodeMask = 0xffff;
static const unsigned int SpvWordCountShift = 16;
@@ -65,6 +65,7 @@ typedef enum SpvSourceLanguage_ {
SpvSourceLanguageGLSL = 2,
SpvSourceLanguageOpenCL_C = 3,
SpvSourceLanguageOpenCL_CPP = 4,
+ SpvSourceLanguageMax = 0x7fffffff,
} SpvSourceLanguage;
typedef enum SpvExecutionModel_ {
@@ -75,18 +76,21 @@ typedef enum SpvExecutionModel_ {
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_ {
@@ -125,6 +129,7 @@ typedef enum SpvExecutionMode_ {
SpvExecutionModeFinalizer = 34,
SpvExecutionModeSubgroupSize = 35,
SpvExecutionModeSubgroupsPerWorkgroup = 36,
+ SpvExecutionModeMax = 0x7fffffff,
} SpvExecutionMode;
typedef enum SpvStorageClass_ {
@@ -140,6 +145,7 @@ typedef enum SpvStorageClass_ {
SpvStorageClassPushConstant = 9,
SpvStorageClassAtomicCounter = 10,
SpvStorageClassImage = 11,
+ SpvStorageClassMax = 0x7fffffff,
} SpvStorageClass;
typedef enum SpvDim_ {
@@ -150,6 +156,7 @@ typedef enum SpvDim_ {
SpvDimRect = 4,
SpvDimBuffer = 5,
SpvDimSubpassData = 6,
+ SpvDimMax = 0x7fffffff,
} SpvDim;
typedef enum SpvSamplerAddressingMode_ {
@@ -158,11 +165,13 @@ typedef enum SpvSamplerAddressingMode_ {
SpvSamplerAddressingModeClamp = 2,
SpvSamplerAddressingModeRepeat = 3,
SpvSamplerAddressingModeRepeatMirrored = 4,
+ SpvSamplerAddressingModeMax = 0x7fffffff,
} SpvSamplerAddressingMode;
typedef enum SpvSamplerFilterMode_ {
SpvSamplerFilterModeNearest = 0,
SpvSamplerFilterModeLinear = 1,
+ SpvSamplerFilterModeMax = 0x7fffffff,
} SpvSamplerFilterMode;
typedef enum SpvImageFormat_ {
@@ -206,6 +215,7 @@ typedef enum SpvImageFormat_ {
SpvImageFormatRg8ui = 37,
SpvImageFormatR16ui = 38,
SpvImageFormatR8ui = 39,
+ SpvImageFormatMax = 0x7fffffff,
} SpvImageFormat;
typedef enum SpvImageChannelOrder_ {
@@ -229,6 +239,7 @@ typedef enum SpvImageChannelOrder_ {
SpvImageChannelOrdersRGBA = 17,
SpvImageChannelOrdersBGRA = 18,
SpvImageChannelOrderABGR = 19,
+ SpvImageChannelOrderMax = 0x7fffffff,
} SpvImageChannelOrder;
typedef enum SpvImageChannelDataType_ {
@@ -249,6 +260,7 @@ typedef enum SpvImageChannelDataType_ {
SpvImageChannelDataTypeFloat = 14,
SpvImageChannelDataTypeUnormInt24 = 15,
SpvImageChannelDataTypeUnormInt101010_2 = 16,
+ SpvImageChannelDataTypeMax = 0x7fffffff,
} SpvImageChannelDataType;
typedef enum SpvImageOperandsShift_ {
@@ -260,6 +272,7 @@ typedef enum SpvImageOperandsShift_ {
SpvImageOperandsConstOffsetsShift = 5,
SpvImageOperandsSampleShift = 6,
SpvImageOperandsMinLodShift = 7,
+ SpvImageOperandsMax = 0x7fffffff,
} SpvImageOperandsShift;
typedef enum SpvImageOperandsMask_ {
@@ -280,6 +293,7 @@ typedef enum SpvFPFastMathModeShift_ {
SpvFPFastMathModeNSZShift = 2,
SpvFPFastMathModeAllowRecipShift = 3,
SpvFPFastMathModeFastShift = 4,
+ SpvFPFastMathModeMax = 0x7fffffff,
} SpvFPFastMathModeShift;
typedef enum SpvFPFastMathModeMask_ {
@@ -296,17 +310,20 @@ typedef enum SpvFPRoundingMode_ {
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_ {
@@ -318,6 +335,7 @@ typedef enum SpvFunctionParameterAttribute_ {
SpvFunctionParameterAttributeNoCapture = 5,
SpvFunctionParameterAttributeNoWrite = 6,
SpvFunctionParameterAttributeNoReadWrite = 7,
+ SpvFunctionParameterAttributeMax = 0x7fffffff,
} SpvFunctionParameterAttribute;
typedef enum SpvDecoration_ {
@@ -365,6 +383,7 @@ typedef enum SpvDecoration_ {
SpvDecorationInputAttachmentIndex = 43,
SpvDecorationAlignment = 44,
SpvDecorationMaxByteOffset = 45,
+ SpvDecorationMax = 0x7fffffff,
} SpvDecoration;
typedef enum SpvBuiltIn_ {
@@ -409,11 +428,13 @@ typedef enum SpvBuiltIn_ {
SpvBuiltInSubgroupLocalInvocationId = 41,
SpvBuiltInVertexIndex = 42,
SpvBuiltInInstanceIndex = 43,
+ SpvBuiltInMax = 0x7fffffff,
} SpvBuiltIn;
typedef enum SpvSelectionControlShift_ {
SpvSelectionControlFlattenShift = 0,
SpvSelectionControlDontFlattenShift = 1,
+ SpvSelectionControlMax = 0x7fffffff,
} SpvSelectionControlShift;
typedef enum SpvSelectionControlMask_ {
@@ -427,6 +448,7 @@ typedef enum SpvLoopControlShift_ {
SpvLoopControlDontUnrollShift = 1,
SpvLoopControlDependencyInfiniteShift = 2,
SpvLoopControlDependencyLengthShift = 3,
+ SpvLoopControlMax = 0x7fffffff,
} SpvLoopControlShift;
typedef enum SpvLoopControlMask_ {
@@ -442,6 +464,7 @@ typedef enum SpvFunctionControlShift_ {
SpvFunctionControlDontInlineShift = 1,
SpvFunctionControlPureShift = 2,
SpvFunctionControlConstShift = 3,
+ SpvFunctionControlMax = 0x7fffffff,
} SpvFunctionControlShift;
typedef enum SpvFunctionControlMask_ {
@@ -463,6 +486,7 @@ typedef enum SpvMemorySemanticsShift_ {
SpvMemorySemanticsCrossWorkgroupMemoryShift = 9,
SpvMemorySemanticsAtomicCounterMemoryShift = 10,
SpvMemorySemanticsImageMemoryShift = 11,
+ SpvMemorySemanticsMax = 0x7fffffff,
} SpvMemorySemanticsShift;
typedef enum SpvMemorySemanticsMask_ {
@@ -483,6 +507,7 @@ typedef enum SpvMemoryAccessShift_ {
SpvMemoryAccessVolatileShift = 0,
SpvMemoryAccessAlignedShift = 1,
SpvMemoryAccessNontemporalShift = 2,
+ SpvMemoryAccessMax = 0x7fffffff,
} SpvMemoryAccessShift;
typedef enum SpvMemoryAccessMask_ {
@@ -498,22 +523,26 @@ typedef enum SpvScope_ {
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_ {
@@ -581,6 +610,7 @@ typedef enum SpvCapability_ {
SpvCapabilitySubgroupDispatch = 58,
SpvCapabilityNamedBarrier = 59,
SpvCapabilityPipeStorage = 60,
+ SpvCapabilityMax = 0x7fffffff,
} SpvCapability;
typedef enum SpvOp_ {
@@ -888,6 +918,7 @@ typedef enum SpvOp_ {
SpvOpNamedBarrierInitialize = 328,
SpvOpMemoryNamedBarrier = 329,
SpvOpModuleProcessed = 330,
+ SpvOpMax = 0x7fffffff,
} SpvOp;
#endif // #ifndef spirv_H
diff --git a/include/spirv/1.1/spirv.hpp b/include/spirv/1.1/spirv.hpp
index 9fd7fee..3c22d85 100644
--- a/include/spirv/1.1/spirv.hpp
+++ b/include/spirv/1.1/spirv.hpp
@@ -47,11 +47,11 @@ namespace spv {
typedef unsigned int Id;
#define SPV_VERSION 0x10100
-#define SPV_REVISION 1
+#define SPV_REVISION 2
static const unsigned int MagicNumber = 0x07230203;
static const unsigned int Version = 0x00010100;
-static const unsigned int Revision = 1;
+static const unsigned int Revision = 2;
static const unsigned int OpCodeMask = 0xffff;
static const unsigned int WordCountShift = 16;
@@ -61,6 +61,7 @@ enum SourceLanguage {
SourceLanguageGLSL = 2,
SourceLanguageOpenCL_C = 3,
SourceLanguageOpenCL_CPP = 4,
+ SourceLanguageMax = 0x7fffffff,
};
enum ExecutionModel {
@@ -71,18 +72,21 @@ enum ExecutionModel {
ExecutionModelFragment = 4,
ExecutionModelGLCompute = 5,
ExecutionModelKernel = 6,
+ ExecutionModelMax = 0x7fffffff,
};
enum AddressingModel {
AddressingModelLogical = 0,
AddressingModelPhysical32 = 1,
AddressingModelPhysical64 = 2,
+ AddressingModelMax = 0x7fffffff,
};
enum MemoryModel {
MemoryModelSimple = 0,
MemoryModelGLSL450 = 1,
MemoryModelOpenCL = 2,
+ MemoryModelMax = 0x7fffffff,
};
enum ExecutionMode {
@@ -121,6 +125,7 @@ enum ExecutionMode {
ExecutionModeFinalizer = 34,
ExecutionModeSubgroupSize = 35,
ExecutionModeSubgroupsPerWorkgroup = 36,
+ ExecutionModeMax = 0x7fffffff,
};
enum StorageClass {
@@ -136,6 +141,7 @@ enum StorageClass {
StorageClassPushConstant = 9,
StorageClassAtomicCounter = 10,
StorageClassImage = 11,
+ StorageClassMax = 0x7fffffff,
};
enum Dim {
@@ -146,6 +152,7 @@ enum Dim {
DimRect = 4,
DimBuffer = 5,
DimSubpassData = 6,
+ DimMax = 0x7fffffff,
};
enum SamplerAddressingMode {
@@ -154,11 +161,13 @@ enum SamplerAddressingMode {
SamplerAddressingModeClamp = 2,
SamplerAddressingModeRepeat = 3,
SamplerAddressingModeRepeatMirrored = 4,
+ SamplerAddressingModeMax = 0x7fffffff,
};
enum SamplerFilterMode {
SamplerFilterModeNearest = 0,
SamplerFilterModeLinear = 1,
+ SamplerFilterModeMax = 0x7fffffff,
};
enum ImageFormat {
@@ -202,6 +211,7 @@ enum ImageFormat {
ImageFormatRg8ui = 37,
ImageFormatR16ui = 38,
ImageFormatR8ui = 39,
+ ImageFormatMax = 0x7fffffff,
};
enum ImageChannelOrder {
@@ -225,6 +235,7 @@ enum ImageChannelOrder {
ImageChannelOrdersRGBA = 17,
ImageChannelOrdersBGRA = 18,
ImageChannelOrderABGR = 19,
+ ImageChannelOrderMax = 0x7fffffff,
};
enum ImageChannelDataType {
@@ -245,6 +256,7 @@ enum ImageChannelDataType {
ImageChannelDataTypeFloat = 14,
ImageChannelDataTypeUnormInt24 = 15,
ImageChannelDataTypeUnormInt101010_2 = 16,
+ ImageChannelDataTypeMax = 0x7fffffff,
};
enum ImageOperandsShift {
@@ -256,6 +268,7 @@ enum ImageOperandsShift {
ImageOperandsConstOffsetsShift = 5,
ImageOperandsSampleShift = 6,
ImageOperandsMinLodShift = 7,
+ ImageOperandsMax = 0x7fffffff,
};
enum ImageOperandsMask {
@@ -276,6 +289,7 @@ enum FPFastMathModeShift {
FPFastMathModeNSZShift = 2,
FPFastMathModeAllowRecipShift = 3,
FPFastMathModeFastShift = 4,
+ FPFastMathModeMax = 0x7fffffff,
};
enum FPFastMathModeMask {
@@ -292,17 +306,20 @@ enum FPRoundingMode {
FPRoundingModeRTZ = 1,
FPRoundingModeRTP = 2,
FPRoundingModeRTN = 3,
+ FPRoundingModeMax = 0x7fffffff,
};
enum LinkageType {
LinkageTypeExport = 0,
LinkageTypeImport = 1,
+ LinkageTypeMax = 0x7fffffff,
};
enum AccessQualifier {
AccessQualifierReadOnly = 0,
AccessQualifierWriteOnly = 1,
AccessQualifierReadWrite = 2,
+ AccessQualifierMax = 0x7fffffff,
};
enum FunctionParameterAttribute {
@@ -314,6 +331,7 @@ enum FunctionParameterAttribute {
FunctionParameterAttributeNoCapture = 5,
FunctionParameterAttributeNoWrite = 6,
FunctionParameterAttributeNoReadWrite = 7,
+ FunctionParameterAttributeMax = 0x7fffffff,
};
enum Decoration {
@@ -361,6 +379,7 @@ enum Decoration {
DecorationInputAttachmentIndex = 43,
DecorationAlignment = 44,
DecorationMaxByteOffset = 45,
+ DecorationMax = 0x7fffffff,
};
enum BuiltIn {
@@ -405,11 +424,13 @@ enum BuiltIn {
BuiltInSubgroupLocalInvocationId = 41,
BuiltInVertexIndex = 42,
BuiltInInstanceIndex = 43,
+ BuiltInMax = 0x7fffffff,
};
enum SelectionControlShift {
SelectionControlFlattenShift = 0,
SelectionControlDontFlattenShift = 1,
+ SelectionControlMax = 0x7fffffff,
};
enum SelectionControlMask {
@@ -423,6 +444,7 @@ enum LoopControlShift {
LoopControlDontUnrollShift = 1,
LoopControlDependencyInfiniteShift = 2,
LoopControlDependencyLengthShift = 3,
+ LoopControlMax = 0x7fffffff,
};
enum LoopControlMask {
@@ -438,6 +460,7 @@ enum FunctionControlShift {
FunctionControlDontInlineShift = 1,
FunctionControlPureShift = 2,
FunctionControlConstShift = 3,
+ FunctionControlMax = 0x7fffffff,
};
enum FunctionControlMask {
@@ -459,6 +482,7 @@ enum MemorySemanticsShift {
MemorySemanticsCrossWorkgroupMemoryShift = 9,
MemorySemanticsAtomicCounterMemoryShift = 10,
MemorySemanticsImageMemoryShift = 11,
+ MemorySemanticsMax = 0x7fffffff,
};
enum MemorySemanticsMask {
@@ -479,6 +503,7 @@ enum MemoryAccessShift {
MemoryAccessVolatileShift = 0,
MemoryAccessAlignedShift = 1,
MemoryAccessNontemporalShift = 2,
+ MemoryAccessMax = 0x7fffffff,
};
enum MemoryAccessMask {
@@ -494,22 +519,26 @@ enum Scope {
ScopeWorkgroup = 2,
ScopeSubgroup = 3,
ScopeInvocation = 4,
+ ScopeMax = 0x7fffffff,
};
enum GroupOperation {
GroupOperationReduce = 0,
GroupOperationInclusiveScan = 1,
GroupOperationExclusiveScan = 2,
+ GroupOperationMax = 0x7fffffff,
};
enum KernelEnqueueFlags {
KernelEnqueueFlagsNoWait = 0,
KernelEnqueueFlagsWaitKernel = 1,
KernelEnqueueFlagsWaitWorkGroup = 2,
+ KernelEnqueueFlagsMax = 0x7fffffff,
};
enum KernelProfilingInfoShift {
KernelProfilingInfoCmdExecTimeShift = 0,
+ KernelProfilingInfoMax = 0x7fffffff,
};
enum KernelProfilingInfoMask {
@@ -577,6 +606,7 @@ enum Capability {
CapabilitySubgroupDispatch = 58,
CapabilityNamedBarrier = 59,
CapabilityPipeStorage = 60,
+ CapabilityMax = 0x7fffffff,
};
enum Op {
@@ -884,6 +914,7 @@ enum Op {
OpNamedBarrierInitialize = 328,
OpMemoryNamedBarrier = 329,
OpModuleProcessed = 330,
+ OpMax = 0x7fffffff,
};
// Overload operator| for mask bit combining
diff --git a/include/spirv/1.1/spirv.hpp11 b/include/spirv/1.1/spirv.hpp11
index 27448c7..8f32cfc 100644
--- a/include/spirv/1.1/spirv.hpp11
+++ b/include/spirv/1.1/spirv.hpp11
@@ -47,11 +47,11 @@ namespace spv {
typedef unsigned int Id;
#define SPV_VERSION 0x10100
-#define SPV_REVISION 1
+#define SPV_REVISION 2
static const unsigned int MagicNumber = 0x07230203;
static const unsigned int Version = 0x00010100;
-static const unsigned int Revision = 1;
+static const unsigned int Revision = 2;
static const unsigned int OpCodeMask = 0xffff;
static const unsigned int WordCountShift = 16;
@@ -61,6 +61,7 @@ enum class SourceLanguage : unsigned {
GLSL = 2,
OpenCL_C = 3,
OpenCL_CPP = 4,
+ Max = 0x7fffffff,
};
enum class ExecutionModel : unsigned {
@@ -71,18 +72,21 @@ enum class ExecutionModel : unsigned {
Fragment = 4,
GLCompute = 5,
Kernel = 6,
+ Max = 0x7fffffff,
};
enum class AddressingModel : unsigned {
Logical = 0,
Physical32 = 1,
Physical64 = 2,
+ Max = 0x7fffffff,
};
enum class MemoryModel : unsigned {
Simple = 0,
GLSL450 = 1,
OpenCL = 2,
+ Max = 0x7fffffff,
};
enum class ExecutionMode : unsigned {
@@ -121,6 +125,7 @@ enum class ExecutionMode : unsigned {
Finalizer = 34,
SubgroupSize = 35,
SubgroupsPerWorkgroup = 36,
+ Max = 0x7fffffff,
};
enum class StorageClass : unsigned {
@@ -136,6 +141,7 @@ enum class StorageClass : unsigned {
PushConstant = 9,
AtomicCounter = 10,
Image = 11,
+ Max = 0x7fffffff,
};
enum class Dim : unsigned {
@@ -146,6 +152,7 @@ enum class Dim : unsigned {
Rect = 4,
Buffer = 5,
SubpassData = 6,
+ Max = 0x7fffffff,
};
enum class SamplerAddressingMode : unsigned {
@@ -154,11 +161,13 @@ enum class SamplerAddressingMode : unsigned {
Clamp = 2,
Repeat = 3,
RepeatMirrored = 4,
+ Max = 0x7fffffff,
};
enum class SamplerFilterMode : unsigned {
Nearest = 0,
Linear = 1,
+ Max = 0x7fffffff,
};
enum class ImageFormat : unsigned {
@@ -202,6 +211,7 @@ enum class ImageFormat : unsigned {
Rg8ui = 37,
R16ui = 38,
R8ui = 39,
+ Max = 0x7fffffff,
};
enum class ImageChannelOrder : unsigned {
@@ -225,6 +235,7 @@ enum class ImageChannelOrder : unsigned {
sRGBA = 17,
sBGRA = 18,
ABGR = 19,
+ Max = 0x7fffffff,
};
enum class ImageChannelDataType : unsigned {
@@ -245,6 +256,7 @@ enum class ImageChannelDataType : unsigned {
Float = 14,
UnormInt24 = 15,
UnormInt101010_2 = 16,
+ Max = 0x7fffffff,
};
enum class ImageOperandsShift : unsigned {
@@ -256,6 +268,7 @@ enum class ImageOperandsShift : unsigned {
ConstOffsets = 5,
Sample = 6,
MinLod = 7,
+ Max = 0x7fffffff,
};
enum class ImageOperandsMask : unsigned {
@@ -276,6 +289,7 @@ enum class FPFastMathModeShift : unsigned {
NSZ = 2,
AllowRecip = 3,
Fast = 4,
+ Max = 0x7fffffff,
};
enum class FPFastMathModeMask : unsigned {
@@ -292,17 +306,20 @@ enum class FPRoundingMode : unsigned {
RTZ = 1,
RTP = 2,
RTN = 3,
+ Max = 0x7fffffff,
};
enum class LinkageType : unsigned {
Export = 0,
Import = 1,
+ Max = 0x7fffffff,
};
enum class AccessQualifier : unsigned {
ReadOnly = 0,
WriteOnly = 1,
ReadWrite = 2,
+ Max = 0x7fffffff,
};
enum class FunctionParameterAttribute : unsigned {
@@ -314,6 +331,7 @@ enum class FunctionParameterAttribute : unsigned {
NoCapture = 5,
NoWrite = 6,
NoReadWrite = 7,
+ Max = 0x7fffffff,
};
enum class Decoration : unsigned {
@@ -361,6 +379,7 @@ enum class Decoration : unsigned {
InputAttachmentIndex = 43,
Alignment = 44,
MaxByteOffset = 45,
+ Max = 0x7fffffff,
};
enum class BuiltIn : unsigned {
@@ -405,11 +424,13 @@ enum class BuiltIn : unsigned {
SubgroupLocalInvocationId = 41,
VertexIndex = 42,
InstanceIndex = 43,
+ Max = 0x7fffffff,
};
enum class SelectionControlShift : unsigned {
Flatten = 0,
DontFlatten = 1,
+ Max = 0x7fffffff,
};
enum class SelectionControlMask : unsigned {
@@ -423,6 +444,7 @@ enum class LoopControlShift : unsigned {
DontUnroll = 1,
DependencyInfinite = 2,
DependencyLength = 3,
+ Max = 0x7fffffff,
};
enum class LoopControlMask : unsigned {
@@ -438,6 +460,7 @@ enum class FunctionControlShift : unsigned {
DontInline = 1,
Pure = 2,
Const = 3,
+ Max = 0x7fffffff,
};
enum class FunctionControlMask : unsigned {
@@ -459,6 +482,7 @@ enum class MemorySemanticsShift : unsigned {
CrossWorkgroupMemory = 9,
AtomicCounterMemory = 10,
ImageMemory = 11,
+ Max = 0x7fffffff,
};
enum class MemorySemanticsMask : unsigned {
@@ -479,6 +503,7 @@ enum class MemoryAccessShift : unsigned {
Volatile = 0,
Aligned = 1,
Nontemporal = 2,
+ Max = 0x7fffffff,
};
enum class MemoryAccessMask : unsigned {
@@ -494,22 +519,26 @@ enum class Scope : unsigned {
Workgroup = 2,
Subgroup = 3,
Invocation = 4,
+ Max = 0x7fffffff,
};
enum class GroupOperation : unsigned {
Reduce = 0,
InclusiveScan = 1,
ExclusiveScan = 2,
+ Max = 0x7fffffff,
};
enum class KernelEnqueueFlags : unsigned {
NoWait = 0,
WaitKernel = 1,
WaitWorkGroup = 2,
+ Max = 0x7fffffff,
};
enum class KernelProfilingInfoShift : unsigned {
CmdExecTime = 0,
+ Max = 0x7fffffff,
};
enum class KernelProfilingInfoMask : unsigned {
@@ -577,6 +606,7 @@ enum class Capability : unsigned {
SubgroupDispatch = 58,
NamedBarrier = 59,
PipeStorage = 60,
+ Max = 0x7fffffff,
};
enum class Op : unsigned {
@@ -884,6 +914,7 @@ enum class Op : unsigned {
OpNamedBarrierInitialize = 328,
OpMemoryNamedBarrier = 329,
OpModuleProcessed = 330,
+ Max = 0x7fffffff,
};
// Overload operator| for mask bit combining
diff --git a/include/spirv/1.1/spirv.json b/include/spirv/1.1/spirv.json
index 1bd13ee..312edd6 100644
--- a/include/spirv/1.1/spirv.json
+++ b/include/spirv/1.1/spirv.json
@@ -52,7 +52,7 @@
],
"MagicNumber": 119734787,
"Version": 65792,
- "Revision": 1,
+ "Revision": 2,
"OpCodeMask": 65535,
"WordCountShift": 16
},
diff --git a/include/spirv/1.1/spirv.lua b/include/spirv/1.1/spirv.lua
index d93b00c..9e0b095 100644
--- a/include/spirv/1.1/spirv.lua
+++ b/include/spirv/1.1/spirv.lua
@@ -42,7 +42,7 @@
spv = {
MagicNumber = 0x07230203,
Version = 0x00010100,
- Revision = 1,
+ Revision = 2,
OpCodeMask = 0xffff,
WordCountShift = 16,
diff --git a/include/spirv/1.1/spirv.py b/include/spirv/1.1/spirv.py
index e31ffab..c70cdb7 100644
--- a/include/spirv/1.1/spirv.py
+++ b/include/spirv/1.1/spirv.py
@@ -42,7 +42,7 @@
spv = {
'MagicNumber' : 0x07230203,
'Version' : 0x00010100,
- 'Revision' : 1,
+ 'Revision' : 2,
'OpCodeMask' : 0xffff,
'WordCountShift' : 16,