summaryrefslogtreecommitdiff
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
parentbac47f0be5594afad8cf3a9fc23f416b9b710ea3 (diff)
downloadplus-48d4aa03fac4c20f40bbc35d2395a12a4714ca2c.tar.gz
plus-48d4aa03fac4c20f40bbc35d2395a12a4714ca2c.tar.bz2
plus-48d4aa03fac4c20f40bbc35d2395a12a4714ca2c.tar.xz
plus-48d4aa03fac4c20f40bbc35d2395a12a4714ca2c.zip
Detect max texture size also in safe OpenGL mode.
-rw-r--r--src/test/testlauncher.cpp2
-rw-r--r--src/test/testmain.cpp35
-rw-r--r--src/test/testmain.h2
3 files changed, 34 insertions, 5 deletions
diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp
index c3b424368..7ed08ad50 100644
--- a/src/test/testlauncher.cpp
+++ b/src/test/testlauncher.cpp
@@ -74,7 +74,7 @@ int TestLauncher::exec()
return testFps();
else if (mTest == "11")
return testBatches();
- else if (mTest == "14" || mTest == "15")
+ else if (mTest == "14" || mTest == "15" || mTest == "16")
return testTextures();
else if (mTest == "99")
return testVideoDetection();
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));
diff --git a/src/test/testmain.h b/src/test/testmain.h
index d4bae14ce..1eed577a0 100644
--- a/src/test/testmain.h
+++ b/src/test/testmain.h
@@ -66,6 +66,8 @@ class TestMain final
int invokeMobileOpenBatchTest(const std::string &test);
+ int invokeSafeOpenBatchTest(const std::string &test);
+
int invokeSafeOpenGLRenderTest(const std::string &test);
void testsMain();