Merge branch 'nir-spirv' into vulkan
[mesa.git] / src / glsl / nir / spirv.h
index 55bdcbee8b51a7016f60477c71336f8b2f345688..8472caf30e5732e90a2f9923c08f7438345b2a7f 100644 (file)
@@ -1,12 +1,17 @@
 /*
-** Copyright (c) 2015 The Khronos Group Inc.
+** Copyright (c) 2014-2015 The Khronos Group Inc.
+<<<<<<< HEAD
 ** 
+=======
+**
+>>>>>>> fdo-personal/nir-spirv
 ** 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:
+<<<<<<< HEAD
 ** 
 ** The above copyright notice and this permission notice shall be included in
 ** all copies or substantial portions of the Materials.
 ** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
 ** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ 
 ** 
+=======
+**
+** 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/
+**
+>>>>>>> fdo-personal/nir-spirv
 ** 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
 ** Specification revision 31.
 ** Enumeration tokens for SPIR-V, in various styles:
 **   C, C++, C++11, JSON, Lua, Python
+<<<<<<< HEAD
 ** 
+=======
+**
+>>>>>>> fdo-personal/nir-spirv
 ** - 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']
+<<<<<<< HEAD
 ** 
+=======
+**
+>>>>>>> fdo-personal/nir-spirv
 ** 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
@@ -53,6 +76,7 @@ typedef unsigned int SpvId;
 
 static const unsigned int SpvMagicNumber = 0x07230203;
 static const unsigned int SpvVersion = 99;
+static const unsigned int SpvRevision = 31;
 static const unsigned int SpvOpCodeMask = 0xffff;
 static const unsigned int SpvWordCountShift = 16;
 
@@ -130,7 +154,6 @@ typedef enum SpvStorageClass_ {
     SpvStorageClassPrivateGlobal = 6,
     SpvStorageClassFunction = 7,
     SpvStorageClassGeneric = 8,
-    SpvStorageClassPushConstant = 9,
     SpvStorageClassAtomicCounter = 10,
     SpvStorageClassImage = 11,
 } SpvStorageClass;
@@ -245,9 +268,10 @@ typedef enum SpvImageOperandsShift_ {
     SpvImageOperandsBiasShift = 0,
     SpvImageOperandsLodShift = 1,
     SpvImageOperandsGradShift = 2,
-    SpvImageOperandsOffsetShift = 3,
-    SpvImageOperandsOffsetsShift = 4,
-    SpvImageOperandsSampleShift = 5,
+    SpvImageOperandsConstOffsetShift = 3,
+    SpvImageOperandsOffsetShift = 4,
+    SpvImageOperandsConstOffsetsShift = 5,
+    SpvImageOperandsSampleShift = 6,
 } SpvImageOperandsShift;
 
 typedef enum SpvImageOperandsMask_ {
@@ -255,9 +279,10 @@ typedef enum SpvImageOperandsMask_ {
     SpvImageOperandsBiasMask = 0x00000001,
     SpvImageOperandsLodMask = 0x00000002,
     SpvImageOperandsGradMask = 0x00000004,
-    SpvImageOperandsOffsetMask = 0x00000008,
-    SpvImageOperandsOffsetsMask = 0x00000010,
-    SpvImageOperandsSampleMask = 0x00000020,
+    SpvImageOperandsConstOffsetMask = 0x00000008,
+    SpvImageOperandsOffsetMask = 0x00000010,
+    SpvImageOperandsConstOffsetsMask = 0x00000020,
+    SpvImageOperandsSampleMask = 0x00000040,
 } SpvImageOperandsMask;
 
 typedef enum SpvFPFastMathModeShift_ {
@@ -302,9 +327,8 @@ typedef enum SpvFunctionParameterAttribute_ {
     SpvFunctionParameterAttributeSret = 3,
     SpvFunctionParameterAttributeNoAlias = 4,
     SpvFunctionParameterAttributeNoCapture = 5,
-    SpvFunctionParameterAttributeSVM = 6,
-    SpvFunctionParameterAttributeNoWrite = 7,
-    SpvFunctionParameterAttributeNoReadWrite = 8,
+    SpvFunctionParameterAttributeNoWrite = 6,
+    SpvFunctionParameterAttributeNoReadWrite = 7,
 } SpvFunctionParameterAttribute;
 
 typedef enum SpvDecoration_ {
@@ -355,7 +379,6 @@ typedef enum SpvDecoration_ {
 typedef enum SpvBuiltIn_ {
     SpvBuiltInPosition = 0,
     SpvBuiltInPointSize = 1,
-    SpvBuiltInClipVertex = 2,
     SpvBuiltInClipDistance = 3,
     SpvBuiltInCullDistance = 4,
     SpvBuiltInVertexId = 5,
@@ -525,6 +548,19 @@ typedef enum SpvCapability_ {
     SpvCapabilityLiteralSampler = 20,
     SpvCapabilityAtomicStorage = 21,
     SpvCapabilityInt16 = 22,
+    SpvCapabilityTessellationPointSize = 23,
+    SpvCapabilityGeometryPointSize = 24,
+    SpvCapabilityImageGatherExtended = 25,
+    SpvCapabilityStorageImageExtendedFormats = 26,
+    SpvCapabilityStorageImageMultisample = 27,
+    SpvCapabilityUniformBufferArrayDynamicIndexing = 28,
+    SpvCapabilitySampledImageArrayDynamicIndexing = 29,
+    SpvCapabilityStorageBufferArrayDynamicIndexing = 30,
+    SpvCapabilityStorageImageArrayDynamicIndexing = 31,
+    SpvCapabilityClipDistance = 32,
+    SpvCapabilityCullDistance = 33,
+    SpvCapabilityImageCubeArray = 34,
+    SpvCapabilitySampleRateShading = 35,
 } SpvCapability;
 
 typedef enum SpvOp_ {
@@ -740,9 +776,9 @@ typedef enum SpvOp_ {
     SpvOpAtomicIDecrement = 233,
     SpvOpAtomicIAdd = 234,
     SpvOpAtomicISub = 235,
-    SpvOpAtomicIMin = 236,
+    SpvOpAtomicSMin = 236,
     SpvOpAtomicUMin = 237,
-    SpvOpAtomicIMax = 238,
+    SpvOpAtomicSMax = 238,
     SpvOpAtomicUMax = 239,
     SpvOpAtomicAnd = 240,
     SpvOpAtomicOr = 241,
@@ -805,4 +841,3 @@ typedef enum SpvOp_ {
 } SpvOp;
 
 #endif  // #ifndef spirv_H
-