Revert "Test that rs_script_call_t works properly."
This reverts commit 72ebb23ef0dd074e1852bc4e9d4ff75c59787b1f.
diff --git a/tests/src/android/renderscript/cts/foreach_bounds_in.rs b/tests/src/android/renderscript/cts/foreach_bounds_in.rs
deleted file mode 100644
index b0851a5..0000000
--- a/tests/src/android/renderscript/cts/foreach_bounds_in.rs
+++ /dev/null
@@ -1,73 +0,0 @@
-#include "shared.rsh"
-
-int *a;
-int dimX;
-int dimY;
-int xStart = 0;
-int xEnd = 0;
-int yStart = 0;
-int yEnd = 0;
-
-rs_script s;
-rs_allocation ain;
-rs_allocation aout;
-
-void root(const int *in, uint32_t x, uint32_t y) {
- a[x + y * dimX] = x + y * dimX + *in; // in will be set to 7
-}
-
-int __attribute__((kernel)) zero() {
- return 0;
-}
-
-int __attribute__((kernel)) seven() {
- return 7;
-}
-
-static bool test_root_output() {
- bool failed = false;
- int i, j;
-
- for (j = 0; j < dimY; j++) {
- for (i = 0; i < dimX; i++) {
- if (i < xStart || i >= xEnd || j < yStart || j >= yEnd) {
- _RS_ASSERT(rsGetElementAt_int(aout, i, j) == 0);
- } else {
- _RS_ASSERT(rsGetElementAt_int(aout, i, j) ==
- (i + j * dimX + 7));
- }
- }
- }
-
- if (failed) {
- rsDebug("test_root_output FAILED", 0);
- }
- else {
- rsDebug("test_root_output PASSED", 0);
- }
-
- return failed;
-}
-
-void foreach_bounds_in_test() {
- static bool failed = false;
-
- rs_script_call_t rssc = {0};
- rssc.strategy = RS_FOR_EACH_STRATEGY_DONT_CARE;
- rssc.xStart = xStart;
- rssc.xEnd = xEnd;
- rssc.yStart = yStart;
- rssc.yEnd = yEnd;
-
- rsForEach(s, ain, aout, NULL, 0, &rssc);
-
- failed |= test_root_output();
-
- if (failed) {
- rsSendToClientBlocking(RS_MSG_TEST_FAILED);
- }
- else {
- rsSendToClientBlocking(RS_MSG_TEST_PASSED);
- }
-}
-
diff --git a/tests/src/android/renderscript/cts/foreach_bounds_inout.rs b/tests/src/android/renderscript/cts/foreach_bounds_inout.rs
deleted file mode 100644
index 3b5e9c3..0000000
--- a/tests/src/android/renderscript/cts/foreach_bounds_inout.rs
+++ /dev/null
@@ -1,72 +0,0 @@
-#include "shared.rsh"
-
-int dimX;
-int dimY;
-int xStart = 0;
-int xEnd = 0;
-int yStart = 0;
-int yEnd = 0;
-
-rs_script s;
-rs_allocation ain;
-rs_allocation aout;
-
-void root(const int *in, int *out, uint32_t x, uint32_t y) {
- *out = x + y * dimX + *in; // in will be set to 7
-}
-
-int __attribute__((kernel)) zero() {
- return 0;
-}
-
-int __attribute__((kernel)) seven() {
- return 7;
-}
-
-static bool test_root_output() {
- bool failed = false;
- int i, j;
-
- for (j = 0; j < dimY; j++) {
- for (i = 0; i < dimX; i++) {
- if (i < xStart || i >= xEnd || j < yStart || j >= yEnd) {
- _RS_ASSERT(rsGetElementAt_int(aout, i, j) == 0);
- } else {
- _RS_ASSERT(rsGetElementAt_int(aout, i, j) ==
- (i + j * dimX + 7));
- }
- }
- }
-
- if (failed) {
- rsDebug("test_root_output FAILED", 0);
- }
- else {
- rsDebug("test_root_output PASSED", 0);
- }
-
- return failed;
-}
-
-void foreach_bounds_inout_test() {
- static bool failed = false;
-
- rs_script_call_t rssc = {0};
- rssc.strategy = RS_FOR_EACH_STRATEGY_DONT_CARE;
- rssc.xStart = xStart;
- rssc.xEnd = xEnd;
- rssc.yStart = yStart;
- rssc.yEnd = yEnd;
-
- rsForEach(s, ain, aout, NULL, 0, &rssc);
-
- failed |= test_root_output();
-
- if (failed) {
- rsSendToClientBlocking(RS_MSG_TEST_FAILED);
- }
- else {
- rsSendToClientBlocking(RS_MSG_TEST_PASSED);
- }
-}
-
diff --git a/tests/src/android/renderscript/cts/foreach_bounds_out.rs b/tests/src/android/renderscript/cts/foreach_bounds_out.rs
deleted file mode 100644
index faba570..0000000
--- a/tests/src/android/renderscript/cts/foreach_bounds_out.rs
+++ /dev/null
@@ -1,67 +0,0 @@
-#include "shared.rsh"
-
-int dimX;
-int dimY;
-int xStart = 0;
-int xEnd = 0;
-int yStart = 0;
-int yEnd = 0;
-
-rs_script s;
-rs_allocation ain;
-rs_allocation aout;
-
-void root(int *out, uint32_t x, uint32_t y) {
- *out = x + y * dimX;
-}
-
-int __attribute__((kernel)) zero() {
- return 0;
-}
-
-static bool test_root_output() {
- bool failed = false;
- int i, j;
-
- for (j = 0; j < dimY; j++) {
- for (i = 0; i < dimX; i++) {
- if (i < xStart || i >= xEnd || j < yStart || j >= yEnd) {
- _RS_ASSERT(rsGetElementAt_int(aout, i, j) == 0);
- } else {
- _RS_ASSERT(rsGetElementAt_int(aout, i, j) == (i + j * dimX));
- }
- }
- }
-
- if (failed) {
- rsDebug("test_root_output FAILED", 0);
- }
- else {
- rsDebug("test_root_output PASSED", 0);
- }
-
- return failed;
-}
-
-void foreach_bounds_out_test() {
- static bool failed = false;
-
- rs_script_call_t rssc = {0};
- rssc.strategy = RS_FOR_EACH_STRATEGY_DONT_CARE;
- rssc.xStart = xStart;
- rssc.xEnd = xEnd;
- rssc.yStart = yStart;
- rssc.yEnd = yEnd;
-
- rsForEach(s, ain, aout, NULL, 0, &rssc);
-
- failed |= test_root_output();
-
- if (failed) {
- rsSendToClientBlocking(RS_MSG_TEST_FAILED);
- }
- else {
- rsSendToClientBlocking(RS_MSG_TEST_PASSED);
- }
-}
-
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/ForEachBoundsTest.java b/tests/tests/renderscript/src/android/renderscript/cts/ForEachBoundsTest.java
deleted file mode 100644
index 490e4ea..0000000
--- a/tests/tests/renderscript/src/android/renderscript/cts/ForEachBoundsTest.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.renderscript.cts;
-
-import android.renderscript.Allocation;
-import android.renderscript.Element;
-import android.renderscript.RSRuntimeException;
-import android.renderscript.Type;
-
-public class ForEachBoundsTest extends RSBaseCompute {
- final int X = 5;
- final int Y = 7;
- final int xStart = 3;
- final int xEnd = 5;
- final int yStart = 2;
- final int yEnd = 5;
-
- public void testForEachBoundsIn() {
- ScriptC_foreach_bounds_in s = new ScriptC_foreach_bounds_in(mRS);
- Type.Builder typeBuilder = new Type.Builder(mRS, Element.I32(mRS));
-
- s.set_dimX(X);
- s.set_dimY(Y);
- typeBuilder.setX(X).setY(Y);
- Allocation Ain = Allocation.createTyped(mRS, typeBuilder.create());
- Allocation Aout = Allocation.createTyped(mRS, typeBuilder.create());
- s.bind_a(Aout);
- s.set_s(s);
- s.set_ain(Ain);
- s.set_aout(Aout);
- s.set_xStart(xStart);
- s.set_xEnd(xEnd);
- s.set_yStart(yStart);
- s.set_yEnd(yEnd);
- s.forEach_seven(Ain);
- s.forEach_zero(Aout);
- s.invoke_foreach_bounds_in_test();
- mRS.finish();
- waitForMessage();
- checkForErrors();
- }
-
- public void testForEachBoundsOut() {
- ScriptC_foreach_bounds_out s = new ScriptC_foreach_bounds_out(mRS);
- Type.Builder typeBuilder = new Type.Builder(mRS, Element.I32(mRS));
-
- s.set_dimX(X);
- s.set_dimY(Y);
- typeBuilder.setX(X).setY(Y);
- Allocation Aout = Allocation.createTyped(mRS, typeBuilder.create());
- s.set_s(s);
- s.set_aout(Aout);
- s.set_xStart(xStart);
- s.set_xEnd(xEnd);
- s.set_yStart(yStart);
- s.set_yEnd(yEnd);
- s.forEach_zero(Aout);
- s.invoke_foreach_bounds_out_test();
- mRS.finish();
- waitForMessage();
- checkForErrors();
- }
-
- public void testForEachBoundsInOut() {
- ScriptC_foreach_bounds_inout s = new ScriptC_foreach_bounds_inout(mRS);
- Type.Builder typeBuilder = new Type.Builder(mRS, Element.I32(mRS));
-
- s.set_dimX(X);
- s.set_dimY(Y);
- typeBuilder.setX(X).setY(Y);
- Allocation Ain = Allocation.createTyped(mRS, typeBuilder.create());
- Allocation Aout = Allocation.createTyped(mRS, typeBuilder.create());
- s.set_s(s);
- s.set_ain(Ain);
- s.set_aout(Aout);
- s.set_xStart(xStart);
- s.set_xEnd(xEnd);
- s.set_yStart(yStart);
- s.set_yEnd(yEnd);
- s.forEach_seven(Ain);
- s.forEach_zero(Aout);
- s.invoke_foreach_bounds_inout_test();
- mRS.finish();
- waitForMessage();
- checkForErrors();
- }
-
-}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/ForEachTest.java b/tests/tests/renderscript/src/android/renderscript/cts/ForEachTest.java
index d62f588..f633168 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/ForEachTest.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/ForEachTest.java
@@ -478,7 +478,6 @@
s.invoke_foreach_test();
mRS.finish();
waitForMessage();
- checkForErrors();
}
public void testNoRoot() {
@@ -496,7 +495,7 @@
s.invoke_verify_foo();
s.invoke_noroot_test();
mRS.finish();
- waitForMessage();
checkForErrors();
+ waitForMessage();
}
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/KernelTest.java b/tests/tests/renderscript/src/android/renderscript/cts/KernelTest.java
index ab5297f..7caacfc 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/KernelTest.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/KernelTest.java
@@ -478,7 +478,6 @@
s.invoke_foreach_test();
mRS.finish();
waitForMessage();
- checkForErrors();
}
public void testNoRoot() {
@@ -496,7 +495,7 @@
s.invoke_verify_foo();
s.invoke_noroot_test();
mRS.finish();
- waitForMessage();
checkForErrors();
+ waitForMessage();
}
}