xref: /aosp_15_r20/external/skia/tests/sksl/compute/ModuleStructInArray.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               OpDecorate %_arr_IndirectDispatchArgs_int_3 ArrayStride 16
19        %int = OpTypeInt 32 1
20%_ptr_Workgroup_int = OpTypePointer Workgroup %int
21       %outX = OpVariable %_ptr_Workgroup_int Workgroup
22       %outY = OpVariable %_ptr_Workgroup_int Workgroup
23       %outZ = OpVariable %_ptr_Workgroup_int Workgroup
24       %void = OpTypeVoid
25          %9 = OpTypeFunction %void
26%IndirectDispatchArgs = OpTypeStruct %int %int %int
27      %int_3 = OpConstant %int 3
28%_arr_IndirectDispatchArgs_int_3 = OpTypeArray %IndirectDispatchArgs %int_3
29%_ptr_Function__arr_IndirectDispatchArgs_int_3 = OpTypePointer Function %_arr_IndirectDispatchArgs_int_3
30      %int_0 = OpConstant %int 0
31%_ptr_Function_int = OpTypePointer Function %int
32      %int_1 = OpConstant %int 1
33      %int_2 = OpConstant %int 2
34       %main = OpFunction %void None %9
35         %10 = OpLabel
36       %args = OpVariable %_ptr_Function__arr_IndirectDispatchArgs_int_3 Function
37         %17 = OpAccessChain %_ptr_Function_int %args %int_0 %int_0
38         %19 = OpLoad %int %17
39               OpStore %outX %19
40         %21 = OpAccessChain %_ptr_Function_int %args %int_1 %int_1
41         %22 = OpLoad %int %21
42               OpStore %outY %22
43         %24 = OpAccessChain %_ptr_Function_int %args %int_2 %int_2
44         %25 = OpLoad %int %24
45               OpStore %outZ %25
46               OpReturn
47               OpFunctionEnd
48