13c827367444ee418f129b2c238299f49d3264554Jarkko Poyry/*-------------------------------------------------------------------------
23c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * drawElements Quality Program OpenGL ES 2.0 Module
33c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * -------------------------------------------------
43c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *
53c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Copyright 2014 The Android Open Source Project
63c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *
73c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Licensed under the Apache License, Version 2.0 (the "License");
83c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * you may not use this file except in compliance with the License.
93c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * You may obtain a copy of the License at
103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *
113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *      http://www.apache.org/licenses/LICENSE-2.0
123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *
133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Unless required by applicable law or agreed to in writing, software
143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * distributed under the License is distributed on an "AS IS" BASIS,
153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * See the License for the specific language governing permissions and
173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * limitations under the License.
183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *
193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *//*!
203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * \file
213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * \brief Vertex array and buffer tests
223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *//*--------------------------------------------------------------------*/
233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "es2fVertexArrayTest.hpp"
253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "glsVertexArrayTests.hpp"
263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "glwEnums.hpp"
283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
293c827367444ee418f129b2c238299f49d3264554Jarkko Poyryusing namespace deqp::gls;
303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
313c827367444ee418f129b2c238299f49d3264554Jarkko Poyrynamespace deqp
323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
333c827367444ee418f129b2c238299f49d3264554Jarkko Poyrynamespace gles2
343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
353c827367444ee418f129b2c238299f49d3264554Jarkko Poyrynamespace Functional
363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
383c827367444ee418f129b2c238299f49d3264554Jarkko Poyrytemplate<class T>
393c827367444ee418f129b2c238299f49d3264554Jarkko Poyrystatic std::string typeToString (T t)
403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	std::stringstream strm;
423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	strm << t;
433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	return strm.str();
443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
473c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass SingleVertexArrayUsageTests : public TestCaseGroup
483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
493c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic:
503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry									SingleVertexArrayUsageTests		(Context& context);
513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual							~SingleVertexArrayUsageTests	(void);
523c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual void					init							(void);
543c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
553c827367444ee418f129b2c238299f49d3264554Jarkko Poyryprivate:
563c827367444ee418f129b2c238299f49d3264554Jarkko Poyry									SingleVertexArrayUsageTests		(const SingleVertexArrayUsageTests& other);
573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	SingleVertexArrayUsageTests&	operator=						(const SingleVertexArrayUsageTests& other);
583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry};
593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
603c827367444ee418f129b2c238299f49d3264554Jarkko PoyrySingleVertexArrayUsageTests::SingleVertexArrayUsageTests (Context& context)
613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	: TestCaseGroup(context, "usages", "Single vertex atribute, usage")
623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
643c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
653c827367444ee418f129b2c238299f49d3264554Jarkko PoyrySingleVertexArrayUsageTests::~SingleVertexArrayUsageTests (void)
663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
693c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid SingleVertexArrayUsageTests::init (void)
703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	// Test usage
723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	Array::Usage		usages[]		= {Array::USAGE_STATIC_DRAW, Array::USAGE_STREAM_DRAW, Array::USAGE_DYNAMIC_DRAW};
733c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	int					counts[]		= {1, 256};
743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	int					strides[]		= {0, -1, 17, 32}; // Tread negative value as sizeof input. Same as 0, but done outside of GL.
753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	Array::InputType	inputTypes[]	= {Array::INPUTTYPE_FLOAT, Array::INPUTTYPE_FIXED, Array::INPUTTYPE_SHORT, Array::INPUTTYPE_BYTE};
763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	for (int inputTypeNdx = 0; inputTypeNdx < DE_LENGTH_OF_ARRAY(inputTypes); inputTypeNdx++)
783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		for (int countNdx = 0; countNdx < DE_LENGTH_OF_ARRAY(counts); countNdx++)
803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		{
813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			for (int strideNdx = 0; strideNdx < DE_LENGTH_OF_ARRAY(strides); strideNdx++)
823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			{
833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry				for (int usageNdx = 0; usageNdx < DE_LENGTH_OF_ARRAY(usages); usageNdx++)
843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry				{
853c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					const int	componentCount	= 2;
863c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					const int	stride			= (strides[strideNdx] < 0 ? Array::inputTypeSize(inputTypes[inputTypeNdx]) * componentCount : strides[strideNdx]);
873c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					const bool	aligned			= (stride % Array::inputTypeSize(inputTypes[inputTypeNdx])) == 0;
883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					MultiVertexArrayTest::Spec::ArraySpec arraySpec(inputTypes[inputTypeNdx],
893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	Array::OUTPUTTYPE_VEC2,
903c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	Array::STORAGE_BUFFER,
913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	usages[usageNdx],
923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	componentCount,
933c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	0,
943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	stride,
953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	false,
963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	GLValue::getMinValue(inputTypes[inputTypeNdx]),
973c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	GLValue::getMaxValue(inputTypes[inputTypeNdx]));
983c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
993c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					MultiVertexArrayTest::Spec spec;
1003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					spec.primitive	= Array::PRIMITIVE_TRIANGLES;
1013c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					spec.drawCount	= counts[countNdx];
1023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					spec.first		= 0;
1033c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					spec.arrays.push_back(arraySpec);
1043c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1053c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					std::string name = spec.getName();
1063c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1073c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					if (aligned)
1083c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						addChild(new MultiVertexArrayTest(m_testCtx, m_context.getRenderContext(), spec, name.c_str(), name.c_str()));
1093c827367444ee418f129b2c238299f49d3264554Jarkko Poyry				}
1103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			}
1113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		}
1123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	}
1133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
1143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1153c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass SingleVertexArrayStrideTests : public TestCaseGroup
1163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
1173c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic:
1183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry									SingleVertexArrayStrideTests	(Context& context);
1193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual							~SingleVertexArrayStrideTests	(void);
1203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual void					init							(void);
1223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1233c827367444ee418f129b2c238299f49d3264554Jarkko Poyryprivate:
1243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry									SingleVertexArrayStrideTests	(const SingleVertexArrayStrideTests& other);
1253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	SingleVertexArrayStrideTests&	operator=						(const SingleVertexArrayStrideTests& other);
1263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry};
1273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1283c827367444ee418f129b2c238299f49d3264554Jarkko PoyrySingleVertexArrayStrideTests::SingleVertexArrayStrideTests (Context& context)
1293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	: TestCaseGroup(context, "strides", "Single stride vertex atribute")
1303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
1313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
1323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1333c827367444ee418f129b2c238299f49d3264554Jarkko PoyrySingleVertexArrayStrideTests::~SingleVertexArrayStrideTests (void)
1343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
1353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
1363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1373c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid SingleVertexArrayStrideTests::init (void)
1383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
1393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	// Test strides with different input types, component counts and storage, Usage(?)
1403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	Array::InputType	inputTypes[]	= {Array::INPUTTYPE_FLOAT, Array::INPUTTYPE_SHORT, Array::INPUTTYPE_BYTE, /*Array::INPUTTYPE_UNSIGNED_SHORT, Array::INPUTTYPE_UNSIGNED_BYTE,*/ Array::INPUTTYPE_FIXED};
1413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	Array::Storage		storages[]		= {Array::STORAGE_USER, Array::STORAGE_BUFFER};
1423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	int					counts[]		= {1, 256};
1433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	int					strides[]		= {/*0,*/ -1, 17, 32}; // Tread negative value as sizeof input. Same as 0, but done outside of GL.
1443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	for (int inputTypeNdx = 0; inputTypeNdx < DE_LENGTH_OF_ARRAY(inputTypes); inputTypeNdx++)
1463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
1473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		for (int storageNdx = 0; storageNdx < DE_LENGTH_OF_ARRAY(storages); storageNdx++)
1483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		{
1493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			for (int componentCount = 2; componentCount < 5; componentCount++)
1503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			{
1513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry				for (int countNdx = 0; countNdx < DE_LENGTH_OF_ARRAY(counts); countNdx++)
1523c827367444ee418f129b2c238299f49d3264554Jarkko Poyry				{
1533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					for (int strideNdx = 0; strideNdx < DE_LENGTH_OF_ARRAY(strides); strideNdx++)
1543c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					{
1553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						const int	stride			= (strides[strideNdx] < 0 ? Array::inputTypeSize(inputTypes[inputTypeNdx]) * componentCount : strides[strideNdx]);
1563c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						const bool	bufferAligned	= (storages[storageNdx] == Array::STORAGE_BUFFER) && (stride % Array::inputTypeSize(inputTypes[inputTypeNdx])) == 0;
1573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						MultiVertexArrayTest::Spec::ArraySpec arraySpec(inputTypes[inputTypeNdx],
1593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		Array::OUTPUTTYPE_VEC4,
1603c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		storages[storageNdx],
1613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		Array::USAGE_DYNAMIC_DRAW,
1623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		componentCount,
1633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		0,
1643c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		stride,
1653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		false,
1663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		GLValue::getMinValue(inputTypes[inputTypeNdx]),
1673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		GLValue::getMaxValue(inputTypes[inputTypeNdx]));
1683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						MultiVertexArrayTest::Spec spec;
1703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						spec.primitive	= Array::PRIMITIVE_TRIANGLES;
1713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						spec.drawCount	= counts[countNdx];
1723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						spec.first		= 0;
1733c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						spec.arrays.push_back(arraySpec);
1743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						std::string name = spec.getName();
1763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						if (bufferAligned)
1773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry							addChild(new MultiVertexArrayTest(m_testCtx, m_context.getRenderContext(), spec, name.c_str(), name.c_str()));
1783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					}
1793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry				}
1803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			}
1813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		}
1823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	}
1833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
1843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1853c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass SingleVertexArrayFirstTests : public TestCaseGroup
1863c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
1873c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic:
1883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry									SingleVertexArrayFirstTests	(Context& context);
1893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual							~SingleVertexArrayFirstTests	(void);
1903c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual void					init							(void);
1923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1933c827367444ee418f129b2c238299f49d3264554Jarkko Poyryprivate:
1943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry									SingleVertexArrayFirstTests	(const SingleVertexArrayFirstTests& other);
1953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	SingleVertexArrayFirstTests&	operator=						(const SingleVertexArrayFirstTests& other);
1963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry};
1973c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1983c827367444ee418f129b2c238299f49d3264554Jarkko PoyrySingleVertexArrayFirstTests::SingleVertexArrayFirstTests (Context& context)
1993c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	: TestCaseGroup(context, "first", "Single vertex atribute different first values")
2003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
2013c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
2023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
2033c827367444ee418f129b2c238299f49d3264554Jarkko PoyrySingleVertexArrayFirstTests::~SingleVertexArrayFirstTests (void)
2043c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
2053c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
2063c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
2073c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid SingleVertexArrayFirstTests::init (void)
2083c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
2093c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	// Test strides with different input types, component counts and storage, Usage(?)
2103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	Array::InputType	inputTypes[]	= {Array::INPUTTYPE_FLOAT, Array::INPUTTYPE_BYTE, Array::INPUTTYPE_FIXED};
2113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	int					counts[]		= {5, 256};
2123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	int					firsts[]		= {6, 24};
2133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	int					offsets[]		= {1, 16, 17};
2143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	int					strides[]		= {/*0,*/ -1, 17, 32}; // Tread negative value as sizeof input. Same as 0, but done outside of GL.
2153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
2163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	for (int inputTypeNdx = 0; inputTypeNdx < DE_LENGTH_OF_ARRAY(inputTypes); inputTypeNdx++)
2173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
2183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		for (int offsetNdx = 0; offsetNdx < DE_LENGTH_OF_ARRAY(offsets); offsetNdx++)
2193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		{
2203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			for (int countNdx = 0; countNdx < DE_LENGTH_OF_ARRAY(counts); countNdx++)
2213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			{
2223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry				for (int strideNdx = 0; strideNdx < DE_LENGTH_OF_ARRAY(strides); strideNdx++)
2233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry				{
2243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					for (int firstNdx = 0; firstNdx < DE_LENGTH_OF_ARRAY(firsts); firstNdx++)
2253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					{
2263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						const int	stride	= (strides[strideNdx] < 0 ? Array::inputTypeSize(inputTypes[inputTypeNdx]) * 2 : strides[strideNdx]);
2273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						const bool	aligned	= ((stride % Array::inputTypeSize(inputTypes[inputTypeNdx])) == 0) && (offsets[offsetNdx] % Array::inputTypeSize(inputTypes[inputTypeNdx]) == 0);
2283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
2293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						MultiVertexArrayTest::Spec::ArraySpec arraySpec(inputTypes[inputTypeNdx],
2303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		Array::OUTPUTTYPE_VEC2,
2313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		Array::STORAGE_BUFFER,
2323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		Array::USAGE_DYNAMIC_DRAW,
2333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		2,
2343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		offsets[offsetNdx],
2353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		stride,
2363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		false,
2373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		GLValue::getMinValue(inputTypes[inputTypeNdx]),
2383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		GLValue::getMaxValue(inputTypes[inputTypeNdx]));
2393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
2403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						MultiVertexArrayTest::Spec spec;
2413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						spec.primitive	= Array::PRIMITIVE_TRIANGLES;
2423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						spec.drawCount	= counts[countNdx];
2433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						spec.first		= firsts[firstNdx];
2443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						spec.arrays.push_back(arraySpec);
2453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
2463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						std::string name = Array::inputTypeToString(inputTypes[inputTypeNdx]) + "_first" + typeToString(firsts[firstNdx]) + "_offset" + typeToString(offsets[offsetNdx]) + "_stride" + typeToString(stride) + "_quads" + typeToString(counts[countNdx]);
2473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						if (aligned)
2483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry							addChild(new MultiVertexArrayTest(m_testCtx, m_context.getRenderContext(), spec, name.c_str(), name.c_str()));
2493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					}
2503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry				}
2513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			}
2523c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		}
2533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	}
2543c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
2553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
2563c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass SingleVertexArrayOffsetTests : public TestCaseGroup
2573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
2583c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic:
2593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry									SingleVertexArrayOffsetTests	(Context& context);
2603c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual							~SingleVertexArrayOffsetTests	(void);
2613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
2623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual void					init							(void);
2633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
2643c827367444ee418f129b2c238299f49d3264554Jarkko Poyryprivate:
2653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry									SingleVertexArrayOffsetTests	(const SingleVertexArrayOffsetTests& other);
2663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	SingleVertexArrayOffsetTests&	operator=						(const SingleVertexArrayOffsetTests& other);
2673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry};
2683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
2693c827367444ee418f129b2c238299f49d3264554Jarkko PoyrySingleVertexArrayOffsetTests::SingleVertexArrayOffsetTests (Context& context)
2703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	: TestCaseGroup(context, "offset", "Single vertex atribute offset element")
2713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
2723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
2733c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
2743c827367444ee418f129b2c238299f49d3264554Jarkko PoyrySingleVertexArrayOffsetTests::~SingleVertexArrayOffsetTests (void)
2753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
2763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
2773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
2783c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid SingleVertexArrayOffsetTests::init (void)
2793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
2803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	// Test strides with different input types, component counts and storage, Usage(?)
2813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	Array::InputType	inputTypes[]	= {Array::INPUTTYPE_FLOAT, Array::INPUTTYPE_BYTE, Array::INPUTTYPE_FIXED};
2823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	int					counts[]		= {1, 256};
2833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	int					offsets[]		= {1, 4, 17, 32};
2843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	int					strides[]		= {/*0,*/ -1, 17, 32}; // Tread negative value as sizeof input. Same as 0, but done outside of GL.
2853c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
2863c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	for (int inputTypeNdx = 0; inputTypeNdx < DE_LENGTH_OF_ARRAY(inputTypes); inputTypeNdx++)
2873c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
2883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		for (int offsetNdx = 0; offsetNdx < DE_LENGTH_OF_ARRAY(offsets); offsetNdx++)
2893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		{
2903c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			for (int countNdx = 0; countNdx < DE_LENGTH_OF_ARRAY(counts); countNdx++)
2913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			{
2923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry				for (int strideNdx = 0; strideNdx < DE_LENGTH_OF_ARRAY(strides); strideNdx++)
2933c827367444ee418f129b2c238299f49d3264554Jarkko Poyry				{
2943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					const int	stride	= (strides[strideNdx] < 0 ? Array::inputTypeSize(inputTypes[inputTypeNdx]) * 2 : strides[strideNdx]);
2953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					const bool	aligned	= ((stride % Array::inputTypeSize(inputTypes[inputTypeNdx])) == 0) && ((offsets[offsetNdx] % Array::inputTypeSize(inputTypes[inputTypeNdx])) == 0);
2963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
2973c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					MultiVertexArrayTest::Spec::ArraySpec arraySpec(inputTypes[inputTypeNdx],
2983c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	Array::OUTPUTTYPE_VEC2,
2993c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	Array::STORAGE_BUFFER,
3003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	Array::USAGE_DYNAMIC_DRAW,
3013c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	2,
3023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	offsets[offsetNdx],
3033c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	stride,
3043c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	false,
3053c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	GLValue::getMinValue(inputTypes[inputTypeNdx]),
3063c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	GLValue::getMaxValue(inputTypes[inputTypeNdx]));
3073c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
3083c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					MultiVertexArrayTest::Spec spec;
3093c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					spec.primitive	= Array::PRIMITIVE_TRIANGLES;
3103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					spec.drawCount	= counts[countNdx];
3113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					spec.first		= 0;
3123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					spec.arrays.push_back(arraySpec);
3133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
3143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					std::string name = spec.getName();
3153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					if (aligned)
3163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						addChild(new MultiVertexArrayTest(m_testCtx, m_context.getRenderContext(), spec, name.c_str(), name.c_str()));
3173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry				}
3183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			}
3193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		}
3203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	}
3213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
3223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
3233c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass SingleVertexArrayNormalizeTests : public TestCaseGroup
3243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
3253c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic:
3263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry										SingleVertexArrayNormalizeTests		(Context& context);
3273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual								~SingleVertexArrayNormalizeTests	(void);
3283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
3293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual void						init								(void);
3303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
3313c827367444ee418f129b2c238299f49d3264554Jarkko Poyryprivate:
3323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry										SingleVertexArrayNormalizeTests		(const SingleVertexArrayNormalizeTests& other);
3333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	SingleVertexArrayNormalizeTests&	operator=							(const SingleVertexArrayNormalizeTests& other);
3343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry};
3353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
3363c827367444ee418f129b2c238299f49d3264554Jarkko PoyrySingleVertexArrayNormalizeTests::SingleVertexArrayNormalizeTests (Context& context)
3373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	: TestCaseGroup(context, "normalize", "Single normalize vertex atribute")
3383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
3393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
3403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
3413c827367444ee418f129b2c238299f49d3264554Jarkko PoyrySingleVertexArrayNormalizeTests::~SingleVertexArrayNormalizeTests (void)
3423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
3433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
3443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
3453c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid SingleVertexArrayNormalizeTests::init (void)
3463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
3473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	// Test normalization with different input types, component counts and storage
3483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	Array::InputType	inputTypes[]	= {Array::INPUTTYPE_FLOAT, Array::INPUTTYPE_SHORT, Array::INPUTTYPE_BYTE, Array::INPUTTYPE_UNSIGNED_SHORT, Array::INPUTTYPE_UNSIGNED_BYTE, Array::INPUTTYPE_FIXED};
3493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	Array::Storage		storages[]		= {Array::STORAGE_USER};
3503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	int					counts[]		= {1, 256};
3513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
3523c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	for (int inputTypeNdx = 0; inputTypeNdx < DE_LENGTH_OF_ARRAY(inputTypes); inputTypeNdx++)
3533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
3543c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		for (int storageNdx = 0; storageNdx < DE_LENGTH_OF_ARRAY(storages); storageNdx++)
3553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		{
3563c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			for (int componentCount = 2; componentCount < 5; componentCount++)
3573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			{
3583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry				for (int countNdx = 0; countNdx < DE_LENGTH_OF_ARRAY(counts); countNdx++)
3593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry				{
3603c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					MultiVertexArrayTest::Spec::ArraySpec arraySpec(inputTypes[inputTypeNdx],
3613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	Array::OUTPUTTYPE_VEC4,
3623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	storages[storageNdx],
3633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	Array::USAGE_DYNAMIC_DRAW,
3643c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	componentCount,
3653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	0,
3663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	0,
3673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	true,
3683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	GLValue::getMinValue(inputTypes[inputTypeNdx]),
3693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																	GLValue::getMaxValue(inputTypes[inputTypeNdx]));
3703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
3713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					MultiVertexArrayTest::Spec spec;
3723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					spec.primitive	= Array::PRIMITIVE_TRIANGLES;
3733c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					spec.drawCount	= counts[countNdx];
3743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					spec.first		= 0;
3753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					spec.arrays.push_back(arraySpec);
3763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
3773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					std::string name = spec.getName();
3783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					addChild(new MultiVertexArrayTest(m_testCtx, m_context.getRenderContext(), spec, name.c_str(), name.c_str()));
3793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry				}
3803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			}
3813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		}
3823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	}
3833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
3843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
3853c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass SingleVertexArrayOutputTypeTests : public TestCaseGroup
3863c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
3873c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic:
3883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry											SingleVertexArrayOutputTypeTests	(Context& context);
3893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual									~SingleVertexArrayOutputTypeTests	(void);
3903c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
3913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual void							init									(void);
3923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
3933c827367444ee418f129b2c238299f49d3264554Jarkko Poyryprivate:
3943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry											SingleVertexArrayOutputTypeTests	(const SingleVertexArrayOutputTypeTests& other);
3953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	SingleVertexArrayOutputTypeTests&	operator=								(const SingleVertexArrayOutputTypeTests& other);
3963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry};
3973c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
3983c827367444ee418f129b2c238299f49d3264554Jarkko PoyrySingleVertexArrayOutputTypeTests::SingleVertexArrayOutputTypeTests (Context& context)
3993c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	: TestCaseGroup(context, "output_types", "Single output type vertex atribute")
4003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
4013c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
4023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
4033c827367444ee418f129b2c238299f49d3264554Jarkko PoyrySingleVertexArrayOutputTypeTests::~SingleVertexArrayOutputTypeTests (void)
4043c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
4053c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
4063c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
4073c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid SingleVertexArrayOutputTypeTests::init (void)
4083c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
4093c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	// Test output types with different input types, component counts and storage, Usage?, Precision?, float?
4103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	Array::InputType	inputTypes[]	= {Array::INPUTTYPE_FLOAT, Array::INPUTTYPE_SHORT, Array::INPUTTYPE_BYTE, Array::INPUTTYPE_UNSIGNED_SHORT, Array::INPUTTYPE_UNSIGNED_BYTE, Array::INPUTTYPE_FIXED};
4113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	Array::OutputType	outputTypes[]	= {Array::OUTPUTTYPE_VEC2, Array::OUTPUTTYPE_VEC3, Array::OUTPUTTYPE_VEC4};
4123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	Array::Storage		storages[]		= {Array::STORAGE_USER};
4133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	int					counts[]		= {1, 256};
4143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
4153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	for (int inputTypeNdx = 0; inputTypeNdx < DE_LENGTH_OF_ARRAY(inputTypes); inputTypeNdx++)
4163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
4173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		for (int outputTypeNdx = 0; outputTypeNdx < DE_LENGTH_OF_ARRAY(outputTypes); outputTypeNdx++)
4183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		{
4193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			for (int storageNdx = 0; storageNdx < DE_LENGTH_OF_ARRAY(storages); storageNdx++)
4203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			{
4213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry				for (int componentCount = 2; componentCount < 5; componentCount++)
4223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry				{
4233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					for (int countNdx = 0; countNdx < DE_LENGTH_OF_ARRAY(counts); countNdx++)
4243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					{
4253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						MultiVertexArrayTest::Spec::ArraySpec arraySpec(inputTypes[inputTypeNdx],
4263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		outputTypes[outputTypeNdx],
4273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		storages[storageNdx],
4283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		Array::USAGE_DYNAMIC_DRAW,
4293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		componentCount,
4303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		0,
4313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		0,
4323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		false,
4333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		GLValue::getMinValue(inputTypes[inputTypeNdx]),
4343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry																		GLValue::getMaxValue(inputTypes[inputTypeNdx]));
4353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
4363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						MultiVertexArrayTest::Spec spec;
4373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						spec.primitive	= Array::PRIMITIVE_TRIANGLES;
4383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						spec.drawCount	= counts[countNdx];
4393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						spec.first		= 0;
4403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						spec.arrays.push_back(arraySpec);
4413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
4423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						std::string name = spec.getName();
4433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry						addChild(new MultiVertexArrayTest(m_testCtx, m_context.getRenderContext(), spec, name.c_str(), name.c_str()));
4443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry					}
4453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry				}
4463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			}
4473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		}
4483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	}
4493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
4503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
4513c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass SingleVertexArrayTestGroup : public TestCaseGroup
4523c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
4533c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic:
4543c827367444ee418f129b2c238299f49d3264554Jarkko Poyry									SingleVertexArrayTestGroup	(Context& context);
4553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual							~SingleVertexArrayTestGroup	(void);
4563c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
4573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual void					init						(void);
4583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
4593c827367444ee418f129b2c238299f49d3264554Jarkko Poyryprivate:
4603c827367444ee418f129b2c238299f49d3264554Jarkko Poyry									SingleVertexArrayTestGroup	(const SingleVertexArrayTestGroup& other);
4613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	SingleVertexArrayTestGroup&		operator=					(const SingleVertexArrayTestGroup& other);
4623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry};
4633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
4643c827367444ee418f129b2c238299f49d3264554Jarkko PoyrySingleVertexArrayTestGroup::SingleVertexArrayTestGroup (Context& context)
4653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	: TestCaseGroup(context, "single_attribute", "Single vertex atribute")
4663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
4673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
4683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
4693c827367444ee418f129b2c238299f49d3264554Jarkko PoyrySingleVertexArrayTestGroup::~SingleVertexArrayTestGroup (void)
4703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
4713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
4723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
4733c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid SingleVertexArrayTestGroup::init (void)
4743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
4753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	addChild(new SingleVertexArrayStrideTests(m_context));
4763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	addChild(new SingleVertexArrayNormalizeTests(m_context));
4773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	addChild(new SingleVertexArrayOutputTypeTests(m_context));
4783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	addChild(new SingleVertexArrayUsageTests(m_context));
4793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	addChild(new SingleVertexArrayOffsetTests(m_context));
4803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	addChild(new SingleVertexArrayFirstTests(m_context));
4813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
4823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
4833c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass MultiVertexArrayCountTests : public TestCaseGroup
4843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
4853c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic:
4863c827367444ee418f129b2c238299f49d3264554Jarkko Poyry									MultiVertexArrayCountTests	(Context& context);
4873c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual							~MultiVertexArrayCountTests	(void);
4883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
4893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual void					init						(void);
4903c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
4913c827367444ee418f129b2c238299f49d3264554Jarkko Poyryprivate:
4923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry									MultiVertexArrayCountTests	(const MultiVertexArrayCountTests& other);
4933c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	MultiVertexArrayCountTests&		operator=					(const MultiVertexArrayCountTests& other);
4943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
4953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	std::string						getTestName					(const MultiVertexArrayTest::Spec& spec);
4963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry};
4973c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
4983c827367444ee418f129b2c238299f49d3264554Jarkko PoyryMultiVertexArrayCountTests::MultiVertexArrayCountTests (Context& context)
4993c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	: TestCaseGroup(context, "attribute_count", "Attribute counts")
5003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
5013c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
5023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
5033c827367444ee418f129b2c238299f49d3264554Jarkko PoyryMultiVertexArrayCountTests::~MultiVertexArrayCountTests (void)
5043c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
5053c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
5063c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
5073c827367444ee418f129b2c238299f49d3264554Jarkko Poyrystd::string MultiVertexArrayCountTests::getTestName (const MultiVertexArrayTest::Spec& spec)
5083c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
5093c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	std::stringstream name;
5103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	name
5113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		<< spec.arrays.size();
5123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
5133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	return name.str();
5143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
5153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
5163c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid MultiVertexArrayCountTests::init (void)
5173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
5183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	// Test attribute counts
5193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	int arrayCounts[] = {2, 3, 4, 5, 6, 7, 8};
5203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
5213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	for (int arrayCountNdx = 0; arrayCountNdx < DE_LENGTH_OF_ARRAY(arrayCounts); arrayCountNdx++)
5223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
5233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		MultiVertexArrayTest::Spec spec;
5243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
5253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		spec.primitive	= Array::PRIMITIVE_TRIANGLES;
5263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		spec.drawCount	= 256;
5273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		spec.first		= 0;
5283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
5293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		for (int arrayNdx = 0; arrayNdx < arrayCounts[arrayCountNdx]; arrayNdx++)
5303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		{
5313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			MultiVertexArrayTest::Spec::ArraySpec arraySpec(Array::INPUTTYPE_FLOAT,
5323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry															Array::OUTPUTTYPE_VEC2,
5333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry															Array::STORAGE_USER,
5343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry															Array::USAGE_DYNAMIC_DRAW,
5353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry															2,
5363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry															0,
5373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry															0,
5383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry															false,
5393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry															GLValue::getMinValue(Array::INPUTTYPE_FLOAT),
5403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry															GLValue::getMaxValue(Array::INPUTTYPE_FLOAT));
5413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
5423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			spec.arrays.push_back(arraySpec);
5433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		}
5443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
5453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::string name = getTestName(spec);
5463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::string desc = getTestName(spec);
5473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
5483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		addChild(new MultiVertexArrayTest(m_testCtx, m_context.getRenderContext(), spec, name.c_str(), desc.c_str()));
5493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	}
5503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
5513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
5523c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass MultiVertexArrayStorageTests : public TestCaseGroup
5533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
5543c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic:
5553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry									MultiVertexArrayStorageTests	(Context& context);
5563c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual							~MultiVertexArrayStorageTests	(void);
5573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
5583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual void					init								(void);
5593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
5603c827367444ee418f129b2c238299f49d3264554Jarkko Poyryprivate:
5613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry									MultiVertexArrayStorageTests	(const MultiVertexArrayStorageTests& other);
5623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	MultiVertexArrayStorageTests&	operator=							(const MultiVertexArrayStorageTests& other);
5633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
564653ad0e8a4209754304cbd5b5ceb4fdc7b29c01aPyry Haulos	void							addStorageCases						(MultiVertexArrayTest::Spec spec, int depth);
5653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	std::string						getTestName							(const MultiVertexArrayTest::Spec& spec);
5663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry};
5673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
5683c827367444ee418f129b2c238299f49d3264554Jarkko PoyryMultiVertexArrayStorageTests::MultiVertexArrayStorageTests (Context& context)
5693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	: TestCaseGroup(context, "storage", "Attribute storages")
5703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
5713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
5723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
5733c827367444ee418f129b2c238299f49d3264554Jarkko PoyryMultiVertexArrayStorageTests::~MultiVertexArrayStorageTests (void)
5743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
5753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
5763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
5773c827367444ee418f129b2c238299f49d3264554Jarkko Poyrystd::string MultiVertexArrayStorageTests::getTestName (const MultiVertexArrayTest::Spec& spec)
5783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
5793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	std::stringstream name;
5803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	name
5813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		<< spec.arrays.size();
5823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
5833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	for (int arrayNdx = 0; arrayNdx < (int)spec.arrays.size(); arrayNdx++)
5843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
5853c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		name
5863c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			<< "_"
5873c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			<< Array::storageToString(spec.arrays[arrayNdx].storage);
5883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	}
5893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
5903c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	return name.str();
5913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
5923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
5933c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid MultiVertexArrayStorageTests::addStorageCases (MultiVertexArrayTest::Spec spec, int depth)
5943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
5953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	if (depth == 0)
5963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
5973c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		// Skip trivial case, used elsewhere
5983c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		bool ok = false;
5993c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		for (int arrayNdx = 0; arrayNdx < (int)spec.arrays.size(); arrayNdx++)
6003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		{
6013c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			if (spec.arrays[arrayNdx].storage != Array::STORAGE_USER)
6023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			{
6033c827367444ee418f129b2c238299f49d3264554Jarkko Poyry				ok = true;
6043c827367444ee418f129b2c238299f49d3264554Jarkko Poyry				break;
6053c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			}
6063c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		}
6073c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
6083c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		if (!ok)
6093c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			return;
6103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
6113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::string name = getTestName(spec);
6123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::string desc = getTestName(spec);
6133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
6143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		addChild(new MultiVertexArrayTest(m_testCtx, m_context.getRenderContext(), spec, name.c_str(), desc.c_str()));
6153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		return;
6163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	}
6173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
6183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	Array::Storage storages[] = {Array::STORAGE_USER, Array::STORAGE_BUFFER};
6193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	for (int storageNdx = 0; storageNdx < DE_LENGTH_OF_ARRAY(storages); storageNdx++)
6203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
6213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		MultiVertexArrayTest::Spec::ArraySpec arraySpec(Array::INPUTTYPE_FLOAT,
6223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														Array::OUTPUTTYPE_VEC2,
6233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														storages[storageNdx],
6243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														Array::USAGE_DYNAMIC_DRAW,
6253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														2,
6263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														0,
6273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														0,
6283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														false,
6293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														GLValue::getMinValue(Array::INPUTTYPE_FLOAT),
6303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														GLValue::getMaxValue(Array::INPUTTYPE_FLOAT));
6313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
6323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		MultiVertexArrayTest::Spec _spec = spec;
6333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		_spec.arrays.push_back(arraySpec);
6343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		addStorageCases(_spec, depth-1);
6353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	}
6363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
6373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
6383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
6393c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid MultiVertexArrayStorageTests::init (void)
6403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
6413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	// Test different storages
6423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	int arrayCounts[] = {3};
6433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
6443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	MultiVertexArrayTest::Spec spec;
6453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
6463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	spec.primitive	= Array::PRIMITIVE_TRIANGLES;
6473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	spec.drawCount	= 256;
6483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	spec.first		= 0;
6493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
6503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	for (int arrayCountNdx = 0; arrayCountNdx < DE_LENGTH_OF_ARRAY(arrayCounts); arrayCountNdx++)
6513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		addStorageCases(spec, arrayCounts[arrayCountNdx]);
6523c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
6533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
6543c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass MultiVertexArrayStrideTests : public TestCaseGroup
6553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
6563c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic:
6573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry									MultiVertexArrayStrideTests		(Context& context);
6583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual							~MultiVertexArrayStrideTests	(void);
6593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
6603c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual void					init							(void);
6613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
6623c827367444ee418f129b2c238299f49d3264554Jarkko Poyryprivate:
6633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry									MultiVertexArrayStrideTests		(const MultiVertexArrayStrideTests& other);
6643c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	MultiVertexArrayStrideTests&	operator=						(const MultiVertexArrayStrideTests& other);
6653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
666653ad0e8a4209754304cbd5b5ceb4fdc7b29c01aPyry Haulos	void							addStrideCases					(MultiVertexArrayTest::Spec spec, int depth);
6673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	std::string						getTestName						(const MultiVertexArrayTest::Spec& spec);
6683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry};
6693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
6703c827367444ee418f129b2c238299f49d3264554Jarkko PoyryMultiVertexArrayStrideTests::MultiVertexArrayStrideTests (Context& context)
6713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	: TestCaseGroup(context, "stride", "Strides")
6723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
6733c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
6743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
6753c827367444ee418f129b2c238299f49d3264554Jarkko PoyryMultiVertexArrayStrideTests::~MultiVertexArrayStrideTests (void)
6763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
6773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
6783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
6793c827367444ee418f129b2c238299f49d3264554Jarkko Poyrystd::string MultiVertexArrayStrideTests::getTestName (const MultiVertexArrayTest::Spec& spec)
6803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
6813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	std::stringstream name;
6823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
6833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	name
6843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		<< spec.arrays.size();
6853c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
6863c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	for (int arrayNdx = 0; arrayNdx < (int)spec.arrays.size(); arrayNdx++)
6873c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
6883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		name
6893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			<< "_"
6903c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			<< Array::inputTypeToString(spec.arrays[arrayNdx].inputType)
6913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			<< spec.arrays[arrayNdx].componentCount << "_"
6923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			<< spec.arrays[arrayNdx].stride;
6933c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	}
6943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
6953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	return name.str();
6963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
6973c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
6983c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid MultiVertexArrayStrideTests::init (void)
6993c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
7003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	// Test different strides, with multiple arrays, input types??
7013c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	int arrayCounts[] = {3};
7023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
7033c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	MultiVertexArrayTest::Spec spec;
7043c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
7053c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	spec.primitive	= Array::PRIMITIVE_TRIANGLES;
7063c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	spec.drawCount	= 256;
7073c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	spec.first		= 0;
7083c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
7093c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	for (int arrayCountNdx = 0; arrayCountNdx < DE_LENGTH_OF_ARRAY(arrayCounts); arrayCountNdx++)
7103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		addStrideCases(spec, arrayCounts[arrayCountNdx]);
7113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
7123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
7133c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid MultiVertexArrayStrideTests::addStrideCases (MultiVertexArrayTest::Spec spec, int depth)
7143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
7153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	if (depth == 0)
7163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
7173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::string name = getTestName(spec);
7183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::string desc = getTestName(spec);
7193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		addChild(new MultiVertexArrayTest(m_testCtx, m_context.getRenderContext(), spec, name.c_str(), desc.c_str()));
7203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		return;
7213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	}
7223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
7233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	int strides[]	= {0, -1, 17, 32};
7243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
7253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	for (int strideNdx = 0; strideNdx < DE_LENGTH_OF_ARRAY(strides); strideNdx++)
7263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
7273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		const int componentCount = 2;
7283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		MultiVertexArrayTest::Spec::ArraySpec arraySpec(Array::INPUTTYPE_FLOAT,
7293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														Array::OUTPUTTYPE_VEC2,
7303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														Array::STORAGE_USER,
7313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														Array::USAGE_DYNAMIC_DRAW,
7323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														componentCount,
7333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														0,
7343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														(strides[strideNdx] >= 0 ? strides[strideNdx] : componentCount * Array::inputTypeSize(Array::INPUTTYPE_FLOAT)),
7353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														false,
7363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														GLValue::getMinValue(Array::INPUTTYPE_FLOAT),
7373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														GLValue::getMaxValue(Array::INPUTTYPE_FLOAT));
7383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
7393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		MultiVertexArrayTest::Spec _spec = spec;
7403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		_spec.arrays.push_back(arraySpec);
7413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		addStrideCases(_spec, depth-1);
7423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	}
7433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
7443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
7453c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass MultiVertexArrayOutputTests : public TestCaseGroup
7463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
7473c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic:
7483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry										MultiVertexArrayOutputTests		(Context& context);
7493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual								~MultiVertexArrayOutputTests	(void);
7503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
7513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual void						init								(void);
7523c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
7533c827367444ee418f129b2c238299f49d3264554Jarkko Poyryprivate:
7543c827367444ee418f129b2c238299f49d3264554Jarkko Poyry										MultiVertexArrayOutputTests		(const MultiVertexArrayOutputTests& other);
7553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	MultiVertexArrayOutputTests&	operator=							(const MultiVertexArrayOutputTests& other);
7563c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
757653ad0e8a4209754304cbd5b5ceb4fdc7b29c01aPyry Haulos	void								addInputTypeCases					(MultiVertexArrayTest::Spec spec, int depth);
7583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	std::string							getTestName							(const MultiVertexArrayTest::Spec& spec);
7593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry};
7603c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
7613c827367444ee418f129b2c238299f49d3264554Jarkko PoyryMultiVertexArrayOutputTests::MultiVertexArrayOutputTests (Context& context)
7623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	: TestCaseGroup(context, "input_types", "input types")
7633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
7643c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
7653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
7663c827367444ee418f129b2c238299f49d3264554Jarkko PoyryMultiVertexArrayOutputTests::~MultiVertexArrayOutputTests (void)
7673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
7683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
7693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
7703c827367444ee418f129b2c238299f49d3264554Jarkko Poyrystd::string MultiVertexArrayOutputTests::getTestName (const MultiVertexArrayTest::Spec& spec)
7713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
7723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	std::stringstream name;
7733c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
7743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	name
7753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		<< spec.arrays.size();
7763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
7773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	for (int arrayNdx = 0; arrayNdx < (int)spec.arrays.size(); arrayNdx++)
7783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
7793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		name
7803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			<< "_"
7813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			<< Array::inputTypeToString(spec.arrays[arrayNdx].inputType)
7823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			<< spec.arrays[arrayNdx].componentCount << "_"
7833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			<< Array::outputTypeToString(spec.arrays[arrayNdx].outputType);
7843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	}
7853c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
7863c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	return name.str();
7873c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
7883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
7893c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid MultiVertexArrayOutputTests::init (void)
7903c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
7913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	// Test different input types, with multiple arrays
7923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	int arrayCounts[] = {3};
7933c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
7943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	MultiVertexArrayTest::Spec spec;
7953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
7963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	spec.primitive	= Array::PRIMITIVE_TRIANGLES;
7973c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	spec.drawCount	= 256;
7983c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	spec.first		= 0;
7993c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
8003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	for (int arrayCountNdx = 0; arrayCountNdx < DE_LENGTH_OF_ARRAY(arrayCounts); arrayCountNdx++)
8013c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		addInputTypeCases(spec, arrayCounts[arrayCountNdx]);
8023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
8033c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
8043c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid MultiVertexArrayOutputTests::addInputTypeCases (MultiVertexArrayTest::Spec spec, int depth)
8053c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
8063c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	if (depth == 0)
8073c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
8083c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::string name = getTestName(spec);
8093c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::string desc = getTestName(spec);
8103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		addChild(new MultiVertexArrayTest(m_testCtx, m_context.getRenderContext(), spec, name.c_str(), desc.c_str()));
8113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		return;
8123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	}
8133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
8143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	Array::InputType inputTypes[] = {Array::INPUTTYPE_FIXED, Array::INPUTTYPE_BYTE, Array::INPUTTYPE_SHORT, Array::INPUTTYPE_UNSIGNED_BYTE, Array::INPUTTYPE_UNSIGNED_SHORT};
8153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	for (int inputTypeNdx = 0; inputTypeNdx < DE_LENGTH_OF_ARRAY(inputTypes); inputTypeNdx++)
8163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
8173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		MultiVertexArrayTest::Spec::ArraySpec arraySpec(inputTypes[inputTypeNdx],
8183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														Array::OUTPUTTYPE_VEC2,
8193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														Array::STORAGE_USER,
8203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														Array::USAGE_DYNAMIC_DRAW,
8213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														2,
8223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														0,
8233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														0,
8243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														false,
8253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														GLValue::getMinValue(inputTypes[inputTypeNdx]),
8263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry														GLValue::getMaxValue(inputTypes[inputTypeNdx]));
8273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
8283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		MultiVertexArrayTest::Spec _spec = spec;
8293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		_spec.arrays.push_back(arraySpec);
8303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		addInputTypeCases(_spec, depth-1);
8313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	}
8323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
8333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
8343c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass MultiVertexArrayTestGroup : public TestCaseGroup
8353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
8363c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic:
8373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry									MultiVertexArrayTestGroup	(Context& context);
8383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual							~MultiVertexArrayTestGroup	(void);
8393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
8403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	virtual void					init						(void);
8413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
8423c827367444ee418f129b2c238299f49d3264554Jarkko Poyryprivate:
8433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry									MultiVertexArrayTestGroup	(const MultiVertexArrayTestGroup& other);
8443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	MultiVertexArrayTestGroup&		operator=					(const MultiVertexArrayTestGroup& other);
8453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry};
8463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
8473c827367444ee418f129b2c238299f49d3264554Jarkko PoyryMultiVertexArrayTestGroup::MultiVertexArrayTestGroup (Context& context)
8483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	: TestCaseGroup(context, "multiple_attributes", "Multiple vertex atributes")
8493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
8503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
8513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
8523c827367444ee418f129b2c238299f49d3264554Jarkko PoyryMultiVertexArrayTestGroup::~MultiVertexArrayTestGroup (void)
8533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
8543c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
8553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
8563c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid MultiVertexArrayTestGroup::init (void)
8573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
8583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	addChild(new MultiVertexArrayCountTests(m_context));
8593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	addChild(new MultiVertexArrayStorageTests(m_context));
8603c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	addChild(new MultiVertexArrayStrideTests(m_context));
8613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	addChild(new MultiVertexArrayOutputTests(m_context));
8623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
8633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
8643c827367444ee418f129b2c238299f49d3264554Jarkko PoyryVertexArrayTestGroup::VertexArrayTestGroup (Context& context)
8653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	: TestCaseGroup(context, "vertex_arrays", "Vertex array and array tests")
8663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
8673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
8683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
8693c827367444ee418f129b2c238299f49d3264554Jarkko PoyryVertexArrayTestGroup::~VertexArrayTestGroup (void)
8703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
8713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
8723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
8733c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid VertexArrayTestGroup::init (void)
8743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
8753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	addChild(new SingleVertexArrayTestGroup(m_context));
8763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	addChild(new MultiVertexArrayTestGroup(m_context));
8773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry}
8783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
8793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} // Functional
8803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} // gles2
8813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} // deqp
8823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
883