yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Anders LeinoEnable a bunch of WGPU tests (#5513)43df1da01

master
495 B17 linesraw
1//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF): -shaderobj -output-using-type
2//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-slang -shaderobj -mtl
3
4//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer
5RWStructuredBuffer<uint> outputBuffer;
6
7static uint g_values[2] = { 0, 1 };
8
9[numthreads(2, 1, 1)]
10void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
11{
12	uint tid = dispatchThreadID.x;
13
14	outputBuffer[tid] = g_values[tid];
15    // BUF: 0
16    // BUF: 1
17}