summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jack Palevich <jackpal@google.com> 2010-07-19 18:02:36 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2010-07-19 18:02:36 -0700
commit3a18eb93da34721a2ba9f5b6d4cfc97ba0a8defd (patch)
tree42334b0cbcbeeb3bb6fe742b43d370429a0207b9
parentcaaf428f470d4ade8c917bcbd959a942201bbcaa (diff)
parent9610f635e81d630d9e24daa1d868078e578ed91d (diff)
Merge "Fix extraMath state variable."
-rw-r--r--opengl/tests/gl_perfapp/jni/gl_code.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/opengl/tests/gl_perfapp/jni/gl_code.cpp b/opengl/tests/gl_perfapp/jni/gl_code.cpp
index eafb665d091f..020d848fdf0c 100644
--- a/opengl/tests/gl_perfapp/jni/gl_code.cpp
+++ b/opengl/tests/gl_perfapp/jni/gl_code.cpp
@@ -384,14 +384,18 @@ void doTest(uint32_t w, uint32_t h) {
int texCount;
int extraMath;
int testSubState;
- if ( testState < 5 * 2) {
- texCount = 0; // Only 10 tests for texCout 0
- extraMath = testState / 2;
- testSubState = testState % 2;
+ const int extraMathCount = 5;
+ const int texCount0SubTestCount = 2;
+ const int texCountNSubTestCount = 8;
+
+ if ( testState < extraMathCount * texCount0SubTestCount) {
+ texCount = 0; // Only 10 tests for texCount 0
+ extraMath = (testState / texCount0SubTestCount) % extraMathCount;
+ testSubState = testState % texCount0SubTestCount;
} else {
- texCount = 1 + (testState - 10) / (5 * 8);
- extraMath = testState / 8;
- testSubState = testState % 8;
+ texCount = 1 + (testState - extraMathCount * texCount0SubTestCount) / (extraMathCount * texCountNSubTestCount);
+ extraMath = (testState / texCountNSubTestCount) % extraMathCount;
+ testSubState = testState % texCountNSubTestCount;
}
if (texCount >= 3) {
LOGI("done\n");