blob: 0412631633beba4dba73ae0fe5c60784ae12f6f7 [file] [log] [blame]
James Pricef9d19712021-08-26 15:26:25 +00001; SPIR-V
2; Version: 1.3
3; Generator: Google Tint Compiler; 0
4; Bound: 31
5; Schema: 0
6 OpCapability Shader
7 OpMemoryModel Logical GLSL450
8 OpEntryPoint GLCompute %compute_main "compute_main" %local_invocation_index_1
9 OpExecutionMode %compute_main LocalSize 1 1 1
10 OpName %local_invocation_index_1 "local_invocation_index_1"
11 OpName %arg_0 "arg_0"
12 OpName %atomicSub_0d26c2 "atomicSub_0d26c2"
13 OpName %res "res"
14 OpName %compute_main_inner "compute_main_inner"
15 OpName %local_invocation_index "local_invocation_index"
16 OpName %compute_main "compute_main"
17 OpDecorate %local_invocation_index_1 BuiltIn LocalInvocationIndex
18 %uint = OpTypeInt 32 0
19%_ptr_Input_uint = OpTypePointer Input %uint
20%local_invocation_index_1 = OpVariable %_ptr_Input_uint Input
21%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
22 %arg_0 = OpVariable %_ptr_Workgroup_uint Workgroup
23 %void = OpTypeVoid
24 %6 = OpTypeFunction %void
25 %uint_2 = OpConstant %uint 2
26 %uint_0 = OpConstant %uint 0
27 %uint_1 = OpConstant %uint 1
28%_ptr_Function_uint = OpTypePointer Function %uint
29 %17 = OpConstantNull %uint
30 %18 = OpTypeFunction %void %uint
31 %uint_264 = OpConstant %uint 264
32%atomicSub_0d26c2 = OpFunction %void None %6
33 %9 = OpLabel
34 %res = OpVariable %_ptr_Function_uint Function %17
35 %10 = OpAtomicISub %uint %arg_0 %uint_2 %uint_0 %uint_1
36 OpStore %res %10
37 OpReturn
38 OpFunctionEnd
39%compute_main_inner = OpFunction %void None %18
40%local_invocation_index = OpFunctionParameter %uint
41 %21 = OpLabel
42 OpAtomicStore %arg_0 %uint_2 %uint_0 %17
43 OpControlBarrier %uint_2 %uint_2 %uint_264
44 %26 = OpFunctionCall %void %atomicSub_0d26c2
45 OpReturn
46 OpFunctionEnd
47%compute_main = OpFunction %void None %6
48 %28 = OpLabel
49 %30 = OpLoad %uint %local_invocation_index_1
50 %29 = OpFunctionCall %void %compute_main_inner %30
51 OpReturn
52 OpFunctionEnd