summaryrefslogtreecommitdiffstats
path: root/tests/bugs/gh-4441.slang
blob: 7eac786f98a0cfaa37cba1b56173e5696cc06b6f (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
29
30
31
32
33
34
35
36
37
38
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk
//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-mtl
//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu
//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cuda

// CHECK:      1
// CHECK-NEXT: 1
// CHECK-NEXT: 1
// CHECK-NEXT: 1

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

[numthreads(4, 1, 1)]
void computeMain(uint tid : SV_GroupIndex)
{
    bool K = (bool)outputBuffer[tid];

    bool c = or(K, K);

    bool1 K1 = K;
    bool2 K2 = K;
    bool3 K3 = K;
    bool4 K4 = K;

    bool1 k = or(K, K);
    bool2 n = or(K, K);
    bool3 q = or(K, K);
    bool4 t = or(K, K);

    k = or(k, true);
    n = or(n, true);
    q = or(q, true);
    t = or(t, true);

    outputBuffer[tid] = all(k) && all(n) && all(q) && all(t);
}