@@ -147,22 +147,10 @@ cl_int clEnqueueWriteGlobalVariableINTEL(
147
147
_program_ must define a global variable identified by _name_.
148
148
149
149
* _name_ identifies the global variable to read or write. Must be non-NULL.
150
- The interpretation depends on how _program_ was created:
151
-
152
- ** If _program_ was created with *clCreateProgramWithIL* from SPIR-V, there are
153
- two cases:
154
-
155
- *** If the SPIR-V module declares the *GlobalVariableDecorationsINTEL*
156
- capability, the implementation looks first for an *OpVariable* that is
157
- decorated with *HostAccessINTEL* where the _Name_ operand is the same as
158
- _name_.
159
-
160
- *** The implementation next looks for an *OpVariable* that is decorated with
161
- *LinkageAttributes* where the _Linkage Type_ is *Export* and the _Name_
162
- operand is the same as _name_.
163
-
164
- ** If _program_ was created in any other way, the interpretation of
165
- _name_ is implementation-defined.
150
+ The interpretation depends on how _program_ was created, so see the
151
+ appropriate environment specification for details. (For example, if
152
+ _program_ was created from SPIR-V, see the OpenCL SPIR-V Environment
153
+ Specification.)
166
154
167
155
* _blocking_read_ and _blocking_write_ indicate if the read and write
168
156
operations are _blocking_ or _non-blocking_ (see below).
@@ -292,6 +280,29 @@ Add two new rows to Table 37, *List of supported event command types*:
292
280
|===
293
281
294
282
283
+ == Modifications to the OpenCL SPIR-V Environment Specification
284
+
285
+ === New Section "Global Variables"
286
+
287
+ Add a new subsection under section 2, *Common Properties* named *Global
288
+ Variables* with the following content:
289
+
290
+ Host code may read or write the content of a global variable in a `cl_program`
291
+ by calling *clEnqueueReadGlobalVariableINTEL* or
292
+ *clEnqueueWriteGlobalVariableINTEL*. Those two functions both take a _name_
293
+ parameter which identifies the variable. For a `cl_program` created from
294
+ SPIR-V, this parameter is interpreted as follows:
295
+
296
+ * If the SPIR-V module used to create _program_ declares the
297
+ *GlobalVariableDecorationsINTEL* capability, the implementation looks first
298
+ for an *OpVariable* that is decorated with *HostAccessINTEL* where the _Name_
299
+ operand is the same as _name_.
300
+
301
+ * The implementation next looks for an *OpVariable* that is decorated with
302
+ *LinkageAttributes* where the _Linkage Type_ is *Export* and the _Name_
303
+ operand is the same as _name_.
304
+
305
+
295
306
== Issues
296
307
297
308
. We do not have a formal definition for the _name_ of a global variable when
0 commit comments