yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
38c0bacca
master
1//TEST:SIMPLE(filecheck=CHECK): -target spirv 2 3// Check that we don't emit duplicate Flat decorations for the same variable. 4 5// CHECK: OpDecorate %vo_a Flat 6// CHECK-NOT: OpDecorate %vo_a Flat 7 8struct VertexOutput 9{ 10 nointerpolation int a : SOME_VALUE; 11 float4 b : SV_Position; 12}; 13 14[shader("vertex")] 15VertexOutput Vertex() 16{ 17 VertexOutput out; 18 out.a = 0; 19 out.b = float4(0, 0, 0, 1); 20 return out; 21} 22 23[shader("fragment")] 24float4 Fragment(in VertexOutput vo) 25{ 26 return float4(float(vo.a), 0, 0, 1); 27}