Skip to content

Commit 0bcc624

Browse files
authored
Update clspv reflection non-semantic instruction set (KhronosGroup#284)
Add support for: - Pointer arguments - Program scope variables - Image channel order and data type queries Signed-off-by: Kévin Petit <[email protected]>
1 parent 36c0c15 commit 0bcc624

File tree

2 files changed

+96
-2
lines changed

2 files changed

+96
-2
lines changed

include/spirv/unified1/NonSemanticClspvReflection.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ extern "C" {
3333
#endif
3434

3535
enum {
36-
NonSemanticClspvReflectionRevision = 2,
36+
NonSemanticClspvReflectionRevision = 3,
3737
NonSemanticClspvReflectionRevision_BitWidthPadding = 0x7fffffff
3838
};
3939

@@ -63,6 +63,14 @@ enum NonSemanticClspvReflectionInstructions {
6363
NonSemanticClspvReflectionLiteralSampler = 23,
6464
NonSemanticClspvReflectionPropertyRequiredWorkgroupSize = 24,
6565
NonSemanticClspvReflectionSpecConstantSubgroupMaxSize = 25,
66+
NonSemanticClspvReflectionArgumentPointerPushConstant = 26,
67+
NonSemanticClspvReflectionArgumentPointerUniform = 27,
68+
NonSemanticClspvReflectionProgramScopeVariablesStorageBuffer = 28,
69+
NonSemanticClspvReflectionProgramScopeVariablePointerRelocation = 29,
70+
NonSemanticClspvReflectionImageArgumentInfoChannelOrderPushConstant = 30,
71+
NonSemanticClspvReflectionImageArgumentInfoChannelDataTypePushConstant = 31,
72+
NonSemanticClspvReflectionImageArgumentInfoChannelOrderUniform = 32,
73+
NonSemanticClspvReflectionImageArgumentInfoChannelDataTypeUniform = 33,
6674
NonSemanticClspvReflectionInstructionsMax = 0x7fffffff
6775
};
6876

include/spirv/unified1/extinst.nonsemantic.clspvreflection.grammar.json

Lines changed: 87 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"revision" : 2,
2+
"revision" : 3,
33
"instructions" : [
44
{
55
"opname" : "Kernel",
@@ -239,6 +239,92 @@
239239
"operands" : [
240240
{ "kind" : "IdRef", "name" : "Size" }
241241
]
242+
},
243+
{
244+
"opname" : "ArgumentPointerPushConstant",
245+
"opcode" : 26,
246+
"operands": [
247+
{ "kind" : "IdRef", "name" : "Kernel" },
248+
{ "kind" : "IdRef", "name" : "Ordinal" },
249+
{ "kind" : "IdRef", "name" : "Offset" },
250+
{ "kind" : "IdRef", "name" : "Size" },
251+
{ "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" }
252+
]
253+
},
254+
{
255+
"opname" : "ArgumentPointerUniform",
256+
"opcode" : 27,
257+
"operands": [
258+
{ "kind" : "IdRef", "name" : "Kernel" },
259+
{ "kind" : "IdRef", "name" : "Ordinal" },
260+
{ "kind" : "IdRef", "name" : "DescriptorSet" },
261+
{ "kind" : "IdRef", "name" : "Binding" },
262+
{ "kind" : "IdRef", "name" : "Offset" },
263+
{ "kind" : "IdRef", "name" : "Size" },
264+
{ "kind" : "IdRef", "name" : "ArgInfo", "quantifier" : "?" }
265+
]
266+
},
267+
{
268+
"opname" : "ProgramScopeVariablesStorageBuffer",
269+
"opcode" : 28,
270+
"operands": [
271+
{ "kind" : "IdRef", "name" : "DescriptorSet" },
272+
{ "kind" : "IdRef", "name" : "Binding" },
273+
{ "kind" : "IdRef", "name" : "Data" }
274+
]
275+
},
276+
{
277+
"opname" : "ProgramScopeVariablePointerRelocation",
278+
"opcode" : 29,
279+
"operands": [
280+
{ "kind" : "IdRef", "name" : "ObjectOffset" },
281+
{ "kind" : "IdRef", "name" : "PointerOffset" },
282+
{ "kind" : "IdRef", "name" : "PointerSize" }
283+
]
284+
},
285+
{
286+
"opname" : "ImageArgumentInfoChannelOrderPushConstant",
287+
"opcode" : 30,
288+
"operands": [
289+
{ "kind" : "IdRef", "name" : "Kernel" },
290+
{ "kind" : "IdRef", "name" : "Ordinal" },
291+
{ "kind" : "IdRef", "name" : "Offset" },
292+
{ "kind" : "IdRef", "name" : "Size" }
293+
]
294+
},
295+
{
296+
"opname" : "ImageArgumentInfoChannelDataTypePushConstant",
297+
"opcode" : 31,
298+
"operands": [
299+
{ "kind" : "IdRef", "name" : "Kernel" },
300+
{ "kind" : "IdRef", "name" : "Ordinal" },
301+
{ "kind" : "IdRef", "name" : "Offset" },
302+
{ "kind" : "IdRef", "name" : "Size" }
303+
]
304+
},
305+
{
306+
"opname" : "ImageArgumentInfoChannelOrderUniform",
307+
"opcode" : 32,
308+
"operands": [
309+
{ "kind" : "IdRef", "name" : "Kernel" },
310+
{ "kind" : "IdRef", "name" : "Ordinal" },
311+
{ "kind" : "IdRef", "name" : "DescriptorSet" },
312+
{ "kind" : "IdRef", "name" : "Binding" },
313+
{ "kind" : "IdRef", "name" : "Offset" },
314+
{ "kind" : "IdRef", "name" : "Size" }
315+
]
316+
},
317+
{
318+
"opname" : "ImageArgumentInfoChannelDataTypeUniform",
319+
"opcode" : 33,
320+
"operands": [
321+
{ "kind" : "IdRef", "name" : "Kernel" },
322+
{ "kind" : "IdRef", "name" : "Ordinal" },
323+
{ "kind" : "IdRef", "name" : "DescriptorSet" },
324+
{ "kind" : "IdRef", "name" : "Binding" },
325+
{ "kind" : "IdRef", "name" : "Offset" },
326+
{ "kind" : "IdRef", "name" : "Size" }
327+
]
242328
}
243329
]
244330
}

0 commit comments

Comments
 (0)