Skip to content

Commit 3541d11

Browse files
authored
Add NonSemanticGraphDebugInfo instruction set (KhronosGroup#591)
Change-Id: Ibd080a73abc630fbd2b3068f9c22ab8c0e01c806 Signed-off-by: Kevin Petit <kevin.petit@arm.com>
1 parent 62d3e83 commit 3541d11

4 files changed

Lines changed: 70 additions & 0 deletions

File tree

BUILD.bazel

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ filegroup(
138138
srcs = ["include/spirv/unified1/extinst.arm.motion-engine.100.grammar.json"],
139139
)
140140

141+
filegroup(
142+
name = "spirv_ext_inst_non_semantic_graph_debuginfo_grammar_unified1",
143+
srcs = ["include/spirv/unified1/extinst.nonsemantic.graph.debuginfo.grammar.json"],
144+
)
145+
141146
cc_library(
142147
name = "spirv_common_headers",
143148
hdrs = [
@@ -152,6 +157,7 @@ cc_library(
152157
"include/spirv/unified1/NonSemanticClspvReflection.h",
153158
"include/spirv/unified1/NonSemanticDebugBreak.h",
154159
"include/spirv/unified1/NonSemanticDebugPrintf.h",
160+
"include/spirv/unified1/NonSemanticGraphDebugInfo.h",
155161
"include/spirv/unified1/NonSemanticShaderDebugInfo.h",
156162
"include/spirv/unified1/NonSemanticShaderDebugInfo100.h",
157163
"include/spirv/unified1/NonSemanticVkspReflection.h",
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// SPDX-FileCopyrightText: 2022-2026 Arm Ltd.
2+
// SPDX-License-Identifier: MIT
3+
4+
#ifndef SPIRV_UNIFIED1_NonSemanticGraphDebugInfo_H_
5+
#define SPIRV_UNIFIED1_NonSemanticGraphDebugInfo_H_
6+
7+
#ifdef __cplusplus
8+
extern "C" {
9+
#endif
10+
11+
enum {
12+
NonSemanticGraphDebugInfoRevision = 1,
13+
NonSemanticGraphDebugInfoRevision_BitWidthPadding = 0x7fffffff
14+
};
15+
16+
enum NonSemanticGraphDebugInfoInstructions {
17+
NonSemanticGraphDebugInfoDebugGraph = 1,
18+
NonSemanticGraphDebugInfoDebugOperation = 2,
19+
NonSemanticGraphDebugInfoDebugTensor = 3,
20+
NonSemanticGraphDebugInfoInstructionsMax = 0x7fffffff
21+
};
22+
23+
24+
#ifdef __cplusplus
25+
}
26+
#endif
27+
28+
#endif // SPIRV_UNIFIED1_NonSemanticGraphDebugInfo_H_
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"copyright": [
3+
"SPDX-FileCopyrightText: 2022-2026 Arm Ltd.",
4+
"SPDX-License-Identifier: MIT"
5+
],
6+
"revision" : 1,
7+
"instructions" : [
8+
{
9+
"opname" : "DebugGraph",
10+
"opcode" : 1,
11+
"operands" : [
12+
{ "kind" : "IdRef", "name" : "Graph" },
13+
{ "kind" : "IdRef", "name" : "Name" }
14+
]
15+
},
16+
{
17+
"opname" : "DebugOperation",
18+
"opcode" : 2,
19+
"operands" : [
20+
{ "kind" : "IdRef", "name" : "DebugGraph" },
21+
{ "kind" : "IdRef", "name" : "Name" },
22+
{ "kind" : "IdRef", "name" : "Instructions", "quantifier" : "*" }
23+
]
24+
},
25+
{
26+
"opname" : "DebugTensor",
27+
"opcode" : 3,
28+
"operands" : [
29+
{ "kind" : "IdRef", "name" : "Tensor" },
30+
{ "kind" : "IdRef", "name" : "Name" },
31+
{ "kind" : "IdRef", "name" : "Index", "quantifier" : "?" }
32+
]
33+
}
34+
]
35+
}

tools/buildHeaders/bin/makeExtinstHeaders.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ def mk_extinst(name, grammar_file, header_basename=None):
3131
mk_extinst('NonSemanticVkspReflection', 'extinst.nonsemantic.vkspreflection.grammar.json')
3232
mk_extinst('TOSA', 'extinst.tosa.001000.1.grammar.json', 'TOSA.001000.1')
3333
mk_extinst('ArmMotionEngine', 'extinst.arm.motion-engine.100.grammar.json', 'ArmMotionEngine.100')
34+
mk_extinst('NonSemanticGraphDebugInfo', 'extinst.nonsemantic.graph.debuginfo.grammar.json')

0 commit comments

Comments
 (0)