yum-mirror/slang

Making it easier to work with shaders

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

Yong HeAdd slangc interface to compile and use ir modules. (#3615)401d8cdb1

master
270 B23 linesraw
1//TEST_IGNORE_FILE:
2
3// module-a.slang
4
5export struct Thing
6{
7    int a; 
8    int b;
9};
10
11export Thing makeThing(int a, int b)
12{
13    Thing thing;
14    thing.a = a;
15    thing.b = b;
16    return thing;
17}
18
19export int foo(Thing thing) 
20{ 
21    return thing.a + thing.b * 2; 
22}
23