summaryrefslogtreecommitdiffstats
path: root/tests/bugs/gh-4633.slang
blob: 9eeac2895eeb3cc805b6f90c9d9de82f6b166d8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=BUFFER):-compute -output-using-type

//TEST_INPUT:ubuffer(data=[0 0 0 0 0], stride=4):out,name=outputBuffer
RWStructuredBuffer<float> outputBuffer;

[numthreads(1, 1, 1)]
void computeMain()
{
    // Test that use `row_major` on a local variable with init expr
    // works.
    row_major float4x3 m = float4x3(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
    outputBuffer[0] = m[1][2]; // Expect: 6
    // BUFFER: 6
}