xref: /aosp_15_r20/external/skia/tests/sksl/intrinsics/Sample.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 %t "t"
8               OpName %main "main"
9               OpName %c "c"
10               OpDecorate %sk_FragColor RelaxedPrecision
11               OpDecorate %sk_FragColor Location 0
12               OpDecorate %sk_FragColor Index 0
13               OpDecorate %t RelaxedPrecision
14               OpDecorate %t Binding 0
15               OpDecorate %t DescriptorSet 0
16               OpDecorate %c RelaxedPrecision
17               OpDecorate %17 RelaxedPrecision
18               OpDecorate %22 RelaxedPrecision
19               OpDecorate %26 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          %8 = OpTypeImage %float 2D 0 0 0 1 Unknown
25          %9 = OpTypeSampledImage %8
26%_ptr_UniformConstant_9 = OpTypePointer UniformConstant %9
27          %t = OpVariable %_ptr_UniformConstant_9 UniformConstant
28       %void = OpTypeVoid
29         %12 = OpTypeFunction %void
30%_ptr_Function_v4float = OpTypePointer Function %v4float
31    %float_0 = OpConstant %float 0
32    %v2float = OpTypeVector %float 2
33         %20 = OpConstantComposite %v2float %float_0 %float_0
34    %float_1 = OpConstant %float 1
35    %v3float = OpTypeVector %float 3
36         %25 = OpConstantComposite %v3float %float_1 %float_1 %float_1
37       %main = OpFunction %void None %12
38         %13 = OpLabel
39          %c = OpVariable %_ptr_Function_v4float Function
40         %17 = OpLoad %9 %t
41         %16 = OpImageSampleImplicitLod %v4float %17 %20
42               OpStore %c %16
43         %22 = OpLoad %9 %t
44         %21 = OpImageSampleProjImplicitLod %v4float %22 %25
45         %26 = OpFMul %v4float %16 %21
46               OpStore %sk_FragColor %26
47               OpReturn
48               OpFunctionEnd
49