summaryrefslogtreecommitdiffstats
path: root/tests/bugs/enum-fragment-input.slang
blob: e03514467a701eea44cda39ea42463526dc0d264 (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
//TEST:SIMPLE(filecheck=CHECK):-target hlsl -stage fragment -entry main

public enum VertexLayout : uint {
    position = 0,
    color = 1,
    uv = 2
}

struct FragmentInput {
    float4 position : SV_Position;
    VertexLayout layout : TEXCOORD0;
};

struct FragmentOutput {
    float4 color : SV_Target;
};

[shader("fragment")]
FragmentOutput main(in FragmentInput input) {
    FragmentOutput output;
    output.color = float4(float(input.layout), 0, 0, 1);
    return output;
}

//CHECK: main