1e5c31af7Sopenharmony_ci/*------------------------------------------------------------------------- 2e5c31af7Sopenharmony_ci * drawElements Quality Program OpenGL ES 3.0 Module 3e5c31af7Sopenharmony_ci * ------------------------------------------------- 4e5c31af7Sopenharmony_ci * 5e5c31af7Sopenharmony_ci * Copyright 2014 The Android Open Source Project 6e5c31af7Sopenharmony_ci * 7e5c31af7Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 8e5c31af7Sopenharmony_ci * you may not use this file except in compliance with the License. 9e5c31af7Sopenharmony_ci * You may obtain a copy of the License at 10e5c31af7Sopenharmony_ci * 11e5c31af7Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 12e5c31af7Sopenharmony_ci * 13e5c31af7Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 14e5c31af7Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 15e5c31af7Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16e5c31af7Sopenharmony_ci * See the License for the specific language governing permissions and 17e5c31af7Sopenharmony_ci * limitations under the License. 18e5c31af7Sopenharmony_ci * 19e5c31af7Sopenharmony_ci *//*! 20e5c31af7Sopenharmony_ci * \file 21e5c31af7Sopenharmony_ci * \brief Long-running stress tests. 22e5c31af7Sopenharmony_ci *//*--------------------------------------------------------------------*/ 23e5c31af7Sopenharmony_ci 24e5c31af7Sopenharmony_ci#include "es3sLongRunningTests.hpp" 25e5c31af7Sopenharmony_ci#include "glsLongStressCase.hpp" 26e5c31af7Sopenharmony_ci#include "glsLongStressTestUtil.hpp" 27e5c31af7Sopenharmony_ci#include "glwEnums.hpp" 28e5c31af7Sopenharmony_ci 29e5c31af7Sopenharmony_ci#include <string> 30e5c31af7Sopenharmony_ci 31e5c31af7Sopenharmony_ciusing std::string; 32e5c31af7Sopenharmony_ci 33e5c31af7Sopenharmony_cinamespace deqp 34e5c31af7Sopenharmony_ci{ 35e5c31af7Sopenharmony_cinamespace gles3 36e5c31af7Sopenharmony_ci{ 37e5c31af7Sopenharmony_cinamespace Stress 38e5c31af7Sopenharmony_ci{ 39e5c31af7Sopenharmony_ci 40e5c31af7Sopenharmony_ciLongRunningTests::LongRunningTests (Context& context) 41e5c31af7Sopenharmony_ci : TestCaseGroup(context, "long", "Long-running stress tests") 42e5c31af7Sopenharmony_ci{ 43e5c31af7Sopenharmony_ci} 44e5c31af7Sopenharmony_ci 45e5c31af7Sopenharmony_ciLongRunningTests::~LongRunningTests (void) 46e5c31af7Sopenharmony_ci{ 47e5c31af7Sopenharmony_ci} 48e5c31af7Sopenharmony_ci 49e5c31af7Sopenharmony_civoid LongRunningTests::init (void) 50e5c31af7Sopenharmony_ci{ 51e5c31af7Sopenharmony_ci static const int Mi = 1<<20; 52e5c31af7Sopenharmony_ci const gls::LongStressTestUtil::ProgramLibrary progLib (glu::GLSL_VERSION_300_ES); 53e5c31af7Sopenharmony_ci 54e5c31af7Sopenharmony_ci typedef gls::LongStressCase::FeatureProbabilities Probs; 55e5c31af7Sopenharmony_ci 56e5c31af7Sopenharmony_ci // Buffer cases. 57e5c31af7Sopenharmony_ci 58e5c31af7Sopenharmony_ci { 59e5c31af7Sopenharmony_ci static const struct MemCase 60e5c31af7Sopenharmony_ci { 61e5c31af7Sopenharmony_ci const char* const nameSuffix; 62e5c31af7Sopenharmony_ci const char* const descSuffix; 63e5c31af7Sopenharmony_ci const int limit; 64e5c31af7Sopenharmony_ci const int redundantBufferFactor; 65e5c31af7Sopenharmony_ci MemCase (const char* n, const char* d, int l, int r) : nameSuffix(n), descSuffix(d), limit(l), redundantBufferFactor(r) {} 66e5c31af7Sopenharmony_ci } memoryLimitCases[] = 67e5c31af7Sopenharmony_ci { 68e5c31af7Sopenharmony_ci MemCase("_low_memory", "; use a low buffer memory usage limit", 8*Mi, 2), 69e5c31af7Sopenharmony_ci MemCase("_high_memory", "; use a high buffer memory usage limit", 256*Mi, 64) 70e5c31af7Sopenharmony_ci }; 71e5c31af7Sopenharmony_ci 72e5c31af7Sopenharmony_ci const std::vector<gls::ProgramContext> contexts(1, progLib.generateBufferContext(4)); 73e5c31af7Sopenharmony_ci 74e5c31af7Sopenharmony_ci static const struct Case 75e5c31af7Sopenharmony_ci { 76e5c31af7Sopenharmony_ci const char* const name; 77e5c31af7Sopenharmony_ci const char* const desc; 78e5c31af7Sopenharmony_ci const int redundantBufferFactor; //!< If non-positive, taken from memoryLimitCases. 79e5c31af7Sopenharmony_ci const Probs probs; 80e5c31af7Sopenharmony_ci Case (const char* const name_, const char* const desc_, int bufFact, const Probs& probs_ = Probs()) : name(name_), desc(desc_), redundantBufferFactor(bufFact), probs(probs_) {} 81e5c31af7Sopenharmony_ci } cases[] = 82e5c31af7Sopenharmony_ci { 83e5c31af7Sopenharmony_ci Case("always_reupload", 84e5c31af7Sopenharmony_ci "Re-upload buffer data at the beginning of each iteration", 85e5c31af7Sopenharmony_ci -1, 86e5c31af7Sopenharmony_ci Probs().pReuploadBuffer(1.0f)), 87e5c31af7Sopenharmony_ci 88e5c31af7Sopenharmony_ci Case("always_reupload_bufferdata", 89e5c31af7Sopenharmony_ci "Re-upload buffer data at the beginning of each iteration, using glBufferData", 90e5c31af7Sopenharmony_ci -1, 91e5c31af7Sopenharmony_ci Probs().pReuploadBuffer(1.0f).pReuploadWithBufferData(1.0f)), 92e5c31af7Sopenharmony_ci 93e5c31af7Sopenharmony_ci Case("always_delete", 94e5c31af7Sopenharmony_ci "Delete buffers at the end of each iteration, and re-create at the beginning of the next", 95e5c31af7Sopenharmony_ci -1, 96e5c31af7Sopenharmony_ci Probs().pDeleteBuffer(1.0f)), 97e5c31af7Sopenharmony_ci 98e5c31af7Sopenharmony_ci Case("wasteful", 99e5c31af7Sopenharmony_ci "Don't reuse buffers, and only delete them when given memory limit is reached", 100e5c31af7Sopenharmony_ci 2, 101e5c31af7Sopenharmony_ci Probs().pWastefulBufferMemoryUsage(1.0f)), 102e5c31af7Sopenharmony_ci 103e5c31af7Sopenharmony_ci Case("separate_attribute_buffers_wasteful", 104e5c31af7Sopenharmony_ci "Give each vertex attribute its own buffer", 105e5c31af7Sopenharmony_ci 2, 106e5c31af7Sopenharmony_ci Probs().pSeparateAttribBuffers(1.0f).pWastefulBufferMemoryUsage(1.0f)) 107e5c31af7Sopenharmony_ci }; 108e5c31af7Sopenharmony_ci 109e5c31af7Sopenharmony_ci TestCaseGroup* const bufferGroup = new TestCaseGroup(m_context, "buffer", "Buffer stress tests"); 110e5c31af7Sopenharmony_ci addChild(bufferGroup); 111e5c31af7Sopenharmony_ci 112e5c31af7Sopenharmony_ci for (int memoryLimitNdx = 0; memoryLimitNdx < DE_LENGTH_OF_ARRAY(memoryLimitCases); memoryLimitNdx++) 113e5c31af7Sopenharmony_ci { 114e5c31af7Sopenharmony_ci for (int caseNdx = 0; caseNdx < DE_LENGTH_OF_ARRAY(cases); caseNdx++) 115e5c31af7Sopenharmony_ci { 116e5c31af7Sopenharmony_ci const int redundantBufferFactor = cases[caseNdx].redundantBufferFactor > 0 ? cases[caseNdx].redundantBufferFactor : memoryLimitCases[memoryLimitNdx].redundantBufferFactor; 117e5c31af7Sopenharmony_ci 118e5c31af7Sopenharmony_ci bufferGroup->addChild(new gls::LongStressCase(m_context.getTestContext(), m_context.getRenderContext(), 119e5c31af7Sopenharmony_ci (string() + cases[caseNdx].name + memoryLimitCases[memoryLimitNdx].nameSuffix).c_str(), 120e5c31af7Sopenharmony_ci (string() + cases[caseNdx].desc + memoryLimitCases[memoryLimitNdx].descSuffix).c_str(), 121e5c31af7Sopenharmony_ci 0 /* tex memory */, memoryLimitCases[memoryLimitNdx].limit, 122e5c31af7Sopenharmony_ci 1 /* draw calls per iteration */, 50000 /* tris per call */, 123e5c31af7Sopenharmony_ci contexts, cases[caseNdx].probs, 124e5c31af7Sopenharmony_ci GL_DYNAMIC_DRAW, GL_DYNAMIC_DRAW, 125e5c31af7Sopenharmony_ci redundantBufferFactor)); 126e5c31af7Sopenharmony_ci } 127e5c31af7Sopenharmony_ci } 128e5c31af7Sopenharmony_ci } 129e5c31af7Sopenharmony_ci 130e5c31af7Sopenharmony_ci // Texture cases. 131e5c31af7Sopenharmony_ci 132e5c31af7Sopenharmony_ci { 133e5c31af7Sopenharmony_ci static const struct MemCase 134e5c31af7Sopenharmony_ci { 135e5c31af7Sopenharmony_ci const char* const nameSuffix; 136e5c31af7Sopenharmony_ci const char* const descSuffix; 137e5c31af7Sopenharmony_ci const int limit; 138e5c31af7Sopenharmony_ci const int numTextures; 139e5c31af7Sopenharmony_ci MemCase (const char* n, const char* d, int l, int t) : nameSuffix(n), descSuffix(d), limit(l), numTextures(t) {} 140e5c31af7Sopenharmony_ci } memoryLimitCases[] = 141e5c31af7Sopenharmony_ci { 142e5c31af7Sopenharmony_ci MemCase("_low_memory", "; use a low texture memory usage limit", 8*Mi, 6), 143e5c31af7Sopenharmony_ci MemCase("_high_memory", "; use a high texture memory usage limit", 256*Mi, 192) 144e5c31af7Sopenharmony_ci }; 145e5c31af7Sopenharmony_ci 146e5c31af7Sopenharmony_ci static const struct Case 147e5c31af7Sopenharmony_ci { 148e5c31af7Sopenharmony_ci const char* const name; 149e5c31af7Sopenharmony_ci const char* const desc; 150e5c31af7Sopenharmony_ci const int numTextures; //!< If non-positive, taken from memoryLimitCases. 151e5c31af7Sopenharmony_ci const Probs probs; 152e5c31af7Sopenharmony_ci Case (const char* const name_, const char* const desc_, int numTextures_, const Probs& probs_ = Probs()) : name(name_), desc(desc_), numTextures(numTextures_), probs(probs_) {} 153e5c31af7Sopenharmony_ci } cases[] = 154e5c31af7Sopenharmony_ci { 155e5c31af7Sopenharmony_ci Case("always_reupload", 156e5c31af7Sopenharmony_ci "Re-upload texture data at the beginning of each iteration", 157e5c31af7Sopenharmony_ci -1, 158e5c31af7Sopenharmony_ci Probs().pReuploadTexture(1.0f)), 159e5c31af7Sopenharmony_ci 160e5c31af7Sopenharmony_ci Case("always_reupload_teximage", 161e5c31af7Sopenharmony_ci "Re-upload texture data at the beginning of each iteration, using glTexImage*", 162e5c31af7Sopenharmony_ci -1, 163e5c31af7Sopenharmony_ci Probs().pReuploadTexture(1.0f).pReuploadWithTexImage(1.0f)), 164e5c31af7Sopenharmony_ci 165e5c31af7Sopenharmony_ci Case("always_delete", 166e5c31af7Sopenharmony_ci "Delete textures at the end of each iteration, and re-create at the beginning of the next", 167e5c31af7Sopenharmony_ci -1, 168e5c31af7Sopenharmony_ci Probs().pDeleteTexture(1.0f)), 169e5c31af7Sopenharmony_ci 170e5c31af7Sopenharmony_ci Case("wasteful", 171e5c31af7Sopenharmony_ci "Don't reuse textures, and only delete them when given memory limit is reached", 172e5c31af7Sopenharmony_ci 6, 173e5c31af7Sopenharmony_ci Probs().pWastefulTextureMemoryUsage(1.0f)) 174e5c31af7Sopenharmony_ci }; 175e5c31af7Sopenharmony_ci 176e5c31af7Sopenharmony_ci TestCaseGroup* const textureGroup = new TestCaseGroup(m_context, "texture", "Texture stress tests"); 177e5c31af7Sopenharmony_ci addChild(textureGroup); 178e5c31af7Sopenharmony_ci 179e5c31af7Sopenharmony_ci for (int memoryLimitNdx = 0; memoryLimitNdx < DE_LENGTH_OF_ARRAY(memoryLimitCases); memoryLimitNdx++) 180e5c31af7Sopenharmony_ci { 181e5c31af7Sopenharmony_ci for (int caseNdx = 0; caseNdx < DE_LENGTH_OF_ARRAY(cases); caseNdx++) 182e5c31af7Sopenharmony_ci { 183e5c31af7Sopenharmony_ci const int numTextures = cases[caseNdx].numTextures > 0 ? cases[caseNdx].numTextures : memoryLimitCases[memoryLimitNdx].numTextures; 184e5c31af7Sopenharmony_ci const std::vector<gls::ProgramContext> contexts (1, progLib.generateTextureContext(numTextures, 512, 512, 0.1f)); 185e5c31af7Sopenharmony_ci 186e5c31af7Sopenharmony_ci textureGroup->addChild(new gls::LongStressCase(m_context.getTestContext(), m_context.getRenderContext(), 187e5c31af7Sopenharmony_ci (string() + cases[caseNdx].name + memoryLimitCases[memoryLimitNdx].nameSuffix).c_str(), 188e5c31af7Sopenharmony_ci (string() + cases[caseNdx].desc + memoryLimitCases[memoryLimitNdx].descSuffix).c_str(), 189e5c31af7Sopenharmony_ci memoryLimitCases[memoryLimitNdx].limit, 1*Mi /* buf memory */, 190e5c31af7Sopenharmony_ci 1 /* draw calls per iteration */, 10000 /* tris per call */, 191e5c31af7Sopenharmony_ci contexts, cases[caseNdx].probs, 192e5c31af7Sopenharmony_ci GL_STATIC_DRAW, GL_STATIC_DRAW)); 193e5c31af7Sopenharmony_ci } 194e5c31af7Sopenharmony_ci } 195e5c31af7Sopenharmony_ci } 196e5c31af7Sopenharmony_ci 197e5c31af7Sopenharmony_ci // Draw call cases. 198e5c31af7Sopenharmony_ci 199e5c31af7Sopenharmony_ci { 200e5c31af7Sopenharmony_ci const std::vector<gls::ProgramContext> contexts(1, progLib.generateTextureContext(1, 128, 128, 0.5f)); 201e5c31af7Sopenharmony_ci 202e5c31af7Sopenharmony_ci static const struct Case 203e5c31af7Sopenharmony_ci { 204e5c31af7Sopenharmony_ci const char* const name; 205e5c31af7Sopenharmony_ci const char* const desc; 206e5c31af7Sopenharmony_ci const int drawCallsPerIteration; 207e5c31af7Sopenharmony_ci const int numTrisPerDrawCall; 208e5c31af7Sopenharmony_ci const Probs probs; 209e5c31af7Sopenharmony_ci Case (const char* const name_, const char* const desc_, const int calls, const int tris, const Probs& probs_ = Probs()) 210e5c31af7Sopenharmony_ci : name(name_), desc(desc_), drawCallsPerIteration(calls), numTrisPerDrawCall(tris), probs(probs_) {} 211e5c31af7Sopenharmony_ci } cases[] = 212e5c31af7Sopenharmony_ci { 213e5c31af7Sopenharmony_ci Case("client_memory_data", 214e5c31af7Sopenharmony_ci "Use client-memory for index and attribute data, instead of GL buffers", 215e5c31af7Sopenharmony_ci 200, 500, 216e5c31af7Sopenharmony_ci Probs().pClientMemoryAttributeData(1.0f).pClientMemoryIndexData(1.0f)), 217e5c31af7Sopenharmony_ci 218e5c31af7Sopenharmony_ci Case("vary_draw_function", 219e5c31af7Sopenharmony_ci "Choose between glDrawElements and glDrawArrays each iteration, with uniform probability", 220e5c31af7Sopenharmony_ci 200, 500, 221e5c31af7Sopenharmony_ci Probs().pUseDrawArrays(0.5f)), 222e5c31af7Sopenharmony_ci 223e5c31af7Sopenharmony_ci Case("few_big_calls", 224e5c31af7Sopenharmony_ci "Per iteration, do a few draw calls with a big number of triangles per call", 225e5c31af7Sopenharmony_ci 2, 50000), 226e5c31af7Sopenharmony_ci 227e5c31af7Sopenharmony_ci Case("many_small_calls", 228e5c31af7Sopenharmony_ci "Per iteration, do many draw calls with a small number of triangles per call", 229e5c31af7Sopenharmony_ci 2000, 50) 230e5c31af7Sopenharmony_ci }; 231e5c31af7Sopenharmony_ci 232e5c31af7Sopenharmony_ci TestCaseGroup* const drawCallGroup = new TestCaseGroup(m_context, "draw_call", "Draw call stress tests"); 233e5c31af7Sopenharmony_ci addChild(drawCallGroup); 234e5c31af7Sopenharmony_ci 235e5c31af7Sopenharmony_ci for (int caseNdx = 0; caseNdx < DE_LENGTH_OF_ARRAY(cases); caseNdx++) 236e5c31af7Sopenharmony_ci { 237e5c31af7Sopenharmony_ci drawCallGroup->addChild(new gls::LongStressCase(m_context.getTestContext(), m_context.getRenderContext(), 238e5c31af7Sopenharmony_ci cases[caseNdx].name, cases[caseNdx].desc, 239e5c31af7Sopenharmony_ci 1*Mi /* tex memory */, 2*Mi /* buf memory */, 240e5c31af7Sopenharmony_ci cases[caseNdx].drawCallsPerIteration, cases[caseNdx].numTrisPerDrawCall, 241e5c31af7Sopenharmony_ci contexts, cases[caseNdx].probs, 242e5c31af7Sopenharmony_ci GL_STATIC_DRAW, GL_STATIC_DRAW)); 243e5c31af7Sopenharmony_ci } 244e5c31af7Sopenharmony_ci } 245e5c31af7Sopenharmony_ci 246e5c31af7Sopenharmony_ci // Shader cases. 247e5c31af7Sopenharmony_ci 248e5c31af7Sopenharmony_ci { 249e5c31af7Sopenharmony_ci std::vector<gls::ProgramContext> contexts; 250e5c31af7Sopenharmony_ci contexts.push_back(progLib.generateFragmentPointLightContext(512, 512)); 251e5c31af7Sopenharmony_ci contexts.push_back(progLib.generateVertexUniformLoopLightContext(512, 512)); 252e5c31af7Sopenharmony_ci 253e5c31af7Sopenharmony_ci static const struct Case 254e5c31af7Sopenharmony_ci { 255e5c31af7Sopenharmony_ci const char* const name; 256e5c31af7Sopenharmony_ci const char* const desc; 257e5c31af7Sopenharmony_ci const Probs probs; 258e5c31af7Sopenharmony_ci Case (const char* const name_, const char* const desc_, const Probs& probs_ = Probs()) : name(name_), desc(desc_), probs(probs_) {} 259e5c31af7Sopenharmony_ci } cases[] = 260e5c31af7Sopenharmony_ci { 261e5c31af7Sopenharmony_ci Case("several_programs", 262e5c31af7Sopenharmony_ci "Use several different programs, choosing between them uniformly on each iteration"), 263e5c31af7Sopenharmony_ci 264e5c31af7Sopenharmony_ci Case("several_programs_always_rebuild", 265e5c31af7Sopenharmony_ci "Use several different programs, choosing between them uniformly on each iteration, and always rebuild the program", 266e5c31af7Sopenharmony_ci Probs().pRebuildProgram(1.0f)) 267e5c31af7Sopenharmony_ci }; 268e5c31af7Sopenharmony_ci 269e5c31af7Sopenharmony_ci TestCaseGroup* const shaderGroup = new TestCaseGroup(m_context, "program", "Shader program stress tests"); 270e5c31af7Sopenharmony_ci addChild(shaderGroup); 271e5c31af7Sopenharmony_ci 272e5c31af7Sopenharmony_ci for (int caseNdx = 0; caseNdx < DE_LENGTH_OF_ARRAY(cases); caseNdx++) 273e5c31af7Sopenharmony_ci { 274e5c31af7Sopenharmony_ci shaderGroup->addChild(new gls::LongStressCase(m_context.getTestContext(), m_context.getRenderContext(), 275e5c31af7Sopenharmony_ci cases[caseNdx].name, cases[caseNdx].desc, 276e5c31af7Sopenharmony_ci 3*Mi /* tex memory */, 1*Mi /* buf memory */, 277e5c31af7Sopenharmony_ci 1 /* draw calls per iteration */, 10000 /* tris per call */, 278e5c31af7Sopenharmony_ci contexts, cases[caseNdx].probs, 279e5c31af7Sopenharmony_ci GL_STATIC_DRAW, GL_STATIC_DRAW)); 280e5c31af7Sopenharmony_ci } 281e5c31af7Sopenharmony_ci } 282e5c31af7Sopenharmony_ci 283e5c31af7Sopenharmony_ci // Mixed cases. 284e5c31af7Sopenharmony_ci 285e5c31af7Sopenharmony_ci { 286e5c31af7Sopenharmony_ci static const struct MemCase 287e5c31af7Sopenharmony_ci { 288e5c31af7Sopenharmony_ci const char* const nameSuffix; 289e5c31af7Sopenharmony_ci const char* const descSuffix; 290e5c31af7Sopenharmony_ci const int texLimit; 291e5c31af7Sopenharmony_ci const int bufLimit; 292e5c31af7Sopenharmony_ci MemCase (const char* n, const char* d, int t, int b) : nameSuffix(n), descSuffix(d), texLimit(t), bufLimit(b) {} 293e5c31af7Sopenharmony_ci } memoryLimitCases[] = 294e5c31af7Sopenharmony_ci { 295e5c31af7Sopenharmony_ci MemCase("_low_memory", "; use a low memory usage limit", 8*Mi, 8*Mi), 296e5c31af7Sopenharmony_ci MemCase("_high_memory", "; use a high memory usage limit", 128*Mi, 128*Mi) 297e5c31af7Sopenharmony_ci }; 298e5c31af7Sopenharmony_ci 299e5c31af7Sopenharmony_ci TestCaseGroup* const mixedGroup = new TestCaseGroup(m_context, "mixed", "Mixed stress tests"); 300e5c31af7Sopenharmony_ci addChild(mixedGroup); 301e5c31af7Sopenharmony_ci 302e5c31af7Sopenharmony_ci for (int memoryLimitNdx = 0; memoryLimitNdx < DE_LENGTH_OF_ARRAY(memoryLimitCases); memoryLimitNdx++) 303e5c31af7Sopenharmony_ci { 304e5c31af7Sopenharmony_ci mixedGroup->addChild(new gls::LongStressCase(m_context.getTestContext(), m_context.getRenderContext(), 305e5c31af7Sopenharmony_ci (string() + "buffer_texture_wasteful" + memoryLimitCases[memoryLimitNdx].nameSuffix).c_str(), 306e5c31af7Sopenharmony_ci (string() + "Use both buffers and textures wastefully" + memoryLimitCases[memoryLimitNdx].descSuffix).c_str(), 307e5c31af7Sopenharmony_ci memoryLimitCases[memoryLimitNdx].texLimit, memoryLimitCases[memoryLimitNdx].bufLimit, 308e5c31af7Sopenharmony_ci 1 /* draw calls per iteration */, 10000 /* tris per call */, 309e5c31af7Sopenharmony_ci std::vector<gls::ProgramContext>(1, progLib.generateBufferAndTextureContext(4, 512, 512)), 310e5c31af7Sopenharmony_ci Probs() 311e5c31af7Sopenharmony_ci .pReuploadTexture (0.3f) 312e5c31af7Sopenharmony_ci .pReuploadWithTexImage (0.5f) 313e5c31af7Sopenharmony_ci .pReuploadBuffer (0.3f) 314e5c31af7Sopenharmony_ci .pReuploadWithBufferData (0.5f) 315e5c31af7Sopenharmony_ci .pDeleteTexture (0.2f) 316e5c31af7Sopenharmony_ci .pDeleteBuffer (0.2f) 317e5c31af7Sopenharmony_ci .pWastefulTextureMemoryUsage (0.5f) 318e5c31af7Sopenharmony_ci .pWastefulBufferMemoryUsage (0.5f) 319e5c31af7Sopenharmony_ci .pRandomBufferUploadTarget (1.0f) 320e5c31af7Sopenharmony_ci .pRandomBufferUsage (1.0f), 321e5c31af7Sopenharmony_ci GL_STATIC_DRAW, GL_STATIC_DRAW)); 322e5c31af7Sopenharmony_ci 323e5c31af7Sopenharmony_ci { 324e5c31af7Sopenharmony_ci std::vector<gls::ProgramContext> contexts; 325e5c31af7Sopenharmony_ci contexts.push_back(progLib.generateFragmentPointLightContext(512, 512)); 326e5c31af7Sopenharmony_ci contexts.push_back(progLib.generateVertexUniformLoopLightContext(512, 512)); 327e5c31af7Sopenharmony_ci mixedGroup->addChild(new gls::LongStressCase(m_context.getTestContext(), m_context.getRenderContext(), 328e5c31af7Sopenharmony_ci (string() + "random" + memoryLimitCases[memoryLimitNdx].nameSuffix).c_str(), 329e5c31af7Sopenharmony_ci (string() + "Highly random behavior" + memoryLimitCases[memoryLimitNdx].descSuffix).c_str(), 330e5c31af7Sopenharmony_ci memoryLimitCases[memoryLimitNdx].texLimit, memoryLimitCases[memoryLimitNdx].bufLimit, 331e5c31af7Sopenharmony_ci 1 /* draw calls per iteration */, 10000 /* tris per call */, 332e5c31af7Sopenharmony_ci contexts, 333e5c31af7Sopenharmony_ci Probs() 334e5c31af7Sopenharmony_ci .pRebuildProgram (0.3f) 335e5c31af7Sopenharmony_ci .pReuploadTexture (0.3f) 336e5c31af7Sopenharmony_ci .pReuploadWithTexImage (0.3f) 337e5c31af7Sopenharmony_ci .pReuploadBuffer (0.3f) 338e5c31af7Sopenharmony_ci .pReuploadWithBufferData (0.3f) 339e5c31af7Sopenharmony_ci .pDeleteTexture (0.2f) 340e5c31af7Sopenharmony_ci .pDeleteBuffer (0.2f) 341e5c31af7Sopenharmony_ci .pWastefulTextureMemoryUsage (0.3f) 342e5c31af7Sopenharmony_ci .pWastefulBufferMemoryUsage (0.3f) 343e5c31af7Sopenharmony_ci .pClientMemoryAttributeData (0.2f) 344e5c31af7Sopenharmony_ci .pClientMemoryIndexData (0.2f) 345e5c31af7Sopenharmony_ci .pSeparateAttribBuffers (0.4f) 346e5c31af7Sopenharmony_ci .pUseDrawArrays (0.4f) 347e5c31af7Sopenharmony_ci .pRandomBufferUploadTarget (1.0f) 348e5c31af7Sopenharmony_ci .pRandomBufferUsage (1.0f), 349e5c31af7Sopenharmony_ci GL_STATIC_DRAW, GL_STATIC_DRAW)); 350e5c31af7Sopenharmony_ci } 351e5c31af7Sopenharmony_ci } 352e5c31af7Sopenharmony_ci } 353e5c31af7Sopenharmony_ci} 354e5c31af7Sopenharmony_ci 355e5c31af7Sopenharmony_ci} // Stress 356e5c31af7Sopenharmony_ci} // gles3 357e5c31af7Sopenharmony_ci} // deqp 358