yum-mirror/slang

Making it easier to work with shaders

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

jsmall-nvidiaAllow multiple attributes to not require separating comma (#2939)b3a883d2c

master
481 B25 linesraw
1// multiple-attributes-without-comma.slang
2
3// Test that `,` is not need between attributes 
4
5//TEST:SIMPLE(filecheck=CHECK):-target glsl -entry main -stage fragment -line-directive-mode none
6
7//CHECK: layout(location = 0, index = 1)
8
9struct FragmentOutput
10{
11	[[vk::location(0)]]
12	float4 a : SV_Target0;
13
14	[[vk::location(0) vk::index(1)]]
15	float4 b : SV_Target1;
16}
17
18[shader("fragment")]
19FragmentOutput main(float4 v : V)
20{
21	FragmentOutput f = {};
22	f.a = v;
23	f.b = v;
24	return f;	
25}