mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-25 08:19:02 +00:00
SPIR-V: BuiltIn variables use the Input storage class (#769)
The OpenCL SPIR-V Environment Specification was updated to mandate that all variables decorated with `BuiltIn` must be in the `Input` storage class, see https://github.com/KhronosGroup/OpenCL-Docs/pull/278. Global variables with the Input storage class have to be listed in the entry points’ interface, which was also taken care of in this commit.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
OpCapability Kernel
|
||||
OpCapability Int64
|
||||
OpMemoryModel Physical64 OpenCL
|
||||
OpEntryPoint Kernel %1 "label_simple"
|
||||
OpEntryPoint Kernel %1 "label_simple" %gl_GlobalInvocationID
|
||||
OpName %in "in"
|
||||
OpName %out "out"
|
||||
OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId
|
||||
@@ -17,13 +17,13 @@
|
||||
OpDecorate %gl_GlobalInvocationID LinkageAttributes "__spirv_GlobalInvocationId" Import
|
||||
%ulong = OpTypeInt 64 0
|
||||
%v3ulong = OpTypeVector %ulong 3
|
||||
%_ptr_UniformConstant_v3ulong = OpTypePointer UniformConstant %v3ulong
|
||||
%_ptr_Input_v3ulong = OpTypePointer Input %v3ulong
|
||||
%ulong_32 = OpConstant %ulong 32
|
||||
%void = OpTypeVoid
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_CrossWorkgroup_uint = OpTypePointer CrossWorkgroup %uint
|
||||
%12 = OpTypeFunction %void %_ptr_CrossWorkgroup_uint %_ptr_CrossWorkgroup_uint
|
||||
%gl_GlobalInvocationID = OpVariable %_ptr_UniformConstant_v3ulong UniformConstant
|
||||
%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3ulong Input
|
||||
%1 = OpFunction %void None %12
|
||||
%in = OpFunctionParameter %_ptr_CrossWorkgroup_uint
|
||||
%out = OpFunctionParameter %_ptr_CrossWorkgroup_uint
|
||||
|
||||
Reference in New Issue
Block a user