1 #ifndef _GLSMEMORYSTRESSCASE_HPP
2 #define _GLSMEMORYSTRESSCASE_HPP
3 /*-------------------------------------------------------------------------
4 * drawElements Quality Program OpenGL ES Module
5 * ---------------------------------------------
7 * Copyright 2014 The Android Open Source Project
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
23 * \brief Memory object stress test
24 *//*--------------------------------------------------------------------*/
26 #include "tcuDefs.hpp"
27 #include "tcuTestCase.hpp"
28 #include "gluRenderContext.hpp"
39 MEMOBJECTTYPE_TEXTURE = (1 << 0),
40 MEMOBJECTTYPE_BUFFER = (1 << 1),
45 struct MemObjectConfig
58 class MemoryStressCase : public tcu::TestCase
61 MemoryStressCase (tcu::TestContext& testCtx, glu::RenderContext& renderContext, deUint32 objectTypes, int minTextureSize, int maxTextureSize, int minBufferSize, int maxBufferSize, bool write, bool use, bool useDummyData, bool clearAfterOOM, const char* name, const char* desc);
62 ~MemoryStressCase (void);
66 IterateResult iterate (void);
71 std::vector<int> m_allocated;
72 MemObjectType m_objectTypes;
73 MemObjectConfig m_config;
76 glu::RenderContext& m_renderCtx;
78 MemoryStressCase (const MemoryStressCase&);
79 MemoryStressCase& operator= (const MemoryStressCase&);
86 #endif // _GLSMEMORYSTRESSCASE_HPP