yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
65103bc9a
master
1//TEST(compute):COMPARE_COMPUTE:-cpu -shaderobj 2 3//TEST_INPUT:ubuffer(data=[0], stride=4):out,name=outputBuffer 4RWStructuredBuffer<int> outputBuffer; 5[numthreads(1, 1, 1)] 6void computeMain(uint tig : SV_GroupIndex) 7{ 8 outputBuffer[tig] = zap(); 9} 10 11func foo(f : functype (float) -> int) -> int 12{ 13 return f(0); 14} 15 16int bap<T>(float) 17{ 18 return 1; 19} 20 21int zap() 22{ 23 // We should be able to specify which foo we want 24 return foo(bap<bool>); 25}