1; SPIR-V
2; Version: 1.0
3; Generator: Khronos Glslang Reference Front End; 7
4; Bound: 108
5; Schema: 0
6               OpCapability Shader
7          %1 = OpExtInstImport "GLSL.std.450"
8               OpMemoryModel Logical GLSL450
9               OpEntryPoint GLCompute %main "main" %gl_NumWorkGroups %gl_WorkGroupID %gl_LocalInvocationID %gl_GlobalInvocationID %gl_LocalInvocationIndex
10               OpExecutionMode %main LocalSize 2 5 7
11               OpSource ESSL 310
12               OpName %main "main"
13               OpName %bName "bName"
14               OpMemberName %bName 0 "size"
15               OpMemberName %bName 1 "count"
16               OpMemberName %bName 2 "data"
17               OpName %bInst "bInst"
18               OpName %s "s"
19               OpName %arrX "arrX"
20               OpName %arrY "arrY"
21               OpName %arrZ "arrZ"
22               OpName %gl_NumWorkGroups "gl_NumWorkGroups"
23               OpName %gl_WorkGroupID "gl_WorkGroupID"
24               OpName %gl_LocalInvocationID "gl_LocalInvocationID"
25               OpName %gl_GlobalInvocationID "gl_GlobalInvocationID"
26               OpName %gl_LocalInvocationIndex "gl_LocalInvocationIndex"
27               OpDecorate %_runtimearr_v4float ArrayStride 16
28               OpMemberDecorate %bName 0 Offset 0
29               OpMemberDecorate %bName 1 Offset 16
30               OpMemberDecorate %bName 2 Offset 32
31               OpDecorate %bName BufferBlock
32               OpDecorate %bInst DescriptorSet 0
33               OpDecorate %bInst Binding 0
34               OpDecorate %39 SpecId 18
35               OpDecorate %41 SpecId 19
36               OpDecorate %gl_WorkGroupSize BuiltIn WorkgroupSize
37               OpDecorate %gl_NumWorkGroups BuiltIn NumWorkgroups
38               OpDecorate %gl_WorkGroupID BuiltIn WorkgroupId
39               OpDecorate %gl_LocalInvocationID BuiltIn LocalInvocationId
40               OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId
41               OpDecorate %gl_LocalInvocationIndex BuiltIn LocalInvocationIndex
42       %void = OpTypeVoid
43          %3 = OpTypeFunction %void
44       %uint = OpTypeInt 32 0
45     %uint_2 = OpConstant %uint 2
46   %uint_264 = OpConstant %uint 264
47        %int = OpTypeInt 32 1
48     %v3uint = OpTypeVector %uint 3
49      %float = OpTypeFloat 32
50    %v4float = OpTypeVector %float 4
51%_runtimearr_v4float = OpTypeRuntimeArray %v4float
52      %bName = OpTypeStruct %int %v3uint %_runtimearr_v4float
53%_ptr_Uniform_bName = OpTypePointer Uniform %bName
54      %bInst = OpVariable %_ptr_Uniform_bName Uniform
55      %int_2 = OpConstant %int 2
56      %int_0 = OpConstant %int 0
57%_ptr_Uniform_int = OpTypePointer Uniform %int
58    %float_7 = OpConstant %float 7
59         %24 = OpConstantComposite %v4float %float_7 %float_7 %float_7 %float_7
60%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
61     %uint_1 = OpConstant %uint 1
62  %uint_3400 = OpConstant %uint 3400
63    %uint_72 = OpConstant %uint 72
64%uint_197645 = OpConstant %uint 197645
65%_arr_v4float_uint_197645 = OpTypeArray %v4float %uint_197645
66%_ptr_Workgroup__arr_v4float_uint_197645 = OpTypePointer Workgroup %_arr_v4float_uint_197645
67          %s = OpVariable %_ptr_Workgroup__arr_v4float_uint_197645 Workgroup
68      %int_3 = OpConstant %int 3
69    %float_0 = OpConstant %float 0
70         %39 = OpSpecConstant %uint 2
71     %uint_5 = OpConstant %uint 5
72         %41 = OpSpecConstant %uint 7
73%gl_WorkGroupSize = OpSpecConstantComposite %v3uint %39 %uint_5 %41
74     %uint_0 = OpConstant %uint 0
75%_arr_int_44 = OpTypeArray %int %44
76%_ptr_Private__arr_int_44 = OpTypePointer Private %_arr_int_44
77       %arrX = OpVariable %_ptr_Private__arr_int_44 Private
78%_ptr_Private_int = OpTypePointer Private %int
79%_arr_int_52 = OpTypeArray %int %52
80%_ptr_Private__arr_int_52 = OpTypePointer Private %_arr_int_52
81       %arrY = OpVariable %_ptr_Private__arr_int_52 Private
82%_arr_int_59 = OpTypeArray %int %59
83%_ptr_Private__arr_int_59 = OpTypePointer Private %_arr_int_59
84       %arrZ = OpVariable %_ptr_Private__arr_int_59 Private
85%_ptr_Workgroup_v4float = OpTypePointer Workgroup %v4float
86      %int_1 = OpConstant %int 1
87%_ptr_Input_v3uint = OpTypePointer Input %v3uint
88%gl_NumWorkGroups = OpVariable %_ptr_Input_v3uint Input
89%gl_WorkGroupID = OpVariable %_ptr_Input_v3uint Input
90%gl_LocalInvocationID = OpVariable %_ptr_Input_v3uint Input
91%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input
92%_ptr_Input_uint = OpTypePointer Input %uint
93%gl_LocalInvocationIndex = OpVariable %_ptr_Input_uint Input
94%_ptr_Uniform_v3uint = OpTypePointer Uniform %v3uint
95      %int_5 = OpConstant %int 5
96 %int_197645 = OpConstant %int 197645
97       %main = OpFunction %void None %3
98          %5 = OpLabel
99               OpControlBarrier %uint_2 %uint_2 %uint_264
100         %20 = OpAccessChain %_ptr_Uniform_int %bInst %int_0
101         %21 = OpLoad %int %20
102         %22 = OpSDiv %int %21 %int_2
103         %26 = OpAccessChain %_ptr_Uniform_v4float %bInst %int_2 %22
104         %27 = OpLoad %v4float %26
105         %28 = OpFMul %v4float %27 %24
106         %29 = OpAccessChain %_ptr_Uniform_v4float %bInst %int_2 %22
107               OpStore %29 %28
108               OpMemoryBarrier %uint_1 %uint_3400
109               OpMemoryBarrier %uint_2 %uint_3400
110               OpMemoryBarrier %uint_1 %uint_264
111               OpMemoryBarrier %uint_1 %uint_72
112         %44 = OpCompositeExtract %uint %gl_WorkGroupSize 0
113         %49 = OpAccessChain %_ptr_Private_int %arrX %int_0
114         %50 = OpLoad %int %49
115         %51 = OpConvertSToF %float %50
116         %52 = OpCompositeExtract %uint %gl_WorkGroupSize 1
117         %56 = OpAccessChain %_ptr_Private_int %arrY %int_0
118         %57 = OpLoad %int %56
119         %58 = OpConvertSToF %float %57
120         %59 = OpCompositeExtract %uint %gl_WorkGroupSize 2
121         %63 = OpAccessChain %_ptr_Private_int %arrZ %int_0
122         %64 = OpLoad %int %63
123         %65 = OpConvertSToF %float %64
124         %66 = OpCompositeConstruct %v4float %float_0 %51 %58 %65
125         %68 = OpAccessChain %_ptr_Workgroup_v4float %s %int_3
126               OpStore %68 %66
127         %72 = OpLoad %v3uint %gl_NumWorkGroups
128         %73 = OpIAdd %v3uint %72 %gl_WorkGroupSize
129         %75 = OpLoad %v3uint %gl_WorkGroupID
130         %76 = OpIAdd %v3uint %73 %75
131         %78 = OpLoad %v3uint %gl_LocalInvocationID
132         %79 = OpIAdd %v3uint %76 %78
133         %81 = OpLoad %v3uint %gl_GlobalInvocationID
134         %84 = OpLoad %uint %gl_LocalInvocationIndex
135         %85 = OpCompositeConstruct %v3uint %84 %84 %84
136         %86 = OpIMul %v3uint %81 %85
137         %87 = OpIAdd %v3uint %79 %86
138         %89 = OpAccessChain %_ptr_Uniform_v3uint %bInst %int_1
139               OpStore %89 %87
140         %90 = OpAccessChain %_ptr_Uniform_int %bInst %int_0
141         %91 = OpAtomicIAdd %int %90 %uint_1 %uint_0 %int_2
142         %92 = OpAccessChain %_ptr_Uniform_int %bInst %int_0
143         %93 = OpAtomicSMin %int %92 %uint_1 %uint_0 %int_2
144         %94 = OpAccessChain %_ptr_Uniform_int %bInst %int_0
145         %95 = OpAtomicSMax %int %94 %uint_1 %uint_0 %int_2
146         %96 = OpAccessChain %_ptr_Uniform_int %bInst %int_0
147         %97 = OpAtomicAnd %int %96 %uint_1 %uint_0 %int_2
148         %98 = OpAccessChain %_ptr_Uniform_int %bInst %int_0
149         %99 = OpAtomicOr %int %98 %uint_1 %uint_0 %int_2
150        %100 = OpAccessChain %_ptr_Uniform_int %bInst %int_0
151        %101 = OpAtomicXor %int %100 %uint_1 %uint_0 %int_2
152        %102 = OpAccessChain %_ptr_Uniform_int %bInst %int_0
153        %103 = OpAtomicExchange %int %102 %uint_1 %uint_0 %int_2
154        %104 = OpAccessChain %_ptr_Uniform_int %bInst %int_0
155        %106 = OpAtomicCompareExchange %int %104 %uint_1 %uint_0 %uint_0 %int_2 %int_5
156               OpReturn
157               OpFunctionEnd
158