xref: /aosp_15_r20/external/skia/tests/sksl/shared/Offset.asm.frag (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1               OpCapability Shader
2          %1 = OpExtInstImport "GLSL.std.450"
3               OpMemoryModel Logical GLSL450
4               OpEntryPoint Fragment %main "main" %sk_FragColor
5               OpExecutionMode %main OriginUpperLeft
6               OpName %sk_FragColor "sk_FragColor"
7               OpName %main "main"
8               OpName %Test "Test"
9               OpMemberName %Test 0 "x"
10               OpMemberName %Test 1 "y"
11               OpMemberName %Test 2 "z"
12               OpName %t "t"
13               OpDecorate %sk_FragColor RelaxedPrecision
14               OpDecorate %sk_FragColor Location 0
15               OpDecorate %sk_FragColor Index 0
16               OpMemberDecorate %Test 0 Offset 0
17               OpMemberDecorate %Test 1 Offset 4
18               OpMemberDecorate %Test 2 Offset 8
19               OpDecorate %19 RelaxedPrecision
20      %float = OpTypeFloat 32
21    %v4float = OpTypeVector %float 4
22%_ptr_Output_v4float = OpTypePointer Output %v4float
23%sk_FragColor = OpVariable %_ptr_Output_v4float Output
24       %void = OpTypeVoid
25          %8 = OpTypeFunction %void
26        %int = OpTypeInt 32 1
27       %Test = OpTypeStruct %int %int %int
28%_ptr_Function_Test = OpTypePointer Function %Test
29      %int_0 = OpConstant %int 0
30%_ptr_Function_int = OpTypePointer Function %int
31%_ptr_Output_float = OpTypePointer Output %float
32       %main = OpFunction %void None %8
33          %9 = OpLabel
34          %t = OpVariable %_ptr_Function_Test Function
35         %15 = OpAccessChain %_ptr_Function_int %t %int_0
36               OpStore %15 %int_0
37         %17 = OpAccessChain %_ptr_Function_int %t %int_0
38         %18 = OpLoad %int %17
39         %19 = OpConvertSToF %float %18
40         %20 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
41               OpStore %20 %19
42               OpReturn
43               OpFunctionEnd
44