forked from shader-slang/slang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgh-4434.slang
38 lines (30 loc) · 977 Bytes
/
gh-4434.slang
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 -use-dxil
//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 = and(K, K);
bool1 K1 = K;
bool2 K2 = K;
bool3 K3 = K;
bool4 K4 = K;
bool1 k = and(K, K);
bool2 n = and(K, K);
bool3 q = and(K, K);
bool4 t = and(K, K);
k = !and(k, false);
n = !and(n, false);
q = !and(q, false);
t = !and(t, false);
outputBuffer[tid] = all(k) && all(n) && all(q) && all(t);
}