summaryrefslogtreecommitdiff
path: root/tests/bugs/gl-33.slang
blob: 89cfa0aad787aca175bd3d505344f2afbc417284 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// gl-33.slang
//TEST(compute):COMPARE_COMPUTE:

// Test for GitLab issue # 33

import gl_33_ext;

typedef A B;

int test(int val)
{
    B b = { val };
    return b.next();
}

//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):dxbinding(0),glbinding(0),out
RWStructuredBuffer<int> gBuffer;

[numthreads(4, 1, 1)]
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
    uint tid = dispatchThreadID.x;

    int val = tid;
    val = test(val);

    gBuffer[tid] = val;
}