|
| 1 | +SPV_INTEL_long_composites |
| 2 | +========================= |
| 3 | + |
| 4 | +Name Strings |
| 5 | +------------ |
| 6 | + |
| 7 | +SPV_INTEL_long_composites |
| 8 | + |
| 9 | +Contact |
| 10 | +------- |
| 11 | + |
| 12 | +To report problems with this extension, please open a new issue at: |
| 13 | + |
| 14 | +https://github.com/KhronosGroup/SPIRV-Headers |
| 15 | + |
| 16 | +Contributors |
| 17 | +------------ |
| 18 | + |
| 19 | +- Mariya Podchishchaeva, Intel |
| 20 | +- Alexey Sotkin, Intel |
| 21 | +- Ben Ashbaugh, Intel |
| 22 | +- Alexey Sachkov, Intel |
| 23 | +
|
| 24 | +Notice |
| 25 | +------ |
| 26 | + |
| 27 | +Copyright (c) 2020 Intel Corporation. All rights reserved. |
| 28 | + |
| 29 | +Status |
| 30 | +------ |
| 31 | + |
| 32 | +Draft. |
| 33 | + |
| 34 | +Version |
| 35 | +------- |
| 36 | + |
| 37 | +[width="40%",cols="25,25"] |
| 38 | +|======================================== |
| 39 | +| Last Modified Date | 2021-01-15 |
| 40 | +| Revision | 8 |
| 41 | +|======================================== |
| 42 | + |
| 43 | +Dependencies |
| 44 | +------------ |
| 45 | + |
| 46 | +This extension is written against the SPIR-V Specification, |
| 47 | +Version 1.5 Revision 4, Unified |
| 48 | + |
| 49 | +This extension requires SPIR-V 1.0. |
| 50 | + |
| 51 | +Overview |
| 52 | +-------- |
| 53 | + |
| 54 | +This extension adds new capability and instructions to allow to represent |
| 55 | +composites with number of Constituents greater than the maximum |
| 56 | +possible WordCount. |
| 57 | + |
| 58 | +Extension Name |
| 59 | +-------------- |
| 60 | + |
| 61 | +To use this extension within a SPIR-V module, the following |
| 62 | +*OpExtension* must be present in the module: |
| 63 | + |
| 64 | +---- |
| 65 | +OpExtension "SPV_INTEL_long_composites" |
| 66 | +---- |
| 67 | + |
| 68 | +Modifications to the SPIR-V Specification, Version 1.5 |
| 69 | +------------------------------------------------------ |
| 70 | +Capabilities |
| 71 | +~~~~~~~~~~~~ |
| 72 | + |
| 73 | +Modify Section 3.31, "Capability", adding these rows to the Capability table: |
| 74 | + |
| 75 | +-- |
| 76 | +[options="header"] |
| 77 | +|==== |
| 78 | +2+^| Capability ^| Implicitly Declares |
| 79 | +| 6089 | *CapabilityLongCompositesINTEL* + |
| 80 | +Allow to use *OpTypeStructContinuedINTEL*, *OpConstantCompositeContinuedINTEL*, |
| 81 | +*OpCompositeConstructContinuedINTEL* and *OpSpecConstantCompositeContinuedINTEL* instructions | |
| 82 | +|==== |
| 83 | +-- |
| 84 | + |
| 85 | +Instructions |
| 86 | +~~~~~~~~~~~~ |
| 87 | +In section 3.37.6. Type-Declaration Instructions add the new instruction |
| 88 | +[cols="3", width="100%"] |
| 89 | +|===== |
| 90 | +2+^|*OpTypeStructContinuedINTEL* + |
| 91 | + |
| 92 | +Continue specifying an *OpTypeStruct* with number of _Member types_ |
| 93 | +greater than the maximum possible WordCount. |
| 94 | + |
| 95 | +The previous instruction must be an *OpTypeStruct* or an |
| 96 | +*OpTypeStructContinuedINTEL* instruction. |
| 97 | + |
| 98 | +_Member types_ follow the same rules as defined for _Member types_ of |
| 99 | +*OpTypeStruct*. |
| 100 | + |
| 101 | +| Capability: |
| 102 | +*CapabilityLongCompositesINTEL* |
| 103 | + |
| 104 | +| 2 + variable | 6090 | _<id>, <id>, ... Member N type, member N + 1 type_| |
| 105 | +|===== |
| 106 | + |
| 107 | +Modify the description of *OpTypeStruct* instruction, adding the |
| 108 | +following sentence to the end: |
| 109 | +In case if it is not possible to specify all the _member types_ of the structure |
| 110 | +by one *OpTypeStruct* instruction, i.e. if number of members of the |
| 111 | +_Result type_ is greater than the maximum possible WordCount, the remaining |
| 112 | +_member types_ are specified by the following *OpTypeStructContinuedINTEL* |
| 113 | +instructions. |
| 114 | + |
| 115 | +In section 3.37.7. Constant-Creation Instructions, add the new instructions |
| 116 | +[cols="3", width="100%"] |
| 117 | +|===== |
| 118 | +2+^|*OpConstantCompositeContinuedINTEL* + |
| 119 | + |
| 120 | +Continue specifying an *OpConstantComposite* instruction with number of |
| 121 | +_Constituents_ greater than the maximum possible WordCount. |
| 122 | + |
| 123 | +The previous instruction must be an *OpConstantComposite* or an |
| 124 | +*OpConstantCompositeContinuedINTEL* instruction. |
| 125 | + |
| 126 | +_Constituents_ follow the same rules as defined for _Constituents_ of |
| 127 | +*OpConstantComposite* instruction and specify members of a structure, or |
| 128 | +elements of an array, or components of a vector, or columns of a matrix. |
| 129 | + |
| 130 | +| Capability: |
| 131 | +*CapabilityLongCompositesINTEL* |
| 132 | + |
| 133 | +| 2 + variable | 6091 | _<id>, <id>, ... Constituents_ | |
| 134 | +|===== |
| 135 | +[cols="3", width="100%"] |
| 136 | +|===== |
| 137 | +2+^|*OpSpecConstantCompositeContinuedINTEL* + |
| 138 | + |
| 139 | +Continue specifying an *OpSpecConstantComposite* instruction with number of |
| 140 | +_Constituents_ greater than the maximum possible WordCount. |
| 141 | + |
| 142 | +The previous instruction must be an *OpSpecConstantComposite* or an |
| 143 | +*OpSpecConstantCompositeContinuedINTEL* instruction. |
| 144 | + |
| 145 | +_Constituents_ follow the same rules as defined for _Constituents_ of |
| 146 | +*OpSpecConstantComposite* instruction and specify members of a structure, or |
| 147 | +elements of an array, or components of a vector, or columns of a matrix. |
| 148 | + |
| 149 | +This instruction will be specialized to an *OpConstantCompositeContinuedINTEL* |
| 150 | +instruction. |
| 151 | + |
| 152 | +See <<Specialization, Specialization>>. |
| 153 | + |
| 154 | +| Capability: |
| 155 | +*CapabilityLongCompositesINTEL* |
| 156 | + |
| 157 | +| 2 + variable | 6092 | _<id>, <id>, ... Constituents_ | |
| 158 | +|===== |
| 159 | + |
| 160 | +Modify the description of *OpConstantComposite* instruction, adding the |
| 161 | +following sentence to the end: |
| 162 | +In case if it is not possible to specify all the _Constituents_ by one |
| 163 | +*OpConstantComposite* instruction, i.e. if number of members of the |
| 164 | +_Result type_ and corresponding _Constituents_ is greater than the maximum |
| 165 | +possible WordCount, the remaining _Constituents_ are specified by the following |
| 166 | +*OpConstantCompositeContinuedINTEL* instructions. |
| 167 | + |
| 168 | +Modify the description of *OpSpecConstantComposite* instruction, adding the |
| 169 | +following sentence to the end: |
| 170 | +In case if it is not possible to specify all the _Constituents_ by one |
| 171 | +*OpSpecConstantComposite* instruction, i.e. if number of members of the |
| 172 | +_Result type_ and corresponding _Constituents_ is greater than the maximum |
| 173 | +possible WordCount, the remaining _Constituents_ are specified by the following |
| 174 | +*OpSpecConstantCompositeContinuedINTEL* instructions. |
| 175 | + |
| 176 | +In Section 3.37.8. Memory Instructions, modify the description of the |
| 177 | +*OpAccessChain* instruction, adding the following sentence to the end: |
| 178 | +In case _Base_ is an *OpConstantComposite* instruction followed by one or |
| 179 | +more *OpConstantCompositeContinuedINTEL* instructions, the bounds must be bounds |
| 180 | +of *OpConstantComposite* and the following *OpConstantCompositeContinuedINTEL* |
| 181 | +instructions together. Same is applicable in case _Base_ is an |
| 182 | +*OpSpecConstantComposite* instruction followed by one or more |
| 183 | +*OpSpecConstantCompositeContinuedINTEL* instructions. |
| 184 | + |
| 185 | +In section 3.37.12. Composite Instructions, add the new instruction |
| 186 | +[cols="3", width="100%"] |
| 187 | +|===== |
| 188 | +2+^|*OpCompositeConstructContinuedINTEL* + |
| 189 | + |
| 190 | +Continue specifying an *OpCompositeConstruct* instruction with number of |
| 191 | +_Constituents_ greater than the maximum possible WordCount. |
| 192 | + |
| 193 | +The previous instruction must be an *OpCompositeConstruct* or an |
| 194 | +*OpCompositeConstructContinuedINTEL* instruction. |
| 195 | + |
| 196 | +_Constituents_ follow the same rules as defined for _Constituents_ of |
| 197 | +*OpCompositeConstruct* instruction and specify members of a structure, or |
| 198 | +elements of an array, or components of a vector, or columns of a matrix. |
| 199 | + |
| 200 | +| Capability: |
| 201 | +*CapabilityLongCompositesINTEL* |
| 202 | + |
| 203 | +| 2 + variable | 6096 | _<id>, <id>, ... Constituents_ | |
| 204 | +|===== |
| 205 | + |
| 206 | +Issues |
| 207 | +------ |
| 208 | + |
| 209 | +1) Do we need to define additional validation rules? |
| 210 | + |
| 211 | +Resolution: |
| 212 | + |
| 213 | +No. |
| 214 | + |
| 215 | +2) Do we need modifications of the OpConstantComposite/OpSpecConstantComposite |
| 216 | +instruction description? |
| 217 | + |
| 218 | +Resolution: |
| 219 | + |
| 220 | +Yes, it seems that description of these instructions defines one to one match |
| 221 | +between composite type members and Constituents by the sentence: |
| 222 | +"There must be exactly one Constituent for each top-level |
| 223 | +member/element/component/column of the result." Done. |
| 224 | + |
| 225 | +3) We also might want to modify OpAccessChain to clarify how it works on large |
| 226 | +constants. |
| 227 | + |
| 228 | +Resolution: |
| 229 | + |
| 230 | +Yes. Added statement clarifying bounds of OpAccessChain instruction in case when |
| 231 | +long composite constant is accessed. |
| 232 | + |
| 233 | +Revision History |
| 234 | +---------------- |
| 235 | + |
| 236 | +[cols="5,15,15,70"] |
| 237 | +[grid="rows"] |
| 238 | +[options="header"] |
| 239 | +|======================================== |
| 240 | +|Rev|Date|Author|Changes |
| 241 | +|1|2020-11-09|Mariya Podchishchaeva|Initial revision |
| 242 | +|2|2020-11-13|Mariya Podchishchaeva|Apply comments from Alexey Sotkin and |
| 243 | +Alexey Sachkov + |
| 244 | +- Add OpTypeStructContinuedINTEL + |
| 245 | +- Add OpSpecConstantCompositeContinuedINTEL + |
| 246 | +- Remove type and id from "continued" instructions since they are not necessary + |
| 247 | +- Fix several typos |
| 248 | +|3|2020-11-16|Mariya Podchishchaeva|Modify description of the |
| 249 | +OpConstantComposite and OpSpecConstantComposite instructions |
| 250 | +|4|2020-11-23|Mariya Podchishchaeva|Apply comments from Alexey Sotkin and Alexey |
| 251 | +Sachkov |
| 252 | +|5|2020-11-26|Mariya Podchishchaeva|Apply comments from Alexey Sotkin and Alexey |
| 253 | +Sachkov |
| 254 | +|6|2020-12-07|Mariya Podchishchaeva|Apply comments from Alexey Sotkin and |
| 255 | +Mikhail Lychkov |
| 256 | +|7|2021-01-14|Mariya Podchishchaeva|Add OpCompositeConstructContinuedINTEL |
| 257 | +|8|2021-01-15|Mariya Podchishchaeva|Rename extension to SPV_INTEL_long_composites |
| 258 | +|======================================== |
0 commit comments