summaryrefslogtreecommitdiff
path: root/java/tests/RsTest_14/src/com/android/rs
diff options
context:
space:
mode:
Diffstat (limited to 'java/tests/RsTest_14/src/com/android/rs')
-rw-r--r--java/tests/RsTest_14/src/com/android/rs/test/fp_mad.rs8
-rw-r--r--java/tests/RsTest_14/src/com/android/rs/test/rstypes.rs20
-rw-r--r--java/tests/RsTest_14/src/com/android/rs/test/shared.rsh5
3 files changed, 19 insertions, 14 deletions
diff --git a/java/tests/RsTest_14/src/com/android/rs/test/fp_mad.rs b/java/tests/RsTest_14/src/com/android/rs/test/fp_mad.rs
index b6f2b2a6..62ef3ecf 100644
--- a/java/tests/RsTest_14/src/com/android/rs/test/fp_mad.rs
+++ b/java/tests/RsTest_14/src/com/android/rs/test/fp_mad.rs
@@ -8,7 +8,6 @@ static float4 data_f4[1025];
static void test_mad4(uint32_t index) {
start();
- float total = 0;
// Do ~1 billion ops
for (int ct=0; ct < 1000 * (1000 / 80); ct++) {
for (int i=0; i < (1000); i++) {
@@ -32,7 +31,6 @@ static void test_mad4(uint32_t index) {
static void test_mad(uint32_t index) {
start();
- float total = 0;
// Do ~1 billion ops
for (int ct=0; ct < 1000 * (1000 / 20); ct++) {
for (int i=0; i < (1000); i++) {
@@ -56,7 +54,6 @@ static void test_mad(uint32_t index) {
static void test_norm(uint32_t index) {
start();
- float total = 0;
// Do ~10 M ops
for (int ct=0; ct < 1000 * 10; ct++) {
for (int i=0; i < (1000); i++) {
@@ -71,7 +68,6 @@ static void test_norm(uint32_t index) {
static void test_sincos4(uint32_t index) {
start();
- float total = 0;
// Do ~10 M ops
for (int ct=0; ct < 1000 * 10 / 4; ct++) {
for (int i=0; i < (1000); i++) {
@@ -86,7 +82,6 @@ static void test_sincos4(uint32_t index) {
static void test_sincos(uint32_t index) {
start();
- float total = 0;
// Do ~10 M ops
for (int ct=0; ct < 1000 * 10; ct++) {
for (int i=0; i < (1000); i++) {
@@ -127,7 +122,6 @@ static void test_clamp(uint32_t index) {
static void test_clamp4(uint32_t index) {
start();
- float total = 0;
// Do ~100 M ops
for (int ct=0; ct < 1000 * 100 /4; ct++) {
for (int i=0; i < (1000); i++) {
@@ -170,5 +164,3 @@ void fp_mad_test(uint32_t index, int test_num) {
rsDebug("fp_mad_test PASSED", 0);
rsSendToClientBlocking(RS_MSG_TEST_PASSED);
}
-
-
diff --git a/java/tests/RsTest_14/src/com/android/rs/test/rstypes.rs b/java/tests/RsTest_14/src/com/android/rs/test/rstypes.rs
index 22d9c138..8577604d 100644
--- a/java/tests/RsTest_14/src/com/android/rs/test/rstypes.rs
+++ b/java/tests/RsTest_14/src/com/android/rs/test/rstypes.rs
@@ -28,6 +28,9 @@ static bool basic_test(uint32_t index) {
rs_matrix4x4 matrix4x4TestLocal;
rs_matrix3x3 matrix3x3TestLocal;
rs_matrix2x2 matrix2x2TestLocal;
+ (void) matrix4x4TestLocal;
+ (void) matrix3x3TestLocal;
+ (void) matrix2x2TestLocal;
// This test focuses primarily on compilation-time, not run-time.
rs_element elementTestLocal;
@@ -41,18 +44,30 @@ static bool basic_test(uint32_t index) {
rs_program_raster program_rasterTestLocal;
rs_program_store program_storeTestLocal;
rs_font fontTestLocal;
+ (void) elementTestLocal;
+ (void) typeTestLocal;
+ (void) allocationTestLocal;
+ (void) samplerTestLocal;
+ (void) scriptTestLocal;
+ (void) meshTestLocal;
+ (void) program_fragmentTestLocal;
+ (void) program_vertexTestLocal;
+ (void) program_rasterTestLocal;
+ (void) program_storeTestLocal;
+ (void) fontTestLocal;
rs_font fontTestLocalArray[4];
+ (void) fontTestLocalArray;
rs_font fontTestLocalPreInit = fontTest;
+ (void) fontTestLocalPreInit;
struct my_struct structTest;
+ (void) structTest;
fontTestLocal = fontTest;
- //allocationTestLocal = allocationTest;
fontTest = fontTestLocal;
- //allocationTest = allocationTestLocal;
/*for (int i = 0; i < 4; i++) {
fontTestLocalArray[i] = fontTestLocal;
@@ -76,4 +91,3 @@ void test_rstypes(uint32_t index, int test_num) {
rsDebug("rstypes_test PASSED", 0);
}
}
-
diff --git a/java/tests/RsTest_14/src/com/android/rs/test/shared.rsh b/java/tests/RsTest_14/src/com/android/rs/test/shared.rsh
index 4a7151ff..40f1062c 100644
--- a/java/tests/RsTest_14/src/com/android/rs/test/shared.rsh
+++ b/java/tests/RsTest_14/src/com/android/rs/test/shared.rsh
@@ -12,11 +12,11 @@ typedef struct TestResult_s {
static int64_t g_time;
-static void start(void) {
+static inline void start(void) {
g_time = rsUptimeMillis();
}
-static float end(uint32_t idx) {
+static inline float end(uint32_t idx) {
int64_t t = rsUptimeMillis() - g_time;
//g_results[idx].time = t;
//rsDebug("test time", (int)t);
@@ -35,4 +35,3 @@ do { \
/* These constants must match those in UnitTest.java */
static const int RS_MSG_TEST_PASSED = 100;
static const int RS_MSG_TEST_FAILED = 101;
-