summaryrefslogtreecommitdiff
path: root/src/test/testmain.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-25 22:01:42 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-25 22:01:42 +0300
commit48d4aa03fac4c20f40bbc35d2395a12a4714ca2c (patch)
treecf18d52274fb69f6c85236b0e6463108bde86c64 /src/test/testmain.cpp
parentbac47f0be5594afad8cf3a9fc23f416b9b710ea3 (diff)
downloadmv-48d4aa03fac4c20f40bbc35d2395a12a4714ca2c.tar.gz
mv-48d4aa03fac4c20f40bbc35d2395a12a4714ca2c.tar.bz2
mv-48d4aa03fac4c20f40bbc35d2395a12a4714ca2c.tar.xz
mv-48d4aa03fac4c20f40bbc35d2395a12a4714ca2c.zip
Detect max texture size also in safe OpenGL mode.
Diffstat (limited to 'src/test/testmain.cpp')
-rw-r--r--src/test/testmain.cpp35
1 files changed, 31 insertions, 4 deletions
diff --git a/src/test/testmain.cpp b/src/test/testmain.cpp
index 4cc4966d8..b51947f8d 100644
--- a/src/test/testmain.cpp
+++ b/src/test/testmain.cpp
@@ -81,6 +81,7 @@ int TestMain::exec(const bool testAudio)
int safeOpenGLFps = 0;
int textureSize1 = 1024;
int textureSize2 = 1024;
+ int textureSize3 = 1024;
RenderType openGLMode = RENDER_SOFTWARE;
int detectMode = 0;
@@ -204,10 +205,27 @@ int TestMain::exec(const bool testAudio)
if (!invokeFastOpenBatchTest("14"))
textureSize1 = readValue2(14);
- if (!invokeFastOpenBatchTest("15"))
- textureSize2 = readValue2(15);
- info.append(strprintf(",%d,%d", textureSize1, textureSize2));
- textureSize1 = std::min(textureSize1, textureSize2);
+// if (!invokeMobileOpenBatchTest("15"))
+// textureSize2 = readValue2(15);
+ if (!invokeSafeOpenBatchTest("16"))
+ textureSize3 = readValue2(16);
+ info.append(strprintf(",%d,%d,-", textureSize1, textureSize3));
+ textureSize1 = std::min(textureSize1, textureSize3);
+ if (textureSize1 < 1024)
+ textureSize1 = 1024;
+ }
+ else if (openGLMode == RENDER_SAFE_OPENGL)
+ {
+ if (!invokeSafeOpenBatchTest("16"))
+ textureSize3 = readValue2(16);
+ textureSize1 = textureSize3;
+ if (fastOpenGLTest != -1)
+ {
+ if (!invokeFastOpenBatchTest("14"))
+ textureSize1 = readValue2(14);
+ }
+ info.append(strprintf(",%d,%d,-", textureSize1, textureSize3));
+ textureSize1 = std::min(textureSize1, textureSize3);
if (textureSize1 < 1024)
textureSize1 = 1024;
}
@@ -345,6 +363,15 @@ int TestMain::invokeMobileOpenBatchTest(const std::string &test)
return ret;
}
+int TestMain::invokeSafeOpenBatchTest(const std::string &test)
+{
+ mConfig.setValue("opengl", static_cast<int>(RENDER_SAFE_OPENGL));
+ mConfig.write();
+ const int ret = execFileWait(fileName, fileName, "-t", test, 30);
+// log->log("%s: %d", test.c_str(), ret);
+ return ret;
+}
+
int TestMain::invokeSafeOpenGLRenderTest(const std::string &test)
{
mConfig.setValue("opengl", static_cast<int>(RENDER_SAFE_OPENGL));