Re-land "Inline and micro-optimize more for perf tests.""
Re-land fixes memory leaks.
Using a custom array instead of std::vector speeds up the resource
manager. One reason is because calls to size() are implemented in many
implementations as a difference between two pointers. This sub size
implementations are slower than storing a simple size variable in a
custom class.
Also includes more inlining of hot spots functions.
Also includes a small unit test class for ResourceMap. And an unrelated
but small test fix for TextureLimisTest. Also a small unrelated fix for
a Transform Feedback test.
Increase the scores of the draw call perf test with texture and buffer
bindings and the buffer binding perf test.
Bug: angleproject:2763
Change-Id: Ic2f0f689107b2bf05c63da2ed6bbc9f0feea63f7
Reviewed-on: https://chromium-review.googlesource.com/1229033
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/tests/gl_tests/TextureTest.cpp b/src/tests/gl_tests/TextureTest.cpp
index 4f1cf76..d05ad9e 100644
--- a/src/tests/gl_tests/TextureTest.cpp
+++ b/src/tests/gl_tests/TextureTest.cpp
@@ -2774,7 +2774,18 @@
setConfigAlphaBits(8);
}
- ~TextureLimitsTest()
+ void SetUp() override
+ {
+ ANGLETest::SetUp();
+
+ glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &mMaxVertexTextures);
+ glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &mMaxFragmentTextures);
+ glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &mMaxCombinedTextures);
+
+ ASSERT_GL_NO_ERROR();
+ }
+
+ void TearDown() override
{
if (mProgram != 0)
{
@@ -2786,17 +2797,8 @@
glDeleteTextures(static_cast<GLsizei>(mTextures.size()), &mTextures[0]);
}
}
- }
- void SetUp() override
- {
- ANGLETest::SetUp();
-
- glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &mMaxVertexTextures);
- glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &mMaxFragmentTextures);
- glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &mMaxCombinedTextures);
-
- ASSERT_GL_NO_ERROR();
+ ANGLETest::TearDown();
}
void compileProgramWithTextureCounts(const std::string &vertexPrefix,