xref: /aosp_15_r20/external/skia/tests/sksl/shared/SwizzleScalarInt.asm.frag (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1               OpCapability Shader
2          %1 = OpExtInstImport "GLSL.std.450"
3               OpMemoryModel Logical GLSL450
4               OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_FragColor
5               OpExecutionMode %_entrypoint_v OriginUpperLeft
6               OpName %sk_FragColor "sk_FragColor"
7               OpName %_UniformBuffer "_UniformBuffer"
8               OpMemberName %_UniformBuffer 0 "unknownInput"
9               OpName %_entrypoint_v "_entrypoint_v"
10               OpName %main "main"
11               OpName %i "i"
12               OpName %i4 "i4"
13               OpDecorate %sk_FragColor RelaxedPrecision
14               OpDecorate %sk_FragColor Location 0
15               OpDecorate %sk_FragColor Index 0
16               OpMemberDecorate %_UniformBuffer 0 Offset 0
17               OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
18               OpDecorate %_UniformBuffer Block
19               OpDecorate %7 Binding 0
20               OpDecorate %7 DescriptorSet 0
21               OpDecorate %29 RelaxedPrecision
22               OpDecorate %43 RelaxedPrecision
23               OpDecorate %45 RelaxedPrecision
24               OpDecorate %47 RelaxedPrecision
25               OpDecorate %49 RelaxedPrecision
26               OpDecorate %50 RelaxedPrecision
27      %float = OpTypeFloat 32
28    %v4float = OpTypeVector %float 4
29%_ptr_Output_v4float = OpTypePointer Output %v4float
30%sk_FragColor = OpVariable %_ptr_Output_v4float Output
31%_UniformBuffer = OpTypeStruct %float
32%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
33          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
34       %void = OpTypeVoid
35         %12 = OpTypeFunction %void
36    %float_0 = OpConstant %float 0
37    %v2float = OpTypeVector %float 2
38         %16 = OpConstantComposite %v2float %float_0 %float_0
39%_ptr_Function_v2float = OpTypePointer Function %v2float
40         %20 = OpTypeFunction %v4float %_ptr_Function_v2float
41        %int = OpTypeInt 32 1
42%_ptr_Function_int = OpTypePointer Function %int
43%_ptr_Uniform_float = OpTypePointer Uniform %float
44      %int_0 = OpConstant %int 0
45      %v4int = OpTypeVector %int 4
46%_ptr_Function_v4int = OpTypePointer Function %v4int
47      %v2int = OpTypeVector %int 2
48      %int_1 = OpConstant %int 1
49%_entrypoint_v = OpFunction %void None %12
50         %13 = OpLabel
51         %17 = OpVariable %_ptr_Function_v2float Function
52               OpStore %17 %16
53         %19 = OpFunctionCall %v4float %main %17
54               OpStore %sk_FragColor %19
55               OpReturn
56               OpFunctionEnd
57       %main = OpFunction %v4float None %20
58         %21 = OpFunctionParameter %_ptr_Function_v2float
59         %22 = OpLabel
60          %i = OpVariable %_ptr_Function_int Function
61         %i4 = OpVariable %_ptr_Function_v4int Function
62         %26 = OpAccessChain %_ptr_Uniform_float %7 %int_0
63         %29 = OpLoad %float %26
64         %30 = OpConvertFToS %int %29
65               OpStore %i %30
66         %34 = OpCompositeConstruct %v4int %30 %30 %30 %30
67               OpStore %i4 %34
68         %36 = OpCompositeConstruct %v2int %30 %30
69         %37 = OpCompositeExtract %int %36 0
70         %38 = OpCompositeExtract %int %36 1
71         %40 = OpCompositeConstruct %v4int %37 %38 %int_0 %int_1
72               OpStore %i4 %40
73         %41 = OpCompositeConstruct %v4int %int_0 %30 %int_1 %int_0
74               OpStore %i4 %41
75         %42 = OpCompositeConstruct %v4int %int_0 %30 %int_0 %30
76               OpStore %i4 %42
77         %43 = OpConvertSToF %float %int_0
78         %44 = OpCompositeExtract %int %42 1
79         %45 = OpConvertSToF %float %44
80         %46 = OpCompositeExtract %int %42 2
81         %47 = OpConvertSToF %float %46
82         %48 = OpCompositeExtract %int %42 3
83         %49 = OpConvertSToF %float %48
84         %50 = OpCompositeConstruct %v4float %43 %45 %47 %49
85               OpReturnValue %50
86               OpFunctionEnd
87