summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2005-04-22 10:28:53 +0000
committerMichal Krol <[email protected]>2005-04-22 10:28:53 +0000
commit19fb77ee7b02782b383f5ffe30854d0b36dc845e (patch)
tree32ebf01966ce57b22df108f882c01fc18548a1ec /src/mesa/shader/slang
parentb10d080b1e1f64c2663dde5532b7bcae4fa75325 (diff)
Cosmetic changes.
Diffstat (limited to 'src/mesa/shader/slang')
-rw-r--r--src/mesa/shader/slang/slang_preprocess.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/mesa/shader/slang/slang_preprocess.c b/src/mesa/shader/slang/slang_preprocess.c
index 7159db7e1e2..b1f62ded3da 100644
--- a/src/mesa/shader/slang/slang_preprocess.c
+++ b/src/mesa/shader/slang/slang_preprocess.c
@@ -28,9 +28,9 @@
* \author Michal Krol
*/
-#include "imports.h"
-#include "slang_compile.h"
+#include "imports.h"
#include "grammar_mesa.h"
+#include "slang_compile.h"
#include "slang_preprocess.h"
static const char *slang_version_syn =
@@ -66,12 +66,18 @@ int _slang_preprocess_version (const char *text, unsigned int *version, unsigned
grammar_destroy (id);
+ /* there can be multiple #version directives - grab the last one */
I = prod;
while (I < prod + size)
{
- *version = (unsigned int) I[0] + (unsigned int) I[1] * 100;
- *eaten = (unsigned int) I[2] + ((unsigned int) I[3] << 8) +
- ((unsigned int) I[4] << 16) + ((unsigned int) I[5] << 24);
+ *version =
+ (unsigned int) I[0] +
+ (unsigned int) I[1] * 100;
+ *eaten =
+ ((unsigned int) I[2]) +
+ ((unsigned int) I[3] << 8) +
+ ((unsigned int) I[4] << 16) +
+ ((unsigned int) I[5] << 24);
I += 6;
}