yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
2a5d5b323
master
1//TEST(compute):COMPARE_COMPUTE: -shaderobj 2//TEST(compute):COMPARE_COMPUTE:-cpu -shaderobj 3 4//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer 5RWStructuredBuffer<float> outputBuffer; 6 7__generic<T:__BuiltinFloatingPointType> 8T test(T v0, T v1) 9{ 10 return T(3.0); 11} 12 13[numthreads(4, 1, 1)] 14void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) 15{ 16 float outVal = test<float>(1.0, 2.0); 17 outputBuffer[dispatchThreadID.x] = outVal; 18}