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 2//TEST:SIMPLE(filecheck=GLSL): -target glsl -entry main 3 4// SPIRV: OpDecorate %{{.*}} BuiltIn DeviceIndex 5// GLSL: gl_DeviceIndex 6 7struct PSIn 8{ 9 float3 color; 10 int deviceIndex : SV_DeviceIndex; 11} 12 13[shader("fragment")] 14float4 main(PSIn pin) 15{ 16 return float4(pin.color, (float)pin.deviceIndex); 17}