1#ifndef _EGLUSTRUTIL_HPP
2#define _EGLUSTRUTIL_HPP
3/*-------------------------------------------------------------------------
4 * drawElements Quality Program EGL Utilities
5 * ------------------------------------------
6 *
7 * Copyright 2014 The Android Open Source Project
8 *
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
12 *
13 *      http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 *
21 *//*!
22 * \file
23 * \brief EGL String Utilities.
24 *//*--------------------------------------------------------------------*/
25
26#include "tcuDefs.hpp"
27#include "tcuFormatUtil.hpp"
28
29namespace eglu
30{
31
32struct ConfigAttribValueFmt
33{
34	deUint32	attribute;
35	int			value;
36	ConfigAttribValueFmt (deUint32 attribute_, int value_) : attribute(attribute_), value(value_) {}
37};
38
39struct SurfaceAttribValueFmt
40{
41	deUint32	attribute;
42	int			value;
43	SurfaceAttribValueFmt (deUint32 attribute_, int value_) : attribute(attribute_), value(value_) {}
44};
45
46struct ContextAttribValueFmt
47{
48	deUint32	attribute;
49	int			value;
50	ContextAttribValueFmt (deUint32 attribute_, int value_) : attribute(attribute_), value(value_) {}
51};
52
53struct ConfigAttribListFmt
54{
55	const int* attribs;
56	ConfigAttribListFmt (const int* attribs_) : attribs(attribs_) {}
57};
58
59struct SurfaceAttribListFmt
60{
61	const int* attribs;
62	SurfaceAttribListFmt (const int* attribs_) : attribs(attribs_) {}
63};
64
65struct ContextAttribListFmt
66{
67	const int* attribs;
68	ContextAttribListFmt (const int* attribs_) : attribs(attribs_) {}
69};
70
71inline ConfigAttribValueFmt		getConfigAttribValueStr		(deUint32 attribute, int value) { return ConfigAttribValueFmt(attribute, value); }
72std::ostream&					operator<<					(std::ostream& str, const ConfigAttribValueFmt& attribFmt);
73
74inline SurfaceAttribValueFmt	getSurfaceAttribValueStr	(deUint32 attribute, int value) { return SurfaceAttribValueFmt(attribute, value); }
75std::ostream&					operator<<					(std::ostream& str, const SurfaceAttribValueFmt& attribFmt);
76
77inline ContextAttribValueFmt	getContextAttribValueStr	(deUint32 attribute, int value) { return ContextAttribValueFmt(attribute, value); }
78std::ostream&					operator<<					(std::ostream& str, const ContextAttribValueFmt& attribFmt);
79
80inline ConfigAttribListFmt		getConfigAttribListStr		(const int* attribs) { return ConfigAttribListFmt(attribs); }
81std::ostream&					operator<<					(std::ostream& str, const ConfigAttribListFmt& fmt);
82
83inline SurfaceAttribListFmt		getSurfaceAttribListStr		(const int* attribs) { return SurfaceAttribListFmt(attribs); }
84std::ostream&					operator<<					(std::ostream& str, const SurfaceAttribListFmt& fmt);
85
86inline ContextAttribListFmt		getContextAttribListStr		(const int* attribs) { return ContextAttribListFmt(attribs); }
87std::ostream&					operator<<					(std::ostream& str, const ContextAttribListFmt& fmt);
88
89#include "egluStrUtilPrototypes.inl"
90
91} // eglu
92
93#endif // _EGLUSTRUTIL_HPP
94