summaryrefslogtreecommitdiffstats
path: root/src/glsl/pp/sl_pp_context.h
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2009-12-10 12:38:22 +0100
committerMichal Krol <[email protected]>2009-12-10 12:38:22 +0100
commit91e164b3d0b1d36bfdf369266ae7e1ab396f1ba2 (patch)
treed8ed4e74e470d2c9b9bf9ad3d4ad0829dc4da0ba /src/glsl/pp/sl_pp_context.h
parent068596c9a7e8d330ffdff8ad8700bd6093b5bdea (diff)
glsl/pp: Add sl_pp_context_add_extension().
This way third parties are able to add supported extension strings.
Diffstat (limited to 'src/glsl/pp/sl_pp_context.h')
-rw-r--r--src/glsl/pp/sl_pp_context.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/glsl/pp/sl_pp_context.h b/src/glsl/pp/sl_pp_context.h
index 569a2d735b9..5e3ae72fdfa 100644
--- a/src/glsl/pp/sl_pp_context.h
+++ b/src/glsl/pp/sl_pp_context.h
@@ -37,6 +37,13 @@
#define SL_PP_MAX_ERROR_MSG 1024
+#define SL_PP_MAX_EXTENSIONS 16
+
+struct sl_pp_extension {
+ int name; /*< VENDOR_extension_name */
+ int name_string; /*< GL_VENDOR_extension_name */
+};
+
struct sl_pp_context {
char *cstr_pool;
unsigned int cstr_pool_max;
@@ -46,6 +53,9 @@ struct sl_pp_context {
struct sl_pp_macro *macro;
struct sl_pp_macro **macro_tail;
+ struct sl_pp_extension extensions[SL_PP_MAX_EXTENSIONS];
+ unsigned int num_extensions;
+
unsigned int if_stack[SL_PP_MAX_IF_NESTING];
unsigned int if_ptr;
unsigned int if_value;