summaryrefslogtreecommitdiffstats
path: root/opengl/tests
diff options
context:
space:
mode:
authorJack Palevich <jackpal@google.com>2010-07-19 18:01:39 -0700
committerJack Palevich <jackpal@google.com>2010-07-19 18:01:39 -0700
commit3e9eb868b3ad6a93adcb6e8874779f1f57c6ca16 (patch)
treec3733dbd4448aaba7fa09bd3a834366cce342269 /opengl/tests
parent92a9ae4a02682a9e195f3e3a68d2c7293c018173 (diff)
downloadframeworks_native-3e9eb868b3ad6a93adcb6e8874779f1f57c6ca16.zip
frameworks_native-3e9eb868b3ad6a93adcb6e8874779f1f57c6ca16.tar.gz
frameworks_native-3e9eb868b3ad6a93adcb6e8874779f1f57c6ca16.tar.bz2
Fix extraMath state variable.
Change-Id: Iba76d3e4e3bab0b993d176755f588201c8a967cd
Diffstat (limited to 'opengl/tests')
-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 eafb665..020d848 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");