xref: /aosp_15_r20/external/deqp/modules/gles3/functional/es3fAttribLocationTests.cpp (revision 35238bce31c2a825756842865a792f8cf7f89930)
1*35238bceSAndroid Build Coastguard Worker /*-------------------------------------------------------------------------
2*35238bceSAndroid Build Coastguard Worker  * drawElements Quality Program OpenGL ES 3.0 Module
3*35238bceSAndroid Build Coastguard Worker  * -------------------------------------------------
4*35238bceSAndroid Build Coastguard Worker  *
5*35238bceSAndroid Build Coastguard Worker  * Copyright 2014 The Android Open Source Project
6*35238bceSAndroid Build Coastguard Worker  *
7*35238bceSAndroid Build Coastguard Worker  * Licensed under the Apache License, Version 2.0 (the "License");
8*35238bceSAndroid Build Coastguard Worker  * you may not use this file except in compliance with the License.
9*35238bceSAndroid Build Coastguard Worker  * You may obtain a copy of the License at
10*35238bceSAndroid Build Coastguard Worker  *
11*35238bceSAndroid Build Coastguard Worker  *      http://www.apache.org/licenses/LICENSE-2.0
12*35238bceSAndroid Build Coastguard Worker  *
13*35238bceSAndroid Build Coastguard Worker  * Unless required by applicable law or agreed to in writing, software
14*35238bceSAndroid Build Coastguard Worker  * distributed under the License is distributed on an "AS IS" BASIS,
15*35238bceSAndroid Build Coastguard Worker  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16*35238bceSAndroid Build Coastguard Worker  * See the License for the specific language governing permissions and
17*35238bceSAndroid Build Coastguard Worker  * limitations under the License.
18*35238bceSAndroid Build Coastguard Worker  *
19*35238bceSAndroid Build Coastguard Worker  *//*!
20*35238bceSAndroid Build Coastguard Worker  * \file
21*35238bceSAndroid Build Coastguard Worker  * \brief Attribute location test
22*35238bceSAndroid Build Coastguard Worker  *//*--------------------------------------------------------------------*/
23*35238bceSAndroid Build Coastguard Worker 
24*35238bceSAndroid Build Coastguard Worker #include "es3fAttribLocationTests.hpp"
25*35238bceSAndroid Build Coastguard Worker 
26*35238bceSAndroid Build Coastguard Worker #include "glsAttributeLocationTests.hpp"
27*35238bceSAndroid Build Coastguard Worker 
28*35238bceSAndroid Build Coastguard Worker #include "glw.h"
29*35238bceSAndroid Build Coastguard Worker 
30*35238bceSAndroid Build Coastguard Worker using namespace deqp::gls::AttributeLocationTestUtil;
31*35238bceSAndroid Build Coastguard Worker using std::vector;
32*35238bceSAndroid Build Coastguard Worker 
33*35238bceSAndroid Build Coastguard Worker namespace deqp
34*35238bceSAndroid Build Coastguard Worker {
35*35238bceSAndroid Build Coastguard Worker namespace gles3
36*35238bceSAndroid Build Coastguard Worker {
37*35238bceSAndroid Build Coastguard Worker namespace Functional
38*35238bceSAndroid Build Coastguard Worker {
39*35238bceSAndroid Build Coastguard Worker 
createAttributeLocationTests(Context & context)40*35238bceSAndroid Build Coastguard Worker TestCaseGroup *createAttributeLocationTests(Context &context)
41*35238bceSAndroid Build Coastguard Worker {
42*35238bceSAndroid Build Coastguard Worker     const AttribType types[] = {AttribType("float", 1, GL_FLOAT),
43*35238bceSAndroid Build Coastguard Worker                                 AttribType("vec2", 1, GL_FLOAT_VEC2),
44*35238bceSAndroid Build Coastguard Worker                                 AttribType("vec3", 1, GL_FLOAT_VEC3),
45*35238bceSAndroid Build Coastguard Worker                                 AttribType("vec4", 1, GL_FLOAT_VEC4),
46*35238bceSAndroid Build Coastguard Worker 
47*35238bceSAndroid Build Coastguard Worker                                 AttribType("mat2", 2, GL_FLOAT_MAT2),
48*35238bceSAndroid Build Coastguard Worker                                 AttribType("mat3", 3, GL_FLOAT_MAT3),
49*35238bceSAndroid Build Coastguard Worker                                 AttribType("mat4", 4, GL_FLOAT_MAT4),
50*35238bceSAndroid Build Coastguard Worker 
51*35238bceSAndroid Build Coastguard Worker                                 AttribType("int", 1, GL_INT),
52*35238bceSAndroid Build Coastguard Worker                                 AttribType("ivec2", 1, GL_INT_VEC2),
53*35238bceSAndroid Build Coastguard Worker                                 AttribType("ivec3", 1, GL_INT_VEC3),
54*35238bceSAndroid Build Coastguard Worker                                 AttribType("ivec4", 1, GL_INT_VEC4),
55*35238bceSAndroid Build Coastguard Worker 
56*35238bceSAndroid Build Coastguard Worker                                 AttribType("uint", 1, GL_UNSIGNED_INT),
57*35238bceSAndroid Build Coastguard Worker                                 AttribType("uvec2", 1, GL_UNSIGNED_INT_VEC2),
58*35238bceSAndroid Build Coastguard Worker                                 AttribType("uvec3", 1, GL_UNSIGNED_INT_VEC3),
59*35238bceSAndroid Build Coastguard Worker                                 AttribType("uvec4", 1, GL_UNSIGNED_INT_VEC4),
60*35238bceSAndroid Build Coastguard Worker 
61*35238bceSAndroid Build Coastguard Worker                                 AttribType("mat2x2", 2, GL_FLOAT_MAT2),
62*35238bceSAndroid Build Coastguard Worker                                 AttribType("mat2x3", 2, GL_FLOAT_MAT2x3),
63*35238bceSAndroid Build Coastguard Worker                                 AttribType("mat2x4", 2, GL_FLOAT_MAT2x4),
64*35238bceSAndroid Build Coastguard Worker 
65*35238bceSAndroid Build Coastguard Worker                                 AttribType("mat3x2", 3, GL_FLOAT_MAT3x2),
66*35238bceSAndroid Build Coastguard Worker                                 AttribType("mat3x3", 3, GL_FLOAT_MAT3),
67*35238bceSAndroid Build Coastguard Worker                                 AttribType("mat3x4", 3, GL_FLOAT_MAT3x4),
68*35238bceSAndroid Build Coastguard Worker 
69*35238bceSAndroid Build Coastguard Worker                                 AttribType("mat4x2", 4, GL_FLOAT_MAT4x2),
70*35238bceSAndroid Build Coastguard Worker                                 AttribType("mat4x3", 4, GL_FLOAT_MAT4x3),
71*35238bceSAndroid Build Coastguard Worker                                 AttribType("mat4x4", 4, GL_FLOAT_MAT4)};
72*35238bceSAndroid Build Coastguard Worker 
73*35238bceSAndroid Build Coastguard Worker     const AttribType es2Types[] = {AttribType("float", 1, GL_FLOAT),     AttribType("vec2", 1, GL_FLOAT_VEC2),
74*35238bceSAndroid Build Coastguard Worker                                    AttribType("vec3", 1, GL_FLOAT_VEC3), AttribType("vec4", 1, GL_FLOAT_VEC4),
75*35238bceSAndroid Build Coastguard Worker 
76*35238bceSAndroid Build Coastguard Worker                                    AttribType("mat2", 2, GL_FLOAT_MAT2), AttribType("mat3", 3, GL_FLOAT_MAT3),
77*35238bceSAndroid Build Coastguard Worker                                    AttribType("mat4", 4, GL_FLOAT_MAT4)};
78*35238bceSAndroid Build Coastguard Worker 
79*35238bceSAndroid Build Coastguard Worker     TestCaseGroup *const root = new TestCaseGroup(context, "attribute_location", "Attribute location tests");
80*35238bceSAndroid Build Coastguard Worker 
81*35238bceSAndroid Build Coastguard Worker     // Basic bind attribute tests
82*35238bceSAndroid Build Coastguard Worker     {
83*35238bceSAndroid Build Coastguard Worker         TestCaseGroup *const bindAttributeGroup =
84*35238bceSAndroid Build Coastguard Worker             new TestCaseGroup(context, "bind", "Basic bind attribute location tests.");
85*35238bceSAndroid Build Coastguard Worker 
86*35238bceSAndroid Build Coastguard Worker         root->addChild(bindAttributeGroup);
87*35238bceSAndroid Build Coastguard Worker 
88*35238bceSAndroid Build Coastguard Worker         for (int typeNdx = 0; typeNdx < DE_LENGTH_OF_ARRAY(types); typeNdx++)
89*35238bceSAndroid Build Coastguard Worker         {
90*35238bceSAndroid Build Coastguard Worker             const AttribType &type = types[typeNdx];
91*35238bceSAndroid Build Coastguard Worker             bindAttributeGroup->addChild(
92*35238bceSAndroid Build Coastguard Worker                 new gls::BindAttributeTest(context.getTestContext(), context.getRenderContext(), type));
93*35238bceSAndroid Build Coastguard Worker         }
94*35238bceSAndroid Build Coastguard Worker     }
95*35238bceSAndroid Build Coastguard Worker 
96*35238bceSAndroid Build Coastguard Worker     // Bind max number of attributes
97*35238bceSAndroid Build Coastguard Worker     {
98*35238bceSAndroid Build Coastguard Worker         TestCaseGroup *const bindMaxAttributeGroup =
99*35238bceSAndroid Build Coastguard Worker             new TestCaseGroup(context, "bind_max_attributes", "Use bind with maximum number of attributes.");
100*35238bceSAndroid Build Coastguard Worker 
101*35238bceSAndroid Build Coastguard Worker         root->addChild(bindMaxAttributeGroup);
102*35238bceSAndroid Build Coastguard Worker 
103*35238bceSAndroid Build Coastguard Worker         for (int typeNdx = 0; typeNdx < DE_LENGTH_OF_ARRAY(types); typeNdx++)
104*35238bceSAndroid Build Coastguard Worker         {
105*35238bceSAndroid Build Coastguard Worker             const AttribType &type = types[typeNdx];
106*35238bceSAndroid Build Coastguard Worker             bindMaxAttributeGroup->addChild(
107*35238bceSAndroid Build Coastguard Worker                 new gls::BindMaxAttributesTest(context.getTestContext(), context.getRenderContext(), type));
108*35238bceSAndroid Build Coastguard Worker         }
109*35238bceSAndroid Build Coastguard Worker     }
110*35238bceSAndroid Build Coastguard Worker 
111*35238bceSAndroid Build Coastguard Worker     // Test aliasing
112*35238bceSAndroid Build Coastguard Worker     {
113*35238bceSAndroid Build Coastguard Worker         TestCaseGroup *const aliasingGroup =
114*35238bceSAndroid Build Coastguard Worker             new TestCaseGroup(context, "bind_aliasing", "Test binding aliasing locations.");
115*35238bceSAndroid Build Coastguard Worker 
116*35238bceSAndroid Build Coastguard Worker         root->addChild(aliasingGroup);
117*35238bceSAndroid Build Coastguard Worker 
118*35238bceSAndroid Build Coastguard Worker         for (int typeNdx = 0; typeNdx < DE_LENGTH_OF_ARRAY(es2Types); typeNdx++)
119*35238bceSAndroid Build Coastguard Worker         {
120*35238bceSAndroid Build Coastguard Worker             const AttribType &type = es2Types[typeNdx];
121*35238bceSAndroid Build Coastguard Worker 
122*35238bceSAndroid Build Coastguard Worker             // Simple aliasing cases
123*35238bceSAndroid Build Coastguard Worker             aliasingGroup->addChild(
124*35238bceSAndroid Build Coastguard Worker                 new gls::BindAliasingAttributeTest(context.getTestContext(), context.getRenderContext(), type));
125*35238bceSAndroid Build Coastguard Worker 
126*35238bceSAndroid Build Coastguard Worker             // For types which occupy more than one location. Alias second location.
127*35238bceSAndroid Build Coastguard Worker             if (type.getLocationSize() > 1)
128*35238bceSAndroid Build Coastguard Worker                 aliasingGroup->addChild(
129*35238bceSAndroid Build Coastguard Worker                     new gls::BindAliasingAttributeTest(context.getTestContext(), context.getRenderContext(), type, 1));
130*35238bceSAndroid Build Coastguard Worker 
131*35238bceSAndroid Build Coastguard Worker             // Use more than maximum attributes with aliasing
132*35238bceSAndroid Build Coastguard Worker             aliasingGroup->addChild(
133*35238bceSAndroid Build Coastguard Worker                 new gls::BindMaxAliasingAttributeTest(context.getTestContext(), context.getRenderContext(), type));
134*35238bceSAndroid Build Coastguard Worker 
135*35238bceSAndroid Build Coastguard Worker             // Use more than maximum attributes but inactive
136*35238bceSAndroid Build Coastguard Worker             aliasingGroup->addChild(
137*35238bceSAndroid Build Coastguard Worker                 new gls::BindInactiveAliasingAttributeTest(context.getTestContext(), context.getRenderContext(), type));
138*35238bceSAndroid Build Coastguard Worker         }
139*35238bceSAndroid Build Coastguard Worker     }
140*35238bceSAndroid Build Coastguard Worker 
141*35238bceSAndroid Build Coastguard Worker     // Test filling holes in attribute location
142*35238bceSAndroid Build Coastguard Worker     {
143*35238bceSAndroid Build Coastguard Worker         TestCaseGroup *const holeGroup = new TestCaseGroup(
144*35238bceSAndroid Build Coastguard Worker             context, "bind_hole", "Bind all, but one attribute and leave hole in location space for it.");
145*35238bceSAndroid Build Coastguard Worker 
146*35238bceSAndroid Build Coastguard Worker         root->addChild(holeGroup);
147*35238bceSAndroid Build Coastguard Worker 
148*35238bceSAndroid Build Coastguard Worker         for (int typeNdx = 0; typeNdx < DE_LENGTH_OF_ARRAY(types); typeNdx++)
149*35238bceSAndroid Build Coastguard Worker         {
150*35238bceSAndroid Build Coastguard Worker             const AttribType &type = types[typeNdx];
151*35238bceSAndroid Build Coastguard Worker 
152*35238bceSAndroid Build Coastguard Worker             // Bind first location, leave hole size of type and fill rest of locations
153*35238bceSAndroid Build Coastguard Worker             holeGroup->addChild(
154*35238bceSAndroid Build Coastguard Worker                 new gls::BindHoleAttributeTest(context.getTestContext(), context.getRenderContext(), type));
155*35238bceSAndroid Build Coastguard Worker         }
156*35238bceSAndroid Build Coastguard Worker     }
157*35238bceSAndroid Build Coastguard Worker 
158*35238bceSAndroid Build Coastguard Worker     // Test binding at different times
159*35238bceSAndroid Build Coastguard Worker     {
160*35238bceSAndroid Build Coastguard Worker         TestCaseGroup *const bindTimeGroup =
161*35238bceSAndroid Build Coastguard Worker             new TestCaseGroup(context, "bind_time", "Bind time tests. Test binding at different stages.");
162*35238bceSAndroid Build Coastguard Worker 
163*35238bceSAndroid Build Coastguard Worker         root->addChild(bindTimeGroup);
164*35238bceSAndroid Build Coastguard Worker 
165*35238bceSAndroid Build Coastguard Worker         bindTimeGroup->addChild(
166*35238bceSAndroid Build Coastguard Worker             new gls::PreAttachBindAttributeTest(context.getTestContext(), context.getRenderContext()));
167*35238bceSAndroid Build Coastguard Worker         bindTimeGroup->addChild(
168*35238bceSAndroid Build Coastguard Worker             new gls::PreLinkBindAttributeTest(context.getTestContext(), context.getRenderContext()));
169*35238bceSAndroid Build Coastguard Worker         bindTimeGroup->addChild(
170*35238bceSAndroid Build Coastguard Worker             new gls::PostLinkBindAttributeTest(context.getTestContext(), context.getRenderContext()));
171*35238bceSAndroid Build Coastguard Worker         bindTimeGroup->addChild(new gls::BindRelinkAttributeTest(context.getTestContext(), context.getRenderContext()));
172*35238bceSAndroid Build Coastguard Worker         bindTimeGroup->addChild(
173*35238bceSAndroid Build Coastguard Worker             new gls::BindReattachAttributeTest(context.getTestContext(), context.getRenderContext()));
174*35238bceSAndroid Build Coastguard Worker     }
175*35238bceSAndroid Build Coastguard Worker 
176*35238bceSAndroid Build Coastguard Worker     // Basic layout location attribute tests
177*35238bceSAndroid Build Coastguard Worker     {
178*35238bceSAndroid Build Coastguard Worker         TestCaseGroup *const layoutAttributeGroup =
179*35238bceSAndroid Build Coastguard Worker             new TestCaseGroup(context, "layout", "Basic layout location tests.");
180*35238bceSAndroid Build Coastguard Worker 
181*35238bceSAndroid Build Coastguard Worker         root->addChild(layoutAttributeGroup);
182*35238bceSAndroid Build Coastguard Worker 
183*35238bceSAndroid Build Coastguard Worker         for (int typeNdx = 0; typeNdx < DE_LENGTH_OF_ARRAY(types); typeNdx++)
184*35238bceSAndroid Build Coastguard Worker         {
185*35238bceSAndroid Build Coastguard Worker             const AttribType &type = types[typeNdx];
186*35238bceSAndroid Build Coastguard Worker             layoutAttributeGroup->addChild(
187*35238bceSAndroid Build Coastguard Worker                 new gls::LocationAttributeTest(context.getTestContext(), context.getRenderContext(), type));
188*35238bceSAndroid Build Coastguard Worker         }
189*35238bceSAndroid Build Coastguard Worker     }
190*35238bceSAndroid Build Coastguard Worker 
191*35238bceSAndroid Build Coastguard Worker     // Test max attributes with layout locations
192*35238bceSAndroid Build Coastguard Worker     {
193*35238bceSAndroid Build Coastguard Worker         TestCaseGroup *const layoutMaxAttributeGroup = new TestCaseGroup(
194*35238bceSAndroid Build Coastguard Worker             context, "layout_max_attributes", "Maximum attributes used with layout location qualifiers.");
195*35238bceSAndroid Build Coastguard Worker 
196*35238bceSAndroid Build Coastguard Worker         root->addChild(layoutMaxAttributeGroup);
197*35238bceSAndroid Build Coastguard Worker 
198*35238bceSAndroid Build Coastguard Worker         for (int typeNdx = 0; typeNdx < DE_LENGTH_OF_ARRAY(types); typeNdx++)
199*35238bceSAndroid Build Coastguard Worker         {
200*35238bceSAndroid Build Coastguard Worker             const AttribType &type = types[typeNdx];
201*35238bceSAndroid Build Coastguard Worker             layoutMaxAttributeGroup->addChild(
202*35238bceSAndroid Build Coastguard Worker                 new gls::LocationMaxAttributesTest(context.getTestContext(), context.getRenderContext(), type));
203*35238bceSAndroid Build Coastguard Worker         }
204*35238bceSAndroid Build Coastguard Worker     }
205*35238bceSAndroid Build Coastguard Worker 
206*35238bceSAndroid Build Coastguard Worker     // Test filling holes in attribute location
207*35238bceSAndroid Build Coastguard Worker     {
208*35238bceSAndroid Build Coastguard Worker         TestCaseGroup *const holeGroup =
209*35238bceSAndroid Build Coastguard Worker             new TestCaseGroup(context, "layout_hole",
210*35238bceSAndroid Build Coastguard Worker                               "Define layout location for all, but one attribute consuming max attribute locations.");
211*35238bceSAndroid Build Coastguard Worker 
212*35238bceSAndroid Build Coastguard Worker         root->addChild(holeGroup);
213*35238bceSAndroid Build Coastguard Worker 
214*35238bceSAndroid Build Coastguard Worker         for (int typeNdx = 0; typeNdx < DE_LENGTH_OF_ARRAY(types); typeNdx++)
215*35238bceSAndroid Build Coastguard Worker         {
216*35238bceSAndroid Build Coastguard Worker             const AttribType &type = types[typeNdx];
217*35238bceSAndroid Build Coastguard Worker 
218*35238bceSAndroid Build Coastguard Worker             // Location first location, leave hole size of type and fill rest of locations
219*35238bceSAndroid Build Coastguard Worker             holeGroup->addChild(
220*35238bceSAndroid Build Coastguard Worker                 new gls::LocationHoleAttributeTest(context.getTestContext(), context.getRenderContext(), type));
221*35238bceSAndroid Build Coastguard Worker         }
222*35238bceSAndroid Build Coastguard Worker     }
223*35238bceSAndroid Build Coastguard Worker 
224*35238bceSAndroid Build Coastguard Worker     // Basic mixed mixed attribute tests
225*35238bceSAndroid Build Coastguard Worker     {
226*35238bceSAndroid Build Coastguard Worker         TestCaseGroup *const mixedAttributeGroup = new TestCaseGroup(context, "mixed", "Basic mixed location tests.");
227*35238bceSAndroid Build Coastguard Worker 
228*35238bceSAndroid Build Coastguard Worker         root->addChild(mixedAttributeGroup);
229*35238bceSAndroid Build Coastguard Worker 
230*35238bceSAndroid Build Coastguard Worker         for (int typeNdx = 0; typeNdx < DE_LENGTH_OF_ARRAY(types); typeNdx++)
231*35238bceSAndroid Build Coastguard Worker         {
232*35238bceSAndroid Build Coastguard Worker             const AttribType &type = types[typeNdx];
233*35238bceSAndroid Build Coastguard Worker             mixedAttributeGroup->addChild(
234*35238bceSAndroid Build Coastguard Worker                 new gls::MixedAttributeTest(context.getTestContext(), context.getRenderContext(), type));
235*35238bceSAndroid Build Coastguard Worker         }
236*35238bceSAndroid Build Coastguard Worker     }
237*35238bceSAndroid Build Coastguard Worker 
238*35238bceSAndroid Build Coastguard Worker     {
239*35238bceSAndroid Build Coastguard Worker         TestCaseGroup *const mixedMaxAttributeGroup = new TestCaseGroup(
240*35238bceSAndroid Build Coastguard Worker             context, "mixed_max_attributes", "Maximum attributes used with mixed binding and layout qualifiers.");
241*35238bceSAndroid Build Coastguard Worker 
242*35238bceSAndroid Build Coastguard Worker         root->addChild(mixedMaxAttributeGroup);
243*35238bceSAndroid Build Coastguard Worker 
244*35238bceSAndroid Build Coastguard Worker         for (int typeNdx = 0; typeNdx < DE_LENGTH_OF_ARRAY(types); typeNdx++)
245*35238bceSAndroid Build Coastguard Worker         {
246*35238bceSAndroid Build Coastguard Worker             const AttribType &type = types[typeNdx];
247*35238bceSAndroid Build Coastguard Worker             mixedMaxAttributeGroup->addChild(
248*35238bceSAndroid Build Coastguard Worker                 new gls::MixedMaxAttributesTest(context.getTestContext(), context.getRenderContext(), type));
249*35238bceSAndroid Build Coastguard Worker         }
250*35238bceSAndroid Build Coastguard Worker     }
251*35238bceSAndroid Build Coastguard Worker 
252*35238bceSAndroid Build Coastguard Worker     // Test mixed binding at different times
253*35238bceSAndroid Build Coastguard Worker     {
254*35238bceSAndroid Build Coastguard Worker         TestCaseGroup *const mixedTimeGroup =
255*35238bceSAndroid Build Coastguard Worker             new TestCaseGroup(context, "mixed_time", "Bind time tests. Test binding at different stages.");
256*35238bceSAndroid Build Coastguard Worker 
257*35238bceSAndroid Build Coastguard Worker         root->addChild(mixedTimeGroup);
258*35238bceSAndroid Build Coastguard Worker 
259*35238bceSAndroid Build Coastguard Worker         mixedTimeGroup->addChild(
260*35238bceSAndroid Build Coastguard Worker             new gls::PreAttachMixedAttributeTest(context.getTestContext(), context.getRenderContext()));
261*35238bceSAndroid Build Coastguard Worker         mixedTimeGroup->addChild(
262*35238bceSAndroid Build Coastguard Worker             new gls::PreLinkMixedAttributeTest(context.getTestContext(), context.getRenderContext()));
263*35238bceSAndroid Build Coastguard Worker         mixedTimeGroup->addChild(
264*35238bceSAndroid Build Coastguard Worker             new gls::PostLinkMixedAttributeTest(context.getTestContext(), context.getRenderContext()));
265*35238bceSAndroid Build Coastguard Worker         mixedTimeGroup->addChild(
266*35238bceSAndroid Build Coastguard Worker             new gls::MixedRelinkAttributeTest(context.getTestContext(), context.getRenderContext()));
267*35238bceSAndroid Build Coastguard Worker         mixedTimeGroup->addChild(
268*35238bceSAndroid Build Coastguard Worker             new gls::MixedReattachAttributeTest(context.getTestContext(), context.getRenderContext()));
269*35238bceSAndroid Build Coastguard Worker     }
270*35238bceSAndroid Build Coastguard Worker 
271*35238bceSAndroid Build Coastguard Worker     {
272*35238bceSAndroid Build Coastguard Worker         TestCaseGroup *const holeGroup = new TestCaseGroup(
273*35238bceSAndroid Build Coastguard Worker             context, "mixed_hole",
274*35238bceSAndroid Build Coastguard Worker             "Use layout location qualifiers and binding. Leave hole in location space for only free attribute.");
275*35238bceSAndroid Build Coastguard Worker 
276*35238bceSAndroid Build Coastguard Worker         root->addChild(holeGroup);
277*35238bceSAndroid Build Coastguard Worker 
278*35238bceSAndroid Build Coastguard Worker         for (int typeNdx = 0; typeNdx < DE_LENGTH_OF_ARRAY(types); typeNdx++)
279*35238bceSAndroid Build Coastguard Worker         {
280*35238bceSAndroid Build Coastguard Worker             const AttribType &type = types[typeNdx];
281*35238bceSAndroid Build Coastguard Worker 
282*35238bceSAndroid Build Coastguard Worker             holeGroup->addChild(
283*35238bceSAndroid Build Coastguard Worker                 new gls::MixedHoleAttributeTest(context.getTestContext(), context.getRenderContext(), type));
284*35238bceSAndroid Build Coastguard Worker         }
285*35238bceSAndroid Build Coastguard Worker     }
286*35238bceSAndroid Build Coastguard Worker 
287*35238bceSAndroid Build Coastguard Worker     // Test hole in location space that moves when relinking
288*35238bceSAndroid Build Coastguard Worker     {
289*35238bceSAndroid Build Coastguard Worker         TestCaseGroup *const relinkBindHoleGroup = new TestCaseGroup(
290*35238bceSAndroid Build Coastguard Worker             context, "bind_relink_hole", "Test relinking with moving hole in attribute location space.");
291*35238bceSAndroid Build Coastguard Worker 
292*35238bceSAndroid Build Coastguard Worker         root->addChild(relinkBindHoleGroup);
293*35238bceSAndroid Build Coastguard Worker 
294*35238bceSAndroid Build Coastguard Worker         for (int typeNdx = 0; typeNdx < DE_LENGTH_OF_ARRAY(types); typeNdx++)
295*35238bceSAndroid Build Coastguard Worker         {
296*35238bceSAndroid Build Coastguard Worker             const AttribType &type = types[typeNdx];
297*35238bceSAndroid Build Coastguard Worker 
298*35238bceSAndroid Build Coastguard Worker             relinkBindHoleGroup->addChild(
299*35238bceSAndroid Build Coastguard Worker                 new gls::BindRelinkHoleAttributeTest(context.getTestContext(), context.getRenderContext(), type));
300*35238bceSAndroid Build Coastguard Worker         }
301*35238bceSAndroid Build Coastguard Worker     }
302*35238bceSAndroid Build Coastguard Worker 
303*35238bceSAndroid Build Coastguard Worker     // Test hole in location space that moves when relinking
304*35238bceSAndroid Build Coastguard Worker     {
305*35238bceSAndroid Build Coastguard Worker         TestCaseGroup *const relinkMixedHoleGroup = new TestCaseGroup(
306*35238bceSAndroid Build Coastguard Worker             context, "mixed_relink_hole", "Test relinking with moving hole in attribute location space.");
307*35238bceSAndroid Build Coastguard Worker 
308*35238bceSAndroid Build Coastguard Worker         root->addChild(relinkMixedHoleGroup);
309*35238bceSAndroid Build Coastguard Worker 
310*35238bceSAndroid Build Coastguard Worker         for (int typeNdx = 0; typeNdx < DE_LENGTH_OF_ARRAY(types); typeNdx++)
311*35238bceSAndroid Build Coastguard Worker         {
312*35238bceSAndroid Build Coastguard Worker             const AttribType &type = types[typeNdx];
313*35238bceSAndroid Build Coastguard Worker 
314*35238bceSAndroid Build Coastguard Worker             relinkMixedHoleGroup->addChild(
315*35238bceSAndroid Build Coastguard Worker                 new gls::MixedRelinkHoleAttributeTest(context.getTestContext(), context.getRenderContext(), type));
316*35238bceSAndroid Build Coastguard Worker         }
317*35238bceSAndroid Build Coastguard Worker     }
318*35238bceSAndroid Build Coastguard Worker 
319*35238bceSAndroid Build Coastguard Worker     return root;
320*35238bceSAndroid Build Coastguard Worker }
321*35238bceSAndroid Build Coastguard Worker 
322*35238bceSAndroid Build Coastguard Worker } // namespace Functional
323*35238bceSAndroid Build Coastguard Worker } // namespace gles3
324*35238bceSAndroid Build Coastguard Worker } // namespace deqp
325