bd0a5d0c343766a172358b065b97c20ce8562343
[platform/upstream/glslang.git] / glslang / MachineIndependent / Versions.h
1 //
2 //Copyright (C) 2002-2005  3Dlabs Inc. Ltd.
3 //Copyright (C) 2012-2013 LunarG, Inc.
4 //
5 //All rights reserved.
6 //
7 //Redistribution and use in source and binary forms, with or without
8 //modification, are permitted provided that the following conditions
9 //are met:
10 //
11 //    Redistributions of source code must retain the above copyright
12 //    notice, this list of conditions and the following disclaimer.
13 //
14 //    Redistributions in binary form must reproduce the above
15 //    copyright notice, this list of conditions and the following
16 //    disclaimer in the documentation and/or other materials provided
17 //    with the distribution.
18 //
19 //    Neither the name of 3Dlabs Inc. Ltd. nor the names of its
20 //    contributors may be used to endorse or promote products derived
21 //    from this software without specific prior written permission.
22 //
23 //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 //"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 //LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26 //FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27 //COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28 //INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29 //BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30 //LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31 //CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 //LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33 //ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 //POSSIBILITY OF SUCH DAMAGE.
35 //
36 #ifndef _VERSIONS_INCLUDED_
37 #define _VERSIONS_INCLUDED_
38
39 //
40 // Help manage multiple profiles, versions, extensions etc.
41 //
42
43 //
44 // Profiles are set up for masking operations, so queries can be done on multiple
45 // profiles at the same time.
46 //
47 // Don't maintain an ordinal set of enums (0,1,2,3...) to avoid all possible
48 // defects from mixing the two different forms.
49 //
50 typedef enum {
51     EBadProfile           = 0,
52     ENoProfile            = (1 << 0), // only for desktop, before profiles showed up
53     ECoreProfile          = (1 << 1),
54     ECompatibilityProfile = (1 << 2),
55     EEsProfile            = (1 << 3)
56 } EProfile;
57
58 namespace glslang {
59
60 //
61 // The behaviors from the GLSL "#extension extension_name : behavior"
62 //
63 typedef enum {
64     EBhRequire,
65     EBhEnable,
66     EBhWarn,
67     EBhDisable
68 } TExtensionBehavior;
69
70 //
71 // Symbolic names for extensions.  Strings may be directly used when calling the
72 // functions, but better to have the compiler do spelling checks.
73 //
74 const char* const GL_ARB_texture_rectangle        = "GL_ARB_texture_rectangle";
75 const char* const GL_3DL_array_objects            = "GL_3DL_array_objects";
76 const char* const GL_ARB_shading_language_420pack = "GL_ARB_shading_language_420pack";
77 const char* const GL_ARB_texture_gather           = "GL_ARB_texture_gather";
78 const char* const GL_ARB_separate_shader_objects  = "GL_ARB_separate_shader_objects";
79
80 } // end namespace glslang
81
82 #endif // _VERSIONS_INCLUDED_