yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
f02b08490
master
1//TEST(smoke,compute):COMPARE_COMPUTE:-shaderobj 2//TEST(smoke,compute):COMPARE_COMPUTE:-dx12 -shaderobj 3//TEST(smoke,compute):COMPARE_COMPUTE:-cpu -shaderobj 4//TEST(smoke,compute):COMPARE_COMPUTE:-vk -shaderobj 5//TEST(smoke,compute):COMPARE_COMPUTE:-mtl -shaderobj 6//TEST(smoke,compute):COMPARE_COMPUTE:-cuda -shaderobj 7//TEST(smoke,compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -shaderobj 8 9// CHECK: 0 10// CHECK-NEXT: 3F800000 11// CHECK-NEXT: 40000000 12// CHECK-NEXT: 40400000 13 14// This is a basic test for Slang compute shader. 15 16//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer 17RWStructuredBuffer<float> outputBuffer; 18 19[numthreads(4, 1, 1)] 20void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) 21{ 22 outputBuffer[dispatchThreadID.x] = float(dispatchThreadID.x); 23}