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