yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
160111a0e
master
1//DISABLE_TEST(compute):COMPARE_COMPUTE_EX:-slang -compute -shaderobj 2 3/* It appears the use of a generic defined within a function appears to trigger a crash 4 5 6``` 7void Type::accept(ITypeVisitor* visitor, void* extra) 8``` 9 10As this is nullptr. 11*/ 12 13RWStructuredBuffer<float> outputBuffer; 14 15int doThing() 16{ 17 int getValue<let N : int>() { return N; } 18 19 return getValue<10>(); 20} 21 22[numthreads(4, 1, 1)] 23void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) 24{ 25 uint tid = dispatchThreadID.x; 26 27 float inVal = float(tid); 28 29 outputBuffer[tid] = doThing(); 30}