blob: ecc078b32efcf6ff11c111fce71ab085f4900612 [file] [log] [blame]
; SPIR-V
; Version: 1.0
; Generator: Khronos SPIR-V Tools Assembler; 0
; Bound: 28
; Schema: 0
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int16
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %1 "vector_times_scalar" %gl_GlobalInvocationID
OpName %res "res"
OpName %lhs "lhs"
OpName %rhs "rhs"
OpDecorate %5 FuncParamAttr NoCapture
%5 = OpDecorationGroup
OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId
OpDecorate %gl_GlobalInvocationID Constant
OpDecorate %gl_GlobalInvocationID LinkageAttributes "__spirv_GlobalInvocationId" Import
OpGroupDecorate %5 %res %lhs %rhs
%ulong = OpTypeInt 64 0
%v3ulong = OpTypeVector %ulong 3
%_ptr_Input_v3ulong = OpTypePointer Input %v3ulong
%ulong_32 = OpConstant %ulong 32
%void = OpTypeVoid
%float = OpTypeFloat 32
%_ptr_CrossWorkgroup_float = OpTypePointer CrossWorkgroup %float
%v4float = OpTypeVector %float 4
%_ptr_CrossWorkgroup_v4float = OpTypePointer CrossWorkgroup %v4float
%16 = OpTypeFunction %void %_ptr_CrossWorkgroup_v4float %_ptr_CrossWorkgroup_v4float %_ptr_CrossWorkgroup_float
%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3ulong Input
%1 = OpFunction %void None %16
%res = OpFunctionParameter %_ptr_CrossWorkgroup_v4float
%lhs = OpFunctionParameter %_ptr_CrossWorkgroup_v4float
%rhs = OpFunctionParameter %_ptr_CrossWorkgroup_float
%17 = OpLabel
%18 = OpLoad %v3ulong %gl_GlobalInvocationID Aligned 0
%19 = OpCompositeExtract %ulong %18 0
%20 = OpShiftLeftLogical %ulong %19 %ulong_32
%21 = OpShiftRightArithmetic %ulong %20 %ulong_32
%22 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_v4float %lhs %21
%23 = OpLoad %v4float %22 Aligned 16
%24 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_float %rhs %21
%25 = OpLoad %float %24 Aligned 4
%26 = OpVectorTimesScalar %v4float %23 %25
%27 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_v4float %res %21
OpStore %27 %26 Aligned 16
OpReturn
OpFunctionEnd