blob: 107e666bf421fa7827bc9012b2cf56c597ae73e7 [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: 29
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 OpMemberName %S 0 "x"
12 OpName %S "S"
13 OpName %a "a"
14 OpName %a "p"
15 OpName %b "b"
16 OpName %no_deref "no_deref"
17 OpName %a_0 "a"
18 OpName %a_0 "p"
19 OpName %b_0 "b"
20 OpName %main "main"
21 OpMemberDecorate %S 0 Offset 0
22 %void = OpTypeVoid
23 %3 = OpTypeFunction %void
24 %int = OpTypeInt 32 1
25 %S = OpTypeStruct %int
26%_ptr_Function_S = OpTypePointer Function %S
27 %9 = OpConstantNull %S
28%_ptr_Function_int = OpTypePointer Function %int
29 %uint = OpTypeInt 32 0
30 %uint_0 = OpConstant %uint 0
31 %int_42 = OpConstant %int 42
32 %deref = OpFunction %void None %3
33 %4 = OpLabel
34 %a = OpVariable %_ptr_Function_S Function %9
35 %b = OpVariable %_ptr_Function_int Function
36 %10 = OpAccessChain %_ptr_Function_int %a %uint_0
dan sinclair50260412024-08-28 19:43:27 +000037 %14 = OpLoad %int %10 None
dan sinclair1b77b6c2024-08-06 15:47:05 +000038 OpStore %b %14
39 %16 = OpAccessChain %_ptr_Function_int %a %uint_0
dan sinclair50260412024-08-28 19:43:27 +000040 OpStore %16 %int_42 None
dan sinclair1b77b6c2024-08-06 15:47:05 +000041 OpReturn
42 OpFunctionEnd
43 %no_deref = OpFunction %void None %3
44 %19 = OpLabel
45 %a_0 = OpVariable %_ptr_Function_S Function %9
46 %b_0 = OpVariable %_ptr_Function_int Function
47 %21 = OpAccessChain %_ptr_Function_int %a_0 %uint_0
dan sinclair50260412024-08-28 19:43:27 +000048 %22 = OpLoad %int %21 None
dan sinclair1b77b6c2024-08-06 15:47:05 +000049 OpStore %b_0 %22
50 %24 = OpAccessChain %_ptr_Function_int %a_0 %uint_0
dan sinclair50260412024-08-28 19:43:27 +000051 OpStore %24 %int_42 None
dan sinclair1b77b6c2024-08-06 15:47:05 +000052 OpReturn
53 OpFunctionEnd
54 %main = OpFunction %void None %3
55 %26 = OpLabel
56 %27 = OpFunctionCall %void %deref
57 %28 = OpFunctionCall %void %no_deref
58 OpReturn
59 OpFunctionEnd