xref: /aosp_15_r20/external/skia/tests/sksl/shared/Texture2D.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 %tex "tex"
8               OpName %main "main"
9               OpName %a "a"
10               OpName %b "b"
11               OpDecorate %sk_FragColor RelaxedPrecision
12               OpDecorate %sk_FragColor Location 0
13               OpDecorate %sk_FragColor Index 0
14               OpDecorate %tex RelaxedPrecision
15               OpDecorate %tex Binding 0
16               OpDecorate %tex DescriptorSet 0
17               OpDecorate %17 RelaxedPrecision
18               OpDecorate %23 RelaxedPrecision
19               OpDecorate %27 RelaxedPrecision
20               OpDecorate %28 RelaxedPrecision
21               OpDecorate %30 RelaxedPrecision
22               OpDecorate %31 RelaxedPrecision
23               OpDecorate %32 RelaxedPrecision
24      %float = OpTypeFloat 32
25    %v4float = OpTypeVector %float 4
26%_ptr_Output_v4float = OpTypePointer Output %v4float
27%sk_FragColor = OpVariable %_ptr_Output_v4float Output
28          %8 = OpTypeImage %float 2D 0 0 0 1 Unknown
29          %9 = OpTypeSampledImage %8
30%_ptr_UniformConstant_9 = OpTypePointer UniformConstant %9
31        %tex = OpVariable %_ptr_UniformConstant_9 UniformConstant
32       %void = OpTypeVoid
33         %12 = OpTypeFunction %void
34%_ptr_Function_v4float = OpTypePointer Function %v4float
35    %float_0 = OpConstant %float 0
36    %v2float = OpTypeVector %float 2
37         %20 = OpConstantComposite %v2float %float_0 %float_0
38    %v3float = OpTypeVector %float 3
39         %25 = OpConstantComposite %v3float %float_0 %float_0 %float_0
40       %main = OpFunction %void None %12
41         %13 = OpLabel
42          %a = OpVariable %_ptr_Function_v4float Function
43          %b = OpVariable %_ptr_Function_v4float Function
44         %17 = OpLoad %9 %tex
45         %16 = OpImageSampleImplicitLod %v4float %17 %20
46               OpStore %a %16
47         %23 = OpLoad %9 %tex
48         %22 = OpImageSampleProjImplicitLod %v4float %23 %25
49               OpStore %b %22
50         %26 = OpVectorShuffle %v2float %16 %16 0 1
51         %27 = OpCompositeExtract %float %26 0
52         %28 = OpCompositeExtract %float %26 1
53         %29 = OpVectorShuffle %v2float %22 %22 2 3
54         %30 = OpCompositeExtract %float %29 0
55         %31 = OpCompositeExtract %float %29 1
56         %32 = OpCompositeConstruct %v4float %27 %28 %30 %31
57               OpStore %sk_FragColor %32
58               OpReturn
59               OpFunctionEnd
60