xref: /aosp_15_r20/external/deqp/modules/gles2/stress/es2sMemoryTests.cpp (revision 35238bce31c2a825756842865a792f8cf7f89930)
1 /*-------------------------------------------------------------------------
2  * drawElements Quality Program OpenGL ES 2.0 Module
3  * -------------------------------------------------
4  *
5  * Copyright 2014 The Android Open Source Project
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  *//*!
20  * \file
21  * \brief Memory object stress test
22  *//*--------------------------------------------------------------------*/
23 
24 #include "es2sMemoryTests.hpp"
25 
26 #include "glsMemoryStressCase.hpp"
27 #include "deRandom.hpp"
28 #include "tcuTestLog.hpp"
29 
30 #include <vector>
31 #include <iostream>
32 
33 using std::vector;
34 using tcu::TestLog;
35 
36 using namespace deqp::gls;
37 
38 namespace deqp
39 {
40 namespace gles2
41 {
42 namespace Stress
43 {
44 
MemoryTests(Context & testCtx)45 MemoryTests::MemoryTests(Context &testCtx) : TestCaseGroup(testCtx, "memory", "Memory stress tests")
46 {
47 }
48 
~MemoryTests(void)49 MemoryTests::~MemoryTests(void)
50 {
51 }
52 
init(void)53 void MemoryTests::init(void)
54 {
55     const int MiB = 1024 * 1024;
56 
57     // Basic tests
58     tcu::TestCaseGroup *basicGroup = new TestCaseGroup(m_context, "basic", "Basic allocation stress tests.");
59 
60     // Buffers
61     basicGroup->addChild(new MemoryStressCase(
62         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 1 * MiB, 1 * MiB, false,
63         false, false, false, "buffer_1mb_no_write_no_use", "1MiB buffer allocations, no data writes, no use"));
64     basicGroup->addChild(new MemoryStressCase(
65         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 1 * MiB, 1 * MiB, true,
66         false, false, false, "buffer_1mb_write_no_use", "1MiB buffer allocations, data writes, no use"));
67     basicGroup->addChild(new MemoryStressCase(
68         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 1 * MiB, 1 * MiB, false,
69         true, false, false, "buffer_1mb_no_write_use", "1MiB buffer allocations, no data writes, data used"));
70     basicGroup->addChild(new MemoryStressCase(
71         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 1 * MiB, 1 * MiB, true,
72         true, false, false, "buffer_1mb_write_use", "1MiB buffer allocations, data writes, data used"));
73 
74     basicGroup->addChild(new MemoryStressCase(
75         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 8 * MiB, 8 * MiB, false,
76         false, false, false, "buffer_8mb_no_write_no_use", "8MiB buffer allocations, no data writes, no use"));
77     basicGroup->addChild(new MemoryStressCase(
78         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 8 * MiB, 8 * MiB, true,
79         false, false, false, "buffer_8mb_write_no_use", "8MiB buffer allocations, data writes, no use"));
80     basicGroup->addChild(new MemoryStressCase(
81         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 8 * MiB, 8 * MiB, false,
82         true, false, false, "buffer_8mb_no_write_use", "8MiB buffer allocations, no data writes, data used"));
83     basicGroup->addChild(new MemoryStressCase(
84         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 8 * MiB, 8 * MiB, true,
85         true, false, false, "buffer_8mb_write_use", "8MiB buffer allocations, data writes, data used"));
86 
87     basicGroup->addChild(new MemoryStressCase(
88         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 32 * MiB, 32 * MiB, false,
89         false, false, false, "buffer_32mb_no_write_no_use", "32MiB buffer allocations, no data writes, no use"));
90     basicGroup->addChild(new MemoryStressCase(
91         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 32 * MiB, 32 * MiB, true,
92         false, false, false, "buffer_32mb_write_no_use", "32MiB buffer allocations, data writes, no use"));
93     basicGroup->addChild(new MemoryStressCase(
94         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 32 * MiB, 32 * MiB, false,
95         true, false, false, "buffer_32mb_no_write_use", "32MiB buffer allocations, no data writes, data used"));
96     basicGroup->addChild(new MemoryStressCase(
97         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 32 * MiB, 32 * MiB, true,
98         true, false, false, "buffer_32mb_write_use", "32MiB buffer allocations, data writes, data used"));
99 
100     // Textures
101     basicGroup->addChild(new MemoryStressCase(m_context.getTestContext(), m_context.getRenderContext(),
102                                               MEMOBJECTTYPE_TEXTURE, 512, 512, 0, 0, false, false, false, false,
103                                               "texture_512x512_rgba_no_write_no_use",
104                                               "512x512 RGBA texture allocations, no data writes, no use"));
105     basicGroup->addChild(new MemoryStressCase(
106         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_TEXTURE, 512, 512, 0, 0, true, false,
107         false, false, "texture_512x512_rgba_write_no_use", "512x512 RGBA texture allocations, data writes, no use"));
108     basicGroup->addChild(new MemoryStressCase(m_context.getTestContext(), m_context.getRenderContext(),
109                                               MEMOBJECTTYPE_TEXTURE, 512, 512, 0, 0, false, true, false, false,
110                                               "texture_512x512_rgba_no_write_use",
111                                               "512x512 RGBA texture allocations, no data writes, data used"));
112     basicGroup->addChild(new MemoryStressCase(
113         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_TEXTURE, 512, 512, 0, 0, true, true,
114         false, false, "texture_512x512_rgba_write_use", "512x512 RGBA texture allocations, data writes, data used"));
115 
116     // Random tests
117     tcu::TestCaseGroup *randomGroup = new TestCaseGroup(m_context, "random", "Random allocation stress tests.");
118 
119     // Buffers
120     randomGroup->addChild(new MemoryStressCase(
121         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 64, 1 * MiB, false, false,
122         false, false, "buffer_small_no_write_no_use", "Random small buffer allocations, no data writes, no use"));
123     randomGroup->addChild(new MemoryStressCase(
124         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 64, 1 * MiB, true, false,
125         false, false, "buffer_small_write_no_use", "Random small allocations, data writes, no use"));
126     randomGroup->addChild(new MemoryStressCase(
127         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 64, 1 * MiB, false, true,
128         false, false, "buffer_small_no_write_use", "Random small allocations, no data writes, data used"));
129     randomGroup->addChild(new MemoryStressCase(
130         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 64, 1 * MiB, true, true,
131         false, false, "buffer_small_write_use", "Random small allocations, data writes, data used"));
132 
133     randomGroup->addChild(new MemoryStressCase(m_context.getTestContext(), m_context.getRenderContext(),
134                                                MEMOBJECTTYPE_BUFFER, 0, 0, 2 * MiB, 32 * MiB, false, false, false,
135                                                false, "buffer_large_no_write_no_use",
136                                                "Random large buffer allocations, no data writes, no use"));
137     randomGroup->addChild(new MemoryStressCase(
138         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 2 * MiB, 32 * MiB, true,
139         false, false, false, "buffer_large_write_no_use", "Random large buffer allocations, data writes, no use"));
140     randomGroup->addChild(new MemoryStressCase(
141         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 2 * MiB, 32 * MiB, false,
142         true, false, false, "buffer_large_no_write_use", "Random large buffer allocations, no data writes, data used"));
143     randomGroup->addChild(new MemoryStressCase(
144         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 2 * MiB, 32 * MiB, true,
145         true, false, false, "buffer_large_write_use", "Random large buffer allocations, data writes, data used"));
146 
147     // Textures
148     randomGroup->addChild(new MemoryStressCase(
149         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_TEXTURE, 8, 256, 0, 0, false, false,
150         false, false, "texture_small_rgba_no_write_no_use", "Small RGBA texture allocations, no data writes, no use"));
151     randomGroup->addChild(new MemoryStressCase(
152         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_TEXTURE, 8, 256, 0, 0, true, false,
153         false, false, "texture_small_rgba_write_no_use", "Small RGBA texture allocations, data writes, no use"));
154     randomGroup->addChild(new MemoryStressCase(
155         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_TEXTURE, 8, 256, 0, 0, false, true,
156         false, false, "texture_small_rgba_no_write_use", "Small RGBA texture allocations, no data writes, data used"));
157     randomGroup->addChild(new MemoryStressCase(
158         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_TEXTURE, 8, 256, 0, 0, true, true,
159         false, false, "texture_small_rgba_write_use", "Small RGBA texture allocations, data writes, data used"));
160 
161     randomGroup->addChild(new MemoryStressCase(
162         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_TEXTURE, 512, 1024, 0, 0, false, false,
163         false, false, "texture_large_rgba_no_write_no_use", "Large RGBA texture allocations, no data writes, no use"));
164     randomGroup->addChild(new MemoryStressCase(
165         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_TEXTURE, 512, 1024, 0, 0, true, false,
166         false, false, "texture_large_rgba_write_no_use", "Large RGBA texture allocations, data writes, no use"));
167     randomGroup->addChild(new MemoryStressCase(
168         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_TEXTURE, 512, 1024, 0, 0, false, true,
169         false, false, "texture_large_rgba_no_write_use", "Large RGBA texture allocations, no data writes, data used"));
170     randomGroup->addChild(new MemoryStressCase(
171         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_TEXTURE, 512, 1024, 0, 0, true, true,
172         false, false, "texture_large_rgba_write_use", "Large RGBA texture allocations, data writes, data used"));
173 
174     randomGroup->addChild(new MemoryStressCase(m_context.getTestContext(), m_context.getRenderContext(),
175                                                MEMOBJECTTYPE_TEXTURE | MEMOBJECTTYPE_BUFFER, 8, 256, 64, 1 * MiB, false,
176                                                false, false, false, "mixed_small_rgba_no_write_no_use",
177                                                "Small RGBA mixed allocations, no data writes, no use"));
178     randomGroup->addChild(new MemoryStressCase(m_context.getTestContext(), m_context.getRenderContext(),
179                                                MEMOBJECTTYPE_TEXTURE | MEMOBJECTTYPE_BUFFER, 8, 256, 64, 1 * MiB, true,
180                                                false, false, false, "mixed_small_rgba_write_no_use",
181                                                "Small RGBA mixed allocations, data writes, no use"));
182     randomGroup->addChild(new MemoryStressCase(m_context.getTestContext(), m_context.getRenderContext(),
183                                                MEMOBJECTTYPE_TEXTURE | MEMOBJECTTYPE_BUFFER, 8, 256, 64, 1 * MiB, false,
184                                                true, false, false, "mixed_small_rgba_no_write_use",
185                                                "Small RGBA mixed allocations, no data writes, data used"));
186     randomGroup->addChild(new MemoryStressCase(m_context.getTestContext(), m_context.getRenderContext(),
187                                                MEMOBJECTTYPE_TEXTURE | MEMOBJECTTYPE_BUFFER, 8, 256, 64, 1 * MiB, true,
188                                                true, false, false, "mixed_small_rgba_write_use",
189                                                "Small RGBA mixed allocations, data writes, data used"));
190 
191     randomGroup->addChild(new MemoryStressCase(m_context.getTestContext(), m_context.getRenderContext(),
192                                                MEMOBJECTTYPE_TEXTURE | MEMOBJECTTYPE_BUFFER, 512, 1024, 2 * MiB,
193                                                32 * MiB, false, false, false, false, "mixed_large_rgba_no_write_no_use",
194                                                "Large RGBA mixed allocations, no data writes, no use"));
195     randomGroup->addChild(new MemoryStressCase(m_context.getTestContext(), m_context.getRenderContext(),
196                                                MEMOBJECTTYPE_TEXTURE | MEMOBJECTTYPE_BUFFER, 512, 1024, 2 * MiB,
197                                                32 * MiB, true, false, false, false, "mixed_large_rgba_write_no_use",
198                                                "Large RGBA mixed allocations, data writes, no use"));
199     randomGroup->addChild(new MemoryStressCase(m_context.getTestContext(), m_context.getRenderContext(),
200                                                MEMOBJECTTYPE_TEXTURE | MEMOBJECTTYPE_BUFFER, 512, 1024, 2 * MiB,
201                                                32 * MiB, false, true, false, false, "mixed_large_rgba_no_write_use",
202                                                "Large RGBA mixed allocations, no data writes, data used"));
203     randomGroup->addChild(new MemoryStressCase(m_context.getTestContext(), m_context.getRenderContext(),
204                                                MEMOBJECTTYPE_TEXTURE | MEMOBJECTTYPE_BUFFER, 512, 1024, 2 * MiB,
205                                                32 * MiB, true, true, false, false, "mixed_large_rgba_write_use",
206                                                "Large RGBA mixed allocations, data writes, data used"));
207 
208     addChild(basicGroup);
209     addChild(randomGroup);
210 
211     // Basic tests with clear
212     tcu::TestCaseGroup *basicClearGroup =
213         new TestCaseGroup(m_context, "basic_clear", "Basic allocation stress tests with glClear after OOM.");
214 
215     // Buffers
216     basicClearGroup->addChild(new MemoryStressCase(
217         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 1 * MiB, 1 * MiB, false,
218         false, false, true, "buffer_1mb_no_write_no_use", "1MiB buffer allocations, no data writes, no use"));
219     basicClearGroup->addChild(new MemoryStressCase(
220         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 1 * MiB, 1 * MiB, true,
221         false, false, true, "buffer_1mb_write_no_use", "1MiB buffer allocations, data writes, no use"));
222     basicClearGroup->addChild(new MemoryStressCase(
223         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 1 * MiB, 1 * MiB, false,
224         true, false, true, "buffer_1mb_no_write_use", "1MiB buffer allocations, no data writes, data used"));
225     basicClearGroup->addChild(new MemoryStressCase(
226         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 1 * MiB, 1 * MiB, true,
227         true, false, true, "buffer_1mb_write_use", "1MiB buffer allocations, data writes, data used"));
228 
229     basicClearGroup->addChild(new MemoryStressCase(
230         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 8 * MiB, 8 * MiB, false,
231         false, false, true, "buffer_8mb_no_write_no_use", "8MiB buffer allocations, no data writes, no use"));
232     basicClearGroup->addChild(new MemoryStressCase(
233         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 8 * MiB, 8 * MiB, true,
234         false, false, true, "buffer_8mb_write_no_use", "8MiB buffer allocations, data writes, no use"));
235     basicClearGroup->addChild(new MemoryStressCase(
236         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 8 * MiB, 8 * MiB, false,
237         true, false, true, "buffer_8mb_no_write_use", "8MiB buffer allocations, no data writes, data used"));
238     basicClearGroup->addChild(new MemoryStressCase(
239         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 8 * MiB, 8 * MiB, true,
240         true, false, true, "buffer_8mb_write_use", "8MiB buffer allocations, data writes, data used"));
241 
242     basicClearGroup->addChild(new MemoryStressCase(
243         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 32 * MiB, 32 * MiB, false,
244         false, false, true, "buffer_32mb_no_write_no_use", "32MiB buffer allocations, no data writes, no use"));
245     basicClearGroup->addChild(new MemoryStressCase(
246         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 32 * MiB, 32 * MiB, true,
247         false, false, true, "buffer_32mb_write_no_use", "32MiB buffer allocations, data writes, no use"));
248     basicClearGroup->addChild(new MemoryStressCase(
249         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 32 * MiB, 32 * MiB, false,
250         true, false, true, "buffer_32mb_no_write_use", "32MiB buffer allocations, no data writes, data used"));
251     basicClearGroup->addChild(new MemoryStressCase(
252         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 32 * MiB, 32 * MiB, true,
253         true, false, true, "buffer_32mb_write_use", "32MiB buffer allocations, data writes, data used"));
254 
255     // Textures
256     basicClearGroup->addChild(new MemoryStressCase(m_context.getTestContext(), m_context.getRenderContext(),
257                                                    MEMOBJECTTYPE_TEXTURE, 512, 512, 0, 0, false, false, false, true,
258                                                    "texture_512x512_rgba_no_write_no_use",
259                                                    "512x512 RGBA texture allocations, no data writes, no use"));
260     basicClearGroup->addChild(new MemoryStressCase(
261         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_TEXTURE, 512, 512, 0, 0, true, false,
262         false, true, "texture_512x512_rgba_write_no_use", "512x512 RGBA texture allocations, data writes, no use"));
263     basicClearGroup->addChild(new MemoryStressCase(m_context.getTestContext(), m_context.getRenderContext(),
264                                                    MEMOBJECTTYPE_TEXTURE, 512, 512, 0, 0, false, true, false, true,
265                                                    "texture_512x512_rgba_no_write_use",
266                                                    "512x512 RGBA texture allocations, no data writes, data used"));
267     basicClearGroup->addChild(new MemoryStressCase(
268         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_TEXTURE, 512, 512, 0, 0, true, true,
269         false, true, "texture_512x512_rgba_write_use", "512x512 RGBA texture allocations, data writes, data used"));
270 
271     // Random tests
272     tcu::TestCaseGroup *randomClearGroup =
273         new TestCaseGroup(m_context, "random_clear", "Random allocation stress tests with glClear after OOM.");
274 
275     // Buffers
276     randomClearGroup->addChild(new MemoryStressCase(
277         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 64, 1 * MiB, false, false,
278         false, true, "buffer_small_no_write_no_use", "Random small buffer allocations, no data writes, no use"));
279     randomClearGroup->addChild(new MemoryStressCase(
280         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 64, 1 * MiB, true, false,
281         false, true, "buffer_small_write_no_use", "Random small allocations, data writes, no use"));
282     randomClearGroup->addChild(new MemoryStressCase(
283         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 64, 1 * MiB, false, true,
284         false, true, "buffer_small_no_write_use", "Random small allocations, no data writes, data used"));
285     randomClearGroup->addChild(new MemoryStressCase(
286         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 64, 1 * MiB, true, true,
287         false, true, "buffer_small_write_use", "Random small allocations, data writes, data used"));
288 
289     randomClearGroup->addChild(new MemoryStressCase(
290         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 2 * MiB, 32 * MiB, false,
291         false, false, true, "buffer_large_no_write_no_use", "Random large buffer allocations, no data writes, no use"));
292     randomClearGroup->addChild(new MemoryStressCase(
293         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 2 * MiB, 32 * MiB, true,
294         false, false, true, "buffer_large_write_no_use", "Random large buffer allocations, data writes, no use"));
295     randomClearGroup->addChild(new MemoryStressCase(
296         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 2 * MiB, 32 * MiB, false,
297         true, false, true, "buffer_large_no_write_use", "Random large buffer allocations, no data writes, data used"));
298     randomClearGroup->addChild(new MemoryStressCase(
299         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_BUFFER, 0, 0, 2 * MiB, 32 * MiB, true,
300         true, false, true, "buffer_large_write_use", "Random large buffer allocations, data writes, data used"));
301 
302     // Textures
303     randomClearGroup->addChild(new MemoryStressCase(
304         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_TEXTURE, 8, 256, 0, 0, false, false,
305         false, true, "texture_small_rgba_no_write_no_use", "Small RGBA texture allocations, no data writes, no use"));
306     randomClearGroup->addChild(new MemoryStressCase(
307         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_TEXTURE, 8, 256, 0, 0, true, false,
308         false, true, "texture_small_rgba_write_no_use", "Small RGBA texture allocations, data writes, no use"));
309     randomClearGroup->addChild(new MemoryStressCase(
310         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_TEXTURE, 8, 256, 0, 0, false, true,
311         false, true, "texture_small_rgba_no_write_use", "Small RGBA texture allocations, no data writes, data used"));
312     randomClearGroup->addChild(new MemoryStressCase(
313         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_TEXTURE, 8, 256, 0, 0, true, true,
314         false, true, "texture_small_rgba_write_use", "Small RGBA texture allocations, data writes, data used"));
315 
316     randomClearGroup->addChild(new MemoryStressCase(
317         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_TEXTURE, 512, 1024, 0, 0, false, false,
318         false, true, "texture_large_rgba_no_write_no_use", "Large RGBA texture allocations, no data writes, no use"));
319     randomClearGroup->addChild(new MemoryStressCase(
320         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_TEXTURE, 512, 1024, 0, 0, true, false,
321         false, true, "texture_large_rgba_write_no_use", "Large RGBA texture allocations, data writes, no use"));
322     randomClearGroup->addChild(new MemoryStressCase(
323         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_TEXTURE, 512, 1024, 0, 0, false, true,
324         false, true, "texture_large_rgba_no_write_use", "Large RGBA texture allocations, no data writes, data used"));
325     randomClearGroup->addChild(new MemoryStressCase(
326         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_TEXTURE, 512, 1024, 0, 0, true, true,
327         false, true, "texture_large_rgba_write_use", "Large RGBA texture allocations, data writes, data used"));
328 
329     randomClearGroup->addChild(new MemoryStressCase(m_context.getTestContext(), m_context.getRenderContext(),
330                                                     MEMOBJECTTYPE_TEXTURE | MEMOBJECTTYPE_BUFFER, 8, 256, 64, 1 * MiB,
331                                                     false, false, false, true, "mixed_small_rgba_no_write_no_use",
332                                                     "Small RGBA mixed allocations, no data writes, no use"));
333     randomClearGroup->addChild(new MemoryStressCase(m_context.getTestContext(), m_context.getRenderContext(),
334                                                     MEMOBJECTTYPE_TEXTURE | MEMOBJECTTYPE_BUFFER, 8, 256, 64, 1 * MiB,
335                                                     true, false, false, true, "mixed_small_rgba_write_no_use",
336                                                     "Small RGBA mixed allocations, data writes, no use"));
337     randomClearGroup->addChild(new MemoryStressCase(m_context.getTestContext(), m_context.getRenderContext(),
338                                                     MEMOBJECTTYPE_TEXTURE | MEMOBJECTTYPE_BUFFER, 8, 256, 64, 1 * MiB,
339                                                     false, true, false, true, "mixed_small_rgba_no_write_use",
340                                                     "Small RGBA mixed allocations, no data writes, data used"));
341     randomClearGroup->addChild(new MemoryStressCase(m_context.getTestContext(), m_context.getRenderContext(),
342                                                     MEMOBJECTTYPE_TEXTURE | MEMOBJECTTYPE_BUFFER, 8, 256, 64, 1 * MiB,
343                                                     true, true, false, true, "mixed_small_rgba_write_use",
344                                                     "Small RGBA mixed allocations, data writes, data used"));
345 
346     randomClearGroup->addChild(new MemoryStressCase(
347         m_context.getTestContext(), m_context.getRenderContext(), MEMOBJECTTYPE_TEXTURE | MEMOBJECTTYPE_BUFFER, 512,
348         1024, 2 * MiB, 32 * MiB, false, false, false, true, "mixed_large_rgba_no_write_no_use",
349         "Large RGBA mixed allocations, no data writes, no use"));
350     randomClearGroup->addChild(new MemoryStressCase(m_context.getTestContext(), m_context.getRenderContext(),
351                                                     MEMOBJECTTYPE_TEXTURE | MEMOBJECTTYPE_BUFFER, 512, 1024, 2 * MiB,
352                                                     32 * MiB, true, false, false, true, "mixed_large_rgba_write_no_use",
353                                                     "Large RGBA mixed allocations, data writes, no use"));
354     randomClearGroup->addChild(new MemoryStressCase(m_context.getTestContext(), m_context.getRenderContext(),
355                                                     MEMOBJECTTYPE_TEXTURE | MEMOBJECTTYPE_BUFFER, 512, 1024, 2 * MiB,
356                                                     32 * MiB, false, true, false, true, "mixed_large_rgba_no_write_use",
357                                                     "Large RGBA mixed allocations, no data writes, data used"));
358     randomClearGroup->addChild(new MemoryStressCase(m_context.getTestContext(), m_context.getRenderContext(),
359                                                     MEMOBJECTTYPE_TEXTURE | MEMOBJECTTYPE_BUFFER, 512, 1024, 2 * MiB,
360                                                     32 * MiB, true, true, false, true, "mixed_large_rgba_write_use",
361                                                     "Large RGBA mixed allocations, data writes, data used"));
362 
363     addChild(basicClearGroup);
364     addChild(randomClearGroup);
365 }
366 
367 } // namespace Stress
368 } // namespace gles2
369 } // namespace deqp
370