mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-24 15:59:03 +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:
@@ -9,7 +9,7 @@
|
||||
OpCapability Int64
|
||||
%1 = OpExtInstImport "OpenCL.std"
|
||||
OpMemoryModel Physical64 OpenCL
|
||||
OpEntryPoint Kernel %2 "fmath_spv"
|
||||
OpEntryPoint Kernel %2 "fmath_spv" %gl_GlobalInvocationID
|
||||
OpName %res "res"
|
||||
OpName %lhs "lhs"
|
||||
OpName %rhs "rhs"
|
||||
@@ -22,13 +22,13 @@
|
||||
OpGroupDecorate %7 %res %lhs %rhs
|
||||
%ulong = OpTypeInt 64 0
|
||||
%v3ulong = OpTypeVector %ulong 3
|
||||
%_ptr_UniformConstant_v3ulong = OpTypePointer UniformConstant %v3ulong
|
||||
%_ptr_Input_v3ulong = OpTypePointer Input %v3ulong
|
||||
%void = OpTypeVoid
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_CrossWorkgroup_float = OpTypePointer CrossWorkgroup %float
|
||||
%15 = OpTypeFunction %void %_ptr_CrossWorkgroup_float %_ptr_CrossWorkgroup_float %_ptr_CrossWorkgroup_float
|
||||
%ulong_32 = OpConstant %ulong 32
|
||||
%gl_GlobalInvocationID = OpVariable %_ptr_UniformConstant_v3ulong UniformConstant
|
||||
%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3ulong Input
|
||||
%2 = OpFunction %void None %15
|
||||
%res = OpFunctionParameter %_ptr_CrossWorkgroup_float
|
||||
%lhs = OpFunctionParameter %_ptr_CrossWorkgroup_float
|
||||
|
||||
Reference in New Issue
Block a user