yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
ce90fec1c
master
1//TEST:SIMPLE: 2// test that we can parse all the expected kinds of declarations 3 4// global-scope `using` is another test 5 6/* Note(tfoley): disabled during syntax transition 7// pipeline 8pipeline P 9{ 10 11} 12*/ 13 14// empty declaration 15; 16 17// struct type 18struct Pair 19{ 20 int head; 21 float tail; 22 23// Note(tfoley): semicolon is expected/required 24// here for compatibility with HLSL (C-style 25// declarators). 26// 27// TODO: this could be removed if we treat 28// HLSL as a "compatibility mode" 29}; 30 31// function at global scope 32float tail(Pair p) { return p.tail; } 33 34/* Note(tfoley): disabled during syntax transition 35 36// module 37module M 38{ 39 // component declarations 40 41 // using declarations 42 43} 44 45// a module can "inherit" from a pipeline 46module M2 47 targets P 48{ 49} 50 51// shader 52shader S 53{ 54 // component declarations 55 56 // using declarations 57 58} 59 60*/