xref: /aosp_15_r20/external/skia/tests/sksl/shared/Caps.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 %x "x"
9               OpName %y "y"
10               OpName %z "z"
11               OpDecorate %sk_FragColor RelaxedPrecision
12               OpDecorate %sk_FragColor Location 0
13               OpDecorate %sk_FragColor Index 0
14               OpDecorate %27 RelaxedPrecision
15               OpDecorate %29 RelaxedPrecision
16               OpDecorate %31 RelaxedPrecision
17               OpDecorate %33 RelaxedPrecision
18               OpDecorate %34 RelaxedPrecision
19               OpDecorate %35 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%_ptr_Function_int = OpTypePointer Function %int
28      %int_0 = OpConstant %int 0
29       %bool = OpTypeBool
30       %true = OpConstantTrue %bool
31      %int_1 = OpConstant %int 1
32      %false = OpConstantFalse %bool
33    %v3float = OpTypeVector %float 3
34       %main = OpFunction %void None %8
35          %9 = OpLabel
36          %x = OpVariable %_ptr_Function_int Function
37          %y = OpVariable %_ptr_Function_int Function
38          %z = OpVariable %_ptr_Function_int Function
39               OpStore %x %int_0
40               OpStore %y %int_0
41               OpStore %z %int_0
42               OpSelectionMerge %19 None
43               OpBranchConditional %true %18 %19
44         %18 = OpLabel
45               OpStore %x %int_1
46               OpBranch %19
47         %19 = OpLabel
48               OpSelectionMerge %23 None
49               OpBranchConditional %false %22 %23
50         %22 = OpLabel
51               OpStore %y %int_1
52               OpBranch %23
53         %23 = OpLabel
54               OpSelectionMerge %25 None
55               OpBranchConditional %true %24 %25
56         %24 = OpLabel
57               OpStore %z %int_1
58               OpBranch %25
59         %25 = OpLabel
60         %26 = OpLoad %int %x
61         %27 = OpConvertSToF %float %26
62         %28 = OpLoad %int %y
63         %29 = OpConvertSToF %float %28
64         %30 = OpLoad %int %z
65         %31 = OpConvertSToF %float %30
66         %33 = OpCompositeConstruct %v3float %27 %29 %31
67         %34 = OpLoad %v4float %sk_FragColor
68         %35 = OpVectorShuffle %v4float %34 %33 4 5 6 3
69               OpStore %sk_FragColor %35
70               OpReturn
71               OpFunctionEnd
72