Add grammar and symbols for two Google extensions to unified1
* SPV_GOOGLE_decorate_string
* SPV_GOOGLE_hlsl_functionality1
diff --git a/include/spirv/unified1/spirv.core.grammar.json b/include/spirv/unified1/spirv.core.grammar.json
index eac20d9..4a91d76 100644
--- a/include/spirv/unified1/spirv.core.grammar.json
+++ b/include/spirv/unified1/spirv.core.grammar.json
@@ -3430,6 +3430,31 @@
],
"capabilities" : [ "SubgroupImageBlockIOINTEL" ],
"version" : "None"
+ },
+ {
+ "opname" : "OpDecorateStringGOOGLE",
+ "opcode" : 5632,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Target'" },
+ { "kind" : "Decoration" },
+ { "kind" : "LiteralString" },
+ { "kind" : "LiteralString", "quantifier" : "*" }
+ ],
+ "extensions" : [ "SPV_GOOGLE_decorate_string" ],
+ "version" : "None"
+ },
+ {
+ "opname" : "OpMemberDecorateStringGOOGLE",
+ "opcode" : 5633,
+ "operands" : [
+ { "kind" : "IdRef", "name" : "'Struct Type'" },
+ { "kind" : "LiteralInteger", "name" : "'Member'" },
+ { "kind" : "Decoration" },
+ { "kind" : "LiteralString" },
+ { "kind" : "LiteralString", "quantifier" : "*" }
+ ],
+ "extensions" : [ "SPV_GOOGLE_decorate_string" ],
+ "version" : "None"
}
],
"operand_kinds" : [
@@ -5060,6 +5085,24 @@
"parameters" : [
{ "kind" : "LiteralInteger", "name" : "'Offset'" }
]
+ },
+ {
+ "enumerant" : "HlslCounterBufferGOOGLE",
+ "value" : 5634,
+ "parameters" : [
+ { "kind" : "IdRef", "name" : "'Counter Buffer'" }
+ ],
+ "extensions" : [ "SPV_GOOGLE_hlsl_functionality1" ],
+ "version" : "None"
+ },
+ {
+ "enumerant" : "HlslSemanticGOOGLE",
+ "value" : 5635,
+ "parameters" : [
+ { "kind" : "LiteralString", "name" : "'Semantic'" }
+ ],
+ "extensions" : [ "SPV_GOOGLE_hlsl_functionality1" ],
+ "version" : "None"
}
]
},
diff --git a/include/spirv/unified1/spirv.h b/include/spirv/unified1/spirv.h
index 233dc6d..3eb6c05 100644
--- a/include/spirv/unified1/spirv.h
+++ b/include/spirv/unified1/spirv.h
@@ -397,6 +397,8 @@
SpvDecorationPassthroughNV = 5250,
SpvDecorationViewportRelativeNV = 5252,
SpvDecorationSecondaryViewportRelativeNV = 5256,
+ SpvDecorationHlslCounterBufferGOOGLE = 5634,
+ SpvDecorationHlslSemanticGOOGLE = 5635,
SpvDecorationMax = 0x7fffffff,
} SpvDecoration;
@@ -1012,6 +1014,8 @@
SpvOpSubgroupBlockWriteINTEL = 5576,
SpvOpSubgroupImageBlockReadINTEL = 5577,
SpvOpSubgroupImageBlockWriteINTEL = 5578,
+ SpvOpDecorateStringGOOGLE = 5632,
+ SpvOpMemberDecorateStringGOOGLE = 5633,
SpvOpMax = 0x7fffffff,
} SpvOp;
diff --git a/include/spirv/unified1/spirv.hpp b/include/spirv/unified1/spirv.hpp
index c677663..884cf29 100644
--- a/include/spirv/unified1/spirv.hpp
+++ b/include/spirv/unified1/spirv.hpp
@@ -393,6 +393,8 @@
DecorationPassthroughNV = 5250,
DecorationViewportRelativeNV = 5252,
DecorationSecondaryViewportRelativeNV = 5256,
+ DecorationHlslCounterBufferGOOGLE = 5634,
+ DecorationHlslSemanticGOOGLE = 5635,
DecorationMax = 0x7fffffff,
};
@@ -1008,6 +1010,8 @@
OpSubgroupBlockWriteINTEL = 5576,
OpSubgroupImageBlockReadINTEL = 5577,
OpSubgroupImageBlockWriteINTEL = 5578,
+ OpDecorateStringGOOGLE = 5632,
+ OpMemberDecorateStringGOOGLE = 5633,
OpMax = 0x7fffffff,
};
diff --git a/include/spirv/unified1/spirv.hpp11 b/include/spirv/unified1/spirv.hpp11
index db15038..d86832e 100644
--- a/include/spirv/unified1/spirv.hpp11
+++ b/include/spirv/unified1/spirv.hpp11
@@ -393,6 +393,8 @@
PassthroughNV = 5250,
ViewportRelativeNV = 5252,
SecondaryViewportRelativeNV = 5256,
+ HlslCounterBufferGOOGLE = 5634,
+ HlslSemanticGOOGLE = 5635,
Max = 0x7fffffff,
};
@@ -1008,6 +1010,8 @@
OpSubgroupBlockWriteINTEL = 5576,
OpSubgroupImageBlockReadINTEL = 5577,
OpSubgroupImageBlockWriteINTEL = 5578,
+ OpDecorateStringGOOGLE = 5632,
+ OpMemberDecorateStringGOOGLE = 5633,
Max = 0x7fffffff,
};
diff --git a/include/spirv/unified1/spirv.json b/include/spirv/unified1/spirv.json
index d326c6f..062a8d7 100644
--- a/include/spirv/unified1/spirv.json
+++ b/include/spirv/unified1/spirv.json
@@ -432,7 +432,9 @@
"OverrideCoverageNV": 5248,
"PassthroughNV": 5250,
"ViewportRelativeNV": 5252,
- "SecondaryViewportRelativeNV": 5256
+ "SecondaryViewportRelativeNV": 5256,
+ "HlslCounterBufferGOOGLE": 5634,
+ "HlslSemanticGOOGLE": 5635
}
},
{
@@ -1035,7 +1037,9 @@
"OpSubgroupBlockReadINTEL": 5575,
"OpSubgroupBlockWriteINTEL": 5576,
"OpSubgroupImageBlockReadINTEL": 5577,
- "OpSubgroupImageBlockWriteINTEL": 5578
+ "OpSubgroupImageBlockWriteINTEL": 5578,
+ "OpDecorateStringGOOGLE": 5632,
+ "OpMemberDecorateStringGOOGLE": 5633
}
}
]
diff --git a/include/spirv/unified1/spirv.lua b/include/spirv/unified1/spirv.lua
index ecd1fc8..7ba4a65 100644
--- a/include/spirv/unified1/spirv.lua
+++ b/include/spirv/unified1/spirv.lua
@@ -366,6 +366,8 @@
PassthroughNV = 5250,
ViewportRelativeNV = 5252,
SecondaryViewportRelativeNV = 5256,
+ HlslCounterBufferGOOGLE = 5634,
+ HlslSemanticGOOGLE = 5635,
},
BuiltIn = {
@@ -969,6 +971,8 @@
OpSubgroupBlockWriteINTEL = 5576,
OpSubgroupImageBlockReadINTEL = 5577,
OpSubgroupImageBlockWriteINTEL = 5578,
+ OpDecorateStringGOOGLE = 5632,
+ OpMemberDecorateStringGOOGLE = 5633,
},
}
diff --git a/include/spirv/unified1/spirv.py b/include/spirv/unified1/spirv.py
index 08c2077..60a1bc4 100755
--- a/include/spirv/unified1/spirv.py
+++ b/include/spirv/unified1/spirv.py
@@ -366,6 +366,8 @@
'PassthroughNV' : 5250,
'ViewportRelativeNV' : 5252,
'SecondaryViewportRelativeNV' : 5256,
+ 'HlslCounterBufferGOOGLE' : 5634,
+ 'HlslSemanticGOOGLE' : 5635,
},
'BuiltIn' : {
@@ -969,6 +971,8 @@
'OpSubgroupBlockWriteINTEL' : 5576,
'OpSubgroupImageBlockReadINTEL' : 5577,
'OpSubgroupImageBlockWriteINTEL' : 5578,
+ 'OpDecorateStringGOOGLE' : 5632,
+ 'OpMemberDecorateStringGOOGLE' : 5633,
},
}
diff --git a/tools/buildHeaders/jsonToSpirv.cpp b/tools/buildHeaders/jsonToSpirv.cpp
index bb32566..a460edc 100755
--- a/tools/buildHeaders/jsonToSpirv.cpp
+++ b/tools/buildHeaders/jsonToSpirv.cpp
@@ -119,8 +119,7 @@
else if (quantifier == "?")
return {OperandLiteralString, true};
else {
- assert(0 && "this case should not exist");
- return {OperandNone, false};
+ return {OperandVariableLiteralStrings, false};
}
} else if (operandKind == "PairLiteralIntegerIdRef") {
// Used by OpSwitch in the grammar
diff --git a/tools/buildHeaders/jsonToSpirv.h b/tools/buildHeaders/jsonToSpirv.h
index b25b89e..273b639 100755
--- a/tools/buildHeaders/jsonToSpirv.h
+++ b/tools/buildHeaders/jsonToSpirv.h
@@ -47,6 +47,7 @@
OperandOptionalLiteral,
OperandOptionalLiteralString,
OperandVariableLiterals,
+ OperandVariableLiteralStrings,
OperandVariableIdLiteral,
OperandVariableLiteralId,
OperandLiteralNumber,