yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
fe28d9c71
master
1//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUFFER):-compute -output-using-type 2 3//TEST_INPUT:ubuffer(data=[0 0 0 0 0], stride=4):out,name=outputBuffer 4RWStructuredBuffer<float> outputBuffer; 5 6[numthreads(1, 1, 1)] 7void computeMain() 8{ 9 // Test that use `row_major` on a local variable with init expr 10 // works. 11 row_major float4x3 m = float4x3(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); 12 outputBuffer[0] = m[1][2]; // Expect: 6 13 // BUFFER: 6 14}