aboutsummaryrefslogtreecommitdiff
path: root/Test/hlsl.init2.frag
blob: 789f1a06553a9b23add548d5c94b183a213409f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

void Test1()
{
    struct mystruct { float2 a; };
    mystruct test1 = {
        { 1, 2, },          // test trailing commas in list
    };

    mystruct test2 = {
        float2(3, 4),
    };

    // mystruct test3 = {
    //     { { 5, 6, } },   // TODO: test unneeded levels
    // };

    float test4 = { 7, } ;   // test scalar initialization

    struct mystruct2 { float a; float b; float c; };
    mystruct2 test5 = { {8,}, {9,}, {10}, };
}

struct PS_OUTPUT { float4 color : SV_Target0; };

PS_OUTPUT main()
{
    Test1();

    PS_OUTPUT ps_output;
    ps_output.color = 1.0;
    return ps_output;
}