summaryrefslogtreecommitdiff
path: root/tests/bugs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/gh-4434.slang24
-rw-r--r--tests/bugs/gh-4441.slang24
2 files changed, 26 insertions, 22 deletions
diff --git a/tests/bugs/gh-4434.slang b/tests/bugs/gh-4434.slang
index 975226008..c9a48d439 100644
--- a/tests/bugs/gh-4434.slang
+++ b/tests/bugs/gh-4434.slang
@@ -15,17 +15,19 @@ RWStructuredBuffer<uint> outputBuffer;
[numthreads(4, 1, 1)]
void computeMain(uint tid : SV_GroupIndex)
{
- bool a, b, c;
- c = and(a, b);
-
- bool1 i, j, k;
- bool2 l, m, n;
- bool3 o, p, q;
- bool4 r, s, t;
- k = and(i, j);
- n = and(m, l);
- q = and(o, p);
- t = and(r, s);
+ 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);
diff --git a/tests/bugs/gh-4441.slang b/tests/bugs/gh-4441.slang
index 59d577c8d..a2de7e00d 100644
--- a/tests/bugs/gh-4441.slang
+++ b/tests/bugs/gh-4441.slang
@@ -15,17 +15,19 @@ RWStructuredBuffer<uint> outputBuffer;
[numthreads(4, 1, 1)]
void computeMain(uint tid : SV_GroupIndex)
{
- bool a, b, c;
- c = or(a, b);
-
- bool1 i, j, k;
- bool2 l, m, n;
- bool3 o, p, q;
- bool4 r, s, t;
- k = or(i, j);
- n = or(m, l);
- q = or(o, p);
- t = or(r, s);
+ 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);