You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Doc][SPIR-V] Allow function pointers to be used with SPV_KHR_untyped_pointers (#17451)
This relaxes the return type of the **OpConstantFunctionPointerINTEL**
to be any pointer (typed or untyped).
---------
Co-authored-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
@@ -39,14 +40,16 @@ If you are interested in using this feature in your software product, please let
39
40
40
41
[width="40%",cols="25,25"]
41
42
|==================================
42
-
| Last Modified Date | {docdate}
43
-
| Revision | I
43
+
| Last Modified Date | 2025-03-13
44
+
| Revision | 10
44
45
|==================================
45
46
46
47
== Dependencies
47
48
48
-
This extension is written against the SPIR-V Specification, Version 1.4
49
-
Revision 1, Unified.
49
+
This extension is written against the SPIR-V Specification, Version 1.6
50
+
Revision 5, Unified.
51
+
52
+
This extension interacts with link:https://github.khronos.org/SPIRV-Registry/extensions/KHR/SPV_KHR_untyped_pointers.html[*SPV_KHR_untyped_pointers*] extension.
50
53
51
54
This extension requires SPIR-V 1.0.
52
55
@@ -133,7 +136,7 @@ CodeSectionINTEL
133
136
|ArgumentAttributeINTEL | 6409
134
137
|====
135
138
136
-
== Modifications to the SPIR-V Specification, Version 1.4
139
+
== Modifications to the SPIR-V Specification, Version 1.6
137
140
138
141
=== Terms
139
142
@@ -179,7 +182,7 @@ all invocations of all work groups.
179
182
180
183
=== Decorations
181
184
182
-
Modify Section 3.20, Decorations, adding to the end of the list of decorations: ::
185
+
Modify Section 3.20, Decoration, adding to the end of the list of decorations: ::
Modify Section 3.31, Capabilities, adding to the end of the list of capabilities: ::
210
+
Modify Section 3.31, Capability, adding to the end of the list of capabilities: ::
208
211
209
212
210
213
[cols="1,10,8,8",options="header",width = "80%"]
@@ -223,13 +226,13 @@ Modify Section 3.31, Capabilities, adding to the end of the list of capabilities
223
226
224
227
=== Instructions
225
228
226
-
Modify Section 3.32.6, Type-Declaration Instructions, change the third sentence in the description of *OpTypeFunction* instruction to say: ::
229
+
Modify Section 3.56.6, Type-Declaration Instructions, change the third sentence in the description of *OpTypeFunction* instruction to say: ::
227
230
228
231
*OpTypeFunction* can be used as operand of *OpTypePointer* to declare function
229
232
pointer type. *OpFunction* and *OpTypePointer* are only valid uses of
230
233
*OpTypeFunction*.
231
234
232
-
Modify Section 3.32.7, Constant-Creation Instructions, adding to the end of the list of instructions: ::
235
+
Modify Section 3.56.7, Constant-Creation Instructions, adding to the end of the list of instructions: ::
233
236
234
237
[cols="2*1,3*3",width="100%"]
235
238
|=====
@@ -241,15 +244,15 @@ Result value can be used immediately in *OpFunctionPointerCallINTEL*, inserted
241
244
into a composite constant or stored somewhere for further usage in
242
245
*OpFunctionPointerCallINTEL*. +
243
246
+
244
-
_Result Type_ must be an *OpTypePointer*. Its _Type_ operand must be the same
247
+
_Result Type_ must be a link:https://github.khronos.org/SPIRV-Registry/extensions/KHR/SPV_KHR_untyped_pointers.html#PointerType[pointer type]. If the _Result Type_ is *OpTypePointer*, its _Type_ operand must be the same
245
248
*OpTypeFunction* which was used as _Function Type_ operand of the _Function_
246
249
operand. Its _Storage Class_ operand must be *CodeSectionINTEL*
0 commit comments