xref: /aosp_15_r20/external/skia/tests/sksl/shared/OutParamsFunctionCallInArgument.hlsl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1cbuffer _UniformBuffer : register(b0, space0)
2{
3    float4 _9_colorGreen : packoffset(c0);
4    float4 _9_colorRed : packoffset(c1);
5};
6
7
8static float4 sk_FragColor;
9
10struct SPIRV_Cross_Output
11{
12    float4 sk_FragColor : SV_Target0;
13};
14
15int out_param_func2_ih(out float _33)
16{
17    _33 = _9_colorRed.x;
18    return int(_9_colorRed.x);
19}
20
21void out_param_func1_vh(out float _24)
22{
23    _24 = _9_colorGreen.y;
24}
25
26float4 main(float2 _41)
27{
28    float testArray[2] = { 0.0f, 0.0f };
29    float _48 = 0.0f;
30    int _49 = out_param_func2_ih(_48);
31    testArray[0] = _48;
32    float _53 = testArray[_49];
33    out_param_func1_vh(_53);
34    testArray[_49] = _53;
35    bool _67 = false;
36    if (testArray[0] == 1.0f)
37    {
38        _67 = testArray[1] == 1.0f;
39    }
40    else
41    {
42        _67 = false;
43    }
44    float4 _68 = 0.0f.xxxx;
45    if (_67)
46    {
47        _68 = _9_colorGreen;
48    }
49    else
50    {
51        _68 = _9_colorRed;
52    }
53    return _68;
54}
55
56void frag_main()
57{
58    float2 _19 = 0.0f.xx;
59    sk_FragColor = main(_19);
60}
61
62SPIRV_Cross_Output main()
63{
64    frag_main();
65    SPIRV_Cross_Output stage_output;
66    stage_output.sk_FragColor = sk_FragColor;
67    return stage_output;
68}
69