summaryrefslogtreecommitdiffstats
path: root/src/glsl/pp/sl_pp_macro.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/pp/sl_pp_macro.c')
-rw-r--r--src/glsl/pp/sl_pp_macro.c12
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