1 // 2 // Copyright 2002 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 // ExtensionBehavior.h: Extension name enumeration and data structures for storing extension 7 // behavior. 8 9 #ifndef COMPILER_TRANSLATOR_EXTENSIONBEHAVIOR_H_ 10 #define COMPILER_TRANSLATOR_EXTENSIONBEHAVIOR_H_ 11 12 #include <map> 13 14 namespace sh 15 { 16 17 enum class TExtension 18 { 19 UNDEFINED, // Special value used to indicate no extension. 20 21 ARB_texture_rectangle, 22 ANGLE_texture_multisample, 23 ARM_shader_framebuffer_fetch, 24 EXT_blend_func_extended, 25 EXT_draw_buffers, 26 EXT_frag_depth, 27 EXT_geometry_shader, 28 EXT_gpu_shader5, 29 EXT_shader_framebuffer_fetch, 30 EXT_shader_texture_lod, 31 EXT_YUV_target, 32 EXT_shader_non_constant_global_initializers, 33 NV_EGL_stream_consumer_external, 34 NV_shader_framebuffer_fetch, 35 OES_EGL_image_external, 36 OES_EGL_image_external_essl3, 37 OES_standard_derivatives, 38 OES_texture_storage_multisample_2d_array, 39 OES_texture_3D, 40 OVR_multiview, 41 OVR_multiview2, 42 ANGLE_multi_draw, 43 ANGLE_base_vertex_base_instance, 44 WEBGL_video_texture, 45 }; 46 47 enum TBehavior 48 { 49 EBhRequire, 50 EBhEnable, 51 EBhWarn, 52 EBhDisable, 53 EBhUndefined 54 }; 55 56 const char *GetExtensionNameString(TExtension extension); 57 TExtension GetExtensionByName(const char *extension); 58 59 const char *GetBehaviorString(TBehavior b); 60 61 // Mapping between extension id and behavior. 62 typedef std::map<TExtension, TBehavior> TExtensionBehavior; 63 64 bool IsExtensionEnabled(const TExtensionBehavior &extBehavior, TExtension extension); 65 66 } // namespace sh 67 68 #endif // COMPILER_TRANSLATOR_EXTENSIONBEHAVIOR_H_ 69