1; SPIR-V
2; Version: 1.0
3; Generator: Khronos Glslang Reference Front End; 1
4; Bound: 67
5; Schema: 0
6               OpCapability Shader
7          %1 = OpExtInstImport "GLSL.std.450"
8               OpMemoryModel Logical GLSL450
9               OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationID
10               OpExecutionMode %main LocalSize 2 1 1
11               OpSource GLSL 450
12               OpSourceExtension "GL_ARB_shading_language_420pack"
13               OpSourceExtension "GL_GOOGLE_cpp_style_line_directive"
14               OpSourceExtension "GL_GOOGLE_include_directive"
15               OpName %main "main"
16               OpName %xy "xy"
17               OpName %gl_GlobalInvocationID "gl_GlobalInvocationID"
18               OpName %inputPixel "inputPixel"
19               OpName %inputTexture "inputTexture"
20               OpName %res "res"
21               OpName %globalBuffer "globalBuffer"
22               OpMemberName %globalBuffer 0 "coeff"
23               OpMemberName %globalBuffer 1 "width"
24               OpMemberName %globalBuffer 2 "height"
25               OpName %globalBlock "globalBlock"
26               OpName %x "x"
27               OpName %y "y"
28               OpName %outputBufferS "outputBufferS"
29               OpMemberName %outputBufferS 0 "buf"
30               OpName %outputBuffer "outputBuffer"
31               OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId
32               OpDecorate %inputTexture DescriptorSet 0
33               OpDecorate %inputTexture Binding 0
34               OpMemberDecorate %globalBuffer 0 Offset 0
35               OpMemberDecorate %globalBuffer 1 Offset 16
36               OpMemberDecorate %globalBuffer 2 Offset 20
37               OpDecorate %globalBuffer BufferBlock
38               OpDecorate %globalBlock DescriptorSet 0
39               OpDecorate %globalBlock Binding 2
40               OpDecorate %_runtimearr_v4float ArrayStride 16
41               OpMemberDecorate %outputBufferS 0 Offset 0
42               OpDecorate %outputBufferS BufferBlock
43               OpDecorate %outputBuffer DescriptorSet 0
44               OpDecorate %outputBuffer Binding 1
45               OpDecorate %gl_WorkGroupSize BuiltIn WorkgroupSize
46       %void = OpTypeVoid
47          %3 = OpTypeFunction %void
48        %int = OpTypeInt 32 1
49      %v2int = OpTypeVector %int 2
50%_ptr_Function_v2int = OpTypePointer Function %v2int
51       %uint = OpTypeInt 32 0
52     %v3uint = OpTypeVector %uint 3
53%_ptr_Input_v3uint = OpTypePointer Input %v3uint
54%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input
55     %v2uint = OpTypeVector %uint 2
56      %float = OpTypeFloat 32
57    %v4float = OpTypeVector %float 4
58%_ptr_Function_v4float = OpTypePointer Function %v4float
59         %22 = OpTypeImage %float 2D 0 0 0 1 Unknown
60         %23 = OpTypeSampledImage %22
61%_ptr_UniformConstant_23 = OpTypePointer UniformConstant %23
62%inputTexture = OpVariable %_ptr_UniformConstant_23 UniformConstant
63         %28 = OpConstant %int 0
64%globalBuffer = OpTypeStruct %v4float %int %int
65%_ptr_Uniform_globalBuffer = OpTypePointer Uniform %globalBuffer
66%globalBlock = OpVariable %_ptr_Uniform_globalBuffer Uniform
67%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
68%_ptr_Function_uint = OpTypePointer Function %uint
69         %42 = OpConstant %uint 0
70%_ptr_Input_uint = OpTypePointer Input %uint
71         %47 = OpConstant %uint 1
72%_runtimearr_v4float = OpTypeRuntimeArray %v4float
73%outputBufferS = OpTypeStruct %_runtimearr_v4float
74%_ptr_Uniform_outputBufferS = OpTypePointer Uniform %outputBufferS
75%outputBuffer = OpVariable %_ptr_Uniform_outputBufferS Uniform
76         %55 = OpConstant %int 1
77%_ptr_Uniform_int = OpTypePointer Uniform %int
78         %65 = OpConstant %uint 2
79%gl_WorkGroupSize = OpConstantComposite %v3uint %65 %47 %47
80       %main = OpFunction %void None %3
81          %5 = OpLabel
82         %xy = OpVariable %_ptr_Function_v2int Function
83 %inputPixel = OpVariable %_ptr_Function_v4float Function
84        %res = OpVariable %_ptr_Function_v4float Function
85          %x = OpVariable %_ptr_Function_uint Function
86          %y = OpVariable %_ptr_Function_uint Function
87         %15 = OpLoad %v3uint %gl_GlobalInvocationID
88         %16 = OpVectorShuffle %v2uint %15 %15 0 1
89         %17 = OpBitcast %v2int %16
90               OpStore %xy %17
91         %26 = OpLoad %23 %inputTexture
92         %27 = OpLoad %v2int %xy
93         %29 = OpImageFetch %v4float %26 %27 Lod %28
94               OpStore %inputPixel %29
95         %31 = OpLoad %v4float %inputPixel
96         %36 = OpAccessChain %_ptr_Uniform_v4float %globalBlock %28
97         %37 = OpLoad %v4float %36
98         %38 = OpDot %float %31 %37
99         %39 = OpCompositeConstruct %v4float %38 %38 %38 %38
100               OpStore %res %39
101         %44 = OpAccessChain %_ptr_Input_uint %gl_GlobalInvocationID %42
102         %45 = OpLoad %uint %44
103               OpStore %x %45
104         %48 = OpAccessChain %_ptr_Input_uint %gl_GlobalInvocationID %47
105         %49 = OpLoad %uint %48
106               OpStore %y %49
107         %54 = OpLoad %uint %y
108         %57 = OpAccessChain %_ptr_Uniform_int %globalBlock %55
109         %58 = OpLoad %int %57
110         %59 = OpBitcast %uint %58
111         %60 = OpIMul %uint %54 %59
112         %61 = OpLoad %uint %x
113         %62 = OpIAdd %uint %60 %61
114         %63 = OpLoad %v4float %res
115         %64 = OpAccessChain %_ptr_Uniform_v4float %outputBuffer %28 %62
116               OpStore %64 %63
117               OpReturn
118               OpFunctionEnd
119