mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-26 00:39: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:
@@ -7,7 +7,7 @@
|
||||
OpCapability Linkage
|
||||
OpCapability Kernel
|
||||
OpMemoryModel Physical32 OpenCL
|
||||
OpEntryPoint Kernel %1 "opaque"
|
||||
OpEntryPoint Kernel %1 "opaque" %gl_GlobalInvocationID
|
||||
OpName %in "in"
|
||||
OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId
|
||||
OpDecorate %gl_GlobalInvocationID Constant
|
||||
@@ -16,14 +16,14 @@
|
||||
OpDecorate %4 LinkageAttributes "opaque_store" Import
|
||||
%uint = OpTypeInt 32 0
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%_ptr_UniformConstant_v3uint = OpTypePointer UniformConstant %v3uint
|
||||
%_ptr_Input_v3uint = OpTypePointer Input %v3uint
|
||||
%void = OpTypeVoid
|
||||
%float = OpTypeFloat 32
|
||||
%Opaque_opaque_t = OpTypeOpaque "opaque_t"
|
||||
%_ptr_CrossWorkgroup_Opaque_opaque_t = OpTypePointer CrossWorkgroup %Opaque_opaque_t
|
||||
%float_3_14159274 = OpConstant %float 3.14159274
|
||||
%13 = OpTypeFunction %void %_ptr_CrossWorkgroup_Opaque_opaque_t
|
||||
%gl_GlobalInvocationID = OpVariable %_ptr_UniformConstant_v3uint UniformConstant
|
||||
%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input
|
||||
%14 = OpTypeFunction %void %_ptr_CrossWorkgroup_Opaque_opaque_t %uint %float
|
||||
%4 = OpFunction %void None %14
|
||||
%15 = OpFunctionParameter %_ptr_CrossWorkgroup_Opaque_opaque_t
|
||||
|
||||
Reference in New Issue
Block a user