yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

CopilotFix compiler crash when enum is used as vertex output data (#7915)528ca0d0e

master
497 B25 linesraw
1//TEST:SIMPLE(filecheck=CHECK):-target hlsl -stage fragment -entry main
2
3public enum VertexLayout : uint {
4    position = 0,
5    color = 1,
6    uv = 2
7}
8
9struct FragmentInput {
10    float4 position : SV_Position;
11    VertexLayout layout : TEXCOORD0;
12};
13
14struct FragmentOutput {
15    float4 color : SV_Target;
16};
17
18[shader("fragment")]
19FragmentOutput main(in FragmentInput input) {
20    FragmentOutput output;
21    output.color = float4(float(input.layout), 0, 0, 1);
22    return output;
23}
24
25//CHECK: main