xref: /aosp_15_r20/external/skia/tests/sksl/shared/ArrayConstructors.hlsl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1cbuffer _UniformBuffer : register(b0, space0)
2{
3    float4 _7_colorGreen : packoffset(c0);
4    float4 _7_colorRed : packoffset(c1);
5};
6
7
8static float4 sk_FragColor;
9
10struct SPIRV_Cross_Output
11{
12    float4 sk_FragColor : SV_Target0;
13};
14
15float4 main(float2 _21)
16{
17    float _32[4] = { 1.0f, 2.0f, 3.0f, 4.0f };
18    float test1[4] = _32;
19    float2 _39[2] = { float2(1.0f, 2.0f), float2(3.0f, 4.0f) };
20    float2 test2[2] = _39;
21    float4x4 _51[1] = { float4x4(float4(16.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 16.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 16.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 16.0f)) };
22    float4x4 test3[1] = _51;
23    float4 _69 = 0.0f.xxxx;
24    if (((test1[3] + test2[1].y) + test3[0][3].w) == 24.0f)
25    {
26        _69 = _7_colorGreen;
27    }
28    else
29    {
30        _69 = _7_colorRed;
31    }
32    return _69;
33}
34
35void frag_main()
36{
37    float2 _17 = 0.0f.xx;
38    sk_FragColor = main(_17);
39}
40
41SPIRV_Cross_Output main()
42{
43    frag_main();
44    SPIRV_Cross_Output stage_output;
45    stage_output.sk_FragColor = sk_FragColor;
46    return stage_output;
47}
48