13c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#ifndef _TEGLSIMPLECONFIGCASE_HPP
23c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#define _TEGLSIMPLECONFIGCASE_HPP
33c827367444ee418f129b2c238299f49d3264554Jarkko Poyry/*-------------------------------------------------------------------------
43c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * drawElements Quality Program EGL Module
53c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * ---------------------------------------
63c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *
73c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Copyright 2014 The Android Open Source Project
83c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *
93c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Licensed under the Apache License, Version 2.0 (the "License");
103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * you may not use this file except in compliance with the License.
113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * You may obtain a copy of the License at
123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *
133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *      http://www.apache.org/licenses/LICENSE-2.0
143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *
153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Unless required by applicable law or agreed to in writing, software
163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * distributed under the License is distributed on an "AS IS" BASIS,
173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * See the License for the specific language governing permissions and
193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * limitations under the License.
203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *
213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *//*!
223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * \file
233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * \brief Simple Context construction test.
243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *//*--------------------------------------------------------------------*/
253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "tcuDefs.hpp"
273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "teglTestCase.hpp"
283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "egluConfigFilter.hpp"
293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include <vector>
313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include <string>
323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
333c827367444ee418f129b2c238299f49d3264554Jarkko Poyrynamespace deqp
343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
353c827367444ee418f129b2c238299f49d3264554Jarkko Poyrynamespace egl
363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
383c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass SimpleConfigCase : public TestCase
393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
403c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic:
413c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos							SimpleConfigCase	(EglTestContext& eglTestCtx, const char* name, const char* description, const eglu::FilterList& filters);
423c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos	virtual					~SimpleConfigCase	(void);
433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
443c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos	void					init				(void);
453c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos	void					deinit				(void);
463c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos	IterateResult			iterate				(void);
473c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos
483c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulosprotected:
493c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos	eglw::EGLDisplay		getDisplay			(void) { return m_display; }
503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
513c827367444ee418f129b2c238299f49d3264554Jarkko Poyryprivate:
523c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos	virtual void			executeForConfig	(eglw::EGLDisplay display, eglw::EGLConfig config)	= DE_NULL;
533c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos
543c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos							SimpleConfigCase	(const SimpleConfigCase& other);
553c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos	SimpleConfigCase&		operator=			(const SimpleConfigCase& other);
563c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
573c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos	const eglu::FilterList						m_filters;
583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
593c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos	eglw::EGLDisplay							m_display;
603c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos	std::vector<eglw::EGLConfig>				m_configs;
613c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos	std::vector<eglw::EGLConfig>::iterator		m_configIter;
623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry};
633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
643c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulosclass NamedFilterList : public eglu::FilterList
653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
663c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic:
673c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos					NamedFilterList		(const char* name, const char* description) : m_name(name), m_description(description) {}
683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
693c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos	const char*		getName				(void) const	{ return m_name.c_str();		}
703c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos	const char*		getDescription		(void) const	{ return m_description.c_str();	}
713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
723c827367444ee418f129b2c238299f49d3264554Jarkko Poyryprivate:
733c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos	std::string		m_name;
743c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos	std::string		m_description;
753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry};
763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
773c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulosvoid getDefaultFilterLists (std::vector<NamedFilterList>& lists, const eglu::FilterList& baseFilters);
783c67e4f0ec73f9c30c6b2ed2adfbfe7faaf576a4Pyry Haulos
793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} // egl
803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} // deqp
813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#endif // _TEGLSIMPLECONFIGCASE_HPP
83