1*35238bceSAndroid Build Coastguard Worker /*-------------------------------------------------------------------------
2*35238bceSAndroid Build Coastguard Worker * drawElements Quality Program OpenGL ES 2.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 Default vertex attribute test
22*35238bceSAndroid Build Coastguard Worker *//*--------------------------------------------------------------------*/
23*35238bceSAndroid Build Coastguard Worker
24*35238bceSAndroid Build Coastguard Worker #include "es2fDefaultVertexAttributeTests.hpp"
25*35238bceSAndroid Build Coastguard Worker #include "tcuVector.hpp"
26*35238bceSAndroid Build Coastguard Worker #include "tcuRenderTarget.hpp"
27*35238bceSAndroid Build Coastguard Worker #include "tcuSurface.hpp"
28*35238bceSAndroid Build Coastguard Worker #include "tcuTextureUtil.hpp"
29*35238bceSAndroid Build Coastguard Worker #include "gluRenderContext.hpp"
30*35238bceSAndroid Build Coastguard Worker #include "gluCallLogWrapper.hpp"
31*35238bceSAndroid Build Coastguard Worker #include "gluShaderProgram.hpp"
32*35238bceSAndroid Build Coastguard Worker #include "gluObjectWrapper.hpp"
33*35238bceSAndroid Build Coastguard Worker #include "gluPixelTransfer.hpp"
34*35238bceSAndroid Build Coastguard Worker #include "glwEnums.hpp"
35*35238bceSAndroid Build Coastguard Worker #include "glwFunctions.hpp"
36*35238bceSAndroid Build Coastguard Worker #include "deMath.h"
37*35238bceSAndroid Build Coastguard Worker #include "deStringUtil.hpp"
38*35238bceSAndroid Build Coastguard Worker #include "deString.h"
39*35238bceSAndroid Build Coastguard Worker
40*35238bceSAndroid Build Coastguard Worker #include <limits>
41*35238bceSAndroid Build Coastguard Worker
42*35238bceSAndroid Build Coastguard Worker namespace deqp
43*35238bceSAndroid Build Coastguard Worker {
44*35238bceSAndroid Build Coastguard Worker namespace gles2
45*35238bceSAndroid Build Coastguard Worker {
46*35238bceSAndroid Build Coastguard Worker namespace Functional
47*35238bceSAndroid Build Coastguard Worker {
48*35238bceSAndroid Build Coastguard Worker namespace
49*35238bceSAndroid Build Coastguard Worker {
50*35238bceSAndroid Build Coastguard Worker
51*35238bceSAndroid Build Coastguard Worker static const int s_valueRange = 10;
52*35238bceSAndroid Build Coastguard Worker
53*35238bceSAndroid Build Coastguard Worker static const char *const s_passThroughFragmentShaderSource = "varying mediump vec4 v_color;\n"
54*35238bceSAndroid Build Coastguard Worker "void main (void)\n"
55*35238bceSAndroid Build Coastguard Worker "{\n"
56*35238bceSAndroid Build Coastguard Worker " gl_FragColor = v_color;\n"
57*35238bceSAndroid Build Coastguard Worker "}\n";
58*35238bceSAndroid Build Coastguard Worker
59*35238bceSAndroid Build Coastguard Worker template <typename T1, int S1, typename T2, int S2>
convertToTypeVec(const tcu::Vector<T2,S2> & v)60*35238bceSAndroid Build Coastguard Worker tcu::Vector<T1, S1> convertToTypeVec(const tcu::Vector<T2, S2> &v)
61*35238bceSAndroid Build Coastguard Worker {
62*35238bceSAndroid Build Coastguard Worker tcu::Vector<T1, S1> retVal;
63*35238bceSAndroid Build Coastguard Worker
64*35238bceSAndroid Build Coastguard Worker for (int ndx = 0; ndx < S1; ++ndx)
65*35238bceSAndroid Build Coastguard Worker retVal[ndx] = T1(0);
66*35238bceSAndroid Build Coastguard Worker
67*35238bceSAndroid Build Coastguard Worker if (S1 == 4)
68*35238bceSAndroid Build Coastguard Worker retVal[3] = T1(1);
69*35238bceSAndroid Build Coastguard Worker
70*35238bceSAndroid Build Coastguard Worker for (int ndx = 0; ndx < de::min(S1, S2); ++ndx)
71*35238bceSAndroid Build Coastguard Worker retVal[ndx] = T1(v[ndx]);
72*35238bceSAndroid Build Coastguard Worker
73*35238bceSAndroid Build Coastguard Worker return retVal;
74*35238bceSAndroid Build Coastguard Worker }
75*35238bceSAndroid Build Coastguard Worker
76*35238bceSAndroid Build Coastguard Worker class FloatLoader
77*35238bceSAndroid Build Coastguard Worker {
78*35238bceSAndroid Build Coastguard Worker public:
~FloatLoader(void)79*35238bceSAndroid Build Coastguard Worker virtual ~FloatLoader(void)
80*35238bceSAndroid Build Coastguard Worker {
81*35238bceSAndroid Build Coastguard Worker }
82*35238bceSAndroid Build Coastguard Worker
83*35238bceSAndroid Build Coastguard Worker // returns the value loaded
84*35238bceSAndroid Build Coastguard Worker virtual tcu::Vec4 load(glu::CallLogWrapper &gl, int index, const tcu::Vec4 &v) const = 0;
85*35238bceSAndroid Build Coastguard Worker };
86*35238bceSAndroid Build Coastguard Worker
87*35238bceSAndroid Build Coastguard Worker #define GEN_DIRECT_FLOAT_LOADER(TYPE, COMPS, TYPECODE, CASENAME, VALUES) \
88*35238bceSAndroid Build Coastguard Worker class LoaderVertexAttrib##COMPS##TYPECODE : public FloatLoader \
89*35238bceSAndroid Build Coastguard Worker { \
90*35238bceSAndroid Build Coastguard Worker public: \
91*35238bceSAndroid Build Coastguard Worker enum \
92*35238bceSAndroid Build Coastguard Worker { \
93*35238bceSAndroid Build Coastguard Worker NORMALIZING = 0, \
94*35238bceSAndroid Build Coastguard Worker }; \
95*35238bceSAndroid Build Coastguard Worker enum \
96*35238bceSAndroid Build Coastguard Worker { \
97*35238bceSAndroid Build Coastguard Worker COMPONENTS = (COMPS) \
98*35238bceSAndroid Build Coastguard Worker }; \
99*35238bceSAndroid Build Coastguard Worker typedef TYPE Type; \
100*35238bceSAndroid Build Coastguard Worker \
101*35238bceSAndroid Build Coastguard Worker tcu::Vec4 load(glu::CallLogWrapper &gl, int index, const tcu::Vec4 &v) const \
102*35238bceSAndroid Build Coastguard Worker { \
103*35238bceSAndroid Build Coastguard Worker tcu::Vector<TYPE, COMPONENTS> value; \
104*35238bceSAndroid Build Coastguard Worker value = convertToTypeVec<Type, COMPONENTS>(v); \
105*35238bceSAndroid Build Coastguard Worker \
106*35238bceSAndroid Build Coastguard Worker gl.glVertexAttrib##COMPS##TYPECODE VALUES; \
107*35238bceSAndroid Build Coastguard Worker return convertToTypeVec<float, 4>(value); \
108*35238bceSAndroid Build Coastguard Worker } \
109*35238bceSAndroid Build Coastguard Worker \
110*35238bceSAndroid Build Coastguard Worker static const char *getCaseName(void) \
111*35238bceSAndroid Build Coastguard Worker { \
112*35238bceSAndroid Build Coastguard Worker return CASENAME; \
113*35238bceSAndroid Build Coastguard Worker } \
114*35238bceSAndroid Build Coastguard Worker \
115*35238bceSAndroid Build Coastguard Worker static const char *getName(void) \
116*35238bceSAndroid Build Coastguard Worker { \
117*35238bceSAndroid Build Coastguard Worker return "VertexAttrib" #COMPS #TYPECODE; \
118*35238bceSAndroid Build Coastguard Worker } \
119*35238bceSAndroid Build Coastguard Worker }
120*35238bceSAndroid Build Coastguard Worker
121*35238bceSAndroid Build Coastguard Worker #define GEN_INDIRECT_FLOAT_LOADER(TYPE, COMPS, TYPECODE, CASENAME) \
122*35238bceSAndroid Build Coastguard Worker class LoaderVertexAttrib##COMPS##TYPECODE : public FloatLoader \
123*35238bceSAndroid Build Coastguard Worker { \
124*35238bceSAndroid Build Coastguard Worker public: \
125*35238bceSAndroid Build Coastguard Worker enum \
126*35238bceSAndroid Build Coastguard Worker { \
127*35238bceSAndroid Build Coastguard Worker NORMALIZING = 0, \
128*35238bceSAndroid Build Coastguard Worker }; \
129*35238bceSAndroid Build Coastguard Worker enum \
130*35238bceSAndroid Build Coastguard Worker { \
131*35238bceSAndroid Build Coastguard Worker COMPONENTS = (COMPS) \
132*35238bceSAndroid Build Coastguard Worker }; \
133*35238bceSAndroid Build Coastguard Worker typedef TYPE Type; \
134*35238bceSAndroid Build Coastguard Worker \
135*35238bceSAndroid Build Coastguard Worker tcu::Vec4 load(glu::CallLogWrapper &gl, int index, const tcu::Vec4 &v) const \
136*35238bceSAndroid Build Coastguard Worker { \
137*35238bceSAndroid Build Coastguard Worker tcu::Vector<TYPE, COMPONENTS> value; \
138*35238bceSAndroid Build Coastguard Worker value = convertToTypeVec<Type, COMPONENTS>(v); \
139*35238bceSAndroid Build Coastguard Worker \
140*35238bceSAndroid Build Coastguard Worker gl.glVertexAttrib##COMPS##TYPECODE(index, value.getPtr()); \
141*35238bceSAndroid Build Coastguard Worker return convertToTypeVec<float, 4>(value); \
142*35238bceSAndroid Build Coastguard Worker } \
143*35238bceSAndroid Build Coastguard Worker \
144*35238bceSAndroid Build Coastguard Worker static const char *getCaseName(void) \
145*35238bceSAndroid Build Coastguard Worker { \
146*35238bceSAndroid Build Coastguard Worker return CASENAME; \
147*35238bceSAndroid Build Coastguard Worker } \
148*35238bceSAndroid Build Coastguard Worker \
149*35238bceSAndroid Build Coastguard Worker static const char *getName(void) \
150*35238bceSAndroid Build Coastguard Worker { \
151*35238bceSAndroid Build Coastguard Worker return "VertexAttrib" #COMPS #TYPECODE; \
152*35238bceSAndroid Build Coastguard Worker } \
153*35238bceSAndroid Build Coastguard Worker }
154*35238bceSAndroid Build Coastguard Worker
155*35238bceSAndroid Build Coastguard Worker GEN_DIRECT_FLOAT_LOADER(float, 1, f, "vertex_attrib_1f", (index, value.x()));
156*35238bceSAndroid Build Coastguard Worker GEN_DIRECT_FLOAT_LOADER(float, 2, f, "vertex_attrib_2f", (index, value.x(), value.y()));
157*35238bceSAndroid Build Coastguard Worker GEN_DIRECT_FLOAT_LOADER(float, 3, f, "vertex_attrib_3f", (index, value.x(), value.y(), value.z()));
158*35238bceSAndroid Build Coastguard Worker GEN_DIRECT_FLOAT_LOADER(float, 4, f, "vertex_attrib_4f", (index, value.x(), value.y(), value.z(), value.w()));
159*35238bceSAndroid Build Coastguard Worker
160*35238bceSAndroid Build Coastguard Worker GEN_INDIRECT_FLOAT_LOADER(float, 1, fv, "vertex_attrib_1fv");
161*35238bceSAndroid Build Coastguard Worker GEN_INDIRECT_FLOAT_LOADER(float, 2, fv, "vertex_attrib_2fv");
162*35238bceSAndroid Build Coastguard Worker GEN_INDIRECT_FLOAT_LOADER(float, 3, fv, "vertex_attrib_3fv");
163*35238bceSAndroid Build Coastguard Worker GEN_INDIRECT_FLOAT_LOADER(float, 4, fv, "vertex_attrib_4fv");
164*35238bceSAndroid Build Coastguard Worker
165*35238bceSAndroid Build Coastguard Worker class AttributeCase : public TestCase
166*35238bceSAndroid Build Coastguard Worker {
167*35238bceSAndroid Build Coastguard Worker AttributeCase(Context &ctx, const char *name, const char *desc, const char *funcName, bool normalizing,
168*35238bceSAndroid Build Coastguard Worker bool useNegative, glu::DataType dataType);
169*35238bceSAndroid Build Coastguard Worker
170*35238bceSAndroid Build Coastguard Worker public:
171*35238bceSAndroid Build Coastguard Worker template <typename LoaderType>
172*35238bceSAndroid Build Coastguard Worker static AttributeCase *create(Context &ctx, glu::DataType dataType);
173*35238bceSAndroid Build Coastguard Worker ~AttributeCase(void);
174*35238bceSAndroid Build Coastguard Worker
175*35238bceSAndroid Build Coastguard Worker private:
176*35238bceSAndroid Build Coastguard Worker void init(void);
177*35238bceSAndroid Build Coastguard Worker void deinit(void);
178*35238bceSAndroid Build Coastguard Worker IterateResult iterate(void);
179*35238bceSAndroid Build Coastguard Worker
180*35238bceSAndroid Build Coastguard Worker glu::DataType getTargetType(void) const;
181*35238bceSAndroid Build Coastguard Worker std::string genVertexSource(void) const;
182*35238bceSAndroid Build Coastguard Worker bool renderWithValue(const tcu::Vec4 &v);
183*35238bceSAndroid Build Coastguard Worker tcu::Vec4 computeColor(const tcu::Vec4 &value);
184*35238bceSAndroid Build Coastguard Worker bool verifyUnicoloredBuffer(const tcu::Surface &scene, const tcu::Vec4 &refValue);
185*35238bceSAndroid Build Coastguard Worker
186*35238bceSAndroid Build Coastguard Worker const bool m_normalizing;
187*35238bceSAndroid Build Coastguard Worker const bool m_useNegativeValues;
188*35238bceSAndroid Build Coastguard Worker const char *const m_funcName;
189*35238bceSAndroid Build Coastguard Worker const glu::DataType m_dataType;
190*35238bceSAndroid Build Coastguard Worker const FloatLoader *m_loader;
191*35238bceSAndroid Build Coastguard Worker glu::ShaderProgram *m_program;
192*35238bceSAndroid Build Coastguard Worker uint32_t m_bufID;
193*35238bceSAndroid Build Coastguard Worker bool m_allIterationsPassed;
194*35238bceSAndroid Build Coastguard Worker int m_iteration;
195*35238bceSAndroid Build Coastguard Worker
196*35238bceSAndroid Build Coastguard Worker enum
197*35238bceSAndroid Build Coastguard Worker {
198*35238bceSAndroid Build Coastguard Worker RENDER_SIZE = 32
199*35238bceSAndroid Build Coastguard Worker };
200*35238bceSAndroid Build Coastguard Worker };
201*35238bceSAndroid Build Coastguard Worker
AttributeCase(Context & ctx,const char * name,const char * desc,const char * funcName,bool normalizing,bool useNegative,glu::DataType dataType)202*35238bceSAndroid Build Coastguard Worker AttributeCase::AttributeCase(Context &ctx, const char *name, const char *desc, const char *funcName, bool normalizing,
203*35238bceSAndroid Build Coastguard Worker bool useNegative, glu::DataType dataType)
204*35238bceSAndroid Build Coastguard Worker : TestCase(ctx, name, desc)
205*35238bceSAndroid Build Coastguard Worker , m_normalizing(normalizing)
206*35238bceSAndroid Build Coastguard Worker , m_useNegativeValues(useNegative)
207*35238bceSAndroid Build Coastguard Worker , m_funcName(funcName)
208*35238bceSAndroid Build Coastguard Worker , m_dataType(dataType)
209*35238bceSAndroid Build Coastguard Worker , m_loader(DE_NULL)
210*35238bceSAndroid Build Coastguard Worker , m_program(DE_NULL)
211*35238bceSAndroid Build Coastguard Worker , m_bufID(0)
212*35238bceSAndroid Build Coastguard Worker , m_allIterationsPassed(true)
213*35238bceSAndroid Build Coastguard Worker , m_iteration(0)
214*35238bceSAndroid Build Coastguard Worker {
215*35238bceSAndroid Build Coastguard Worker }
216*35238bceSAndroid Build Coastguard Worker
217*35238bceSAndroid Build Coastguard Worker template <typename LoaderType>
create(Context & ctx,glu::DataType dataType)218*35238bceSAndroid Build Coastguard Worker AttributeCase *AttributeCase::create(Context &ctx, glu::DataType dataType)
219*35238bceSAndroid Build Coastguard Worker {
220*35238bceSAndroid Build Coastguard Worker AttributeCase *retVal = new AttributeCase(
221*35238bceSAndroid Build Coastguard Worker ctx, LoaderType::getCaseName(), (std::string("Test ") + LoaderType::getName()).c_str(), LoaderType::getName(),
222*35238bceSAndroid Build Coastguard Worker LoaderType::NORMALIZING != 0, std::numeric_limits<typename LoaderType::Type>::is_signed, dataType);
223*35238bceSAndroid Build Coastguard Worker retVal->m_loader = new LoaderType();
224*35238bceSAndroid Build Coastguard Worker return retVal;
225*35238bceSAndroid Build Coastguard Worker }
226*35238bceSAndroid Build Coastguard Worker
~AttributeCase(void)227*35238bceSAndroid Build Coastguard Worker AttributeCase::~AttributeCase(void)
228*35238bceSAndroid Build Coastguard Worker {
229*35238bceSAndroid Build Coastguard Worker deinit();
230*35238bceSAndroid Build Coastguard Worker }
231*35238bceSAndroid Build Coastguard Worker
init(void)232*35238bceSAndroid Build Coastguard Worker void AttributeCase::init(void)
233*35238bceSAndroid Build Coastguard Worker {
234*35238bceSAndroid Build Coastguard Worker if (m_context.getRenderTarget().getWidth() < RENDER_SIZE || m_context.getRenderTarget().getHeight() < RENDER_SIZE)
235*35238bceSAndroid Build Coastguard Worker throw tcu::NotSupportedError("Render target must be at least " + de::toString<int>(RENDER_SIZE) + "x" +
236*35238bceSAndroid Build Coastguard Worker de::toString<int>(RENDER_SIZE));
237*35238bceSAndroid Build Coastguard Worker
238*35238bceSAndroid Build Coastguard Worker // log test info
239*35238bceSAndroid Build Coastguard Worker
240*35238bceSAndroid Build Coastguard Worker {
241*35238bceSAndroid Build Coastguard Worker const float maxRange = (m_normalizing) ? (1.0f) : (s_valueRange);
242*35238bceSAndroid Build Coastguard Worker const float minRange = (m_useNegativeValues) ? (-maxRange) : (0.0f);
243*35238bceSAndroid Build Coastguard Worker
244*35238bceSAndroid Build Coastguard Worker m_testCtx.getLog() << tcu::TestLog::Message << "Loading attribute values using " << m_funcName << "\n"
245*35238bceSAndroid Build Coastguard Worker << "Attribute type: " << glu::getDataTypeName(m_dataType) << "\n"
246*35238bceSAndroid Build Coastguard Worker << "Attribute value range: [" << minRange << ", " << maxRange << "]"
247*35238bceSAndroid Build Coastguard Worker << tcu::TestLog::EndMessage;
248*35238bceSAndroid Build Coastguard Worker }
249*35238bceSAndroid Build Coastguard Worker
250*35238bceSAndroid Build Coastguard Worker // gen shader and base quad
251*35238bceSAndroid Build Coastguard Worker
252*35238bceSAndroid Build Coastguard Worker m_program = new glu::ShaderProgram(m_context.getRenderContext(),
253*35238bceSAndroid Build Coastguard Worker glu::ProgramSources() << glu::VertexSource(genVertexSource())
254*35238bceSAndroid Build Coastguard Worker << glu::FragmentSource(s_passThroughFragmentShaderSource));
255*35238bceSAndroid Build Coastguard Worker m_testCtx.getLog() << *m_program;
256*35238bceSAndroid Build Coastguard Worker if (!m_program->isOk())
257*35238bceSAndroid Build Coastguard Worker throw tcu::TestError("could not build program");
258*35238bceSAndroid Build Coastguard Worker
259*35238bceSAndroid Build Coastguard Worker {
260*35238bceSAndroid Build Coastguard Worker const tcu::Vec4 fullscreenQuad[] = {
261*35238bceSAndroid Build Coastguard Worker tcu::Vec4(1.0f, 1.0f, 0.0f, 1.0f),
262*35238bceSAndroid Build Coastguard Worker tcu::Vec4(1.0f, -1.0f, 0.0f, 1.0f),
263*35238bceSAndroid Build Coastguard Worker tcu::Vec4(-1.0f, 1.0f, 0.0f, 1.0f),
264*35238bceSAndroid Build Coastguard Worker tcu::Vec4(-1.0f, -1.0f, 0.0f, 1.0f),
265*35238bceSAndroid Build Coastguard Worker };
266*35238bceSAndroid Build Coastguard Worker
267*35238bceSAndroid Build Coastguard Worker const glw::Functions &gl = m_context.getRenderContext().getFunctions();
268*35238bceSAndroid Build Coastguard Worker
269*35238bceSAndroid Build Coastguard Worker gl.genBuffers(1, &m_bufID);
270*35238bceSAndroid Build Coastguard Worker gl.bindBuffer(GL_ARRAY_BUFFER, m_bufID);
271*35238bceSAndroid Build Coastguard Worker gl.bufferData(GL_ARRAY_BUFFER, sizeof(fullscreenQuad), fullscreenQuad, GL_STATIC_DRAW);
272*35238bceSAndroid Build Coastguard Worker GLU_EXPECT_NO_ERROR(gl.getError(), "fill buffer");
273*35238bceSAndroid Build Coastguard Worker }
274*35238bceSAndroid Build Coastguard Worker }
275*35238bceSAndroid Build Coastguard Worker
deinit(void)276*35238bceSAndroid Build Coastguard Worker void AttributeCase::deinit(void)
277*35238bceSAndroid Build Coastguard Worker {
278*35238bceSAndroid Build Coastguard Worker delete m_loader;
279*35238bceSAndroid Build Coastguard Worker m_loader = DE_NULL;
280*35238bceSAndroid Build Coastguard Worker
281*35238bceSAndroid Build Coastguard Worker delete m_program;
282*35238bceSAndroid Build Coastguard Worker m_program = DE_NULL;
283*35238bceSAndroid Build Coastguard Worker
284*35238bceSAndroid Build Coastguard Worker if (m_bufID)
285*35238bceSAndroid Build Coastguard Worker {
286*35238bceSAndroid Build Coastguard Worker m_context.getRenderContext().getFunctions().deleteBuffers(1, &m_bufID);
287*35238bceSAndroid Build Coastguard Worker m_bufID = 0;
288*35238bceSAndroid Build Coastguard Worker }
289*35238bceSAndroid Build Coastguard Worker }
290*35238bceSAndroid Build Coastguard Worker
iterate(void)291*35238bceSAndroid Build Coastguard Worker AttributeCase::IterateResult AttributeCase::iterate(void)
292*35238bceSAndroid Build Coastguard Worker {
293*35238bceSAndroid Build Coastguard Worker static const tcu::Vec4 testValues[] = {
294*35238bceSAndroid Build Coastguard Worker tcu::Vec4(0.0f, 0.5f, 0.2f, 1.0f), tcu::Vec4(0.1f, 0.7f, 1.0f, 0.6f), tcu::Vec4(0.4f, 0.2f, 0.0f, 0.5f),
295*35238bceSAndroid Build Coastguard Worker tcu::Vec4(0.5f, 0.0f, 0.9f, 0.1f), tcu::Vec4(0.6f, 0.2f, 0.2f, 0.9f), tcu::Vec4(0.9f, 1.0f, 0.0f, 0.0f),
296*35238bceSAndroid Build Coastguard Worker tcu::Vec4(1.0f, 0.5f, 0.3f, 0.8f),
297*35238bceSAndroid Build Coastguard Worker };
298*35238bceSAndroid Build Coastguard Worker
299*35238bceSAndroid Build Coastguard Worker const tcu::ScopedLogSection section(m_testCtx.getLog(), "Iteration",
300*35238bceSAndroid Build Coastguard Worker "Iteration " + de::toString(m_iteration + 1) + "/" +
301*35238bceSAndroid Build Coastguard Worker de::toString(DE_LENGTH_OF_ARRAY(testValues)));
302*35238bceSAndroid Build Coastguard Worker
303*35238bceSAndroid Build Coastguard Worker // Test normalizing transfers with whole range, non-normalizing with up to s_valueRange
304*35238bceSAndroid Build Coastguard Worker const tcu::Vec4 testValue =
305*35238bceSAndroid Build Coastguard Worker ((m_useNegativeValues) ? (testValues[m_iteration] * 2.0f - tcu::Vec4(1.0f)) : (testValues[m_iteration])) *
306*35238bceSAndroid Build Coastguard Worker ((m_normalizing) ? (1.0f) : ((float)s_valueRange));
307*35238bceSAndroid Build Coastguard Worker
308*35238bceSAndroid Build Coastguard Worker if (!renderWithValue(testValue))
309*35238bceSAndroid Build Coastguard Worker m_allIterationsPassed = false;
310*35238bceSAndroid Build Coastguard Worker
311*35238bceSAndroid Build Coastguard Worker // continue
312*35238bceSAndroid Build Coastguard Worker
313*35238bceSAndroid Build Coastguard Worker if (++m_iteration < DE_LENGTH_OF_ARRAY(testValues))
314*35238bceSAndroid Build Coastguard Worker return CONTINUE;
315*35238bceSAndroid Build Coastguard Worker
316*35238bceSAndroid Build Coastguard Worker if (m_allIterationsPassed)
317*35238bceSAndroid Build Coastguard Worker m_testCtx.setTestResult(QP_TEST_RESULT_PASS, "Pass");
318*35238bceSAndroid Build Coastguard Worker else
319*35238bceSAndroid Build Coastguard Worker m_testCtx.setTestResult(QP_TEST_RESULT_FAIL, "Got unexpected values");
320*35238bceSAndroid Build Coastguard Worker
321*35238bceSAndroid Build Coastguard Worker return STOP;
322*35238bceSAndroid Build Coastguard Worker }
323*35238bceSAndroid Build Coastguard Worker
genVertexSource(void) const324*35238bceSAndroid Build Coastguard Worker std::string AttributeCase::genVertexSource(void) const
325*35238bceSAndroid Build Coastguard Worker {
326*35238bceSAndroid Build Coastguard Worker const int vectorSize = (glu::isDataTypeMatrix(m_dataType)) ? (glu::getDataTypeMatrixNumRows(m_dataType)) :
327*35238bceSAndroid Build Coastguard Worker (glu::isDataTypeVector(m_dataType)) ? (glu::getDataTypeScalarSize(m_dataType)) :
328*35238bceSAndroid Build Coastguard Worker (-1);
329*35238bceSAndroid Build Coastguard Worker const char *const vectorType = glu::getDataTypeName(
330*35238bceSAndroid Build Coastguard Worker (glu::isDataTypeMatrix(m_dataType)) ? (glu::getDataTypeVector(glu::TYPE_FLOAT, vectorSize)) :
331*35238bceSAndroid Build Coastguard Worker (glu::isDataTypeVector(m_dataType)) ? (glu::getDataTypeVector(glu::TYPE_FLOAT, vectorSize)) :
332*35238bceSAndroid Build Coastguard Worker (glu::TYPE_FLOAT));
333*35238bceSAndroid Build Coastguard Worker const int components = (glu::isDataTypeMatrix(m_dataType)) ? (glu::getDataTypeMatrixNumRows(m_dataType)) :
334*35238bceSAndroid Build Coastguard Worker (glu::getDataTypeScalarSize(m_dataType));
335*35238bceSAndroid Build Coastguard Worker std::ostringstream buf;
336*35238bceSAndroid Build Coastguard Worker
337*35238bceSAndroid Build Coastguard Worker buf << "attribute highp vec4 a_position;\n"
338*35238bceSAndroid Build Coastguard Worker "attribute highp "
339*35238bceSAndroid Build Coastguard Worker << glu::getDataTypeName(m_dataType)
340*35238bceSAndroid Build Coastguard Worker << " a_value;\n"
341*35238bceSAndroid Build Coastguard Worker "varying highp vec4 v_color;\n"
342*35238bceSAndroid Build Coastguard Worker "void main (void)\n"
343*35238bceSAndroid Build Coastguard Worker "{\n"
344*35238bceSAndroid Build Coastguard Worker " gl_Position = a_position;\n"
345*35238bceSAndroid Build Coastguard Worker "\n";
346*35238bceSAndroid Build Coastguard Worker
347*35238bceSAndroid Build Coastguard Worker if (m_normalizing)
348*35238bceSAndroid Build Coastguard Worker buf << " highp " << vectorType << " normalizedValue = "
349*35238bceSAndroid Build Coastguard Worker << ((glu::getDataTypeScalarType(m_dataType) == glu::TYPE_FLOAT) ? ("") : (vectorType)) << "(a_value"
350*35238bceSAndroid Build Coastguard Worker << ((glu::isDataTypeMatrix(m_dataType)) ? ("[1]") : ("")) << ");\n";
351*35238bceSAndroid Build Coastguard Worker else
352*35238bceSAndroid Build Coastguard Worker buf << " highp " << vectorType << " normalizedValue = "
353*35238bceSAndroid Build Coastguard Worker << ((glu::getDataTypeScalarType(m_dataType) == glu::TYPE_FLOAT) ? ("") : (vectorType)) << "(a_value"
354*35238bceSAndroid Build Coastguard Worker << ((glu::isDataTypeMatrix(m_dataType)) ? ("[1]") : ("")) << ") / float(" << s_valueRange << ");\n";
355*35238bceSAndroid Build Coastguard Worker
356*35238bceSAndroid Build Coastguard Worker if (m_useNegativeValues)
357*35238bceSAndroid Build Coastguard Worker buf << " highp " << vectorType << " positiveNormalizedValue = (normalizedValue + " << vectorType
358*35238bceSAndroid Build Coastguard Worker << "(1.0)) / 2.0;\n";
359*35238bceSAndroid Build Coastguard Worker else
360*35238bceSAndroid Build Coastguard Worker buf << " highp " << vectorType << " positiveNormalizedValue = normalizedValue;\n";
361*35238bceSAndroid Build Coastguard Worker
362*35238bceSAndroid Build Coastguard Worker if (components == 1)
363*35238bceSAndroid Build Coastguard Worker buf << " v_color = vec4(positiveNormalizedValue, 0.0, 0.0, 1.0);\n";
364*35238bceSAndroid Build Coastguard Worker else if (components == 2)
365*35238bceSAndroid Build Coastguard Worker buf << " v_color = vec4(positiveNormalizedValue.xy, 0.0, 1.0);\n";
366*35238bceSAndroid Build Coastguard Worker else if (components == 3)
367*35238bceSAndroid Build Coastguard Worker buf << " v_color = vec4(positiveNormalizedValue.xyz, 1.0);\n";
368*35238bceSAndroid Build Coastguard Worker else if (components == 4)
369*35238bceSAndroid Build Coastguard Worker buf << " v_color = vec4((positiveNormalizedValue.xy + positiveNormalizedValue.zz) / 2.0, "
370*35238bceSAndroid Build Coastguard Worker "positiveNormalizedValue.w, 1.0);\n";
371*35238bceSAndroid Build Coastguard Worker else
372*35238bceSAndroid Build Coastguard Worker DE_ASSERT(false);
373*35238bceSAndroid Build Coastguard Worker
374*35238bceSAndroid Build Coastguard Worker buf << "}\n";
375*35238bceSAndroid Build Coastguard Worker
376*35238bceSAndroid Build Coastguard Worker return buf.str();
377*35238bceSAndroid Build Coastguard Worker }
378*35238bceSAndroid Build Coastguard Worker
renderWithValue(const tcu::Vec4 & v)379*35238bceSAndroid Build Coastguard Worker bool AttributeCase::renderWithValue(const tcu::Vec4 &v)
380*35238bceSAndroid Build Coastguard Worker {
381*35238bceSAndroid Build Coastguard Worker glu::CallLogWrapper gl(m_context.getRenderContext().getFunctions(), m_testCtx.getLog());
382*35238bceSAndroid Build Coastguard Worker
383*35238bceSAndroid Build Coastguard Worker gl.enableLogging(true);
384*35238bceSAndroid Build Coastguard Worker
385*35238bceSAndroid Build Coastguard Worker const int positionIndex = gl.glGetAttribLocation(m_program->getProgram(), "a_position");
386*35238bceSAndroid Build Coastguard Worker const int valueIndex = gl.glGetAttribLocation(m_program->getProgram(), "a_value");
387*35238bceSAndroid Build Coastguard Worker tcu::Surface dest(RENDER_SIZE, RENDER_SIZE);
388*35238bceSAndroid Build Coastguard Worker tcu::Vec4 loadedValue;
389*35238bceSAndroid Build Coastguard Worker
390*35238bceSAndroid Build Coastguard Worker gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
391*35238bceSAndroid Build Coastguard Worker gl.glClear(GL_COLOR_BUFFER_BIT);
392*35238bceSAndroid Build Coastguard Worker gl.glViewport(0, 0, RENDER_SIZE, RENDER_SIZE);
393*35238bceSAndroid Build Coastguard Worker GLU_EXPECT_NO_ERROR(gl.glGetError(), "setup");
394*35238bceSAndroid Build Coastguard Worker
395*35238bceSAndroid Build Coastguard Worker gl.glBindBuffer(GL_ARRAY_BUFFER, m_bufID);
396*35238bceSAndroid Build Coastguard Worker gl.glVertexAttribPointer(positionIndex, 4, GL_FLOAT, GL_FALSE, 0, DE_NULL);
397*35238bceSAndroid Build Coastguard Worker gl.glEnableVertexAttribArray(positionIndex);
398*35238bceSAndroid Build Coastguard Worker GLU_EXPECT_NO_ERROR(gl.glGetError(), "position va");
399*35238bceSAndroid Build Coastguard Worker
400*35238bceSAndroid Build Coastguard Worker // transfer test value. Load to the second column in the matrix case
401*35238bceSAndroid Build Coastguard Worker loadedValue = m_loader->load(gl, (glu::isDataTypeMatrix(m_dataType)) ? (valueIndex + 1) : (valueIndex), v);
402*35238bceSAndroid Build Coastguard Worker GLU_EXPECT_NO_ERROR(gl.glGetError(), "default va");
403*35238bceSAndroid Build Coastguard Worker
404*35238bceSAndroid Build Coastguard Worker gl.glUseProgram(m_program->getProgram());
405*35238bceSAndroid Build Coastguard Worker gl.glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
406*35238bceSAndroid Build Coastguard Worker gl.glUseProgram(0);
407*35238bceSAndroid Build Coastguard Worker GLU_EXPECT_NO_ERROR(gl.glGetError(), "draw");
408*35238bceSAndroid Build Coastguard Worker
409*35238bceSAndroid Build Coastguard Worker glu::readPixels(m_context.getRenderContext(), 0, 0, dest.getAccess());
410*35238bceSAndroid Build Coastguard Worker
411*35238bceSAndroid Build Coastguard Worker // check whole result is colored correctly
412*35238bceSAndroid Build Coastguard Worker return verifyUnicoloredBuffer(dest, computeColor(loadedValue));
413*35238bceSAndroid Build Coastguard Worker }
414*35238bceSAndroid Build Coastguard Worker
computeColor(const tcu::Vec4 & value)415*35238bceSAndroid Build Coastguard Worker tcu::Vec4 AttributeCase::computeColor(const tcu::Vec4 &value)
416*35238bceSAndroid Build Coastguard Worker {
417*35238bceSAndroid Build Coastguard Worker const tcu::Vec4 normalizedValue = value / ((m_normalizing) ? (1.0f) : ((float)s_valueRange));
418*35238bceSAndroid Build Coastguard Worker const tcu::Vec4 positiveNormalizedValue =
419*35238bceSAndroid Build Coastguard Worker ((m_useNegativeValues) ? ((normalizedValue + tcu::Vec4(1.0f)) / 2.0f) : (normalizedValue));
420*35238bceSAndroid Build Coastguard Worker const int components = (glu::isDataTypeMatrix(m_dataType)) ? (glu::getDataTypeMatrixNumRows(m_dataType)) :
421*35238bceSAndroid Build Coastguard Worker (glu::getDataTypeScalarSize(m_dataType));
422*35238bceSAndroid Build Coastguard Worker
423*35238bceSAndroid Build Coastguard Worker if (components == 1)
424*35238bceSAndroid Build Coastguard Worker return tcu::Vec4(positiveNormalizedValue.x(), 0.0f, 0.0f, 1.0f);
425*35238bceSAndroid Build Coastguard Worker else if (components == 2)
426*35238bceSAndroid Build Coastguard Worker return tcu::Vec4(positiveNormalizedValue.x(), positiveNormalizedValue.y(), 0.0f, 1.0f);
427*35238bceSAndroid Build Coastguard Worker else if (components == 3)
428*35238bceSAndroid Build Coastguard Worker return tcu::Vec4(positiveNormalizedValue.x(), positiveNormalizedValue.y(), positiveNormalizedValue.z(), 1.0f);
429*35238bceSAndroid Build Coastguard Worker else if (components == 4)
430*35238bceSAndroid Build Coastguard Worker return tcu::Vec4((positiveNormalizedValue.x() + positiveNormalizedValue.z()) / 2.0f,
431*35238bceSAndroid Build Coastguard Worker (positiveNormalizedValue.y() + positiveNormalizedValue.z()) / 2.0f,
432*35238bceSAndroid Build Coastguard Worker positiveNormalizedValue.w(), 1.0f);
433*35238bceSAndroid Build Coastguard Worker else
434*35238bceSAndroid Build Coastguard Worker DE_ASSERT(false);
435*35238bceSAndroid Build Coastguard Worker
436*35238bceSAndroid Build Coastguard Worker return tcu::Vec4(0.0f, 0.0f, 0.0f, 0.0f);
437*35238bceSAndroid Build Coastguard Worker }
438*35238bceSAndroid Build Coastguard Worker
verifyUnicoloredBuffer(const tcu::Surface & scene,const tcu::Vec4 & refValue)439*35238bceSAndroid Build Coastguard Worker bool AttributeCase::verifyUnicoloredBuffer(const tcu::Surface &scene, const tcu::Vec4 &refValue)
440*35238bceSAndroid Build Coastguard Worker {
441*35238bceSAndroid Build Coastguard Worker tcu::Surface errorMask(RENDER_SIZE, RENDER_SIZE);
442*35238bceSAndroid Build Coastguard Worker const tcu::RGBA refColor(refValue);
443*35238bceSAndroid Build Coastguard Worker const int resultThreshold = 2;
444*35238bceSAndroid Build Coastguard Worker const tcu::RGBA colorThreshold = m_context.getRenderTarget().getPixelFormat().getColorThreshold() * resultThreshold;
445*35238bceSAndroid Build Coastguard Worker bool error = false;
446*35238bceSAndroid Build Coastguard Worker
447*35238bceSAndroid Build Coastguard Worker tcu::RGBA exampleColor;
448*35238bceSAndroid Build Coastguard Worker tcu::IVec2 examplePos;
449*35238bceSAndroid Build Coastguard Worker
450*35238bceSAndroid Build Coastguard Worker tcu::clear(errorMask.getAccess(), tcu::RGBA::green().toIVec());
451*35238bceSAndroid Build Coastguard Worker
452*35238bceSAndroid Build Coastguard Worker m_testCtx.getLog() << tcu::TestLog::Message << "Verifying rendered image. Expecting color " << refColor
453*35238bceSAndroid Build Coastguard Worker << ", threshold " << colorThreshold << tcu::TestLog::EndMessage;
454*35238bceSAndroid Build Coastguard Worker
455*35238bceSAndroid Build Coastguard Worker for (int y = 0; y < RENDER_SIZE; ++y)
456*35238bceSAndroid Build Coastguard Worker for (int x = 0; x < RENDER_SIZE; ++x)
457*35238bceSAndroid Build Coastguard Worker {
458*35238bceSAndroid Build Coastguard Worker const tcu::RGBA color = scene.getPixel(x, y);
459*35238bceSAndroid Build Coastguard Worker
460*35238bceSAndroid Build Coastguard Worker if (de::abs(color.getRed() - refColor.getRed()) > colorThreshold.getRed() ||
461*35238bceSAndroid Build Coastguard Worker de::abs(color.getGreen() - refColor.getGreen()) > colorThreshold.getGreen() ||
462*35238bceSAndroid Build Coastguard Worker de::abs(color.getBlue() - refColor.getBlue()) > colorThreshold.getBlue())
463*35238bceSAndroid Build Coastguard Worker {
464*35238bceSAndroid Build Coastguard Worker // first error
465*35238bceSAndroid Build Coastguard Worker if (!error)
466*35238bceSAndroid Build Coastguard Worker {
467*35238bceSAndroid Build Coastguard Worker exampleColor = color;
468*35238bceSAndroid Build Coastguard Worker examplePos = tcu::IVec2(x, y);
469*35238bceSAndroid Build Coastguard Worker }
470*35238bceSAndroid Build Coastguard Worker
471*35238bceSAndroid Build Coastguard Worker error = true;
472*35238bceSAndroid Build Coastguard Worker errorMask.setPixel(x, y, tcu::RGBA::red());
473*35238bceSAndroid Build Coastguard Worker }
474*35238bceSAndroid Build Coastguard Worker }
475*35238bceSAndroid Build Coastguard Worker
476*35238bceSAndroid Build Coastguard Worker if (!error)
477*35238bceSAndroid Build Coastguard Worker m_testCtx.getLog() << tcu::TestLog::Message << "Rendered image is valid." << tcu::TestLog::EndMessage;
478*35238bceSAndroid Build Coastguard Worker else
479*35238bceSAndroid Build Coastguard Worker {
480*35238bceSAndroid Build Coastguard Worker m_testCtx.getLog() << tcu::TestLog::Message << "Found invalid pixel(s).\n"
481*35238bceSAndroid Build Coastguard Worker << "Pixel at (" << examplePos.x() << ", " << examplePos.y() << ") color: " << exampleColor
482*35238bceSAndroid Build Coastguard Worker << tcu::TestLog::EndMessage << tcu::TestLog::ImageSet("Result", "Render result")
483*35238bceSAndroid Build Coastguard Worker << tcu::TestLog::Image("Result", "Result", scene)
484*35238bceSAndroid Build Coastguard Worker << tcu::TestLog::Image("ErrorMask", "Error Mask", errorMask) << tcu::TestLog::EndImageSet;
485*35238bceSAndroid Build Coastguard Worker }
486*35238bceSAndroid Build Coastguard Worker
487*35238bceSAndroid Build Coastguard Worker return !error;
488*35238bceSAndroid Build Coastguard Worker }
489*35238bceSAndroid Build Coastguard Worker
490*35238bceSAndroid Build Coastguard Worker } // namespace
491*35238bceSAndroid Build Coastguard Worker
DefaultVertexAttributeTests(Context & context)492*35238bceSAndroid Build Coastguard Worker DefaultVertexAttributeTests::DefaultVertexAttributeTests(Context &context)
493*35238bceSAndroid Build Coastguard Worker : TestCaseGroup(context, "default_vertex_attrib", "Test default vertex attributes")
494*35238bceSAndroid Build Coastguard Worker {
495*35238bceSAndroid Build Coastguard Worker }
496*35238bceSAndroid Build Coastguard Worker
~DefaultVertexAttributeTests(void)497*35238bceSAndroid Build Coastguard Worker DefaultVertexAttributeTests::~DefaultVertexAttributeTests(void)
498*35238bceSAndroid Build Coastguard Worker {
499*35238bceSAndroid Build Coastguard Worker }
500*35238bceSAndroid Build Coastguard Worker
init(void)501*35238bceSAndroid Build Coastguard Worker void DefaultVertexAttributeTests::init(void)
502*35238bceSAndroid Build Coastguard Worker {
503*35238bceSAndroid Build Coastguard Worker struct Target
504*35238bceSAndroid Build Coastguard Worker {
505*35238bceSAndroid Build Coastguard Worker const char *name;
506*35238bceSAndroid Build Coastguard Worker glu::DataType dataType;
507*35238bceSAndroid Build Coastguard Worker bool reducedTestSets; // !< use reduced coverage
508*35238bceSAndroid Build Coastguard Worker };
509*35238bceSAndroid Build Coastguard Worker
510*35238bceSAndroid Build Coastguard Worker static const Target floatTargets[] = {
511*35238bceSAndroid Build Coastguard Worker {"float", glu::TYPE_FLOAT, false}, {"vec2", glu::TYPE_FLOAT_VEC2, true},
512*35238bceSAndroid Build Coastguard Worker {"vec3", glu::TYPE_FLOAT_VEC3, true}, {"vec4", glu::TYPE_FLOAT_VEC4, false},
513*35238bceSAndroid Build Coastguard Worker {"mat2", glu::TYPE_FLOAT_MAT2, true}, {"mat3", glu::TYPE_FLOAT_MAT3, true},
514*35238bceSAndroid Build Coastguard Worker {"mat4", glu::TYPE_FLOAT_MAT4, false},
515*35238bceSAndroid Build Coastguard Worker };
516*35238bceSAndroid Build Coastguard Worker
517*35238bceSAndroid Build Coastguard Worker // float targets
518*35238bceSAndroid Build Coastguard Worker
519*35238bceSAndroid Build Coastguard Worker for (int targetNdx = 0; targetNdx < DE_LENGTH_OF_ARRAY(floatTargets); ++targetNdx)
520*35238bceSAndroid Build Coastguard Worker {
521*35238bceSAndroid Build Coastguard Worker tcu::TestCaseGroup *const group =
522*35238bceSAndroid Build Coastguard Worker new tcu::TestCaseGroup(m_testCtx, floatTargets[targetNdx].name,
523*35238bceSAndroid Build Coastguard Worker (std::string("test with ") + floatTargets[targetNdx].name).c_str());
524*35238bceSAndroid Build Coastguard Worker const bool fullSet = !floatTargets[targetNdx].reducedTestSets;
525*35238bceSAndroid Build Coastguard Worker
526*35238bceSAndroid Build Coastguard Worker #define ADD_CASE(X) group->addChild(AttributeCase::create<X>(m_context, floatTargets[targetNdx].dataType))
527*35238bceSAndroid Build Coastguard Worker #define ADD_REDUCED_CASE(X) \
528*35238bceSAndroid Build Coastguard Worker if (fullSet) \
529*35238bceSAndroid Build Coastguard Worker ADD_CASE(X)
530*35238bceSAndroid Build Coastguard Worker
531*35238bceSAndroid Build Coastguard Worker ADD_CASE(LoaderVertexAttrib1f);
532*35238bceSAndroid Build Coastguard Worker ADD_REDUCED_CASE(LoaderVertexAttrib2f);
533*35238bceSAndroid Build Coastguard Worker ADD_REDUCED_CASE(LoaderVertexAttrib3f);
534*35238bceSAndroid Build Coastguard Worker ADD_CASE(LoaderVertexAttrib4f);
535*35238bceSAndroid Build Coastguard Worker
536*35238bceSAndroid Build Coastguard Worker ADD_CASE(LoaderVertexAttrib1fv);
537*35238bceSAndroid Build Coastguard Worker ADD_REDUCED_CASE(LoaderVertexAttrib2fv);
538*35238bceSAndroid Build Coastguard Worker ADD_REDUCED_CASE(LoaderVertexAttrib3fv);
539*35238bceSAndroid Build Coastguard Worker ADD_CASE(LoaderVertexAttrib4fv);
540*35238bceSAndroid Build Coastguard Worker
541*35238bceSAndroid Build Coastguard Worker #undef ADD_CASE
542*35238bceSAndroid Build Coastguard Worker #undef ADD_REDUCED_CASE
543*35238bceSAndroid Build Coastguard Worker
544*35238bceSAndroid Build Coastguard Worker addChild(group);
545*35238bceSAndroid Build Coastguard Worker }
546*35238bceSAndroid Build Coastguard Worker }
547*35238bceSAndroid Build Coastguard Worker
548*35238bceSAndroid Build Coastguard Worker } // namespace Functional
549*35238bceSAndroid Build Coastguard Worker } // namespace gles2
550*35238bceSAndroid Build Coastguard Worker } // namespace deqp
551