xref: /aosp_15_r20/external/skia/tests/sksl/compute/ModuleStructInVariable.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 %main "main"
10               OpName %IndirectDispatchArgs "IndirectDispatchArgs"
11               OpMemberName %IndirectDispatchArgs 0 "x"
12               OpMemberName %IndirectDispatchArgs 1 "y"
13               OpMemberName %IndirectDispatchArgs 2 "z"
14               OpName %args "args"
15               OpMemberDecorate %IndirectDispatchArgs 0 Offset 0
16               OpMemberDecorate %IndirectDispatchArgs 1 Offset 4
17               OpMemberDecorate %IndirectDispatchArgs 2 Offset 8
18        %int = OpTypeInt 32 1
19%_ptr_Workgroup_int = OpTypePointer Workgroup %int
20       %outX = OpVariable %_ptr_Workgroup_int Workgroup
21       %outY = OpVariable %_ptr_Workgroup_int Workgroup
22       %outZ = OpVariable %_ptr_Workgroup_int Workgroup
23       %void = OpTypeVoid
24          %9 = OpTypeFunction %void
25%IndirectDispatchArgs = OpTypeStruct %int %int %int
26%_ptr_Function_IndirectDispatchArgs = OpTypePointer Function %IndirectDispatchArgs
27      %int_1 = OpConstant %int 1
28      %int_2 = OpConstant %int 2
29      %int_3 = OpConstant %int 3
30      %int_0 = OpConstant %int 0
31%_ptr_Function_int = OpTypePointer Function %int
32       %main = OpFunction %void None %9
33         %10 = OpLabel
34       %args = OpVariable %_ptr_Function_IndirectDispatchArgs Function
35         %17 = OpCompositeConstruct %IndirectDispatchArgs %int_1 %int_2 %int_3
36               OpStore %args %17
37         %19 = OpAccessChain %_ptr_Function_int %args %int_0
38         %21 = OpLoad %int %19
39               OpStore %outX %21
40         %22 = OpAccessChain %_ptr_Function_int %args %int_1
41         %23 = OpLoad %int %22
42               OpStore %outY %23
43         %24 = OpAccessChain %_ptr_Function_int %args %int_2
44         %25 = OpLoad %int %24
45               OpStore %outZ %25
46               OpReturn
47               OpFunctionEnd
48