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 3338ed0db494d6a4db7f76627b38f0b1892db096. 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 case EGL_COLOR_COMPONENT_TYPE_EXT: return "EGL_COLOR_COMPONENT_TYPE_EXT"; 108 default: return DE_NULL; 109 } 110 } 111 112 const char* getSurfaceAttribName (int value) 113 { 114 switch (value) 115 { 116 case EGL_CONFIG_ID: return "EGL_CONFIG_ID"; 117 case EGL_WIDTH: return "EGL_WIDTH"; 118 case EGL_HEIGHT: return "EGL_HEIGHT"; 119 case EGL_HORIZONTAL_RESOLUTION: return "EGL_HORIZONTAL_RESOLUTION"; 120 case EGL_VERTICAL_RESOLUTION: return "EGL_VERTICAL_RESOLUTION"; 121 case EGL_LARGEST_PBUFFER: return "EGL_LARGEST_PBUFFER"; 122 case EGL_MIPMAP_TEXTURE: return "EGL_MIPMAP_TEXTURE"; 123 case EGL_MIPMAP_LEVEL: return "EGL_MIPMAP_LEVEL"; 124 case EGL_MULTISAMPLE_RESOLVE: return "EGL_MULTISAMPLE_RESOLVE"; 125 case EGL_PIXEL_ASPECT_RATIO: return "EGL_PIXEL_ASPECT_RATIO"; 126 case EGL_RENDER_BUFFER: return "EGL_RENDER_BUFFER"; 127 case EGL_SWAP_BEHAVIOR: return "EGL_SWAP_BEHAVIOR"; 128 case EGL_TEXTURE_FORMAT: return "EGL_TEXTURE_FORMAT"; 129 case EGL_TEXTURE_TARGET: return "EGL_TEXTURE_TARGET"; 130 case EGL_ALPHA_FORMAT: return "EGL_ALPHA_FORMAT"; 131 case EGL_COLORSPACE: return "EGL_COLORSPACE"; 132 default: return DE_NULL; 133 } 134 } 135 136 const char* getYuvOrderName (int value) 137 { 138 switch (value) 139 { 140 case EGL_NONE: return "EGL_NONE"; 141 case EGL_YUV_ORDER_YUV_EXT: return "EGL_YUV_ORDER_YUV_EXT"; 142 case EGL_YUV_ORDER_YVU_EXT: return "EGL_YUV_ORDER_YVU_EXT"; 143 case EGL_YUV_ORDER_YUYV_EXT: return "EGL_YUV_ORDER_YUYV_EXT"; 144 case EGL_YUV_ORDER_UYVY_EXT: return "EGL_YUV_ORDER_UYVY_EXT"; 145 case EGL_YUV_ORDER_YVYU_EXT: return "EGL_YUV_ORDER_YVYU_EXT"; 146 case EGL_YUV_ORDER_VYUY_EXT: return "EGL_YUV_ORDER_VYUY_EXT"; 147 case EGL_YUV_ORDER_AYUV_EXT: return "EGL_YUV_ORDER_AYUV_EXT"; 148 default: return DE_NULL; 149 } 150 } 151 152 const char* getYuvPlaneBppName (int value) 153 { 154 switch (value) 155 { 156 case EGL_YUV_PLANE_BPP_0_EXT: return "EGL_YUV_PLANE_BPP_0_EXT"; 157 case EGL_YUV_PLANE_BPP_8_EXT: return "EGL_YUV_PLANE_BPP_8_EXT"; 158 case EGL_YUV_PLANE_BPP_10_EXT: return "EGL_YUV_PLANE_BPP_10_EXT"; 159 default: return DE_NULL; 160 } 161 } 162 163 const char* getColorComponentTypeName (int value) 164 { 165 switch (value) 166 { 167 case EGL_COLOR_COMPONENT_TYPE_FIXED_EXT: return "EGL_COLOR_COMPONENT_TYPE_FIXED_EXT"; 168 case EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT: return "EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT"; 169 default: return DE_NULL; 170 } 171 } 172 173 const char* getSurfaceTargetName (int value) 174 { 175 switch (value) 176 { 177 case EGL_READ: return "EGL_READ"; 178 case EGL_DRAW: return "EGL_DRAW"; 179 default: return DE_NULL; 180 } 181 } 182 183 const char* getColorBufferTypeName (int value) 184 { 185 switch (value) 186 { 187 case EGL_RGB_BUFFER: return "EGL_RGB_BUFFER"; 188 case EGL_LUMINANCE_BUFFER: return "EGL_LUMINANCE_BUFFER"; 189 default: return DE_NULL; 190 } 191 } 192 193 const char* getConfigCaveatName (int value) 194 { 195 switch (value) 196 { 197 case EGL_NONE: return "EGL_NONE"; 198 case EGL_SLOW_CONFIG: return "EGL_SLOW_CONFIG"; 199 case EGL_NON_CONFORMANT_CONFIG: return "EGL_NON_CONFORMANT_CONFIG"; 200 default: return DE_NULL; 201 } 202 } 203 204 const char* getTransparentTypeName (int value) 205 { 206 switch (value) 207 { 208 case EGL_NONE: return "EGL_NONE"; 209 case EGL_TRANSPARENT_RGB: return "EGL_TRANSPARENT_RGB"; 210 default: return DE_NULL; 211 } 212 } 213 214 const char* getMultisampleResolveName (int value) 215 { 216 switch (value) 217 { 218 case EGL_MULTISAMPLE_RESOLVE_DEFAULT: return "EGL_MULTISAMPLE_RESOLVE_DEFAULT"; 219 case EGL_MULTISAMPLE_RESOLVE_BOX: return "EGL_MULTISAMPLE_RESOLVE_BOX"; 220 default: return DE_NULL; 221 } 222 } 223 224 const char* getRenderBufferName (int value) 225 { 226 switch (value) 227 { 228 case EGL_SINGLE_BUFFER: return "EGL_SINGLE_BUFFER"; 229 case EGL_BACK_BUFFER: return "EGL_BACK_BUFFER"; 230 default: return DE_NULL; 231 } 232 } 233 234 const char* getSwapBehaviorName (int value) 235 { 236 switch (value) 237 { 238 case EGL_BUFFER_DESTROYED: return "EGL_BUFFER_DESTROYED"; 239 case EGL_BUFFER_PRESERVED: return "EGL_BUFFER_PRESERVED"; 240 default: return DE_NULL; 241 } 242 } 243 244 const char* getTextureFormatName (int value) 245 { 246 switch (value) 247 { 248 case EGL_NO_TEXTURE: return "EGL_NO_TEXTURE"; 249 case EGL_TEXTURE_RGB: return "EGL_TEXTURE_RGB"; 250 case EGL_TEXTURE_RGBA: return "EGL_TEXTURE_RGBA"; 251 default: return DE_NULL; 252 } 253 } 254 255 const char* getTextureTargetName (int value) 256 { 257 switch (value) 258 { 259 case EGL_NO_TEXTURE: return "EGL_NO_TEXTURE"; 260 case EGL_TEXTURE_2D: return "EGL_TEXTURE_2D"; 261 default: return DE_NULL; 262 } 263 } 264 265 const char* getAlphaFormatName (int value) 266 { 267 switch (value) 268 { 269 case EGL_ALPHA_FORMAT_NONPRE: return "EGL_ALPHA_FORMAT_NONPRE"; 270 case EGL_ALPHA_FORMAT_PRE: return "EGL_ALPHA_FORMAT_PRE"; 271 default: return DE_NULL; 272 } 273 } 274 275 const char* getColorspaceName (int value) 276 { 277 switch (value) 278 { 279 case EGL_COLORSPACE_sRGB: return "EGL_COLORSPACE_sRGB"; 280 case EGL_COLORSPACE_LINEAR: return "EGL_COLORSPACE_LINEAR"; 281 default: return DE_NULL; 282 } 283 } 284 285 tcu::Format::Bitfield<16> getAPIBitsStr (int value) 286 { 287 static const tcu::Format::BitDesc s_desc[] = 288 { 289 tcu::Format::BitDesc(EGL_OPENGL_BIT, "EGL_OPENGL_BIT"), 290 tcu::Format::BitDesc(EGL_OPENGL_ES_BIT, "EGL_OPENGL_ES_BIT"), 291 tcu::Format::BitDesc(EGL_OPENGL_ES2_BIT, "EGL_OPENGL_ES2_BIT"), 292 tcu::Format::BitDesc(EGL_OPENGL_ES3_BIT_KHR, "EGL_OPENGL_ES3_BIT_KHR"), 293 tcu::Format::BitDesc(EGL_OPENVG_BIT, "EGL_OPENVG_BIT"), 294 }; 295 return tcu::Format::Bitfield<16>(value, &s_desc[0], &s_desc[DE_LENGTH_OF_ARRAY(s_desc)]); 296 } 297 298 tcu::Format::Bitfield<16> getSurfaceBitsStr (int value) 299 { 300 static const tcu::Format::BitDesc s_desc[] = 301 { 302 tcu::Format::BitDesc(EGL_PBUFFER_BIT, "EGL_PBUFFER_BIT"), 303 tcu::Format::BitDesc(EGL_PIXMAP_BIT, "EGL_PIXMAP_BIT"), 304 tcu::Format::BitDesc(EGL_WINDOW_BIT, "EGL_WINDOW_BIT"), 305 tcu::Format::BitDesc(EGL_MULTISAMPLE_RESOLVE_BOX_BIT, "EGL_MULTISAMPLE_RESOLVE_BOX_BIT"), 306 tcu::Format::BitDesc(EGL_SWAP_BEHAVIOR_PRESERVED_BIT, "EGL_SWAP_BEHAVIOR_PRESERVED_BIT"), 307 tcu::Format::BitDesc(EGL_VG_ALPHA_FORMAT_PRE_BIT, "EGL_VG_ALPHA_FORMAT_PRE_BIT"), 308 tcu::Format::BitDesc(EGL_VG_COLORSPACE_LINEAR_BIT, "EGL_VG_COLORSPACE_LINEAR_BIT"), 309 tcu::Format::BitDesc(EGL_LOCK_SURFACE_BIT_KHR, "EGL_LOCK_SURFACE_BIT_KHR"), 310 tcu::Format::BitDesc(EGL_OPTIMAL_FORMAT_BIT_KHR, "EGL_OPTIMAL_FORMAT_BIT_KHR"), 311 }; 312 return tcu::Format::Bitfield<16>(value, &s_desc[0], &s_desc[DE_LENGTH_OF_ARRAY(s_desc)]); 313 } 314