xref: /aosp_15_r20/external/skia/tests/sksl/spirv/SpecializationInCall.asm.frag (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1               OpCapability Shader
2          %1 = OpExtInstImport "GLSL.std.450"
3               OpMemoryModel Logical GLSL450
4               OpEntryPoint Fragment %main "main"
5               OpExecutionMode %main OriginUpperLeft
6               OpName %aSampler "aSampler"
7               OpName %aSecondSampler "aSecondSampler"
8               OpName %bar_h4Z_aSampler "bar_h4Z_aSampler"
9               OpName %bar_h4Z_aSecondSampler "bar_h4Z_aSecondSampler"
10               OpName %foo_h4 "foo_h4"
11               OpName %a "a"
12               OpName %b "b"
13               OpName %main "main"
14               OpDecorate %aSampler RelaxedPrecision
15               OpDecorate %aSampler Binding 0
16               OpDecorate %aSampler DescriptorSet 0
17               OpDecorate %aSecondSampler RelaxedPrecision
18               OpDecorate %aSecondSampler Binding 1
19               OpDecorate %aSecondSampler DescriptorSet 0
20               OpDecorate %16 RelaxedPrecision
21               OpDecorate %22 RelaxedPrecision
22               OpDecorate %a RelaxedPrecision
23               OpDecorate %b RelaxedPrecision
24               OpDecorate %29 RelaxedPrecision
25      %float = OpTypeFloat 32
26          %8 = OpTypeImage %float 2D 0 0 0 1 Unknown
27          %9 = OpTypeSampledImage %8
28%_ptr_UniformConstant_9 = OpTypePointer UniformConstant %9
29   %aSampler = OpVariable %_ptr_UniformConstant_9 UniformConstant
30%aSecondSampler = OpVariable %_ptr_UniformConstant_9 UniformConstant
31    %v4float = OpTypeVector %float 4
32         %13 = OpTypeFunction %v4float
33    %float_0 = OpConstant %float 0
34    %v2float = OpTypeVector %float 2
35         %19 = OpConstantComposite %v2float %float_0 %float_0
36%_ptr_Function_v4float = OpTypePointer Function %v4float
37       %void = OpTypeVoid
38         %31 = OpTypeFunction %void
39%bar_h4Z_aSampler = OpFunction %v4float None %13
40         %14 = OpLabel
41         %16 = OpLoad %9 %aSampler
42         %15 = OpImageSampleImplicitLod %v4float %16 %19
43               OpReturnValue %15
44               OpFunctionEnd
45%bar_h4Z_aSecondSampler = OpFunction %v4float None %13
46         %20 = OpLabel
47         %22 = OpLoad %9 %aSecondSampler
48         %21 = OpImageSampleImplicitLod %v4float %22 %19
49               OpReturnValue %21
50               OpFunctionEnd
51     %foo_h4 = OpFunction %v4float None %13
52         %23 = OpLabel
53          %a = OpVariable %_ptr_Function_v4float Function
54          %b = OpVariable %_ptr_Function_v4float Function
55         %26 = OpFunctionCall %v4float %bar_h4Z_aSampler
56               OpStore %a %26
57         %28 = OpFunctionCall %v4float %bar_h4Z_aSecondSampler
58               OpStore %b %28
59         %29 = OpFAdd %v4float %26 %28
60               OpReturnValue %29
61               OpFunctionEnd
62       %main = OpFunction %void None %31
63         %32 = OpLabel
64         %33 = OpFunctionCall %v4float %foo_h4
65               OpReturn
66               OpFunctionEnd
67