yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
67af8c718
master
1//TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry main -stage fragment -allow-glsl 2//TEST:SIMPLE(filecheck=GLSL): -target glsl -entry main -stage fragment -allow-glsl 3 4// SPIRV: OpDecorate %{{.*}} BuiltIn DeviceIndex 5// GLSL: gl_DeviceIndex 6 7struct PSIn 8{ 9 float3 color; 10} 11 12[shader("fragment")] 13float4 main(PSIn pin) 14{ 15 return float4(pin.color, (float)gl_DeviceIndex); 16}