aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/pp/sl_pp_extension.c
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2010-02-16 10:04:58 +0100
committerMichal Krol <[email protected]>2010-02-16 10:04:58 +0100
commitfa8acb052839da3b9e77e58ad17d94190f4d2f24 (patch)
tree2ca63b6f0ff6151493dc045525b9cceb30ad8867 /src/glsl/pp/sl_pp_extension.c
parent828f545274a6da9b5d05aa23ae31959b121c38a2 (diff)
glsl/pp: Do not try to enable extension `all'.
Diffstat (limited to 'src/glsl/pp/sl_pp_extension.c')
-rw-r--r--src/glsl/pp/sl_pp_extension.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/src/glsl/pp/sl_pp_extension.c b/src/glsl/pp/sl_pp_extension.c
index 677fb8a0e6f..1f00d94ebac 100644
--- a/src/glsl/pp/sl_pp_extension.c
+++ b/src/glsl/pp/sl_pp_extension.c
@@ -137,8 +137,11 @@ sl_pp_process_extension(struct sl_pp_context *context,
return -1;
}
out.token = SL_PP_EXTENSION_REQUIRE;
- assert(extension);
- extension->enabled = 1;
+
+ if (extension_name != context->dict.all) {
+ assert(extension);
+ extension->enabled = 1;
+ }
} else if (behavior == context->dict.enable) {
if (out.data.extension == -1) {
/* Warning: the extension cannot be enabled. */
@@ -149,24 +152,33 @@ sl_pp_process_extension(struct sl_pp_context *context,
return -1;
}
out.token = SL_PP_EXTENSION_ENABLE;
- assert(extension);
- extension->enabled = 1;
+
+ if (extension_name != context->dict.all) {
+ assert(extension);
+ extension->enabled = 1;
+ }
} else if (behavior == context->dict.warn) {
if (out.data.extension == -1) {
/* Warning: the extension is not supported. */
return 0;
}
out.token = SL_PP_EXTENSION_WARN;
- assert(extension);
- extension->enabled = 1;
+
+ if (extension_name != context->dict.all) {
+ assert(extension);
+ extension->enabled = 1;
+ }
} else if (behavior == context->dict.disable) {
if (out.data.extension == -1) {
/* Warning: the extension is not supported. */
return 0;
}
out.token = SL_PP_EXTENSION_DISABLE;
- assert(extension);
- extension->enabled = 0;
+
+ if (extension_name != context->dict.all) {
+ assert(extension);
+ extension->enabled = 0;
+ }
} else {
strcpy(context->error_msg, "unrecognised behavior name");
return -1;