diff options
author | Michal Krol <[email protected]> | 2009-12-10 12:38:22 +0100 |
---|---|---|
committer | Michal Krol <[email protected]> | 2009-12-10 12:38:22 +0100 |
commit | 91e164b3d0b1d36bfdf369266ae7e1ab396f1ba2 (patch) | |
tree | d8ed4e74e470d2c9b9bf9ad3d4ad0829dc4da0ba /src/glsl/pp/sl_pp_macro.c | |
parent | 068596c9a7e8d330ffdff8ad8700bd6093b5bdea (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_macro.c')
-rw-r--r-- | src/glsl/pp/sl_pp_macro.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/glsl/pp/sl_pp_macro.c b/src/glsl/pp/sl_pp_macro.c index 29f1229dd7d..05466c9a7c3 100644 --- a/src/glsl/pp/sl_pp_macro.c +++ b/src/glsl/pp/sl_pp_macro.c @@ -163,6 +163,18 @@ sl_pp_macro_expand(struct sl_pp_context *context, return 0; } + /* Replace extension names with 1. + */ + for (j = 0; j < context->num_extensions; j++) { + if (macro_name == context->extensions[j].name) { + if (!mute && _out_number(context, state, 1)) { + return -1; + } + (*pi)++; + return 0; + } + } + /* TODO: For FEATURE_es2_glsl, expand to 1 the following symbols. * GL_ES * GL_FRAGMENT_PRECISION_HIGH |