yum-mirror/slang

Making it easier to work with shaders

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

Yong HeSupport entrypoints defined in a namespace. (#5011)879ee3d18

master
381 B20 linesraw
1//TEST:SIMPLE(filecheck=CHECK): -target spirv -entry Pixel.MyType.Main -stage fragment
2
3// Test that we can compile an entrypoint defined in a namespace.
4
5// CHECK: OpEntryPoint
6struct PSInput
7{
8	float4 color : COLOR;
9};
10
11namespace Pixel
12{
13    struct MyType
14    {
15        static float4 Main(PSInput input) : SV_TARGET
16        {
17            return input.color;
18        }
19    }    
20}