summaryrefslogtreecommitdiff
path: root/src/glsl/pp/sl_pp_context.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-02-16 10:42:05 -0700
committerBrian Paul <brianp@vmware.com>2010-02-16 10:43:36 -0700
commitde5928a61549a6ca66e6b9ff6e50b305f653888c (patch)
tree7eec9b42a9420533b632cd2f39dc5fdafbcb0011 /src/glsl/pp/sl_pp_context.h
parentf7aea808a4724a9e50bf3afa5a1bf547d0da5d65 (diff)
sl/pp: re-do extension testing code
The #extension directive should not effect which extension preprocessor symbols are defined/undefined; only whether/how the compiler accepts language features defined by the extension.
Diffstat (limited to 'src/glsl/pp/sl_pp_context.h')
-rw-r--r--src/glsl/pp/sl_pp_context.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/glsl/pp/sl_pp_context.h b/src/glsl/pp/sl_pp_context.h
index b5419bc056..1232f1e9e3 100644
--- a/src/glsl/pp/sl_pp_context.h
+++ b/src/glsl/pp/sl_pp_context.h
@@ -43,9 +43,16 @@
#define SL_PP_MAX_PREDEFINED 16
+enum sl_pp_extension_state {
+ SL_PP_EXTENSION_STATE_ENABLED,
+ SL_PP_EXTENSION_STATE_DISABLED,
+ SL_PP_EXTENSION_STATE_WARN,
+ SL_PP_EXTENSION_STATE_REQUIRE
+};
+
struct sl_pp_extension {
int name; /*< GL_VENDOR_extension_name */
- int enabled;
+ enum sl_pp_extension_state state;
};
struct sl_pp_predefined {