Mesa (master): glsl: Fix preprocessor define argument parsing for dead sections.

Michał Król michal at kemper.freedesktop.org
Mon Jun 8 18:54:12 UTC 2009


Module: Mesa
Branch: master
Commit: 19a54d9f1055c366fd77026dd67007a8d5921f58
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=19a54d9f1055c366fd77026dd67007a8d5921f58

Author: Michal Krol <michal at vmware.com>
Date:   Mon Jun  8 20:52:47 2009 +0200

glsl: Fix preprocessor define argument parsing for dead sections.

---

 src/mesa/shader/slang/slang_preprocess.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/shader/slang/slang_preprocess.c b/src/mesa/shader/slang/slang_preprocess.c
index c3df76d..c16a111 100644
--- a/src/mesa/shader/slang/slang_preprocess.c
+++ b/src/mesa/shader/slang/slang_preprocess.c
@@ -1035,11 +1035,11 @@ preprocess_source (slang_string *output, const char *source,
 
                /* Parse optional macro parameters. */
                while (prod[i++] != PARAM_END) {
-                  if (state.cond.top->effective) {
-                     pp_symbol *param;
+                  pp_symbol *param;
 
-                     id = (const char *) (&prod[i]);
-                     idlen = _mesa_strlen (id);
+                  id = (const char *) (&prod[i]);
+                  idlen = _mesa_strlen (id);
+                  if (state.cond.top->effective) {
                      pp_annotate (output, "%s, ", id);
                      param = pp_symbols_push (&symbol->parameters);
                      if (param == NULL)




More information about the mesa-commit mailing list