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_shader_framebuffer_fetch, 29 EXT_shader_texture_lod, 30 EXT_YUV_target, 31 NV_EGL_stream_consumer_external, 32 NV_shader_framebuffer_fetch, 33 OES_EGL_image_external, 34 OES_EGL_image_external_essl3, 35 OES_standard_derivatives, 36 OES_texture_storage_multisample_2d_array, 37 OES_texture_3D, 38 OVR_multiview, 39 OVR_multiview2, 40 ANGLE_multi_draw, 41 ANGLE_base_vertex_base_instance 42 }; 43 44 enum TBehavior 45 { 46 EBhRequire, 47 EBhEnable, 48 EBhWarn, 49 EBhDisable, 50 EBhUndefined 51 }; 52 53 const char *GetExtensionNameString(TExtension extension); 54 TExtension GetExtensionByName(const char *extension); 55 56 const char *GetBehaviorString(TBehavior b); 57 58 // Mapping between extension id and behavior. 59 typedef std::map<TExtension, TBehavior> TExtensionBehavior; 60 61 bool IsExtensionEnabled(const TExtensionBehavior &extBehavior, TExtension extension); 62 63 } // namespace sh 64 65 #endif // COMPILER_TRANSLATOR_EXTENSIONBEHAVIOR_H_ 66