[Mesa-dev] [PATCH 12/12] spirv: Import the latest 1.0.12 header and JSON from Khronos
Ian Romanick
idr at freedesktop.org
Thu Nov 2 20:25:27 UTC 2017
From: Ian Romanick <ian.d.romanick at intel.com>
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/compiler/spirv/spirv.core.grammar.json | 266 ++++-------------------------
src/compiler/spirv/spirv.h | 40 +----
2 files changed, 38 insertions(+), 268 deletions(-)
diff --git a/src/compiler/spirv/spirv.core.grammar.json b/src/compiler/spirv/spirv.core.grammar.json
index e2950dd..30456fb 100644
--- a/src/compiler/spirv/spirv.core.grammar.json
+++ b/src/compiler/spirv/spirv.core.grammar.json
@@ -26,8 +26,8 @@
],
"magic_number" : "0x07230203",
"major_version" : 1,
- "minor_version" : 2,
- "revision" : 1,
+ "minor_version" : 0,
+ "revision" : 12,
"instructions" : [
{
"opname" : "OpNop",
@@ -2410,7 +2410,7 @@
{ "kind" : "IdResult" },
{ "kind" : "IdScope", "name" : "'Execution'" },
{ "kind" : "GroupOperation", "name" : "'Operation'" },
- { "kind" : "IdRef", "name" : "X" }
+ { "kind" : "IdRef", "name" : "'X'" }
],
"capabilities" : [ "Groups" ]
},
@@ -2434,7 +2434,7 @@
{ "kind" : "IdResult" },
{ "kind" : "IdScope", "name" : "'Execution'" },
{ "kind" : "GroupOperation", "name" : "'Operation'" },
- { "kind" : "IdRef", "name" : "X" }
+ { "kind" : "IdRef", "name" : "'X'" }
],
"capabilities" : [ "Groups" ]
},
@@ -2446,7 +2446,7 @@
{ "kind" : "IdResult" },
{ "kind" : "IdScope", "name" : "'Execution'" },
{ "kind" : "GroupOperation", "name" : "'Operation'" },
- { "kind" : "IdRef", "name" : "X" }
+ { "kind" : "IdRef", "name" : "'X'" }
],
"capabilities" : [ "Groups" ]
},
@@ -2458,7 +2458,7 @@
{ "kind" : "IdResult" },
{ "kind" : "IdScope", "name" : "'Execution'" },
{ "kind" : "GroupOperation", "name" : "'Operation'" },
- { "kind" : "IdRef", "name" : "X" }
+ { "kind" : "IdRef", "name" : "'X'" }
],
"capabilities" : [ "Groups" ]
},
@@ -2470,7 +2470,7 @@
{ "kind" : "IdResult" },
{ "kind" : "IdScope", "name" : "'Execution'" },
{ "kind" : "GroupOperation", "name" : "'Operation'" },
- { "kind" : "IdRef", "name" : "X" }
+ { "kind" : "IdRef", "name" : "'X'" }
],
"capabilities" : [ "Groups" ]
},
@@ -3013,124 +3013,6 @@
"capabilities" : [ "SparseResidency" ]
},
{
- "opname" : "OpSizeOf",
- "opcode" : 321,
- "operands" : [
- { "kind" : "IdResultType" },
- { "kind" : "IdResult" },
- { "kind" : "IdRef", "name" : "'Pointer'" }
- ],
- "capabilities" : [ "Addresses" ]
- },
- {
- "opname" : "OpTypePipeStorage",
- "opcode" : 322,
- "operands" : [
- { "kind" : "IdResult" }
- ],
- "capabilities" : [ "PipeStorage" ]
- },
- {
- "opname" : "OpConstantPipeStorage",
- "opcode" : 323,
- "operands" : [
- { "kind" : "IdResultType" },
- { "kind" : "IdResult" },
- { "kind" : "LiteralInteger", "name" : "'Packet Size'" },
- { "kind" : "LiteralInteger", "name" : "'Packet Alignment'" },
- { "kind" : "LiteralInteger", "name" : "'Capacity'" }
- ],
- "capabilities" : [ "PipeStorage" ]
- },
- {
- "opname" : "OpCreatePipeFromPipeStorage",
- "opcode" : 324,
- "operands" : [
- { "kind" : "IdResultType" },
- { "kind" : "IdResult" },
- { "kind" : "IdRef", "name" : "'Pipe Storage'" }
- ],
- "capabilities" : [ "PipeStorage" ]
- },
- {
- "opname" : "OpGetKernelLocalSizeForSubgroupCount",
- "opcode" : 325,
- "operands" : [
- { "kind" : "IdResultType" },
- { "kind" : "IdResult" },
- { "kind" : "IdRef", "name" : "'Subgroup Count'" },
- { "kind" : "IdRef", "name" : "'Invoke'" },
- { "kind" : "IdRef", "name" : "'Param'" },
- { "kind" : "IdRef", "name" : "'Param Size'" },
- { "kind" : "IdRef", "name" : "'Param Align'" }
- ],
- "capabilities" : [ "SubgroupDispatch" ]
- },
- {
- "opname" : "OpGetKernelMaxNumSubgroups",
- "opcode" : 326,
- "operands" : [
- { "kind" : "IdResultType" },
- { "kind" : "IdResult" },
- { "kind" : "IdRef", "name" : "'Invoke'" },
- { "kind" : "IdRef", "name" : "'Param'" },
- { "kind" : "IdRef", "name" : "'Param Size'" },
- { "kind" : "IdRef", "name" : "'Param Align'" }
- ],
- "capabilities" : [ "SubgroupDispatch" ]
- },
- {
- "opname" : "OpTypeNamedBarrier",
- "opcode" : 327,
- "operands" : [
- { "kind" : "IdResult" }
- ],
- "capabilities" : [ "NamedBarrier" ]
- },
- {
- "opname" : "OpNamedBarrierInitialize",
- "opcode" : 328,
- "operands" : [
- { "kind" : "IdResultType" },
- { "kind" : "IdResult" },
- { "kind" : "IdRef", "name" : "'Subgroup Count'" }
- ],
- "capabilities" : [ "NamedBarrier" ]
- },
- {
- "opname" : "OpMemoryNamedBarrier",
- "opcode" : 329,
- "operands" : [
- { "kind" : "IdRef", "name" : "'Named Barrier'" },
- { "kind" : "IdScope", "name" : "'Memory'" },
- { "kind" : "IdMemorySemantics", "name" : "'Semantics'" }
- ],
- "capabilities" : [ "NamedBarrier" ]
- },
- {
- "opname" : "OpModuleProcessed",
- "opcode" : 330,
- "operands" : [
- { "kind" : "LiteralString", "name" : "'Process'" }
- ]
- },
- {
- "opname" : "OpExecutionModeId",
- "opcode" : 331,
- "operands" : [
- { "kind" : "IdRef", "name" : "'Entry Point'" },
- { "kind" : "ExecutionMode", "name" : "'Mode'" }
- ]
- },
- {
- "opname" : "OpDecorateId",
- "opcode" : 332,
- "operands" : [
- { "kind" : "IdRef", "name" : "'Target'" },
- { "kind" : "Decoration" }
- ]
- },
- {
"opname" : "OpSubgroupBallotKHR",
"opcode" : 4421,
"operands" : [
@@ -3223,7 +3105,7 @@
{ "kind" : "IdResult" },
{ "kind" : "IdScope", "name" : "'Execution'" },
{ "kind" : "GroupOperation", "name" : "'Operation'" },
- { "kind" : "IdRef", "name" : "X" }
+ { "kind" : "IdRef", "name" : "'X'" }
],
"capabilities" : [ "Groups" ]
},
@@ -3247,7 +3129,7 @@
{ "kind" : "IdResult" },
{ "kind" : "IdScope", "name" : "'Execution'" },
{ "kind" : "GroupOperation", "name" : "'Operation'" },
- { "kind" : "IdRef", "name" : "X" }
+ { "kind" : "IdRef", "name" : "'X'" }
],
"capabilities" : [ "Groups" ]
},
@@ -3259,7 +3141,7 @@
{ "kind" : "IdResult" },
{ "kind" : "IdScope", "name" : "'Execution'" },
{ "kind" : "GroupOperation", "name" : "'Operation'" },
- { "kind" : "IdRef", "name" : "X" }
+ { "kind" : "IdRef", "name" : "'X'" }
],
"capabilities" : [ "Groups" ]
},
@@ -3271,7 +3153,7 @@
{ "kind" : "IdResult" },
{ "kind" : "IdScope", "name" : "'Execution'" },
{ "kind" : "GroupOperation", "name" : "'Operation'" },
- { "kind" : "IdRef", "name" : "X" }
+ { "kind" : "IdRef", "name" : "'X'" }
],
"capabilities" : [ "Groups" ]
},
@@ -3283,7 +3165,7 @@
{ "kind" : "IdResult" },
{ "kind" : "IdScope", "name" : "'Execution'" },
{ "kind" : "GroupOperation", "name" : "'Operation'" },
- { "kind" : "IdRef", "name" : "X" }
+ { "kind" : "IdRef", "name" : "'X'" }
],
"capabilities" : [ "Groups" ]
}
@@ -3427,18 +3309,6 @@
{
"enumerant" : "DontUnroll",
"value" : "0x0002"
- },
- {
- "enumerant" : "DependencyInfinite",
- "value" : "0x0004"
- },
- {
- "enumerant" : "DependencyLength",
- "value" : "0x0008",
- "parameters" : [
- { "kind" : "LiteralInteger" }
- ]
-
}
]
},
@@ -3854,57 +3724,6 @@
"capabilities" : [ "Kernel" ]
},
{
- "enumerant" : "Initializer",
- "value" : 33,
- "capabilities" : [ "Kernel" ]
- },
- {
- "enumerant" : "Finalizer",
- "value" : 34,
- "capabilities" : [ "Kernel" ]
- },
- {
- "enumerant" : "SubgroupSize",
- "value" : 35,
- "capabilities" : [ "SubgroupDispatch" ],
- "parameters" : [
- { "kind" : "LiteralInteger", "name" : "'Subgroup Size'" }
- ]
- },
- {
- "enumerant" : "SubgroupsPerWorkgroup",
- "value" : 36,
- "capabilities" : [ "SubgroupDispatch" ],
- "parameters" : [
- { "kind" : "LiteralInteger", "name" : "'Subgroups Per Workgroup'" }
- ]
- },
- {
- "enumerant" : "SubgroupsPerWorkgroupId",
- "value" : 37,
- "capabilities" : [ "SubgroupDispatch" ],
- "parameters" : [
- { "kind" : "IdRef", "name" : "'Subgroups Per Workgroup'" }
- ]
- },
- {
- "enumerant" : "LocalSizeId",
- "value" : 38,
- "parameters" : [
- { "kind" : "IdRef", "name" : "'x size'" },
- { "kind" : "IdRef", "name" : "'y size'" },
- { "kind" : "IdRef", "name" : "'z size'" }
- ]
- },
- {
- "enumerant" : "LocalSizeHintId",
- "value" : 39,
- "capabilities" : [ "Kernel" ],
- "parameters" : [
- { "kind" : "IdRef", "name" : "'Local Size Hint'" }
- ]
- },
- {
"enumerant" : "PostDepthCoverage",
"value" : 4446,
"capabilities" : [ "SampleMaskPostDepthCoverage" ]
@@ -4612,7 +4431,7 @@
{
"enumerant" : "SpecId",
"value" : 1,
- "capabilities" : [ "Shader", "Kernel" ],
+ "capabilities" : [ "Shader" ],
"parameters" : [
{ "kind" : "LiteralInteger", "name" : "'Specialization Constant ID'" }
]
@@ -4877,30 +4696,6 @@
]
},
{
- "enumerant" : "MaxByteOffset",
- "value" : 45,
- "capabilities" : [ "Addresses" ],
- "parameters" : [
- { "kind" : "LiteralInteger", "name" : "'Max Byte Offset'" }
- ]
- },
- {
- "enumerant" : "AlignmentId",
- "value" : 46,
- "capabilities" : [ "Kernel" ],
- "parameters" : [
- { "kind" : "IdRef", "name" : "'Alignment'" }
- ]
- },
- {
- "enumerant" : "MaxByteOffsetId",
- "value" : 47,
- "capabilities" : [ "Addresses" ],
- "parameters" : [
- { "kind" : "IdRef", "name" : "'Max Byte Offset'" }
- ]
- },
- {
"enumerant" : "ExplicitInterpAMD",
"value" : 4999
},
@@ -5031,7 +4826,7 @@
{
"enumerant" : "SampleMask",
"value" : 20,
- "capabilities" : [ "SampleRateShading" ]
+ "capabilities" : [ "Shader" ]
},
{
"enumerant" : "FragDepth",
@@ -5211,6 +5006,11 @@
"value" : 4998
},
{
+ "enumerant" : "FragStencilRefEXT",
+ "value" : 5014,
+ "capabilities" : [ "StencilExportEXT" ]
+ },
+ {
"enumerant" : "ViewportMaskNV",
"value" : 5253,
"capabilities" : [ "ShaderViewportMaskNV" ]
@@ -5579,21 +5379,6 @@
"capabilities" : [ "Geometry" ]
},
{
- "enumerant" : "SubgroupDispatch",
- "value" : 58,
- "capabilities" : [ "DeviceEnqueue" ]
- },
- {
- "enumerant" : "NamedBarrier",
- "value" : 59,
- "capabilities" : [ "Kernel" ]
- },
- {
- "enumerant" : "PipeStorage",
- "value" : 60,
- "capabilities" : [ "Pipes" ]
- },
- {
"enumerant" : "SubgroupBallotKHR",
"value" : 4423,
"extensions" : [ "SPV_KHR_shader_ballot" ]
@@ -5676,7 +5461,6 @@
{
"enumerant" : "SampleMaskPostDepthCoverage",
"value" : 4447,
- "capabilities" : [ "SampleRateShading" ],
"extensions" : [ "SPV_KHR_post_depth_coverage" ]
},
{
@@ -5686,6 +5470,12 @@
"extensions" : [ "SPV_AMD_texture_gather_bias_lod" ]
},
{
+ "enumerant" : "StencilExportEXT",
+ "value" : 5013,
+ "capabilities" : [ "Shader" ],
+ "extensions" : [ "SPV_EXT_shader_stencil_export" ]
+ },
+ {
"enumerant" : "SampleMaskOverrideCoverageNV",
"value" : 5249,
"capabilities" : [ "SampleRateShading" ],
@@ -5704,6 +5494,12 @@
"extensions" : [ "SPV_NV_viewport_array2" ]
},
{
+ "enumerant" : "ShaderViewportIndexLayerEXT",
+ "value" : 5254,
+ "capabilities" : [ "MultiViewport" ],
+ "extensions" : [ "SPV_EXT_shader_viewport_index_layer" ]
+ },
+ {
"enumerant" : "ShaderViewportMaskNV",
"value" : 5255,
"capabilities" : [ "ShaderViewportIndexLayerNV" ],
diff --git a/src/compiler/spirv/spirv.h b/src/compiler/spirv/spirv.h
index 61559a1..4c8939a 100644
--- a/src/compiler/spirv/spirv.h
+++ b/src/compiler/spirv/spirv.h
@@ -50,12 +50,12 @@
typedef unsigned int SpvId;
-#define SPV_VERSION 0x10200
-#define SPV_REVISION 1
+#define SPV_VERSION 0x10000
+#define SPV_REVISION 12
static const unsigned int SpvMagicNumber = 0x07230203;
-static const unsigned int SpvVersion = 0x00010200;
-static const unsigned int SpvRevision = 1;
+static const unsigned int SpvVersion = 0x00010000;
+static const unsigned int SpvRevision = 12;
static const unsigned int SpvOpCodeMask = 0xffff;
static const unsigned int SpvWordCountShift = 16;
@@ -126,13 +126,6 @@ typedef enum SpvExecutionMode_ {
SpvExecutionModeOutputTriangleStrip = 29,
SpvExecutionModeVecTypeHint = 30,
SpvExecutionModeContractionOff = 31,
- SpvExecutionModeInitializer = 33,
- SpvExecutionModeFinalizer = 34,
- SpvExecutionModeSubgroupSize = 35,
- SpvExecutionModeSubgroupsPerWorkgroup = 36,
- SpvExecutionModeSubgroupsPerWorkgroupId = 37,
- SpvExecutionModeLocalSizeId = 38,
- SpvExecutionModeLocalSizeHintId = 39,
SpvExecutionModePostDepthCoverage = 4446,
SpvExecutionModeMax = 0x7fffffff,
} SpvExecutionMode;
@@ -388,9 +381,6 @@ typedef enum SpvDecoration_ {
SpvDecorationNoContraction = 42,
SpvDecorationInputAttachmentIndex = 43,
SpvDecorationAlignment = 44,
- SpvDecorationMaxByteOffset = 45,
- SpvDecorationAlignmentId = 46,
- SpvDecorationMaxByteOffsetId = 47,
SpvDecorationExplicitInterpAMD = 4999,
SpvDecorationOverrideCoverageNV = 5248,
SpvDecorationPassthroughNV = 5250,
@@ -458,6 +448,7 @@ typedef enum SpvBuiltIn_ {
SpvBuiltInBaryCoordSmoothCentroidAMD = 4996,
SpvBuiltInBaryCoordSmoothSampleAMD = 4997,
SpvBuiltInBaryCoordPullModelAMD = 4998,
+ SpvBuiltInFragStencilRefEXT = 5014,
SpvBuiltInViewportMaskNV = 5253,
SpvBuiltInSecondaryPositionNV = 5257,
SpvBuiltInSecondaryViewportMaskNV = 5258,
@@ -481,8 +472,6 @@ typedef enum SpvSelectionControlMask_ {
typedef enum SpvLoopControlShift_ {
SpvLoopControlUnrollShift = 0,
SpvLoopControlDontUnrollShift = 1,
- SpvLoopControlDependencyInfiniteShift = 2,
- SpvLoopControlDependencyLengthShift = 3,
SpvLoopControlMax = 0x7fffffff,
} SpvLoopControlShift;
@@ -490,8 +479,6 @@ typedef enum SpvLoopControlMask_ {
SpvLoopControlMaskNone = 0,
SpvLoopControlUnrollMask = 0x00000001,
SpvLoopControlDontUnrollMask = 0x00000002,
- SpvLoopControlDependencyInfiniteMask = 0x00000004,
- SpvLoopControlDependencyLengthMask = 0x00000008,
} SpvLoopControlMask;
typedef enum SpvFunctionControlShift_ {
@@ -642,9 +629,6 @@ typedef enum SpvCapability_ {
SpvCapabilityStorageImageReadWithoutFormat = 55,
SpvCapabilityStorageImageWriteWithoutFormat = 56,
SpvCapabilityMultiViewport = 57,
- SpvCapabilitySubgroupDispatch = 58,
- SpvCapabilityNamedBarrier = 59,
- SpvCapabilityPipeStorage = 60,
SpvCapabilitySubgroupBallotKHR = 4423,
SpvCapabilityDrawParameters = 4427,
SpvCapabilitySubgroupVoteKHR = 4431,
@@ -661,8 +645,10 @@ typedef enum SpvCapability_ {
SpvCapabilityAtomicStorageOps = 4445,
SpvCapabilitySampleMaskPostDepthCoverage = 4447,
SpvCapabilityImageGatherBiasLodAMD = 5009,
+ SpvCapabilityStencilExportEXT = 5013,
SpvCapabilitySampleMaskOverrideCoverageNV = 5249,
SpvCapabilityGeometryShaderPassthroughNV = 5251,
+ SpvCapabilityShaderViewportIndexLayerEXT = 5254,
SpvCapabilityShaderViewportIndexLayerNV = 5254,
SpvCapabilityShaderViewportMaskNV = 5255,
SpvCapabilityShaderStereoViewNV = 5259,
@@ -965,18 +951,6 @@ typedef enum SpvOp_ {
SpvOpAtomicFlagTestAndSet = 318,
SpvOpAtomicFlagClear = 319,
SpvOpImageSparseRead = 320,
- SpvOpSizeOf = 321,
- SpvOpTypePipeStorage = 322,
- SpvOpConstantPipeStorage = 323,
- SpvOpCreatePipeFromPipeStorage = 324,
- SpvOpGetKernelLocalSizeForSubgroupCount = 325,
- SpvOpGetKernelMaxNumSubgroups = 326,
- SpvOpTypeNamedBarrier = 327,
- SpvOpNamedBarrierInitialize = 328,
- SpvOpMemoryNamedBarrier = 329,
- SpvOpModuleProcessed = 330,
- SpvOpExecutionModeId = 331,
- SpvOpDecorateId = 332,
SpvOpSubgroupBallotKHR = 4421,
SpvOpSubgroupFirstInvocationKHR = 4422,
SpvOpSubgroupAllKHR = 4428,
--
2.9.5
More information about the mesa-dev
mailing list