xref: /aosp_15_r20/external/skia/tests/sksl/compute/ModuleStructInExpression.asm.comp (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1               OpCapability Shader
2          %1 = OpExtInstImport "GLSL.std.450"
3               OpMemoryModel Logical GLSL450
4               OpEntryPoint GLCompute %main "main"
5               OpExecutionMode %main LocalSize 16 16 1
6               OpName %outX "outX"
7               OpName %outY "outY"
8               OpName %outZ "outZ"
9               OpName %one_i "one_i"
10               OpName %two_i "two_i"
11               OpName %three_i "three_i"
12               OpName %main "main"
13               OpName %IndirectDispatchArgs "IndirectDispatchArgs"
14               OpMemberName %IndirectDispatchArgs 0 "x"
15               OpMemberName %IndirectDispatchArgs 1 "y"
16               OpMemberName %IndirectDispatchArgs 2 "z"
17               OpMemberDecorate %IndirectDispatchArgs 0 Offset 0
18               OpMemberDecorate %IndirectDispatchArgs 1 Offset 4
19               OpMemberDecorate %IndirectDispatchArgs 2 Offset 8
20        %int = OpTypeInt 32 1
21%_ptr_Workgroup_int = OpTypePointer Workgroup %int
22       %outX = OpVariable %_ptr_Workgroup_int Workgroup
23       %outY = OpVariable %_ptr_Workgroup_int Workgroup
24       %outZ = OpVariable %_ptr_Workgroup_int Workgroup
25         %11 = OpTypeFunction %int
26      %int_1 = OpConstant %int 1
27      %int_2 = OpConstant %int 2
28      %int_3 = OpConstant %int 3
29       %void = OpTypeVoid
30         %19 = OpTypeFunction %void
31%IndirectDispatchArgs = OpTypeStruct %int %int %int
32%_ptr_Function_IndirectDispatchArgs = OpTypePointer Function %IndirectDispatchArgs
33      %int_0 = OpConstant %int 0
34%_ptr_Function_int = OpTypePointer Function %int
35      %one_i = OpFunction %int None %11
36         %12 = OpLabel
37               OpReturnValue %int_1
38               OpFunctionEnd
39      %two_i = OpFunction %int None %11
40         %14 = OpLabel
41               OpReturnValue %int_2
42               OpFunctionEnd
43    %three_i = OpFunction %int None %11
44         %16 = OpLabel
45               OpReturnValue %int_3
46               OpFunctionEnd
47       %main = OpFunction %void None %19
48         %20 = OpLabel
49         %21 = OpVariable %_ptr_Function_IndirectDispatchArgs Function
50         %32 = OpVariable %_ptr_Function_IndirectDispatchArgs Function
51         %39 = OpVariable %_ptr_Function_IndirectDispatchArgs Function
52         %24 = OpFunctionCall %int %one_i
53         %25 = OpFunctionCall %int %two_i
54         %26 = OpFunctionCall %int %three_i
55         %27 = OpCompositeConstruct %IndirectDispatchArgs %24 %25 %26
56               OpStore %21 %27
57         %29 = OpAccessChain %_ptr_Function_int %21 %int_0
58         %31 = OpLoad %int %29
59               OpStore %outX %31
60         %33 = OpFunctionCall %int %one_i
61         %34 = OpFunctionCall %int %two_i
62         %35 = OpFunctionCall %int %three_i
63         %36 = OpCompositeConstruct %IndirectDispatchArgs %33 %34 %35
64               OpStore %32 %36
65         %37 = OpAccessChain %_ptr_Function_int %32 %int_1
66         %38 = OpLoad %int %37
67               OpStore %outY %38
68         %40 = OpFunctionCall %int %one_i
69         %41 = OpFunctionCall %int %two_i
70         %42 = OpFunctionCall %int %three_i
71         %43 = OpCompositeConstruct %IndirectDispatchArgs %40 %41 %42
72               OpStore %39 %43
73         %44 = OpAccessChain %_ptr_Function_int %39 %int_2
74         %45 = OpLoad %int %44
75               OpStore %outZ %45
76               OpReturn
77               OpFunctionEnd
78