summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Arceri <t_arceri@yahoo.com.au>2015-07-29 15:20:28 +1000
committerTimothy Arceri <t_arceri@yahoo.com.au>2015-07-29 15:36:16 +1000
commita6706a06d2f3e5aa87330fef03066d1f20ab4352 (patch)
tree0f37237739e65a5077260a5a21a56ef83371c638
parent3e80149223e22e4d59be0e9c037d1b1aacec87dc (diff)
arb_arrays_of_arrays: fix simple atomic counters execution test
The test was always passing because the if statemants used AND rather than OR. Also some of the array indexes were wrong.
-rw-r--r--tests/spec/arb_arrays_of_arrays/execution/atomic_counters/vs-simple-inc-dec-read.shader_test26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/vs-simple-inc-dec-read.shader_test b/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/vs-simple-inc-dec-read.shader_test
index a3df12982..4420fc574 100644
--- a/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/vs-simple-inc-dec-read.shader_test
+++ b/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/vs-simple-inc-dec-read.shader_test
@@ -47,9 +47,9 @@ void main()
v1[5] = atomicCounter(a0[1][1]);
v1[6] = atomicCounter(a0[1][2]);
v1[7] = atomicCounter(a0[1][3]);
- if(v1[0] <= v0[0] && v1[1] != v0[1] && v1[2] != v0[2] &&
- v1[3] != v0[3] && v1[4] != v0[4] && v1[5] != v0[5] &&
- v1[6] <= v0[6] && v1[7] != v0[7])
+ if(v1[0] <= v0[0] || v1[1] != v0[1] || v1[2] != v0[2] ||
+ v1[3] != v0[3] || v1[4] != v0[4] || v1[5] != v0[5] ||
+ v1[6] <= v0[6] || v1[7] != v0[7])
passed = false;
/* Get all initail values of a1 */
@@ -58,13 +58,13 @@ void main()
v0[2] = atomicCounter(a1[0][1][0]);
v0[3] = atomicCounter(a1[0][1][1]);
v0[4] = atomicCounter(a1[1][0][0]);
- v0[5] = atomicCounter(a1[1][0][0]);
- v0[6] = atomicCounter(a1[1][0][1]);
- v0[7] = atomicCounter(a1[1][1][0]);
+ v0[5] = atomicCounter(a1[1][0][1]);
+ v0[6] = atomicCounter(a1[1][1][0]);
+ v0[7] = atomicCounter(a1[1][1][1]);
v0[8] = atomicCounter(a1[2][0][0]);
- v0[9] = atomicCounter(a1[2][0][0]);
- v0[10] = atomicCounter(a1[2][0][1]);
- v0[11] = atomicCounter(a1[2][1][0]);
+ v0[9] = atomicCounter(a1[2][0][1]);
+ v0[10] = atomicCounter(a1[2][1][0]);
+ v0[11] = atomicCounter(a1[2][1][1]);
/* Skip one decrement since it may be the 0 => 0xffffffff
* transition.
@@ -88,10 +88,10 @@ void main()
v1[10] = atomicCounter(a1[2][1][0]);
v1[11] = atomicCounter(a1[2][1][1]);
- if(v1[0] != v0[0] && v1[1] != v0[1] && v1[2] != v0[2] &&
- v1[3] >= v0[3] && v1[4] != v0[4] && v1[5] != v0[5] &&
- v1[6] != v0[6] && v1[7] != v0[7] && v1[8] != v0[8] &&
- v1[9] >= v0[9] && v1[10] != v0[10] && v1[11] != v0[11])
+ if(v1[0] != v0[0] || v1[1] != v0[1] || v1[2] != v0[2] ||
+ v1[3] >= v0[3] || v1[4] != v0[4] || v1[5] != v0[5] ||
+ v1[6] != v0[6] || v1[7] != v0[7] || v1[8] != v0[8] ||
+ v1[9] >= v0[9] || v1[10] != v0[10] || v1[11] != v0[11])
passed = false;
if (passed)