• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/* WARNING: This is auto-generated file. Do not modify, since changes will
2 * be lost! Modify the generating script instead.
3 *
4 * Generated from Khronos EGL API description (egl.xml) revision 33315.
5 */
6
7const char* getBooleanName (int value)
8{
9	switch (value)
10	{
11		case EGL_TRUE:	return "EGL_TRUE";
12		case EGL_FALSE:	return "EGL_FALSE";
13		default:		return DE_NULL;
14	}
15}
16
17const char* getBoolDontCareName (int value)
18{
19	switch (value)
20	{
21		case EGL_TRUE:		return "EGL_TRUE";
22		case EGL_FALSE:		return "EGL_FALSE";
23		case EGL_DONT_CARE:	return "EGL_DONT_CARE";
24		default:			return DE_NULL;
25	}
26}
27
28const char* getAPIName (int value)
29{
30	switch (value)
31	{
32		case EGL_OPENGL_API:	return "EGL_OPENGL_API";
33		case EGL_OPENGL_ES_API:	return "EGL_OPENGL_ES_API";
34		case EGL_OPENVG_API:	return "EGL_OPENVG_API";
35		default:				return DE_NULL;
36	}
37}
38
39const char* getErrorName (int value)
40{
41	switch (value)
42	{
43		case EGL_SUCCESS:				return "EGL_SUCCESS";
44		case EGL_NOT_INITIALIZED:		return "EGL_NOT_INITIALIZED";
45		case EGL_BAD_ACCESS:			return "EGL_BAD_ACCESS";
46		case EGL_BAD_ALLOC:				return "EGL_BAD_ALLOC";
47		case EGL_BAD_ATTRIBUTE:			return "EGL_BAD_ATTRIBUTE";
48		case EGL_BAD_CONFIG:			return "EGL_BAD_CONFIG";
49		case EGL_BAD_CONTEXT:			return "EGL_BAD_CONTEXT";
50		case EGL_BAD_CURRENT_SURFACE:	return "EGL_BAD_CURRENT_SURFACE";
51		case EGL_BAD_DISPLAY:			return "EGL_BAD_DISPLAY";
52		case EGL_BAD_MATCH:				return "EGL_BAD_MATCH";
53		case EGL_BAD_NATIVE_PIXMAP:		return "EGL_BAD_NATIVE_PIXMAP";
54		case EGL_BAD_NATIVE_WINDOW:		return "EGL_BAD_NATIVE_WINDOW";
55		case EGL_BAD_PARAMETER:			return "EGL_BAD_PARAMETER";
56		case EGL_BAD_SURFACE:			return "EGL_BAD_SURFACE";
57		case EGL_CONTEXT_LOST:			return "EGL_CONTEXT_LOST";
58		default:						return DE_NULL;
59	}
60}
61
62const char* getContextAttribName (int value)
63{
64	switch (value)
65	{
66		case EGL_CONFIG_ID:					return "EGL_CONFIG_ID";
67		case EGL_CONTEXT_CLIENT_TYPE:		return "EGL_CONTEXT_CLIENT_TYPE";
68		case EGL_CONTEXT_CLIENT_VERSION:	return "EGL_CONTEXT_CLIENT_VERSION";
69		case EGL_RENDER_BUFFER:				return "EGL_RENDER_BUFFER";
70		default:							return DE_NULL;
71	}
72}
73
74const char* getConfigAttribName (int value)
75{
76	switch (value)
77	{
78		case EGL_BUFFER_SIZE:				return "EGL_BUFFER_SIZE";
79		case EGL_RED_SIZE:					return "EGL_RED_SIZE";
80		case EGL_GREEN_SIZE:				return "EGL_GREEN_SIZE";
81		case EGL_BLUE_SIZE:					return "EGL_BLUE_SIZE";
82		case EGL_LUMINANCE_SIZE:			return "EGL_LUMINANCE_SIZE";
83		case EGL_ALPHA_SIZE:				return "EGL_ALPHA_SIZE";
84		case EGL_ALPHA_MASK_SIZE:			return "EGL_ALPHA_MASK_SIZE";
85		case EGL_BIND_TO_TEXTURE_RGB:		return "EGL_BIND_TO_TEXTURE_RGB";
86		case EGL_BIND_TO_TEXTURE_RGBA:		return "EGL_BIND_TO_TEXTURE_RGBA";
87		case EGL_COLOR_BUFFER_TYPE:			return "EGL_COLOR_BUFFER_TYPE";
88		case EGL_CONFIG_CAVEAT:				return "EGL_CONFIG_CAVEAT";
89		case EGL_CONFIG_ID:					return "EGL_CONFIG_ID";
90		case EGL_CONFORMANT:				return "EGL_CONFORMANT";
91		case EGL_DEPTH_SIZE:				return "EGL_DEPTH_SIZE";
92		case EGL_LEVEL:						return "EGL_LEVEL";
93		case EGL_MATCH_NATIVE_PIXMAP:		return "EGL_MATCH_NATIVE_PIXMAP";
94		case EGL_MAX_SWAP_INTERVAL:			return "EGL_MAX_SWAP_INTERVAL";
95		case EGL_MIN_SWAP_INTERVAL:			return "EGL_MIN_SWAP_INTERVAL";
96		case EGL_NATIVE_RENDERABLE:			return "EGL_NATIVE_RENDERABLE";
97		case EGL_NATIVE_VISUAL_TYPE:		return "EGL_NATIVE_VISUAL_TYPE";
98		case EGL_RENDERABLE_TYPE:			return "EGL_RENDERABLE_TYPE";
99		case EGL_SAMPLE_BUFFERS:			return "EGL_SAMPLE_BUFFERS";
100		case EGL_SAMPLES:					return "EGL_SAMPLES";
101		case EGL_STENCIL_SIZE:				return "EGL_STENCIL_SIZE";
102		case EGL_SURFACE_TYPE:				return "EGL_SURFACE_TYPE";
103		case EGL_TRANSPARENT_TYPE:			return "EGL_TRANSPARENT_TYPE";
104		case EGL_TRANSPARENT_RED_VALUE:		return "EGL_TRANSPARENT_RED_VALUE";
105		case EGL_TRANSPARENT_GREEN_VALUE:	return "EGL_TRANSPARENT_GREEN_VALUE";
106		case EGL_TRANSPARENT_BLUE_VALUE:	return "EGL_TRANSPARENT_BLUE_VALUE";
107		default:							return DE_NULL;
108	}
109}
110
111const char* getSurfaceAttribName (int value)
112{
113	switch (value)
114	{
115		case EGL_CONFIG_ID:				return "EGL_CONFIG_ID";
116		case EGL_WIDTH:					return "EGL_WIDTH";
117		case EGL_HEIGHT:				return "EGL_HEIGHT";
118		case EGL_HORIZONTAL_RESOLUTION:	return "EGL_HORIZONTAL_RESOLUTION";
119		case EGL_VERTICAL_RESOLUTION:	return "EGL_VERTICAL_RESOLUTION";
120		case EGL_LARGEST_PBUFFER:		return "EGL_LARGEST_PBUFFER";
121		case EGL_MIPMAP_TEXTURE:		return "EGL_MIPMAP_TEXTURE";
122		case EGL_MIPMAP_LEVEL:			return "EGL_MIPMAP_LEVEL";
123		case EGL_MULTISAMPLE_RESOLVE:	return "EGL_MULTISAMPLE_RESOLVE";
124		case EGL_PIXEL_ASPECT_RATIO:	return "EGL_PIXEL_ASPECT_RATIO";
125		case EGL_RENDER_BUFFER:			return "EGL_RENDER_BUFFER";
126		case EGL_SWAP_BEHAVIOR:			return "EGL_SWAP_BEHAVIOR";
127		case EGL_TEXTURE_FORMAT:		return "EGL_TEXTURE_FORMAT";
128		case EGL_TEXTURE_TARGET:		return "EGL_TEXTURE_TARGET";
129		case EGL_ALPHA_FORMAT:			return "EGL_ALPHA_FORMAT";
130		case EGL_COLORSPACE:			return "EGL_COLORSPACE";
131		default:						return DE_NULL;
132	}
133}
134
135const char* getYuvOrderName (int value)
136{
137	switch (value)
138	{
139		case EGL_NONE:					return "EGL_NONE";
140		case EGL_YUV_ORDER_YUV_EXT:		return "EGL_YUV_ORDER_YUV_EXT";
141		case EGL_YUV_ORDER_YVU_EXT:		return "EGL_YUV_ORDER_YVU_EXT";
142		case EGL_YUV_ORDER_YUYV_EXT:	return "EGL_YUV_ORDER_YUYV_EXT";
143		case EGL_YUV_ORDER_UYVY_EXT:	return "EGL_YUV_ORDER_UYVY_EXT";
144		case EGL_YUV_ORDER_YVYU_EXT:	return "EGL_YUV_ORDER_YVYU_EXT";
145		case EGL_YUV_ORDER_VYUY_EXT:	return "EGL_YUV_ORDER_VYUY_EXT";
146		case EGL_YUV_ORDER_AYUV_EXT:	return "EGL_YUV_ORDER_AYUV_EXT";
147		default:						return DE_NULL;
148	}
149}
150
151const char* getYuvPlaneBppName (int value)
152{
153	switch (value)
154	{
155		case EGL_YUV_PLANE_BPP_0_EXT:	return "EGL_YUV_PLANE_BPP_0_EXT";
156		case EGL_YUV_PLANE_BPP_8_EXT:	return "EGL_YUV_PLANE_BPP_8_EXT";
157		case EGL_YUV_PLANE_BPP_10_EXT:	return "EGL_YUV_PLANE_BPP_10_EXT";
158		default:						return DE_NULL;
159	}
160}
161
162const char* getColorComponentTypeName (int value)
163{
164	switch (value)
165	{
166		case EGL_COLOR_COMPONENT_TYPE_FIXED_EXT:	return "EGL_COLOR_COMPONENT_TYPE_FIXED_EXT";
167		case EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT:	return "EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT";
168		default:									return DE_NULL;
169	}
170}
171
172const char* getSurfaceTargetName (int value)
173{
174	switch (value)
175	{
176		case EGL_READ:	return "EGL_READ";
177		case EGL_DRAW:	return "EGL_DRAW";
178		default:		return DE_NULL;
179	}
180}
181
182const char* getColorBufferTypeName (int value)
183{
184	switch (value)
185	{
186		case EGL_RGB_BUFFER:		return "EGL_RGB_BUFFER";
187		case EGL_LUMINANCE_BUFFER:	return "EGL_LUMINANCE_BUFFER";
188		default:					return DE_NULL;
189	}
190}
191
192const char* getConfigCaveatName (int value)
193{
194	switch (value)
195	{
196		case EGL_NONE:					return "EGL_NONE";
197		case EGL_SLOW_CONFIG:			return "EGL_SLOW_CONFIG";
198		case EGL_NON_CONFORMANT_CONFIG:	return "EGL_NON_CONFORMANT_CONFIG";
199		default:						return DE_NULL;
200	}
201}
202
203const char* getTransparentTypeName (int value)
204{
205	switch (value)
206	{
207		case EGL_NONE:				return "EGL_NONE";
208		case EGL_TRANSPARENT_RGB:	return "EGL_TRANSPARENT_RGB";
209		default:					return DE_NULL;
210	}
211}
212
213const char* getMultisampleResolveName (int value)
214{
215	switch (value)
216	{
217		case EGL_MULTISAMPLE_RESOLVE_DEFAULT:	return "EGL_MULTISAMPLE_RESOLVE_DEFAULT";
218		case EGL_MULTISAMPLE_RESOLVE_BOX:		return "EGL_MULTISAMPLE_RESOLVE_BOX";
219		default:								return DE_NULL;
220	}
221}
222
223const char* getRenderBufferName (int value)
224{
225	switch (value)
226	{
227		case EGL_SINGLE_BUFFER:	return "EGL_SINGLE_BUFFER";
228		case EGL_BACK_BUFFER:	return "EGL_BACK_BUFFER";
229		default:				return DE_NULL;
230	}
231}
232
233const char* getSwapBehaviorName (int value)
234{
235	switch (value)
236	{
237		case EGL_BUFFER_DESTROYED:	return "EGL_BUFFER_DESTROYED";
238		case EGL_BUFFER_PRESERVED:	return "EGL_BUFFER_PRESERVED";
239		default:					return DE_NULL;
240	}
241}
242
243const char* getTextureFormatName (int value)
244{
245	switch (value)
246	{
247		case EGL_NO_TEXTURE:	return "EGL_NO_TEXTURE";
248		case EGL_TEXTURE_RGB:	return "EGL_TEXTURE_RGB";
249		case EGL_TEXTURE_RGBA:	return "EGL_TEXTURE_RGBA";
250		default:				return DE_NULL;
251	}
252}
253
254const char* getTextureTargetName (int value)
255{
256	switch (value)
257	{
258		case EGL_NO_TEXTURE:	return "EGL_NO_TEXTURE";
259		case EGL_TEXTURE_2D:	return "EGL_TEXTURE_2D";
260		default:				return DE_NULL;
261	}
262}
263
264const char* getAlphaFormatName (int value)
265{
266	switch (value)
267	{
268		case EGL_ALPHA_FORMAT_NONPRE:	return "EGL_ALPHA_FORMAT_NONPRE";
269		case EGL_ALPHA_FORMAT_PRE:		return "EGL_ALPHA_FORMAT_PRE";
270		default:						return DE_NULL;
271	}
272}
273
274const char* getColorspaceName (int value)
275{
276	switch (value)
277	{
278		case EGL_COLORSPACE_sRGB:	return "EGL_COLORSPACE_sRGB";
279		case EGL_COLORSPACE_LINEAR:	return "EGL_COLORSPACE_LINEAR";
280		default:					return DE_NULL;
281	}
282}
283
284tcu::Format::Bitfield<16> getAPIBitsStr (int value)
285{
286	static const tcu::Format::BitDesc s_desc[] =
287	{
288		tcu::Format::BitDesc(EGL_OPENGL_BIT,			"EGL_OPENGL_BIT"),
289		tcu::Format::BitDesc(EGL_OPENGL_ES_BIT,			"EGL_OPENGL_ES_BIT"),
290		tcu::Format::BitDesc(EGL_OPENGL_ES2_BIT,		"EGL_OPENGL_ES2_BIT"),
291		tcu::Format::BitDesc(EGL_OPENGL_ES3_BIT_KHR,	"EGL_OPENGL_ES3_BIT_KHR"),
292		tcu::Format::BitDesc(EGL_OPENVG_BIT,			"EGL_OPENVG_BIT"),
293	};
294	return tcu::Format::Bitfield<16>(value, &s_desc[0], &s_desc[DE_LENGTH_OF_ARRAY(s_desc)]);
295}
296
297tcu::Format::Bitfield<16> getSurfaceBitsStr (int value)
298{
299	static const tcu::Format::BitDesc s_desc[] =
300	{
301		tcu::Format::BitDesc(EGL_PBUFFER_BIT,					"EGL_PBUFFER_BIT"),
302		tcu::Format::BitDesc(EGL_PIXMAP_BIT,					"EGL_PIXMAP_BIT"),
303		tcu::Format::BitDesc(EGL_WINDOW_BIT,					"EGL_WINDOW_BIT"),
304		tcu::Format::BitDesc(EGL_MULTISAMPLE_RESOLVE_BOX_BIT,	"EGL_MULTISAMPLE_RESOLVE_BOX_BIT"),
305		tcu::Format::BitDesc(EGL_SWAP_BEHAVIOR_PRESERVED_BIT,	"EGL_SWAP_BEHAVIOR_PRESERVED_BIT"),
306		tcu::Format::BitDesc(EGL_VG_ALPHA_FORMAT_PRE_BIT,		"EGL_VG_ALPHA_FORMAT_PRE_BIT"),
307		tcu::Format::BitDesc(EGL_VG_COLORSPACE_LINEAR_BIT,		"EGL_VG_COLORSPACE_LINEAR_BIT"),
308		tcu::Format::BitDesc(EGL_LOCK_SURFACE_BIT_KHR,			"EGL_LOCK_SURFACE_BIT_KHR"),
309		tcu::Format::BitDesc(EGL_OPTIMAL_FORMAT_BIT_KHR,		"EGL_OPTIMAL_FORMAT_BIT_KHR"),
310	};
311	return tcu::Format::Bitfield<16>(value, &s_desc[0], &s_desc[DE_LENGTH_OF_ARRAY(s_desc)]);
312}
313