blob: 54ce6c6b5603174946800546e72348fb837c43c8 [file] [log] [blame]
dan sinclair1b77b6c2024-08-06 15:47:05 +00001; SPIR-V
2; Version: 1.3
3; Generator: Google Tint Compiler; 1
4; Bound: 45
5; Schema: 0
6 OpCapability Shader
7 OpMemoryModel Logical GLSL450
8 OpEntryPoint GLCompute %main "main"
9 OpExecutionMode %main LocalSize 1 1 1
10 OpName %deref "deref"
11 OpName %a "a"
12 OpName %a "p"
13 OpName %no_deref "no_deref"
14 OpName %a_0 "a"
15 OpName %a_0 "p"
16 OpName %deref_inc "deref_inc"
17 OpName %a_1 "a"
18 OpName %a_1 "p"
19 OpName %no_deref_inc "no_deref_inc"
20 OpName %a_2 "a"
21 OpName %a_2 "p"
22 OpName %main "main"
23 %void = OpTypeVoid
24 %3 = OpTypeFunction %void
25 %int = OpTypeInt 32 1
26 %v3int = OpTypeVector %int 3
27%_ptr_Function_v3int = OpTypePointer Function %v3int
28 %9 = OpConstantNull %v3int
29%_ptr_Function_int = OpTypePointer Function %int
30 %int_0 = OpConstant %int 0
31 %int_42 = OpConstant %int 42
32 %int_1 = OpConstant %int 1
33 %deref = OpFunction %void None %3
34 %4 = OpLabel
35 %a = OpVariable %_ptr_Function_v3int Function %9
36 %10 = OpAccessChain %_ptr_Function_int %a %int_0
dan sinclair50260412024-08-28 19:43:27 +000037 %13 = OpLoad %int %10 None
dan sinclair1b77b6c2024-08-06 15:47:05 +000038 %14 = OpIAdd %int %13 %int_42
39 %16 = OpAccessChain %_ptr_Function_int %a %int_0
dan sinclair50260412024-08-28 19:43:27 +000040 OpStore %16 %14 None
dan sinclair1b77b6c2024-08-06 15:47:05 +000041 OpReturn
42 OpFunctionEnd
43 %no_deref = OpFunction %void None %3
44 %18 = OpLabel
45 %a_0 = OpVariable %_ptr_Function_v3int Function %9
46 %20 = OpAccessChain %_ptr_Function_int %a_0 %int_0
dan sinclair50260412024-08-28 19:43:27 +000047 %21 = OpLoad %int %20 None
dan sinclair1b77b6c2024-08-06 15:47:05 +000048 %22 = OpIAdd %int %21 %int_42
49 %23 = OpAccessChain %_ptr_Function_int %a_0 %int_0
dan sinclair50260412024-08-28 19:43:27 +000050 OpStore %23 %22 None
dan sinclair1b77b6c2024-08-06 15:47:05 +000051 OpReturn
52 OpFunctionEnd
53 %deref_inc = OpFunction %void None %3
54 %25 = OpLabel
55 %a_1 = OpVariable %_ptr_Function_v3int Function %9
56 %27 = OpAccessChain %_ptr_Function_int %a_1 %int_0
dan sinclair50260412024-08-28 19:43:27 +000057 %28 = OpLoad %int %27 None
dan sinclair1b77b6c2024-08-06 15:47:05 +000058 %29 = OpIAdd %int %28 %int_1
59 %31 = OpAccessChain %_ptr_Function_int %a_1 %int_0
dan sinclair50260412024-08-28 19:43:27 +000060 OpStore %31 %29 None
dan sinclair1b77b6c2024-08-06 15:47:05 +000061 OpReturn
62 OpFunctionEnd
63%no_deref_inc = OpFunction %void None %3
64 %33 = OpLabel
65 %a_2 = OpVariable %_ptr_Function_v3int Function %9
66 %35 = OpAccessChain %_ptr_Function_int %a_2 %int_0
dan sinclair50260412024-08-28 19:43:27 +000067 %36 = OpLoad %int %35 None
dan sinclair1b77b6c2024-08-06 15:47:05 +000068 %37 = OpIAdd %int %36 %int_1
69 %38 = OpAccessChain %_ptr_Function_int %a_2 %int_0
dan sinclair50260412024-08-28 19:43:27 +000070 OpStore %38 %37 None
dan sinclair1b77b6c2024-08-06 15:47:05 +000071 OpReturn
72 OpFunctionEnd
73 %main = OpFunction %void None %3
74 %40 = OpLabel
75 %41 = OpFunctionCall %void %deref
76 %42 = OpFunctionCall %void %no_deref
77 %43 = OpFunctionCall %void %deref_inc
78 %44 = OpFunctionCall %void %no_deref_inc
79 OpReturn
80 OpFunctionEnd