Home | History | Annotate | Download | only in egl
      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 31042.
      5  */
      6 
      7 const 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 
     17 const 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 
     28 const 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 
     39 const 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 
     62 const 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 
     74 const 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 
    111 const 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 
    135 const char* getSurfaceTargetName (int value)
    136 {
    137 	switch (value)
    138 	{
    139 		case EGL_READ:	return "EGL_READ";
    140 		case EGL_DRAW:	return "EGL_DRAW";
    141 		default:		return DE_NULL;
    142 	}
    143 }
    144 
    145 const char* getColorBufferTypeName (int value)
    146 {
    147 	switch (value)
    148 	{
    149 		case EGL_RGB_BUFFER:		return "EGL_RGB_BUFFER";
    150 		case EGL_LUMINANCE_BUFFER:	return "EGL_LUMINANCE_BUFFER";
    151 		default:					return DE_NULL;
    152 	}
    153 }
    154 
    155 const char* getConfigCaveatName (int value)
    156 {
    157 	switch (value)
    158 	{
    159 		case EGL_NONE:					return "EGL_NONE";
    160 		case EGL_SLOW_CONFIG:			return "EGL_SLOW_CONFIG";
    161 		case EGL_NON_CONFORMANT_CONFIG:	return "EGL_NON_CONFORMANT_CONFIG";
    162 		default:						return DE_NULL;
    163 	}
    164 }
    165 
    166 const char* getTransparentTypeName (int value)
    167 {
    168 	switch (value)
    169 	{
    170 		case EGL_NONE:				return "EGL_NONE";
    171 		case EGL_TRANSPARENT_RGB:	return "EGL_TRANSPARENT_RGB";
    172 		default:					return DE_NULL;
    173 	}
    174 }
    175 
    176 const char* getMultisampleResolveName (int value)
    177 {
    178 	switch (value)
    179 	{
    180 		case EGL_MULTISAMPLE_RESOLVE_DEFAULT:	return "EGL_MULTISAMPLE_RESOLVE_DEFAULT";
    181 		case EGL_MULTISAMPLE_RESOLVE_BOX:		return "EGL_MULTISAMPLE_RESOLVE_BOX";
    182 		default:								return DE_NULL;
    183 	}
    184 }
    185 
    186 const char* getRenderBufferName (int value)
    187 {
    188 	switch (value)
    189 	{
    190 		case EGL_SINGLE_BUFFER:	return "EGL_SINGLE_BUFFER";
    191 		case EGL_BACK_BUFFER:	return "EGL_BACK_BUFFER";
    192 		default:				return DE_NULL;
    193 	}
    194 }
    195 
    196 const char* getSwapBehaviorName (int value)
    197 {
    198 	switch (value)
    199 	{
    200 		case EGL_BUFFER_DESTROYED:	return "EGL_BUFFER_DESTROYED";
    201 		case EGL_BUFFER_PRESERVED:	return "EGL_BUFFER_PRESERVED";
    202 		default:					return DE_NULL;
    203 	}
    204 }
    205 
    206 const char* getTextureFormatName (int value)
    207 {
    208 	switch (value)
    209 	{
    210 		case EGL_NO_TEXTURE:	return "EGL_NO_TEXTURE";
    211 		case EGL_TEXTURE_RGB:	return "EGL_TEXTURE_RGB";
    212 		case EGL_TEXTURE_RGBA:	return "EGL_TEXTURE_RGBA";
    213 		default:				return DE_NULL;
    214 	}
    215 }
    216 
    217 const char* getTextureTargetName (int value)
    218 {
    219 	switch (value)
    220 	{
    221 		case EGL_NO_TEXTURE:	return "EGL_NO_TEXTURE";
    222 		case EGL_TEXTURE_2D:	return "EGL_TEXTURE_2D";
    223 		default:				return DE_NULL;
    224 	}
    225 }
    226 
    227 const char* getAlphaFormatName (int value)
    228 {
    229 	switch (value)
    230 	{
    231 		case EGL_ALPHA_FORMAT_NONPRE:	return "EGL_ALPHA_FORMAT_NONPRE";
    232 		case EGL_ALPHA_FORMAT_PRE:		return "EGL_ALPHA_FORMAT_PRE";
    233 		default:						return DE_NULL;
    234 	}
    235 }
    236 
    237 const char* getColorspaceName (int value)
    238 {
    239 	switch (value)
    240 	{
    241 		case EGL_COLORSPACE_sRGB:	return "EGL_COLORSPACE_sRGB";
    242 		case EGL_COLORSPACE_LINEAR:	return "EGL_COLORSPACE_LINEAR";
    243 		default:					return DE_NULL;
    244 	}
    245 }
    246 
    247 tcu::Format::Bitfield<16> getAPIBitsStr (int value)
    248 {
    249 	static const tcu::Format::BitDesc s_desc[] =
    250 	{
    251 		tcu::Format::BitDesc(EGL_OPENGL_BIT,			"EGL_OPENGL_BIT"),
    252 		tcu::Format::BitDesc(EGL_OPENGL_ES_BIT,			"EGL_OPENGL_ES_BIT"),
    253 		tcu::Format::BitDesc(EGL_OPENGL_ES2_BIT,		"EGL_OPENGL_ES2_BIT"),
    254 		tcu::Format::BitDesc(EGL_OPENGL_ES3_BIT_KHR,	"EGL_OPENGL_ES3_BIT_KHR"),
    255 		tcu::Format::BitDesc(EGL_OPENVG_BIT,			"EGL_OPENVG_BIT"),
    256 	};
    257 	return tcu::Format::Bitfield<16>(value, &s_desc[0], &s_desc[DE_LENGTH_OF_ARRAY(s_desc)]);
    258 }
    259 
    260 tcu::Format::Bitfield<16> getSurfaceBitsStr (int value)
    261 {
    262 	static const tcu::Format::BitDesc s_desc[] =
    263 	{
    264 		tcu::Format::BitDesc(EGL_PBUFFER_BIT,					"EGL_PBUFFER_BIT"),
    265 		tcu::Format::BitDesc(EGL_PIXMAP_BIT,					"EGL_PIXMAP_BIT"),
    266 		tcu::Format::BitDesc(EGL_WINDOW_BIT,					"EGL_WINDOW_BIT"),
    267 		tcu::Format::BitDesc(EGL_MULTISAMPLE_RESOLVE_BOX_BIT,	"EGL_MULTISAMPLE_RESOLVE_BOX_BIT"),
    268 		tcu::Format::BitDesc(EGL_SWAP_BEHAVIOR_PRESERVED_BIT,	"EGL_SWAP_BEHAVIOR_PRESERVED_BIT"),
    269 		tcu::Format::BitDesc(EGL_VG_ALPHA_FORMAT_PRE_BIT,		"EGL_VG_ALPHA_FORMAT_PRE_BIT"),
    270 		tcu::Format::BitDesc(EGL_VG_COLORSPACE_LINEAR_BIT,		"EGL_VG_COLORSPACE_LINEAR_BIT"),
    271 		tcu::Format::BitDesc(EGL_LOCK_SURFACE_BIT_KHR,			"EGL_LOCK_SURFACE_BIT_KHR"),
    272 		tcu::Format::BitDesc(EGL_OPTIMAL_FORMAT_BIT_KHR,		"EGL_OPTIMAL_FORMAT_BIT_KHR"),
    273 	};
    274 	return tcu::Format::Bitfield<16>(value, &s_desc[0], &s_desc[DE_LENGTH_OF_ARRAY(s_desc)]);
    275 }
    276