summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Krol <mjkrol@gmail.org>2006-04-18 10:47:19 +0000
committerMichal Krol <mjkrol@gmail.org>2006-04-18 10:47:19 +0000
commit2f8496b5655cbd66711745fcfd87e0e528c50229 (patch)
tree8f094bff1a3bd6070af345d090435f70ad0c9cdc
parentd55de658b559437272a88a5e8743304996044fff (diff)
Remove carriage-return chars *ONLY*.
-rwxr-xr-xsrc/mesa/shader/slang/library/gc_to_bin.c172
-rwxr-xr-xsrc/mesa/shader/slang/library/slang_common_builtin.gc1352
-rw-r--r--src/mesa/shader/slang/library/slang_common_builtin_gc.h1294
-rwxr-xr-xsrc/mesa/shader/slang/library/slang_core.gc3358
-rw-r--r--src/mesa/shader/slang/library/slang_core_gc.h1076
-rwxr-xr-xsrc/mesa/shader/slang/library/slang_fragment_builtin.gc136
-rw-r--r--src/mesa/shader/slang/library/slang_fragment_builtin_gc.h158
-rw-r--r--src/mesa/shader/slang/library/slang_shader.syn3034
-rw-r--r--src/mesa/shader/slang/library/slang_shader_syn.h1514
-rwxr-xr-xsrc/mesa/shader/slang/library/slang_version.syn236
-rwxr-xr-xsrc/mesa/shader/slang/library/slang_version_syn.h128
-rwxr-xr-xsrc/mesa/shader/slang/library/slang_vertex_builtin.gc110
-rw-r--r--src/mesa/shader/slang/library/slang_vertex_builtin_gc.h156
-rw-r--r--src/mesa/shader/slang/slang_analyse.c200
-rw-r--r--src/mesa/shader/slang/slang_analyse.h100
-rw-r--r--src/mesa/shader/slang/slang_assemble.c2928
-rw-r--r--src/mesa/shader/slang/slang_assemble.h428
-rw-r--r--src/mesa/shader/slang/slang_assemble_assignment.c388
-rw-r--r--src/mesa/shader/slang/slang_assemble_assignment.h84
-rw-r--r--src/mesa/shader/slang/slang_assemble_conditional.c896
-rw-r--r--src/mesa/shader/slang/slang_assemble_conditional.h102
-rw-r--r--src/mesa/shader/slang/slang_assemble_constructor.c770
-rw-r--r--src/mesa/shader/slang/slang_assemble_constructor.h128
-rw-r--r--src/mesa/shader/slang/slang_assemble_typeinfo.c1174
-rw-r--r--src/mesa/shader/slang/slang_assemble_typeinfo.h232
-rw-r--r--src/mesa/shader/slang/slang_compile.h52
-rw-r--r--src/mesa/shader/slang/slang_compile_function.c380
-rw-r--r--src/mesa/shader/slang/slang_compile_function.h168
-rw-r--r--src/mesa/shader/slang/slang_compile_operation.c204
-rw-r--r--src/mesa/shader/slang/slang_compile_operation.h234
-rw-r--r--src/mesa/shader/slang/slang_compile_struct.c356
-rw-r--r--src/mesa/shader/slang/slang_compile_struct.h122
-rw-r--r--src/mesa/shader/slang/slang_compile_variable.c738
-rw-r--r--src/mesa/shader/slang/slang_compile_variable.h186
-rw-r--r--src/mesa/shader/slang/slang_execute.c1134
-rw-r--r--src/mesa/shader/slang/slang_execute.h168
-rw-r--r--src/mesa/shader/slang/slang_execute_x86.c1130
-rw-r--r--src/mesa/shader/slang/slang_library_noise.c1002
-rw-r--r--src/mesa/shader/slang/slang_library_noise.h84
-rw-r--r--src/mesa/shader/slang/slang_library_texsample.c284
-rw-r--r--src/mesa/shader/slang/slang_library_texsample.h88
-rw-r--r--src/mesa/shader/slang/slang_mesa.h72
-rw-r--r--src/mesa/shader/slang/slang_preprocess.c172
-rw-r--r--src/mesa/shader/slang/slang_preprocess.h82
-rw-r--r--src/mesa/shader/slang/slang_storage.c158
-rw-r--r--src/mesa/shader/slang/slang_utility.c224
-rw-r--r--src/mesa/shader/slang/slang_utility.h148
-rw-r--r--src/mesa/shader/slang/traverse_wrap.h224
48 files changed, 13782 insertions, 13782 deletions
diff --git a/src/mesa/shader/slang/library/gc_to_bin.c b/src/mesa/shader/slang/library/gc_to_bin.c
index 5f176257a9..749c57a032 100755
--- a/src/mesa/shader/slang/library/gc_to_bin.c
+++ b/src/mesa/shader/slang/library/gc_to_bin.c
@@ -1,86 +1,86 @@
-#include "../../grammar/grammar_crt.h"
-#include "../../grammar/grammar_crt.c"
-#include <stdio.h>
-
-static const char *slang_shader_syn =
-#include "slang_shader_syn.h"
-;
-
-static void gc_to_bin (grammar id, const char *in, const char *out)
-{
- FILE *f;
- byte *source, *prod;
- unsigned int size, i, line = 0;
-
- printf ("Precompiling %s\n", in);
-
- f = fopen (in, "r");
- if (f == NULL)
- return;
- fseek (f, 0, SEEK_END);
- size = ftell (f);
- fseek (f, 0, SEEK_SET);
- source = (byte *) grammar_alloc_malloc (size + 1);
- source[fread (source, 1, size, f)] = '\0';
- fclose (f);
-
- if (!grammar_fast_check (id, source, &prod, &size, 65536))
- {
- grammar_alloc_free (source);
- return;
- }
-
- f = fopen (out, "w");
- fprintf (f, "\n");
- fprintf (f, "/* DO NOT EDIT - THIS FILE AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */\n");
- fprintf (f, "/* %s */\n", in);
- fprintf (f, "\n");
- for (i = 0; i < size; i++)
- {
- unsigned int a;
- if (prod[i] < 10)
- a = 1;
- else if (prod[i] < 100)
- a = 2;
- else
- a = 3;
- if (i < size - 1)
- a++;
- if (line + a >= 100)
- {
- fprintf (f, "\n");
- line = 0;
- }
- line += a;
- fprintf (f, "%d", prod[i]);
- if (i < size - 1)
- fprintf (f, ",");
- }
- fprintf (f, "\n");
- fclose (f);
- grammar_alloc_free (prod);
-}
-
-int main ()
-{
- grammar id;
-
- id = grammar_load_from_text ((const byte *) slang_shader_syn);
- if (id == 0)
- return 1;
-
- grammar_set_reg8 (id, (const byte *) "parsing_builtin", 1);
-
- grammar_set_reg8 (id, (const byte *) "shader_type", 1);
- gc_to_bin (id, "slang_core.gc", "slang_core_gc.h");
- gc_to_bin (id, "slang_common_builtin.gc", "slang_common_builtin_gc.h");
- gc_to_bin (id, "slang_fragment_builtin.gc", "slang_fragment_builtin_gc.h");
-
- grammar_set_reg8 (id, (const byte *) "shader_type", 2);
- gc_to_bin (id, "slang_vertex_builtin.gc", "slang_vertex_builtin_gc.h");
-
- grammar_destroy (id);
-
- return 0;
-}
-
+#include "../../grammar/grammar_crt.h"
+#include "../../grammar/grammar_crt.c"
+#include <stdio.h>
+
+static const char *slang_shader_syn =
+#include "slang_shader_syn.h"
+;
+
+static void gc_to_bin (grammar id, const char *in, const char *out)
+{
+ FILE *f;
+ byte *source, *prod;
+ unsigned int size, i, line = 0;
+
+ printf ("Precompiling %s\n", in);
+
+ f = fopen (in, "r");
+ if (f == NULL)
+ return;
+ fseek (f, 0, SEEK_END);
+ size = ftell (f);
+ fseek (f, 0, SEEK_SET);
+ source = (byte *) grammar_alloc_malloc (size + 1);
+ source[fread (source, 1, size, f)] = '\0';
+ fclose (f);
+
+ if (!grammar_fast_check (id, source, &prod, &size, 65536))
+ {
+ grammar_alloc_free (source);
+ return;
+ }
+
+ f = fopen (out, "w");
+ fprintf (f, "\n");
+ fprintf (f, "/* DO NOT EDIT - THIS FILE AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */\n");
+ fprintf (f, "/* %s */\n", in);
+ fprintf (f, "\n");
+ for (i = 0; i < size; i++)
+ {
+ unsigned int a;
+ if (prod[i] < 10)
+ a = 1;
+ else if (prod[i] < 100)
+ a = 2;
+ else
+ a = 3;
+ if (i < size - 1)
+ a++;
+ if (line + a >= 100)
+ {
+ fprintf (f, "\n");
+ line = 0;
+ }
+ line += a;
+ fprintf (f, "%d", prod[i]);
+ if (i < size - 1)
+ fprintf (f, ",");
+ }
+ fprintf (f, "\n");
+ fclose (f);
+ grammar_alloc_free (prod);
+}
+
+int main ()
+{
+ grammar id;
+
+ id = grammar_load_from_text ((const byte *) slang_shader_syn);
+ if (id == 0)
+ return 1;
+
+ grammar_set_reg8 (id, (const byte *) "parsing_builtin", 1);
+
+ grammar_set_reg8 (id, (const byte *) "shader_type", 1);
+ gc_to_bin (id, "slang_core.gc", "slang_core_gc.h");
+ gc_to_bin (id, "slang_common_builtin.gc", "slang_common_builtin_gc.h");
+ gc_to_bin (id, "slang_fragment_builtin.gc", "slang_fragment_builtin_gc.h");
+
+ grammar_set_reg8 (id, (const byte *) "shader_type", 2);
+ gc_to_bin (id, "slang_vertex_builtin.gc", "slang_vertex_builtin_gc.h");
+
+ grammar_destroy (id);
+
+ return 0;
+}
+
diff --git a/src/mesa/shader/slang/library/slang_common_builtin.gc b/src/mesa/shader/slang/library/slang_common_builtin.gc
index 58728377a3..768cef5474 100755
--- a/src/mesa/shader/slang/library/slang_common_builtin.gc
+++ b/src/mesa/shader/slang/library/slang_common_builtin.gc
@@ -1,27 +1,27 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
//
// From Shader Spec, ver. 1.10, rev. 59
//
@@ -161,15 +161,15 @@ uniform gl_FogParameters gl_Fog;
float radians (float deg) {
return 3.141593 * deg / 180.0;
-}
+}
vec2 radians (vec2 deg) {
return vec2 (3.141593) * deg / vec2 (180.0);
-}
+}
vec3 radians (vec3 deg) {
return vec3 (3.141593) * deg / vec3 (180.0);
-}
+}
vec4 radians (vec4 deg) {
return vec4 (3.141593) * deg / vec4 (180.0);
@@ -177,226 +177,226 @@ vec4 radians (vec4 deg) {
float degrees (float rad) {
return 180.0 * rad / 3.141593;
-}
+}
vec2 degrees (vec2 rad) {
return vec2 (180.0) * rad / vec2 (3.141593);
-}
+}
vec3 degrees (vec3 rad) {
return vec3 (180.0) * rad / vec3 (3.141593);
-}
+}
vec4 degrees (vec4 rad) {
return vec4 (180.0) * rad / vec4 (3.141593);
}
-float sin (float angle) {
- float x;
+float sin (float angle) {
+ float x;
__asm float_sine x, angle;
return x;
-}
+}
vec2 sin (vec2 angle) {
- return vec2 (
- sin (angle.x),
- sin (angle.y)
- );
-}
+ return vec2 (
+ sin (angle.x),
+ sin (angle.y)
+ );
+}
vec3 sin (vec3 angle) {
- return vec3 (
- sin (angle.x),
- sin (angle.y),
- sin (angle.z)
+ return vec3 (
+ sin (angle.x),
+ sin (angle.y),
+ sin (angle.z)
);
-}
+}
vec4 sin (vec4 angle) {
- return vec4 (
- sin (angle.x),
- sin (angle.y),
- sin (angle.z),
- sin (angle.w)
+ return vec4 (
+ sin (angle.x),
+ sin (angle.y),
+ sin (angle.z),
+ sin (angle.w)
);
}
float cos (float angle) {
return sin (angle + 1.5708);
-}
+}
vec2 cos (vec2 angle) {
- return vec2 (
- cos (angle.x),
- cos (angle.y)
+ return vec2 (
+ cos (angle.x),
+ cos (angle.y)
);
-}
+}
vec3 cos (vec3 angle) {
- return vec3 (
- cos (angle.x),
- cos (angle.y),
- cos (angle.z)
+ return vec3 (
+ cos (angle.x),
+ cos (angle.y),
+ cos (angle.z)
);
-}
+}
vec4 cos (vec4 angle) {
- return vec4 (
- cos (angle.x),
- cos (angle.y),
- cos (angle.z),
- cos (angle.w)
+ return vec4 (
+ cos (angle.x),
+ cos (angle.y),
+ cos (angle.z),
+ cos (angle.w)
);
}
float tan (float angle) {
return sin (angle) / cos (angle);
-}
+}
vec2 tan (vec2 angle) {
- return vec2 (
- tan (angle.x),
- tan (angle.y)
+ return vec2 (
+ tan (angle.x),
+ tan (angle.y)
);
-}
+}
vec3 tan (vec3 angle) {
- return vec3 (
- tan (angle.x),
- tan (angle.y),
- tan (angle.z)
+ return vec3 (
+ tan (angle.x),
+ tan (angle.y),
+ tan (angle.z)
);
-}
+}
vec4 tan (vec4 angle) {
- return vec4 (
- tan (angle.x),
- tan (angle.y),
- tan (angle.z),
- tan (angle.w)
+ return vec4 (
+ tan (angle.x),
+ tan (angle.y),
+ tan (angle.z),
+ tan (angle.w)
);
}
float asin (float x) {
- float y;
- __asm float_arcsine y, x;
+ float y;
+ __asm float_arcsine y, x;
return y;
-}
+}
vec2 asin (vec2 v) {
- return vec2 (
- asin (v.x),
- asin (v.y)
+ return vec2 (
+ asin (v.x),
+ asin (v.y)
);
-}
+}
vec3 asin (vec3 v) {
- return vec3 (
- asin (v.x),
- asin (v.y),
- asin (v.z)
+ return vec3 (
+ asin (v.x),
+ asin (v.y),
+ asin (v.z)
);
-}
+}
vec4 asin (vec4 v) {
- return vec4 (
- asin (v.x),
- asin (v.y),
- asin (v.z),
- asin (v.w)
+ return vec4 (
+ asin (v.x),
+ asin (v.y),
+ asin (v.z),
+ asin (v.w)
);
}
float acos (float x) {
return 1.5708 - asin (x);
-}
+}
vec2 acos (vec2 v) {
- return vec2 (
- acos (v.x),
- acos (v.y)
+ return vec2 (
+ acos (v.x),
+ acos (v.y)
);
-}
+}
vec3 acos (vec3 v) {
- return vec3 (
- acos (v.x),
- acos (v.y),
- acos (v.z)
+ return vec3 (
+ acos (v.x),
+ acos (v.y),
+ acos (v.z)
);
-}
+}
vec4 acos (vec4 v) {
- return vec4 (
- acos (v.x),
- acos (v.y),
- acos (v.z),
- acos (v.w)
- );
-}
-
-float atan (float y_over_x) {
- float z;
- __asm float_arctan z, y_over_x;
- return z;
-}
-
-vec2 atan (vec2 y_over_x) {
- return vec2 (
- atan (y_over_x.x),
- atan (y_over_x.y)
- );
-}
-
-vec3 atan (vec3 y_over_x) {
- return vec3 (
- atan (y_over_x.x),
- atan (y_over_x.y),
- atan (y_over_x.z)
- );
-}
-
-vec4 atan (vec4 y_over_x) {
- return vec4 (
- atan (y_over_x.x),
- atan (y_over_x.y),
- atan (y_over_x.z),
- atan (y_over_x.w)
- );
-}
-
-float atan (float y, float x) {
+ return vec4 (
+ acos (v.x),
+ acos (v.y),
+ acos (v.z),
+ acos (v.w)
+ );
+}
+
+float atan (float y_over_x) {
+ float z;
+ __asm float_arctan z, y_over_x;
+ return z;
+}
+
+vec2 atan (vec2 y_over_x) {
+ return vec2 (
+ atan (y_over_x.x),
+ atan (y_over_x.y)
+ );
+}
+
+vec3 atan (vec3 y_over_x) {
+ return vec3 (
+ atan (y_over_x.x),
+ atan (y_over_x.y),
+ atan (y_over_x.z)
+ );
+}
+
+vec4 atan (vec4 y_over_x) {
+ return vec4 (
+ atan (y_over_x.x),
+ atan (y_over_x.y),
+ atan (y_over_x.z),
+ atan (y_over_x.w)
+ );
+}
+
+float atan (float y, float x) {
float z = atan (y / x);
- if (x < 0.0)
- {
- if (y < 0.0)
- return z - 3.141593;
- return z + 3.141593;
- }
+ if (x < 0.0)
+ {
+ if (y < 0.0)
+ return z - 3.141593;
+ return z + 3.141593;
+ }
return z;
-}
+}
vec2 atan (vec2 u, vec2 v) {
- return vec2 (
- atan (u.x, v.x),
- atan (u.y, v.y)
+ return vec2 (
+ atan (u.x, v.x),
+ atan (u.y, v.y)
);
-}
+}
vec3 atan (vec3 u, vec3 v) {
- return vec3 (
- atan (u.x, v.x),
- atan (u.y, v.y),
- atan (u.z, v.z)
+ return vec3 (
+ atan (u.x, v.x),
+ atan (u.y, v.y),
+ atan (u.z, v.z)
);
-}
+}
vec4 atan (vec4 u, vec4 v) {
- return vec4 (
- atan (u.x, v.x),
- atan (u.y, v.y),
- atan (u.z, v.z),
- atan (u.w, v.w)
+ return vec4 (
+ atan (u.x, v.x),
+ atan (u.y, v.y),
+ atan (u.z, v.z),
+ atan (u.w, v.w)
);
}
@@ -404,93 +404,93 @@ vec4 atan (vec4 u, vec4 v) {
// 8.2 Exponential Functions
//
-float pow (float x, float y) {
- float p;
+float pow (float x, float y) {
+ float p;
__asm float_power p, x, y;
return p;
-}
+}
vec2 pow (vec2 v, vec2 u) {
- return vec2 (
- pow (v.x, u.x),
- pow (v.y, u.y)
+ return vec2 (
+ pow (v.x, u.x),
+ pow (v.y, u.y)
);
-}
+}
vec3 pow (vec3 v, vec3 u) {
- return vec3 (
- pow (v.x, u.x),
- pow (v.y, u.y),
- pow (v.z, u.z)
+ return vec3 (
+ pow (v.x, u.x),
+ pow (v.y, u.y),
+ pow (v.z, u.z)
);
-}
+}
vec4 pow (vec4 v, vec4 u) {
- return vec4 (
- pow (v.x, u.x),
- pow (v.y, u.y),
- pow (v.z, u.z),
- pow (v.w, u.w)
+ return vec4 (
+ pow (v.x, u.x),
+ pow (v.y, u.y),
+ pow (v.z, u.z),
+ pow (v.w, u.w)
);
}
float exp (float x) {
return pow (2.71828183, x);
-}
+}
vec2 exp (vec2 v) {
return pow (vec2 (2.71828183), v);
-}
+}
vec3 exp (vec3 v) {
return pow (vec3 (2.71828183), v);
-}
+}
vec4 exp (vec4 v) {
return pow (vec4 (2.71828183), v);
}
-float log2 (float x) {
- float y;
- __asm float_log2 y, x;
- return y;
-}
-
-vec2 log2 (vec2 v) {
- return vec2 (
- log2 (v.x),
- log2 (v.y)
- );
-}
-
-vec3 log2 (vec3 v) {
- return vec3 (
- log2 (v.x),
- log2 (v.y),
- log2 (v.z)
- );
-}
-
-vec4 log2 (vec4 v) {
- return vec4 (
- log2 (v.x),
- log2 (v.y),
- log2 (v.z),
- log2 (v.w)
- );
-}
-
+float log2 (float x) {
+ float y;
+ __asm float_log2 y, x;
+ return y;
+}
+
+vec2 log2 (vec2 v) {
+ return vec2 (
+ log2 (v.x),
+ log2 (v.y)
+ );
+}
+
+vec3 log2 (vec3 v) {
+ return vec3 (
+ log2 (v.x),
+ log2 (v.y),
+ log2 (v.z)
+ );
+}
+
+vec4 log2 (vec4 v) {
+ return vec4 (
+ log2 (v.x),
+ log2 (v.y),
+ log2 (v.z),
+ log2 (v.w)
+ );
+}
+
float log (float x) {
return log2 (x) / log2 (2.71828183);
-}
+}
vec2 log (vec2 v) {
return log2 (v) / log2 (vec2 (2.71828183));
-}
+}
vec3 log (vec3 v) {
return log2 (v) / log2 (vec3 (2.71828183));
-}
+}
vec4 log (vec4 v) {
return log2 (v) / log2 (vec4 (2.71828183));
@@ -498,15 +498,15 @@ vec4 log (vec4 v) {
float exp2 (float x) {
return pow (2.0, x);
-}
+}
vec2 exp2 (vec2 v) {
return pow (vec2 (2.0), v);
-}
+}
vec3 exp2 (vec3 v) {
return pow (vec3 (2.0), v);
-}
+}
vec4 exp2 (vec4 v) {
return pow (vec4 (2.0), v);
@@ -514,15 +514,15 @@ vec4 exp2 (vec4 v) {
float sqrt (float x) {
return pow (x, 0.5);
-}
+}
vec2 sqrt (vec2 v) {
return pow (v, vec2 (0.5));
-}
+}
vec3 sqrt (vec3 v) {
return pow (v, vec3 (0.5));
-}
+}
vec4 sqrt (vec4 v) {
return pow (v, vec4 (0.5));
@@ -530,15 +530,15 @@ vec4 sqrt (vec4 v) {
float inversesqrt (float x) {
return 1.0 / sqrt (x);
-}
+}
vec2 inversesqrt (vec2 v) {
return vec2 (1.0) / sqrt (v);
-}
+}
vec3 inversesqrt (vec3 v) {
return vec3 (1.0) / sqrt (v);
-}
+}
vec4 inversesqrt (vec4 v) {
return vec4 (1.0) / sqrt (v);
@@ -550,159 +550,159 @@ vec4 inversesqrt (vec4 v) {
float abs (float x) {
return x >= 0.0 ? x : -x;
-}
+}
-vec2 abs (vec2 v) {
- return vec2 (
- abs (v.x),
- abs (v.y)
+vec2 abs (vec2 v) {
+ return vec2 (
+ abs (v.x),
+ abs (v.y)
);
-}
+}
vec3 abs (vec3 v) {
- return vec3 (
- abs (v.x),
- abs (v.y),
- abs (v.z)
+ return vec3 (
+ abs (v.x),
+ abs (v.y),
+ abs (v.z)
);
-}
+}
vec4 abs (vec4 v) {
- return vec4 (
- abs (v.x),
- abs (v.y),
- abs (v.z),
- abs (v.w)
+ return vec4 (
+ abs (v.x),
+ abs (v.y),
+ abs (v.z),
+ abs (v.w)
);
}
float sign (float x) {
return x > 0.0 ? 1.0 : x < 0.0 ? -1.0 : 0.0;
-}
+}
vec2 sign (vec2 v) {
- return vec2 (
- sign (v.x),
- sign (v.y)
+ return vec2 (
+ sign (v.x),
+ sign (v.y)
);
-}
+}
vec3 sign (vec3 v) {
- return vec3 (
- sign (v.x),
- sign (v.y),
- sign (v.z)
+ return vec3 (
+ sign (v.x),
+ sign (v.y),
+ sign (v.z)
);
-}
+}
vec4 sign (vec4 v) {
- return vec4 (
- sign (v.x),
- sign (v.y),
- sign (v.z),
- sign (v.w)
- );
-}
-
-float floor (float x) {
- float y;
- __asm float_floor y, x;
- return y;
-}
-
-vec2 floor (vec2 v) {
- return vec2 (
- floor (v.x),
- floor (v.y)
- );
-}
-
-vec3 floor (vec3 v) {
- return vec3 (
- floor (v.x),
- floor (v.y),
- floor (v.z)
- );
-}
-
-vec4 floor (vec4 v) {
- return vec4 (
- floor (v.x),
- floor (v.y),
- floor (v.z),
- floor (v.w)
- );
-}
-
-float ceil (float x) {
- float y;
- __asm float_ceil y, x;
- return y;
-}
-
-vec2 ceil (vec2 v) {
- return vec2 (
- ceil (v.x),
- ceil (v.y)
- );
-}
-
-vec3 ceil (vec3 v) {
- return vec3 (
- ceil (v.x),
- ceil (v.y),
- ceil (v.z)
- );
-}
-
-vec4 ceil (vec4 v) {
- return vec4 (
- ceil (v.x),
- ceil (v.y),
- ceil (v.z),
- ceil (v.w)
- );
-}
-
-float fract (float x) {
- return x - floor (x);
-}
-
-vec2 fract (vec2 v) {
- return v - floor (v);
-}
-
-vec3 fract (vec3 v) {
- return v - floor (v);
-}
-
-vec4 fract (vec4 v) {
- return v - floor (v);
-}
+ return vec4 (
+ sign (v.x),
+ sign (v.y),
+ sign (v.z),
+ sign (v.w)
+ );
+}
+
+float floor (float x) {
+ float y;
+ __asm float_floor y, x;
+ return y;
+}
+
+vec2 floor (vec2 v) {
+ return vec2 (
+ floor (v.x),
+ floor (v.y)
+ );
+}
+
+vec3 floor (vec3 v) {
+ return vec3 (
+ floor (v.x),
+ floor (v.y),
+ floor (v.z)
+ );
+}
+
+vec4 floor (vec4 v) {
+ return vec4 (
+ floor (v.x),
+ floor (v.y),
+ floor (v.z),
+ floor (v.w)
+ );
+}
+
+float ceil (float x) {
+ float y;
+ __asm float_ceil y, x;
+ return y;
+}
+
+vec2 ceil (vec2 v) {
+ return vec2 (
+ ceil (v.x),
+ ceil (v.y)
+ );
+}
+
+vec3 ceil (vec3 v) {
+ return vec3 (
+ ceil (v.x),
+ ceil (v.y),
+ ceil (v.z)
+ );
+}
+
+vec4 ceil (vec4 v) {
+ return vec4 (
+ ceil (v.x),
+ ceil (v.y),
+ ceil (v.z),
+ ceil (v.w)
+ );
+}
+
+float fract (float x) {
+ return x - floor (x);
+}
+
+vec2 fract (vec2 v) {
+ return v - floor (v);
+}
+
+vec3 fract (vec3 v) {
+ return v - floor (v);
+}
+
+vec4 fract (vec4 v) {
+ return v - floor (v);
+}
float mod (float x, float y) {
return x - y * floor (x / y);
-}
+}
vec2 mod (vec2 v, float u) {
return v - u * floor (v / u);
-}
+}
vec3 mod (vec3 v, float u) {
return v - u * floor (v / u);
-}
+}
vec4 mod (vec4 v, float u) {
return v - u * floor (v / u);
-}
+}
vec2 mod (vec2 v, vec2 u) {
return v - u * floor (v / u);
-}
+}
vec3 mod (vec3 v, vec3 u) {
return v - u * floor (v / u);
-}
+}
vec4 mod (vec4 v, vec4 u) {
return v - u * floor (v / u);
@@ -710,107 +710,107 @@ vec4 mod (vec4 v, vec4 u) {
float min (float x, float y) {
return x < y ? x : y;
-}
-
-vec2 min (vec2 v, vec2 u) {
- return vec2 (
- min (v.x, u.x),
- min (v.y, u.y)
- );
-}
-
-vec3 min (vec3 v, vec3 u) {
- return vec3 (
- min (v.x, u.x),
- min (v.y, u.y),
- min (v.z, u.z)
- );
-}
-
-vec4 min (vec4 v, vec4 u) {
- return vec4 (
- min (v.x, u.x),
- min (v.y, u.y),
- min (v.z, u.z),
- min (v.w, u.w)
- );
-}
-
+}
+
+vec2 min (vec2 v, vec2 u) {
+ return vec2 (
+ min (v.x, u.x),
+ min (v.y, u.y)
+ );
+}
+
+vec3 min (vec3 v, vec3 u) {
+ return vec3 (
+ min (v.x, u.x),
+ min (v.y, u.y),
+ min (v.z, u.z)
+ );
+}
+
+vec4 min (vec4 v, vec4 u) {
+ return vec4 (
+ min (v.x, u.x),
+ min (v.y, u.y),
+ min (v.z, u.z),
+ min (v.w, u.w)
+ );
+}
+
vec2 min (vec2 v, float y) {
return min (v, vec2 (y));
-}
+}
vec3 min (vec3 v, float y) {
return min (v, vec3 (y));
-}
+}
vec4 min (vec4 v, float y) {
return min (v, vec4 (y));
-}
+}
float max (float x, float y) {
return x < y ? y : x;
-}
-
-vec2 max (vec2 v, vec2 u) {
- return vec2 (
- max (v.x, u.x),
- max (v.y, u.y)
- );
-}
-
-vec3 max (vec3 v, vec3 u) {
- return vec3 (
- max (v.x, u.x),
- max (v.y, u.y),
- max (v.z, u.z)
- );
-}
-
-vec4 max (vec4 v, vec4 u) {
- return vec4 (
- max (v.x, u.x),
- max (v.y, u.y),
- max (v.z, u.z),
- max (v.w, u.w)
- );
-}
-
+}
+
+vec2 max (vec2 v, vec2 u) {
+ return vec2 (
+ max (v.x, u.x),
+ max (v.y, u.y)
+ );
+}
+
+vec3 max (vec3 v, vec3 u) {
+ return vec3 (
+ max (v.x, u.x),
+ max (v.y, u.y),
+ max (v.z, u.z)
+ );
+}
+
+vec4 max (vec4 v, vec4 u) {
+ return vec4 (
+ max (v.x, u.x),
+ max (v.y, u.y),
+ max (v.z, u.z),
+ max (v.w, u.w)
+ );
+}
+
vec2 max (vec2 v, float y) {
return max (v, vec2 (y));
-}
+}
vec3 max (vec3 v, float y) {
return max (v, vec3 (y));
-}
+}
vec4 max (vec4 v, float y) {
return max (v, vec4 (y));
-}
+}
float clamp (float x, float minVal, float maxVal) {
return min (max (x, minVal), maxVal);
-}
+}
vec2 clamp (vec2 x, float minVal, float maxVal) {
return min (max (x, minVal), maxVal);
-}
+}
vec3 clamp (vec3 x, float minVal, float maxVal) {
return min (max (x, minVal), maxVal);
-}
+}
vec4 clamp (vec4 x, float minVal, float maxVal) {
return min (max (x, minVal), maxVal);
-}
+}
vec2 clamp (vec2 x, vec2 minVal, vec2 maxVal) {
return min (max (x, minVal), maxVal);
-}
+}
vec3 clamp (vec3 x, vec3 minVal, vec3 maxVal) {
return min (max (x, minVal), maxVal);
-}
+}
vec4 clamp (vec4 x, vec4 minVal, vec4 maxVal) {
return min (max (x, minVal), maxVal);
@@ -818,27 +818,27 @@ vec4 clamp (vec4 x, vec4 minVal, vec4 maxVal) {
float mix (float x, float y, float a) {
return x * (1.0 - a) + y * a;
-}
+}
vec2 mix (vec2 x, vec2 y, float a) {
return x * (1.0 - a) + y * a;
-}
+}
vec3 mix (vec3 x, vec3 y, float a) {
return x * (1.0 - a) + y * a;
-}
+}
vec4 mix (vec4 x, vec4 y, float a) {
return x * (1.0 - a) + y * a;
-}
+}
vec2 mix (vec2 x, vec2 y, vec2 a) {
return x * (1.0 - a) + y * a;
-}
+}
vec3 mix (vec3 x, vec3 y, vec3 a) {
return x * (1.0 - a) + y * a;
-}
+}
vec4 mix (vec4 x, vec4 y, vec4 a) {
return x * (1.0 - a) + y * a;
@@ -846,96 +846,96 @@ vec4 mix (vec4 x, vec4 y, vec4 a) {
float step (float edge, float x) {
return x < edge ? 0.0 : 1.0;
-}
-
-vec2 step (vec2 edge, vec2 v) {
- return vec2 (
- step (edge.x, v.x),
- step (edge.y, v.y)
- );
-}
-
-vec3 step (vec3 edge, vec3 v) {
- return vec3 (
- step (edge.x, v.x),
- step (edge.y, v.y),
- step (edge.z, v.z)
- );
-}
-
-vec4 step (vec4 edge, vec4 v) {
- return vec4 (
- step (edge.x, v.x),
- step (edge.y, v.y),
- step (edge.z, v.z),
- step (edge.w, v.w)
- );
-}
-
+}
+
+vec2 step (vec2 edge, vec2 v) {
+ return vec2 (
+ step (edge.x, v.x),
+ step (edge.y, v.y)
+ );
+}
+
+vec3 step (vec3 edge, vec3 v) {
+ return vec3 (
+ step (edge.x, v.x),
+ step (edge.y, v.y),
+ step (edge.z, v.z)
+ );
+}
+
+vec4 step (vec4 edge, vec4 v) {
+ return vec4 (
+ step (edge.x, v.x),
+ step (edge.y, v.y),
+ step (edge.z, v.z),
+ step (edge.w, v.w)
+ );
+}
+
vec2 step (float edge, vec2 v) {
return step (vec2 (edge), v);
}
-
+
vec3 step (float edge, vec3 v) {
return step (vec3 (edge), v);
-}
+}
vec4 step (float edge, vec4 v) {
return step (vec4 (edge), v);
-}
+}
float smoothstep (float edge0, float edge1, float x) {
float t = clamp ((x - edge0) / (edge1 - edge0), 0.0, 1.0);
return t * t * (3.0 - 2.0 * t);
-}
-
-vec2 smoothstep (vec2 edge0, vec2 edge1, vec2 v) {
- return vec2 (
- smoothstep (edge0.x, edge1.x, v.x),
- smoothstep (edge0.y, edge1.y, v.y)
- );
-}
-
-vec3 smoothstep (vec3 edge0, vec3 edge1, vec3 v) {
- return vec3 (
- smoothstep (edge0.x, edge1.x, v.x),
- smoothstep (edge0.y, edge1.y, v.y),
- smoothstep (edge0.z, edge1.z, v.z)
- );
-}
-
-vec4 smoothstep (vec4 edge0, vec4 edge1, vec4 v) {
- return vec4 (
- smoothstep (edge0.x, edge1.x, v.x),
- smoothstep (edge0.y, edge1.y, v.y),
- smoothstep (edge0.z, edge1.z, v.z),
- smoothstep (edge0.w, edge1.w, v.w)
- );
-}
-
+}
+
+vec2 smoothstep (vec2 edge0, vec2 edge1, vec2 v) {
+ return vec2 (
+ smoothstep (edge0.x, edge1.x, v.x),
+ smoothstep (edge0.y, edge1.y, v.y)
+ );
+}
+
+vec3 smoothstep (vec3 edge0, vec3 edge1, vec3 v) {
+ return vec3 (
+ smoothstep (edge0.x, edge1.x, v.x),
+ smoothstep (edge0.y, edge1.y, v.y),
+ smoothstep (edge0.z, edge1.z, v.z)
+ );
+}
+
+vec4 smoothstep (vec4 edge0, vec4 edge1, vec4 v) {
+ return vec4 (
+ smoothstep (edge0.x, edge1.x, v.x),
+ smoothstep (edge0.y, edge1.y, v.y),
+ smoothstep (edge0.z, edge1.z, v.z),
+ smoothstep (edge0.w, edge1.w, v.w)
+ );
+}
+
vec2 smoothstep (float edge0, float edge1, vec2 v) {
- return vec2 (
- smoothstep (edge0, edge1, v.x),
- smoothstep (edge0, edge1, v.y)
- );
-}
+ return vec2 (
+ smoothstep (edge0, edge1, v.x),
+ smoothstep (edge0, edge1, v.y)
+ );
+}
vec3 smoothstep (float edge0, float edge1, vec3 v) {
- return vec3 (
- smoothstep (edge0, edge1, v.x),
- smoothstep (edge0, edge1, v.y),
- smoothstep (edge0, edge1, v.z)
- );
-}
+ return vec3 (
+ smoothstep (edge0, edge1, v.x),
+ smoothstep (edge0, edge1, v.y),
+ smoothstep (edge0, edge1, v.z)
+ );
+}
vec4 smoothstep (float edge0, float edge1, vec4 v) {
- return vec4 (
- smoothstep (edge0, edge1, v.x),
- smoothstep (edge0, edge1, v.y),
- smoothstep (edge0, edge1, v.z),
- smoothstep (edge0, edge1, v.w)
- );
-}
+ return vec4 (
+ smoothstep (edge0, edge1, v.x),
+ smoothstep (edge0, edge1, v.y),
+ smoothstep (edge0, edge1, v.z),
+ smoothstep (edge0, edge1, v.w)
+ );
+}
//
// 8.4 Geometric Functions
@@ -943,15 +943,15 @@ vec4 smoothstep (float edge0, float edge1, vec4 v) {
float dot (float x, float y) {
return x * y;
-}
+}
float dot (vec2 v, vec2 u) {
return v.x * u.x + v.y * u.y;
-}
+}
float dot (vec3 v, vec3 u) {
return v.x * u.x + v.y * u.y + v.z * u.z;
-}
+}
float dot (vec4 v, vec4 u) {
return v.x * u.x + v.y * u.y + v.z * u.z + v.w * u.w;
@@ -959,15 +959,15 @@ float dot (vec4 v, vec4 u) {
float length (float x) {
return sqrt (dot (x, x));
-}
+}
float length (vec2 v) {
return sqrt (dot (v, v));
-}
+}
float length (vec3 v) {
return sqrt (dot (v, v));
-}
+}
float length (vec4 v) {
return sqrt (dot (v, v));
@@ -975,39 +975,39 @@ float length (vec4 v) {
float distance (float x, float y) {
return length (x - y);
-}
+}
float distance (vec2 v, vec2 u) {
return length (v - u);
-}
+}
float distance (vec3 v, vec3 u) {
return length (v - u);
-}
+}
float distance (vec4 v, vec4 u) {
return length (v - u);
}
vec3 cross (vec3 v, vec3 u) {
- return vec3 (
- v.y * u.z - u.y * v.z,
- v.z * u.x - u.z * v.x,
- v.x * u.y - u.x * v.y
- );
+ return vec3 (
+ v.y * u.z - u.y * v.z,
+ v.z * u.x - u.z * v.x,
+ v.x * u.y - u.x * v.y
+ );
}
float normalize (float x) {
return 1.0;
-}
+}
vec2 normalize (vec2 v) {
return v / length (v);
-}
+}
vec3 normalize (vec3 v) {
return v / length (v);
-}
+}
vec4 normalize (vec4 v) {
return v / length (v);
@@ -1015,15 +1015,15 @@ vec4 normalize (vec4 v) {
float faceforward (float N, float I, float Nref) {
return dot (Nref, I) < 0.0 ? N : -N;
-}
+}
vec2 faceforward (vec2 N, vec2 I, vec2 Nref) {
return dot (Nref, I) < 0.0 ? N : -N;
-}
+}
vec3 faceforward (vec3 N, vec3 I, vec3 Nref) {
return dot (Nref, I) < 0.0 ? N : -N;
-}
+}
vec4 faceforward (vec4 N, vec4 I, vec4 Nref) {
return dot (Nref, I) < 0.0 ? N : -N;
@@ -1031,15 +1031,15 @@ vec4 faceforward (vec4 N, vec4 I, vec4 Nref) {
float reflect (float I, float N) {
return I - 2.0 * dot (N, I) * N;
-}
+}
vec2 reflect (vec2 I, vec2 N) {
return I - 2.0 * dot (N, I) * N;
-}
+}
vec3 reflect (vec3 I, vec3 N) {
return I - 2.0 * dot (N, I) * N;
-}
+}
vec4 reflect (vec4 I, vec4 N) {
return I - 2.0 * dot (N, I) * N;
@@ -1050,26 +1050,26 @@ float refract (float I, float N, float eta) {
if (k < 0.0)
return 0.0;
return eta * I - (eta * dot (N, I) + sqrt (k)) * N;
-}
+}
vec2 refract (vec2 I, vec2 N, float eta) {
- float k = 1.0 - eta * eta * (1.0 - dot (N, I) * dot (N, I));
- if (k < 0.0)
- return 0.0;
+ float k = 1.0 - eta * eta * (1.0 - dot (N, I) * dot (N, I));
+ if (k < 0.0)
+ return 0.0;
return eta * I - (eta * dot (N, I) + sqrt (k)) * N;
-}
+}
vec3 refract (vec3 I, vec3 N, float eta) {
- float k = 1.0 - eta * eta * (1.0 - dot (N, I) * dot (N, I));
- if (k < 0.0)
- return 0.0;
+ float k = 1.0 - eta * eta * (1.0 - dot (N, I) * dot (N, I));
+ if (k < 0.0)
+ return 0.0;
return eta * I - (eta * dot (N, I) + sqrt (k)) * N;
-}
+}
vec4 refract (vec4 I, vec4 N, float eta) {
- float k = 1.0 - eta * eta * (1.0 - dot (N, I) * dot (N, I));
- if (k < 0.0)
- return 0.0;
+ float k = 1.0 - eta * eta * (1.0 - dot (N, I) * dot (N, I));
+ if (k < 0.0)
+ return 0.0;
return eta * I - (eta * dot (N, I) + sqrt (k)) * N;
}
@@ -1079,11 +1079,11 @@ vec4 refract (vec4 I, vec4 N, float eta) {
mat2 matrixCompMult (mat2 m, mat2 n) {
return mat2 (m[0] * n[0], m[1] * n[1]);
-}
+}
mat3 matrixCompMult (mat3 m, mat3 n) {
return mat3 (m[0] * n[0], m[1] * n[1], m[2] * n[2]);
-}
+}
mat4 matrixCompMult (mat4 m, mat4 n) {
return mat4 (m[0] * n[0], m[1] * n[1], m[2] * n[2], m[3] * n[3]);
@@ -1093,25 +1093,25 @@ mat4 matrixCompMult (mat4 m, mat4 n) {
// 8.6 Vector Relational Functions
//
-bvec2 lessThan (vec2 v, vec2 u) {
+bvec2 lessThan (vec2 v, vec2 u) {
return bvec2 (v.x < u.x, v.y < u.y);
-}
+}
bvec3 lessThan (vec3 v, vec3 u) {
return bvec3 (v.x < u.x, v.y < u.y, v.z < u.z);
-}
+}
bvec4 lessThan (vec4 v, vec4 u) {
return bvec4 (v.x < u.x, v.y < u.y, v.z < u.z, v.w < u.w);
-}
+}
bvec2 lessThan (ivec2 v, ivec2 u) {
return bvec2 (v.x < u.x, v.y < u.y);
-}
+}
bvec3 lessThan (ivec3 v, ivec3 u) {
return bvec3 (v.x < u.x, v.y < u.y, v.z < u.z);
-}
+}
bvec4 lessThan (ivec4 v, ivec4 u) {
return bvec4 (v.x < u.x, v.y < u.y, v.z < u.z, v.w < u.w);
@@ -1119,23 +1119,23 @@ bvec4 lessThan (ivec4 v, ivec4 u) {
bvec2 lessThanEqual (vec2 v, vec2 u) {
return bvec2 (v.x <= u.x, v.y <= u.y);
-}
+}
bvec3 lessThanEqual (vec3 v, vec3 u) {
return bvec3 (v.x <= u.x, v.y <= u.y, v.z <= u.z);
-}
+}
bvec4 lessThanEqual (vec4 v, vec4 u) {
return bvec4 (v.x <= u.x, v.y <= u.y, v.z <= u.z, v.w <= u.w);
-}
+}
bvec2 lessThanEqual (ivec2 v, ivec2 u) {
return bvec2 (v.x <= u.x, v.y <= u.y);
-}
+}
bvec3 lessThanEqual (ivec3 v, ivec3 u) {
return bvec3 (v.x <= u.x, v.y <= u.y, v.z <= u.z);
-}
+}
bvec4 lessThanEqual (ivec4 v, ivec4 u) {
return bvec4 (v.x <= u.x, v.y <= u.y, v.z <= u.z, v.w <= u.w);
@@ -1143,23 +1143,23 @@ bvec4 lessThanEqual (ivec4 v, ivec4 u) {
bvec2 greaterThan (vec2 v, vec2 u) {
return bvec2 (v.x > u.x, v.y > u.y);
-}
+}
bvec3 greaterThan (vec3 v, vec3 u) {
return bvec3 (v.x > u.x, v.y > u.y, v.z > u.z);
-}
+}
bvec4 greaterThan (vec4 v, vec4 u) {
return bvec4 (v.x > u.x, v.y > u.y, v.z > u.z, v.w > u.w);
-}
+}
bvec2 greaterThan (ivec2 v, ivec2 u) {
return bvec2 (v.x > u.x, v.y > u.y);
-}
+}
bvec3 greaterThan (ivec3 v, ivec3 u) {
return bvec3 (v.x > u.x, v.y > u.y, v.z > u.z);
-}
+}
bvec4 greaterThan (ivec4 v, ivec4 u) {
return bvec4 (v.x > u.x, v.y > u.y, v.z > u.z, v.w > u.w);
@@ -1167,23 +1167,23 @@ bvec4 greaterThan (ivec4 v, ivec4 u) {
bvec2 greaterThanEqual (vec2 v, vec2 u) {
return bvec2 (v.x >= u.x, v.y >= u.y);
-}
+}
bvec3 greaterThanEqual (vec3 v, vec3 u) {
return bvec3 (v.x >= u.x, v.y >= u.y, v.z >= u.z);
-}
+}
bvec4 greaterThanEqual (vec4 v, vec4 u) {
return bvec4 (v.x >= u.x, v.y >= u.y, v.z >= u.z, v.w >= u.w);
-}
+}
bvec2 greaterThanEqual (ivec2 v, ivec2 u) {
return bvec2 (v.x >= u.x, v.y >= u.y);
-}
+}
bvec3 greaterThanEqual (ivec3 v, ivec3 u) {
return bvec3 (v.x >= u.x, v.y >= u.y, v.z >= u.z);
-}
+}
bvec4 greaterThanEqual (ivec4 v, ivec4 u) {
return bvec4 (v.x >= u.x, v.y >= u.y, v.z >= u.z, v.w >= u.w);
@@ -1191,23 +1191,23 @@ bvec4 greaterThanEqual (ivec4 v, ivec4 u) {
bvec2 equal (vec2 v, vec2 u) {
return bvec2 (v.x == u.x, v.y == u.y);
-}
+}
bvec3 equal (vec3 v, vec3 u) {
return bvec3 (v.x == u.x, v.y == u.y, v.z == u.z);
-}
+}
bvec4 equal (vec4 v, vec4 u) {
return bvec4 (v.x == u.x, v.y == u.y, v.z == u.z, v.w == u.w);
-}
+}
bvec2 equal (ivec2 v, ivec2 u) {
return bvec2 (v.x == u.x, v.y == u.y);
-}
+}
bvec3 equal (ivec3 v, ivec3 u) {
return bvec3 (v.x == u.x, v.y == u.y, v.z == u.z);
-}
+}
bvec4 equal (ivec4 v, ivec4 u) {
return bvec4 (v.x == u.x, v.y == u.y, v.z == u.z, v.w == u.w);
@@ -1215,35 +1215,35 @@ bvec4 equal (ivec4 v, ivec4 u) {
bvec2 notEqual (vec2 v, vec2 u) {
return bvec2 (v.x != u.x, v.y != u.y);
-}
+}
bvec3 notEqual (vec3 v, vec3 u) {
return bvec3 (v.x != u.x, v.y != u.y, v.z != u.z);
-}
+}
bvec4 notEqual (vec4 v, vec4 u) {
return bvec4 (v.x != u.x, v.y != u.y, v.z != u.z, v.w != u.w);
-}
+}
bvec2 notEqual (ivec2 v, ivec2 u) {
return bvec2 (v.x != u.x, v.y != u.y);
-}
+}
bvec3 notEqual (ivec3 v, ivec3 u) {
return bvec3 (v.x != u.x, v.y != u.y, v.z != u.z);
-}
+}
bvec4 notEqual (ivec4 v, ivec4 u) {
- return bvec4 (v.x != u.x, v.y != u.y, v.z != u.z, v.w != u.w);
+ return bvec4 (v.x != u.x, v.y != u.y, v.z != u.z, v.w != u.w);
}
bool any (bvec2 v) {
return v.x || v.y;
-}
+}
bool any (bvec3 v) {
return v.x || v.y || v.z;
-}
+}
bool any (bvec4 v) {
return v.x || v.y || v.z || v.w;
@@ -1251,219 +1251,219 @@ bool any (bvec4 v) {
bool all (bvec2 v) {
return v.x && v.y;
-}
+}
bool all (bvec3 v) {
return v.x && v.y && v.z;
-}
+}
bool all (bvec4 v) {
return v.x && v.y && v.z && v.w;
}
-bvec2 not (bvec2 v) {
- return bvec2 (!v.x, !v.y);
-}
+bvec2 not (bvec2 v) {
+ return bvec2 (!v.x, !v.y);
+}
bvec3 not (bvec3 v) {
return bvec3 (!v.x, !v.y, !v.z);
-}
+}
bvec4 not (bvec4 v) {
- return bvec4 (!v.x, !v.y, !v.z, !v.w);
+ return bvec4 (!v.x, !v.y, !v.z, !v.w);
}
//
// 8.7 Texture Lookup Functions
//
-vec4 texture1D (sampler1D sampler, float coord) {
- vec4 texel;
- __asm vec4_tex1d texel, sampler, coord, 0.0;
+vec4 texture1D (sampler1D sampler, float coord) {
+ vec4 texel;
+ __asm vec4_tex1d texel, sampler, coord, 0.0;
return texel;
-}
+}
vec4 texture1DProj (sampler1D sampler, vec2 coord) {
return texture1D (sampler, coord.s / coord.t);
-}
+}
vec4 texture1DProj (sampler1D sampler, vec4 coord) {
return texture1D (sampler, coord.s / coord.q);
}
-vec4 texture2D (sampler2D sampler, vec2 coord) {
- vec4 texel;
- __asm vec4_tex2d texel, sampler, coord, 0.0;
+vec4 texture2D (sampler2D sampler, vec2 coord) {
+ vec4 texel;
+ __asm vec4_tex2d texel, sampler, coord, 0.0;
return texel;
-}
+}
-vec4 texture2DProj (sampler2D sampler, vec3 coord) {
+vec4 texture2DProj (sampler2D sampler, vec3 coord) {
return texture2D (sampler, vec2 (coord.s / coord.p, coord.t / coord.p));
-}
+}
-vec4 texture2DProj (sampler2D sampler, vec4 coord) {
+vec4 texture2DProj (sampler2D sampler, vec4 coord) {
return texture2D (sampler, vec2 (coord.s / coord.q, coord.t / coord.q));
}
-vec4 texture3D (sampler3D sampler, vec3 coord) {
- vec4 texel;
- __asm vec4_tex3d texel, sampler, coord, 0.0;
+vec4 texture3D (sampler3D sampler, vec3 coord) {
+ vec4 texel;
+ __asm vec4_tex3d texel, sampler, coord, 0.0;
return texel;
-}
+}
-vec4 texture3DProj (sampler3D sampler, vec4 coord) {
+vec4 texture3DProj (sampler3D sampler, vec4 coord) {
return texture3D (sampler, vec3 (coord.s / coord.q, coord.t / coord.q, coord.p / coord.q));
}
-vec4 textureCube (samplerCube sampler, vec3 coord) {
- vec4 texel;
- __asm vec4_texcube texel, sampler, coord, 0.0;
+vec4 textureCube (samplerCube sampler, vec3 coord) {
+ vec4 texel;
+ __asm vec4_texcube texel, sampler, coord, 0.0;
return texel;
}
-vec4 shadow1D (sampler1DShadow sampler, vec3 coord) {
- vec4 texel;
- __asm vec4_shad1d texel, sampler, coord, 0.0;
+vec4 shadow1D (sampler1DShadow sampler, vec3 coord) {
+ vec4 texel;
+ __asm vec4_shad1d texel, sampler, coord, 0.0;
return texel;
}
-vec4 shadow1DProj (sampler1DShadow sampler, vec4 coord) {
- return shadow1D (sampler, vec3 (coord.s / coord.q, 0.0, coord.p / coord.q));
-}
-
-vec4 shadow2D (sampler2DShadow sampler, vec3 coord) {
- vec4 texel;
- __asm vec4_shad2d texel, sampler, coord, 0.0;
+vec4 shadow1DProj (sampler1DShadow sampler, vec4 coord) {
+ return shadow1D (sampler, vec3 (coord.s / coord.q, 0.0, coord.p / coord.q));
+}
+
+vec4 shadow2D (sampler2DShadow sampler, vec3 coord) {
+ vec4 texel;
+ __asm vec4_shad2d texel, sampler, coord, 0.0;
return texel;
-}
+}
-vec4 shadow2DProj (sampler2DShadow sampler, vec4 coord) {
+vec4 shadow2DProj (sampler2DShadow sampler, vec4 coord) {
return shadow2D (sampler, vec3 (coord.s / coord.q, coord.t / coord.q, coord.p / coord.q));
}
//
-// 8.9 Noise Functions
-//
+// 8.9 Noise Functions
+//
// AUTHOR: Stefan Gustavson (stegu@itn.liu.se), Nov 26, 2005
//
-float noise1 (float x) {
- float a;
- __asm float_noise1 a, x;
+float noise1 (float x) {
+ float a;
+ __asm float_noise1 a, x;
return a;
}
-float noise1 (vec2 x) {
- float a;
- __asm float_noise2 a, x;
+float noise1 (vec2 x) {
+ float a;
+ __asm float_noise2 a, x;
return a;
}
-float noise1 (vec3 x) {
- float a;
- __asm float_noise3 a, x;
+float noise1 (vec3 x) {
+ float a;
+ __asm float_noise3 a, x;
return a;
}
-float noise1 (vec4 x) {
- float a;
- __asm float_noise4 a, x;
+float noise1 (vec4 x) {
+ float a;
+ __asm float_noise4 a, x;
return a;
}
-vec2 noise2 (float x) {
- return vec2 (
- noise1 (x),
- noise1 (x + 19.34)
+vec2 noise2 (float x) {
+ return vec2 (
+ noise1 (x),
+ noise1 (x + 19.34)
);
}
-vec2 noise2 (vec2 x) {
- return vec2 (
- noise1 (x),
- noise1 (x + vec2 (19.34, 7.66))
+vec2 noise2 (vec2 x) {
+ return vec2 (
+ noise1 (x),
+ noise1 (x + vec2 (19.34, 7.66))
);
}
-vec2 noise2 (vec3 x) {
- return vec2 (
- noise1 (x),
- noise1 (x + vec3 (19.34, 7.66, 3.23))
+vec2 noise2 (vec3 x) {
+ return vec2 (
+ noise1 (x),
+ noise1 (x + vec3 (19.34, 7.66, 3.23))
);
}
-vec2 noise2 (vec4 x) {
- return vec2 (
- noise1 (x),
- noise1 (x + vec4 (19.34, 7.66, 3.23, 2.77))
+vec2 noise2 (vec4 x) {
+ return vec2 (
+ noise1 (x),
+ noise1 (x + vec4 (19.34, 7.66, 3.23, 2.77))
);
}
-vec3 noise3 (float x) {
- return vec3 (
- noise1 (x),
- noise1 (x + 19.34),
- noise1 (x + 5.47)
- );
+vec3 noise3 (float x) {
+ return vec3 (
+ noise1 (x),
+ noise1 (x + 19.34),
+ noise1 (x + 5.47)
+ );
}
-vec3 noise3 (vec2 x) {
- return vec3 (
- noise1 (x),
- noise1 (x + vec2 (19.34, 7.66)),
- noise1 (x + vec2 (5.47, 17.85))
- );
+vec3 noise3 (vec2 x) {
+ return vec3 (
+ noise1 (x),
+ noise1 (x + vec2 (19.34, 7.66)),
+ noise1 (x + vec2 (5.47, 17.85))
+ );
}
-vec3 noise3 (vec3 x) {
- return vec3 (
- noise1 (x),
- noise1 (x + vec3 (19.34, 7.66, 3.23)),
- noise1 (x + vec3 (5.47, 17.85, 11.04))
+vec3 noise3 (vec3 x) {
+ return vec3 (
+ noise1 (x),
+ noise1 (x + vec3 (19.34, 7.66, 3.23)),
+ noise1 (x + vec3 (5.47, 17.85, 11.04))
);
}
-vec3 noise3 (vec4 x) {
- return vec3 (
- noise1 (x),
- noise1 (x + vec4 (19.34, 7.66, 3.23, 2.77)),
- noise1 (x + vec4 (5.47, 17.85, 11.04, 13.19))
+vec3 noise3 (vec4 x) {
+ return vec3 (
+ noise1 (x),
+ noise1 (x + vec4 (19.34, 7.66, 3.23, 2.77)),
+ noise1 (x + vec4 (5.47, 17.85, 11.04, 13.19))
);
}
-vec4 noise4 (float x) {
- return vec4 (
- noise1 (x),
- noise1 (x + 19.34),
- noise1 (x + 5.47),
- noise1 (x + 23.54)
- );
+vec4 noise4 (float x) {
+ return vec4 (
+ noise1 (x),
+ noise1 (x + 19.34),
+ noise1 (x + 5.47),
+ noise1 (x + 23.54)
+ );
}
-vec4 noise4 (vec2 x) {
- return vec4 (
- noise1 (x),
- noise1 (x + vec2 (19.34, 7.66)),
- noise1 (x + vec2 (5.47, 17.85)),
- noise1 (x + vec2 (23.54, 29.11))
- );
+vec4 noise4 (vec2 x) {
+ return vec4 (
+ noise1 (x),
+ noise1 (x + vec2 (19.34, 7.66)),
+ noise1 (x + vec2 (5.47, 17.85)),
+ noise1 (x + vec2 (23.54, 29.11))
+ );
}
-vec4 noise4 (vec3 x) {
- return vec4 (
- noise1 (x),
- noise1 (x + vec3 (19.34, 7.66, 3.23)),
- noise1 (x + vec3 (5.47, 17.85, 11.04)),
- noise1 (x + vec3 (23.54, 29.11, 31.91))
- );
+vec4 noise4 (vec3 x) {
+ return vec4 (
+ noise1 (x),
+ noise1 (x + vec3 (19.34, 7.66, 3.23)),
+ noise1 (x + vec3 (5.47, 17.85, 11.04)),
+ noise1 (x + vec3 (23.54, 29.11, 31.91))
+ );
}
-vec4 noise4 (vec4 x) {
- return vec4 (
- noise1 (x),
- noise1 (x + vec4 (19.34, 7.66, 3.23, 2.77)),
- noise1 (x + vec4 (5.47, 17.85, 11.04, 13.19)),
- noise1 (x + vec4 (23.54, 29.11, 31.91, 37.48))
- );
+vec4 noise4 (vec4 x) {
+ return vec4 (
+ noise1 (x),
+ noise1 (x + vec4 (19.34, 7.66, 3.23, 2.77)),
+ noise1 (x + vec4 (5.47, 17.85, 11.04, 13.19)),
+ noise1 (x + vec4 (23.54, 29.11, 31.91, 37.48))
+ );
}
-
+
diff --git a/src/mesa/shader/slang/library/slang_common_builtin_gc.h b/src/mesa/shader/slang/library/slang_common_builtin_gc.h
index 836b8d4c2f..944378b3fb 100644
--- a/src/mesa/shader/slang/library/slang_common_builtin_gc.h
+++ b/src/mesa/shader/slang/library/slang_common_builtin_gc.h
@@ -1,647 +1,647 @@
-
-/* DO NOT EDIT - THIS FILE AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */
-/* slang_common_builtin.gc */
-
-3,2,2,1,5,1,103,108,95,77,97,120,76,105,103,104,116,115,0,2,16,10,56,0,0,0,2,2,1,5,1,103,108,95,77,
-97,120,67,108,105,112,80,108,97,110,101,115,0,2,16,10,54,0,0,0,2,2,1,5,1,103,108,95,77,97,120,84,
-101,120,116,117,114,101,85,110,105,116,115,0,2,16,10,56,0,0,0,2,2,1,5,1,103,108,95,77,97,120,84,
-101,120,116,117,114,101,67,111,111,114,100,115,0,2,16,10,56,0,0,0,2,2,1,5,1,103,108,95,77,97,120,
-86,101,114,116,101,120,65,116,116,114,105,98,115,0,2,16,10,49,54,0,0,0,2,2,1,5,1,103,108,95,77,97,
-120,86,101,114,116,101,120,85,110,105,102,111,114,109,67,111,109,112,111,110,101,110,116,115,0,2,
-16,10,53,49,50,0,0,0,2,2,1,5,1,103,108,95,77,97,120,86,97,114,121,105,110,103,70,108,111,97,116,
-115,0,2,16,10,51,50,0,0,0,2,2,1,5,1,103,108,95,77,97,120,86,101,114,116,101,120,84,101,120,116,117,
-114,101,73,109,97,103,101,85,110,105,116,115,0,2,16,8,48,0,0,0,2,2,1,5,1,103,108,95,77,97,120,67,
-111,109,98,105,110,101,100,84,101,120,116,117,114,101,73,109,97,103,101,85,110,105,116,115,0,2,16,
-10,50,0,0,0,2,2,1,5,1,103,108,95,77,97,120,84,101,120,116,117,114,101,73,109,97,103,101,85,110,105,
-116,115,0,2,16,10,50,0,0,0,2,2,1,5,1,103,108,95,77,97,120,70,114,97,103,109,101,110,116,85,110,105,
-102,111,114,109,67,111,109,112,111,110,101,110,116,115,0,2,16,10,54,52,0,0,0,2,2,1,5,1,103,108,95,
-77,97,120,68,114,97,119,66,117,102,102,101,114,115,0,2,16,10,49,0,0,0,2,2,4,15,1,103,108,95,77,111,
-100,101,108,86,105,101,119,77,97,116,114,105,120,0,0,0,2,2,4,15,1,103,108,95,80,114,111,106,101,99,
-116,105,111,110,77,97,116,114,105,120,0,0,0,2,2,4,15,1,103,108,95,77,111,100,101,108,86,105,101,
-119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,0,0,0,2,2,4,15,1,103,108,95,84,101,
-120,116,117,114,101,77,97,116,114,105,120,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,
-67,111,111,114,100,115,0,0,0,2,2,4,14,1,103,108,95,78,111,114,109,97,108,77,97,116,114,105,120,0,0,
-0,2,2,4,15,1,103,108,95,77,111,100,101,108,86,105,101,119,77,97,116,114,105,120,73,110,118,101,114,
-115,101,0,0,0,2,2,4,15,1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,73,
-110,118,101,114,115,101,0,0,0,2,2,4,15,1,103,108,95,77,111,100,101,108,86,105,101,119,80,114,111,
-106,101,99,116,105,111,110,77,97,116,114,105,120,73,110,118,101,114,115,101,0,0,0,2,2,4,15,1,103,
-108,95,84,101,120,116,117,114,101,77,97,116,114,105,120,73,110,118,101,114,115,101,0,3,18,103,108,
-95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,15,1,103,108,95,77,111,
-100,101,108,86,105,101,119,77,97,116,114,105,120,84,114,97,110,115,112,111,115,101,0,0,0,2,2,4,15,
-1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,84,114,97,110,115,112,111,
-115,101,0,0,0,2,2,4,15,1,103,108,95,77,111,100,101,108,86,105,101,119,80,114,111,106,101,99,116,
-105,111,110,77,97,116,114,105,120,84,114,97,110,115,112,111,115,101,0,0,0,2,2,4,15,1,103,108,95,84,
-101,120,116,117,114,101,77,97,116,114,105,120,84,114,97,110,115,112,111,115,101,0,3,18,103,108,95,
-77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,15,1,103,108,95,77,111,100,
-101,108,86,105,101,119,77,97,116,114,105,120,73,110,118,101,114,115,101,84,114,97,110,115,112,111,
-115,101,0,0,0,2,2,4,15,1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,73,
-110,118,101,114,115,101,84,114,97,110,115,112,111,115,101,0,0,0,2,2,4,15,1,103,108,95,77,111,100,
-101,108,86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,73,110,118,101,
-114,115,101,84,114,97,110,115,112,111,115,101,0,0,0,2,2,4,15,1,103,108,95,84,101,120,116,117,114,
-101,77,97,116,114,105,120,73,110,118,101,114,115,101,84,114,97,110,115,112,111,115,101,0,3,18,103,
-108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,9,1,103,108,95,78,
-111,114,109,97,108,83,99,97,108,101,0,0,0,2,2,0,22,103,108,95,68,101,112,116,104,82,97,110,103,101,
-80,97,114,97,109,101,116,101,114,115,0,9,110,101,97,114,0,0,0,1,9,102,97,114,0,0,0,1,9,100,105,102,
-102,0,0,0,0,0,0,2,2,4,23,103,108,95,68,101,112,116,104,82,97,110,103,101,80,97,114,97,109,101,116,
-101,114,115,0,1,103,108,95,68,101,112,116,104,82,97,110,103,101,0,0,0,2,2,4,12,1,103,108,95,67,108,
-105,112,80,108,97,110,101,0,3,18,103,108,95,77,97,120,67,108,105,112,80,108,97,110,101,115,0,0,0,2,
-2,0,22,103,108,95,80,111,105,110,116,80,97,114,97,109,101,116,101,114,115,0,9,115,105,122,101,0,0,
-0,1,9,115,105,122,101,77,105,110,0,0,0,1,9,115,105,122,101,77,97,120,0,0,0,1,9,102,97,100,101,84,
-104,114,101,115,104,111,108,100,83,105,122,101,0,0,0,1,9,100,105,115,116,97,110,99,101,67,111,110,
-115,116,97,110,116,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9,100,105,115,116,97,110,99,
-101,76,105,110,101,97,114,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9,100,105,115,116,97,
-110,99,101,81,117,97,100,114,97,116,105,99,65,116,116,101,110,117,97,116,105,111,110,0,0,0,0,0,0,2,
-2,4,23,103,108,95,80,111,105,110,116,80,97,114,97,109,101,116,101,114,115,0,1,103,108,95,80,111,
-105,110,116,0,0,0,2,2,0,22,103,108,95,77,97,116,101,114,105,97,108,80,97,114,97,109,101,116,101,
-114,115,0,12,101,109,105,115,115,105,111,110,0,0,0,1,12,97,109,98,105,101,110,116,0,0,0,1,12,100,
-105,102,102,117,115,101,0,0,0,1,12,115,112,101,99,117,108,97,114,0,0,0,1,9,115,104,105,110,105,110,
-101,115,115,0,0,0,0,0,0,2,2,4,23,103,108,95,77,97,116,101,114,105,97,108,80,97,114,97,109,101,116,
-101,114,115,0,1,103,108,95,70,114,111,110,116,77,97,116,101,114,105,97,108,0,0,0,2,2,4,23,103,108,
-95,77,97,116,101,114,105,97,108,80,97,114,97,109,101,116,101,114,115,0,1,103,108,95,66,97,99,107,
-77,97,116,101,114,105,97,108,0,0,0,2,2,0,22,103,108,95,76,105,103,104,116,83,111,117,114,99,101,80,
-97,114,97,109,101,116,101,114,115,0,12,97,109,98,105,101,110,116,0,0,0,1,12,100,105,102,102,117,
-115,101,0,0,0,1,12,115,112,101,99,117,108,97,114,0,0,0,1,12,112,111,115,105,116,105,111,110,0,0,0,
-1,12,104,97,108,102,86,101,99,116,111,114,0,0,0,1,11,115,112,111,116,68,105,114,101,99,116,105,111,
-110,0,0,0,1,9,115,112,111,116,69,120,112,111,110,101,110,116,0,0,0,1,9,115,112,111,116,67,117,116,
-111,102,102,0,0,0,1,9,115,112,111,116,67,111,115,67,117,116,111,102,102,0,0,0,1,9,99,111,110,115,
-116,97,110,116,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9,108,105,110,101,97,114,65,116,
-116,101,110,117,97,116,105,111,110,0,0,0,1,9,113,117,97,100,114,97,116,105,99,65,116,116,101,110,
-117,97,116,105,111,110,0,0,0,0,0,0,2,2,4,23,103,108,95,76,105,103,104,116,83,111,117,114,99,101,80,
-97,114,97,109,101,116,101,114,115,0,1,103,108,95,76,105,103,104,116,83,111,117,114,99,101,0,3,18,
-103,108,95,77,97,120,76,105,103,104,116,115,0,0,0,2,2,0,22,103,108,95,76,105,103,104,116,77,111,
-100,101,108,80,97,114,97,109,101,116,101,114,115,0,12,97,109,98,105,101,110,116,0,0,0,0,0,0,2,2,4,
-23,103,108,95,76,105,103,104,116,77,111,100,101,108,80,97,114,97,109,101,116,101,114,115,0,1,103,
-108,95,76,105,103,104,116,77,111,100,101,108,0,0,0,2,2,0,22,103,108,95,76,105,103,104,116,77,111,
-100,101,108,80,114,111,100,117,99,116,115,0,12,115,99,101,110,101,67,111,108,111,114,0,0,0,0,0,0,2,
-2,4,23,103,108,95,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,115,0,1,103,108,
-95,70,114,111,110,116,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,0,0,0,2,2,4,
-23,103,108,95,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,115,0,1,103,108,95,
-66,97,99,107,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,0,0,0,2,2,0,22,103,
-108,95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,12,97,109,98,105,101,110,116,0,0,0,1,12,
-100,105,102,102,117,115,101,0,0,0,1,12,115,112,101,99,117,108,97,114,0,0,0,0,0,0,2,2,4,23,103,108,
-95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,1,103,108,95,70,114,111,110,116,76,105,103,
-104,116,80,114,111,100,117,99,116,0,3,18,103,108,95,77,97,120,76,105,103,104,116,115,0,0,0,2,2,4,
-23,103,108,95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,1,103,108,95,66,97,99,107,76,105,
-103,104,116,80,114,111,100,117,99,116,0,3,18,103,108,95,77,97,120,76,105,103,104,116,115,0,0,0,2,2,
-4,12,1,103,108,95,84,101,120,116,117,114,101,69,110,118,67,111,108,111,114,0,3,18,103,108,95,77,97,
-120,84,101,120,116,117,114,101,73,109,97,103,101,85,110,105,116,115,0,0,0,2,2,4,12,1,103,108,95,69,
-121,101,80,108,97,110,101,83,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,
-100,115,0,0,0,2,2,4,12,1,103,108,95,69,121,101,80,108,97,110,101,84,0,3,18,103,108,95,77,97,120,84,
-101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,12,1,103,108,95,69,121,101,80,108,97,
-110,101,82,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,
-4,12,1,103,108,95,69,121,101,80,108,97,110,101,81,0,3,18,103,108,95,77,97,120,84,101,120,116,117,
-114,101,67,111,111,114,100,115,0,0,0,2,2,4,12,1,103,108,95,79,98,106,101,99,116,80,108,97,110,101,
-83,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,12,1,
-103,108,95,79,98,106,101,99,116,80,108,97,110,101,84,0,3,18,103,108,95,77,97,120,84,101,120,116,
-117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,12,1,103,108,95,79,98,106,101,99,116,80,108,97,110,
-101,82,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,
-12,1,103,108,95,79,98,106,101,99,116,80,108,97,110,101,81,0,3,18,103,108,95,77,97,120,84,101,120,
-116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,0,22,103,108,95,70,111,103,80,97,114,97,109,101,
-116,101,114,115,0,12,99,111,108,111,114,0,0,0,1,9,100,101,110,115,105,116,121,0,0,0,1,9,115,116,97,
-114,116,0,0,0,1,9,101,110,100,0,0,0,1,9,115,99,97,108,101,0,0,0,0,0,0,2,2,4,23,103,108,95,70,111,
-103,80,97,114,97,109,101,116,101,114,115,0,1,103,108,95,70,111,103,0,0,0,1,0,9,0,114,97,100,105,97,
-110,115,0,1,0,0,9,100,101,103,0,0,0,1,8,17,51,0,49,52,49,53,57,51,0,0,18,100,101,103,0,48,17,49,56,
-48,0,48,0,0,49,0,0,1,0,10,0,114,97,100,105,97,110,115,0,1,0,0,10,100,101,103,0,0,0,1,8,58,118,101,
-99,50,0,17,51,0,49,52,49,53,57,51,0,0,0,0,18,100,101,103,0,48,58,118,101,99,50,0,17,49,56,48,0,48,
-0,0,0,0,49,0,0,1,0,11,0,114,97,100,105,97,110,115,0,1,0,0,11,100,101,103,0,0,0,1,8,58,118,101,99,
-51,0,17,51,0,49,52,49,53,57,51,0,0,0,0,18,100,101,103,0,48,58,118,101,99,51,0,17,49,56,48,0,48,0,0,
-0,0,49,0,0,1,0,12,0,114,97,100,105,97,110,115,0,1,0,0,12,100,101,103,0,0,0,1,8,58,118,101,99,52,0,
-17,51,0,49,52,49,53,57,51,0,0,0,0,18,100,101,103,0,48,58,118,101,99,52,0,17,49,56,48,0,48,0,0,0,0,
-49,0,0,1,0,9,0,100,101,103,114,101,101,115,0,1,0,0,9,114,97,100,0,0,0,1,8,17,49,56,48,0,48,0,0,18,
-114,97,100,0,48,17,51,0,49,52,49,53,57,51,0,0,49,0,0,1,0,10,0,100,101,103,114,101,101,115,0,1,0,0,
-10,114,97,100,0,0,0,1,8,58,118,101,99,50,0,17,49,56,48,0,48,0,0,0,0,18,114,97,100,0,48,58,118,101,
-99,50,0,17,51,0,49,52,49,53,57,51,0,0,0,0,49,0,0,1,0,11,0,100,101,103,114,101,101,115,0,1,0,0,11,
-114,97,100,0,0,0,1,8,58,118,101,99,51,0,17,49,56,48,0,48,0,0,0,0,18,114,97,100,0,48,58,118,101,99,
-51,0,17,51,0,49,52,49,53,57,51,0,0,0,0,49,0,0,1,0,12,0,100,101,103,114,101,101,115,0,1,0,0,12,114,
-97,100,0,0,0,1,8,58,118,101,99,52,0,17,49,56,48,0,48,0,0,0,0,18,114,97,100,0,48,58,118,101,99,52,0,
-17,51,0,49,52,49,53,57,51,0,0,0,0,49,0,0,1,0,9,0,115,105,110,0,1,0,0,9,97,110,103,108,101,0,0,0,1,
-3,2,0,9,1,120,0,0,0,4,102,108,111,97,116,95,115,105,110,101,0,18,120,0,0,18,97,110,103,108,101,0,0,
-0,8,18,120,0,0,0,1,0,10,0,115,105,110,0,1,0,0,10,97,110,103,108,101,0,0,0,1,8,58,118,101,99,50,0,
-58,115,105,110,0,18,97,110,103,108,101,0,59,120,0,0,0,0,58,115,105,110,0,18,97,110,103,108,101,0,
-59,121,0,0,0,0,0,0,0,1,0,11,0,115,105,110,0,1,0,0,11,97,110,103,108,101,0,0,0,1,8,58,118,101,99,51,
-0,58,115,105,110,0,18,97,110,103,108,101,0,59,120,0,0,0,0,58,115,105,110,0,18,97,110,103,108,101,0,
-59,121,0,0,0,0,58,115,105,110,0,18,97,110,103,108,101,0,59,122,0,0,0,0,0,0,0,1,0,12,0,115,105,110,
-0,1,0,0,12,97,110,103,108,101,0,0,0,1,8,58,118,101,99,52,0,58,115,105,110,0,18,97,110,103,108,101,
-0,59,120,0,0,0,0,58,115,105,110,0,18,97,110,103,108,101,0,59,121,0,0,0,0,58,115,105,110,0,18,97,
-110,103,108,101,0,59,122,0,0,0,0,58,115,105,110,0,18,97,110,103,108,101,0,59,119,0,0,0,0,0,0,0,1,0,
-9,0,99,111,115,0,1,0,0,9,97,110,103,108,101,0,0,0,1,8,58,115,105,110,0,18,97,110,103,108,101,0,17,
-49,0,53,55,48,56,0,0,46,0,0,0,0,1,0,10,0,99,111,115,0,1,0,0,10,97,110,103,108,101,0,0,0,1,8,58,118,
-101,99,50,0,58,99,111,115,0,18,97,110,103,108,101,0,59,120,0,0,0,0,58,99,111,115,0,18,97,110,103,
-108,101,0,59,121,0,0,0,0,0,0,0,1,0,11,0,99,111,115,0,1,0,0,11,97,110,103,108,101,0,0,0,1,8,58,118,
-101,99,51,0,58,99,111,115,0,18,97,110,103,108,101,0,59,120,0,0,0,0,58,99,111,115,0,18,97,110,103,
-108,101,0,59,121,0,0,0,0,58,99,111,115,0,18,97,110,103,108,101,0,59,122,0,0,0,0,0,0,0,1,0,12,0,99,
-111,115,0,1,0,0,12,97,110,103,108,101,0,0,0,1,8,58,118,101,99,52,0,58,99,111,115,0,18,97,110,103,
-108,101,0,59,120,0,0,0,0,58,99,111,115,0,18,97,110,103,108,101,0,59,121,0,0,0,0,58,99,111,115,0,18,
-97,110,103,108,101,0,59,122,0,0,0,0,58,99,111,115,0,18,97,110,103,108,101,0,59,119,0,0,0,0,0,0,0,1,
-0,9,0,116,97,110,0,1,0,0,9,97,110,103,108,101,0,0,0,1,8,58,115,105,110,0,18,97,110,103,108,101,0,0,
-0,58,99,111,115,0,18,97,110,103,108,101,0,0,0,49,0,0,1,0,10,0,116,97,110,0,1,0,0,10,97,110,103,108,
-101,0,0,0,1,8,58,118,101,99,50,0,58,116,97,110,0,18,97,110,103,108,101,0,59,120,0,0,0,0,58,116,97,
-110,0,18,97,110,103,108,101,0,59,121,0,0,0,0,0,0,0,1,0,11,0,116,97,110,0,1,0,0,11,97,110,103,108,
-101,0,0,0,1,8,58,118,101,99,51,0,58,116,97,110,0,18,97,110,103,108,101,0,59,120,0,0,0,0,58,116,97,
-110,0,18,97,110,103,108,101,0,59,121,0,0,0,0,58,116,97,110,0,18,97,110,103,108,101,0,59,122,0,0,0,
-0,0,0,0,1,0,12,0,116,97,110,0,1,0,0,12,97,110,103,108,101,0,0,0,1,8,58,118,101,99,52,0,58,116,97,
-110,0,18,97,110,103,108,101,0,59,120,0,0,0,0,58,116,97,110,0,18,97,110,103,108,101,0,59,121,0,0,0,
-0,58,116,97,110,0,18,97,110,103,108,101,0,59,122,0,0,0,0,58,116,97,110,0,18,97,110,103,108,101,0,
-59,119,0,0,0,0,0,0,0,1,0,9,0,97,115,105,110,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,121,0,0,0,4,102,108,
-111,97,116,95,97,114,99,115,105,110,101,0,18,121,0,0,18,120,0,0,0,8,18,121,0,0,0,1,0,10,0,97,115,
-105,110,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,58,97,115,105,110,0,18,118,0,59,120,0,0,0,0,58,
-97,115,105,110,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,97,115,105,110,0,1,0,0,11,118,0,0,0,1,8,58,
-118,101,99,51,0,58,97,115,105,110,0,18,118,0,59,120,0,0,0,0,58,97,115,105,110,0,18,118,0,59,121,0,
-0,0,0,58,97,115,105,110,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,97,115,105,110,0,1,0,0,12,118,0,0,
-0,1,8,58,118,101,99,52,0,58,97,115,105,110,0,18,118,0,59,120,0,0,0,0,58,97,115,105,110,0,18,118,0,
-59,121,0,0,0,0,58,97,115,105,110,0,18,118,0,59,122,0,0,0,0,58,97,115,105,110,0,18,118,0,59,119,0,0,
-0,0,0,0,0,1,0,9,0,97,99,111,115,0,1,0,0,9,120,0,0,0,1,8,17,49,0,53,55,48,56,0,0,58,97,115,105,110,
-0,18,120,0,0,0,47,0,0,1,0,10,0,97,99,111,115,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,58,97,99,
-111,115,0,18,118,0,59,120,0,0,0,0,58,97,99,111,115,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,97,99,
-111,115,0,1,0,0,11,118,0,0,0,1,8,58,118,101,99,51,0,58,97,99,111,115,0,18,118,0,59,120,0,0,0,0,58,
-97,99,111,115,0,18,118,0,59,121,0,0,0,0,58,97,99,111,115,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,
-97,99,111,115,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,97,99,111,115,0,18,118,0,59,120,0,0,0,
-0,58,97,99,111,115,0,18,118,0,59,121,0,0,0,0,58,97,99,111,115,0,18,118,0,59,122,0,0,0,0,58,97,99,
-111,115,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,9,0,97,116,97,110,0,1,0,0,9,121,95,111,118,101,114,95,
-120,0,0,0,1,3,2,0,9,1,122,0,0,0,4,102,108,111,97,116,95,97,114,99,116,97,110,0,18,122,0,0,18,121,
-95,111,118,101,114,95,120,0,0,0,8,18,122,0,0,0,1,0,10,0,97,116,97,110,0,1,0,0,10,121,95,111,118,
-101,114,95,120,0,0,0,1,8,58,118,101,99,50,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,
-59,120,0,0,0,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,121,0,0,0,0,0,0,0,1,0,11,0,
-97,116,97,110,0,1,0,0,11,121,95,111,118,101,114,95,120,0,0,0,1,8,58,118,101,99,51,0,58,97,116,97,
-110,0,18,121,95,111,118,101,114,95,120,0,59,120,0,0,0,0,58,97,116,97,110,0,18,121,95,111,118,101,
-114,95,120,0,59,121,0,0,0,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,122,0,0,0,0,0,
-0,0,1,0,12,0,97,116,97,110,0,1,0,0,12,121,95,111,118,101,114,95,120,0,0,0,1,8,58,118,101,99,52,0,
-58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,120,0,0,0,0,58,97,116,97,110,0,18,121,95,
-111,118,101,114,95,120,0,59,121,0,0,0,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,
-122,0,0,0,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,119,0,0,0,0,0,0,0,1,0,9,0,97,
-116,97,110,0,1,0,0,9,121,0,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,122,0,2,58,97,116,97,110,0,18,121,0,18,
-120,0,49,0,0,0,0,10,18,120,0,17,48,0,48,0,0,40,0,2,10,18,121,0,17,48,0,48,0,0,40,0,8,18,122,0,17,
-51,0,49,52,49,53,57,51,0,0,47,0,9,14,0,8,18,122,0,17,51,0,49,52,49,53,57,51,0,0,46,0,0,9,14,0,8,18,
-122,0,0,0,1,0,10,0,97,116,97,110,0,1,0,0,10,117,0,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,58,
-97,116,97,110,0,18,117,0,59,120,0,0,18,118,0,59,120,0,0,0,0,58,97,116,97,110,0,18,117,0,59,121,0,0,
-18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,97,116,97,110,0,1,0,0,11,117,0,0,1,0,0,11,118,0,0,0,1,8,58,
-118,101,99,51,0,58,97,116,97,110,0,18,117,0,59,120,0,0,18,118,0,59,120,0,0,0,0,58,97,116,97,110,0,
-18,117,0,59,121,0,0,18,118,0,59,121,0,0,0,0,58,97,116,97,110,0,18,117,0,59,122,0,0,18,118,0,59,122,
-0,0,0,0,0,0,0,1,0,12,0,97,116,97,110,0,1,0,0,12,117,0,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,
-58,97,116,97,110,0,18,117,0,59,120,0,0,18,118,0,59,120,0,0,0,0,58,97,116,97,110,0,18,117,0,59,121,
-0,0,18,118,0,59,121,0,0,0,0,58,97,116,97,110,0,18,117,0,59,122,0,0,18,118,0,59,122,0,0,0,0,58,97,
-116,97,110,0,18,117,0,59,119,0,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,9,0,112,111,119,0,1,0,0,9,120,0,
-0,1,0,0,9,121,0,0,0,1,3,2,0,9,1,112,0,0,0,4,102,108,111,97,116,95,112,111,119,101,114,0,18,112,0,0,
-18,120,0,0,18,121,0,0,0,8,18,112,0,0,0,1,0,10,0,112,111,119,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,
-1,8,58,118,101,99,50,0,58,112,111,119,0,18,118,0,59,120,0,0,18,117,0,59,120,0,0,0,0,58,112,111,119,
-0,18,118,0,59,121,0,0,18,117,0,59,121,0,0,0,0,0,0,0,1,0,11,0,112,111,119,0,1,0,0,11,118,0,0,1,0,0,
-11,117,0,0,0,1,8,58,118,101,99,51,0,58,112,111,119,0,18,118,0,59,120,0,0,18,117,0,59,120,0,0,0,0,
-58,112,111,119,0,18,118,0,59,121,0,0,18,117,0,59,121,0,0,0,0,58,112,111,119,0,18,118,0,59,122,0,0,
-18,117,0,59,122,0,0,0,0,0,0,0,1,0,12,0,112,111,119,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,58,
-118,101,99,52,0,58,112,111,119,0,18,118,0,59,120,0,0,18,117,0,59,120,0,0,0,0,58,112,111,119,0,18,
-118,0,59,121,0,0,18,117,0,59,121,0,0,0,0,58,112,111,119,0,18,118,0,59,122,0,0,18,117,0,59,122,0,0,
-0,0,58,112,111,119,0,18,118,0,59,119,0,0,18,117,0,59,119,0,0,0,0,0,0,0,1,0,9,0,101,120,112,0,1,0,0,
-9,120,0,0,0,1,8,58,112,111,119,0,17,50,0,55,49,56,50,56,49,56,51,0,0,0,18,120,0,0,0,0,0,1,0,10,0,
-101,120,112,0,1,0,0,10,118,0,0,0,1,8,58,112,111,119,0,58,118,101,99,50,0,17,50,0,55,49,56,50,56,49,
-56,51,0,0,0,0,0,18,118,0,0,0,0,0,1,0,11,0,101,120,112,0,1,0,0,11,118,0,0,0,1,8,58,112,111,119,0,58,
-118,101,99,51,0,17,50,0,55,49,56,50,56,49,56,51,0,0,0,0,0,18,118,0,0,0,0,0,1,0,12,0,101,120,112,0,
-1,0,0,12,118,0,0,0,1,8,58,112,111,119,0,58,118,101,99,52,0,17,50,0,55,49,56,50,56,49,56,51,0,0,0,0,
-0,18,118,0,0,0,0,0,1,0,9,0,108,111,103,50,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,121,0,0,0,4,102,108,111,
-97,116,95,108,111,103,50,0,18,121,0,0,18,120,0,0,0,8,18,121,0,0,0,1,0,10,0,108,111,103,50,0,1,0,0,
-10,118,0,0,0,1,8,58,118,101,99,50,0,58,108,111,103,50,0,18,118,0,59,120,0,0,0,0,58,108,111,103,50,
-0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,108,111,103,50,0,1,0,0,11,118,0,0,0,1,8,58,118,101,99,51,
-0,58,108,111,103,50,0,18,118,0,59,120,0,0,0,0,58,108,111,103,50,0,18,118,0,59,121,0,0,0,0,58,108,
-111,103,50,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,108,111,103,50,0,1,0,0,12,118,0,0,0,1,8,58,118,
-101,99,52,0,58,108,111,103,50,0,18,118,0,59,120,0,0,0,0,58,108,111,103,50,0,18,118,0,59,121,0,0,0,
-0,58,108,111,103,50,0,18,118,0,59,122,0,0,0,0,58,108,111,103,50,0,18,118,0,59,119,0,0,0,0,0,0,0,1,
-0,9,0,108,111,103,0,1,0,0,9,120,0,0,0,1,8,58,108,111,103,50,0,18,120,0,0,0,58,108,111,103,50,0,17,
-50,0,55,49,56,50,56,49,56,51,0,0,0,0,49,0,0,1,0,10,0,108,111,103,0,1,0,0,10,118,0,0,0,1,8,58,108,
-111,103,50,0,18,118,0,0,0,58,108,111,103,50,0,58,118,101,99,50,0,17,50,0,55,49,56,50,56,49,56,51,0,
-0,0,0,0,0,49,0,0,1,0,11,0,108,111,103,0,1,0,0,11,118,0,0,0,1,8,58,108,111,103,50,0,18,118,0,0,0,58,
-108,111,103,50,0,58,118,101,99,51,0,17,50,0,55,49,56,50,56,49,56,51,0,0,0,0,0,0,49,0,0,1,0,12,0,
-108,111,103,0,1,0,0,12,118,0,0,0,1,8,58,108,111,103,50,0,18,118,0,0,0,58,108,111,103,50,0,58,118,
-101,99,52,0,17,50,0,55,49,56,50,56,49,56,51,0,0,0,0,0,0,49,0,0,1,0,9,0,101,120,112,50,0,1,0,0,9,
-120,0,0,0,1,8,58,112,111,119,0,17,50,0,48,0,0,0,18,120,0,0,0,0,0,1,0,10,0,101,120,112,50,0,1,0,0,
-10,118,0,0,0,1,8,58,112,111,119,0,58,118,101,99,50,0,17,50,0,48,0,0,0,0,0,18,118,0,0,0,0,0,1,0,11,
-0,101,120,112,50,0,1,0,0,11,118,0,0,0,1,8,58,112,111,119,0,58,118,101,99,51,0,17,50,0,48,0,0,0,0,0,
-18,118,0,0,0,0,0,1,0,12,0,101,120,112,50,0,1,0,0,12,118,0,0,0,1,8,58,112,111,119,0,58,118,101,99,
-52,0,17,50,0,48,0,0,0,0,0,18,118,0,0,0,0,0,1,0,9,0,115,113,114,116,0,1,0,0,9,120,0,0,0,1,8,58,112,
-111,119,0,18,120,0,0,17,48,0,53,0,0,0,0,0,0,1,0,10,0,115,113,114,116,0,1,0,0,10,118,0,0,0,1,8,58,
-112,111,119,0,18,118,0,0,58,118,101,99,50,0,17,48,0,53,0,0,0,0,0,0,0,0,1,0,11,0,115,113,114,116,0,
-1,0,0,11,118,0,0,0,1,8,58,112,111,119,0,18,118,0,0,58,118,101,99,51,0,17,48,0,53,0,0,0,0,0,0,0,0,1,
-0,12,0,115,113,114,116,0,1,0,0,12,118,0,0,0,1,8,58,112,111,119,0,18,118,0,0,58,118,101,99,52,0,17,
-48,0,53,0,0,0,0,0,0,0,0,1,0,9,0,105,110,118,101,114,115,101,115,113,114,116,0,1,0,0,9,120,0,0,0,1,
-8,17,49,0,48,0,0,58,115,113,114,116,0,18,120,0,0,0,49,0,0,1,0,10,0,105,110,118,101,114,115,101,115,
-113,114,116,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,17,49,0,48,0,0,0,0,58,115,113,114,116,0,18,
-118,0,0,0,49,0,0,1,0,11,0,105,110,118,101,114,115,101,115,113,114,116,0,1,0,0,11,118,0,0,0,1,8,58,
-118,101,99,51,0,17,49,0,48,0,0,0,0,58,115,113,114,116,0,18,118,0,0,0,49,0,0,1,0,12,0,105,110,118,
-101,114,115,101,115,113,114,116,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,17,49,0,48,0,0,0,0,58,
-115,113,114,116,0,18,118,0,0,0,49,0,0,1,0,9,0,97,98,115,0,1,0,0,9,120,0,0,0,1,8,18,120,0,17,48,0,
-48,0,0,43,18,120,0,18,120,0,54,31,0,0,1,0,10,0,97,98,115,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,
-0,58,97,98,115,0,18,118,0,59,120,0,0,0,0,58,97,98,115,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,97,
-98,115,0,1,0,0,11,118,0,0,0,1,8,58,118,101,99,51,0,58,97,98,115,0,18,118,0,59,120,0,0,0,0,58,97,98,
-115,0,18,118,0,59,121,0,0,0,0,58,97,98,115,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,97,98,115,0,1,
-0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,97,98,115,0,18,118,0,59,120,0,0,0,0,58,97,98,115,0,18,
-118,0,59,121,0,0,0,0,58,97,98,115,0,18,118,0,59,122,0,0,0,0,58,97,98,115,0,18,118,0,59,119,0,0,0,0,
-0,0,0,1,0,9,0,115,105,103,110,0,1,0,0,9,120,0,0,0,1,8,18,120,0,17,48,0,48,0,0,41,17,49,0,48,0,0,18,
-120,0,17,48,0,48,0,0,40,17,49,0,48,0,0,54,17,48,0,48,0,0,31,31,0,0,1,0,10,0,115,105,103,110,0,1,0,
-0,10,118,0,0,0,1,8,58,118,101,99,50,0,58,115,105,103,110,0,18,118,0,59,120,0,0,0,0,58,115,105,103,
-110,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,115,105,103,110,0,1,0,0,11,118,0,0,0,1,8,58,118,101,
-99,51,0,58,115,105,103,110,0,18,118,0,59,120,0,0,0,0,58,115,105,103,110,0,18,118,0,59,121,0,0,0,0,
-58,115,105,103,110,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,115,105,103,110,0,1,0,0,12,118,0,0,0,1,
-8,58,118,101,99,52,0,58,115,105,103,110,0,18,118,0,59,120,0,0,0,0,58,115,105,103,110,0,18,118,0,59,
-121,0,0,0,0,58,115,105,103,110,0,18,118,0,59,122,0,0,0,0,58,115,105,103,110,0,18,118,0,59,119,0,0,
-0,0,0,0,0,1,0,9,0,102,108,111,111,114,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,121,0,0,0,4,102,108,111,97,
-116,95,102,108,111,111,114,0,18,121,0,0,18,120,0,0,0,8,18,121,0,0,0,1,0,10,0,102,108,111,111,114,0,
-1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,58,102,108,111,111,114,0,18,118,0,59,120,0,0,0,0,58,102,
-108,111,111,114,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,102,108,111,111,114,0,1,0,0,11,118,0,0,0,
-1,8,58,118,101,99,51,0,58,102,108,111,111,114,0,18,118,0,59,120,0,0,0,0,58,102,108,111,111,114,0,
-18,118,0,59,121,0,0,0,0,58,102,108,111,111,114,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,102,108,
-111,111,114,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,102,108,111,111,114,0,18,118,0,59,120,0,
-0,0,0,58,102,108,111,111,114,0,18,118,0,59,121,0,0,0,0,58,102,108,111,111,114,0,18,118,0,59,122,0,
-0,0,0,58,102,108,111,111,114,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,9,0,99,101,105,108,0,1,0,0,9,120,
-0,0,0,1,3,2,0,9,1,121,0,0,0,4,102,108,111,97,116,95,99,101,105,108,0,18,121,0,0,18,120,0,0,0,8,18,
-121,0,0,0,1,0,10,0,99,101,105,108,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,58,99,101,105,108,0,
-18,118,0,59,120,0,0,0,0,58,99,101,105,108,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,99,101,105,108,
-0,1,0,0,11,118,0,0,0,1,8,58,118,101,99,51,0,58,99,101,105,108,0,18,118,0,59,120,0,0,0,0,58,99,101,
-105,108,0,18,118,0,59,121,0,0,0,0,58,99,101,105,108,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,99,
-101,105,108,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,99,101,105,108,0,18,118,0,59,120,0,0,0,
-0,58,99,101,105,108,0,18,118,0,59,121,0,0,0,0,58,99,101,105,108,0,18,118,0,59,122,0,0,0,0,58,99,
-101,105,108,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,9,0,102,114,97,99,116,0,1,0,0,9,120,0,0,0,1,8,18,
-120,0,58,102,108,111,111,114,0,18,120,0,0,0,47,0,0,1,0,10,0,102,114,97,99,116,0,1,0,0,10,118,0,0,0,
-1,8,18,118,0,58,102,108,111,111,114,0,18,118,0,0,0,47,0,0,1,0,11,0,102,114,97,99,116,0,1,0,0,11,
-118,0,0,0,1,8,18,118,0,58,102,108,111,111,114,0,18,118,0,0,0,47,0,0,1,0,12,0,102,114,97,99,116,0,1,
-0,0,12,118,0,0,0,1,8,18,118,0,58,102,108,111,111,114,0,18,118,0,0,0,47,0,0,1,0,9,0,109,111,100,0,1,
-0,0,9,120,0,0,1,0,0,9,121,0,0,0,1,8,18,120,0,18,121,0,58,102,108,111,111,114,0,18,120,0,18,121,0,
-49,0,0,48,47,0,0,1,0,10,0,109,111,100,0,1,0,0,10,118,0,0,1,0,0,9,117,0,0,0,1,8,18,118,0,18,117,0,
-58,102,108,111,111,114,0,18,118,0,18,117,0,49,0,0,48,47,0,0,1,0,11,0,109,111,100,0,1,0,0,11,118,0,
-0,1,0,0,9,117,0,0,0,1,8,18,118,0,18,117,0,58,102,108,111,111,114,0,18,118,0,18,117,0,49,0,0,48,47,
-0,0,1,0,12,0,109,111,100,0,1,0,0,12,118,0,0,1,0,0,9,117,0,0,0,1,8,18,118,0,18,117,0,58,102,108,111,
-111,114,0,18,118,0,18,117,0,49,0,0,48,47,0,0,1,0,10,0,109,111,100,0,1,0,0,10,118,0,0,1,0,0,10,117,
-0,0,0,1,8,18,118,0,18,117,0,58,102,108,111,111,114,0,18,118,0,18,117,0,49,0,0,48,47,0,0,1,0,11,0,
-109,111,100,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,18,118,0,18,117,0,58,102,108,111,111,114,0,
-18,118,0,18,117,0,49,0,0,48,47,0,0,1,0,12,0,109,111,100,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,
-18,118,0,18,117,0,58,102,108,111,111,114,0,18,118,0,18,117,0,49,0,0,48,47,0,0,1,0,9,0,109,105,110,
-0,1,0,0,9,120,0,0,1,0,0,9,121,0,0,0,1,8,18,120,0,18,121,0,40,18,120,0,18,121,0,31,0,0,1,0,10,0,109,
-105,110,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,1,8,58,118,101,99,50,0,58,109,105,110,0,18,118,0,59,
-120,0,0,18,117,0,59,120,0,0,0,0,58,109,105,110,0,18,118,0,59,121,0,0,18,117,0,59,121,0,0,0,0,0,0,0,
-1,0,11,0,109,105,110,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,118,101,99,51,0,58,109,105,110,0,
-18,118,0,59,120,0,0,18,117,0,59,120,0,0,0,0,58,109,105,110,0,18,118,0,59,121,0,0,18,117,0,59,121,0,
-0,0,0,58,109,105,110,0,18,118,0,59,122,0,0,18,117,0,59,122,0,0,0,0,0,0,0,1,0,12,0,109,105,110,0,1,
-0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,58,118,101,99,52,0,58,109,105,110,0,18,118,0,59,120,0,0,18,
-117,0,59,120,0,0,0,0,58,109,105,110,0,18,118,0,59,121,0,0,18,117,0,59,121,0,0,0,0,58,109,105,110,0,
-18,118,0,59,122,0,0,18,117,0,59,122,0,0,0,0,58,109,105,110,0,18,118,0,59,119,0,0,18,117,0,59,119,0,
-0,0,0,0,0,0,1,0,10,0,109,105,110,0,1,0,0,10,118,0,0,1,0,0,9,121,0,0,0,1,8,58,109,105,110,0,18,118,
-0,0,58,118,101,99,50,0,18,121,0,0,0,0,0,0,0,1,0,11,0,109,105,110,0,1,0,0,11,118,0,0,1,0,0,9,121,0,
-0,0,1,8,58,109,105,110,0,18,118,0,0,58,118,101,99,51,0,18,121,0,0,0,0,0,0,0,1,0,12,0,109,105,110,0,
-1,0,0,12,118,0,0,1,0,0,9,121,0,0,0,1,8,58,109,105,110,0,18,118,0,0,58,118,101,99,52,0,18,121,0,0,0,
-0,0,0,0,1,0,9,0,109,97,120,0,1,0,0,9,120,0,0,1,0,0,9,121,0,0,0,1,8,18,120,0,18,121,0,40,18,121,0,
-18,120,0,31,0,0,1,0,10,0,109,97,120,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,1,8,58,118,101,99,50,0,
-58,109,97,120,0,18,118,0,59,120,0,0,18,117,0,59,120,0,0,0,0,58,109,97,120,0,18,118,0,59,121,0,0,18,
-117,0,59,121,0,0,0,0,0,0,0,1,0,11,0,109,97,120,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,118,
-101,99,51,0,58,109,97,120,0,18,118,0,59,120,0,0,18,117,0,59,120,0,0,0,0,58,109,97,120,0,18,118,0,
-59,121,0,0,18,117,0,59,121,0,0,0,0,58,109,97,120,0,18,118,0,59,122,0,0,18,117,0,59,122,0,0,0,0,0,0,
-0,1,0,12,0,109,97,120,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,58,118,101,99,52,0,58,109,97,120,0,
-18,118,0,59,120,0,0,18,117,0,59,120,0,0,0,0,58,109,97,120,0,18,118,0,59,121,0,0,18,117,0,59,121,0,
-0,0,0,58,109,97,120,0,18,118,0,59,122,0,0,18,117,0,59,122,0,0,0,0,58,109,97,120,0,18,118,0,59,119,
-0,0,18,117,0,59,119,0,0,0,0,0,0,0,1,0,10,0,109,97,120,0,1,0,0,10,118,0,0,1,0,0,9,121,0,0,0,1,8,58,
-109,97,120,0,18,118,0,0,58,118,101,99,50,0,18,121,0,0,0,0,0,0,0,1,0,11,0,109,97,120,0,1,0,0,11,118,
-0,0,1,0,0,9,121,0,0,0,1,8,58,109,97,120,0,18,118,0,0,58,118,101,99,51,0,18,121,0,0,0,0,0,0,0,1,0,
-12,0,109,97,120,0,1,0,0,12,118,0,0,1,0,0,9,121,0,0,0,1,8,58,109,97,120,0,18,118,0,0,58,118,101,99,
-52,0,18,121,0,0,0,0,0,0,0,1,0,9,0,99,108,97,109,112,0,1,0,0,9,120,0,0,1,0,0,9,109,105,110,86,97,
-108,0,0,1,0,0,9,109,97,120,86,97,108,0,0,0,1,8,58,109,105,110,0,58,109,97,120,0,18,120,0,0,18,109,
-105,110,86,97,108,0,0,0,0,18,109,97,120,86,97,108,0,0,0,0,0,1,0,10,0,99,108,97,109,112,0,1,0,0,10,
-120,0,0,1,0,0,9,109,105,110,86,97,108,0,0,1,0,0,9,109,97,120,86,97,108,0,0,0,1,8,58,109,105,110,0,
-58,109,97,120,0,18,120,0,0,18,109,105,110,86,97,108,0,0,0,0,18,109,97,120,86,97,108,0,0,0,0,0,1,0,
-11,0,99,108,97,109,112,0,1,0,0,11,120,0,0,1,0,0,9,109,105,110,86,97,108,0,0,1,0,0,9,109,97,120,86,
-97,108,0,0,0,1,8,58,109,105,110,0,58,109,97,120,0,18,120,0,0,18,109,105,110,86,97,108,0,0,0,0,18,
-109,97,120,86,97,108,0,0,0,0,0,1,0,12,0,99,108,97,109,112,0,1,0,0,12,120,0,0,1,0,0,9,109,105,110,
-86,97,108,0,0,1,0,0,9,109,97,120,86,97,108,0,0,0,1,8,58,109,105,110,0,58,109,97,120,0,18,120,0,0,
-18,109,105,110,86,97,108,0,0,0,0,18,109,97,120,86,97,108,0,0,0,0,0,1,0,10,0,99,108,97,109,112,0,1,
-0,0,10,120,0,0,1,0,0,10,109,105,110,86,97,108,0,0,1,0,0,10,109,97,120,86,97,108,0,0,0,1,8,58,109,
-105,110,0,58,109,97,120,0,18,120,0,0,18,109,105,110,86,97,108,0,0,0,0,18,109,97,120,86,97,108,0,0,
-0,0,0,1,0,11,0,99,108,97,109,112,0,1,0,0,11,120,0,0,1,0,0,11,109,105,110,86,97,108,0,0,1,0,0,11,
-109,97,120,86,97,108,0,0,0,1,8,58,109,105,110,0,58,109,97,120,0,18,120,0,0,18,109,105,110,86,97,
-108,0,0,0,0,18,109,97,120,86,97,108,0,0,0,0,0,1,0,12,0,99,108,97,109,112,0,1,0,0,12,120,0,0,1,0,0,
-12,109,105,110,86,97,108,0,0,1,0,0,12,109,97,120,86,97,108,0,0,0,1,8,58,109,105,110,0,58,109,97,
-120,0,18,120,0,0,18,109,105,110,86,97,108,0,0,0,0,18,109,97,120,86,97,108,0,0,0,0,0,1,0,9,0,109,
-105,120,0,1,0,0,9,120,0,0,1,0,0,9,121,0,0,1,0,0,9,97,0,0,0,1,8,18,120,0,17,49,0,48,0,0,18,97,0,47,
-48,18,121,0,18,97,0,48,46,0,0,1,0,10,0,109,105,120,0,1,0,0,10,120,0,0,1,0,0,10,121,0,0,1,0,0,9,97,
-0,0,0,1,8,18,120,0,17,49,0,48,0,0,18,97,0,47,48,18,121,0,18,97,0,48,46,0,0,1,0,11,0,109,105,120,0,
-1,0,0,11,120,0,0,1,0,0,11,121,0,0,1,0,0,9,97,0,0,0,1,8,18,120,0,17,49,0,48,0,0,18,97,0,47,48,18,
-121,0,18,97,0,48,46,0,0,1,0,12,0,109,105,120,0,1,0,0,12,120,0,0,1,0,0,12,121,0,0,1,0,0,9,97,0,0,0,
-1,8,18,120,0,17,49,0,48,0,0,18,97,0,47,48,18,121,0,18,97,0,48,46,0,0,1,0,10,0,109,105,120,0,1,0,0,
-10,120,0,0,1,0,0,10,121,0,0,1,0,0,10,97,0,0,0,1,8,18,120,0,17,49,0,48,0,0,18,97,0,47,48,18,121,0,
-18,97,0,48,46,0,0,1,0,11,0,109,105,120,0,1,0,0,11,120,0,0,1,0,0,11,121,0,0,1,0,0,11,97,0,0,0,1,8,
-18,120,0,17,49,0,48,0,0,18,97,0,47,48,18,121,0,18,97,0,48,46,0,0,1,0,12,0,109,105,120,0,1,0,0,12,
-120,0,0,1,0,0,12,121,0,0,1,0,0,12,97,0,0,0,1,8,18,120,0,17,49,0,48,0,0,18,97,0,47,48,18,121,0,18,
-97,0,48,46,0,0,1,0,9,0,115,116,101,112,0,1,0,0,9,101,100,103,101,0,0,1,0,0,9,120,0,0,0,1,8,18,120,
-0,18,101,100,103,101,0,40,17,48,0,48,0,0,17,49,0,48,0,0,31,0,0,1,0,10,0,115,116,101,112,0,1,0,0,10,
-101,100,103,101,0,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,58,115,116,101,112,0,18,101,100,103,
-101,0,59,120,0,0,18,118,0,59,120,0,0,0,0,58,115,116,101,112,0,18,101,100,103,101,0,59,121,0,0,18,
-118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,115,116,101,112,0,1,0,0,11,101,100,103,101,0,0,1,0,0,11,118,0,
-0,0,1,8,58,118,101,99,51,0,58,115,116,101,112,0,18,101,100,103,101,0,59,120,0,0,18,118,0,59,120,0,
-0,0,0,58,115,116,101,112,0,18,101,100,103,101,0,59,121,0,0,18,118,0,59,121,0,0,0,0,58,115,116,101,
-112,0,18,101,100,103,101,0,59,122,0,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,115,116,101,112,0,1,0,
-0,12,101,100,103,101,0,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,115,116,101,112,0,18,101,100,
-103,101,0,59,120,0,0,18,118,0,59,120,0,0,0,0,58,115,116,101,112,0,18,101,100,103,101,0,59,121,0,0,
-18,118,0,59,121,0,0,0,0,58,115,116,101,112,0,18,101,100,103,101,0,59,122,0,0,18,118,0,59,122,0,0,0,
-0,58,115,116,101,112,0,18,101,100,103,101,0,59,119,0,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,10,0,115,
-116,101,112,0,1,0,0,9,101,100,103,101,0,0,1,0,0,10,118,0,0,0,1,8,58,115,116,101,112,0,58,118,101,
-99,50,0,18,101,100,103,101,0,0,0,0,18,118,0,0,0,0,0,1,0,11,0,115,116,101,112,0,1,0,0,9,101,100,103,
-101,0,0,1,0,0,11,118,0,0,0,1,8,58,115,116,101,112,0,58,118,101,99,51,0,18,101,100,103,101,0,0,0,0,
-18,118,0,0,0,0,0,1,0,12,0,115,116,101,112,0,1,0,0,9,101,100,103,101,0,0,1,0,0,12,118,0,0,0,1,8,58,
-115,116,101,112,0,58,118,101,99,52,0,18,101,100,103,101,0,0,0,0,18,118,0,0,0,0,0,1,0,9,0,115,109,
-111,111,116,104,115,116,101,112,0,1,0,0,9,101,100,103,101,48,0,0,1,0,0,9,101,100,103,101,49,0,0,1,
-0,0,9,120,0,0,0,1,3,2,0,9,1,116,0,2,58,99,108,97,109,112,0,18,120,0,18,101,100,103,101,48,0,47,18,
-101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,
-116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,10,0,115,109,111,111,116,
-104,115,116,101,112,0,1,0,0,10,101,100,103,101,48,0,0,1,0,0,10,101,100,103,101,49,0,0,1,0,0,10,118,
-0,0,0,1,8,58,118,101,99,50,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,
-59,120,0,0,18,101,100,103,101,49,0,59,120,0,0,18,118,0,59,120,0,0,0,0,58,115,109,111,111,116,104,
-115,116,101,112,0,18,101,100,103,101,48,0,59,121,0,0,18,101,100,103,101,49,0,59,121,0,0,18,118,0,
-59,121,0,0,0,0,0,0,0,1,0,11,0,115,109,111,111,116,104,115,116,101,112,0,1,0,0,11,101,100,103,101,
-48,0,0,1,0,0,11,101,100,103,101,49,0,0,1,0,0,11,118,0,0,0,1,8,58,118,101,99,51,0,58,115,109,111,
-111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,59,120,0,0,18,101,100,103,101,49,0,59,120,0,
-0,18,118,0,59,120,0,0,0,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,59,
-121,0,0,18,101,100,103,101,49,0,59,121,0,0,18,118,0,59,121,0,0,0,0,58,115,109,111,111,116,104,115,
-116,101,112,0,18,101,100,103,101,48,0,59,122,0,0,18,101,100,103,101,49,0,59,122,0,0,18,118,0,59,
-122,0,0,0,0,0,0,0,1,0,12,0,115,109,111,111,116,104,115,116,101,112,0,1,0,0,12,101,100,103,101,48,0,
-0,1,0,0,12,101,100,103,101,49,0,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,115,109,111,111,116,
-104,115,116,101,112,0,18,101,100,103,101,48,0,59,120,0,0,18,101,100,103,101,49,0,59,120,0,0,18,118,
-0,59,120,0,0,0,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,59,121,0,0,
-18,101,100,103,101,49,0,59,121,0,0,18,118,0,59,121,0,0,0,0,58,115,109,111,111,116,104,115,116,101,
-112,0,18,101,100,103,101,48,0,59,122,0,0,18,101,100,103,101,49,0,59,122,0,0,18,118,0,59,122,0,0,0,
-0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,59,119,0,0,18,101,100,103,
-101,49,0,59,119,0,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,10,0,115,109,111,111,116,104,115,116,101,112,
-0,1,0,0,9,101,100,103,101,48,0,0,1,0,0,9,101,100,103,101,49,0,0,1,0,0,10,118,0,0,0,1,8,58,118,101,
-99,50,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,0,18,101,100,103,101,
-49,0,0,18,118,0,59,120,0,0,0,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,
-0,0,18,101,100,103,101,49,0,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,115,109,111,111,116,104,115,
-116,101,112,0,1,0,0,9,101,100,103,101,48,0,0,1,0,0,9,101,100,103,101,49,0,0,1,0,0,11,118,0,0,0,1,8,
-58,118,101,99,51,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,0,18,101,
-100,103,101,49,0,0,18,118,0,59,120,0,0,0,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,
-103,101,48,0,0,18,101,100,103,101,49,0,0,18,118,0,59,121,0,0,0,0,58,115,109,111,111,116,104,115,
-116,101,112,0,18,101,100,103,101,48,0,0,18,101,100,103,101,49,0,0,18,118,0,59,122,0,0,0,0,0,0,0,1,
-0,12,0,115,109,111,111,116,104,115,116,101,112,0,1,0,0,9,101,100,103,101,48,0,0,1,0,0,9,101,100,
-103,101,49,0,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,115,109,111,111,116,104,115,116,101,
-112,0,18,101,100,103,101,48,0,0,18,101,100,103,101,49,0,0,18,118,0,59,120,0,0,0,0,58,115,109,111,
-111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,0,18,101,100,103,101,49,0,0,18,118,0,59,121,
-0,0,0,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,0,18,101,100,103,101,
-49,0,0,18,118,0,59,122,0,0,0,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,
-0,0,18,101,100,103,101,49,0,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,9,0,100,111,116,0,1,0,0,9,120,0,0,
-1,0,0,9,121,0,0,0,1,8,18,120,0,18,121,0,48,0,0,1,0,9,0,100,111,116,0,1,0,0,10,118,0,0,1,0,0,10,117,
-0,0,0,1,8,18,118,0,59,120,0,18,117,0,59,120,0,48,18,118,0,59,121,0,18,117,0,59,121,0,48,46,0,0,1,0,
-9,0,100,111,116,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,18,118,0,59,120,0,18,117,0,59,120,0,48,
-18,118,0,59,121,0,18,117,0,59,121,0,48,46,18,118,0,59,122,0,18,117,0,59,122,0,48,46,0,0,1,0,9,0,
-100,111,116,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,18,118,0,59,120,0,18,117,0,59,120,0,48,18,
-118,0,59,121,0,18,117,0,59,121,0,48,46,18,118,0,59,122,0,18,117,0,59,122,0,48,46,18,118,0,59,119,0,
-18,117,0,59,119,0,48,46,0,0,1,0,9,0,108,101,110,103,116,104,0,1,0,0,9,120,0,0,0,1,8,58,115,113,114,
-116,0,58,100,111,116,0,18,120,0,0,18,120,0,0,0,0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,0,0,10,
-118,0,0,0,1,8,58,115,113,114,116,0,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,0,0,1,0,9,0,108,
-101,110,103,116,104,0,1,0,0,11,118,0,0,0,1,8,58,115,113,114,116,0,58,100,111,116,0,18,118,0,0,18,
-118,0,0,0,0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,0,0,12,118,0,0,0,1,8,58,115,113,114,116,0,58,
-100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,0,0,9,120,
-0,0,1,0,0,9,121,0,0,0,1,8,58,108,101,110,103,116,104,0,18,120,0,18,121,0,47,0,0,0,0,1,0,9,0,100,
-105,115,116,97,110,99,101,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,1,8,58,108,101,110,103,116,104,0,
-18,118,0,18,117,0,47,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,0,0,11,118,0,0,1,0,0,11,117,
-0,0,0,1,8,58,108,101,110,103,116,104,0,18,118,0,18,117,0,47,0,0,0,0,1,0,9,0,100,105,115,116,97,110,
-99,101,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,58,108,101,110,103,116,104,0,18,118,0,18,117,0,47,
-0,0,0,0,1,0,11,0,99,114,111,115,115,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,118,101,99,51,0,
-18,118,0,59,121,0,18,117,0,59,122,0,48,18,117,0,59,121,0,18,118,0,59,122,0,48,47,0,18,118,0,59,122,
-0,18,117,0,59,120,0,48,18,117,0,59,122,0,18,118,0,59,120,0,48,47,0,18,118,0,59,120,0,18,117,0,59,
-121,0,48,18,117,0,59,120,0,18,118,0,59,121,0,48,47,0,0,0,0,1,0,9,0,110,111,114,109,97,108,105,122,
-101,0,1,0,0,9,120,0,0,0,1,8,17,49,0,48,0,0,0,0,1,0,10,0,110,111,114,109,97,108,105,122,101,0,1,0,0,
-10,118,0,0,0,1,8,18,118,0,58,108,101,110,103,116,104,0,18,118,0,0,0,49,0,0,1,0,11,0,110,111,114,
-109,97,108,105,122,101,0,1,0,0,11,118,0,0,0,1,8,18,118,0,58,108,101,110,103,116,104,0,18,118,0,0,0,
-49,0,0,1,0,12,0,110,111,114,109,97,108,105,122,101,0,1,0,0,12,118,0,0,0,1,8,18,118,0,58,108,101,
-110,103,116,104,0,18,118,0,0,0,49,0,0,1,0,9,0,102,97,99,101,102,111,114,119,97,114,100,0,1,0,0,9,
-78,0,0,1,0,0,9,73,0,0,1,0,0,9,78,114,101,102,0,0,0,1,8,58,100,111,116,0,18,78,114,101,102,0,0,18,
-73,0,0,0,17,48,0,48,0,0,40,18,78,0,18,78,0,54,31,0,0,1,0,10,0,102,97,99,101,102,111,114,119,97,114,
-100,0,1,0,0,10,78,0,0,1,0,0,10,73,0,0,1,0,0,10,78,114,101,102,0,0,0,1,8,58,100,111,116,0,18,78,114,
-101,102,0,0,18,73,0,0,0,17,48,0,48,0,0,40,18,78,0,18,78,0,54,31,0,0,1,0,11,0,102,97,99,101,102,111,
-114,119,97,114,100,0,1,0,0,11,78,0,0,1,0,0,11,73,0,0,1,0,0,11,78,114,101,102,0,0,0,1,8,58,100,111,
-116,0,18,78,114,101,102,0,0,18,73,0,0,0,17,48,0,48,0,0,40,18,78,0,18,78,0,54,31,0,0,1,0,12,0,102,
-97,99,101,102,111,114,119,97,114,100,0,1,0,0,12,78,0,0,1,0,0,12,73,0,0,1,0,0,12,78,114,101,102,0,0,
-0,1,8,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,17,48,0,48,0,0,40,18,78,0,18,78,0,54,31,0,
-0,1,0,9,0,114,101,102,108,101,99,116,0,1,0,0,9,73,0,0,1,0,0,9,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,
-58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,10,0,114,101,102,108,101,99,116,0,
-1,0,0,10,73,0,0,1,0,0,10,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,
-0,48,18,78,0,48,47,0,0,1,0,11,0,114,101,102,108,101,99,116,0,1,0,0,11,73,0,0,1,0,0,11,78,0,0,0,1,8,
-18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,12,0,114,
-101,102,108,101,99,116,0,1,0,0,12,73,0,0,1,0,0,12,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,
-116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,9,0,114,101,102,114,97,99,116,0,1,0,0,9,73,0,
-0,1,0,0,9,78,0,0,1,0,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,
-101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,
-18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,
-97,0,18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,
-107,0,0,0,46,18,78,0,48,47,0,0,1,0,10,0,114,101,102,114,97,99,116,0,1,0,0,10,73,0,0,1,0,0,10,78,0,
-0,1,0,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,
-17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47,
-48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48,
-18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18,
-78,0,48,47,0,0,1,0,11,0,114,101,102,114,97,99,116,0,1,0,0,11,73,0,0,1,0,0,11,78,0,0,1,0,0,9,101,
-116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,
-58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10,
-18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48,18,101,116,97,
-0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,
-1,0,12,0,114,101,102,114,97,99,116,0,1,0,0,12,73,0,0,1,0,0,12,78,0,0,1,0,0,9,101,116,97,0,0,0,1,3,
-2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,
-18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,
-48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48,18,101,116,97,0,58,100,111,116,
-0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,13,0,109,97,
-116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,13,109,0,0,1,0,0,13,110,0,0,0,1,8,58,109,97,
-116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,
-0,57,48,0,0,0,0,1,0,14,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,14,109,0,0,1,
-0,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,
-16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,0,0,0,
-1,0,15,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,15,109,0,0,1,0,0,15,110,0,0,
-0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,
-18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,18,109,0,16,10,51,0,
-57,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1,0,0,10,118,0,0,1,0,
-0,10,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,40,0,18,118,0,59,121,
-0,18,117,0,59,121,0,40,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,0,1,0,0,11,118,0,0,1,0,0,11,
-117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,40,0,18,118,0,59,121,0,18,
-117,0,59,121,0,40,0,18,118,0,59,122,0,18,117,0,59,122,0,40,0,0,0,0,1,0,4,0,108,101,115,115,84,104,
-97,110,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,
-59,120,0,40,0,18,118,0,59,121,0,18,117,0,59,121,0,40,0,18,118,0,59,122,0,18,117,0,59,122,0,40,0,18,
-118,0,59,119,0,18,117,0,59,119,0,40,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1,0,0,6,118,0,
-0,1,0,0,6,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,40,0,18,118,0,59,
-121,0,18,117,0,59,121,0,40,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,0,1,0,0,7,118,0,0,1,0,0,7,
-117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,40,0,18,118,0,59,121,0,18,
-117,0,59,121,0,40,0,18,118,0,59,122,0,18,117,0,59,122,0,40,0,0,0,0,1,0,4,0,108,101,115,115,84,104,
-97,110,0,1,0,0,8,118,0,0,1,0,0,8,117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,
-120,0,40,0,18,118,0,59,121,0,18,117,0,59,121,0,40,0,18,118,0,59,122,0,18,117,0,59,122,0,40,0,18,
-118,0,59,119,0,18,117,0,59,119,0,40,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,69,113,117,97,
-108,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,
-120,0,42,0,18,118,0,59,121,0,18,117,0,59,121,0,42,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,69,
-113,117,97,108,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,
-18,117,0,59,120,0,42,0,18,118,0,59,121,0,18,117,0,59,121,0,42,0,18,118,0,59,122,0,18,117,0,59,122,
-0,42,0,0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,0,0,12,118,0,0,1,0,0,12,
-117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,42,0,18,118,0,59,121,0,18,
-117,0,59,121,0,42,0,18,118,0,59,122,0,18,117,0,59,122,0,42,0,18,118,0,59,119,0,18,117,0,59,119,0,
-42,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,0,0,6,118,0,0,1,0,0,6,117,0,
-0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,42,0,18,118,0,59,121,0,18,117,0,
-59,121,0,42,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,0,0,7,118,0,0,1,0,
-0,7,117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,42,0,18,118,0,59,121,0,
-18,117,0,59,121,0,42,0,18,118,0,59,122,0,18,117,0,59,122,0,42,0,0,0,0,1,0,4,0,108,101,115,115,84,
-104,97,110,69,113,117,97,108,0,1,0,0,8,118,0,0,1,0,0,8,117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,
-0,59,120,0,18,117,0,59,120,0,42,0,18,118,0,59,121,0,18,117,0,59,121,0,42,0,18,118,0,59,122,0,18,
-117,0,59,122,0,42,0,18,118,0,59,119,0,18,117,0,59,119,0,42,0,0,0,0,1,0,2,0,103,114,101,97,116,101,
-114,84,104,97,110,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,
-0,18,117,0,59,120,0,41,0,18,118,0,59,121,0,18,117,0,59,121,0,41,0,0,0,0,1,0,3,0,103,114,101,97,116,
-101,114,84,104,97,110,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,
-120,0,18,117,0,59,120,0,41,0,18,118,0,59,121,0,18,117,0,59,121,0,41,0,18,118,0,59,122,0,18,117,0,
-59,122,0,41,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,0,1,0,0,12,118,0,0,1,0,0,12,
-117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,41,0,18,118,0,59,121,0,18,
-117,0,59,121,0,41,0,18,118,0,59,122,0,18,117,0,59,122,0,41,0,18,118,0,59,119,0,18,117,0,59,119,0,
-41,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,0,1,0,0,6,118,0,0,1,0,0,6,117,0,0,0,1,
-8,58,98,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,41,0,18,118,0,59,121,0,18,117,0,59,121,
-0,41,0,0,0,0,1,0,3,0,103,114,101,97,116,101,114,84,104,97,110,0,1,0,0,7,118,0,0,1,0,0,7,117,0,0,0,
-1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,41,0,18,118,0,59,121,0,18,117,0,59,
-121,0,41,0,18,118,0,59,122,0,18,117,0,59,122,0,41,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,
-104,97,110,0,1,0,0,8,118,0,0,1,0,0,8,117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,
-0,59,120,0,41,0,18,118,0,59,121,0,18,117,0,59,121,0,41,0,18,118,0,59,122,0,18,117,0,59,122,0,41,0,
-18,118,0,59,119,0,18,117,0,59,119,0,41,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,69,
-113,117,97,108,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,
-18,117,0,59,120,0,43,0,18,118,0,59,121,0,18,117,0,59,121,0,43,0,0,0,0,1,0,3,0,103,114,101,97,116,
-101,114,84,104,97,110,69,113,117,97,108,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,98,118,101,99,
-51,0,18,118,0,59,120,0,18,117,0,59,120,0,43,0,18,118,0,59,121,0,18,117,0,59,121,0,43,0,18,118,0,59,
-122,0,18,117,0,59,122,0,43,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,
-108,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,
-120,0,43,0,18,118,0,59,121,0,18,117,0,59,121,0,43,0,18,118,0,59,122,0,18,117,0,59,122,0,43,0,18,
-118,0,59,119,0,18,117,0,59,119,0,43,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,69,
-113,117,97,108,0,1,0,0,6,118,0,0,1,0,0,6,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,18,
-117,0,59,120,0,43,0,18,118,0,59,121,0,18,117,0,59,121,0,43,0,0,0,0,1,0,3,0,103,114,101,97,116,101,
-114,84,104,97,110,69,113,117,97,108,0,1,0,0,7,118,0,0,1,0,0,7,117,0,0,0,1,8,58,98,118,101,99,51,0,
-18,118,0,59,120,0,18,117,0,59,120,0,43,0,18,118,0,59,121,0,18,117,0,59,121,0,43,0,18,118,0,59,122,
-0,18,117,0,59,122,0,43,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,
-0,1,0,0,8,118,0,0,1,0,0,8,117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,
-43,0,18,118,0,59,121,0,18,117,0,59,121,0,43,0,18,118,0,59,122,0,18,117,0,59,122,0,43,0,18,118,0,59,
-119,0,18,117,0,59,119,0,43,0,0,0,0,1,0,2,0,101,113,117,97,108,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,
-0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,38,0,18,118,0,59,121,0,18,117,0,59,
-121,0,38,0,0,0,0,1,0,3,0,101,113,117,97,108,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,98,118,
-101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,38,0,18,118,0,59,121,0,18,117,0,59,121,0,38,0,18,
-118,0,59,122,0,18,117,0,59,122,0,38,0,0,0,0,1,0,4,0,101,113,117,97,108,0,1,0,0,12,118,0,0,1,0,0,12,
-117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,38,0,18,118,0,59,121,0,18,
-117,0,59,121,0,38,0,18,118,0,59,122,0,18,117,0,59,122,0,38,0,18,118,0,59,119,0,18,117,0,59,119,0,
-38,0,0,0,0,1,0,2,0,101,113,117,97,108,0,1,0,0,6,118,0,0,1,0,0,6,117,0,0,0,1,8,58,98,118,101,99,50,
-0,18,118,0,59,120,0,18,117,0,59,120,0,38,0,18,118,0,59,121,0,18,117,0,59,121,0,38,0,0,0,0,1,0,3,0,
-101,113,117,97,108,0,1,0,0,7,118,0,0,1,0,0,7,117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,
-18,117,0,59,120,0,38,0,18,118,0,59,121,0,18,117,0,59,121,0,38,0,18,118,0,59,122,0,18,117,0,59,122,
-0,38,0,0,0,0,1,0,4,0,101,113,117,97,108,0,1,0,0,8,118,0,0,1,0,0,8,117,0,0,0,1,8,58,98,118,101,99,
-52,0,18,118,0,59,120,0,18,117,0,59,120,0,38,0,18,118,0,59,121,0,18,117,0,59,121,0,38,0,18,118,0,59,
-122,0,18,117,0,59,122,0,38,0,18,118,0,59,119,0,18,117,0,59,119,0,38,0,0,0,0,1,0,2,0,110,111,116,69,
-113,117,97,108,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,
-18,117,0,59,120,0,39,0,18,118,0,59,121,0,18,117,0,59,121,0,39,0,0,0,0,1,0,3,0,110,111,116,69,113,
-117,97,108,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,18,
-117,0,59,120,0,39,0,18,118,0,59,121,0,18,117,0,59,121,0,39,0,18,118,0,59,122,0,18,117,0,59,122,0,
-39,0,0,0,0,1,0,4,0,110,111,116,69,113,117,97,108,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,58,98,
-118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,39,0,18,118,0,59,121,0,18,117,0,59,121,0,39,0,
-18,118,0,59,122,0,18,117,0,59,122,0,39,0,18,118,0,59,119,0,18,117,0,59,119,0,39,0,0,0,0,1,0,2,0,
-110,111,116,69,113,117,97,108,0,1,0,0,6,118,0,0,1,0,0,6,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,
-0,59,120,0,18,117,0,59,120,0,39,0,18,118,0,59,121,0,18,117,0,59,121,0,39,0,0,0,0,1,0,3,0,110,111,
-116,69,113,117,97,108,0,1,0,0,7,118,0,0,1,0,0,7,117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,
-120,0,18,117,0,59,120,0,39,0,18,118,0,59,121,0,18,117,0,59,121,0,39,0,18,118,0,59,122,0,18,117,0,
-59,122,0,39,0,0,0,0,1,0,4,0,110,111,116,69,113,117,97,108,0,1,0,0,8,118,0,0,1,0,0,8,117,0,0,0,1,8,
-58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,39,0,18,118,0,59,121,0,18,117,0,59,121,0,
-39,0,18,118,0,59,122,0,18,117,0,59,122,0,39,0,18,118,0,59,119,0,18,117,0,59,119,0,39,0,0,0,0,1,0,1,
-0,97,110,121,0,1,0,0,2,118,0,0,0,1,8,18,118,0,59,120,0,18,118,0,59,121,0,32,0,0,1,0,1,0,97,110,121,
-0,1,0,0,3,118,0,0,0,1,8,18,118,0,59,120,0,18,118,0,59,121,0,32,18,118,0,59,122,0,32,0,0,1,0,1,0,97,
-110,121,0,1,0,0,4,118,0,0,0,1,8,18,118,0,59,120,0,18,118,0,59,121,0,32,18,118,0,59,122,0,32,18,118,
-0,59,119,0,32,0,0,1,0,1,0,97,108,108,0,1,0,0,2,118,0,0,0,1,8,18,118,0,59,120,0,18,118,0,59,121,0,
-34,0,0,1,0,1,0,97,108,108,0,1,0,0,3,118,0,0,0,1,8,18,118,0,59,120,0,18,118,0,59,121,0,34,18,118,0,
-59,122,0,34,0,0,1,0,1,0,97,108,108,0,1,0,0,4,118,0,0,0,1,8,18,118,0,59,120,0,18,118,0,59,121,0,34,
-18,118,0,59,122,0,34,18,118,0,59,119,0,34,0,0,1,0,2,0,110,111,116,0,1,0,0,2,118,0,0,0,1,8,58,98,
-118,101,99,50,0,18,118,0,59,120,0,56,0,18,118,0,59,121,0,56,0,0,0,0,1,0,3,0,110,111,116,0,1,0,0,3,
-118,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,56,0,18,118,0,59,121,0,56,0,18,118,0,59,122,
-0,56,0,0,0,0,1,0,4,0,110,111,116,0,1,0,0,4,118,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,
-56,0,18,118,0,59,121,0,56,0,18,118,0,59,122,0,56,0,18,118,0,59,119,0,56,0,0,0,0,1,0,12,0,116,101,
-120,116,117,114,101,49,68,0,1,0,0,16,115,97,109,112,108,101,114,0,0,1,0,0,9,99,111,111,114,100,0,0,
-0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,116,101,120,49,100,0,18,116,101,120,
-101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,
-116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,0,0,16,115,
-97,109,112,108,101,114,0,0,1,0,0,10,99,111,111,114,100,0,0,0,1,8,58,116,101,120,116,117,114,101,49,
-68,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,
-116,0,49,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,0,0,16,115,97,109,
-112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,116,101,120,116,117,114,101,49,68,0,
-18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,
-0,49,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,0,1,0,0,17,115,97,109,112,108,101,114,0,0,
-1,0,0,10,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,116,
-101,120,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,
-100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,
-68,80,114,111,106,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,8,
-58,116,101,120,116,117,114,101,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,50,0,18,99,
-111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,112,0,49,0,18,99,111,111,114,100,0,59,116,0,
-18,99,111,111,114,100,0,59,112,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,80,114,
-111,106,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,116,101,
-120,116,117,114,101,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,50,0,18,99,111,111,114,
-100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,
-111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,0,1,0,0,18,115,97,
-109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,
-118,101,99,52,95,116,101,120,51,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,
-18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,
-116,117,114,101,51,68,80,114,111,106,0,1,0,0,18,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,
-114,100,0,0,0,1,8,58,116,101,120,116,117,114,101,51,68,0,18,115,97,109,112,108,101,114,0,0,58,118,
-101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,
-114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,
-111,111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,67,117,98,101,0,1,0,
-0,19,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,
-108,0,0,0,4,118,101,99,52,95,116,101,120,99,117,98,101,0,18,116,101,120,101,108,0,0,18,115,97,109,
-112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,
-0,12,0,115,104,97,100,111,119,49,68,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,
-114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,49,100,0,18,
-116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,
-0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114,111,106,0,1,0,0,20,
-115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,115,104,97,100,111,119,49,
-68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,
-111,111,114,100,0,59,113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,
-114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,0,1,0,0,21,115,97,109,112,
-108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,
-99,52,95,115,104,97,100,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,
-99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,
-111,119,50,68,80,114,111,106,0,1,0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,
-0,0,0,1,8,58,115,104,97,100,111,119,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,
-18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,
-116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,
-0,59,113,0,49,0,0,0,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,97,0,0,0,
-4,102,108,111,97,116,95,110,111,105,115,101,49,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,
-111,105,115,101,49,0,1,0,0,10,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105,
-115,101,50,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,11,120,0,
-0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105,115,101,51,0,18,97,0,0,18,120,0,0,0,8,
-18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,12,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,
-97,116,95,110,111,105,115,101,52,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,10,0,110,111,105,115,
-101,50,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,
-110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101,
-50,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,
-111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,
-0,0,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,
-105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,
-51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101,
-50,0,1,0,0,12,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,
-111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,
-0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,9,120,0,
-0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,
-18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0,
-0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,
-105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,
-51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,
-17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,
-0,11,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,
-115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,
-0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53,0,52,55,0,0,0,17,49,
-55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,
-12,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,
-101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,
-0,17,50,0,55,55,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0,
-52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,0,0,0,
-1,0,12,0,110,111,105,115,101,52,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,
-49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110,111,
-105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,50,51,
-0,53,52,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,
-52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,
-50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,
-118,101,99,50,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,
-18,120,0,58,118,101,99,50,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,0,46,0,0,0,0,0,0,1,0,12,
-0,110,111,105,115,101,52,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,49,0,
-18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,
-55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,
-51,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,58,110,111,105,
-115,101,49,0,18,120,0,58,118,101,99,51,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,
-57,49,0,0,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,12,120,0,0,0,1,8,58,118,101,
-99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,
-99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,
-0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,
-0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,
-58,118,101,99,52,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,17,51,55,0,
-52,56,0,0,0,0,46,0,0,0,0,0,0,0
+
+/* DO NOT EDIT - THIS FILE AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */
+/* slang_common_builtin.gc */
+
+3,2,2,1,5,1,103,108,95,77,97,120,76,105,103,104,116,115,0,2,16,10,56,0,0,0,2,2,1,5,1,103,108,95,77,
+97,120,67,108,105,112,80,108,97,110,101,115,0,2,16,10,54,0,0,0,2,2,1,5,1,103,108,95,77,97,120,84,
+101,120,116,117,114,101,85,110,105,116,115,0,2,16,10,56,0,0,0,2,2,1,5,1,103,108,95,77,97,120,84,
+101,120,116,117,114,101,67,111,111,114,100,115,0,2,16,10,56,0,0,0,2,2,1,5,1,103,108,95,77,97,120,
+86,101,114,116,101,120,65,116,116,114,105,98,115,0,2,16,10,49,54,0,0,0,2,2,1,5,1,103,108,95,77,97,
+120,86,101,114,116,101,120,85,110,105,102,111,114,109,67,111,109,112,111,110,101,110,116,115,0,2,
+16,10,53,49,50,0,0,0,2,2,1,5,1,103,108,95,77,97,120,86,97,114,121,105,110,103,70,108,111,97,116,
+115,0,2,16,10,51,50,0,0,0,2,2,1,5,1,103,108,95,77,97,120,86,101,114,116,101,120,84,101,120,116,117,
+114,101,73,109,97,103,101,85,110,105,116,115,0,2,16,8,48,0,0,0,2,2,1,5,1,103,108,95,77,97,120,67,
+111,109,98,105,110,101,100,84,101,120,116,117,114,101,73,109,97,103,101,85,110,105,116,115,0,2,16,
+10,50,0,0,0,2,2,1,5,1,103,108,95,77,97,120,84,101,120,116,117,114,101,73,109,97,103,101,85,110,105,
+116,115,0,2,16,10,50,0,0,0,2,2,1,5,1,103,108,95,77,97,120,70,114,97,103,109,101,110,116,85,110,105,
+102,111,114,109,67,111,109,112,111,110,101,110,116,115,0,2,16,10,54,52,0,0,0,2,2,1,5,1,103,108,95,
+77,97,120,68,114,97,119,66,117,102,102,101,114,115,0,2,16,10,49,0,0,0,2,2,4,15,1,103,108,95,77,111,
+100,101,108,86,105,101,119,77,97,116,114,105,120,0,0,0,2,2,4,15,1,103,108,95,80,114,111,106,101,99,
+116,105,111,110,77,97,116,114,105,120,0,0,0,2,2,4,15,1,103,108,95,77,111,100,101,108,86,105,101,
+119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,0,0,0,2,2,4,15,1,103,108,95,84,101,
+120,116,117,114,101,77,97,116,114,105,120,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,
+67,111,111,114,100,115,0,0,0,2,2,4,14,1,103,108,95,78,111,114,109,97,108,77,97,116,114,105,120,0,0,
+0,2,2,4,15,1,103,108,95,77,111,100,101,108,86,105,101,119,77,97,116,114,105,120,73,110,118,101,114,
+115,101,0,0,0,2,2,4,15,1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,73,
+110,118,101,114,115,101,0,0,0,2,2,4,15,1,103,108,95,77,111,100,101,108,86,105,101,119,80,114,111,
+106,101,99,116,105,111,110,77,97,116,114,105,120,73,110,118,101,114,115,101,0,0,0,2,2,4,15,1,103,
+108,95,84,101,120,116,117,114,101,77,97,116,114,105,120,73,110,118,101,114,115,101,0,3,18,103,108,
+95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,15,1,103,108,95,77,111,
+100,101,108,86,105,101,119,77,97,116,114,105,120,84,114,97,110,115,112,111,115,101,0,0,0,2,2,4,15,
+1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,84,114,97,110,115,112,111,
+115,101,0,0,0,2,2,4,15,1,103,108,95,77,111,100,101,108,86,105,101,119,80,114,111,106,101,99,116,
+105,111,110,77,97,116,114,105,120,84,114,97,110,115,112,111,115,101,0,0,0,2,2,4,15,1,103,108,95,84,
+101,120,116,117,114,101,77,97,116,114,105,120,84,114,97,110,115,112,111,115,101,0,3,18,103,108,95,
+77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,15,1,103,108,95,77,111,100,
+101,108,86,105,101,119,77,97,116,114,105,120,73,110,118,101,114,115,101,84,114,97,110,115,112,111,
+115,101,0,0,0,2,2,4,15,1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,73,
+110,118,101,114,115,101,84,114,97,110,115,112,111,115,101,0,0,0,2,2,4,15,1,103,108,95,77,111,100,
+101,108,86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,73,110,118,101,
+114,115,101,84,114,97,110,115,112,111,115,101,0,0,0,2,2,4,15,1,103,108,95,84,101,120,116,117,114,
+101,77,97,116,114,105,120,73,110,118,101,114,115,101,84,114,97,110,115,112,111,115,101,0,3,18,103,
+108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,9,1,103,108,95,78,
+111,114,109,97,108,83,99,97,108,101,0,0,0,2,2,0,22,103,108,95,68,101,112,116,104,82,97,110,103,101,
+80,97,114,97,109,101,116,101,114,115,0,9,110,101,97,114,0,0,0,1,9,102,97,114,0,0,0,1,9,100,105,102,
+102,0,0,0,0,0,0,2,2,4,23,103,108,95,68,101,112,116,104,82,97,110,103,101,80,97,114,97,109,101,116,
+101,114,115,0,1,103,108,95,68,101,112,116,104,82,97,110,103,101,0,0,0,2,2,4,12,1,103,108,95,67,108,
+105,112,80,108,97,110,101,0,3,18,103,108,95,77,97,120,67,108,105,112,80,108,97,110,101,115,0,0,0,2,
+2,0,22,103,108,95,80,111,105,110,116,80,97,114,97,109,101,116,101,114,115,0,9,115,105,122,101,0,0,
+0,1,9,115,105,122,101,77,105,110,0,0,0,1,9,115,105,122,101,77,97,120,0,0,0,1,9,102,97,100,101,84,
+104,114,101,115,104,111,108,100,83,105,122,101,0,0,0,1,9,100,105,115,116,97,110,99,101,67,111,110,
+115,116,97,110,116,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9,100,105,115,116,97,110,99,
+101,76,105,110,101,97,114,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9,100,105,115,116,97,
+110,99,101,81,117,97,100,114,97,116,105,99,65,116,116,101,110,117,97,116,105,111,110,0,0,0,0,0,0,2,
+2,4,23,103,108,95,80,111,105,110,116,80,97,114,97,109,101,116,101,114,115,0,1,103,108,95,80,111,
+105,110,116,0,0,0,2,2,0,22,103,108,95,77,97,116,101,114,105,97,108,80,97,114,97,109,101,116,101,
+114,115,0,12,101,109,105,115,115,105,111,110,0,0,0,1,12,97,109,98,105,101,110,116,0,0,0,1,12,100,
+105,102,102,117,115,101,0,0,0,1,12,115,112,101,99,117,108,97,114,0,0,0,1,9,115,104,105,110,105,110,
+101,115,115,0,0,0,0,0,0,2,2,4,23,103,108,95,77,97,116,101,114,105,97,108,80,97,114,97,109,101,116,
+101,114,115,0,1,103,108,95,70,114,111,110,116,77,97,116,101,114,105,97,108,0,0,0,2,2,4,23,103,108,
+95,77,97,116,101,114,105,97,108,80,97,114,97,109,101,116,101,114,115,0,1,103,108,95,66,97,99,107,
+77,97,116,101,114,105,97,108,0,0,0,2,2,0,22,103,108,95,76,105,103,104,116,83,111,117,114,99,101,80,
+97,114,97,109,101,116,101,114,115,0,12,97,109,98,105,101,110,116,0,0,0,1,12,100,105,102,102,117,
+115,101,0,0,0,1,12,115,112,101,99,117,108,97,114,0,0,0,1,12,112,111,115,105,116,105,111,110,0,0,0,
+1,12,104,97,108,102,86,101,99,116,111,114,0,0,0,1,11,115,112,111,116,68,105,114,101,99,116,105,111,
+110,0,0,0,1,9,115,112,111,116,69,120,112,111,110,101,110,116,0,0,0,1,9,115,112,111,116,67,117,116,
+111,102,102,0,0,0,1,9,115,112,111,116,67,111,115,67,117,116,111,102,102,0,0,0,1,9,99,111,110,115,
+116,97,110,116,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9,108,105,110,101,97,114,65,116,
+116,101,110,117,97,116,105,111,110,0,0,0,1,9,113,117,97,100,114,97,116,105,99,65,116,116,101,110,
+117,97,116,105,111,110,0,0,0,0,0,0,2,2,4,23,103,108,95,76,105,103,104,116,83,111,117,114,99,101,80,
+97,114,97,109,101,116,101,114,115,0,1,103,108,95,76,105,103,104,116,83,111,117,114,99,101,0,3,18,
+103,108,95,77,97,120,76,105,103,104,116,115,0,0,0,2,2,0,22,103,108,95,76,105,103,104,116,77,111,
+100,101,108,80,97,114,97,109,101,116,101,114,115,0,12,97,109,98,105,101,110,116,0,0,0,0,0,0,2,2,4,
+23,103,108,95,76,105,103,104,116,77,111,100,101,108,80,97,114,97,109,101,116,101,114,115,0,1,103,
+108,95,76,105,103,104,116,77,111,100,101,108,0,0,0,2,2,0,22,103,108,95,76,105,103,104,116,77,111,
+100,101,108,80,114,111,100,117,99,116,115,0,12,115,99,101,110,101,67,111,108,111,114,0,0,0,0,0,0,2,
+2,4,23,103,108,95,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,115,0,1,103,108,
+95,70,114,111,110,116,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,0,0,0,2,2,4,
+23,103,108,95,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,115,0,1,103,108,95,
+66,97,99,107,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,0,0,0,2,2,0,22,103,
+108,95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,12,97,109,98,105,101,110,116,0,0,0,1,12,
+100,105,102,102,117,115,101,0,0,0,1,12,115,112,101,99,117,108,97,114,0,0,0,0,0,0,2,2,4,23,103,108,
+95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,1,103,108,95,70,114,111,110,116,76,105,103,
+104,116,80,114,111,100,117,99,116,0,3,18,103,108,95,77,97,120,76,105,103,104,116,115,0,0,0,2,2,4,
+23,103,108,95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,1,103,108,95,66,97,99,107,76,105,
+103,104,116,80,114,111,100,117,99,116,0,3,18,103,108,95,77,97,120,76,105,103,104,116,115,0,0,0,2,2,
+4,12,1,103,108,95,84,101,120,116,117,114,101,69,110,118,67,111,108,111,114,0,3,18,103,108,95,77,97,
+120,84,101,120,116,117,114,101,73,109,97,103,101,85,110,105,116,115,0,0,0,2,2,4,12,1,103,108,95,69,
+121,101,80,108,97,110,101,83,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,
+100,115,0,0,0,2,2,4,12,1,103,108,95,69,121,101,80,108,97,110,101,84,0,3,18,103,108,95,77,97,120,84,
+101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,12,1,103,108,95,69,121,101,80,108,97,
+110,101,82,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,
+4,12,1,103,108,95,69,121,101,80,108,97,110,101,81,0,3,18,103,108,95,77,97,120,84,101,120,116,117,
+114,101,67,111,111,114,100,115,0,0,0,2,2,4,12,1,103,108,95,79,98,106,101,99,116,80,108,97,110,101,
+83,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,12,1,
+103,108,95,79,98,106,101,99,116,80,108,97,110,101,84,0,3,18,103,108,95,77,97,120,84,101,120,116,
+117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,12,1,103,108,95,79,98,106,101,99,116,80,108,97,110,
+101,82,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,4,
+12,1,103,108,95,79,98,106,101,99,116,80,108,97,110,101,81,0,3,18,103,108,95,77,97,120,84,101,120,
+116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,0,22,103,108,95,70,111,103,80,97,114,97,109,101,
+116,101,114,115,0,12,99,111,108,111,114,0,0,0,1,9,100,101,110,115,105,116,121,0,0,0,1,9,115,116,97,
+114,116,0,0,0,1,9,101,110,100,0,0,0,1,9,115,99,97,108,101,0,0,0,0,0,0,2,2,4,23,103,108,95,70,111,
+103,80,97,114,97,109,101,116,101,114,115,0,1,103,108,95,70,111,103,0,0,0,1,0,9,0,114,97,100,105,97,
+110,115,0,1,0,0,9,100,101,103,0,0,0,1,8,17,51,0,49,52,49,53,57,51,0,0,18,100,101,103,0,48,17,49,56,
+48,0,48,0,0,49,0,0,1,0,10,0,114,97,100,105,97,110,115,0,1,0,0,10,100,101,103,0,0,0,1,8,58,118,101,
+99,50,0,17,51,0,49,52,49,53,57,51,0,0,0,0,18,100,101,103,0,48,58,118,101,99,50,0,17,49,56,48,0,48,
+0,0,0,0,49,0,0,1,0,11,0,114,97,100,105,97,110,115,0,1,0,0,11,100,101,103,0,0,0,1,8,58,118,101,99,
+51,0,17,51,0,49,52,49,53,57,51,0,0,0,0,18,100,101,103,0,48,58,118,101,99,51,0,17,49,56,48,0,48,0,0,
+0,0,49,0,0,1,0,12,0,114,97,100,105,97,110,115,0,1,0,0,12,100,101,103,0,0,0,1,8,58,118,101,99,52,0,
+17,51,0,49,52,49,53,57,51,0,0,0,0,18,100,101,103,0,48,58,118,101,99,52,0,17,49,56,48,0,48,0,0,0,0,
+49,0,0,1,0,9,0,100,101,103,114,101,101,115,0,1,0,0,9,114,97,100,0,0,0,1,8,17,49,56,48,0,48,0,0,18,
+114,97,100,0,48,17,51,0,49,52,49,53,57,51,0,0,49,0,0,1,0,10,0,100,101,103,114,101,101,115,0,1,0,0,
+10,114,97,100,0,0,0,1,8,58,118,101,99,50,0,17,49,56,48,0,48,0,0,0,0,18,114,97,100,0,48,58,118,101,
+99,50,0,17,51,0,49,52,49,53,57,51,0,0,0,0,49,0,0,1,0,11,0,100,101,103,114,101,101,115,0,1,0,0,11,
+114,97,100,0,0,0,1,8,58,118,101,99,51,0,17,49,56,48,0,48,0,0,0,0,18,114,97,100,0,48,58,118,101,99,
+51,0,17,51,0,49,52,49,53,57,51,0,0,0,0,49,0,0,1,0,12,0,100,101,103,114,101,101,115,0,1,0,0,12,114,
+97,100,0,0,0,1,8,58,118,101,99,52,0,17,49,56,48,0,48,0,0,0,0,18,114,97,100,0,48,58,118,101,99,52,0,
+17,51,0,49,52,49,53,57,51,0,0,0,0,49,0,0,1,0,9,0,115,105,110,0,1,0,0,9,97,110,103,108,101,0,0,0,1,
+3,2,0,9,1,120,0,0,0,4,102,108,111,97,116,95,115,105,110,101,0,18,120,0,0,18,97,110,103,108,101,0,0,
+0,8,18,120,0,0,0,1,0,10,0,115,105,110,0,1,0,0,10,97,110,103,108,101,0,0,0,1,8,58,118,101,99,50,0,
+58,115,105,110,0,18,97,110,103,108,101,0,59,120,0,0,0,0,58,115,105,110,0,18,97,110,103,108,101,0,
+59,121,0,0,0,0,0,0,0,1,0,11,0,115,105,110,0,1,0,0,11,97,110,103,108,101,0,0,0,1,8,58,118,101,99,51,
+0,58,115,105,110,0,18,97,110,103,108,101,0,59,120,0,0,0,0,58,115,105,110,0,18,97,110,103,108,101,0,
+59,121,0,0,0,0,58,115,105,110,0,18,97,110,103,108,101,0,59,122,0,0,0,0,0,0,0,1,0,12,0,115,105,110,
+0,1,0,0,12,97,110,103,108,101,0,0,0,1,8,58,118,101,99,52,0,58,115,105,110,0,18,97,110,103,108,101,
+0,59,120,0,0,0,0,58,115,105,110,0,18,97,110,103,108,101,0,59,121,0,0,0,0,58,115,105,110,0,18,97,
+110,103,108,101,0,59,122,0,0,0,0,58,115,105,110,0,18,97,110,103,108,101,0,59,119,0,0,0,0,0,0,0,1,0,
+9,0,99,111,115,0,1,0,0,9,97,110,103,108,101,0,0,0,1,8,58,115,105,110,0,18,97,110,103,108,101,0,17,
+49,0,53,55,48,56,0,0,46,0,0,0,0,1,0,10,0,99,111,115,0,1,0,0,10,97,110,103,108,101,0,0,0,1,8,58,118,
+101,99,50,0,58,99,111,115,0,18,97,110,103,108,101,0,59,120,0,0,0,0,58,99,111,115,0,18,97,110,103,
+108,101,0,59,121,0,0,0,0,0,0,0,1,0,11,0,99,111,115,0,1,0,0,11,97,110,103,108,101,0,0,0,1,8,58,118,
+101,99,51,0,58,99,111,115,0,18,97,110,103,108,101,0,59,120,0,0,0,0,58,99,111,115,0,18,97,110,103,
+108,101,0,59,121,0,0,0,0,58,99,111,115,0,18,97,110,103,108,101,0,59,122,0,0,0,0,0,0,0,1,0,12,0,99,
+111,115,0,1,0,0,12,97,110,103,108,101,0,0,0,1,8,58,118,101,99,52,0,58,99,111,115,0,18,97,110,103,
+108,101,0,59,120,0,0,0,0,58,99,111,115,0,18,97,110,103,108,101,0,59,121,0,0,0,0,58,99,111,115,0,18,
+97,110,103,108,101,0,59,122,0,0,0,0,58,99,111,115,0,18,97,110,103,108,101,0,59,119,0,0,0,0,0,0,0,1,
+0,9,0,116,97,110,0,1,0,0,9,97,110,103,108,101,0,0,0,1,8,58,115,105,110,0,18,97,110,103,108,101,0,0,
+0,58,99,111,115,0,18,97,110,103,108,101,0,0,0,49,0,0,1,0,10,0,116,97,110,0,1,0,0,10,97,110,103,108,
+101,0,0,0,1,8,58,118,101,99,50,0,58,116,97,110,0,18,97,110,103,108,101,0,59,120,0,0,0,0,58,116,97,
+110,0,18,97,110,103,108,101,0,59,121,0,0,0,0,0,0,0,1,0,11,0,116,97,110,0,1,0,0,11,97,110,103,108,
+101,0,0,0,1,8,58,118,101,99,51,0,58,116,97,110,0,18,97,110,103,108,101,0,59,120,0,0,0,0,58,116,97,
+110,0,18,97,110,103,108,101,0,59,121,0,0,0,0,58,116,97,110,0,18,97,110,103,108,101,0,59,122,0,0,0,
+0,0,0,0,1,0,12,0,116,97,110,0,1,0,0,12,97,110,103,108,101,0,0,0,1,8,58,118,101,99,52,0,58,116,97,
+110,0,18,97,110,103,108,101,0,59,120,0,0,0,0,58,116,97,110,0,18,97,110,103,108,101,0,59,121,0,0,0,
+0,58,116,97,110,0,18,97,110,103,108,101,0,59,122,0,0,0,0,58,116,97,110,0,18,97,110,103,108,101,0,
+59,119,0,0,0,0,0,0,0,1,0,9,0,97,115,105,110,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,121,0,0,0,4,102,108,
+111,97,116,95,97,114,99,115,105,110,101,0,18,121,0,0,18,120,0,0,0,8,18,121,0,0,0,1,0,10,0,97,115,
+105,110,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,58,97,115,105,110,0,18,118,0,59,120,0,0,0,0,58,
+97,115,105,110,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,97,115,105,110,0,1,0,0,11,118,0,0,0,1,8,58,
+118,101,99,51,0,58,97,115,105,110,0,18,118,0,59,120,0,0,0,0,58,97,115,105,110,0,18,118,0,59,121,0,
+0,0,0,58,97,115,105,110,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,97,115,105,110,0,1,0,0,12,118,0,0,
+0,1,8,58,118,101,99,52,0,58,97,115,105,110,0,18,118,0,59,120,0,0,0,0,58,97,115,105,110,0,18,118,0,
+59,121,0,0,0,0,58,97,115,105,110,0,18,118,0,59,122,0,0,0,0,58,97,115,105,110,0,18,118,0,59,119,0,0,
+0,0,0,0,0,1,0,9,0,97,99,111,115,0,1,0,0,9,120,0,0,0,1,8,17,49,0,53,55,48,56,0,0,58,97,115,105,110,
+0,18,120,0,0,0,47,0,0,1,0,10,0,97,99,111,115,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,58,97,99,
+111,115,0,18,118,0,59,120,0,0,0,0,58,97,99,111,115,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,97,99,
+111,115,0,1,0,0,11,118,0,0,0,1,8,58,118,101,99,51,0,58,97,99,111,115,0,18,118,0,59,120,0,0,0,0,58,
+97,99,111,115,0,18,118,0,59,121,0,0,0,0,58,97,99,111,115,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,
+97,99,111,115,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,97,99,111,115,0,18,118,0,59,120,0,0,0,
+0,58,97,99,111,115,0,18,118,0,59,121,0,0,0,0,58,97,99,111,115,0,18,118,0,59,122,0,0,0,0,58,97,99,
+111,115,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,9,0,97,116,97,110,0,1,0,0,9,121,95,111,118,101,114,95,
+120,0,0,0,1,3,2,0,9,1,122,0,0,0,4,102,108,111,97,116,95,97,114,99,116,97,110,0,18,122,0,0,18,121,
+95,111,118,101,114,95,120,0,0,0,8,18,122,0,0,0,1,0,10,0,97,116,97,110,0,1,0,0,10,121,95,111,118,
+101,114,95,120,0,0,0,1,8,58,118,101,99,50,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,
+59,120,0,0,0,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,121,0,0,0,0,0,0,0,1,0,11,0,
+97,116,97,110,0,1,0,0,11,121,95,111,118,101,114,95,120,0,0,0,1,8,58,118,101,99,51,0,58,97,116,97,
+110,0,18,121,95,111,118,101,114,95,120,0,59,120,0,0,0,0,58,97,116,97,110,0,18,121,95,111,118,101,
+114,95,120,0,59,121,0,0,0,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,122,0,0,0,0,0,
+0,0,1,0,12,0,97,116,97,110,0,1,0,0,12,121,95,111,118,101,114,95,120,0,0,0,1,8,58,118,101,99,52,0,
+58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,120,0,0,0,0,58,97,116,97,110,0,18,121,95,
+111,118,101,114,95,120,0,59,121,0,0,0,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,
+122,0,0,0,0,58,97,116,97,110,0,18,121,95,111,118,101,114,95,120,0,59,119,0,0,0,0,0,0,0,1,0,9,0,97,
+116,97,110,0,1,0,0,9,121,0,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,122,0,2,58,97,116,97,110,0,18,121,0,18,
+120,0,49,0,0,0,0,10,18,120,0,17,48,0,48,0,0,40,0,2,10,18,121,0,17,48,0,48,0,0,40,0,8,18,122,0,17,
+51,0,49,52,49,53,57,51,0,0,47,0,9,14,0,8,18,122,0,17,51,0,49,52,49,53,57,51,0,0,46,0,0,9,14,0,8,18,
+122,0,0,0,1,0,10,0,97,116,97,110,0,1,0,0,10,117,0,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,58,
+97,116,97,110,0,18,117,0,59,120,0,0,18,118,0,59,120,0,0,0,0,58,97,116,97,110,0,18,117,0,59,121,0,0,
+18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,97,116,97,110,0,1,0,0,11,117,0,0,1,0,0,11,118,0,0,0,1,8,58,
+118,101,99,51,0,58,97,116,97,110,0,18,117,0,59,120,0,0,18,118,0,59,120,0,0,0,0,58,97,116,97,110,0,
+18,117,0,59,121,0,0,18,118,0,59,121,0,0,0,0,58,97,116,97,110,0,18,117,0,59,122,0,0,18,118,0,59,122,
+0,0,0,0,0,0,0,1,0,12,0,97,116,97,110,0,1,0,0,12,117,0,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,
+58,97,116,97,110,0,18,117,0,59,120,0,0,18,118,0,59,120,0,0,0,0,58,97,116,97,110,0,18,117,0,59,121,
+0,0,18,118,0,59,121,0,0,0,0,58,97,116,97,110,0,18,117,0,59,122,0,0,18,118,0,59,122,0,0,0,0,58,97,
+116,97,110,0,18,117,0,59,119,0,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,9,0,112,111,119,0,1,0,0,9,120,0,
+0,1,0,0,9,121,0,0,0,1,3,2,0,9,1,112,0,0,0,4,102,108,111,97,116,95,112,111,119,101,114,0,18,112,0,0,
+18,120,0,0,18,121,0,0,0,8,18,112,0,0,0,1,0,10,0,112,111,119,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,
+1,8,58,118,101,99,50,0,58,112,111,119,0,18,118,0,59,120,0,0,18,117,0,59,120,0,0,0,0,58,112,111,119,
+0,18,118,0,59,121,0,0,18,117,0,59,121,0,0,0,0,0,0,0,1,0,11,0,112,111,119,0,1,0,0,11,118,0,0,1,0,0,
+11,117,0,0,0,1,8,58,118,101,99,51,0,58,112,111,119,0,18,118,0,59,120,0,0,18,117,0,59,120,0,0,0,0,
+58,112,111,119,0,18,118,0,59,121,0,0,18,117,0,59,121,0,0,0,0,58,112,111,119,0,18,118,0,59,122,0,0,
+18,117,0,59,122,0,0,0,0,0,0,0,1,0,12,0,112,111,119,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,58,
+118,101,99,52,0,58,112,111,119,0,18,118,0,59,120,0,0,18,117,0,59,120,0,0,0,0,58,112,111,119,0,18,
+118,0,59,121,0,0,18,117,0,59,121,0,0,0,0,58,112,111,119,0,18,118,0,59,122,0,0,18,117,0,59,122,0,0,
+0,0,58,112,111,119,0,18,118,0,59,119,0,0,18,117,0,59,119,0,0,0,0,0,0,0,1,0,9,0,101,120,112,0,1,0,0,
+9,120,0,0,0,1,8,58,112,111,119,0,17,50,0,55,49,56,50,56,49,56,51,0,0,0,18,120,0,0,0,0,0,1,0,10,0,
+101,120,112,0,1,0,0,10,118,0,0,0,1,8,58,112,111,119,0,58,118,101,99,50,0,17,50,0,55,49,56,50,56,49,
+56,51,0,0,0,0,0,18,118,0,0,0,0,0,1,0,11,0,101,120,112,0,1,0,0,11,118,0,0,0,1,8,58,112,111,119,0,58,
+118,101,99,51,0,17,50,0,55,49,56,50,56,49,56,51,0,0,0,0,0,18,118,0,0,0,0,0,1,0,12,0,101,120,112,0,
+1,0,0,12,118,0,0,0,1,8,58,112,111,119,0,58,118,101,99,52,0,17,50,0,55,49,56,50,56,49,56,51,0,0,0,0,
+0,18,118,0,0,0,0,0,1,0,9,0,108,111,103,50,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,121,0,0,0,4,102,108,111,
+97,116,95,108,111,103,50,0,18,121,0,0,18,120,0,0,0,8,18,121,0,0,0,1,0,10,0,108,111,103,50,0,1,0,0,
+10,118,0,0,0,1,8,58,118,101,99,50,0,58,108,111,103,50,0,18,118,0,59,120,0,0,0,0,58,108,111,103,50,
+0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,108,111,103,50,0,1,0,0,11,118,0,0,0,1,8,58,118,101,99,51,
+0,58,108,111,103,50,0,18,118,0,59,120,0,0,0,0,58,108,111,103,50,0,18,118,0,59,121,0,0,0,0,58,108,
+111,103,50,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,108,111,103,50,0,1,0,0,12,118,0,0,0,1,8,58,118,
+101,99,52,0,58,108,111,103,50,0,18,118,0,59,120,0,0,0,0,58,108,111,103,50,0,18,118,0,59,121,0,0,0,
+0,58,108,111,103,50,0,18,118,0,59,122,0,0,0,0,58,108,111,103,50,0,18,118,0,59,119,0,0,0,0,0,0,0,1,
+0,9,0,108,111,103,0,1,0,0,9,120,0,0,0,1,8,58,108,111,103,50,0,18,120,0,0,0,58,108,111,103,50,0,17,
+50,0,55,49,56,50,56,49,56,51,0,0,0,0,49,0,0,1,0,10,0,108,111,103,0,1,0,0,10,118,0,0,0,1,8,58,108,
+111,103,50,0,18,118,0,0,0,58,108,111,103,50,0,58,118,101,99,50,0,17,50,0,55,49,56,50,56,49,56,51,0,
+0,0,0,0,0,49,0,0,1,0,11,0,108,111,103,0,1,0,0,11,118,0,0,0,1,8,58,108,111,103,50,0,18,118,0,0,0,58,
+108,111,103,50,0,58,118,101,99,51,0,17,50,0,55,49,56,50,56,49,56,51,0,0,0,0,0,0,49,0,0,1,0,12,0,
+108,111,103,0,1,0,0,12,118,0,0,0,1,8,58,108,111,103,50,0,18,118,0,0,0,58,108,111,103,50,0,58,118,
+101,99,52,0,17,50,0,55,49,56,50,56,49,56,51,0,0,0,0,0,0,49,0,0,1,0,9,0,101,120,112,50,0,1,0,0,9,
+120,0,0,0,1,8,58,112,111,119,0,17,50,0,48,0,0,0,18,120,0,0,0,0,0,1,0,10,0,101,120,112,50,0,1,0,0,
+10,118,0,0,0,1,8,58,112,111,119,0,58,118,101,99,50,0,17,50,0,48,0,0,0,0,0,18,118,0,0,0,0,0,1,0,11,
+0,101,120,112,50,0,1,0,0,11,118,0,0,0,1,8,58,112,111,119,0,58,118,101,99,51,0,17,50,0,48,0,0,0,0,0,
+18,118,0,0,0,0,0,1,0,12,0,101,120,112,50,0,1,0,0,12,118,0,0,0,1,8,58,112,111,119,0,58,118,101,99,
+52,0,17,50,0,48,0,0,0,0,0,18,118,0,0,0,0,0,1,0,9,0,115,113,114,116,0,1,0,0,9,120,0,0,0,1,8,58,112,
+111,119,0,18,120,0,0,17,48,0,53,0,0,0,0,0,0,1,0,10,0,115,113,114,116,0,1,0,0,10,118,0,0,0,1,8,58,
+112,111,119,0,18,118,0,0,58,118,101,99,50,0,17,48,0,53,0,0,0,0,0,0,0,0,1,0,11,0,115,113,114,116,0,
+1,0,0,11,118,0,0,0,1,8,58,112,111,119,0,18,118,0,0,58,118,101,99,51,0,17,48,0,53,0,0,0,0,0,0,0,0,1,
+0,12,0,115,113,114,116,0,1,0,0,12,118,0,0,0,1,8,58,112,111,119,0,18,118,0,0,58,118,101,99,52,0,17,
+48,0,53,0,0,0,0,0,0,0,0,1,0,9,0,105,110,118,101,114,115,101,115,113,114,116,0,1,0,0,9,120,0,0,0,1,
+8,17,49,0,48,0,0,58,115,113,114,116,0,18,120,0,0,0,49,0,0,1,0,10,0,105,110,118,101,114,115,101,115,
+113,114,116,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,17,49,0,48,0,0,0,0,58,115,113,114,116,0,18,
+118,0,0,0,49,0,0,1,0,11,0,105,110,118,101,114,115,101,115,113,114,116,0,1,0,0,11,118,0,0,0,1,8,58,
+118,101,99,51,0,17,49,0,48,0,0,0,0,58,115,113,114,116,0,18,118,0,0,0,49,0,0,1,0,12,0,105,110,118,
+101,114,115,101,115,113,114,116,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,17,49,0,48,0,0,0,0,58,
+115,113,114,116,0,18,118,0,0,0,49,0,0,1,0,9,0,97,98,115,0,1,0,0,9,120,0,0,0,1,8,18,120,0,17,48,0,
+48,0,0,43,18,120,0,18,120,0,54,31,0,0,1,0,10,0,97,98,115,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,
+0,58,97,98,115,0,18,118,0,59,120,0,0,0,0,58,97,98,115,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,97,
+98,115,0,1,0,0,11,118,0,0,0,1,8,58,118,101,99,51,0,58,97,98,115,0,18,118,0,59,120,0,0,0,0,58,97,98,
+115,0,18,118,0,59,121,0,0,0,0,58,97,98,115,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,97,98,115,0,1,
+0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,97,98,115,0,18,118,0,59,120,0,0,0,0,58,97,98,115,0,18,
+118,0,59,121,0,0,0,0,58,97,98,115,0,18,118,0,59,122,0,0,0,0,58,97,98,115,0,18,118,0,59,119,0,0,0,0,
+0,0,0,1,0,9,0,115,105,103,110,0,1,0,0,9,120,0,0,0,1,8,18,120,0,17,48,0,48,0,0,41,17,49,0,48,0,0,18,
+120,0,17,48,0,48,0,0,40,17,49,0,48,0,0,54,17,48,0,48,0,0,31,31,0,0,1,0,10,0,115,105,103,110,0,1,0,
+0,10,118,0,0,0,1,8,58,118,101,99,50,0,58,115,105,103,110,0,18,118,0,59,120,0,0,0,0,58,115,105,103,
+110,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,115,105,103,110,0,1,0,0,11,118,0,0,0,1,8,58,118,101,
+99,51,0,58,115,105,103,110,0,18,118,0,59,120,0,0,0,0,58,115,105,103,110,0,18,118,0,59,121,0,0,0,0,
+58,115,105,103,110,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,115,105,103,110,0,1,0,0,12,118,0,0,0,1,
+8,58,118,101,99,52,0,58,115,105,103,110,0,18,118,0,59,120,0,0,0,0,58,115,105,103,110,0,18,118,0,59,
+121,0,0,0,0,58,115,105,103,110,0,18,118,0,59,122,0,0,0,0,58,115,105,103,110,0,18,118,0,59,119,0,0,
+0,0,0,0,0,1,0,9,0,102,108,111,111,114,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,121,0,0,0,4,102,108,111,97,
+116,95,102,108,111,111,114,0,18,121,0,0,18,120,0,0,0,8,18,121,0,0,0,1,0,10,0,102,108,111,111,114,0,
+1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,58,102,108,111,111,114,0,18,118,0,59,120,0,0,0,0,58,102,
+108,111,111,114,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,102,108,111,111,114,0,1,0,0,11,118,0,0,0,
+1,8,58,118,101,99,51,0,58,102,108,111,111,114,0,18,118,0,59,120,0,0,0,0,58,102,108,111,111,114,0,
+18,118,0,59,121,0,0,0,0,58,102,108,111,111,114,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,102,108,
+111,111,114,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,102,108,111,111,114,0,18,118,0,59,120,0,
+0,0,0,58,102,108,111,111,114,0,18,118,0,59,121,0,0,0,0,58,102,108,111,111,114,0,18,118,0,59,122,0,
+0,0,0,58,102,108,111,111,114,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,9,0,99,101,105,108,0,1,0,0,9,120,
+0,0,0,1,3,2,0,9,1,121,0,0,0,4,102,108,111,97,116,95,99,101,105,108,0,18,121,0,0,18,120,0,0,0,8,18,
+121,0,0,0,1,0,10,0,99,101,105,108,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,58,99,101,105,108,0,
+18,118,0,59,120,0,0,0,0,58,99,101,105,108,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,99,101,105,108,
+0,1,0,0,11,118,0,0,0,1,8,58,118,101,99,51,0,58,99,101,105,108,0,18,118,0,59,120,0,0,0,0,58,99,101,
+105,108,0,18,118,0,59,121,0,0,0,0,58,99,101,105,108,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,99,
+101,105,108,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,99,101,105,108,0,18,118,0,59,120,0,0,0,
+0,58,99,101,105,108,0,18,118,0,59,121,0,0,0,0,58,99,101,105,108,0,18,118,0,59,122,0,0,0,0,58,99,
+101,105,108,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,9,0,102,114,97,99,116,0,1,0,0,9,120,0,0,0,1,8,18,
+120,0,58,102,108,111,111,114,0,18,120,0,0,0,47,0,0,1,0,10,0,102,114,97,99,116,0,1,0,0,10,118,0,0,0,
+1,8,18,118,0,58,102,108,111,111,114,0,18,118,0,0,0,47,0,0,1,0,11,0,102,114,97,99,116,0,1,0,0,11,
+118,0,0,0,1,8,18,118,0,58,102,108,111,111,114,0,18,118,0,0,0,47,0,0,1,0,12,0,102,114,97,99,116,0,1,
+0,0,12,118,0,0,0,1,8,18,118,0,58,102,108,111,111,114,0,18,118,0,0,0,47,0,0,1,0,9,0,109,111,100,0,1,
+0,0,9,120,0,0,1,0,0,9,121,0,0,0,1,8,18,120,0,18,121,0,58,102,108,111,111,114,0,18,120,0,18,121,0,
+49,0,0,48,47,0,0,1,0,10,0,109,111,100,0,1,0,0,10,118,0,0,1,0,0,9,117,0,0,0,1,8,18,118,0,18,117,0,
+58,102,108,111,111,114,0,18,118,0,18,117,0,49,0,0,48,47,0,0,1,0,11,0,109,111,100,0,1,0,0,11,118,0,
+0,1,0,0,9,117,0,0,0,1,8,18,118,0,18,117,0,58,102,108,111,111,114,0,18,118,0,18,117,0,49,0,0,48,47,
+0,0,1,0,12,0,109,111,100,0,1,0,0,12,118,0,0,1,0,0,9,117,0,0,0,1,8,18,118,0,18,117,0,58,102,108,111,
+111,114,0,18,118,0,18,117,0,49,0,0,48,47,0,0,1,0,10,0,109,111,100,0,1,0,0,10,118,0,0,1,0,0,10,117,
+0,0,0,1,8,18,118,0,18,117,0,58,102,108,111,111,114,0,18,118,0,18,117,0,49,0,0,48,47,0,0,1,0,11,0,
+109,111,100,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,18,118,0,18,117,0,58,102,108,111,111,114,0,
+18,118,0,18,117,0,49,0,0,48,47,0,0,1,0,12,0,109,111,100,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,
+18,118,0,18,117,0,58,102,108,111,111,114,0,18,118,0,18,117,0,49,0,0,48,47,0,0,1,0,9,0,109,105,110,
+0,1,0,0,9,120,0,0,1,0,0,9,121,0,0,0,1,8,18,120,0,18,121,0,40,18,120,0,18,121,0,31,0,0,1,0,10,0,109,
+105,110,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,1,8,58,118,101,99,50,0,58,109,105,110,0,18,118,0,59,
+120,0,0,18,117,0,59,120,0,0,0,0,58,109,105,110,0,18,118,0,59,121,0,0,18,117,0,59,121,0,0,0,0,0,0,0,
+1,0,11,0,109,105,110,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,118,101,99,51,0,58,109,105,110,0,
+18,118,0,59,120,0,0,18,117,0,59,120,0,0,0,0,58,109,105,110,0,18,118,0,59,121,0,0,18,117,0,59,121,0,
+0,0,0,58,109,105,110,0,18,118,0,59,122,0,0,18,117,0,59,122,0,0,0,0,0,0,0,1,0,12,0,109,105,110,0,1,
+0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,58,118,101,99,52,0,58,109,105,110,0,18,118,0,59,120,0,0,18,
+117,0,59,120,0,0,0,0,58,109,105,110,0,18,118,0,59,121,0,0,18,117,0,59,121,0,0,0,0,58,109,105,110,0,
+18,118,0,59,122,0,0,18,117,0,59,122,0,0,0,0,58,109,105,110,0,18,118,0,59,119,0,0,18,117,0,59,119,0,
+0,0,0,0,0,0,1,0,10,0,109,105,110,0,1,0,0,10,118,0,0,1,0,0,9,121,0,0,0,1,8,58,109,105,110,0,18,118,
+0,0,58,118,101,99,50,0,18,121,0,0,0,0,0,0,0,1,0,11,0,109,105,110,0,1,0,0,11,118,0,0,1,0,0,9,121,0,
+0,0,1,8,58,109,105,110,0,18,118,0,0,58,118,101,99,51,0,18,121,0,0,0,0,0,0,0,1,0,12,0,109,105,110,0,
+1,0,0,12,118,0,0,1,0,0,9,121,0,0,0,1,8,58,109,105,110,0,18,118,0,0,58,118,101,99,52,0,18,121,0,0,0,
+0,0,0,0,1,0,9,0,109,97,120,0,1,0,0,9,120,0,0,1,0,0,9,121,0,0,0,1,8,18,120,0,18,121,0,40,18,121,0,
+18,120,0,31,0,0,1,0,10,0,109,97,120,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,1,8,58,118,101,99,50,0,
+58,109,97,120,0,18,118,0,59,120,0,0,18,117,0,59,120,0,0,0,0,58,109,97,120,0,18,118,0,59,121,0,0,18,
+117,0,59,121,0,0,0,0,0,0,0,1,0,11,0,109,97,120,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,118,
+101,99,51,0,58,109,97,120,0,18,118,0,59,120,0,0,18,117,0,59,120,0,0,0,0,58,109,97,120,0,18,118,0,
+59,121,0,0,18,117,0,59,121,0,0,0,0,58,109,97,120,0,18,118,0,59,122,0,0,18,117,0,59,122,0,0,0,0,0,0,
+0,1,0,12,0,109,97,120,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,58,118,101,99,52,0,58,109,97,120,0,
+18,118,0,59,120,0,0,18,117,0,59,120,0,0,0,0,58,109,97,120,0,18,118,0,59,121,0,0,18,117,0,59,121,0,
+0,0,0,58,109,97,120,0,18,118,0,59,122,0,0,18,117,0,59,122,0,0,0,0,58,109,97,120,0,18,118,0,59,119,
+0,0,18,117,0,59,119,0,0,0,0,0,0,0,1,0,10,0,109,97,120,0,1,0,0,10,118,0,0,1,0,0,9,121,0,0,0,1,8,58,
+109,97,120,0,18,118,0,0,58,118,101,99,50,0,18,121,0,0,0,0,0,0,0,1,0,11,0,109,97,120,0,1,0,0,11,118,
+0,0,1,0,0,9,121,0,0,0,1,8,58,109,97,120,0,18,118,0,0,58,118,101,99,51,0,18,121,0,0,0,0,0,0,0,1,0,
+12,0,109,97,120,0,1,0,0,12,118,0,0,1,0,0,9,121,0,0,0,1,8,58,109,97,120,0,18,118,0,0,58,118,101,99,
+52,0,18,121,0,0,0,0,0,0,0,1,0,9,0,99,108,97,109,112,0,1,0,0,9,120,0,0,1,0,0,9,109,105,110,86,97,
+108,0,0,1,0,0,9,109,97,120,86,97,108,0,0,0,1,8,58,109,105,110,0,58,109,97,120,0,18,120,0,0,18,109,
+105,110,86,97,108,0,0,0,0,18,109,97,120,86,97,108,0,0,0,0,0,1,0,10,0,99,108,97,109,112,0,1,0,0,10,
+120,0,0,1,0,0,9,109,105,110,86,97,108,0,0,1,0,0,9,109,97,120,86,97,108,0,0,0,1,8,58,109,105,110,0,
+58,109,97,120,0,18,120,0,0,18,109,105,110,86,97,108,0,0,0,0,18,109,97,120,86,97,108,0,0,0,0,0,1,0,
+11,0,99,108,97,109,112,0,1,0,0,11,120,0,0,1,0,0,9,109,105,110,86,97,108,0,0,1,0,0,9,109,97,120,86,
+97,108,0,0,0,1,8,58,109,105,110,0,58,109,97,120,0,18,120,0,0,18,109,105,110,86,97,108,0,0,0,0,18,
+109,97,120,86,97,108,0,0,0,0,0,1,0,12,0,99,108,97,109,112,0,1,0,0,12,120,0,0,1,0,0,9,109,105,110,
+86,97,108,0,0,1,0,0,9,109,97,120,86,97,108,0,0,0,1,8,58,109,105,110,0,58,109,97,120,0,18,120,0,0,
+18,109,105,110,86,97,108,0,0,0,0,18,109,97,120,86,97,108,0,0,0,0,0,1,0,10,0,99,108,97,109,112,0,1,
+0,0,10,120,0,0,1,0,0,10,109,105,110,86,97,108,0,0,1,0,0,10,109,97,120,86,97,108,0,0,0,1,8,58,109,
+105,110,0,58,109,97,120,0,18,120,0,0,18,109,105,110,86,97,108,0,0,0,0,18,109,97,120,86,97,108,0,0,
+0,0,0,1,0,11,0,99,108,97,109,112,0,1,0,0,11,120,0,0,1,0,0,11,109,105,110,86,97,108,0,0,1,0,0,11,
+109,97,120,86,97,108,0,0,0,1,8,58,109,105,110,0,58,109,97,120,0,18,120,0,0,18,109,105,110,86,97,
+108,0,0,0,0,18,109,97,120,86,97,108,0,0,0,0,0,1,0,12,0,99,108,97,109,112,0,1,0,0,12,120,0,0,1,0,0,
+12,109,105,110,86,97,108,0,0,1,0,0,12,109,97,120,86,97,108,0,0,0,1,8,58,109,105,110,0,58,109,97,
+120,0,18,120,0,0,18,109,105,110,86,97,108,0,0,0,0,18,109,97,120,86,97,108,0,0,0,0,0,1,0,9,0,109,
+105,120,0,1,0,0,9,120,0,0,1,0,0,9,121,0,0,1,0,0,9,97,0,0,0,1,8,18,120,0,17,49,0,48,0,0,18,97,0,47,
+48,18,121,0,18,97,0,48,46,0,0,1,0,10,0,109,105,120,0,1,0,0,10,120,0,0,1,0,0,10,121,0,0,1,0,0,9,97,
+0,0,0,1,8,18,120,0,17,49,0,48,0,0,18,97,0,47,48,18,121,0,18,97,0,48,46,0,0,1,0,11,0,109,105,120,0,
+1,0,0,11,120,0,0,1,0,0,11,121,0,0,1,0,0,9,97,0,0,0,1,8,18,120,0,17,49,0,48,0,0,18,97,0,47,48,18,
+121,0,18,97,0,48,46,0,0,1,0,12,0,109,105,120,0,1,0,0,12,120,0,0,1,0,0,12,121,0,0,1,0,0,9,97,0,0,0,
+1,8,18,120,0,17,49,0,48,0,0,18,97,0,47,48,18,121,0,18,97,0,48,46,0,0,1,0,10,0,109,105,120,0,1,0,0,
+10,120,0,0,1,0,0,10,121,0,0,1,0,0,10,97,0,0,0,1,8,18,120,0,17,49,0,48,0,0,18,97,0,47,48,18,121,0,
+18,97,0,48,46,0,0,1,0,11,0,109,105,120,0,1,0,0,11,120,0,0,1,0,0,11,121,0,0,1,0,0,11,97,0,0,0,1,8,
+18,120,0,17,49,0,48,0,0,18,97,0,47,48,18,121,0,18,97,0,48,46,0,0,1,0,12,0,109,105,120,0,1,0,0,12,
+120,0,0,1,0,0,12,121,0,0,1,0,0,12,97,0,0,0,1,8,18,120,0,17,49,0,48,0,0,18,97,0,47,48,18,121,0,18,
+97,0,48,46,0,0,1,0,9,0,115,116,101,112,0,1,0,0,9,101,100,103,101,0,0,1,0,0,9,120,0,0,0,1,8,18,120,
+0,18,101,100,103,101,0,40,17,48,0,48,0,0,17,49,0,48,0,0,31,0,0,1,0,10,0,115,116,101,112,0,1,0,0,10,
+101,100,103,101,0,0,1,0,0,10,118,0,0,0,1,8,58,118,101,99,50,0,58,115,116,101,112,0,18,101,100,103,
+101,0,59,120,0,0,18,118,0,59,120,0,0,0,0,58,115,116,101,112,0,18,101,100,103,101,0,59,121,0,0,18,
+118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,115,116,101,112,0,1,0,0,11,101,100,103,101,0,0,1,0,0,11,118,0,
+0,0,1,8,58,118,101,99,51,0,58,115,116,101,112,0,18,101,100,103,101,0,59,120,0,0,18,118,0,59,120,0,
+0,0,0,58,115,116,101,112,0,18,101,100,103,101,0,59,121,0,0,18,118,0,59,121,0,0,0,0,58,115,116,101,
+112,0,18,101,100,103,101,0,59,122,0,0,18,118,0,59,122,0,0,0,0,0,0,0,1,0,12,0,115,116,101,112,0,1,0,
+0,12,101,100,103,101,0,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,115,116,101,112,0,18,101,100,
+103,101,0,59,120,0,0,18,118,0,59,120,0,0,0,0,58,115,116,101,112,0,18,101,100,103,101,0,59,121,0,0,
+18,118,0,59,121,0,0,0,0,58,115,116,101,112,0,18,101,100,103,101,0,59,122,0,0,18,118,0,59,122,0,0,0,
+0,58,115,116,101,112,0,18,101,100,103,101,0,59,119,0,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,10,0,115,
+116,101,112,0,1,0,0,9,101,100,103,101,0,0,1,0,0,10,118,0,0,0,1,8,58,115,116,101,112,0,58,118,101,
+99,50,0,18,101,100,103,101,0,0,0,0,18,118,0,0,0,0,0,1,0,11,0,115,116,101,112,0,1,0,0,9,101,100,103,
+101,0,0,1,0,0,11,118,0,0,0,1,8,58,115,116,101,112,0,58,118,101,99,51,0,18,101,100,103,101,0,0,0,0,
+18,118,0,0,0,0,0,1,0,12,0,115,116,101,112,0,1,0,0,9,101,100,103,101,0,0,1,0,0,12,118,0,0,0,1,8,58,
+115,116,101,112,0,58,118,101,99,52,0,18,101,100,103,101,0,0,0,0,18,118,0,0,0,0,0,1,0,9,0,115,109,
+111,111,116,104,115,116,101,112,0,1,0,0,9,101,100,103,101,48,0,0,1,0,0,9,101,100,103,101,49,0,0,1,
+0,0,9,120,0,0,0,1,3,2,0,9,1,116,0,2,58,99,108,97,109,112,0,18,120,0,18,101,100,103,101,48,0,47,18,
+101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,
+116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,0,10,0,115,109,111,111,116,
+104,115,116,101,112,0,1,0,0,10,101,100,103,101,48,0,0,1,0,0,10,101,100,103,101,49,0,0,1,0,0,10,118,
+0,0,0,1,8,58,118,101,99,50,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,
+59,120,0,0,18,101,100,103,101,49,0,59,120,0,0,18,118,0,59,120,0,0,0,0,58,115,109,111,111,116,104,
+115,116,101,112,0,18,101,100,103,101,48,0,59,121,0,0,18,101,100,103,101,49,0,59,121,0,0,18,118,0,
+59,121,0,0,0,0,0,0,0,1,0,11,0,115,109,111,111,116,104,115,116,101,112,0,1,0,0,11,101,100,103,101,
+48,0,0,1,0,0,11,101,100,103,101,49,0,0,1,0,0,11,118,0,0,0,1,8,58,118,101,99,51,0,58,115,109,111,
+111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,59,120,0,0,18,101,100,103,101,49,0,59,120,0,
+0,18,118,0,59,120,0,0,0,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,59,
+121,0,0,18,101,100,103,101,49,0,59,121,0,0,18,118,0,59,121,0,0,0,0,58,115,109,111,111,116,104,115,
+116,101,112,0,18,101,100,103,101,48,0,59,122,0,0,18,101,100,103,101,49,0,59,122,0,0,18,118,0,59,
+122,0,0,0,0,0,0,0,1,0,12,0,115,109,111,111,116,104,115,116,101,112,0,1,0,0,12,101,100,103,101,48,0,
+0,1,0,0,12,101,100,103,101,49,0,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,115,109,111,111,116,
+104,115,116,101,112,0,18,101,100,103,101,48,0,59,120,0,0,18,101,100,103,101,49,0,59,120,0,0,18,118,
+0,59,120,0,0,0,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,59,121,0,0,
+18,101,100,103,101,49,0,59,121,0,0,18,118,0,59,121,0,0,0,0,58,115,109,111,111,116,104,115,116,101,
+112,0,18,101,100,103,101,48,0,59,122,0,0,18,101,100,103,101,49,0,59,122,0,0,18,118,0,59,122,0,0,0,
+0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,59,119,0,0,18,101,100,103,
+101,49,0,59,119,0,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,10,0,115,109,111,111,116,104,115,116,101,112,
+0,1,0,0,9,101,100,103,101,48,0,0,1,0,0,9,101,100,103,101,49,0,0,1,0,0,10,118,0,0,0,1,8,58,118,101,
+99,50,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,0,18,101,100,103,101,
+49,0,0,18,118,0,59,120,0,0,0,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,
+0,0,18,101,100,103,101,49,0,0,18,118,0,59,121,0,0,0,0,0,0,0,1,0,11,0,115,109,111,111,116,104,115,
+116,101,112,0,1,0,0,9,101,100,103,101,48,0,0,1,0,0,9,101,100,103,101,49,0,0,1,0,0,11,118,0,0,0,1,8,
+58,118,101,99,51,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,0,18,101,
+100,103,101,49,0,0,18,118,0,59,120,0,0,0,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,
+103,101,48,0,0,18,101,100,103,101,49,0,0,18,118,0,59,121,0,0,0,0,58,115,109,111,111,116,104,115,
+116,101,112,0,18,101,100,103,101,48,0,0,18,101,100,103,101,49,0,0,18,118,0,59,122,0,0,0,0,0,0,0,1,
+0,12,0,115,109,111,111,116,104,115,116,101,112,0,1,0,0,9,101,100,103,101,48,0,0,1,0,0,9,101,100,
+103,101,49,0,0,1,0,0,12,118,0,0,0,1,8,58,118,101,99,52,0,58,115,109,111,111,116,104,115,116,101,
+112,0,18,101,100,103,101,48,0,0,18,101,100,103,101,49,0,0,18,118,0,59,120,0,0,0,0,58,115,109,111,
+111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,0,18,101,100,103,101,49,0,0,18,118,0,59,121,
+0,0,0,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,0,0,18,101,100,103,101,
+49,0,0,18,118,0,59,122,0,0,0,0,58,115,109,111,111,116,104,115,116,101,112,0,18,101,100,103,101,48,
+0,0,18,101,100,103,101,49,0,0,18,118,0,59,119,0,0,0,0,0,0,0,1,0,9,0,100,111,116,0,1,0,0,9,120,0,0,
+1,0,0,9,121,0,0,0,1,8,18,120,0,18,121,0,48,0,0,1,0,9,0,100,111,116,0,1,0,0,10,118,0,0,1,0,0,10,117,
+0,0,0,1,8,18,118,0,59,120,0,18,117,0,59,120,0,48,18,118,0,59,121,0,18,117,0,59,121,0,48,46,0,0,1,0,
+9,0,100,111,116,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,18,118,0,59,120,0,18,117,0,59,120,0,48,
+18,118,0,59,121,0,18,117,0,59,121,0,48,46,18,118,0,59,122,0,18,117,0,59,122,0,48,46,0,0,1,0,9,0,
+100,111,116,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,18,118,0,59,120,0,18,117,0,59,120,0,48,18,
+118,0,59,121,0,18,117,0,59,121,0,48,46,18,118,0,59,122,0,18,117,0,59,122,0,48,46,18,118,0,59,119,0,
+18,117,0,59,119,0,48,46,0,0,1,0,9,0,108,101,110,103,116,104,0,1,0,0,9,120,0,0,0,1,8,58,115,113,114,
+116,0,58,100,111,116,0,18,120,0,0,18,120,0,0,0,0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,0,0,10,
+118,0,0,0,1,8,58,115,113,114,116,0,58,100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,0,0,1,0,9,0,108,
+101,110,103,116,104,0,1,0,0,11,118,0,0,0,1,8,58,115,113,114,116,0,58,100,111,116,0,18,118,0,0,18,
+118,0,0,0,0,0,0,0,1,0,9,0,108,101,110,103,116,104,0,1,0,0,12,118,0,0,0,1,8,58,115,113,114,116,0,58,
+100,111,116,0,18,118,0,0,18,118,0,0,0,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,0,0,9,120,
+0,0,1,0,0,9,121,0,0,0,1,8,58,108,101,110,103,116,104,0,18,120,0,18,121,0,47,0,0,0,0,1,0,9,0,100,
+105,115,116,97,110,99,101,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,1,8,58,108,101,110,103,116,104,0,
+18,118,0,18,117,0,47,0,0,0,0,1,0,9,0,100,105,115,116,97,110,99,101,0,1,0,0,11,118,0,0,1,0,0,11,117,
+0,0,0,1,8,58,108,101,110,103,116,104,0,18,118,0,18,117,0,47,0,0,0,0,1,0,9,0,100,105,115,116,97,110,
+99,101,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,58,108,101,110,103,116,104,0,18,118,0,18,117,0,47,
+0,0,0,0,1,0,11,0,99,114,111,115,115,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,118,101,99,51,0,
+18,118,0,59,121,0,18,117,0,59,122,0,48,18,117,0,59,121,0,18,118,0,59,122,0,48,47,0,18,118,0,59,122,
+0,18,117,0,59,120,0,48,18,117,0,59,122,0,18,118,0,59,120,0,48,47,0,18,118,0,59,120,0,18,117,0,59,
+121,0,48,18,117,0,59,120,0,18,118,0,59,121,0,48,47,0,0,0,0,1,0,9,0,110,111,114,109,97,108,105,122,
+101,0,1,0,0,9,120,0,0,0,1,8,17,49,0,48,0,0,0,0,1,0,10,0,110,111,114,109,97,108,105,122,101,0,1,0,0,
+10,118,0,0,0,1,8,18,118,0,58,108,101,110,103,116,104,0,18,118,0,0,0,49,0,0,1,0,11,0,110,111,114,
+109,97,108,105,122,101,0,1,0,0,11,118,0,0,0,1,8,18,118,0,58,108,101,110,103,116,104,0,18,118,0,0,0,
+49,0,0,1,0,12,0,110,111,114,109,97,108,105,122,101,0,1,0,0,12,118,0,0,0,1,8,18,118,0,58,108,101,
+110,103,116,104,0,18,118,0,0,0,49,0,0,1,0,9,0,102,97,99,101,102,111,114,119,97,114,100,0,1,0,0,9,
+78,0,0,1,0,0,9,73,0,0,1,0,0,9,78,114,101,102,0,0,0,1,8,58,100,111,116,0,18,78,114,101,102,0,0,18,
+73,0,0,0,17,48,0,48,0,0,40,18,78,0,18,78,0,54,31,0,0,1,0,10,0,102,97,99,101,102,111,114,119,97,114,
+100,0,1,0,0,10,78,0,0,1,0,0,10,73,0,0,1,0,0,10,78,114,101,102,0,0,0,1,8,58,100,111,116,0,18,78,114,
+101,102,0,0,18,73,0,0,0,17,48,0,48,0,0,40,18,78,0,18,78,0,54,31,0,0,1,0,11,0,102,97,99,101,102,111,
+114,119,97,114,100,0,1,0,0,11,78,0,0,1,0,0,11,73,0,0,1,0,0,11,78,114,101,102,0,0,0,1,8,58,100,111,
+116,0,18,78,114,101,102,0,0,18,73,0,0,0,17,48,0,48,0,0,40,18,78,0,18,78,0,54,31,0,0,1,0,12,0,102,
+97,99,101,102,111,114,119,97,114,100,0,1,0,0,12,78,0,0,1,0,0,12,73,0,0,1,0,0,12,78,114,101,102,0,0,
+0,1,8,58,100,111,116,0,18,78,114,101,102,0,0,18,73,0,0,0,17,48,0,48,0,0,40,18,78,0,18,78,0,54,31,0,
+0,1,0,9,0,114,101,102,108,101,99,116,0,1,0,0,9,73,0,0,1,0,0,9,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,
+58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,10,0,114,101,102,108,101,99,116,0,
+1,0,0,10,73,0,0,1,0,0,10,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,
+0,48,18,78,0,48,47,0,0,1,0,11,0,114,101,102,108,101,99,116,0,1,0,0,11,73,0,0,1,0,0,11,78,0,0,0,1,8,
+18,73,0,17,50,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,12,0,114,
+101,102,108,101,99,116,0,1,0,0,12,73,0,0,1,0,0,12,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,
+116,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,0,9,0,114,101,102,114,97,99,116,0,1,0,0,9,73,0,
+0,1,0,0,9,78,0,0,1,0,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,
+101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,
+18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,
+97,0,18,73,0,48,18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,
+107,0,0,0,46,18,78,0,48,47,0,0,1,0,10,0,114,101,102,114,97,99,116,0,1,0,0,10,73,0,0,1,0,0,10,78,0,
+0,1,0,0,9,101,116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,
+17,49,0,48,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47,
+48,47,0,0,10,18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48,
+18,101,116,97,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18,
+78,0,48,47,0,0,1,0,11,0,114,101,102,114,97,99,116,0,1,0,0,11,73,0,0,1,0,0,11,78,0,0,1,0,0,9,101,
+116,97,0,0,0,1,3,2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,
+58,100,111,116,0,18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10,
+18,107,0,17,48,0,48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48,18,101,116,97,
+0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,
+1,0,12,0,114,101,102,114,97,99,116,0,1,0,0,12,73,0,0,1,0,0,12,78,0,0,1,0,0,9,101,116,97,0,0,0,1,3,
+2,0,9,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,58,100,111,116,0,
+18,78,0,0,18,73,0,0,0,58,100,111,116,0,18,78,0,0,18,73,0,0,0,48,47,48,47,0,0,10,18,107,0,17,48,0,
+48,0,0,40,0,8,17,48,0,48,0,0,0,9,14,0,8,18,101,116,97,0,18,73,0,48,18,101,116,97,0,58,100,111,116,
+0,18,78,0,0,18,73,0,0,0,48,58,115,113,114,116,0,18,107,0,0,0,46,18,78,0,48,47,0,0,1,0,13,0,109,97,
+116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,13,109,0,0,1,0,0,13,110,0,0,0,1,8,58,109,97,
+116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,
+0,57,48,0,0,0,0,1,0,14,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,14,109,0,0,1,
+0,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,
+16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,0,0,0,
+1,0,15,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,15,109,0,0,1,0,0,15,110,0,0,
+0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,
+18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,18,109,0,16,10,51,0,
+57,18,110,0,16,10,51,0,57,48,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1,0,0,10,118,0,0,1,0,
+0,10,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,40,0,18,118,0,59,121,
+0,18,117,0,59,121,0,40,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,0,1,0,0,11,118,0,0,1,0,0,11,
+117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,40,0,18,118,0,59,121,0,18,
+117,0,59,121,0,40,0,18,118,0,59,122,0,18,117,0,59,122,0,40,0,0,0,0,1,0,4,0,108,101,115,115,84,104,
+97,110,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,
+59,120,0,40,0,18,118,0,59,121,0,18,117,0,59,121,0,40,0,18,118,0,59,122,0,18,117,0,59,122,0,40,0,18,
+118,0,59,119,0,18,117,0,59,119,0,40,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,0,1,0,0,6,118,0,
+0,1,0,0,6,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,40,0,18,118,0,59,
+121,0,18,117,0,59,121,0,40,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,0,1,0,0,7,118,0,0,1,0,0,7,
+117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,40,0,18,118,0,59,121,0,18,
+117,0,59,121,0,40,0,18,118,0,59,122,0,18,117,0,59,122,0,40,0,0,0,0,1,0,4,0,108,101,115,115,84,104,
+97,110,0,1,0,0,8,118,0,0,1,0,0,8,117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,
+120,0,40,0,18,118,0,59,121,0,18,117,0,59,121,0,40,0,18,118,0,59,122,0,18,117,0,59,122,0,40,0,18,
+118,0,59,119,0,18,117,0,59,119,0,40,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,69,113,117,97,
+108,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,
+120,0,42,0,18,118,0,59,121,0,18,117,0,59,121,0,42,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,69,
+113,117,97,108,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,
+18,117,0,59,120,0,42,0,18,118,0,59,121,0,18,117,0,59,121,0,42,0,18,118,0,59,122,0,18,117,0,59,122,
+0,42,0,0,0,0,1,0,4,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,0,0,12,118,0,0,1,0,0,12,
+117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,42,0,18,118,0,59,121,0,18,
+117,0,59,121,0,42,0,18,118,0,59,122,0,18,117,0,59,122,0,42,0,18,118,0,59,119,0,18,117,0,59,119,0,
+42,0,0,0,0,1,0,2,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,0,0,6,118,0,0,1,0,0,6,117,0,
+0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,42,0,18,118,0,59,121,0,18,117,0,
+59,121,0,42,0,0,0,0,1,0,3,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,0,0,7,118,0,0,1,0,
+0,7,117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,42,0,18,118,0,59,121,0,
+18,117,0,59,121,0,42,0,18,118,0,59,122,0,18,117,0,59,122,0,42,0,0,0,0,1,0,4,0,108,101,115,115,84,
+104,97,110,69,113,117,97,108,0,1,0,0,8,118,0,0,1,0,0,8,117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,
+0,59,120,0,18,117,0,59,120,0,42,0,18,118,0,59,121,0,18,117,0,59,121,0,42,0,18,118,0,59,122,0,18,
+117,0,59,122,0,42,0,18,118,0,59,119,0,18,117,0,59,119,0,42,0,0,0,0,1,0,2,0,103,114,101,97,116,101,
+114,84,104,97,110,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,
+0,18,117,0,59,120,0,41,0,18,118,0,59,121,0,18,117,0,59,121,0,41,0,0,0,0,1,0,3,0,103,114,101,97,116,
+101,114,84,104,97,110,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,
+120,0,18,117,0,59,120,0,41,0,18,118,0,59,121,0,18,117,0,59,121,0,41,0,18,118,0,59,122,0,18,117,0,
+59,122,0,41,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,0,1,0,0,12,118,0,0,1,0,0,12,
+117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,41,0,18,118,0,59,121,0,18,
+117,0,59,121,0,41,0,18,118,0,59,122,0,18,117,0,59,122,0,41,0,18,118,0,59,119,0,18,117,0,59,119,0,
+41,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,0,1,0,0,6,118,0,0,1,0,0,6,117,0,0,0,1,
+8,58,98,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,41,0,18,118,0,59,121,0,18,117,0,59,121,
+0,41,0,0,0,0,1,0,3,0,103,114,101,97,116,101,114,84,104,97,110,0,1,0,0,7,118,0,0,1,0,0,7,117,0,0,0,
+1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,41,0,18,118,0,59,121,0,18,117,0,59,
+121,0,41,0,18,118,0,59,122,0,18,117,0,59,122,0,41,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,
+104,97,110,0,1,0,0,8,118,0,0,1,0,0,8,117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,
+0,59,120,0,41,0,18,118,0,59,121,0,18,117,0,59,121,0,41,0,18,118,0,59,122,0,18,117,0,59,122,0,41,0,
+18,118,0,59,119,0,18,117,0,59,119,0,41,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,69,
+113,117,97,108,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,
+18,117,0,59,120,0,43,0,18,118,0,59,121,0,18,117,0,59,121,0,43,0,0,0,0,1,0,3,0,103,114,101,97,116,
+101,114,84,104,97,110,69,113,117,97,108,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,98,118,101,99,
+51,0,18,118,0,59,120,0,18,117,0,59,120,0,43,0,18,118,0,59,121,0,18,117,0,59,121,0,43,0,18,118,0,59,
+122,0,18,117,0,59,122,0,43,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,
+108,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,
+120,0,43,0,18,118,0,59,121,0,18,117,0,59,121,0,43,0,18,118,0,59,122,0,18,117,0,59,122,0,43,0,18,
+118,0,59,119,0,18,117,0,59,119,0,43,0,0,0,0,1,0,2,0,103,114,101,97,116,101,114,84,104,97,110,69,
+113,117,97,108,0,1,0,0,6,118,0,0,1,0,0,6,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,18,
+117,0,59,120,0,43,0,18,118,0,59,121,0,18,117,0,59,121,0,43,0,0,0,0,1,0,3,0,103,114,101,97,116,101,
+114,84,104,97,110,69,113,117,97,108,0,1,0,0,7,118,0,0,1,0,0,7,117,0,0,0,1,8,58,98,118,101,99,51,0,
+18,118,0,59,120,0,18,117,0,59,120,0,43,0,18,118,0,59,121,0,18,117,0,59,121,0,43,0,18,118,0,59,122,
+0,18,117,0,59,122,0,43,0,0,0,0,1,0,4,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,
+0,1,0,0,8,118,0,0,1,0,0,8,117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,
+43,0,18,118,0,59,121,0,18,117,0,59,121,0,43,0,18,118,0,59,122,0,18,117,0,59,122,0,43,0,18,118,0,59,
+119,0,18,117,0,59,119,0,43,0,0,0,0,1,0,2,0,101,113,117,97,108,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,
+0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,38,0,18,118,0,59,121,0,18,117,0,59,
+121,0,38,0,0,0,0,1,0,3,0,101,113,117,97,108,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,98,118,
+101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,38,0,18,118,0,59,121,0,18,117,0,59,121,0,38,0,18,
+118,0,59,122,0,18,117,0,59,122,0,38,0,0,0,0,1,0,4,0,101,113,117,97,108,0,1,0,0,12,118,0,0,1,0,0,12,
+117,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,38,0,18,118,0,59,121,0,18,
+117,0,59,121,0,38,0,18,118,0,59,122,0,18,117,0,59,122,0,38,0,18,118,0,59,119,0,18,117,0,59,119,0,
+38,0,0,0,0,1,0,2,0,101,113,117,97,108,0,1,0,0,6,118,0,0,1,0,0,6,117,0,0,0,1,8,58,98,118,101,99,50,
+0,18,118,0,59,120,0,18,117,0,59,120,0,38,0,18,118,0,59,121,0,18,117,0,59,121,0,38,0,0,0,0,1,0,3,0,
+101,113,117,97,108,0,1,0,0,7,118,0,0,1,0,0,7,117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,
+18,117,0,59,120,0,38,0,18,118,0,59,121,0,18,117,0,59,121,0,38,0,18,118,0,59,122,0,18,117,0,59,122,
+0,38,0,0,0,0,1,0,4,0,101,113,117,97,108,0,1,0,0,8,118,0,0,1,0,0,8,117,0,0,0,1,8,58,98,118,101,99,
+52,0,18,118,0,59,120,0,18,117,0,59,120,0,38,0,18,118,0,59,121,0,18,117,0,59,121,0,38,0,18,118,0,59,
+122,0,18,117,0,59,122,0,38,0,18,118,0,59,119,0,18,117,0,59,119,0,38,0,0,0,0,1,0,2,0,110,111,116,69,
+113,117,97,108,0,1,0,0,10,118,0,0,1,0,0,10,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,0,59,120,0,
+18,117,0,59,120,0,39,0,18,118,0,59,121,0,18,117,0,59,121,0,39,0,0,0,0,1,0,3,0,110,111,116,69,113,
+117,97,108,0,1,0,0,11,118,0,0,1,0,0,11,117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,18,
+117,0,59,120,0,39,0,18,118,0,59,121,0,18,117,0,59,121,0,39,0,18,118,0,59,122,0,18,117,0,59,122,0,
+39,0,0,0,0,1,0,4,0,110,111,116,69,113,117,97,108,0,1,0,0,12,118,0,0,1,0,0,12,117,0,0,0,1,8,58,98,
+118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,39,0,18,118,0,59,121,0,18,117,0,59,121,0,39,0,
+18,118,0,59,122,0,18,117,0,59,122,0,39,0,18,118,0,59,119,0,18,117,0,59,119,0,39,0,0,0,0,1,0,2,0,
+110,111,116,69,113,117,97,108,0,1,0,0,6,118,0,0,1,0,0,6,117,0,0,0,1,8,58,98,118,101,99,50,0,18,118,
+0,59,120,0,18,117,0,59,120,0,39,0,18,118,0,59,121,0,18,117,0,59,121,0,39,0,0,0,0,1,0,3,0,110,111,
+116,69,113,117,97,108,0,1,0,0,7,118,0,0,1,0,0,7,117,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,
+120,0,18,117,0,59,120,0,39,0,18,118,0,59,121,0,18,117,0,59,121,0,39,0,18,118,0,59,122,0,18,117,0,
+59,122,0,39,0,0,0,0,1,0,4,0,110,111,116,69,113,117,97,108,0,1,0,0,8,118,0,0,1,0,0,8,117,0,0,0,1,8,
+58,98,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,39,0,18,118,0,59,121,0,18,117,0,59,121,0,
+39,0,18,118,0,59,122,0,18,117,0,59,122,0,39,0,18,118,0,59,119,0,18,117,0,59,119,0,39,0,0,0,0,1,0,1,
+0,97,110,121,0,1,0,0,2,118,0,0,0,1,8,18,118,0,59,120,0,18,118,0,59,121,0,32,0,0,1,0,1,0,97,110,121,
+0,1,0,0,3,118,0,0,0,1,8,18,118,0,59,120,0,18,118,0,59,121,0,32,18,118,0,59,122,0,32,0,0,1,0,1,0,97,
+110,121,0,1,0,0,4,118,0,0,0,1,8,18,118,0,59,120,0,18,118,0,59,121,0,32,18,118,0,59,122,0,32,18,118,
+0,59,119,0,32,0,0,1,0,1,0,97,108,108,0,1,0,0,2,118,0,0,0,1,8,18,118,0,59,120,0,18,118,0,59,121,0,
+34,0,0,1,0,1,0,97,108,108,0,1,0,0,3,118,0,0,0,1,8,18,118,0,59,120,0,18,118,0,59,121,0,34,18,118,0,
+59,122,0,34,0,0,1,0,1,0,97,108,108,0,1,0,0,4,118,0,0,0,1,8,18,118,0,59,120,0,18,118,0,59,121,0,34,
+18,118,0,59,122,0,34,18,118,0,59,119,0,34,0,0,1,0,2,0,110,111,116,0,1,0,0,2,118,0,0,0,1,8,58,98,
+118,101,99,50,0,18,118,0,59,120,0,56,0,18,118,0,59,121,0,56,0,0,0,0,1,0,3,0,110,111,116,0,1,0,0,3,
+118,0,0,0,1,8,58,98,118,101,99,51,0,18,118,0,59,120,0,56,0,18,118,0,59,121,0,56,0,18,118,0,59,122,
+0,56,0,0,0,0,1,0,4,0,110,111,116,0,1,0,0,4,118,0,0,0,1,8,58,98,118,101,99,52,0,18,118,0,59,120,0,
+56,0,18,118,0,59,121,0,56,0,18,118,0,59,122,0,56,0,18,118,0,59,119,0,56,0,0,0,0,1,0,12,0,116,101,
+120,116,117,114,101,49,68,0,1,0,0,16,115,97,109,112,108,101,114,0,0,1,0,0,9,99,111,111,114,100,0,0,
+0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,116,101,120,49,100,0,18,116,101,120,
+101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,
+116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,0,0,16,115,
+97,109,112,108,101,114,0,0,1,0,0,10,99,111,111,114,100,0,0,0,1,8,58,116,101,120,116,117,114,101,49,
+68,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,
+116,0,49,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,0,0,16,115,97,109,
+112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,116,101,120,116,117,114,101,49,68,0,
+18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,
+0,49,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,0,1,0,0,17,115,97,109,112,108,101,114,0,0,
+1,0,0,10,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,116,
+101,120,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,
+100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,
+68,80,114,111,106,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,8,
+58,116,101,120,116,117,114,101,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,50,0,18,99,
+111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,112,0,49,0,18,99,111,111,114,100,0,59,116,0,
+18,99,111,111,114,100,0,59,112,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,80,114,
+111,106,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,116,101,
+120,116,117,114,101,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,50,0,18,99,111,111,114,
+100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,
+111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,0,1,0,0,18,115,97,
+109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,
+118,101,99,52,95,116,101,120,51,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,
+18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,
+116,117,114,101,51,68,80,114,111,106,0,1,0,0,18,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,
+114,100,0,0,0,1,8,58,116,101,120,116,117,114,101,51,68,0,18,115,97,109,112,108,101,114,0,0,58,118,
+101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,
+114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,
+111,111,114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,67,117,98,101,0,1,0,
+0,19,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,
+108,0,0,0,4,118,101,99,52,95,116,101,120,99,117,98,101,0,18,116,101,120,101,108,0,0,18,115,97,109,
+112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,
+0,12,0,115,104,97,100,111,119,49,68,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,
+114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,49,100,0,18,
+116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,17,48,0,48,0,0,
+0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,80,114,111,106,0,1,0,0,20,
+115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,0,1,8,58,115,104,97,100,111,119,49,
+68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,
+111,111,114,100,0,59,113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,
+114,100,0,59,113,0,49,0,0,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,0,1,0,0,21,115,97,109,112,
+108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,
+99,52,95,115,104,97,100,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,
+99,111,111,114,100,0,0,17,48,0,48,0,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,
+111,119,50,68,80,114,111,106,0,1,0,0,21,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,
+0,0,0,1,8,58,115,104,97,100,111,119,50,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,
+18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,
+116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,
+0,59,113,0,49,0,0,0,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,9,120,0,0,0,1,3,2,0,9,1,97,0,0,0,
+4,102,108,111,97,116,95,110,111,105,115,101,49,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,
+111,105,115,101,49,0,1,0,0,10,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105,
+115,101,50,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,11,120,0,
+0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,97,116,95,110,111,105,115,101,51,0,18,97,0,0,18,120,0,0,0,8,
+18,97,0,0,0,1,0,9,0,110,111,105,115,101,49,0,1,0,0,12,120,0,0,0,1,3,2,0,9,1,97,0,0,0,4,102,108,111,
+97,116,95,110,111,105,115,101,52,0,18,97,0,0,18,120,0,0,0,8,18,97,0,0,0,1,0,10,0,110,111,105,115,
+101,50,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,
+110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101,
+50,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,
+111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,
+0,0,0,0,0,1,0,10,0,110,111,105,115,101,50,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,
+105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,
+51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,0,0,0,1,0,10,0,110,111,105,115,101,
+50,0,1,0,0,12,120,0,0,0,1,8,58,118,101,99,50,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,
+111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,
+0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,9,120,0,
+0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,
+18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0,
+0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,
+105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,17,49,57,0,
+51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,50,0,
+17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,
+0,11,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,
+115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,
+0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,53,0,52,55,0,0,0,17,49,
+55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,0,0,0,1,0,11,0,110,111,105,115,101,51,0,1,0,0,
+12,120,0,0,0,1,8,58,118,101,99,51,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,
+101,49,0,18,120,0,58,118,101,99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,
+0,17,50,0,55,55,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0,
+52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,0,0,0,
+1,0,12,0,110,111,105,115,101,52,0,1,0,0,9,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,
+49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,0,58,110,111,
+105,115,101,49,0,18,120,0,17,53,0,52,55,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,17,50,51,
+0,53,52,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,10,120,0,0,0,1,8,58,118,101,99,
+52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,
+50,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,
+118,101,99,50,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,
+18,120,0,58,118,101,99,50,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,0,46,0,0,0,0,0,0,1,0,12,
+0,110,111,105,115,101,52,0,1,0,0,11,120,0,0,0,1,8,58,118,101,99,52,0,58,110,111,105,115,101,49,0,
+18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,51,0,17,49,57,0,51,52,0,0,0,17,
+55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,
+51,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,0,46,0,0,0,58,110,111,105,
+115,101,49,0,18,120,0,58,118,101,99,51,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,
+57,49,0,0,0,0,46,0,0,0,0,0,0,1,0,12,0,110,111,105,115,101,52,0,1,0,0,12,120,0,0,0,1,8,58,118,101,
+99,52,0,58,110,111,105,115,101,49,0,18,120,0,0,0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,
+99,52,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,
+0,0,58,110,111,105,115,101,49,0,18,120,0,58,118,101,99,52,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,
+0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,0,58,110,111,105,115,101,49,0,18,120,0,
+58,118,101,99,52,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,17,51,55,0,
+52,56,0,0,0,0,46,0,0,0,0,0,0,0
diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc
index c96fc0a318..9b35fde3da 100755
--- a/src/mesa/shader/slang/library/slang_core.gc
+++ b/src/mesa/shader/slang/library/slang_core.gc
@@ -1,1679 +1,1679 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-//
-// This file defines nearly all constructors and operators for built-in data types, using
-// extended language syntax. In general, compiler treats constructors and operators as
-// ordinary functions with some exceptions. For example, the language does not allow
-// functions to be called in constant expressions - here the exception is made to allow it.
-//
-// Each implementation provides its own version of this file. Each implementation can define
-// the required set of operators and constructors in its own fashion.
-//
-// The extended language syntax is only present when compiling this file. It is implicitly
-// included at the very beginning of the compiled shader, so no built-in functions can be
-// used.
-//
-// To communicate with the implementation, a special extended "__asm" keyword is used, followed
-// by an instruction name (any valid identifier), a destination variable identifier and a
-// a list of zero or more source variable identifiers. A variable identifier is a variable name
-// declared earlier in the code (as a function parameter, local or global variable).
-// An instruction name designates an instruction that must be exported by the implementation.
-// Each instruction receives data from source variable identifiers and returns data in the
-// destination variable identifier.
-//
-// It is up to the implementation how to define a particular operator or constructor. If it is
-// expected to being used rarely, it can be defined in terms of other operators and constructors,
-// for example:
-//
-// ivec2 __operator + (const ivec2 x, const ivec2 y) {
-// return ivec2 (x[0] + y[0], x[1] + y[1]);
-// }
-//
-// If a particular operator or constructor is expected to be used very often or is an atomic
-// operation (that is, an operation that cannot be expressed in terms of other operations or
-// would create a dependency cycle) it must be defined using one or more __asm constructs.
-//
-// Each implementation must define constructors for all scalar types (bool, float, int).
-// There are 9 scalar-to-scalar constructors (including identity constructors). However,
-// since the language introduces special constructors (like matrix constructor with a single
-// scalar value), implementations must also implement these cases.
-// The compiler provides the following algorithm when resolving a constructor:
-// - try to find a constructor with a prototype matching ours,
-// - if no constructor is found and this is a scalar-to-scalar constructor, raise an error,
-// - if a constructor is found, execute it and return,
-// - count the size of the constructor parameter list - if it is less than the size of
-// our constructor's type, raise an error,
-// - for each parameter in the list do a recursive constructor matching for appropriate
-// scalar fields in the constructed variable,
-//
-// Each implementation must also define a set of operators that deal with built-in data types.
-// There are four kinds of operators:
-// 1) Operators that are implemented only by the compiler: "()" (function call), "," (sequence)
-// and "?:" (selection).
-// 2) Operators that are implemented by the compiler by expressing it in terms of other operators:
-// - "." (field selection) - translated to subscript access,
-// - "&&" (logical and) - translated to "<left_expr> ? <right_expr> : false",
-// - "||" (logical or) - translated to "<left_expr> ? true : <right_expr>",
-// 3) Operators that can be defined by the implementation and if the required prototype is not
-// found, standard behaviour is used:
-// - "==", "!=", "=" (equality, assignment) - compare or assign matching fields one-by-one;
-// note that at least operators for scalar data types must be defined by the implementation
-// to get it work,
-// 4) All other operators not mentioned above. If no required prototype is found, an error is
-// raised. An implementation must follow the language specification to provide all valid
-// operator prototypes.
-//
-
-int __constructor (const float f) {
- int i;
- __asm float_to_int i, f;
- return i;
-}
-
-bool __constructor (const int i) {
- return i != 0;
-}
-
-bool __constructor (const float f) {
- return f != 0.0;
-}
-
-int __constructor (const bool b) {
- return b ? 1 : 0;
-}
-
-float __constructor (const bool b) {
- return b ? 1.0 : 0.0;
-}
-
-float __constructor (const int i) {
- float f;
- __asm int_to_float f, i;
- return f;
-}
-
-bool __constructor (const bool b) {
- return b;
-}
-
-int __constructor (const int i) {
- return i;
-}
-
-float __constructor (const float f) {
- return f;
-}
-
-vec2 __constructor (const float f) {
- return vec2 (f, f);
-}
-
-vec2 __constructor (const int i) {
- float x;
- __asm int_to_float x, i;
- return vec2 (x);
-}
-
-vec2 __constructor (const bool b) {
- return vec2 (b ? 1.0 : 0.0);
-}
-
-vec3 __constructor (const float f) {
- return vec3 (f, f, f);
-}
-
-vec3 __constructor (const int i) {
- float x;
- __asm int_to_float x, i;
- return vec3 (x);
-}
-
-vec3 __constructor (const bool b) {
- return vec3 (b ? 1.0 : 0.0);
-}
-
-vec4 __constructor (const float f) {
- return vec4 (f, f, f, f);
-}
-
-vec4 __constructor (const int i) {
- float x;
- __asm int_to_float x, i;
- return vec4 (x);
-}
-
-vec4 __constructor (const bool b) {
- return vec4 (b ? 1.0 : 0.0);
-}
-
-ivec2 __constructor (const int i) {
- return ivec2 (i, i);
-}
-
-ivec2 __constructor (const float f) {
- return ivec2 (int (f));
-}
-
-ivec2 __constructor (const bool b) {
- return ivec2 (int (b));
-}
-
-ivec3 __constructor (const int i) {
- return ivec3 (i, i, i);
-}
-
-ivec3 __constructor (const float f) {
- return ivec3 (int (f));
-}
-
-ivec3 __constructor (const bool b) {
- return ivec3 (int (b));
-}
-
-ivec4 __constructor (const int i) {
- return ivec4 (i, i, i, i);
-}
-
-ivec4 __constructor (const float f) {
- return ivec4 (int (f));
-}
-
-ivec4 __constructor (const bool b) {
- return ivec4 (int (b));
-}
-
-bvec2 __constructor (const bool b) {
- return bvec2 (b, b);
-}
-
-bvec2 __constructor (const float f) {
- return bvec2 (bool (f));
-}
-
-bvec2 __constructor (const int i) {
- return bvec2 (bool (i));
-}
-
-bvec3 __constructor (const bool b) {
- return bvec3 (b, b, b);
-}
-
-bvec3 __constructor (const float f) {
- return bvec3 (bool (f));
-}
-
-bvec3 __constructor (const int i) {
- return bvec3 (bool (i));
-}
-
-bvec4 __constructor (const bool b) {
- return bvec4 (b, b, b, b);
-}
-
-bvec4 __constructor (const float f) {
- return bvec4 (bool (f));
-}
-
-bvec4 __constructor (const int i) {
- return bvec4 (bool (i));
-}
-
-mat2 __constructor (const float f) {
- return mat2 (f, 0.0, 0.0, f);
-}
-
-mat2 __constructor (const int i) {
- float x;
- __asm int_to_float x, i;
- return mat2 (x);
-}
-
-mat2 __constructor (const bool b) {
- return mat2 (b ? 1.0 : 0.0);
-}
-
-mat3 __constructor (const float f) {
- return mat3 (f, 0.0, 0.0, 0.0, f, 0.0, 0.0, 0.0, f);
-}
-
-mat3 __constructor (const int i) {
- float x;
- __asm int_to_float x, i;
- return mat3 (x);
-}
-
-mat3 __constructor (const bool b) {
- return mat3 (b ? 1.0 : 0.0);
-}
-
-mat4 __constructor (const float f) {
- return mat4 (f, 0.0, 0.0, 0.0, 0.0, f, 0.0, 0.0, 0.0, 0.0, f, 0.0, 0.0, 0.0, 0.0, f);
-}
-
-mat4 __constructor (const int i) {
- float x;
- __asm int_to_float x, i;
- return mat4 (x);
-}
-
-mat4 __constructor (const bool b) {
- return mat4 (b ? 1.0 : 0.0);
-}
-
-void __operator += (inout float a, const float b) {
- __asm float_add a, a, b;
-}
-
-float __operator - (const float a) {
- float b;
- __asm float_negate b, a;
- return b;
-}
-
-void __operator -= (inout float a, const float b) {
- float c;
- __asm float_negate c, b;
- __asm float_add a, a, c;
-}
-
-void __operator *= (inout float a, const float b) {
- __asm float_multiply a, a, b;
-}
-
-void __operator /= (inout float a, const float b) {
- __asm float_divide a, a, b;
-}
-
-float __operator + (const float a, const float b) {
- float c;
- __asm float_add c, a, b;
- return c;
-}
-
-void __operator += (inout int a, const int b) {
- a = int (float (a) + float (b));
-}
-
-int __operator - (const int a) {
- float x;
- int b;
- __asm int_to_float x, a;
- __asm float_negate x, x;
- __asm float_to_int b, x;
- return b;
-}
-
-void __operator -= (inout int a, const int b) {
- a += -b;
-}
-
-float __operator * (const float a, const float b) {
- float c;
- __asm float_multiply c, a, b;
- return c;
-}
-
-void __operator *= (inout int a, const int b) {
- a = int (float (a) * float (b));
-}
-
-float __operator / (const float a, const float b) {
- float c;
- __asm float_divide c, a, b;
- return c;
-}
-
-void __operator /= (inout int a, const int b) {
- a = int (float (a) / float (b));
-}
-
-void __operator += (inout vec2 v, const vec2 u) {
- v.x += u.x;
- v.y += u.y;
-}
-
-void __operator -= (inout vec2 v, const vec2 u) {
- v.x -= u.x;
- v.y -= u.y;
-}
-
-void __operator *= (inout vec2 v, const vec2 u) {
- v.x *= u.x;
- v.y *= u.y;
-}
-
-void __operator /= (inout vec2 v, const vec2 u) {
- v.x /= u.x;
- v.y /= u.y;
-}
-
-void __operator += (inout vec3 v, const vec3 u) {
- v.x += u.x;
- v.y += u.y;
- v.z += u.z;
-}
-
-void __operator -= (inout vec3 v, const vec3 u) {
- v.x -= u.x;
- v.y -= u.y;
- v.z -= u.z;
-}
-
-void __operator *= (inout vec3 v, const vec3 u) {
- v.x *= u.x;
- v.y *= u.y;
- v.z *= u.z;
-}
-
-void __operator /= (inout vec3 v, const vec3 u) {
- v.x /= u.x;
- v.y /= u.y;
- v.z /= u.z;
-}
-
-void __operator += (inout vec4 v, const vec4 u) {
- v.x += u.x;
- v.y += u.y;
- v.z += u.z;
- v.w += u.w;
-}
-
-void __operator -= (inout vec4 v, const vec4 u) {
- v.x -= u.x;
- v.y -= u.y;
- v.z -= u.z;
- v.w -= u.w;
-}
-
-void __operator *= (inout vec4 v, const vec4 u) {
- v.x *= u.x;
- v.y *= u.y;
- v.z *= u.z;
- v.w *= u.w;
-}
-
-void __operator /= (inout vec4 v, const vec4 u) {
- v.x /= u.x;
- v.y /= u.y;
- v.z /= u.z;
- v.w /= u.w;
-}
-
-void __operator += (inout ivec2 v, const ivec2 u) {
- v.x += u.x;
- v.y += u.y;
-}
-
-void __operator -= (inout ivec2 v, const ivec2 u) {
- v.x -= u.x;
- v.y -= u.y;
-}
-
-void __operator *= (inout ivec2 v, const ivec2 u) {
- v.x *= u.x;
- v.y *= u.y;
-}
-
-void __operator /= (inout ivec2 v, const ivec2 u) {
- v.x /= u.x;
- v.y /= u.y;
-}
-
-void __operator += (inout ivec3 v, const ivec3 u) {
- v.x += u.x;
- v.y += u.y;
- v.z += u.z;
-}
-
-void __operator -= (inout ivec3 v, const ivec3 u) {
- v.x -= u.x;
- v.y -= u.y;
- v.z -= u.z;
-}
-
-void __operator *= (inout ivec3 v, const ivec3 u) {
- v.x *= u.x;
- v.y *= u.y;
- v.z *= u.z;
-}
-
-void __operator /= (inout ivec3 v, const ivec3 u) {
- v.x /= u.x;
- v.y /= u.y;
- v.z /= u.z;
-}
-
-void __operator += (inout ivec4 v, const ivec4 u) {
- v.x += u.x;
- v.y += u.y;
- v.z += u.z;
- v.w += u.w;
-}
-
-void __operator -= (inout ivec4 v, const ivec4 u) {
- v.x -= u.x;
- v.y -= u.y;
- v.z -= u.z;
- v.w -= u.w;
-}
-
-void __operator *= (inout ivec4 v, const ivec4 u) {
- v.x *= u.x;
- v.y *= u.y;
- v.z *= u.z;
- v.w *= u.w;
-}
-
-void __operator /= (inout ivec4 v, const ivec4 u) {
- v.x /= u.x;
- v.y /= u.y;
- v.z /= u.z;
- v.w /= u.w;
-}
-
-void __operator += (inout mat2 m, const mat2 n) {
- m[0] += n[0];
- m[1] += n[1];
-}
-
-void __operator -= (inout mat2 m, const mat2 n) {
- m[0] -= n[0];
- m[1] -= n[1];
-}
-
-vec2 __operator * (const mat2 m, const vec2 v) {
- return vec2 (
- v.x * m[0].x + v.y * m[1].x,
- v.x * m[0].y + v.y * m[1].y
- );
-}
-
-mat2 __operator * (const mat2 m, const mat2 n) {
- return mat2 (m * n[0], m * n[1]);
-}
-
-void __operator *= (inout mat2 m, const mat2 n) {
- m = m * n;
-}
-
-void __operator /= (inout mat2 m, const mat2 n) {
- m[0] /= n[0];
- m[1] /= n[1];
-}
-
-void __operator += (inout mat3 m, const mat3 n) {
- m[0] += n[0];
- m[1] += n[1];
- m[2] += n[2];
-}
-
-void __operator -= (inout mat3 m, const mat3 n) {
- m[0] -= n[0];
- m[1] -= n[1];
- m[2] -= n[2];
-}
-
-vec3 __operator * (const mat3 m, const vec3 v) {
- return vec3 (
- v.x * m[0].x + v.y * m[1].x + v.z * m[2].x,
- v.x * m[0].y + v.y * m[1].y + v.z * m[2].y,
- v.x * m[0].z + v.y * m[1].z + v.z * m[2].z
- );
-}
-
-mat3 __operator * (const mat3 m, const mat3 n) {
- return mat3 (m * n[0], m * n[1], m * n[2]);
-}
-
-void __operator *= (inout mat3 m, const mat3 n) {
- m = m * n;
-}
-
-void __operator /= (inout mat3 m, const mat3 n) {
- m[0] /= n[0];
- m[1] /= n[1];
- m[2] /= n[2];
-}
-
-void __operator += (inout mat4 m, const mat4 n) {
- m[0] += n[0];
- m[1] += n[1];
- m[2] += n[2];
- m[3] += n[3];
-}
-
-void __operator -= (inout mat4 m, const mat4 n) {
- m[0] -= n[0];
- m[1] -= n[1];
- m[2] -= n[2];
- m[3] -= n[3];
-}
-
-vec4 __operator * (const mat4 m, const vec4 v) {
- return vec4 (
- v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + v.w * m[3].x,
- v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + v.w * m[3].y,
- v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + v.w * m[3].z,
- v.x * m[0].w + v.y * m[1].w + v.z * m[2].w + v.w * m[3].w
- );
-}
-
-mat4 __operator * (const mat4 m, const mat4 n) {
- return mat4 (m * n[0], m * n[1], m * n[2], m * n[3]);
-}
-
-void __operator *= (inout mat4 m, const mat4 n) {
- m = m * n;
-}
-
-void __operator /= (inout mat4 m, const mat4 n) {
- m[0] /= n[0];
- m[1] /= n[1];
- m[2] /= n[2];
- m[3] /= n[3];
-}
-
-void __operator += (inout vec2 v, const float a) {
- v.x += a;
- v.y += a;
-}
-
-void __operator -= (inout vec2 v, const float a) {
- v.x -= a;
- v.y -= a;
-}
-
-void __operator *= (inout vec2 v, const float a) {
- v.x *= a;
- v.y *= a;
-}
-
-void __operator /= (inout vec2 v, const float a) {
- v.x /= a;
- v.y /= a;
-}
-
-void __operator += (inout vec3 v, const float a) {
- v.x += a;
- v.y += a;
- v.z += a;
-}
-
-void __operator -= (inout vec3 v, const float a) {
- v.x -= a;
- v.y -= a;
- v.z -= a;
-}
-
-void __operator *= (inout vec3 v, const float a) {
- v.x *= a;
- v.y *= a;
- v.z *= a;
-}
-
-void __operator /= (inout vec3 v, const float a) {
- v.x /= a;
- v.y /= a;
- v.z /= a;
-}
-
-void __operator += (inout vec4 v, const float a) {
- v.x += a;
- v.y += a;
- v.z += a;
- v.w += a;
-}
-
-void __operator -= (inout vec4 v, const float a) {
- v.x -= a;
- v.y -= a;
- v.z -= a;
- v.w -= a;
-}
-
-void __operator *= (inout vec4 v, const float a) {
- v.x *= a;
- v.y *= a;
- v.z *= a;
- v.w *= a;
-}
-
-void __operator /= (inout vec4 v, const float a) {
- v.x /= a;
- v.y /= a;
- v.z /= a;
- v.w /= a;
-}
-
-void __operator += (inout mat2 m, const float a) {
- m[0] += a;
- m[1] += a;
-}
-
-void __operator -= (inout mat2 m, const float a) {
- m[0] -= a;
- m[1] -= a;
-}
-
-void __operator *= (inout mat2 m, const float a) {
- m[0] *= a;
- m[1] *= a;
-}
-
-void __operator /= (inout mat2 m, const float a) {
- m[0] /= a;
- m[1] /= a;
-}
-
-void __operator += (inout mat3 m, const float a) {
- m[0] += a;
- m[1] += a;
- m[2] += a;
-}
-
-void __operator -= (inout mat3 m, const float a) {
- m[0] -= a;
- m[1] -= a;
- m[2] -= a;
-}
-
-void __operator *= (inout mat3 m, const float a) {
- m[0] *= a;
- m[1] *= a;
- m[2] *= a;
-}
-
-void __operator /= (inout mat3 m, const float a) {
- m[0] /= a;
- m[1] /= a;
- m[2] /= a;
-}
-
-void __operator += (inout mat4 m, const float a) {
- m[0] += a;
- m[1] += a;
- m[2] += a;
- m[3] += a;
-}
-
-void __operator -= (inout mat4 m, const float a) {
- m[0] -= a;
- m[1] -= a;
- m[2] -= a;
- m[3] -= a;
-}
-
-void __operator *= (inout mat4 m, const float a) {
- m[0] *= a;
- m[1] *= a;
- m[2] *= a;
- m[3] *= a;
-}
-
-void __operator /= (inout mat4 m, const float a) {
- m[0] /= a;
- m[1] /= a;
- m[2] /= a;
- m[3] /= a;
-}
-
-vec2 __operator * (const vec2 v, const mat2 m) {
- return vec2 (
- v.x * m[0].x + v.y * m[0].y,
- v.x * m[1].x + v.y * m[1].y
- );
-}
-
-void __operator *= (inout vec2 v, const mat2 m) {
- v = v * m;
-}
-
-vec3 __operator * (const vec3 v, const mat3 m) {
- return vec3 (
- v.x * m[0].x + v.y * m[0].y + v.z * m[0].z,
- v.x * m[1].x + v.y * m[1].y + v.z * m[1].z,
- v.x * m[2].x + v.y * m[2].y + v.z * m[2].z
- );
-}
-
-void __operator *= (inout vec3 v, const mat3 m) {
- v = v * m;
-}
-
-vec4 __operator * (const vec4 v, const mat4 m) {
- return vec4 (
- v.x * m[0].x + v.y * m[0].y + v.z * m[0].z + v.w * m[0].w,
- v.x * m[1].x + v.y * m[1].y + v.z * m[1].z + v.w * m[1].w,
- v.x * m[2].x + v.y * m[2].y + v.z * m[2].z + v.w * m[2].w,
- v.x * m[3].x + v.y * m[3].y + v.z * m[3].z + v.w * m[3].w
- );
-}
-
-void __operator *= (inout vec4 v, const mat4 m) {
- v = v * m;
-}
-
-float __operator - (const float a, const float b) {
- float c;
- __asm float_negate c, b;
- __asm float_add c, a, c;
- return c;
-}
-
-int __operator + (const int a, const int b) {
- float x, y;
- int c;
- __asm int_to_float x, a;
- __asm int_to_float y, b;
- __asm float_add x, x, y;
- __asm float_to_int c, x;
- return c;
-}
-
-int __operator - (const int a, const int b) {
- float x, y;
- int c;
- __asm int_to_float x, a;
- __asm int_to_float y, b;
- __asm float_negate y, y;
- __asm float_add x, x, y;
- __asm float_to_int c, x;
- return c;
-}
-
-int __operator * (const int a, const int b) {
- float x, y;
- int c;
- __asm int_to_float x, a;
- __asm int_to_float y, b;
- __asm float_multiply x, x, y;
- __asm float_to_int c, x;
- return c;
-}
-
-int __operator / (const int a, const int b) {
- float x, y;
- int c;
- __asm int_to_float x, a;
- __asm int_to_float y, b;
- __asm float_divide x, x, y;
- __asm float_to_int c, x;
- return c;
-}
-
-vec2 __operator + (const vec2 v, const vec2 u) {
- return vec2 (v.x + u.x, v.y + u.y);
-}
-
-vec2 __operator - (const vec2 v, const vec2 u) {
- return vec2 (v.x - u.x, v.y - u.y);
-}
-
-vec2 __operator * (const vec2 v, const vec2 u) {
- return vec2 (v.x * u.x, v.y * u.y);
-}
-
-vec2 __operator / (const vec2 v, const vec2 u) {
- return vec2 (v.x / u.x, v.y / u.y);
-}
-
-vec3 __operator + (const vec3 v, const vec3 u) {
- return vec3 (v.x + u.x, v.y + u.y, v.z + u.z);
-}
-
-vec3 __operator - (const vec3 v, const vec3 u) {
- return vec3 (v.x - u.x, v.y - u.y, v.z - u.z);
-}
-
-vec3 __operator * (const vec3 v, const vec3 u) {
- return vec3 (v.x * u.x, v.y * u.y, v.z * u.z);
-}
-
-vec3 __operator / (const vec3 v, const vec3 u) {
- return vec3 (v.x / u.x, v.y / u.y, v.z / u.z);
-}
-
-vec4 __operator + (const vec4 v, const vec4 u) {
- return vec4 (v.x + u.x, v.y + u.y, v.z + u.z, v.w + u.w);
-}
-
-vec4 __operator - (const vec4 v, const vec4 u) {
- return vec4 (v.x - u.x, v.y - u.y, v.z - u.z, v.w - u.w);
-}
-
-vec4 __operator * (const vec4 v, const vec4 u) {
- return vec4 (v.x * u.x, v.y * u.y, v.z * u.z, v.w * u.w);
-}
-
-vec4 __operator / (const vec4 v, const vec4 u) {
- return vec4 (v.x / u.x, v.y / u.y, v.z / u.z, v.w / u.w);
-}
-
-ivec2 __operator + (const ivec2 v, const ivec2 u) {
- return ivec2 (v.x + u.x, v.y + u.y);
-}
-
-ivec2 __operator - (const ivec2 v, const ivec2 u) {
- return ivec2 (v.x - u.x, v.y - u.y);
-}
-
-ivec2 __operator * (const ivec2 v, const ivec2 u) {
- return ivec2 (v.x * u.x, v.y * u.y);
-}
-
-ivec2 __operator / (const ivec2 v, const ivec2 u) {
- return ivec2 (v.x / u.x, v.y / u.y);
-}
-
-ivec3 __operator + (const ivec3 v, const ivec3 u) {
- return ivec3 (v.x + u.x, v.y + u.y, v.z + u.z);
-}
-
-ivec3 __operator - (const ivec3 v, const ivec3 u) {
- return ivec3 (v.x - u.x, v.y - u.y, v.z - u.z);
-}
-
-ivec3 __operator * (const ivec3 v, const ivec3 u) {
- return ivec3 (v.x * u.x, v.y * u.y, v.z * u.z);
-}
-
-ivec3 __operator / (const ivec3 v, const ivec3 u) {
- return ivec3 (v.x / u.x, v.y / u.y, v.z / u.z);
-}
-
-ivec4 __operator + (const ivec4 v, const ivec4 u) {
- return ivec4 (v.x + u.x, v.y + u.y, v.z + u.z, v.w + u.w);
-}
-
-ivec4 __operator - (const ivec4 v, const ivec4 u) {
- return ivec4 (v.x - u.x, v.y - u.y, v.z - u.z, v.w - u.w);
-}
-
-ivec4 __operator * (const ivec4 v, const ivec4 u) {
- return ivec4 (v.x * u.x, v.y * u.y, v.z * u.z, v.w * u.w);
-}
-
-ivec4 __operator / (const ivec4 v, const ivec4 u) {
- return ivec4 (v.x / u.x, v.y / u.y, v.z / u.z, v.w / u.w);
-}
-
-mat2 __operator + (const mat2 m, const mat2 n) {
- return mat2 (m[0] + n[0], m[1] + n[1]);
-}
-
-mat2 __operator - (const mat2 m, const mat2 n) {
- return mat2 (m[0] - n[0], m[1] - n[1]);
-}
-
-mat2 __operator / (const mat2 m, const mat2 n) {
- return mat2 (m[0] / n[0], m[1] / n[1]);
-}
-
-mat3 __operator + (const mat3 m, const mat3 n) {
- return mat3 (m[0] + n[0], m[1] + n[1], m[2] + n[2]);
-}
-
-mat3 __operator - (const mat3 m, const mat3 n) {
- return mat3 (m[0] - n[0], m[1] - n[1], m[2] - n[2]);
-}
-
-mat3 __operator / (const mat3 m, const mat3 n) {
- return mat3 (m[0] / n[0], m[1] / n[1], m[2] / n[2]);
-}
-
-mat4 __operator + (const mat4 m, const mat4 n) {
- return mat4 (m[0] + n[0], m[1] + n[1], m[2] + n[2], m[3] + n[3]);
-}
-
-mat4 __operator - (const mat4 m, const mat4 n) {
- return mat4 (m[0] - n[0], m[1] - n[1], m[2] - n[2], m[3] - n[3]);
-}
-
-mat4 __operator / (const mat4 m, const mat4 n) {
- return mat4 (m[0] / n[0], m[1] / n[1], m[2] / n[2], m[3] / n[3]);
-}
-
-vec2 __operator + (const float a, const vec2 u) {
- return vec2 (a + u.x, a + u.y);
-}
-
-vec2 __operator + (const vec2 v, const float b) {
- return vec2 (v.x + b, v.y + b);
-}
-
-vec2 __operator - (const float a, const vec2 u) {
- return vec2 (a - u.x, a - u.y);
-}
-
-vec2 __operator - (const vec2 v, const float b) {
- return vec2 (v.x - b, v.y - b);
-}
-
-vec2 __operator * (const float a, const vec2 u) {
- return vec2 (a * u.x, a * u.y);
-}
-
-vec2 __operator * (const vec2 v, const float b) {
- return vec2 (v.x * b, v.y * b);
-}
-
-vec2 __operator / (const float a, const vec2 u) {
- return vec2 (a / u.x, a / u.y);
-}
-
-vec2 __operator / (const vec2 v, const float b) {
- return vec2 (v.x / b, v.y / b);
-}
-
-vec3 __operator + (const float a, const vec3 u) {
- return vec3 (a + u.x, a + u.y, a + u.z);
-}
-
-vec3 __operator + (const vec3 v, const float b) {
- return vec3 (v.x + b, v.y + b, v.z + b);
-}
-
-vec3 __operator - (const float a, const vec3 u) {
- return vec3 (a - u.x, a - u.y, a - u.z);
-}
-
-vec3 __operator - (const vec3 v, const float b) {
- return vec3 (v.x - b, v.y - b, v.z - b);
-}
-
-vec3 __operator * (const float a, const vec3 u) {
- return vec3 (a * u.x, a * u.y, a * u.z);
-}
-
-vec3 __operator * (const vec3 v, const float b) {
- return vec3 (v.x * b, v.y * b, v.z * b);
-}
-
-vec3 __operator / (const float a, const vec3 u) {
- return vec3 (a / u.x, a / u.y, a / u.z);
-}
-
-vec3 __operator / (const vec3 v, const float b) {
- return vec3 (v.x / b, v.y / b, v.z / b);
-}
-
-vec4 __operator + (const float a, const vec4 u) {
- return vec4 (a + u.x, a + u.y, a + u.z, a + u.w);
-}
-
-vec4 __operator + (const vec4 v, const float b) {
- return vec4 (v.x + b, v.y + b, v.z + b, v.w + b);
-}
-
-vec4 __operator - (const float a, const vec4 u) {
- return vec4 (a - u.x, a - u.y, a - u.z, a - u.w);
-}
-
-vec4 __operator - (const vec4 v, const float b) {
- return vec4 (v.x - b, v.y - b, v.z - b, v.w - b);
-}
-
-vec4 __operator * (const float a, const vec4 u) {
- return vec4 (a * u.x, a * u.y, a * u.z, a * u.w);
-}
-
-vec4 __operator * (const vec4 v, const float b) {
- return vec4 (v.x * b, v.y * b, v.z * b, v.w * b);
-}
-
-vec4 __operator / (const float a, const vec4 u) {
- return vec4 (a / u.x, a / u.y, a / u.z, a / u.w);
-}
-
-vec4 __operator / (const vec4 v, const float b) {
- return vec4 (v.x / b, v.y / b, v.z / b, v.w / b);
-}
-
-mat2 __operator + (const float a, const mat2 n) {
- return mat2 (a + n[0], a + n[1]);
-}
-
-mat2 __operator + (const mat2 m, const float b) {
- return mat2 (m[0] + b, m[1] + b);
-}
-
-mat2 __operator - (const float a, const mat2 n) {
- return mat2 (a - n[0], a - n[1]);
-}
-
-mat2 __operator - (const mat2 m, const float b) {
- return mat2 (m[0] - b, m[1] - b);
-}
-
-mat2 __operator * (const float a, const mat2 n) {
- return mat2 (a * n[0], a * n[1]);
-}
-
-mat2 __operator * (const mat2 m, const float b) {
- return mat2 (m[0] * b, m[1] * b);
-}
-
-mat2 __operator / (const float a, const mat2 n) {
- return mat2 (a / n[0], a / n[1]);
-}
-
-mat2 __operator / (const mat2 m, const float b) {
- return mat2 (m[0] / b, m[1] / b);
-}
-
-mat3 __operator + (const float a, const mat3 n) {
- return mat3 (a + n[0], a + n[1], a + n[2]);
-}
-
-mat3 __operator + (const mat3 m, const float b) {
- return mat3 (m[0] + b, m[1] + b, m[2] + b);
-}
-
-mat3 __operator - (const float a, const mat3 n) {
- return mat3 (a - n[0], a - n[1], a - n[2]);
-}
-
-mat3 __operator - (const mat3 m, const float b) {
- return mat3 (m[0] - b, m[1] - b, m[2] - b);
-}
-
-mat3 __operator * (const float a, const mat3 n) {
- return mat3 (a * n[0], a * n[1], a * n[2]);
-}
-
-mat3 __operator * (const mat3 m, const float b) {
- return mat3 (m[0] * b, m[1] * b, m[2] * b);
-}
-
-mat3 __operator / (const float a, const mat3 n) {
- return mat3 (a / n[0], a / n[1], a / n[2]);
-}
-
-mat3 __operator / (const mat3 m, const float b) {
- return mat3 (m[0] / b, m[1] / b, m[2] / b);
-}
-
-mat4 __operator + (const float a, const mat4 n) {
- return mat4 (a + n[0], a + n[1], a + n[2], a + n[3]);
-}
-
-mat4 __operator + (const mat4 m, const float b) {
- return mat4 (m[0] + b, m[1] + b, m[2] + b, m[3] + b);
-}
-
-mat4 __operator - (const float a, const mat4 n) {
- return mat4 (a - n[0], a - n[1], a - n[2], a - n[3]);
-}
-
-mat4 __operator - (const mat4 m, const float b) {
- return mat4 (m[0] - b, m[1] - b, m[2] - b, m[3] - b);
-}
-
-mat4 __operator * (const float a, const mat4 n) {
- return mat4 (a * n[0], a * n[1], a * n[2], a * n[3]);
-}
-
-mat4 __operator * (const mat4 m, const float b) {
- return mat4 (m[0] * b, m[1] * b, m[2] * b, m[3] * b);
-}
-
-mat4 __operator / (const float a, const mat4 n) {
- return mat4 (a / n[0], a / n[1], a / n[2], a / n[3]);
-}
-
-mat4 __operator / (const mat4 m, const float b) {
- return mat4 (m[0] / b, m[1] / b, m[2] / b, m[3] / b);
-}
-
-ivec2 __operator + (const int a, const ivec2 u) {
- return ivec2 (a) + u;
-}
-
-ivec2 __operator + (const ivec2 v, const int b) {
- return v + ivec2 (b);
-}
-
-ivec2 __operator - (const int a, const ivec2 u) {
- return ivec2 (a) - u;
-}
-
-ivec2 __operator - (const ivec2 v, const int b) {
- return v - ivec2 (b);
-}
-
-ivec2 __operator * (const int a, const ivec2 u) {
- return ivec2 (a) * u;
-}
-
-ivec2 __operator * (const ivec2 v, const int b) {
- return v * ivec2 (b);
-}
-
-ivec2 __operator / (const int a, const ivec2 u) {
- return ivec2 (a) / u;
-}
-
-ivec2 __operator / (const ivec2 v, const int b) {
- return v / ivec2 (b);
-}
-
-ivec3 __operator + (const int a, const ivec3 u) {
- return ivec3 (a) + u;
-}
-
-ivec3 __operator + (const ivec3 v, const int b) {
- return v + ivec3 (b);
-}
-
-ivec3 __operator - (const int a, const ivec3 u) {
- return ivec3 (a) - u;
-}
-
-ivec3 __operator - (const ivec3 v, const int b) {
- return v - ivec3 (b);
-}
-
-ivec3 __operator * (const int a, const ivec3 u) {
- return ivec3 (a) * u;
-}
-
-ivec3 __operator * (const ivec3 v, const int b) {
- return v * ivec3 (b);
-}
-
-ivec3 __operator / (const int a, const ivec3 u) {
- return ivec3 (a) / u;
-}
-
-ivec3 __operator / (const ivec3 v, const int b) {
- return v / ivec3 (b);
-}
-
-ivec4 __operator + (const int a, const ivec4 u) {
- return ivec4 (a) + u;
-}
-
-ivec4 __operator + (const ivec4 v, const int b) {
- return v + ivec4 (b);
-}
-
-ivec4 __operator - (const int a, const ivec4 u) {
- return ivec4 (a) - u;
-}
-
-ivec4 __operator - (const ivec4 v, const int b) {
- return v - ivec4 (b);
-}
-
-ivec4 __operator * (const int a, const ivec4 u) {
- return ivec4 (a) * u;
-}
-
-ivec4 __operator * (const ivec4 v, const int b) {
- return v * ivec4 (b);
-}
-
-ivec4 __operator / (const int a, const ivec4 u) {
- return ivec4 (a) / u;
-}
-
-ivec4 __operator / (const ivec4 v, const int b) {
- return v / ivec4 (b);
-}
-
-vec2 __operator - (const vec2 v) {
- return vec2 (-v.x, -v.y);
-}
-
-vec3 __operator - (const vec3 v) {
- return vec3 (-v.x, -v.y, -v.z);
-}
-
-vec4 __operator - (const vec4 v) {
- return vec4 (-v.x, -v.y, -v.z, -v.w);
-}
-
-ivec2 __operator - (const ivec2 v) {
- return ivec2 (-v.x, -v.y);
-}
-
-ivec3 __operator - (const ivec3 v) {
- return ivec3 (-v.x, -v.y, -v.z);
-}
-
-ivec4 __operator - (const ivec4 v) {
- return ivec4 (-v.x, -v.y, -v.z, -v.w);
-}
-
-mat2 __operator - (const mat2 m) {
- return mat2 (-m[0], -m[1]);
-}
-
-mat3 __operator - (const mat3 m) {
- return mat3 (-m[0], -m[1], -m[2]);
-}
-
-mat4 __operator - (const mat4 m) {
- return mat4 (-m[0], -m[1], -m[2], -m[3]);
-}
-
-void __operator -- (inout float a) {
- a -= 1.0;
-}
-
-void __operator -- (inout int a) {
- a -= 1;
-}
-
-void __operator -- (inout vec2 v) {
- --v.x;
- --v.y;
-}
-
-void __operator -- (inout vec3 v) {
- --v.x;
- --v.y;
- --v.z;
-}
-
-void __operator -- (inout vec4 v) {
- --v.x;
- --v.y;
- --v.z;
- --v.w;
-}
-
-void __operator -- (inout ivec2 v) {
- --v.x;
- --v.y;
-}
-
-void __operator -- (inout ivec3 v) {
- --v.x;
- --v.y;
- --v.z;
-}
-
-void __operator -- (inout ivec4 v) {
- --v.x;
- --v.y;
- --v.z;
- --v.w;
-}
-
-void __operator -- (inout mat2 m) {
- --m[0];
- --m[1];
-}
-
-void __operator -- (inout mat3 m) {
- --m[0];
- --m[1];
- --m[2];
-}
-
-void __operator -- (inout mat4 m) {
- --m[0];
- --m[1];
- --m[2];
- --m[3];
-}
-
-void __operator ++ (inout float a) {
- a += 1.0;
-}
-
-void __operator ++ (inout int a) {
- a += 1;
-}
-
-void __operator ++ (inout vec2 v) {
- ++v.x;
- ++v.y;
-}
-
-void __operator ++ (inout vec3 v) {
- ++v.x;
- ++v.y;
- ++v.z;
-}
-
-void __operator ++ (inout vec4 v) {
- ++v.x;
- ++v.y;
- ++v.z;
- ++v.w;
-}
-
-void __operator ++ (inout ivec2 v) {
- ++v.x;
- ++v.y;
-}
-
-void __operator ++ (inout ivec3 v) {
- ++v.x;
- ++v.y;
- ++v.z;
-}
-
-void __operator ++ (inout ivec4 v) {
- ++v.x;
- ++v.y;
- ++v.z;
- ++v.w;
-}
-
-void __operator ++ (inout mat2 m) {
- ++m[0];
- ++m[1];
-}
-
-void __operator ++ (inout mat3 m) {
- ++m[0];
- ++m[1];
- ++m[2];
-}
-
-void __operator ++ (inout mat4 m) {
- ++m[0];
- ++m[1];
- ++m[2];
- ++m[3];
-}
-
-//
-// NOTE: postfix increment and decrement operators take additional dummy int parameter to
-// distinguish their prototypes from prefix ones.
-//
-
-float __operator -- (inout float a, const int) {
- float b = a;
- --a;
- return b;
-}
-
-int __operator -- (inout int a, const int) {
- int b = a;
- --a;
- return b;
-}
-
-vec2 __operator -- (inout vec2 v, const int) {
- return vec2 (v.x--, v.y--);
-}
-
-vec3 __operator -- (inout vec3 v, const int) {
- return vec3 (v.x--, v.y--, v.z--);
-}
-
-vec4 __operator -- (inout vec4 v, const int) {
- return vec4 (v.x--, v.y--, v.z--, v.w--);
-}
-
-ivec2 __operator -- (inout ivec2 v, const int) {
- return ivec2 (v.x--, v.y--);
-}
-
-ivec3 __operator -- (inout ivec3 v, const int) {
- return ivec3 (v.x--, v.y--, v.z--);
-}
-
-ivec4 __operator -- (inout ivec4 v, const int) {
- return ivec4 (v.x--, v.y--, v.z--, v.w--);
-}
-
-mat2 __operator -- (inout mat2 m, const int) {
- return mat2 (m[0]--, m[1]--);
-}
-
-mat3 __operator -- (inout mat3 m, const int) {
- return mat3 (m[0]--, m[1]--, m[2]--);
-}
-
-mat4 __operator -- (inout mat4 m, const int) {
- return mat4 (m[0]--, m[1]--, m[2]--, m[3]--);
-}
-
-float __operator ++ (inout float a, const int) {
- float b = a;
- ++a;
- return b;
-}
-
-int __operator ++ (inout int a, const int) {
- int b = a;
- ++a;
- return b;
-}
-
-vec2 __operator ++ (inout vec2 v, const int) {
- return vec2 (v.x++, v.y++);
-}
-
-vec3 __operator ++ (inout vec3 v, const int) {
- return vec3 (v.x++, v.y++, v.z++);
-}
-
-vec4 __operator ++ (inout vec4 v, const int) {
- return vec4 (v.x++, v.y++, v.z++, v.w++);
-}
-
-ivec2 __operator ++ (inout ivec2 v, const int) {
- return ivec2 (v.x++, v.y++);
-}
-
-ivec3 __operator ++ (inout ivec3 v, const int) {
- return ivec3 (v.x++, v.y++, v.z++);
-}
-
-ivec4 __operator ++ (inout ivec4 v, const int) {
- return ivec4 (v.x++, v.y++, v.z++, v.w++);
-}
-
-mat2 __operator ++ (inout mat2 m, const int) {
- return mat2 (m[0]++, m[1]++);
-}
-
-mat3 __operator ++ (inout mat3 m, const int) {
- return mat3 (m[0]++, m[1]++, m[2]++);
-}
-
-mat4 __operator ++ (inout mat4 m, const int) {
- return mat4 (m[0]++, m[1]++, m[2]++, m[3]++);
-}
-
-bool __operator < (const float a, const float b) {
- bool c;
- __asm float_less c, a, b;
- return c;
-}
-
-bool __operator < (const int a, const int b) {
- return float (a) < float (b);
-}
-
-bool __operator > (const float a, const float b) {
- bool c;
- __asm float_less c, b, a;
- return c;
-}
-
-bool __operator > (const int a, const int b) {
- return float (a) > float (b);
-}
-
-bool __operator >= (const float a, const float b) {
- bool g, e;
- __asm float_less g, b, a;
- __asm float_equal e, a, b;
- return g || e;
-}
-
-bool __operator >= (const int a, const int b) {
- return float (a) >= float (b);
-}
-
-bool __operator <= (const float a, const float b) {
- bool g, e;
- __asm float_less g, a, b;
- __asm float_equal e, a, b;
- return g || e;
-}
-
-bool __operator <= (const int a, const int b) {
- return float (a) <= float (b);
-}
-
-bool __operator ^^ (const bool a, const bool b) {
- return a != b;
-}
-
-//
-// These operators are handled internally by the compiler:
-//
-// bool __operator && (bool a, bool b) {
-// return a ? b : false;
-// }
-// bool __operator || (bool a, bool b) {
-// return a ? true : b;
-// }
-//
-
-bool __operator ! (const bool a) {
- return a == false;
-}
-
-//
-// mesa-specific extension functions.
-//
-
-void print (const float f) {
- __asm float_print f;
-}
-
-void print (const int i) {
- __asm int_print i;
-}
-
-void print (const bool b) {
- __asm bool_print b;
-}
-
-void print (const vec2 v) {
- print (v.x);
- print (v.y);
-}
-
-void print (const vec3 v) {
- print (v.x);
- print (v.y);
- print (v.z);
-}
-
-void print (const vec4 v) {
- print (v.x);
- print (v.y);
- print (v.z);
- print (v.w);
-}
-
-void print (const ivec2 v) {
- print (v.x);
- print (v.y);
-}
-
-void print (const ivec3 v) {
- print (v.x);
- print (v.y);
- print (v.z);
-}
-
-void print (const ivec4 v) {
- print (v.x);
- print (v.y);
- print (v.z);
- print (v.w);
-}
-
-void print (const bvec2 v) {
- print (v.x);
- print (v.y);
-}
-
-void print (const bvec3 v) {
- print (v.x);
- print (v.y);
- print (v.z);
-}
-
-void print (const bvec4 v) {
- print (v.x);
- print (v.y);
- print (v.z);
- print (v.w);
-}
-
-void print (const mat2 m) {
- print (m[0]);
- print (m[1]);
-}
-
-void print (const mat3 m) {
- print (m[0]);
- print (m[1]);
- print (m[2]);
-}
-
-void print (const mat4 m) {
- print (m[0]);
- print (m[1]);
- print (m[2]);
- print (m[3]);
-}
-
-void print (const sampler1D e) {
- __asm int_print e;
-}
-
-void print (const sampler2D e) {
- __asm int_print e;
-}
-
-void print (const sampler3D e) {
- __asm int_print e;
-}
-
-void print (const samplerCube e) {
- __asm int_print e;
-}
-
-void print (const sampler1DShadow e) {
- __asm int_print e;
-}
-
-void print (const sampler2DShadow e) {
- __asm int_print e;
-}
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+//
+// This file defines nearly all constructors and operators for built-in data types, using
+// extended language syntax. In general, compiler treats constructors and operators as
+// ordinary functions with some exceptions. For example, the language does not allow
+// functions to be called in constant expressions - here the exception is made to allow it.
+//
+// Each implementation provides its own version of this file. Each implementation can define
+// the required set of operators and constructors in its own fashion.
+//
+// The extended language syntax is only present when compiling this file. It is implicitly
+// included at the very beginning of the compiled shader, so no built-in functions can be
+// used.
+//
+// To communicate with the implementation, a special extended "__asm" keyword is used, followed
+// by an instruction name (any valid identifier), a destination variable identifier and a
+// a list of zero or more source variable identifiers. A variable identifier is a variable name
+// declared earlier in the code (as a function parameter, local or global variable).
+// An instruction name designates an instruction that must be exported by the implementation.
+// Each instruction receives data from source variable identifiers and returns data in the
+// destination variable identifier.
+//
+// It is up to the implementation how to define a particular operator or constructor. If it is
+// expected to being used rarely, it can be defined in terms of other operators and constructors,
+// for example:
+//
+// ivec2 __operator + (const ivec2 x, const ivec2 y) {
+// return ivec2 (x[0] + y[0], x[1] + y[1]);
+// }
+//
+// If a particular operator or constructor is expected to be used very often or is an atomic
+// operation (that is, an operation that cannot be expressed in terms of other operations or
+// would create a dependency cycle) it must be defined using one or more __asm constructs.
+//
+// Each implementation must define constructors for all scalar types (bool, float, int).
+// There are 9 scalar-to-scalar constructors (including identity constructors). However,
+// since the language introduces special constructors (like matrix constructor with a single
+// scalar value), implementations must also implement these cases.
+// The compiler provides the following algorithm when resolving a constructor:
+// - try to find a constructor with a prototype matching ours,
+// - if no constructor is found and this is a scalar-to-scalar constructor, raise an error,
+// - if a constructor is found, execute it and return,
+// - count the size of the constructor parameter list - if it is less than the size of
+// our constructor's type, raise an error,
+// - for each parameter in the list do a recursive constructor matching for appropriate
+// scalar fields in the constructed variable,
+//
+// Each implementation must also define a set of operators that deal with built-in data types.
+// There are four kinds of operators:
+// 1) Operators that are implemented only by the compiler: "()" (function call), "," (sequence)
+// and "?:" (selection).
+// 2) Operators that are implemented by the compiler by expressing it in terms of other operators:
+// - "." (field selection) - translated to subscript access,
+// - "&&" (logical and) - translated to "<left_expr> ? <right_expr> : false",
+// - "||" (logical or) - translated to "<left_expr> ? true : <right_expr>",
+// 3) Operators that can be defined by the implementation and if the required prototype is not
+// found, standard behaviour is used:
+// - "==", "!=", "=" (equality, assignment) - compare or assign matching fields one-by-one;
+// note that at least operators for scalar data types must be defined by the implementation
+// to get it work,
+// 4) All other operators not mentioned above. If no required prototype is found, an error is
+// raised. An implementation must follow the language specification to provide all valid
+// operator prototypes.
+//
+
+int __constructor (const float f) {
+ int i;
+ __asm float_to_int i, f;
+ return i;
+}
+
+bool __constructor (const int i) {
+ return i != 0;
+}
+
+bool __constructor (const float f) {
+ return f != 0.0;
+}
+
+int __constructor (const bool b) {
+ return b ? 1 : 0;
+}
+
+float __constructor (const bool b) {
+ return b ? 1.0 : 0.0;
+}
+
+float __constructor (const int i) {
+ float f;
+ __asm int_to_float f, i;
+ return f;
+}
+
+bool __constructor (const bool b) {
+ return b;
+}
+
+int __constructor (const int i) {
+ return i;
+}
+
+float __constructor (const float f) {
+ return f;
+}
+
+vec2 __constructor (const float f) {
+ return vec2 (f, f);
+}
+
+vec2 __constructor (const int i) {
+ float x;
+ __asm int_to_float x, i;
+ return vec2 (x);
+}
+
+vec2 __constructor (const bool b) {
+ return vec2 (b ? 1.0 : 0.0);
+}
+
+vec3 __constructor (const float f) {
+ return vec3 (f, f, f);
+}
+
+vec3 __constructor (const int i) {
+ float x;
+ __asm int_to_float x, i;
+ return vec3 (x);
+}
+
+vec3 __constructor (const bool b) {
+ return vec3 (b ? 1.0 : 0.0);
+}
+
+vec4 __constructor (const float f) {
+ return vec4 (f, f, f, f);
+}
+
+vec4 __constructor (const int i) {
+ float x;
+ __asm int_to_float x, i;
+ return vec4 (x);
+}
+
+vec4 __constructor (const bool b) {
+ return vec4 (b ? 1.0 : 0.0);
+}
+
+ivec2 __constructor (const int i) {
+ return ivec2 (i, i);
+}
+
+ivec2 __constructor (const float f) {
+ return ivec2 (int (f));
+}
+
+ivec2 __constructor (const bool b) {
+ return ivec2 (int (b));
+}
+
+ivec3 __constructor (const int i) {
+ return ivec3 (i, i, i);
+}
+
+ivec3 __constructor (const float f) {
+ return ivec3 (int (f));
+}
+
+ivec3 __constructor (const bool b) {
+ return ivec3 (int (b));
+}
+
+ivec4 __constructor (const int i) {
+ return ivec4 (i, i, i, i);
+}
+
+ivec4 __constructor (const float f) {
+ return ivec4 (int (f));
+}
+
+ivec4 __constructor (const bool b) {
+ return ivec4 (int (b));
+}
+
+bvec2 __constructor (const bool b) {
+ return bvec2 (b, b);
+}
+
+bvec2 __constructor (const float f) {
+ return bvec2 (bool (f));
+}
+
+bvec2 __constructor (const int i) {
+ return bvec2 (bool (i));
+}
+
+bvec3 __constructor (const bool b) {
+ return bvec3 (b, b, b);
+}
+
+bvec3 __constructor (const float f) {
+ return bvec3 (bool (f));
+}
+
+bvec3 __constructor (const int i) {
+ return bvec3 (bool (i));
+}
+
+bvec4 __constructor (const bool b) {
+ return bvec4 (b, b, b, b);
+}
+
+bvec4 __constructor (const float f) {
+ return bvec4 (bool (f));
+}
+
+bvec4 __constructor (const int i) {
+ return bvec4 (bool (i));
+}
+
+mat2 __constructor (const float f) {
+ return mat2 (f, 0.0, 0.0, f);
+}
+
+mat2 __constructor (const int i) {
+ float x;
+ __asm int_to_float x, i;
+ return mat2 (x);
+}
+
+mat2 __constructor (const bool b) {
+ return mat2 (b ? 1.0 : 0.0);
+}
+
+mat3 __constructor (const float f) {
+ return mat3 (f, 0.0, 0.0, 0.0, f, 0.0, 0.0, 0.0, f);
+}
+
+mat3 __constructor (const int i) {
+ float x;
+ __asm int_to_float x, i;
+ return mat3 (x);
+}
+
+mat3 __constructor (const bool b) {
+ return mat3 (b ? 1.0 : 0.0);
+}
+
+mat4 __constructor (const float f) {
+ return mat4 (f, 0.0, 0.0, 0.0, 0.0, f, 0.0, 0.0, 0.0, 0.0, f, 0.0, 0.0, 0.0, 0.0, f);
+}
+
+mat4 __constructor (const int i) {
+ float x;
+ __asm int_to_float x, i;
+ return mat4 (x);
+}
+
+mat4 __constructor (const bool b) {
+ return mat4 (b ? 1.0 : 0.0);
+}
+
+void __operator += (inout float a, const float b) {
+ __asm float_add a, a, b;
+}
+
+float __operator - (const float a) {
+ float b;
+ __asm float_negate b, a;
+ return b;
+}
+
+void __operator -= (inout float a, const float b) {
+ float c;
+ __asm float_negate c, b;
+ __asm float_add a, a, c;
+}
+
+void __operator *= (inout float a, const float b) {
+ __asm float_multiply a, a, b;
+}
+
+void __operator /= (inout float a, const float b) {
+ __asm float_divide a, a, b;
+}
+
+float __operator + (const float a, const float b) {
+ float c;
+ __asm float_add c, a, b;
+ return c;
+}
+
+void __operator += (inout int a, const int b) {
+ a = int (float (a) + float (b));
+}
+
+int __operator - (const int a) {
+ float x;
+ int b;
+ __asm int_to_float x, a;
+ __asm float_negate x, x;
+ __asm float_to_int b, x;
+ return b;
+}
+
+void __operator -= (inout int a, const int b) {
+ a += -b;
+}
+
+float __operator * (const float a, const float b) {
+ float c;
+ __asm float_multiply c, a, b;
+ return c;
+}
+
+void __operator *= (inout int a, const int b) {
+ a = int (float (a) * float (b));
+}
+
+float __operator / (const float a, const float b) {
+ float c;
+ __asm float_divide c, a, b;
+ return c;
+}
+
+void __operator /= (inout int a, const int b) {
+ a = int (float (a) / float (b));
+}
+
+void __operator += (inout vec2 v, const vec2 u) {
+ v.x += u.x;
+ v.y += u.y;
+}
+
+void __operator -= (inout vec2 v, const vec2 u) {
+ v.x -= u.x;
+ v.y -= u.y;
+}
+
+void __operator *= (inout vec2 v, const vec2 u) {
+ v.x *= u.x;
+ v.y *= u.y;
+}
+
+void __operator /= (inout vec2 v, const vec2 u) {
+ v.x /= u.x;
+ v.y /= u.y;
+}
+
+void __operator += (inout vec3 v, const vec3 u) {
+ v.x += u.x;
+ v.y += u.y;
+ v.z += u.z;
+}
+
+void __operator -= (inout vec3 v, const vec3 u) {
+ v.x -= u.x;
+ v.y -= u.y;
+ v.z -= u.z;
+}
+
+void __operator *= (inout vec3 v, const vec3 u) {
+ v.x *= u.x;
+ v.y *= u.y;
+ v.z *= u.z;
+}
+
+void __operator /= (inout vec3 v, const vec3 u) {
+ v.x /= u.x;
+ v.y /= u.y;
+ v.z /= u.z;
+}
+
+void __operator += (inout vec4 v, const vec4 u) {
+ v.x += u.x;
+ v.y += u.y;
+ v.z += u.z;
+ v.w += u.w;
+}
+
+void __operator -= (inout vec4 v, const vec4 u) {
+ v.x -= u.x;
+ v.y -= u.y;
+ v.z -= u.z;
+ v.w -= u.w;
+}
+
+void __operator *= (inout vec4 v, const vec4 u) {
+ v.x *= u.x;
+ v.y *= u.y;
+ v.z *= u.z;
+ v.w *= u.w;
+}
+
+void __operator /= (inout vec4 v, const vec4 u) {
+ v.x /= u.x;
+ v.y /= u.y;
+ v.z /= u.z;
+ v.w /= u.w;
+}
+
+void __operator += (inout ivec2 v, const ivec2 u) {
+ v.x += u.x;
+ v.y += u.y;
+}
+
+void __operator -= (inout ivec2 v, const ivec2 u) {
+ v.x -= u.x;
+ v.y -= u.y;
+}
+
+void __operator *= (inout ivec2 v, const ivec2 u) {
+ v.x *= u.x;
+ v.y *= u.y;
+}
+
+void __operator /= (inout ivec2 v, const ivec2 u) {
+ v.x /= u.x;
+ v.y /= u.y;
+}
+
+void __operator += (inout ivec3 v, const ivec3 u) {
+ v.x += u.x;
+ v.y += u.y;
+ v.z += u.z;
+}
+
+void __operator -= (inout ivec3 v, const ivec3 u) {
+ v.x -= u.x;
+ v.y -= u.y;
+ v.z -= u.z;
+}
+
+void __operator *= (inout ivec3 v, const ivec3 u) {
+ v.x *= u.x;
+ v.y *= u.y;
+ v.z *= u.z;
+}
+
+void __operator /= (inout ivec3 v, const ivec3 u) {
+ v.x /= u.x;
+ v.y /= u.y;
+ v.z /= u.z;
+}
+
+void __operator += (inout ivec4 v, const ivec4 u) {
+ v.x += u.x;
+ v.y += u.y;
+ v.z += u.z;
+ v.w += u.w;
+}
+
+void __operator -= (inout ivec4 v, const ivec4 u) {
+ v.x -= u.x;
+ v.y -= u.y;
+ v.z -= u.z;
+ v.w -= u.w;
+}
+
+void __operator *= (inout ivec4 v, const ivec4 u) {
+ v.x *= u.x;
+ v.y *= u.y;
+ v.z *= u.z;
+ v.w *= u.w;
+}
+
+void __operator /= (inout ivec4 v, const ivec4 u) {
+ v.x /= u.x;
+ v.y /= u.y;
+ v.z /= u.z;
+ v.w /= u.w;
+}
+
+void __operator += (inout mat2 m, const mat2 n) {
+ m[0] += n[0];
+ m[1] += n[1];
+}
+
+void __operator -= (inout mat2 m, const mat2 n) {
+ m[0] -= n[0];
+ m[1] -= n[1];
+}
+
+vec2 __operator * (const mat2 m, const vec2 v) {
+ return vec2 (
+ v.x * m[0].x + v.y * m[1].x,
+ v.x * m[0].y + v.y * m[1].y
+ );
+}
+
+mat2 __operator * (const mat2 m, const mat2 n) {
+ return mat2 (m * n[0], m * n[1]);
+}
+
+void __operator *= (inout mat2 m, const mat2 n) {
+ m = m * n;
+}
+
+void __operator /= (inout mat2 m, const mat2 n) {
+ m[0] /= n[0];
+ m[1] /= n[1];
+}
+
+void __operator += (inout mat3 m, const mat3 n) {
+ m[0] += n[0];
+ m[1] += n[1];
+ m[2] += n[2];
+}
+
+void __operator -= (inout mat3 m, const mat3 n) {
+ m[0] -= n[0];
+ m[1] -= n[1];
+ m[2] -= n[2];
+}
+
+vec3 __operator * (const mat3 m, const vec3 v) {
+ return vec3 (
+ v.x * m[0].x + v.y * m[1].x + v.z * m[2].x,
+ v.x * m[0].y + v.y * m[1].y + v.z * m[2].y,
+ v.x * m[0].z + v.y * m[1].z + v.z * m[2].z
+ );
+}
+
+mat3 __operator * (const mat3 m, const mat3 n) {
+ return mat3 (m * n[0], m * n[1], m * n[2]);
+}
+
+void __operator *= (inout mat3 m, const mat3 n) {
+ m = m * n;
+}
+
+void __operator /= (inout mat3 m, const mat3 n) {
+ m[0] /= n[0];
+ m[1] /= n[1];
+ m[2] /= n[2];
+}
+
+void __operator += (inout mat4 m, const mat4 n) {
+ m[0] += n[0];
+ m[1] += n[1];
+ m[2] += n[2];
+ m[3] += n[3];
+}
+
+void __operator -= (inout mat4 m, const mat4 n) {
+ m[0] -= n[0];
+ m[1] -= n[1];
+ m[2] -= n[2];
+ m[3] -= n[3];
+}
+
+vec4 __operator * (const mat4 m, const vec4 v) {
+ return vec4 (
+ v.x * m[0].x + v.y * m[1].x + v.z * m[2].x + v.w * m[3].x,
+ v.x * m[0].y + v.y * m[1].y + v.z * m[2].y + v.w * m[3].y,
+ v.x * m[0].z + v.y * m[1].z + v.z * m[2].z + v.w * m[3].z,
+ v.x * m[0].w + v.y * m[1].w + v.z * m[2].w + v.w * m[3].w
+ );
+}
+
+mat4 __operator * (const mat4 m, const mat4 n) {
+ return mat4 (m * n[0], m * n[1], m * n[2], m * n[3]);
+}
+
+void __operator *= (inout mat4 m, const mat4 n) {
+ m = m * n;
+}
+
+void __operator /= (inout mat4 m, const mat4 n) {
+ m[0] /= n[0];
+ m[1] /= n[1];
+ m[2] /= n[2];
+ m[3] /= n[3];
+}
+
+void __operator += (inout vec2 v, const float a) {
+ v.x += a;
+ v.y += a;
+}
+
+void __operator -= (inout vec2 v, const float a) {
+ v.x -= a;
+ v.y -= a;
+}
+
+void __operator *= (inout vec2 v, const float a) {
+ v.x *= a;
+ v.y *= a;
+}
+
+void __operator /= (inout vec2 v, const float a) {
+ v.x /= a;
+ v.y /= a;
+}
+
+void __operator += (inout vec3 v, const float a) {
+ v.x += a;
+ v.y += a;
+ v.z += a;
+}
+
+void __operator -= (inout vec3 v, const float a) {
+ v.x -= a;
+ v.y -= a;
+ v.z -= a;
+}
+
+void __operator *= (inout vec3 v, const float a) {
+ v.x *= a;
+ v.y *= a;
+ v.z *= a;
+}
+
+void __operator /= (inout vec3 v, const float a) {
+ v.x /= a;
+ v.y /= a;
+ v.z /= a;
+}
+
+void __operator += (inout vec4 v, const float a) {
+ v.x += a;
+ v.y += a;
+ v.z += a;
+ v.w += a;
+}
+
+void __operator -= (inout vec4 v, const float a) {
+ v.x -= a;
+ v.y -= a;
+ v.z -= a;
+ v.w -= a;
+}
+
+void __operator *= (inout vec4 v, const float a) {
+ v.x *= a;
+ v.y *= a;
+ v.z *= a;
+ v.w *= a;
+}
+
+void __operator /= (inout vec4 v, const float a) {
+ v.x /= a;
+ v.y /= a;
+ v.z /= a;
+ v.w /= a;
+}
+
+void __operator += (inout mat2 m, const float a) {
+ m[0] += a;
+ m[1] += a;
+}
+
+void __operator -= (inout mat2 m, const float a) {
+ m[0] -= a;
+ m[1] -= a;
+}
+
+void __operator *= (inout mat2 m, const float a) {
+ m[0] *= a;
+ m[1] *= a;
+}
+
+void __operator /= (inout mat2 m, const float a) {
+ m[0] /= a;
+ m[1] /= a;
+}
+
+void __operator += (inout mat3 m, const float a) {
+ m[0] += a;
+ m[1] += a;
+ m[2] += a;
+}
+
+void __operator -= (inout mat3 m, const float a) {
+ m[0] -= a;
+ m[1] -= a;
+ m[2] -= a;
+}
+
+void __operator *= (inout mat3 m, const float a) {
+ m[0] *= a;
+ m[1] *= a;
+ m[2] *= a;
+}
+
+void __operator /= (inout mat3 m, const float a) {
+ m[0] /= a;
+ m[1] /= a;
+ m[2] /= a;
+}
+
+void __operator += (inout mat4 m, const float a) {
+ m[0] += a;
+ m[1] += a;
+ m[2] += a;
+ m[3] += a;
+}
+
+void __operator -= (inout mat4 m, const float a) {
+ m[0] -= a;
+ m[1] -= a;
+ m[2] -= a;
+ m[3] -= a;
+}
+
+void __operator *= (inout mat4 m, const float a) {
+ m[0] *= a;
+ m[1] *= a;
+ m[2] *= a;
+ m[3] *= a;
+}
+
+void __operator /= (inout mat4 m, const float a) {
+ m[0] /= a;
+ m[1] /= a;
+ m[2] /= a;
+ m[3] /= a;
+}
+
+vec2 __operator * (const vec2 v, const mat2 m) {
+ return vec2 (
+ v.x * m[0].x + v.y * m[0].y,
+ v.x * m[1].x + v.y * m[1].y
+ );
+}
+
+void __operator *= (inout vec2 v, const mat2 m) {
+ v = v * m;
+}
+
+vec3 __operator * (const vec3 v, const mat3 m) {
+ return vec3 (
+ v.x * m[0].x + v.y * m[0].y + v.z * m[0].z,
+ v.x * m[1].x + v.y * m[1].y + v.z * m[1].z,
+ v.x * m[2].x + v.y * m[2].y + v.z * m[2].z
+ );
+}
+
+void __operator *= (inout vec3 v, const mat3 m) {
+ v = v * m;
+}
+
+vec4 __operator * (const vec4 v, const mat4 m) {
+ return vec4 (
+ v.x * m[0].x + v.y * m[0].y + v.z * m[0].z + v.w * m[0].w,
+ v.x * m[1].x + v.y * m[1].y + v.z * m[1].z + v.w * m[1].w,
+ v.x * m[2].x + v.y * m[2].y + v.z * m[2].z + v.w * m[2].w,
+ v.x * m[3].x + v.y * m[3].y + v.z * m[3].z + v.w * m[3].w
+ );
+}
+
+void __operator *= (inout vec4 v, const mat4 m) {
+ v = v * m;
+}
+
+float __operator - (const float a, const float b) {
+ float c;
+ __asm float_negate c, b;
+ __asm float_add c, a, c;
+ return c;
+}
+
+int __operator + (const int a, const int b) {
+ float x, y;
+ int c;
+ __asm int_to_float x, a;
+ __asm int_to_float y, b;
+ __asm float_add x, x, y;
+ __asm float_to_int c, x;
+ return c;
+}
+
+int __operator - (const int a, const int b) {
+ float x, y;
+ int c;
+ __asm int_to_float x, a;
+ __asm int_to_float y, b;
+ __asm float_negate y, y;
+ __asm float_add x, x, y;
+ __asm float_to_int c, x;
+ return c;
+}
+
+int __operator * (const int a, const int b) {
+ float x, y;
+ int c;
+ __asm int_to_float x, a;
+ __asm int_to_float y, b;
+ __asm float_multiply x, x, y;
+ __asm float_to_int c, x;
+ return c;
+}
+
+int __operator / (const int a, const int b) {
+ float x, y;
+ int c;
+ __asm int_to_float x, a;
+ __asm int_to_float y, b;
+ __asm float_divide x, x, y;
+ __asm float_to_int c, x;
+ return c;
+}
+
+vec2 __operator + (const vec2 v, const vec2 u) {
+ return vec2 (v.x + u.x, v.y + u.y);
+}
+
+vec2 __operator - (const vec2 v, const vec2 u) {
+ return vec2 (v.x - u.x, v.y - u.y);
+}
+
+vec2 __operator * (const vec2 v, const vec2 u) {
+ return vec2 (v.x * u.x, v.y * u.y);
+}
+
+vec2 __operator / (const vec2 v, const vec2 u) {
+ return vec2 (v.x / u.x, v.y / u.y);
+}
+
+vec3 __operator + (const vec3 v, const vec3 u) {
+ return vec3 (v.x + u.x, v.y + u.y, v.z + u.z);
+}
+
+vec3 __operator - (const vec3 v, const vec3 u) {
+ return vec3 (v.x - u.x, v.y - u.y, v.z - u.z);
+}
+
+vec3 __operator * (const vec3 v, const vec3 u) {
+ return vec3 (v.x * u.x, v.y * u.y, v.z * u.z);
+}
+
+vec3 __operator / (const vec3 v, const vec3 u) {
+ return vec3 (v.x / u.x, v.y / u.y, v.z / u.z);
+}
+
+vec4 __operator + (const vec4 v, const vec4 u) {
+ return vec4 (v.x + u.x, v.y + u.y, v.z + u.z, v.w + u.w);
+}
+
+vec4 __operator - (const vec4 v, const vec4 u) {
+ return vec4 (v.x - u.x, v.y - u.y, v.z - u.z, v.w - u.w);
+}
+
+vec4 __operator * (const vec4 v, const vec4 u) {
+ return vec4 (v.x * u.x, v.y * u.y, v.z * u.z, v.w * u.w);
+}
+
+vec4 __operator / (const vec4 v, const vec4 u) {
+ return vec4 (v.x / u.x, v.y / u.y, v.z / u.z, v.w / u.w);
+}
+
+ivec2 __operator + (const ivec2 v, const ivec2 u) {
+ return ivec2 (v.x + u.x, v.y + u.y);
+}
+
+ivec2 __operator - (const ivec2 v, const ivec2 u) {
+ return ivec2 (v.x - u.x, v.y - u.y);
+}
+
+ivec2 __operator * (const ivec2 v, const ivec2 u) {
+ return ivec2 (v.x * u.x, v.y * u.y);
+}
+
+ivec2 __operator / (const ivec2 v, const ivec2 u) {
+ return ivec2 (v.x / u.x, v.y / u.y);
+}
+
+ivec3 __operator + (const ivec3 v, const ivec3 u) {
+ return ivec3 (v.x + u.x, v.y + u.y, v.z + u.z);
+}
+
+ivec3 __operator - (const ivec3 v, const ivec3 u) {
+ return ivec3 (v.x - u.x, v.y - u.y, v.z - u.z);
+}
+
+ivec3 __operator * (const ivec3 v, const ivec3 u) {
+ return ivec3 (v.x * u.x, v.y * u.y, v.z * u.z);
+}
+
+ivec3 __operator / (const ivec3 v, const ivec3 u) {
+ return ivec3 (v.x / u.x, v.y / u.y, v.z / u.z);
+}
+
+ivec4 __operator + (const ivec4 v, const ivec4 u) {
+ return ivec4 (v.x + u.x, v.y + u.y, v.z + u.z, v.w + u.w);
+}
+
+ivec4 __operator - (const ivec4 v, const ivec4 u) {
+ return ivec4 (v.x - u.x, v.y - u.y, v.z - u.z, v.w - u.w);
+}
+
+ivec4 __operator * (const ivec4 v, const ivec4 u) {
+ return ivec4 (v.x * u.x, v.y * u.y, v.z * u.z, v.w * u.w);
+}
+
+ivec4 __operator / (const ivec4 v, const ivec4 u) {
+ return ivec4 (v.x / u.x, v.y / u.y, v.z / u.z, v.w / u.w);
+}
+
+mat2 __operator + (const mat2 m, const mat2 n) {
+ return mat2 (m[0] + n[0], m[1] + n[1]);
+}
+
+mat2 __operator - (const mat2 m, const mat2 n) {
+ return mat2 (m[0] - n[0], m[1] - n[1]);
+}
+
+mat2 __operator / (const mat2 m, const mat2 n) {
+ return mat2 (m[0] / n[0], m[1] / n[1]);
+}
+
+mat3 __operator + (const mat3 m, const mat3 n) {
+ return mat3 (m[0] + n[0], m[1] + n[1], m[2] + n[2]);
+}
+
+mat3 __operator - (const mat3 m, const mat3 n) {
+ return mat3 (m[0] - n[0], m[1] - n[1], m[2] - n[2]);
+}
+
+mat3 __operator / (const mat3 m, const mat3 n) {
+ return mat3 (m[0] / n[0], m[1] / n[1], m[2] / n[2]);
+}
+
+mat4 __operator + (const mat4 m, const mat4 n) {
+ return mat4 (m[0] + n[0], m[1] + n[1], m[2] + n[2], m[3] + n[3]);
+}
+
+mat4 __operator - (const mat4 m, const mat4 n) {
+ return mat4 (m[0] - n[0], m[1] - n[1], m[2] - n[2], m[3] - n[3]);
+}
+
+mat4 __operator / (const mat4 m, const mat4 n) {
+ return mat4 (m[0] / n[0], m[1] / n[1], m[2] / n[2], m[3] / n[3]);
+}
+
+vec2 __operator + (const float a, const vec2 u) {
+ return vec2 (a + u.x, a + u.y);
+}
+
+vec2 __operator + (const vec2 v, const float b) {
+ return vec2 (v.x + b, v.y + b);
+}
+
+vec2 __operator - (const float a, const vec2 u) {
+ return vec2 (a - u.x, a - u.y);
+}
+
+vec2 __operator - (const vec2 v, const float b) {
+ return vec2 (v.x - b, v.y - b);
+}
+
+vec2 __operator * (const float a, const vec2 u) {
+ return vec2 (a * u.x, a * u.y);
+}
+
+vec2 __operator * (const vec2 v, const float b) {
+ return vec2 (v.x * b, v.y * b);
+}
+
+vec2 __operator / (const float a, const vec2 u) {
+ return vec2 (a / u.x, a / u.y);
+}
+
+vec2 __operator / (const vec2 v, const float b) {
+ return vec2 (v.x / b, v.y / b);
+}
+
+vec3 __operator + (const float a, const vec3 u) {
+ return vec3 (a + u.x, a + u.y, a + u.z);
+}
+
+vec3 __operator + (const vec3 v, const float b) {
+ return vec3 (v.x + b, v.y + b, v.z + b);
+}
+
+vec3 __operator - (const float a, const vec3 u) {
+ return vec3 (a - u.x, a - u.y, a - u.z);
+}
+
+vec3 __operator - (const vec3 v, const float b) {
+ return vec3 (v.x - b, v.y - b, v.z - b);
+}
+
+vec3 __operator * (const float a, const vec3 u) {
+ return vec3 (a * u.x, a * u.y, a * u.z);
+}
+
+vec3 __operator * (const vec3 v, const float b) {
+ return vec3 (v.x * b, v.y * b, v.z * b);
+}
+
+vec3 __operator / (const float a, const vec3 u) {
+ return vec3 (a / u.x, a / u.y, a / u.z);
+}
+
+vec3 __operator / (const vec3 v, const float b) {
+ return vec3 (v.x / b, v.y / b, v.z / b);
+}
+
+vec4 __operator + (const float a, const vec4 u) {
+ return vec4 (a + u.x, a + u.y, a + u.z, a + u.w);
+}
+
+vec4 __operator + (const vec4 v, const float b) {
+ return vec4 (v.x + b, v.y + b, v.z + b, v.w + b);
+}
+
+vec4 __operator - (const float a, const vec4 u) {
+ return vec4 (a - u.x, a - u.y, a - u.z, a - u.w);
+}
+
+vec4 __operator - (const vec4 v, const float b) {
+ return vec4 (v.x - b, v.y - b, v.z - b, v.w - b);
+}
+
+vec4 __operator * (const float a, const vec4 u) {
+ return vec4 (a * u.x, a * u.y, a * u.z, a * u.w);
+}
+
+vec4 __operator * (const vec4 v, const float b) {
+ return vec4 (v.x * b, v.y * b, v.z * b, v.w * b);
+}
+
+vec4 __operator / (const float a, const vec4 u) {
+ return vec4 (a / u.x, a / u.y, a / u.z, a / u.w);
+}
+
+vec4 __operator / (const vec4 v, const float b) {
+ return vec4 (v.x / b, v.y / b, v.z / b, v.w / b);
+}
+
+mat2 __operator + (const float a, const mat2 n) {
+ return mat2 (a + n[0], a + n[1]);
+}
+
+mat2 __operator + (const mat2 m, const float b) {
+ return mat2 (m[0] + b, m[1] + b);
+}
+
+mat2 __operator - (const float a, const mat2 n) {
+ return mat2 (a - n[0], a - n[1]);
+}
+
+mat2 __operator - (const mat2 m, const float b) {
+ return mat2 (m[0] - b, m[1] - b);
+}
+
+mat2 __operator * (const float a, const mat2 n) {
+ return mat2 (a * n[0], a * n[1]);
+}
+
+mat2 __operator * (const mat2 m, const float b) {
+ return mat2 (m[0] * b, m[1] * b);
+}
+
+mat2 __operator / (const float a, const mat2 n) {
+ return mat2 (a / n[0], a / n[1]);
+}
+
+mat2 __operator / (const mat2 m, const float b) {
+ return mat2 (m[0] / b, m[1] / b);
+}
+
+mat3 __operator + (const float a, const mat3 n) {
+ return mat3 (a + n[0], a + n[1], a + n[2]);
+}
+
+mat3 __operator + (const mat3 m, const float b) {
+ return mat3 (m[0] + b, m[1] + b, m[2] + b);
+}
+
+mat3 __operator - (const float a, const mat3 n) {
+ return mat3 (a - n[0], a - n[1], a - n[2]);
+}
+
+mat3 __operator - (const mat3 m, const float b) {
+ return mat3 (m[0] - b, m[1] - b, m[2] - b);
+}
+
+mat3 __operator * (const float a, const mat3 n) {
+ return mat3 (a * n[0], a * n[1], a * n[2]);
+}
+
+mat3 __operator * (const mat3 m, const float b) {
+ return mat3 (m[0] * b, m[1] * b, m[2] * b);
+}
+
+mat3 __operator / (const float a, const mat3 n) {
+ return mat3 (a / n[0], a / n[1], a / n[2]);
+}
+
+mat3 __operator / (const mat3 m, const float b) {
+ return mat3 (m[0] / b, m[1] / b, m[2] / b);
+}
+
+mat4 __operator + (const float a, const mat4 n) {
+ return mat4 (a + n[0], a + n[1], a + n[2], a + n[3]);
+}
+
+mat4 __operator + (const mat4 m, const float b) {
+ return mat4 (m[0] + b, m[1] + b, m[2] + b, m[3] + b);
+}
+
+mat4 __operator - (const float a, const mat4 n) {
+ return mat4 (a - n[0], a - n[1], a - n[2], a - n[3]);
+}
+
+mat4 __operator - (const mat4 m, const float b) {
+ return mat4 (m[0] - b, m[1] - b, m[2] - b, m[3] - b);
+}
+
+mat4 __operator * (const float a, const mat4 n) {
+ return mat4 (a * n[0], a * n[1], a * n[2], a * n[3]);
+}
+
+mat4 __operator * (const mat4 m, const float b) {
+ return mat4 (m[0] * b, m[1] * b, m[2] * b, m[3] * b);
+}
+
+mat4 __operator / (const float a, const mat4 n) {
+ return mat4 (a / n[0], a / n[1], a / n[2], a / n[3]);
+}
+
+mat4 __operator / (const mat4 m, const float b) {
+ return mat4 (m[0] / b, m[1] / b, m[2] / b, m[3] / b);
+}
+
+ivec2 __operator + (const int a, const ivec2 u) {
+ return ivec2 (a) + u;
+}
+
+ivec2 __operator + (const ivec2 v, const int b) {
+ return v + ivec2 (b);
+}
+
+ivec2 __operator - (const int a, const ivec2 u) {
+ return ivec2 (a) - u;
+}
+
+ivec2 __operator - (const ivec2 v, const int b) {
+ return v - ivec2 (b);
+}
+
+ivec2 __operator * (const int a, const ivec2 u) {
+ return ivec2 (a) * u;
+}
+
+ivec2 __operator * (const ivec2 v, const int b) {
+ return v * ivec2 (b);
+}
+
+ivec2 __operator / (const int a, const ivec2 u) {
+ return ivec2 (a) / u;
+}
+
+ivec2 __operator / (const ivec2 v, const int b) {
+ return v / ivec2 (b);
+}
+
+ivec3 __operator + (const int a, const ivec3 u) {
+ return ivec3 (a) + u;
+}
+
+ivec3 __operator + (const ivec3 v, const int b) {
+ return v + ivec3 (b);
+}
+
+ivec3 __operator - (const int a, const ivec3 u) {
+ return ivec3 (a) - u;
+}
+
+ivec3 __operator - (const ivec3 v, const int b) {
+ return v - ivec3 (b);
+}
+
+ivec3 __operator * (const int a, const ivec3 u) {
+ return ivec3 (a) * u;
+}
+
+ivec3 __operator * (const ivec3 v, const int b) {
+ return v * ivec3 (b);
+}
+
+ivec3 __operator / (const int a, const ivec3 u) {
+ return ivec3 (a) / u;
+}
+
+ivec3 __operator / (const ivec3 v, const int b) {
+ return v / ivec3 (b);
+}
+
+ivec4 __operator + (const int a, const ivec4 u) {
+ return ivec4 (a) + u;
+}
+
+ivec4 __operator + (const ivec4 v, const int b) {
+ return v + ivec4 (b);
+}
+
+ivec4 __operator - (const int a, const ivec4 u) {
+ return ivec4 (a) - u;
+}
+
+ivec4 __operator - (const ivec4 v, const int b) {
+ return v - ivec4 (b);
+}
+
+ivec4 __operator * (const int a, const ivec4 u) {
+ return ivec4 (a) * u;
+}
+
+ivec4 __operator * (const ivec4 v, const int b) {
+ return v * ivec4 (b);
+}
+
+ivec4 __operator / (const int a, const ivec4 u) {
+ return ivec4 (a) / u;
+}
+
+ivec4 __operator / (const ivec4 v, const int b) {
+ return v / ivec4 (b);
+}
+
+vec2 __operator - (const vec2 v) {
+ return vec2 (-v.x, -v.y);
+}
+
+vec3 __operator - (const vec3 v) {
+ return vec3 (-v.x, -v.y, -v.z);
+}
+
+vec4 __operator - (const vec4 v) {
+ return vec4 (-v.x, -v.y, -v.z, -v.w);
+}
+
+ivec2 __operator - (const ivec2 v) {
+ return ivec2 (-v.x, -v.y);
+}
+
+ivec3 __operator - (const ivec3 v) {
+ return ivec3 (-v.x, -v.y, -v.z);
+}
+
+ivec4 __operator - (const ivec4 v) {
+ return ivec4 (-v.x, -v.y, -v.z, -v.w);
+}
+
+mat2 __operator - (const mat2 m) {
+ return mat2 (-m[0], -m[1]);
+}
+
+mat3 __operator - (const mat3 m) {
+ return mat3 (-m[0], -m[1], -m[2]);
+}
+
+mat4 __operator - (const mat4 m) {
+ return mat4 (-m[0], -m[1], -m[2], -m[3]);
+}
+
+void __operator -- (inout float a) {
+ a -= 1.0;
+}
+
+void __operator -- (inout int a) {
+ a -= 1;
+}
+
+void __operator -- (inout vec2 v) {
+ --v.x;
+ --v.y;
+}
+
+void __operator -- (inout vec3 v) {
+ --v.x;
+ --v.y;
+ --v.z;
+}
+
+void __operator -- (inout vec4 v) {
+ --v.x;
+ --v.y;
+ --v.z;
+ --v.w;
+}
+
+void __operator -- (inout ivec2 v) {
+ --v.x;
+ --v.y;
+}
+
+void __operator -- (inout ivec3 v) {
+ --v.x;
+ --v.y;
+ --v.z;
+}
+
+void __operator -- (inout ivec4 v) {
+ --v.x;
+ --v.y;
+ --v.z;
+ --v.w;
+}
+
+void __operator -- (inout mat2 m) {
+ --m[0];
+ --m[1];
+}
+
+void __operator -- (inout mat3 m) {
+ --m[0];
+ --m[1];
+ --m[2];
+}
+
+void __operator -- (inout mat4 m) {
+ --m[0];
+ --m[1];
+ --m[2];
+ --m[3];
+}
+
+void __operator ++ (inout float a) {
+ a += 1.0;
+}
+
+void __operator ++ (inout int a) {
+ a += 1;
+}
+
+void __operator ++ (inout vec2 v) {
+ ++v.x;
+ ++v.y;
+}
+
+void __operator ++ (inout vec3 v) {
+ ++v.x;
+ ++v.y;
+ ++v.z;
+}
+
+void __operator ++ (inout vec4 v) {
+ ++v.x;
+ ++v.y;
+ ++v.z;
+ ++v.w;
+}
+
+void __operator ++ (inout ivec2 v) {
+ ++v.x;
+ ++v.y;
+}
+
+void __operator ++ (inout ivec3 v) {
+ ++v.x;
+ ++v.y;
+ ++v.z;
+}
+
+void __operator ++ (inout ivec4 v) {
+ ++v.x;
+ ++v.y;
+ ++v.z;
+ ++v.w;
+}
+
+void __operator ++ (inout mat2 m) {
+ ++m[0];
+ ++m[1];
+}
+
+void __operator ++ (inout mat3 m) {
+ ++m[0];
+ ++m[1];
+ ++m[2];
+}
+
+void __operator ++ (inout mat4 m) {
+ ++m[0];
+ ++m[1];
+ ++m[2];
+ ++m[3];
+}
+
+//
+// NOTE: postfix increment and decrement operators take additional dummy int parameter to
+// distinguish their prototypes from prefix ones.
+//
+
+float __operator -- (inout float a, const int) {
+ float b = a;
+ --a;
+ return b;
+}
+
+int __operator -- (inout int a, const int) {
+ int b = a;
+ --a;
+ return b;
+}
+
+vec2 __operator -- (inout vec2 v, const int) {
+ return vec2 (v.x--, v.y--);
+}
+
+vec3 __operator -- (inout vec3 v, const int) {
+ return vec3 (v.x--, v.y--, v.z--);
+}
+
+vec4 __operator -- (inout vec4 v, const int) {
+ return vec4 (v.x--, v.y--, v.z--, v.w--);
+}
+
+ivec2 __operator -- (inout ivec2 v, const int) {
+ return ivec2 (v.x--, v.y--);
+}
+
+ivec3 __operator -- (inout ivec3 v, const int) {
+ return ivec3 (v.x--, v.y--, v.z--);
+}
+
+ivec4 __operator -- (inout ivec4 v, const int) {
+ return ivec4 (v.x--, v.y--, v.z--, v.w--);
+}
+
+mat2 __operator -- (inout mat2 m, const int) {
+ return mat2 (m[0]--, m[1]--);
+}
+
+mat3 __operator -- (inout mat3 m, const int) {
+ return mat3 (m[0]--, m[1]--, m[2]--);
+}
+
+mat4 __operator -- (inout mat4 m, const int) {
+ return mat4 (m[0]--, m[1]--, m[2]--, m[3]--);
+}
+
+float __operator ++ (inout float a, const int) {
+ float b = a;
+ ++a;
+ return b;
+}
+
+int __operator ++ (inout int a, const int) {
+ int b = a;
+ ++a;
+ return b;
+}
+
+vec2 __operator ++ (inout vec2 v, const int) {
+ return vec2 (v.x++, v.y++);
+}
+
+vec3 __operator ++ (inout vec3 v, const int) {
+ return vec3 (v.x++, v.y++, v.z++);
+}
+
+vec4 __operator ++ (inout vec4 v, const int) {
+ return vec4 (v.x++, v.y++, v.z++, v.w++);
+}
+
+ivec2 __operator ++ (inout ivec2 v, const int) {
+ return ivec2 (v.x++, v.y++);
+}
+
+ivec3 __operator ++ (inout ivec3 v, const int) {
+ return ivec3 (v.x++, v.y++, v.z++);
+}
+
+ivec4 __operator ++ (inout ivec4 v, const int) {
+ return ivec4 (v.x++, v.y++, v.z++, v.w++);
+}
+
+mat2 __operator ++ (inout mat2 m, const int) {
+ return mat2 (m[0]++, m[1]++);
+}
+
+mat3 __operator ++ (inout mat3 m, const int) {
+ return mat3 (m[0]++, m[1]++, m[2]++);
+}
+
+mat4 __operator ++ (inout mat4 m, const int) {
+ return mat4 (m[0]++, m[1]++, m[2]++, m[3]++);
+}
+
+bool __operator < (const float a, const float b) {
+ bool c;
+ __asm float_less c, a, b;
+ return c;
+}
+
+bool __operator < (const int a, const int b) {
+ return float (a) < float (b);
+}
+
+bool __operator > (const float a, const float b) {
+ bool c;
+ __asm float_less c, b, a;
+ return c;
+}
+
+bool __operator > (const int a, const int b) {
+ return float (a) > float (b);
+}
+
+bool __operator >= (const float a, const float b) {
+ bool g, e;
+ __asm float_less g, b, a;
+ __asm float_equal e, a, b;
+ return g || e;
+}
+
+bool __operator >= (const int a, const int b) {
+ return float (a) >= float (b);
+}
+
+bool __operator <= (const float a, const float b) {
+ bool g, e;
+ __asm float_less g, a, b;
+ __asm float_equal e, a, b;
+ return g || e;
+}
+
+bool __operator <= (const int a, const int b) {
+ return float (a) <= float (b);
+}
+
+bool __operator ^^ (const bool a, const bool b) {
+ return a != b;
+}
+
+//
+// These operators are handled internally by the compiler:
+//
+// bool __operator && (bool a, bool b) {
+// return a ? b : false;
+// }
+// bool __operator || (bool a, bool b) {
+// return a ? true : b;
+// }
+//
+
+bool __operator ! (const bool a) {
+ return a == false;
+}
+
+//
+// mesa-specific extension functions.
+//
+
+void print (const float f) {
+ __asm float_print f;
+}
+
+void print (const int i) {
+ __asm int_print i;
+}
+
+void print (const bool b) {
+ __asm bool_print b;
+}
+
+void print (const vec2 v) {
+ print (v.x);
+ print (v.y);
+}
+
+void print (const vec3 v) {
+ print (v.x);
+ print (v.y);
+ print (v.z);
+}
+
+void print (const vec4 v) {
+ print (v.x);
+ print (v.y);
+ print (v.z);
+ print (v.w);
+}
+
+void print (const ivec2 v) {
+ print (v.x);
+ print (v.y);
+}
+
+void print (const ivec3 v) {
+ print (v.x);
+ print (v.y);
+ print (v.z);
+}
+
+void print (const ivec4 v) {
+ print (v.x);
+ print (v.y);
+ print (v.z);
+ print (v.w);
+}
+
+void print (const bvec2 v) {
+ print (v.x);
+ print (v.y);
+}
+
+void print (const bvec3 v) {
+ print (v.x);
+ print (v.y);
+ print (v.z);
+}
+
+void print (const bvec4 v) {
+ print (v.x);
+ print (v.y);
+ print (v.z);
+ print (v.w);
+}
+
+void print (const mat2 m) {
+ print (m[0]);
+ print (m[1]);
+}
+
+void print (const mat3 m) {
+ print (m[0]);
+ print (m[1]);
+ print (m[2]);
+}
+
+void print (const mat4 m) {
+ print (m[0]);
+ print (m[1]);
+ print (m[2]);
+ print (m[3]);
+}
+
+void print (const sampler1D e) {
+ __asm int_print e;
+}
+
+void print (const sampler2D e) {
+ __asm int_print e;
+}
+
+void print (const sampler3D e) {
+ __asm int_print e;
+}
+
+void print (const samplerCube e) {
+ __asm int_print e;
+}
+
+void print (const sampler1DShadow e) {
+ __asm int_print e;
+}
+
+void print (const sampler2DShadow e) {
+ __asm int_print e;
+}
+
diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h
index b3b7c8071c..993b241500 100644
--- a/src/mesa/shader/slang/library/slang_core_gc.h
+++ b/src/mesa/shader/slang/library/slang_core_gc.h
@@ -1,538 +1,538 @@
-
-/* DO NOT EDIT - THIS FILE AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */
-/* slang_core.gc */
-
-3,1,0,5,1,1,1,0,9,102,0,0,0,1,3,2,0,5,1,105,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,
-18,105,0,0,18,102,0,0,0,8,18,105,0,0,0,1,0,1,1,1,1,0,5,105,0,0,0,1,8,18,105,0,16,8,48,0,39,0,0,1,0,
-1,1,1,1,0,9,102,0,0,0,1,8,18,102,0,17,48,0,48,0,0,39,0,0,1,0,5,1,1,1,0,1,98,0,0,0,1,8,18,98,0,16,
-10,49,0,16,8,48,0,31,0,0,1,0,9,1,1,1,0,1,98,0,0,0,1,8,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,
-1,0,9,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,102,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,
-18,102,0,0,18,105,0,0,0,8,18,102,0,0,0,1,0,1,1,1,1,0,1,98,0,0,0,1,8,18,98,0,0,0,1,0,5,1,1,1,0,5,
-105,0,0,0,1,8,18,105,0,0,0,1,0,9,1,1,1,0,9,102,0,0,0,1,8,18,102,0,0,0,1,0,10,1,1,1,0,9,102,0,0,0,1,
-8,58,118,101,99,50,0,18,102,0,0,18,102,0,0,0,0,0,1,0,10,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,
-4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,50,0,18,
-120,0,0,0,0,0,1,0,10,1,1,1,0,1,98,0,0,0,1,8,58,118,101,99,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,
-0,31,0,0,0,0,1,0,11,1,1,1,0,9,102,0,0,0,1,8,58,118,101,99,51,0,18,102,0,0,18,102,0,0,18,102,0,0,0,
-0,0,1,0,11,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,
-116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,51,0,18,120,0,0,0,0,0,1,0,11,1,1,1,0,1,98,0,0,0,1,8,
-58,118,101,99,51,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,12,1,1,1,0,9,102,0,0,0,1,8,
-58,118,101,99,52,0,18,102,0,0,18,102,0,0,18,102,0,0,18,102,0,0,0,0,0,1,0,12,1,1,1,0,5,105,0,0,0,1,
-3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,
-118,101,99,52,0,18,120,0,0,0,0,0,1,0,12,1,1,1,0,1,98,0,0,0,1,8,58,118,101,99,52,0,18,98,0,17,49,0,
-48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,6,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,50,0,18,105,0,0,
-18,105,0,0,0,0,0,1,0,6,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,50,0,58,105,110,116,0,18,102,0,0,
-0,0,0,0,0,1,0,6,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,50,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,
-1,0,7,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,51,0,18,105,0,0,18,105,0,0,18,105,0,0,0,0,0,1,0,7,
-1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,51,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,7,1,1,1,0,
-1,98,0,0,0,1,8,58,105,118,101,99,51,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,8,1,1,1,0,5,105,0,0,
-0,1,8,58,105,118,101,99,52,0,18,105,0,0,18,105,0,0,18,105,0,0,18,105,0,0,0,0,0,1,0,8,1,1,1,0,9,102,
-0,0,0,1,8,58,105,118,101,99,52,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,8,1,1,1,0,1,98,0,0,0,1,
-8,58,105,118,101,99,52,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,2,1,1,1,0,1,98,0,0,0,1,8,58,98,
-118,101,99,50,0,18,98,0,0,18,98,0,0,0,0,0,1,0,2,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,50,0,58,
-98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,2,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,50,0,58,98,
-111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,3,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,51,0,18,98,0,0,18,
-98,0,0,18,98,0,0,0,0,0,1,0,3,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,51,0,58,98,111,111,108,0,18,
-102,0,0,0,0,0,0,0,1,0,3,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,51,0,58,98,111,111,108,0,18,105,0,
-0,0,0,0,0,0,1,0,4,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,52,0,18,98,0,0,18,98,0,0,18,98,0,0,18,98,
-0,0,0,0,0,1,0,4,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,52,0,58,98,111,111,108,0,18,102,0,0,0,0,0,
-0,0,1,0,4,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,52,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,
-0,13,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,50,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,
-102,0,0,0,0,0,1,0,13,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,
-111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,50,0,18,120,0,0,0,0,0,1,0,13,1,1,1,0,1,98,0,0,
-0,1,8,58,109,97,116,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,14,1,1,1,0,9,102,0,0,
-0,1,8,58,109,97,116,51,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,
-17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,14,1,1,1,0,5,105,0,0,0,1,3,
-2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,
-109,97,116,51,0,18,120,0,0,0,0,0,1,0,14,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,51,0,18,98,0,17,49,0,
-48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,52,0,18,102,0,0,17,
-48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,
-0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,
-48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,15,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,
-110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,52,0,18,120,0,0,
-0,0,0,1,0,15,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,52,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,
-0,0,0,1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,97,100,100,0,18,97,0,0,
-18,97,0,0,18,98,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,3,2,0,9,1,98,0,0,0,4,102,108,111,97,116,95,
-110,101,103,97,116,101,0,18,98,0,0,18,97,0,0,0,8,18,98,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,
-0,0,1,3,2,0,9,1,99,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,99,0,0,18,98,0,0,0,4,
-102,108,111,97,116,95,97,100,100,0,18,97,0,0,18,97,0,0,18,99,0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,
-0,9,98,0,0,0,1,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,97,0,0,18,97,0,0,18,98,
-0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,100,105,118,105,100,
-101,0,18,97,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,26,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,99,
-0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,99,0,0,18,97,0,0,18,98,0,0,0,8,18,99,0,0,0,1,0,0,2,1,
-1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,
-58,102,108,111,97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,5,2,27,1,1,0,5,97,0,0,0,1,3,2,0,9,1,120,0,0,
-0,3,2,0,5,1,98,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,102,
-108,111,97,116,95,110,101,103,97,116,101,0,18,120,0,0,18,120,0,0,0,4,102,108,111,97,116,95,116,111,
-95,105,110,116,0,18,98,0,0,18,120,0,0,0,8,18,98,0,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,
-9,18,97,0,18,98,0,54,21,0,0,1,0,9,2,21,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,99,0,0,0,4,102,
-108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,99,0,0,18,97,0,0,18,98,0,0,0,8,18,99,0,0,0,
-1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,
-97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,
-0,0,1,3,2,0,9,1,99,0,0,0,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,99,0,0,18,97,0,0,18,
-98,0,0,0,8,18,99,0,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,
-102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,
-10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,
-117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,
-59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,
-0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,
-0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,
-0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,
-120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,
-0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,
-120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0,
-1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,
-118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,
-11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,
-117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,
-12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,
-0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2,
-2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,
-121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117,
-0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,
-120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9,
-18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,
-118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,
-0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,
-1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,
-21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,
-18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,
-0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6,
-118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,
-0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,
-120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,
-1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,
-0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7,
-118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,
-0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117,
-0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,
-118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,
-59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,
-117,0,59,122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,
-117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,
-9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,
-1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,
-18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,
-119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,
-24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,
-118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,
-16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,
-0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,
-18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,
-0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,
-109,0,16,10,49,0,57,59,120,0,48,46,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,
-59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0,
-0,0,1,8,58,109,97,116,50,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,
-0,0,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,
-0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,
-18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,
-1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,
-57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,
-110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,
-16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,11,2,21,1,1,0,14,109,
-0,0,1,1,0,11,118,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,
-18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,
-59,120,0,48,46,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0,18,109,0,16,
-10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,48,46,0,18,118,0,59,
-120,0,18,109,0,16,8,48,0,57,59,122,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,48,46,18,
-118,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,48,46,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14,
-110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,
-57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,
-9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,
-16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,
-109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,
-9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,
-21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,
-51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,
-8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,
-110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,12,2,21,1,1,0,
-15,109,0,0,1,1,0,12,118,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,
-120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,18,118,0,59,122,0,18,109,0,16,10,
-50,0,57,59,120,0,48,46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,48,46,0,18,118,0,59,120,0,
-18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,
-59,122,0,18,109,0,16,10,50,0,57,59,121,0,48,46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,
-48,46,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,
-57,59,122,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,48,46,18,118,0,59,119,0,18,109,
-0,16,10,51,0,57,59,122,0,48,46,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,48,18,118,0,59,
-121,0,18,109,0,16,10,49,0,57,59,119,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,48,
-46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,48,46,0,0,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,
-1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,
-10,49,0,57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0,18,109,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,
-0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,
-2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,
-10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,
-109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,
-18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,
-9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,
-10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,
-1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,
-18,97,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,
-118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,
-97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,
-18,97,0,22,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,
-118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,
-97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,
-18,97,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,
-118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0,9,18,118,0,59,119,0,18,97,0,21,0,0,1,
-0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,
-18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,9,18,118,0,59,119,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,
-12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,
-18,118,0,59,122,0,18,97,0,23,0,9,18,118,0,59,119,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,
-9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,
-18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,
-109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,
-1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,
-0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,
-49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,
-0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,
-109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,
-97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,
-18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,
-0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,
-9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,
-16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,
-24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,
-0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,
-0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,
-109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,
-97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,
-18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,
-18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,
-9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,
-57,18,97,0,24,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,8,58,118,101,99,50,0,18,118,0,
-59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,
-0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,
-121,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,
-48,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,
-18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,18,118,0,
-59,122,0,18,109,0,16,8,48,0,57,59,122,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59,120,0,
-48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,49,0,
-57,59,122,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,50,0,57,59,120,0,48,18,118,0,59,121,0,18,109,
-0,16,10,50,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,48,46,0,0,0,0,1,0,
-0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,12,2,21,1,1,
-0,12,118,0,0,1,1,0,15,109,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,
-120,0,48,18,118,0,59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,8,48,
-0,57,59,122,0,48,46,18,118,0,59,119,0,18,109,0,16,8,48,0,57,59,119,0,48,46,0,18,118,0,59,120,0,18,
-109,0,16,10,49,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,
-59,122,0,18,109,0,16,10,49,0,57,59,122,0,48,46,18,118,0,59,119,0,18,109,0,16,10,49,0,57,59,119,0,
-48,46,0,18,118,0,59,120,0,18,109,0,16,10,50,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,50,0,
-57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,48,46,18,118,0,59,119,0,18,109,
-0,16,10,50,0,57,59,119,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,51,0,57,59,120,0,48,18,118,0,59,
-121,0,18,109,0,16,10,51,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,51,0,57,59,122,0,48,
-46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,
-0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,
-1,3,2,0,9,1,99,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,99,0,0,18,98,0,0,0,4,102,
-108,111,97,116,95,97,100,100,0,18,99,0,0,18,97,0,0,18,99,0,0,0,8,18,99,0,0,0,1,0,5,2,26,1,1,0,5,97,
-0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,
-95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,
-121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,
-108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,
-97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,
-111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,
-0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,121,0,0,18,121,0,0,0,
-4,102,108,111,97,116,95,97,100,100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,
-116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,
-0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,
-97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,
-0,0,0,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0,
-4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1,
-1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,
-95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,
-97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,120,0,0,18,
-120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,
-99,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,
-18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,
-1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,
-0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,
-50,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,
-10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,
-120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,11,
-117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,
-0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,
-11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,
-117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,
-1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,
-18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,
-1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,
-0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,
-0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,
-121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0,
-59,119,0,46,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,118,
-0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,
-117,0,59,122,0,47,0,18,118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,
-1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,
-18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59,119,
-0,48,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,
-120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,
-59,122,0,49,0,18,118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,6,
-117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,
-117,0,59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,
-18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1,0,6,2,21,
-1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,
-48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,
-8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,
-121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,
-59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,
-0,59,122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,
-118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,
-18,117,0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,
-0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59,
-122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,
-99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,
-59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,
-101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,
-118,0,59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0,59,119,0,46,0,0,0,0,1,0,8,2,27,1,
-1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,47,
-0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18,118,0,59,
-119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,
-99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,
-59,122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0,1,0,8,2,22,1,1,0,8,
-118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,
-118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18,118,0,59,119,0,
-18,117,0,59,119,0,49,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,
-0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,
-46,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,
-0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,
-22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,
-48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,
-1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,
-0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,0,0,0,
-0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,
-110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,18,109,0,16,10,50,0,57,
-18,110,0,16,10,50,0,57,47,0,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,
-116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,
-0,57,49,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,
-1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,
-16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,0,18,
-109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,
-0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,
-18,110,0,16,10,49,0,57,47,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,0,18,109,0,16,10,51,0,
-57,18,110,0,16,10,51,0,57,47,0,0,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,
-116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,
-0,57,49,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,0,18,109,0,16,10,51,0,57,18,110,0,16,10,
-51,0,57,49,0,0,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,
-117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9,98,0,
-0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,0,0,0,1,0,
-10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,47,0,18,
-97,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,
-50,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,
-0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,
-0,48,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,
-0,18,98,0,48,0,18,118,0,59,121,0,18,98,0,48,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,
-1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,0,0,0,1,0,10,
-2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,49,0,18,
-118,0,59,121,0,18,98,0,49,0,0,0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,
-51,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,
-0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,
-0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,0,0,0,1,0,11,2,27,1,1,0,9,97,
-0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,
-121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,
-58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,
-18,98,0,47,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,
-117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11,2,
-21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,48,0,18,118,
-0,59,121,0,18,98,0,48,0,18,118,0,59,122,0,18,98,0,48,0,0,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,
-117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,
-97,0,18,117,0,59,122,0,49,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,
-51,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,
-0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,
-0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,18,97,0,18,117,0,59,119,0,46,
-0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,
-98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,18,118,0,59,119,0,18,98,0,
-46,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,
-59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,18,97,0,18,117,0,59,
-119,0,47,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,
-120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98,0,47,0,18,118,0,59,119,0,
-18,98,0,47,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,
-117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0,18,97,0,18,117,0,
-59,119,0,48,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,
-59,120,0,18,98,0,48,0,18,118,0,59,121,0,18,98,0,48,0,18,118,0,59,122,0,18,98,0,48,0,18,118,0,59,
-119,0,18,98,0,48,0,0,0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,
-97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,18,97,0,
-18,117,0,59,119,0,49,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,
-18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,18,
-118,0,59,119,0,18,98,0,49,0,0,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,
-50,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,26,1,1,
-0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,
-16,10,49,0,57,18,98,0,46,0,0,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,
-50,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,27,1,1,
-0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,
-16,10,49,0,57,18,98,0,47,0,0,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,
-50,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,13,2,21,1,1,
-0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,
-16,10,49,0,57,18,98,0,48,0,0,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,
-50,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,13,2,22,1,1,
-0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,
-16,10,49,0,57,18,98,0,49,0,0,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,
-51,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,
-50,0,57,46,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,
-16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,
-0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,
-48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,0,0,0,1,0,14,
-2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,47,0,
-18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14,2,21,1,1,0,9,
-97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,
-0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,
-9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,
-0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,
-58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0,
-18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,
-51,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,
-18,98,0,49,0,0,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,
-110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,18,
-97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,
-116,52,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,
-0,57,18,98,0,46,0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,
-110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,
-47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1,0,15,2,27,1,1,
-0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,
-16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0,57,18,98,0,47,0,
-0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,
-48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,18,97,0,18,
-110,0,16,10,51,0,57,48,0,0,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,
-0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,
-98,0,48,0,18,109,0,16,10,51,0,57,18,98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,
-1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,
-97,0,18,110,0,16,10,50,0,57,49,0,18,97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1,0,15,
-109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,
-49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0,0,0,0,
-1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0,
-1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0,
-1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0,
-1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0,
-1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0,
-1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0,
-1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0,
-1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0,
-1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0,
-1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0,
-1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0,
-1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0,
-1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0,
-1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0,
-1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0,
-1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0,
-1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0,
-1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0,
-1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0,
-1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0,
-1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0,
-1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0,
-1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0,
-1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0,
-1,0,10,2,27,1,1,0,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,
-0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,
-121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,0,1,8,58,118,101,99,52,0,18,
-118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,
-6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,
-0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,
-121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,
-118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,
-13,2,27,1,1,0,13,109,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,
-57,54,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,54,0,18,
-109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,8,58,
-109,97,116,52,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,
-18,109,0,16,10,51,0,57,54,0,0,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,22,0,0,1,
-0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0,
-59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,52,0,
-9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,59,
-120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,
-1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,7,118,0,0,
-0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,
-8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,
-0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,
-0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,
-52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,
-9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0,0,1,0,0,
-2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,16,
-10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,
-1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,
-122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,
-18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,
-0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,
-0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,51,0,
-9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,13,
-109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1,0,2,14,109,0,
-0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,0,1,
-0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,
-0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,
-0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,
-2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0,
-1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11,
-118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,
-0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,
-59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2,
-25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,
-0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,
-61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0,
-1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,
-118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,
-0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,
-8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,
-61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,
-61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0,
-9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,
-0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,
-1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,
-59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,
-120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0,
-5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,
-0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2,24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,
-18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,
-58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,
-1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,
-0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1,
-1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,
-0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,
-0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0,
-1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,
-57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,
-99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,97,0,0,18,98,0,0,0,8,18,99,0,0,0,1,
-0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,
-116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,
-111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,
-97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,
-0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,
-111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113,
-117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,
-1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,
-0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,
-116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,
-108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,
-5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,
-1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,
-18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,
-112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,5,105,0,0,0,1,4,105,110,
-116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,1,98,0,0,0,1,4,98,
-111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,10,118,0,0,
-0,1,9,58,112,114,105,110,116,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,0,18,118,0,59,121,
-0,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,0,18,118,0,
-59,120,0,0,0,0,9,58,112,114,105,110,116,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,0,18,
-118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,
-0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,
-116,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,
-105,110,116,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,0,18,118,0,59,120,0,0,0,0,9,58,112,114,
-105,110,116,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,7,118,0,0,0,1,9,58,112,
-114,105,110,116,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,0,18,118,0,59,121,0,0,0,0,9,58,
-112,114,105,110,116,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,8,118,0,0,0,1,
-9,58,112,114,105,110,116,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,0,18,118,0,59,121,0,0,
-0,0,9,58,112,114,105,110,116,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,0,18,118,0,59,119,
-0,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,0,18,118,0,59,
-120,0,0,0,0,9,58,112,114,105,110,116,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,
-0,3,118,0,0,0,1,9,58,112,114,105,110,116,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,0,18,
-118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,
-116,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,
-116,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,
-110,116,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,13,109,0,0,0,1,9,58,112,
-114,105,110,116,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,0,18,109,0,16,10,49,0,57,0,
-0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,0,18,109,0,16,8,
-48,0,57,0,0,0,9,58,112,114,105,110,116,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,0,
-18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,
-110,116,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,0,18,109,0,16,10,49,0,57,0,0,0,9,58,
-112,114,105,110,116,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,0,18,109,0,16,10,51,0,
-57,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,
-0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,
-110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,
-114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,19,101,0,0,0,1,4,105,110,116,
-95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,20,101,0,0,0,1,4,105,
-110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,21,101,0,0,0,1,
-4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0
+
+/* DO NOT EDIT - THIS FILE AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */
+/* slang_core.gc */
+
+3,1,0,5,1,1,1,0,9,102,0,0,0,1,3,2,0,5,1,105,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,
+18,105,0,0,18,102,0,0,0,8,18,105,0,0,0,1,0,1,1,1,1,0,5,105,0,0,0,1,8,18,105,0,16,8,48,0,39,0,0,1,0,
+1,1,1,1,0,9,102,0,0,0,1,8,18,102,0,17,48,0,48,0,0,39,0,0,1,0,5,1,1,1,0,1,98,0,0,0,1,8,18,98,0,16,
+10,49,0,16,8,48,0,31,0,0,1,0,9,1,1,1,0,1,98,0,0,0,1,8,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,
+1,0,9,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,102,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,
+18,102,0,0,18,105,0,0,0,8,18,102,0,0,0,1,0,1,1,1,1,0,1,98,0,0,0,1,8,18,98,0,0,0,1,0,5,1,1,1,0,5,
+105,0,0,0,1,8,18,105,0,0,0,1,0,9,1,1,1,0,9,102,0,0,0,1,8,18,102,0,0,0,1,0,10,1,1,1,0,9,102,0,0,0,1,
+8,58,118,101,99,50,0,18,102,0,0,18,102,0,0,0,0,0,1,0,10,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,
+4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,50,0,18,
+120,0,0,0,0,0,1,0,10,1,1,1,0,1,98,0,0,0,1,8,58,118,101,99,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,
+0,31,0,0,0,0,1,0,11,1,1,1,0,9,102,0,0,0,1,8,58,118,101,99,51,0,18,102,0,0,18,102,0,0,18,102,0,0,0,
+0,0,1,0,11,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,
+116,0,18,120,0,0,18,105,0,0,0,8,58,118,101,99,51,0,18,120,0,0,0,0,0,1,0,11,1,1,1,0,1,98,0,0,0,1,8,
+58,118,101,99,51,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,12,1,1,1,0,9,102,0,0,0,1,8,
+58,118,101,99,52,0,18,102,0,0,18,102,0,0,18,102,0,0,18,102,0,0,0,0,0,1,0,12,1,1,1,0,5,105,0,0,0,1,
+3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,
+118,101,99,52,0,18,120,0,0,0,0,0,1,0,12,1,1,1,0,1,98,0,0,0,1,8,58,118,101,99,52,0,18,98,0,17,49,0,
+48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,6,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,50,0,18,105,0,0,
+18,105,0,0,0,0,0,1,0,6,1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,50,0,58,105,110,116,0,18,102,0,0,
+0,0,0,0,0,1,0,6,1,1,1,0,1,98,0,0,0,1,8,58,105,118,101,99,50,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,
+1,0,7,1,1,1,0,5,105,0,0,0,1,8,58,105,118,101,99,51,0,18,105,0,0,18,105,0,0,18,105,0,0,0,0,0,1,0,7,
+1,1,1,0,9,102,0,0,0,1,8,58,105,118,101,99,51,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,7,1,1,1,0,
+1,98,0,0,0,1,8,58,105,118,101,99,51,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,8,1,1,1,0,5,105,0,0,
+0,1,8,58,105,118,101,99,52,0,18,105,0,0,18,105,0,0,18,105,0,0,18,105,0,0,0,0,0,1,0,8,1,1,1,0,9,102,
+0,0,0,1,8,58,105,118,101,99,52,0,58,105,110,116,0,18,102,0,0,0,0,0,0,0,1,0,8,1,1,1,0,1,98,0,0,0,1,
+8,58,105,118,101,99,52,0,58,105,110,116,0,18,98,0,0,0,0,0,0,0,1,0,2,1,1,1,0,1,98,0,0,0,1,8,58,98,
+118,101,99,50,0,18,98,0,0,18,98,0,0,0,0,0,1,0,2,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,50,0,58,
+98,111,111,108,0,18,102,0,0,0,0,0,0,0,1,0,2,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,50,0,58,98,
+111,111,108,0,18,105,0,0,0,0,0,0,0,1,0,3,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,51,0,18,98,0,0,18,
+98,0,0,18,98,0,0,0,0,0,1,0,3,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,51,0,58,98,111,111,108,0,18,
+102,0,0,0,0,0,0,0,1,0,3,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,51,0,58,98,111,111,108,0,18,105,0,
+0,0,0,0,0,0,1,0,4,1,1,1,0,1,98,0,0,0,1,8,58,98,118,101,99,52,0,18,98,0,0,18,98,0,0,18,98,0,0,18,98,
+0,0,0,0,0,1,0,4,1,1,1,0,9,102,0,0,0,1,8,58,98,118,101,99,52,0,58,98,111,111,108,0,18,102,0,0,0,0,0,
+0,0,1,0,4,1,1,1,0,5,105,0,0,0,1,8,58,98,118,101,99,52,0,58,98,111,111,108,0,18,105,0,0,0,0,0,0,0,1,
+0,13,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,50,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,
+102,0,0,0,0,0,1,0,13,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,
+111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,50,0,18,120,0,0,0,0,0,1,0,13,1,1,1,0,1,98,0,0,
+0,1,8,58,109,97,116,50,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,14,1,1,1,0,9,102,0,0,
+0,1,8,58,109,97,116,51,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,
+17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,14,1,1,1,0,5,105,0,0,0,1,3,
+2,0,9,1,120,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,
+109,97,116,51,0,18,120,0,0,0,0,0,1,0,14,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,51,0,18,98,0,17,49,0,
+48,0,0,17,48,0,48,0,0,31,0,0,0,0,1,0,15,1,1,1,0,9,102,0,0,0,1,8,58,109,97,116,52,0,18,102,0,0,17,
+48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,
+0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,
+48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,0,0,0,1,0,15,1,1,1,0,5,105,0,0,0,1,3,2,0,9,1,120,0,0,0,4,105,
+110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,105,0,0,0,8,58,109,97,116,52,0,18,120,0,0,
+0,0,0,1,0,15,1,1,1,0,1,98,0,0,0,1,8,58,109,97,116,52,0,18,98,0,17,49,0,48,0,0,17,48,0,48,0,0,31,0,
+0,0,0,1,0,0,2,1,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,97,100,100,0,18,97,0,0,
+18,97,0,0,18,98,0,0,0,0,1,0,9,2,27,1,1,0,9,97,0,0,0,1,3,2,0,9,1,98,0,0,0,4,102,108,111,97,116,95,
+110,101,103,97,116,101,0,18,98,0,0,18,97,0,0,0,8,18,98,0,0,0,1,0,0,2,2,1,0,2,9,97,0,0,1,1,0,9,98,0,
+0,0,1,3,2,0,9,1,99,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,99,0,0,18,98,0,0,0,4,
+102,108,111,97,116,95,97,100,100,0,18,97,0,0,18,97,0,0,18,99,0,0,0,0,1,0,0,2,3,1,0,2,9,97,0,0,1,1,
+0,9,98,0,0,0,1,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,97,0,0,18,97,0,0,18,98,
+0,0,0,0,1,0,0,2,4,1,0,2,9,97,0,0,1,1,0,9,98,0,0,0,1,4,102,108,111,97,116,95,100,105,118,105,100,
+101,0,18,97,0,0,18,97,0,0,18,98,0,0,0,0,1,0,9,2,26,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,99,
+0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,99,0,0,18,97,0,0,18,98,0,0,0,8,18,99,0,0,0,1,0,0,2,1,
+1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,97,0,0,0,
+58,102,108,111,97,116,0,18,98,0,0,0,46,0,0,20,0,0,1,0,5,2,27,1,1,0,5,97,0,0,0,1,3,2,0,9,1,120,0,0,
+0,3,2,0,5,1,98,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,102,
+108,111,97,116,95,110,101,103,97,116,101,0,18,120,0,0,18,120,0,0,0,4,102,108,111,97,116,95,116,111,
+95,105,110,116,0,18,98,0,0,18,120,0,0,0,8,18,98,0,0,0,1,0,0,2,2,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,
+9,18,97,0,18,98,0,54,21,0,0,1,0,9,2,21,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,9,1,99,0,0,0,4,102,
+108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,99,0,0,18,97,0,0,18,98,0,0,0,8,18,99,0,0,0,
+1,0,0,2,3,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,102,108,111,97,116,0,18,
+97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,48,0,0,20,0,0,1,0,9,2,22,1,1,0,9,97,0,0,1,1,0,9,98,0,
+0,0,1,3,2,0,9,1,99,0,0,0,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,99,0,0,18,97,0,0,18,
+98,0,0,0,8,18,99,0,0,0,1,0,0,2,4,1,0,2,5,97,0,0,1,1,0,5,98,0,0,0,1,9,18,97,0,58,105,110,116,0,58,
+102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,49,0,0,20,0,0,1,0,0,2,1,1,0,2,
+10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,
+117,0,59,121,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,
+59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,10,117,
+0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,
+0,0,2,4,1,0,2,10,118,0,0,1,1,0,10,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,
+0,59,121,0,18,117,0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,
+120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,
+0,59,122,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,
+120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0,
+1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,
+118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,
+11,118,0,0,1,1,0,11,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,
+117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,
+12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,
+0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2,
+2,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,
+121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117,
+0,59,119,0,22,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,
+120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9,
+18,118,0,59,119,0,18,117,0,59,119,0,23,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,12,117,0,0,0,1,9,18,
+118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,
+0,18,117,0,59,122,0,24,0,9,18,118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,6,118,0,0,1,
+1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,
+21,0,0,1,0,0,2,2,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,
+18,118,0,59,121,0,18,117,0,59,121,0,22,0,0,1,0,0,2,3,1,0,2,6,118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,
+0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,0,59,121,0,23,0,0,1,0,0,2,4,1,0,2,6,
+118,0,0,1,1,0,6,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,
+0,59,121,0,24,0,0,1,0,0,2,1,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,
+120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,117,0,59,122,0,21,0,0,
+1,0,0,2,2,1,0,2,7,118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,
+0,59,121,0,18,117,0,59,121,0,22,0,9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,0,1,0,0,2,3,1,0,2,7,
+118,0,0,1,1,0,7,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,18,117,
+0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,0,1,0,0,2,4,1,0,2,7,118,0,0,1,1,0,7,117,
+0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,
+118,0,59,122,0,18,117,0,59,122,0,24,0,0,1,0,0,2,1,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,
+59,120,0,18,117,0,59,120,0,21,0,9,18,118,0,59,121,0,18,117,0,59,121,0,21,0,9,18,118,0,59,122,0,18,
+117,0,59,122,0,21,0,9,18,118,0,59,119,0,18,117,0,59,119,0,21,0,0,1,0,0,2,2,1,0,2,8,118,0,0,1,1,0,8,
+117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,22,0,9,18,118,0,59,121,0,18,117,0,59,121,0,22,0,
+9,18,118,0,59,122,0,18,117,0,59,122,0,22,0,9,18,118,0,59,119,0,18,117,0,59,119,0,22,0,0,1,0,0,2,3,
+1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,23,0,9,18,118,0,59,121,0,
+18,117,0,59,121,0,23,0,9,18,118,0,59,122,0,18,117,0,59,122,0,23,0,9,18,118,0,59,119,0,18,117,0,59,
+119,0,23,0,0,1,0,0,2,4,1,0,2,8,118,0,0,1,1,0,8,117,0,0,0,1,9,18,118,0,59,120,0,18,117,0,59,120,0,
+24,0,9,18,118,0,59,121,0,18,117,0,59,121,0,24,0,9,18,118,0,59,122,0,18,117,0,59,122,0,24,0,9,18,
+118,0,59,119,0,18,117,0,59,119,0,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,
+16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,0,
+0,2,2,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,
+18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,0,10,2,21,1,1,0,13,109,0,0,1,1,0,10,118,0,0,
+0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,
+109,0,16,10,49,0,57,59,120,0,48,46,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,
+59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,0,0,0,0,1,0,13,2,21,1,1,0,13,109,0,0,1,1,0,13,110,0,
+0,0,1,8,58,109,97,116,50,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,57,48,
+0,0,0,0,1,0,0,2,3,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,
+0,2,4,1,0,2,13,109,0,0,1,1,0,13,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,
+18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,
+1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,
+57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,14,
+110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,
+16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,0,11,2,21,1,1,0,14,109,
+0,0,1,1,0,11,118,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,
+18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,
+59,120,0,48,46,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0,18,109,0,16,
+10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,121,0,48,46,0,18,118,0,59,
+120,0,18,109,0,16,8,48,0,57,59,122,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,48,46,18,
+118,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,48,46,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,14,
+110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,10,49,0,
+57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,0,2,3,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,
+9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,14,110,0,0,0,1,9,18,109,0,
+16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,
+109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,
+9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,
+21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,
+51,0,57,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,
+8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,
+110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,0,12,2,21,1,1,0,
+15,109,0,0,1,1,0,12,118,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,
+120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,18,118,0,59,122,0,18,109,0,16,10,
+50,0,57,59,120,0,48,46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,48,46,0,18,118,0,59,120,0,
+18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,
+59,122,0,18,109,0,16,10,50,0,57,59,121,0,48,46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,
+48,46,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,
+57,59,122,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,48,46,18,118,0,59,119,0,18,109,
+0,16,10,51,0,57,59,122,0,48,46,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,48,18,118,0,59,
+121,0,18,109,0,16,10,49,0,57,59,119,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,48,
+46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,48,46,0,0,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,
+1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,18,110,0,16,8,48,0,57,48,0,18,109,0,18,110,0,16,
+10,49,0,57,48,0,18,109,0,18,110,0,16,10,50,0,57,48,0,18,109,0,18,110,0,16,10,51,0,57,48,0,0,0,0,1,
+0,0,2,3,1,0,2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,0,0,2,4,1,0,
+2,15,109,0,0,1,1,0,15,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,
+10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,18,
+109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,0,0,2,1,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,
+18,118,0,59,120,0,18,97,0,21,0,9,18,118,0,59,121,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,10,118,0,0,1,1,0,
+9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,
+10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,0,
+1,0,0,2,4,1,0,2,10,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,
+18,97,0,24,0,0,1,0,0,2,1,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,
+118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0,0,1,0,0,2,2,1,0,2,11,118,0,0,1,1,0,9,
+97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,18,97,0,22,0,9,18,118,0,59,122,0,
+18,97,0,22,0,0,1,0,0,2,3,1,0,2,11,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,
+118,0,59,121,0,18,97,0,23,0,9,18,118,0,59,122,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,11,118,0,0,1,1,0,9,
+97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,
+18,97,0,24,0,0,1,0,0,2,1,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,21,0,9,18,
+118,0,59,121,0,18,97,0,21,0,9,18,118,0,59,122,0,18,97,0,21,0,9,18,118,0,59,119,0,18,97,0,21,0,0,1,
+0,0,2,2,1,0,2,12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,22,0,9,18,118,0,59,121,0,
+18,97,0,22,0,9,18,118,0,59,122,0,18,97,0,22,0,9,18,118,0,59,119,0,18,97,0,22,0,0,1,0,0,2,3,1,0,2,
+12,118,0,0,1,1,0,9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,23,0,9,18,118,0,59,121,0,18,97,0,23,0,9,
+18,118,0,59,122,0,18,97,0,23,0,9,18,118,0,59,119,0,18,97,0,23,0,0,1,0,0,2,4,1,0,2,12,118,0,0,1,1,0,
+9,97,0,0,0,1,9,18,118,0,59,120,0,18,97,0,24,0,9,18,118,0,59,121,0,18,97,0,24,0,9,18,118,0,59,122,0,
+18,97,0,24,0,9,18,118,0,59,119,0,18,97,0,24,0,0,1,0,0,2,1,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,
+109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,0,0,2,2,1,0,2,13,109,0,0,
+1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,
+0,0,2,3,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,
+49,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,13,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,
+0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,0,0,2,1,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,
+109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,
+97,0,21,0,0,1,0,0,2,2,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,
+18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,0,0,2,3,1,0,2,14,109,
+0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,
+9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,0,0,2,4,1,0,2,14,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,
+16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,
+24,0,0,1,0,0,2,1,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,
+0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,
+0,21,0,0,1,0,0,2,2,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,
+109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,
+97,0,22,0,0,1,0,0,2,3,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,
+18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,
+18,97,0,23,0,0,1,0,0,2,4,1,0,2,15,109,0,0,1,1,0,9,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,
+9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,
+57,18,97,0,24,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,13,109,0,0,0,1,8,58,118,101,99,50,0,18,118,0,
+59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,
+0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,
+121,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,10,118,0,0,1,1,0,13,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,
+48,20,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,1,0,14,109,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,
+18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,18,118,0,
+59,122,0,18,109,0,16,8,48,0,57,59,122,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,49,0,57,59,120,0,
+48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,49,0,
+57,59,122,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,50,0,57,59,120,0,48,18,118,0,59,121,0,18,109,
+0,16,10,50,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,48,46,0,0,0,0,1,0,
+0,2,3,1,0,2,11,118,0,0,1,1,0,14,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,12,2,21,1,1,
+0,12,118,0,0,1,1,0,15,109,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,
+120,0,48,18,118,0,59,121,0,18,109,0,16,8,48,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,8,48,
+0,57,59,122,0,48,46,18,118,0,59,119,0,18,109,0,16,8,48,0,57,59,119,0,48,46,0,18,118,0,59,120,0,18,
+109,0,16,10,49,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,
+59,122,0,18,109,0,16,10,49,0,57,59,122,0,48,46,18,118,0,59,119,0,18,109,0,16,10,49,0,57,59,119,0,
+48,46,0,18,118,0,59,120,0,18,109,0,16,10,50,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,50,0,
+57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,122,0,48,46,18,118,0,59,119,0,18,109,
+0,16,10,50,0,57,59,119,0,48,46,0,18,118,0,59,120,0,18,109,0,16,10,51,0,57,59,120,0,48,18,118,0,59,
+121,0,18,109,0,16,10,51,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,51,0,57,59,122,0,48,
+46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,119,0,48,46,0,0,0,0,1,0,0,2,3,1,0,2,12,118,0,0,1,1,
+0,15,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,0,1,0,9,2,27,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,
+1,3,2,0,9,1,99,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,99,0,0,18,98,0,0,0,4,102,
+108,111,97,116,95,97,100,100,0,18,99,0,0,18,97,0,0,18,99,0,0,0,8,18,99,0,0,0,1,0,5,2,26,1,1,0,5,97,
+0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,
+95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,
+121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,97,100,100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,
+108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,27,1,1,0,5,
+97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,
+111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,
+0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,110,101,103,97,116,101,0,18,121,0,0,18,121,0,0,0,
+4,102,108,111,97,116,95,97,100,100,0,18,120,0,0,18,120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,
+116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,21,1,1,0,5,97,0,0,1,1,0,5,98,
+0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,95,116,111,95,102,108,111,
+97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,121,0,0,18,98,
+0,0,0,4,102,108,111,97,116,95,109,117,108,116,105,112,108,121,0,18,120,0,0,18,120,0,0,18,121,0,0,0,
+4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,99,0,0,0,1,0,5,2,22,1,
+1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,3,2,0,9,1,120,0,0,1,1,121,0,0,0,3,2,0,5,1,99,0,0,0,4,105,110,116,
+95,116,111,95,102,108,111,97,116,0,18,120,0,0,18,97,0,0,0,4,105,110,116,95,116,111,95,102,108,111,
+97,116,0,18,121,0,0,18,98,0,0,0,4,102,108,111,97,116,95,100,105,118,105,100,101,0,18,120,0,0,18,
+120,0,0,18,121,0,0,0,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,99,0,0,18,120,0,0,0,8,18,
+99,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,
+18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,
+1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,
+0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,
+50,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,
+10,2,22,1,1,0,10,118,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,
+120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,11,
+117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,
+0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,
+11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,
+117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,0,0,0,1,0,11,2,21,1,1,0,11,118,0,0,1,
+1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,
+18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,
+1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,
+0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,
+0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,
+121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0,
+59,119,0,46,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,118,
+0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,
+117,0,59,122,0,47,0,18,118,0,59,119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,
+1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,
+18,117,0,59,121,0,48,0,18,118,0,59,122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59,119,
+0,48,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,
+120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,
+59,122,0,49,0,18,118,0,59,119,0,18,117,0,59,119,0,49,0,0,0,0,1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,6,
+117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,
+117,0,59,121,0,46,0,0,0,0,1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,
+18,118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,0,0,0,1,0,6,2,21,
+1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,
+48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,0,0,0,1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,6,117,0,0,0,1,
+8,58,105,118,101,99,50,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,
+121,0,49,0,0,0,0,1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,
+59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,118,0,59,122,0,18,117,
+0,59,122,0,46,0,0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,
+118,0,59,120,0,18,117,0,59,120,0,47,0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,
+18,117,0,59,122,0,47,0,0,0,0,1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,
+0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,59,
+122,0,18,117,0,59,122,0,48,0,0,0,0,1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,
+99,51,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,
+59,122,0,18,117,0,59,122,0,49,0,0,0,0,1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,
+101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,46,0,18,118,0,59,121,0,18,117,0,59,121,0,46,0,18,
+118,0,59,122,0,18,117,0,59,122,0,46,0,18,118,0,59,119,0,18,117,0,59,119,0,46,0,0,0,0,1,0,8,2,27,1,
+1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,47,
+0,18,118,0,59,121,0,18,117,0,59,121,0,47,0,18,118,0,59,122,0,18,117,0,59,122,0,47,0,18,118,0,59,
+119,0,18,117,0,59,119,0,47,0,0,0,0,1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,
+99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,48,0,18,118,0,59,121,0,18,117,0,59,121,0,48,0,18,118,0,
+59,122,0,18,117,0,59,122,0,48,0,18,118,0,59,119,0,18,117,0,59,119,0,48,0,0,0,0,1,0,8,2,22,1,1,0,8,
+118,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,18,117,0,59,120,0,49,0,18,
+118,0,59,121,0,18,117,0,59,121,0,49,0,18,118,0,59,122,0,18,117,0,59,122,0,49,0,18,118,0,59,119,0,
+18,117,0,59,119,0,49,0,0,0,0,1,0,13,2,26,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,
+0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,
+46,0,0,0,0,1,0,13,2,27,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,
+0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,
+22,1,1,0,13,109,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,110,0,16,8,
+48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,
+1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,
+0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,0,0,0,
+0,1,0,14,2,27,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,
+110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,18,109,0,16,10,50,0,57,
+18,110,0,16,10,50,0,57,47,0,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,
+116,51,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,
+0,57,49,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,
+1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,
+16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,0,18,
+109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,1,1,0,15,110,0,
+0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,
+18,110,0,16,10,49,0,57,47,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,0,18,109,0,16,10,51,0,
+57,18,110,0,16,10,51,0,57,47,0,0,0,0,1,0,15,2,22,1,1,0,15,109,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,
+116,52,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,
+0,57,49,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,0,18,109,0,16,10,51,0,57,18,110,0,16,10,
+51,0,57,49,0,0,0,0,1,0,10,2,26,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,
+117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,0,0,0,1,0,10,2,26,1,1,0,10,118,0,0,1,1,0,9,98,0,
+0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,0,0,0,1,0,
+10,2,27,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,47,0,18,
+97,0,18,117,0,59,121,0,47,0,0,0,0,1,0,10,2,27,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,
+50,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,0,0,0,1,0,10,2,21,1,1,0,9,97,0,
+0,1,1,0,10,117,0,0,0,1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,
+0,48,0,0,0,0,1,0,10,2,21,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,
+0,18,98,0,48,0,18,118,0,59,121,0,18,98,0,48,0,0,0,0,1,0,10,2,22,1,1,0,9,97,0,0,1,1,0,10,117,0,0,0,
+1,8,58,118,101,99,50,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,0,0,0,1,0,10,
+2,22,1,1,0,10,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,18,98,0,49,0,18,
+118,0,59,121,0,18,98,0,49,0,0,0,0,1,0,11,2,26,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,
+51,0,18,97,0,18,117,0,59,120,0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,
+0,0,0,1,0,11,2,26,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,
+0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,0,0,0,1,0,11,2,27,1,1,0,9,97,
+0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,47,0,18,97,0,18,117,0,59,
+121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,
+58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,
+18,98,0,47,0,0,0,0,1,0,11,2,21,1,1,0,9,97,0,0,1,1,0,11,117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,
+117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0,0,0,0,1,0,11,2,
+21,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,18,98,0,48,0,18,118,
+0,59,121,0,18,98,0,48,0,18,118,0,59,122,0,18,98,0,48,0,0,0,0,1,0,11,2,22,1,1,0,9,97,0,0,1,1,0,11,
+117,0,0,0,1,8,58,118,101,99,51,0,18,97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,
+97,0,18,117,0,59,122,0,49,0,0,0,0,1,0,11,2,22,1,1,0,11,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,
+51,0,18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,
+0,0,0,1,0,12,2,26,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,59,120,
+0,46,0,18,97,0,18,117,0,59,121,0,46,0,18,97,0,18,117,0,59,122,0,46,0,18,97,0,18,117,0,59,119,0,46,
+0,0,0,0,1,0,12,2,26,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,18,
+98,0,46,0,18,118,0,59,121,0,18,98,0,46,0,18,118,0,59,122,0,18,98,0,46,0,18,118,0,59,119,0,18,98,0,
+46,0,0,0,0,1,0,12,2,27,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,117,0,
+59,120,0,47,0,18,97,0,18,117,0,59,121,0,47,0,18,97,0,18,117,0,59,122,0,47,0,18,97,0,18,117,0,59,
+119,0,47,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,
+120,0,18,98,0,47,0,18,118,0,59,121,0,18,98,0,47,0,18,118,0,59,122,0,18,98,0,47,0,18,118,0,59,119,0,
+18,98,0,47,0,0,0,0,1,0,12,2,21,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,97,0,18,
+117,0,59,120,0,48,0,18,97,0,18,117,0,59,121,0,48,0,18,97,0,18,117,0,59,122,0,48,0,18,97,0,18,117,0,
+59,119,0,48,0,0,0,0,1,0,12,2,21,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,18,118,0,
+59,120,0,18,98,0,48,0,18,118,0,59,121,0,18,98,0,48,0,18,118,0,59,122,0,18,98,0,48,0,18,118,0,59,
+119,0,18,98,0,48,0,0,0,0,1,0,12,2,22,1,1,0,9,97,0,0,1,1,0,12,117,0,0,0,1,8,58,118,101,99,52,0,18,
+97,0,18,117,0,59,120,0,49,0,18,97,0,18,117,0,59,121,0,49,0,18,97,0,18,117,0,59,122,0,49,0,18,97,0,
+18,117,0,59,119,0,49,0,0,0,0,1,0,12,2,22,1,1,0,12,118,0,0,1,1,0,9,98,0,0,0,1,8,58,118,101,99,52,0,
+18,118,0,59,120,0,18,98,0,49,0,18,118,0,59,121,0,18,98,0,49,0,18,118,0,59,122,0,18,98,0,49,0,18,
+118,0,59,119,0,18,98,0,49,0,0,0,0,1,0,13,2,26,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,
+50,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,0,13,2,26,1,1,
+0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,
+16,10,49,0,57,18,98,0,46,0,0,0,0,1,0,13,2,27,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,
+50,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1,0,13,2,27,1,1,
+0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,
+16,10,49,0,57,18,98,0,47,0,0,0,0,1,0,13,2,21,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,
+50,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,0,0,0,1,0,13,2,21,1,1,
+0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,
+16,10,49,0,57,18,98,0,48,0,0,0,0,1,0,13,2,22,1,1,0,9,97,0,0,1,1,0,13,110,0,0,0,1,8,58,109,97,116,
+50,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,0,0,0,1,0,13,2,22,1,1,
+0,13,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,
+16,10,49,0,57,18,98,0,49,0,0,0,0,1,0,14,2,26,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,
+51,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,
+50,0,57,46,0,0,0,0,1,0,14,2,26,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,
+16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,
+0,0,0,1,0,14,2,27,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,
+48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,0,0,0,1,0,14,
+2,27,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,47,0,
+18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,0,14,2,21,1,1,0,9,
+97,0,0,1,1,0,14,110,0,0,0,1,8,58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,48,0,18,97,0,18,110,
+0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,0,0,0,1,0,14,2,21,1,1,0,14,109,0,0,1,1,0,
+9,98,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,
+0,48,0,18,109,0,16,10,50,0,57,18,98,0,48,0,0,0,0,1,0,14,2,22,1,1,0,9,97,0,0,1,1,0,14,110,0,0,0,1,8,
+58,109,97,116,51,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,97,0,
+18,110,0,16,10,50,0,57,49,0,0,0,0,1,0,14,2,22,1,1,0,14,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,
+51,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,
+18,98,0,49,0,0,0,0,1,0,15,2,26,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,
+110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,18,
+97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,0,15,2,26,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,
+116,52,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,
+0,57,18,98,0,46,0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,0,15,2,27,1,1,0,9,97,0,0,1,1,0,15,
+110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,
+47,0,18,97,0,18,110,0,16,10,50,0,57,47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1,0,15,2,27,1,1,
+0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,
+16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0,57,18,98,0,47,0,
+0,0,0,1,0,15,2,21,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,
+48,0,57,48,0,18,97,0,18,110,0,16,10,49,0,57,48,0,18,97,0,18,110,0,16,10,50,0,57,48,0,18,97,0,18,
+110,0,16,10,51,0,57,48,0,0,0,0,1,0,15,2,21,1,1,0,15,109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,
+0,18,109,0,16,8,48,0,57,18,98,0,48,0,18,109,0,16,10,49,0,57,18,98,0,48,0,18,109,0,16,10,50,0,57,18,
+98,0,48,0,18,109,0,16,10,51,0,57,18,98,0,48,0,0,0,0,1,0,15,2,22,1,1,0,9,97,0,0,1,1,0,15,110,0,0,0,
+1,8,58,109,97,116,52,0,18,97,0,18,110,0,16,8,48,0,57,49,0,18,97,0,18,110,0,16,10,49,0,57,49,0,18,
+97,0,18,110,0,16,10,50,0,57,49,0,18,97,0,18,110,0,16,10,51,0,57,49,0,0,0,0,1,0,15,2,22,1,1,0,15,
+109,0,0,1,1,0,9,98,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,18,98,0,49,0,18,109,0,16,10,
+49,0,57,18,98,0,49,0,18,109,0,16,10,50,0,57,18,98,0,49,0,18,109,0,16,10,51,0,57,18,98,0,49,0,0,0,0,
+1,0,6,2,26,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,46,0,0,
+1,0,6,2,26,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,46,0,0,
+1,0,6,2,27,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,47,0,0,
+1,0,6,2,27,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,47,0,0,
+1,0,6,2,21,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,48,0,0,
+1,0,6,2,21,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,48,0,0,
+1,0,6,2,22,1,1,0,5,97,0,0,1,1,0,6,117,0,0,0,1,8,58,105,118,101,99,50,0,18,97,0,0,0,18,117,0,49,0,0,
+1,0,6,2,22,1,1,0,6,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,50,0,18,98,0,0,0,49,0,0,
+1,0,7,2,26,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,46,0,0,
+1,0,7,2,26,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,46,0,0,
+1,0,7,2,27,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,47,0,0,
+1,0,7,2,27,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,47,0,0,
+1,0,7,2,21,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,48,0,0,
+1,0,7,2,21,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,48,0,0,
+1,0,7,2,22,1,1,0,5,97,0,0,1,1,0,7,117,0,0,0,1,8,58,105,118,101,99,51,0,18,97,0,0,0,18,117,0,49,0,0,
+1,0,7,2,22,1,1,0,7,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,51,0,18,98,0,0,0,49,0,0,
+1,0,8,2,26,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,46,0,0,
+1,0,8,2,26,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,46,0,0,
+1,0,8,2,27,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,47,0,0,
+1,0,8,2,27,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,47,0,0,
+1,0,8,2,21,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,48,0,0,
+1,0,8,2,21,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,48,0,0,
+1,0,8,2,22,1,1,0,5,97,0,0,1,1,0,8,117,0,0,0,1,8,58,105,118,101,99,52,0,18,97,0,0,0,18,117,0,49,0,0,
+1,0,8,2,22,1,1,0,8,118,0,0,1,1,0,5,98,0,0,0,1,8,18,118,0,58,105,118,101,99,52,0,18,98,0,0,0,49,0,0,
+1,0,10,2,27,1,1,0,10,118,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,
+0,0,0,0,1,0,11,2,27,1,1,0,11,118,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,
+121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,12,2,27,1,1,0,12,118,0,0,0,1,8,58,118,101,99,52,0,18,
+118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,
+6,2,27,1,1,0,6,118,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,
+0,0,0,1,0,7,2,27,1,1,0,7,118,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,54,0,18,118,0,59,
+121,0,54,0,18,118,0,59,122,0,54,0,0,0,0,1,0,8,2,27,1,1,0,8,118,0,0,0,1,8,58,105,118,101,99,52,0,18,
+118,0,59,120,0,54,0,18,118,0,59,121,0,54,0,18,118,0,59,122,0,54,0,18,118,0,59,119,0,54,0,0,0,0,1,0,
+13,2,27,1,1,0,13,109,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,
+57,54,0,0,0,0,1,0,14,2,27,1,1,0,14,109,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,54,0,18,
+109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,0,0,0,1,0,15,2,27,1,1,0,15,109,0,0,0,1,8,58,
+109,97,116,52,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,
+18,109,0,16,10,51,0,57,54,0,0,0,0,1,0,0,2,25,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,22,0,0,1,
+0,0,2,25,1,0,2,5,97,0,0,0,1,9,18,97,0,16,10,49,0,22,0,0,1,0,0,2,25,1,0,2,10,118,0,0,0,1,9,18,118,0,
+59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,52,0,
+9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,12,118,0,0,0,1,9,18,118,0,59,
+120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,0,59,119,0,52,0,0,1,0,0,2,25,
+1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,0,1,0,0,2,25,1,0,2,7,118,0,0,
+0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,0,1,0,0,2,25,1,0,2,
+8,118,0,0,0,1,9,18,118,0,59,120,0,52,0,9,18,118,0,59,121,0,52,0,9,18,118,0,59,122,0,52,0,9,18,118,
+0,59,119,0,52,0,0,1,0,0,2,25,1,0,2,13,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,
+0,57,52,0,0,1,0,0,2,25,1,0,2,14,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,
+52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,0,0,2,25,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,
+9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0,0,1,0,0,
+2,24,1,0,2,9,97,0,0,0,1,9,18,97,0,17,49,0,48,0,0,21,0,0,1,0,0,2,24,1,0,2,5,97,0,0,0,1,9,18,97,0,16,
+10,49,0,21,0,0,1,0,0,2,24,1,0,2,10,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,0,
+1,0,0,2,24,1,0,2,11,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,18,118,0,59,
+122,0,51,0,0,1,0,0,2,24,1,0,2,12,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,0,59,121,0,51,0,9,
+18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,6,118,0,0,0,1,9,18,118,0,59,120,
+0,51,0,9,18,118,0,59,121,0,51,0,0,1,0,0,2,24,1,0,2,7,118,0,0,0,1,9,18,118,0,59,120,0,51,0,9,18,118,
+0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,0,1,0,0,2,24,1,0,2,8,118,0,0,0,1,9,18,118,0,59,120,0,51,0,
+9,18,118,0,59,121,0,51,0,9,18,118,0,59,122,0,51,0,9,18,118,0,59,119,0,51,0,0,1,0,0,2,24,1,0,2,13,
+109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,0,0,2,24,1,0,2,14,109,0,
+0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,0,1,
+0,0,2,24,1,0,2,15,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,
+0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,1,0,9,2,25,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,
+0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,5,2,25,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,
+2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,52,0,8,18,98,0,0,0,1,0,10,2,25,1,0,2,10,118,0,0,1,1,0,5,0,0,0,
+1,8,58,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,0,0,0,1,0,11,2,25,1,0,2,11,
+118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,
+0,59,122,0,61,0,0,0,0,1,0,12,2,25,1,0,2,12,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,
+59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,118,0,59,119,0,61,0,0,0,0,1,0,6,2,
+25,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,18,118,0,59,120,0,61,0,18,118,0,59,121,
+0,61,0,0,0,0,1,0,7,2,25,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,51,0,18,118,0,59,120,0,
+61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,0,0,0,1,0,8,2,25,1,0,2,8,118,0,0,1,1,0,5,0,0,0,
+1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,61,0,18,118,0,59,121,0,61,0,18,118,0,59,122,0,61,0,18,
+118,0,59,119,0,61,0,0,0,0,1,0,13,2,25,1,0,2,13,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,
+0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,0,0,0,1,0,14,2,25,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,
+8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,
+61,0,0,0,0,1,0,15,2,25,1,0,2,15,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,
+61,0,18,109,0,16,10,49,0,57,61,0,18,109,0,16,10,50,0,57,61,0,18,109,0,16,10,51,0,57,61,0,0,0,0,1,0,
+9,2,24,1,0,2,9,97,0,0,1,1,0,5,0,0,0,1,3,2,0,9,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,1,
+0,5,2,24,1,0,2,5,97,0,0,1,1,0,5,0,0,0,1,3,2,0,5,1,98,0,2,18,97,0,0,0,9,18,97,0,51,0,8,18,98,0,0,0,
+1,0,10,2,24,1,0,2,10,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,50,0,18,118,0,59,120,0,60,0,18,118,0,
+59,121,0,60,0,0,0,0,1,0,11,2,24,1,0,2,11,118,0,0,1,1,0,5,0,0,0,1,8,58,118,101,99,51,0,18,118,0,59,
+120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,1,0,12,2,24,1,0,2,12,118,0,0,1,1,0,
+5,0,0,0,1,8,58,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,
+0,18,118,0,59,119,0,60,0,0,0,0,1,0,6,2,24,1,0,2,6,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,50,0,
+18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,0,0,0,1,0,7,2,24,1,0,2,7,118,0,0,1,1,0,5,0,0,0,1,8,
+58,105,118,101,99,51,0,18,118,0,59,120,0,60,0,18,118,0,59,121,0,60,0,18,118,0,59,122,0,60,0,0,0,0,
+1,0,8,2,24,1,0,2,8,118,0,0,1,1,0,5,0,0,0,1,8,58,105,118,101,99,52,0,18,118,0,59,120,0,60,0,18,118,
+0,59,121,0,60,0,18,118,0,59,122,0,60,0,18,118,0,59,119,0,60,0,0,0,0,1,0,13,2,24,1,0,2,13,109,0,0,1,
+1,0,5,0,0,0,1,8,58,109,97,116,50,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,0,0,0,1,
+0,14,2,24,1,0,2,14,109,0,0,1,1,0,5,0,0,0,1,8,58,109,97,116,51,0,18,109,0,16,8,48,0,57,60,0,18,109,
+0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,57,60,0,0,0,0,1,0,15,2,24,1,0,2,15,109,0,0,1,1,0,5,0,0,0,
+1,8,58,109,97,116,52,0,18,109,0,16,8,48,0,57,60,0,18,109,0,16,10,49,0,57,60,0,18,109,0,16,10,50,0,
+57,60,0,18,109,0,16,10,51,0,57,60,0,0,0,0,1,0,1,2,15,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,
+99,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,99,0,0,18,97,0,0,18,98,0,0,0,8,18,99,0,0,0,1,
+0,1,2,15,1,1,0,5,97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,
+116,0,18,98,0,0,0,40,0,0,1,0,1,2,16,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,99,0,0,0,4,102,108,
+111,97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,0,1,2,16,1,1,0,5,
+97,0,0,1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,
+0,41,0,0,1,0,1,2,18,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,
+111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,18,97,0,0,0,4,102,108,111,97,116,95,101,113,
+117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,18,1,1,0,5,97,0,0,
+1,1,0,5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,43,0,
+0,1,0,1,2,17,1,1,0,9,97,0,0,1,1,0,9,98,0,0,0,1,3,2,0,1,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,
+116,95,108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,
+108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,0,1,2,17,1,1,0,5,97,0,0,1,1,0,
+5,98,0,0,0,1,8,58,102,108,111,97,116,0,18,97,0,0,0,58,102,108,111,97,116,0,18,98,0,0,0,42,0,0,1,0,
+1,2,11,1,1,0,1,97,0,0,1,1,0,1,98,0,0,0,1,8,18,97,0,18,98,0,39,0,0,1,0,1,2,29,1,1,0,1,97,0,0,0,1,8,
+18,97,0,15,2,48,0,38,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,9,102,0,0,0,1,4,102,108,111,97,116,95,
+112,114,105,110,116,0,18,102,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,5,105,0,0,0,1,4,105,110,
+116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,1,98,0,0,0,1,4,98,
+111,111,108,95,112,114,105,110,116,0,18,98,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,10,118,0,0,
+0,1,9,58,112,114,105,110,116,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,0,18,118,0,59,121,
+0,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,11,118,0,0,0,1,9,58,112,114,105,110,116,0,18,118,0,
+59,120,0,0,0,0,9,58,112,114,105,110,116,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,0,18,
+118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,12,118,0,0,0,1,9,58,112,114,105,110,116,
+0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,
+116,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,
+105,110,116,0,1,1,0,6,118,0,0,0,1,9,58,112,114,105,110,116,0,18,118,0,59,120,0,0,0,0,9,58,112,114,
+105,110,116,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,7,118,0,0,0,1,9,58,112,
+114,105,110,116,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,0,18,118,0,59,121,0,0,0,0,9,58,
+112,114,105,110,116,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,8,118,0,0,0,1,
+9,58,112,114,105,110,116,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,0,18,118,0,59,121,0,0,
+0,0,9,58,112,114,105,110,116,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,0,18,118,0,59,119,
+0,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,2,118,0,0,0,1,9,58,112,114,105,110,116,0,18,118,0,59,
+120,0,0,0,0,9,58,112,114,105,110,116,0,18,118,0,59,121,0,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,
+0,3,118,0,0,0,1,9,58,112,114,105,110,116,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,0,18,
+118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,0,18,118,0,59,122,0,0,0,0,0,1,0,0,0,112,114,105,110,
+116,0,1,1,0,4,118,0,0,0,1,9,58,112,114,105,110,116,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,
+116,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,
+110,116,0,18,118,0,59,119,0,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,13,109,0,0,0,1,9,58,112,
+114,105,110,116,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,0,18,109,0,16,10,49,0,57,0,
+0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,14,109,0,0,0,1,9,58,112,114,105,110,116,0,18,109,0,16,8,
+48,0,57,0,0,0,9,58,112,114,105,110,116,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,0,
+18,109,0,16,10,50,0,57,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,15,109,0,0,0,1,9,58,112,114,105,
+110,116,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,0,18,109,0,16,10,49,0,57,0,0,0,9,58,
+112,114,105,110,116,0,18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,0,18,109,0,16,10,51,0,
+57,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,16,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,
+0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,17,101,0,0,0,1,4,105,110,116,95,112,114,105,
+110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,18,101,0,0,0,1,4,105,110,116,95,112,
+114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,19,101,0,0,0,1,4,105,110,116,
+95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,20,101,0,0,0,1,4,105,
+110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,0,0,0,112,114,105,110,116,0,1,1,0,21,101,0,0,0,1,
+4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,0
diff --git a/src/mesa/shader/slang/library/slang_fragment_builtin.gc b/src/mesa/shader/slang/library/slang_fragment_builtin.gc
index 12a18ee792..373b42de1d 100755
--- a/src/mesa/shader/slang/library/slang_fragment_builtin.gc
+++ b/src/mesa/shader/slang/library/slang_fragment_builtin.gc
@@ -1,26 +1,26 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
//
// TODO:
@@ -46,67 +46,67 @@ varying float gl_FogFragCoord;
// 8.7 Texture Lookup Functions
//
-vec4 texture1D (sampler1D sampler, float coord, float bias) {
- vec4 texel;
- __asm vec4_tex1d texel, sampler, coord, bias;
+vec4 texture1D (sampler1D sampler, float coord, float bias) {
+ vec4 texel;
+ __asm vec4_tex1d texel, sampler, coord, bias;
return texel;
-}
+}
vec4 texture1DProj (sampler1D sampler, vec2 coord, float bias) {
return texture1D (sampler, coord.s / coord.t, bias);
-}
+}
vec4 texture1DProj (sampler1D sampler, vec4 coord, float bias) {
return texture1D (sampler, coord.s / coord.q, bias);
}
-vec4 texture2D (sampler2D sampler, vec2 coord, float bias) {
- vec4 texel;
- __asm vec4_tex2d texel, sampler, coord, bias;
+vec4 texture2D (sampler2D sampler, vec2 coord, float bias) {
+ vec4 texel;
+ __asm vec4_tex2d texel, sampler, coord, bias;
return texel;
-}
+}
-vec4 texture2DProj (sampler2D sampler, vec3 coord, float bias) {
+vec4 texture2DProj (sampler2D sampler, vec3 coord, float bias) {
return texture2D (sampler, vec2 (coord.s / coord.p, coord.t / coord.p), bias);
-}
+}
-vec4 texture2DProj (sampler2D sampler, vec4 coord, float bias) {
+vec4 texture2DProj (sampler2D sampler, vec4 coord, float bias) {
return texture2D (sampler, vec2 (coord.s / coord.q, coord.t / coord.q), bias);
}
-vec4 texture3D (sampler3D sampler, vec3 coord, float bias) {
- vec4 texel;
- __asm vec4_tex3d texel, sampler, coord, bias;
+vec4 texture3D (sampler3D sampler, vec3 coord, float bias) {
+ vec4 texel;
+ __asm vec4_tex3d texel, sampler, coord, bias;
return texel;
-}
+}
-vec4 texture3DProj (sampler3D sampler, vec4 coord, float bias) {
+vec4 texture3DProj (sampler3D sampler, vec4 coord, float bias) {
return texture3D (sampler, vec3 (coord.s / coord.q, coord.t / coord.q, coord.p / coord.q), bias);
}
-vec4 textureCube (samplerCube sampler, vec3 coord, float bias) {
- vec4 texel;
- __asm vec4_texcube texel, sampler, coord, bias;
+vec4 textureCube (samplerCube sampler, vec3 coord, float bias) {
+ vec4 texel;
+ __asm vec4_texcube texel, sampler, coord, bias;
return texel;
}
-vec4 shadow1D (sampler1DShadow sampler, vec3 coord, float bias) {
- vec4 texel;
- __asm vec4_shad1d texel, sampler, coord, bias;
+vec4 shadow1D (sampler1DShadow sampler, vec3 coord, float bias) {
+ vec4 texel;
+ __asm vec4_shad1d texel, sampler, coord, bias;
return texel;
-}
-
-vec4 shadow1DProj (sampler1DShadow sampler, vec4 coord, float bias) {
- return shadow1D (sampler, vec3 (coord.s / coord.q, 0.0, coord.p / coord.q), bias);
-}
-
-vec4 shadow2D (sampler2DShadow sampler, vec3 coord, float bias) {
- vec4 texel;
- __asm vec4_shad2d texel, sampler, coord, bias;
+}
+
+vec4 shadow1DProj (sampler1DShadow sampler, vec4 coord, float bias) {
+ return shadow1D (sampler, vec3 (coord.s / coord.q, 0.0, coord.p / coord.q), bias);
+}
+
+vec4 shadow2D (sampler2DShadow sampler, vec3 coord, float bias) {
+ vec4 texel;
+ __asm vec4_shad2d texel, sampler, coord, bias;
return texel;
-}
+}
-vec4 shadow2DProj (sampler2DShadow sampler, vec4 coord, float bias) {
+vec4 shadow2DProj (sampler2DShadow sampler, vec4 coord, float bias) {
return shadow2D (sampler, vec3 (coord.s / coord.q, coord.t / coord.q, coord.p / coord.q), bias);
}
@@ -114,57 +114,57 @@ vec4 shadow2DProj (sampler2DShadow sampler, vec4 coord, float bias) {
// 8.8 Fragment Processing Functions
//
-float dFdx (float p) {
+float dFdx (float p) {
// XXX:
return 0.001;
}
-vec2 dFdx (vec2 p) {
+vec2 dFdx (vec2 p) {
// XXX:
return vec2 (0.001);
}
-vec3 dFdx (vec3 p) {
+vec3 dFdx (vec3 p) {
// XXX:
return vec3 (0.001);
}
-vec4 dFdx (vec4 p) {
+vec4 dFdx (vec4 p) {
// XXX:
return vec4 (0.001);
}
-float dFdy (float p) {
+float dFdy (float p) {
// XXX:
return 0.001;
}
-vec2 dFdy (vec2 p) {
+vec2 dFdy (vec2 p) {
// XXX:
return vec2 (0.001);
}
-vec3 dFdy (vec3 p) {
+vec3 dFdy (vec3 p) {
// XXX:
return vec3 (0.001);
}
-vec4 dFdy (vec4 p) {
+vec4 dFdy (vec4 p) {
// XXX:
return vec4 (0.001);
}
float fwidth (float p) {
return abs (dFdx (p)) + abs (dFdy (p));
-}
+}
vec2 fwidth (vec2 p) {
return abs (dFdx (p)) + abs (dFdy (p));
-}
+}
vec3 fwidth (vec3 p) {
return abs (dFdx (p)) + abs (dFdy (p));
-}
+}
vec4 fwidth (vec4 p) {
return abs (dFdx (p)) + abs (dFdy (p));
diff --git a/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h b/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h
index bfc592870f..3ec7138e41 100644
--- a/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h
+++ b/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h
@@ -1,79 +1,79 @@
-
-/* DO NOT EDIT - THIS FILE AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */
-/* slang_fragment_builtin.gc */
-
-3,2,2,6,12,1,103,108,95,70,114,97,103,67,111,111,114,100,0,0,0,2,2,6,1,1,103,108,95,70,114,111,110,
-116,70,97,99,105,110,103,0,0,0,2,2,5,12,1,103,108,95,70,114,97,103,67,111,108,111,114,0,0,0,2,2,5,
-12,1,103,108,95,70,114,97,103,68,97,116,97,0,3,18,103,108,95,77,97,120,68,114,97,119,66,117,102,
-102,101,114,115,0,0,0,2,2,5,9,1,103,108,95,70,114,97,103,68,101,112,116,104,0,0,0,2,2,3,12,1,103,
-108,95,67,111,108,111,114,0,0,0,2,2,3,12,1,103,108,95,83,101,99,111,110,100,97,114,121,67,111,108,
-111,114,0,0,0,2,2,3,12,1,103,108,95,84,101,120,67,111,111,114,100,0,3,18,103,108,95,77,97,120,84,
-101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,3,9,1,103,108,95,70,111,103,70,114,97,103,
-67,111,111,114,100,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,0,1,0,0,16,115,97,109,112,108,
-101,114,0,0,1,0,0,9,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,116,101,120,
-101,108,0,0,0,4,118,101,99,52,95,116,101,120,49,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,
-108,101,114,0,0,18,99,111,111,114,100,0,0,18,98,105,97,115,0,0,0,8,18,116,101,120,101,108,0,0,0,1,
-0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,0,0,16,115,97,109,112,108,101,114,0,0,
-1,0,0,10,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,8,58,116,101,120,116,117,114,101,49,
-68,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,
-116,0,49,0,18,98,105,97,115,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,
-1,0,0,16,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,
-0,1,8,58,116,101,120,116,117,114,101,49,68,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,
-100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,98,105,97,115,0,0,0,0,0,1,0,12,0,116,101,
-120,116,117,114,101,50,68,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,10,99,111,111,114,100,0,
-0,1,0,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,116,101,
-120,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,
-0,18,98,105,97,115,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,
-80,114,111,106,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9,
-98,105,97,115,0,0,0,1,8,58,116,101,120,116,117,114,101,50,68,0,18,115,97,109,112,108,101,114,0,0,
-58,118,101,99,50,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,112,0,49,0,18,99,
-111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,112,0,49,0,0,0,18,98,105,97,115,0,0,0,0,0,1,
-0,12,0,116,101,120,116,117,114,101,50,68,80,114,111,106,0,1,0,0,17,115,97,109,112,108,101,114,0,0,
-1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,8,58,116,101,120,116,117,114,101,50,
-68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,50,0,18,99,111,111,114,100,0,59,115,0,18,99,
-111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,
-49,0,0,0,18,98,105,97,115,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,0,1,0,0,18,115,97,
-109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,
-116,101,120,101,108,0,0,0,4,118,101,99,52,95,116,101,120,51,100,0,18,116,101,120,101,108,0,0,18,
-115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,18,98,105,97,115,0,0,0,8,18,116,101,120,
-101,108,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,80,114,111,106,0,1,0,0,18,115,97,109,112,
-108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,8,58,116,101,120,116,
-117,114,101,51,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,
-59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,111,114,
-100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,18,
-98,105,97,115,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,67,117,98,101,0,1,0,0,19,115,97,109,
-112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,116,
-101,120,101,108,0,0,0,4,118,101,99,52,95,116,101,120,99,117,98,101,0,18,116,101,120,101,108,0,0,18,
-115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,18,98,105,97,115,0,0,0,8,18,116,101,120,
-101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,
-0,11,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,
-118,101,99,52,95,115,104,97,100,49,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,
-0,0,18,99,111,111,114,100,0,0,18,98,105,97,115,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,
-104,97,100,111,119,49,68,80,114,111,106,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,
-111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,8,58,115,104,97,100,111,119,49,68,0,18,115,97,109,
-112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,
-113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0,
-0,0,18,98,105,97,115,0,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,0,1,0,0,21,115,97,109,112,108,
-101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,116,101,120,
-101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,
-112,108,101,114,0,0,18,99,111,111,114,100,0,0,18,98,105,97,115,0,0,0,8,18,116,101,120,101,108,0,0,
-0,1,0,12,0,115,104,97,100,111,119,50,68,80,114,111,106,0,1,0,0,21,115,97,109,112,108,101,114,0,0,1,
-0,0,12,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,8,58,115,104,97,100,111,119,50,68,0,18,
-115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,
-114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,
-99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,18,98,105,97,115,0,0,0,0,0,
-1,0,9,0,100,70,100,120,0,1,0,0,9,112,0,0,0,1,8,17,48,0,48,48,49,0,0,0,0,1,0,10,0,100,70,100,120,0,
-1,0,0,10,112,0,0,0,1,8,58,118,101,99,50,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,11,0,100,70,100,120,0,1,
-0,0,11,112,0,0,0,1,8,58,118,101,99,51,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,12,0,100,70,100,120,0,1,0,
-0,12,112,0,0,0,1,8,58,118,101,99,52,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,9,0,100,70,100,121,0,1,0,0,
-9,112,0,0,0,1,8,17,48,0,48,48,49,0,0,0,0,1,0,10,0,100,70,100,121,0,1,0,0,10,112,0,0,0,1,8,58,118,
-101,99,50,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,11,0,100,70,100,121,0,1,0,0,11,112,0,0,0,1,8,58,118,
-101,99,51,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,12,0,100,70,100,121,0,1,0,0,12,112,0,0,0,1,8,58,118,
-101,99,52,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,9,0,102,119,105,100,116,104,0,1,0,0,9,112,0,0,0,1,8,
-58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,
-0,0,0,46,0,0,1,0,10,0,102,119,105,100,116,104,0,1,0,0,10,112,0,0,0,1,8,58,97,98,115,0,58,100,70,
-100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,11,0,102,
-119,105,100,116,104,0,1,0,0,11,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0,
-58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,12,0,102,119,105,100,116,104,0,1,0,
-0,12,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,
-100,121,0,18,112,0,0,0,0,0,46,0,0,0
+
+/* DO NOT EDIT - THIS FILE AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */
+/* slang_fragment_builtin.gc */
+
+3,2,2,6,12,1,103,108,95,70,114,97,103,67,111,111,114,100,0,0,0,2,2,6,1,1,103,108,95,70,114,111,110,
+116,70,97,99,105,110,103,0,0,0,2,2,5,12,1,103,108,95,70,114,97,103,67,111,108,111,114,0,0,0,2,2,5,
+12,1,103,108,95,70,114,97,103,68,97,116,97,0,3,18,103,108,95,77,97,120,68,114,97,119,66,117,102,
+102,101,114,115,0,0,0,2,2,5,9,1,103,108,95,70,114,97,103,68,101,112,116,104,0,0,0,2,2,3,12,1,103,
+108,95,67,111,108,111,114,0,0,0,2,2,3,12,1,103,108,95,83,101,99,111,110,100,97,114,121,67,111,108,
+111,114,0,0,0,2,2,3,12,1,103,108,95,84,101,120,67,111,111,114,100,0,3,18,103,108,95,77,97,120,84,
+101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,3,9,1,103,108,95,70,111,103,70,114,97,103,
+67,111,111,114,100,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,0,1,0,0,16,115,97,109,112,108,
+101,114,0,0,1,0,0,9,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,116,101,120,
+101,108,0,0,0,4,118,101,99,52,95,116,101,120,49,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,
+108,101,114,0,0,18,99,111,111,114,100,0,0,18,98,105,97,115,0,0,0,8,18,116,101,120,101,108,0,0,0,1,
+0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,0,0,16,115,97,109,112,108,101,114,0,0,
+1,0,0,10,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,8,58,116,101,120,116,117,114,101,49,
+68,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,
+116,0,49,0,18,98,105,97,115,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,
+1,0,0,16,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,
+0,1,8,58,116,101,120,116,117,114,101,49,68,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,
+100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,98,105,97,115,0,0,0,0,0,1,0,12,0,116,101,
+120,116,117,114,101,50,68,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,10,99,111,111,114,100,0,
+0,1,0,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,116,101,
+120,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,
+0,18,98,105,97,115,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,
+80,114,111,106,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9,
+98,105,97,115,0,0,0,1,8,58,116,101,120,116,117,114,101,50,68,0,18,115,97,109,112,108,101,114,0,0,
+58,118,101,99,50,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,112,0,49,0,18,99,
+111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,112,0,49,0,0,0,18,98,105,97,115,0,0,0,0,0,1,
+0,12,0,116,101,120,116,117,114,101,50,68,80,114,111,106,0,1,0,0,17,115,97,109,112,108,101,114,0,0,
+1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,8,58,116,101,120,116,117,114,101,50,
+68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,50,0,18,99,111,111,114,100,0,59,115,0,18,99,
+111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,
+49,0,0,0,18,98,105,97,115,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,0,1,0,0,18,115,97,
+109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,
+116,101,120,101,108,0,0,0,4,118,101,99,52,95,116,101,120,51,100,0,18,116,101,120,101,108,0,0,18,
+115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,18,98,105,97,115,0,0,0,8,18,116,101,120,
+101,108,0,0,0,1,0,12,0,116,101,120,116,117,114,101,51,68,80,114,111,106,0,1,0,0,18,115,97,109,112,
+108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,8,58,116,101,120,116,
+117,114,101,51,68,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,
+59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,111,114,
+100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,18,
+98,105,97,115,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,67,117,98,101,0,1,0,0,19,115,97,109,
+112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,116,
+101,120,101,108,0,0,0,4,118,101,99,52,95,116,101,120,99,117,98,101,0,18,116,101,120,101,108,0,0,18,
+115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,18,98,105,97,115,0,0,0,8,18,116,101,120,
+101,108,0,0,0,1,0,12,0,115,104,97,100,111,119,49,68,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,
+0,11,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,
+118,101,99,52,95,115,104,97,100,49,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,
+0,0,18,99,111,111,114,100,0,0,18,98,105,97,115,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,
+104,97,100,111,119,49,68,80,114,111,106,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,
+111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,8,58,115,104,97,100,111,119,49,68,0,18,115,97,109,
+112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,
+113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0,
+0,0,18,98,105,97,115,0,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,0,1,0,0,21,115,97,109,112,108,
+101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,3,2,0,12,1,116,101,120,
+101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,
+112,108,101,114,0,0,18,99,111,111,114,100,0,0,18,98,105,97,115,0,0,0,8,18,116,101,120,101,108,0,0,
+0,1,0,12,0,115,104,97,100,111,119,50,68,80,114,111,106,0,1,0,0,21,115,97,109,112,108,101,114,0,0,1,
+0,0,12,99,111,111,114,100,0,0,1,0,0,9,98,105,97,115,0,0,0,1,8,58,115,104,97,100,111,119,50,68,0,18,
+115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,
+114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,
+99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,18,98,105,97,115,0,0,0,0,0,
+1,0,9,0,100,70,100,120,0,1,0,0,9,112,0,0,0,1,8,17,48,0,48,48,49,0,0,0,0,1,0,10,0,100,70,100,120,0,
+1,0,0,10,112,0,0,0,1,8,58,118,101,99,50,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,11,0,100,70,100,120,0,1,
+0,0,11,112,0,0,0,1,8,58,118,101,99,51,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,12,0,100,70,100,120,0,1,0,
+0,12,112,0,0,0,1,8,58,118,101,99,52,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,9,0,100,70,100,121,0,1,0,0,
+9,112,0,0,0,1,8,17,48,0,48,48,49,0,0,0,0,1,0,10,0,100,70,100,121,0,1,0,0,10,112,0,0,0,1,8,58,118,
+101,99,50,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,11,0,100,70,100,121,0,1,0,0,11,112,0,0,0,1,8,58,118,
+101,99,51,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,12,0,100,70,100,121,0,1,0,0,12,112,0,0,0,1,8,58,118,
+101,99,52,0,17,48,0,48,48,49,0,0,0,0,0,0,1,0,9,0,102,119,105,100,116,104,0,1,0,0,9,112,0,0,0,1,8,
+58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,
+0,0,0,46,0,0,1,0,10,0,102,119,105,100,116,104,0,1,0,0,10,112,0,0,0,1,8,58,97,98,115,0,58,100,70,
+100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,11,0,102,
+119,105,100,116,104,0,1,0,0,11,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0,
+58,97,98,115,0,58,100,70,100,121,0,18,112,0,0,0,0,0,46,0,0,1,0,12,0,102,119,105,100,116,104,0,1,0,
+0,12,112,0,0,0,1,8,58,97,98,115,0,58,100,70,100,120,0,18,112,0,0,0,0,0,58,97,98,115,0,58,100,70,
+100,121,0,18,112,0,0,0,0,0,46,0,0,0
diff --git a/src/mesa/shader/slang/library/slang_shader.syn b/src/mesa/shader/slang/library/slang_shader.syn
index 0f15353069..2f237ef7dd 100644
--- a/src/mesa/shader/slang/library/slang_shader.syn
+++ b/src/mesa/shader/slang/library/slang_shader.syn
@@ -1,1517 +1,1517 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2004-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * \file slang_shader.syn
- * slang vertex/fragment shader syntax
- * \author Michal Krol
- */
-
-/*
- * usage:
- * syn2c slang_shader.syn > slang_shader_syn.h
- *
- * when modifying or extending this file, several things must be taken into consideration:
- * - when adding new operators that were marked as reserved in the initial specification,
- * one must only uncomment particular lines of code that refer to operators being added;
- * - when adding new shader target, one must reserve new value for shader_type register and
- * use it in .if constructs for symbols that are exclusive for that shader;
- * - some symbols mimic output of other symbols - the best example is the "for" construct:
- * expression "for (foo(); ; bar())" is seen as "for (foo(); true; bar())" by the output
- * processor - hence, special care must be taken when rearranging output of essential symbols;
- * - order of single-quoted tokens does matter in alternatives - so do not parse "<" operator
- * before "<<" and "<<" before "<<=";
- * - all double-quoted tokens are internally preprocessed to eliminate problems with parsing
- * strings that are prefixes of other strings, like "sampler1D" and "sampler1DShadow";
- */
-
-.syntax translation_unit;
-
-/* revision number - increment after each change affecting emitted output */
-.emtcode REVISION 3
-
-/* external declaration */
-.emtcode EXTERNAL_NULL 0
-.emtcode EXTERNAL_FUNCTION_DEFINITION 1
-.emtcode EXTERNAL_DECLARATION 2
-
-/* declaration */
-.emtcode DECLARATION_FUNCTION_PROTOTYPE 1
-.emtcode DECLARATION_INIT_DECLARATOR_LIST 2
-
-/* function type */
-.emtcode FUNCTION_ORDINARY 0
-.emtcode FUNCTION_CONSTRUCTOR 1
-.emtcode FUNCTION_OPERATOR 2
-
-/* operator type */
-.emtcode OPERATOR_ADDASSIGN 1
-.emtcode OPERATOR_SUBASSIGN 2
-.emtcode OPERATOR_MULASSIGN 3
-.emtcode OPERATOR_DIVASSIGN 4
-/*.emtcode OPERATOR_MODASSIGN 5*/
-/*.emtcode OPERATOR_LSHASSIGN 6*/
-/*.emtcode OPERATOR_RSHASSIGN 7*/
-/*.emtcode OPERATOR_ORASSIGN 8*/
-/*.emtcode OPERATOR_XORASSIGN 9*/
-/*.emtcode OPERATOR_ANDASSIGN 10*/
-.emtcode OPERATOR_LOGICALXOR 11
-/*.emtcode OPERATOR_BITOR 12*/
-/*.emtcode OPERATOR_BITXOR 13*/
-/*.emtcode OPERATOR_BITAND 14*/
-.emtcode OPERATOR_LESS 15
-.emtcode OPERATOR_GREATER 16
-.emtcode OPERATOR_LESSEQUAL 17
-.emtcode OPERATOR_GREATEREQUAL 18
-/*.emtcode OPERATOR_LSHIFT 19*/
-/*.emtcode OPERATOR_RSHIFT 20*/
-.emtcode OPERATOR_MULTIPLY 21
-.emtcode OPERATOR_DIVIDE 22
-/*.emtcode OPERATOR_MODULUS 23*/
-.emtcode OPERATOR_INCREMENT 24
-.emtcode OPERATOR_DECREMENT 25
-.emtcode OPERATOR_PLUS 26
-.emtcode OPERATOR_MINUS 27
-/*.emtcode OPERATOR_COMPLEMENT 28*/
-.emtcode OPERATOR_NOT 29
-
-/* init declarator list */
-.emtcode DECLARATOR_NONE 0
-.emtcode DECLARATOR_NEXT 1
-
-/* variable declaration */
-.emtcode VARIABLE_NONE 0
-.emtcode VARIABLE_IDENTIFIER 1
-.emtcode VARIABLE_INITIALIZER 2
-.emtcode VARIABLE_ARRAY_EXPLICIT 3
-.emtcode VARIABLE_ARRAY_UNKNOWN 4
-
-/* type qualifier */
-.emtcode TYPE_QUALIFIER_NONE 0
-.emtcode TYPE_QUALIFIER_CONST 1
-.emtcode TYPE_QUALIFIER_ATTRIBUTE 2
-.emtcode TYPE_QUALIFIER_VARYING 3
-.emtcode TYPE_QUALIFIER_UNIFORM 4
-.emtcode TYPE_QUALIFIER_FIXEDOUTPUT 5
-.emtcode TYPE_QUALIFIER_FIXEDINPUT 6
-
-/* type specifier */
-.emtcode TYPE_SPECIFIER_VOID 0
-.emtcode TYPE_SPECIFIER_BOOL 1
-.emtcode TYPE_SPECIFIER_BVEC2 2
-.emtcode TYPE_SPECIFIER_BVEC3 3
-.emtcode TYPE_SPECIFIER_BVEC4 4
-.emtcode TYPE_SPECIFIER_INT 5
-.emtcode TYPE_SPECIFIER_IVEC2 6
-.emtcode TYPE_SPECIFIER_IVEC3 7
-.emtcode TYPE_SPECIFIER_IVEC4 8
-.emtcode TYPE_SPECIFIER_FLOAT 9
-.emtcode TYPE_SPECIFIER_VEC2 10
-.emtcode TYPE_SPECIFIER_VEC3 11
-.emtcode TYPE_SPECIFIER_VEC4 12
-.emtcode TYPE_SPECIFIER_MAT2 13
-.emtcode TYPE_SPECIFIER_MAT3 14
-.emtcode TYPE_SPECIFIER_MAT4 15
-.emtcode TYPE_SPECIFIER_SAMPLER1D 16
-.emtcode TYPE_SPECIFIER_SAMPLER2D 17
-.emtcode TYPE_SPECIFIER_SAMPLER3D 18
-.emtcode TYPE_SPECIFIER_SAMPLERCUBE 19
-.emtcode TYPE_SPECIFIER_SAMPLER1DSHADOW 20
-.emtcode TYPE_SPECIFIER_SAMPLER2DSHADOW 21
-.emtcode TYPE_SPECIFIER_STRUCT 22
-.emtcode TYPE_SPECIFIER_TYPENAME 23
-
-/* structure field */
-.emtcode FIELD_NONE 0
-.emtcode FIELD_NEXT 1
-.emtcode FIELD_ARRAY 2
-
-/* operation */
-.emtcode OP_END 0
-.emtcode OP_BLOCK_BEGIN_NO_NEW_SCOPE 1
-.emtcode OP_BLOCK_BEGIN_NEW_SCOPE 2
-.emtcode OP_DECLARE 3
-.emtcode OP_ASM 4
-.emtcode OP_BREAK 5
-.emtcode OP_CONTINUE 6
-.emtcode OP_DISCARD 7
-.emtcode OP_RETURN 8
-.emtcode OP_EXPRESSION 9
-.emtcode OP_IF 10
-.emtcode OP_WHILE 11
-.emtcode OP_DO 12
-.emtcode OP_FOR 13
-.emtcode OP_PUSH_VOID 14
-.emtcode OP_PUSH_BOOL 15
-.emtcode OP_PUSH_INT 16
-.emtcode OP_PUSH_FLOAT 17
-.emtcode OP_PUSH_IDENTIFIER 18
-.emtcode OP_SEQUENCE 19
-.emtcode OP_ASSIGN 20
-.emtcode OP_ADDASSIGN 21
-.emtcode OP_SUBASSIGN 22
-.emtcode OP_MULASSIGN 23
-.emtcode OP_DIVASSIGN 24
-/*.emtcode OP_MODASSIGN 25*/
-/*.emtcode OP_LSHASSIGN 26*/
-/*.emtcode OP_RSHASSIGN 27*/
-/*.emtcode OP_ORASSIGN 28*/
-/*.emtcode OP_XORASSIGN 29*/
-/*.emtcode OP_ANDASSIGN 30*/
-.emtcode OP_SELECT 31
-.emtcode OP_LOGICALOR 32
-.emtcode OP_LOGICALXOR 33
-.emtcode OP_LOGICALAND 34
-/*.emtcode OP_BITOR 35*/
-/*.emtcode OP_BITXOR 36*/
-/*.emtcode OP_BITAND 37*/
-.emtcode OP_EQUAL 38
-.emtcode OP_NOTEQUAL 39
-.emtcode OP_LESS 40
-.emtcode OP_GREATER 41
-.emtcode OP_LESSEQUAL 42
-.emtcode OP_GREATEREQUAL 43
-/*.emtcode OP_LSHIFT 44*/
-/*.emtcode OP_RSHIFT 45*/
-.emtcode OP_ADD 46
-.emtcode OP_SUBTRACT 47
-.emtcode OP_MULTIPLY 48
-.emtcode OP_DIVIDE 49
-/*.emtcode OP_MODULUS 50*/
-.emtcode OP_PREINCREMENT 51
-.emtcode OP_PREDECREMENT 52
-.emtcode OP_PLUS 53
-.emtcode OP_MINUS 54
-/*.emtcode OP_COMPLEMENT 55*/
-.emtcode OP_NOT 56
-.emtcode OP_SUBSCRIPT 57
-.emtcode OP_CALL 58
-.emtcode OP_FIELD 59
-.emtcode OP_POSTINCREMENT 60
-.emtcode OP_POSTDECREMENT 61
-
-/* parameter qualifier */
-.emtcode PARAM_QUALIFIER_IN 0
-.emtcode PARAM_QUALIFIER_OUT 1
-.emtcode PARAM_QUALIFIER_INOUT 2
-
-/* function parameter */
-.emtcode PARAMETER_NONE 0
-.emtcode PARAMETER_NEXT 1
-
-/* function parameter array presence */
-.emtcode PARAMETER_ARRAY_NOT_PRESENT 0
-.emtcode PARAMETER_ARRAY_PRESENT 1
-
-.errtext INVALID_EXTERNAL_DECLARATION "error 2001: invalid external declaration"
-.errtext INVALID_OPERATOR_OVERRIDE "error 2002: invalid operator override"
-.errtext LBRACE_EXPECTED "error 2003: '{' expected but '$err_token$' found"
-.errtext LPAREN_EXPECTED "error 2004: '(' expected but '$err_token$' found"
-.errtext RPAREN_EXPECTED "error 2005: ')' expected but '$err_token$' found"
-
-/* tells whether the shader that is being parsed is a built-in shader or not */
-/* 0 - normal behaviour */
-/* 1 - accepts constructor and operator definitions and __asm statements */
-/* the implementation will set it to 1 when compiling internal built-in shaders */
-.regbyte parsing_builtin 0
-
-/* holds the type of the shader being parsed; possible values are listed below */
-/* FRAGMENT_SHADER 1 */
-/* VERTEX_SHADER 2 */
-/* shader type is set by the caller before parsing */
-.regbyte shader_type 0
-
-/*
- <variable_identifier> ::= <identifier>
-*/
-variable_identifier
- identifier .emit OP_PUSH_IDENTIFIER;
-
-/*
- <primary_expression> ::= <variable_identifier>
- | <intconstant>
- | <floatconstant>
- | <boolconstant>
- | "(" <expression> ")"
-*/
-primary_expression
- floatconstant .or boolconstant .or intconstant .or variable_identifier .or primary_expression_1;
-primary_expression_1
- lparen .and expression .and rparen;
-
-/*
- <postfix_expression> ::= <primary_expression>
- | <postfix_expression> "[" <integer_expression> "]"
- | <function_call>
- | <postfix_expression> "." <field_selection>
- | <postfix_expression> "++"
- | <postfix_expression> "--"
-*/
-postfix_expression
- postfix_expression_1 .and .loop postfix_expression_2;
-postfix_expression_1
- function_call .or primary_expression;
-postfix_expression_2
- postfix_expression_3 .or postfix_expression_4 .or
- plusplus .emit OP_POSTINCREMENT .or
- minusminus .emit OP_POSTDECREMENT;
-postfix_expression_3
- lbracket .and integer_expression .and rbracket .emit OP_SUBSCRIPT;
-postfix_expression_4
- dot .and field_selection .emit OP_FIELD;
-
-/*
- <integer_expression> ::= <expression>
-*/
-integer_expression
- expression;
-
-/*
- <function_call> ::= <function_call_generic>
-*/
-function_call
- function_call_generic .emit OP_CALL .and .true .emit OP_END;
-
-/*
- <function_call_generic> ::= <function_call_header_with_parameters> ")"
- | <function_call_header_no_parameters> ")"
-*/
-function_call_generic
- function_call_generic_1 .or function_call_generic_2;
-function_call_generic_1
- function_call_header_with_parameters .and rparen .error RPAREN_EXPECTED;
-function_call_generic_2
- function_call_header_no_parameters .and rparen .error RPAREN_EXPECTED;
-
-/*
- <function_call_header_no_parameters>::= <function_call_header> "void"
- | <function_call_header>
-*/
-function_call_header_no_parameters
- function_call_header .and function_call_header_no_parameters_1;
-function_call_header_no_parameters_1
- "void" .or .true;
-
-/*
- <function_call_header_with_parameters>::= <function_call_header> <assignment_expression>
- | <function_call_header_with_parameters> ","
- <assignment_expression>
-*/
-function_call_header_with_parameters
- function_call_header .and assignment_expression .and .true .emit OP_END .and
- .loop function_call_header_with_parameters_1;
-function_call_header_with_parameters_1
- comma .and assignment_expression .and .true .emit OP_END;
-
-/*
- <function_call_header> ::= <function_identifier> "("
-*/
-function_call_header
- function_identifier .and lparen;
-
-/*
- <function_identifier> ::= <constructor_identifier>
- | <identifier>
-
-note: <constructor_identifier> has been deleted
-*/
-function_identifier
- identifier;
-
-/*
- <unary_expression> ::= <postfix_expression>
- | "++" <unary_expression>
- | "--" <unary_expression>
- | <unary_operator> <unary_expression>
-
- <unary_operator> ::= "+"
- | "-"
- | "!"
- | "~" // reserved
-*/
-unary_expression
- postfix_expression .or unary_expression_1 .or unary_expression_2 .or unary_expression_3 .or
- unary_expression_4 .or unary_expression_5/* .or unary_expression_6*/;
-unary_expression_1
- plusplus .and unary_expression .and .true .emit OP_PREINCREMENT;
-unary_expression_2
- minusminus .and unary_expression .and .true .emit OP_PREDECREMENT;
-unary_expression_3
- plus .and unary_expression .and .true .emit OP_PLUS;
-unary_expression_4
- minus .and unary_expression .and .true .emit OP_MINUS;
-unary_expression_5
- bang .and unary_expression .and .true .emit OP_NOT;
-/*unary_expression_6
- tilde .and unary_expression .and .true .emit OP_COMPLEMENT;*/
-
-/*
- <multiplicative_expression> ::= <unary_expression>
- | <multiplicative_expression> "*" <unary_expression>
- | <multiplicative_expression> "/" <unary_expression>
- | <multiplicative_expression> "%" <unary_expression> // reserved
-*/
-multiplicative_expression
- unary_expression .and .loop multiplicative_expression_1;
-multiplicative_expression_1
- multiplicative_expression_2 .or multiplicative_expression_3/* .or multiplicative_expression_4*/;
-multiplicative_expression_2
- star .and unary_expression .and .true .emit OP_MULTIPLY;
-multiplicative_expression_3
- slash .and unary_expression .and .true .emit OP_DIVIDE;
-/*multiplicative_expression_4
- percent .and unary_expression .and .true .emit OP_MODULUS;*/
-
-/*
- <additive_expression> ::= <multiplicative_expression>
- | <additive_expression> "+" <multiplicative_expression>
- | <additive_expression> "-" <multiplicative_expression>
-*/
-additive_expression
- multiplicative_expression .and .loop additive_expression_1;
-additive_expression_1
- additive_expression_2 .or additive_expression_3;
-additive_expression_2
- plus .and multiplicative_expression .and .true .emit OP_ADD;
-additive_expression_3
- minus .and multiplicative_expression .and .true .emit OP_SUBTRACT;
-
-/*
- <shift_expression> ::= <additive_expression>
- | <shift_expression> "<<" <additive_expression> // reserved
- | <shift_expression> ">>" <additive_expression> // reserved
-*/
-shift_expression
- additive_expression/* .and .loop shift_expression_1*/;
-/*shift_expression_1
- shift_expression_2 .or shift_expression_3;*/
-/*shift_expression_2
- lessless .and additive_expression .and .true .emit OP_LSHIFT;*/
-/*shift_expression_3
- greatergreater .and additive_expression .and .true .emit OP_RSHIFT;*/
-
-/*
- <relational_expression> ::= <shift_expression>
- | <relational_expression> "<" <shift_expression>
- | <relational_expression> ">" <shift_expression>
- | <relational_expression> "<=" <shift_expression>
- | <relational_expression> ">=" <shift_expression>
-*/
-relational_expression
- shift_expression .and .loop relational_expression_1;
-relational_expression_1
- relational_expression_2 .or relational_expression_3 .or relational_expression_4 .or
- relational_expression_5;
-relational_expression_2
- lessequals .and shift_expression .and .true .emit OP_LESSEQUAL;
-relational_expression_3
- greaterequals .and shift_expression .and .true .emit OP_GREATEREQUAL;
-relational_expression_4
- less .and shift_expression .and .true .emit OP_LESS;
-relational_expression_5
- greater .and shift_expression .and .true .emit OP_GREATER;
-
-/*
- <equality_expression> ::= <relational_expression>
- | <equality_expression> "==" <relational_expression>
- | <equality_expression> "!=" <relational_expression>
-*/
-equality_expression
- relational_expression .and .loop equality_expression_1;
-equality_expression_1
- equality_expression_2 .or equality_expression_3;
-equality_expression_2
- equalsequals .and relational_expression .and .true .emit OP_EQUAL;
-equality_expression_3
- bangequals .and relational_expression .and .true .emit OP_NOTEQUAL;
-
-/*
- <and_expression> ::= <equality_expression>
- | <and_expression> "&" <equality_expression> // reserved
-*/
-and_expression
- equality_expression/* .and .loop and_expression_1*/;
-/*and_expression_1
- ampersand .and equality_expression .and .true .emit OP_BITAND;*/
-
-/*
- <exclusive_or_expression> ::= <and_expression>
- | <exclusive_or_expression> "^" <and_expression> // reserved
-*/
-exclusive_or_expression
- and_expression/* .and .loop exclusive_or_expression_1*/;
-/*exclusive_or_expression_1
- caret .and and_expression .and .true .emit OP_BITXOR;*/
-
-/*
- <inclusive_or_expression> ::= <exclusive_or_expression>
- | <inclusive_or_expression> "|" <exclusive_or_expression> // reserved
-*/
-inclusive_or_expression
- exclusive_or_expression/* .and .loop inclusive_or_expression_1*/;
-/*inclusive_or_expression_1
- bar .and exclusive_or_expression .and .true .emit OP_BITOR;*/
-
-/*
- <logical_and_expression> ::= <inclusive_or_expression>
- | <logical_and_expression> "&&" <inclusive_or_expression>
-*/
-logical_and_expression
- inclusive_or_expression .and .loop logical_and_expression_1;
-logical_and_expression_1
- ampersandampersand .and inclusive_or_expression .and .true .emit OP_LOGICALAND;
-
-/*
- <logical_xor_expression> ::= <logical_and_expression>
- | <logical_xor_expression> "^^" <logical_and_expression>
-*/
-logical_xor_expression
- logical_and_expression .and .loop logical_xor_expression_1;
-logical_xor_expression_1
- caretcaret .and logical_and_expression .and .true .emit OP_LOGICALXOR;
-
-/*
- <logical_or_expression> ::= <logical_xor_expression>
- | <logical_or_expression> "||" <logical_xor_expression>
-*/
-logical_or_expression
- logical_xor_expression .and .loop logical_or_expression_1;
-logical_or_expression_1
- barbar .and logical_xor_expression .and .true .emit OP_LOGICALOR;
-
-/*
- <conditional_expression> ::= <logical_or_expression>
- | <logical_or_expression> "?" <expression> ":"
- <conditional_expression>
-*/
-conditional_expression
- logical_or_expression .and .loop conditional_expression_1;
-conditional_expression_1
- question .and expression .and colon .and conditional_expression .and .true .emit OP_SELECT;
-
-/*
- <assignment_expression> ::= <conditional_expression>
- | <unary_expression> <assignment_operator>
- <assignment_expression>
-
- <assignment_operator> ::= "="
- | "*="
- | "/="
- | "+="
- | "-="
- | "%=" // reserved
- | "<<=" // reserved
- | ">>=" // reserved
- | "&=" // reserved
- | "^=" // reserved
- | "|=" // reserved
-*/
-assignment_expression
- assignment_expression_1 .or assignment_expression_2 .or assignment_expression_3 .or
- assignment_expression_4 .or assignment_expression_5/* .or assignment_expression_6 .or
- assignment_expression_7 .or assignment_expression_8 .or assignment_expression_9 .or
- assignment_expression_10 .or assignment_expression_11*/ .or conditional_expression;
-assignment_expression_1
- unary_expression .and equals .and assignment_expression .and .true .emit OP_ASSIGN;
-assignment_expression_2
- unary_expression .and starequals .and assignment_expression .and .true .emit OP_MULASSIGN;
-assignment_expression_3
- unary_expression .and slashequals .and assignment_expression .and .true .emit OP_DIVASSIGN;
-assignment_expression_4
- unary_expression .and plusequals .and assignment_expression .and .true .emit OP_ADDASSIGN;
-assignment_expression_5
- unary_expression .and minusequals .and assignment_expression .and .true .emit OP_SUBASSIGN;
-/*assignment_expression_6
- unary_expression .and percentequals .and assignment_expression .and .true .emit OP_MODASSIGN;*/
-/*assignment_expression_7
- unary_expression .and lesslessequals .and assignment_expression .and .true .emit OP_LSHASSIGN;*/
-/*assignment_expression_8
- unary_expression .and greatergreaterequals .and assignment_expression .and
- .true .emit OP_RSHASSIGN;*/
-/*assignment_expression_9
- unary_expression .and ampersandequals .and assignment_expression .and .true .emit OP_ANDASSIGN;*/
-/*assignment_expression_10
- unary_expression .and caretequals .and assignment_expression .and .true .emit OP_XORASSIGN;*/
-/*assignment_expression_11
- unary_expression .and barequals .and assignment_expression .and .true .emit OP_ORASSIGN;*/
-
-/*
- <expression> ::= <assignment_expression>
- | <expression> "," <assignment_expression>
-*/
-expression
- assignment_expression .and .loop expression_1;
-expression_1
- comma .and assignment_expression .and .true .emit OP_SEQUENCE;
-
-/*
- <constant_expression> ::= <conditional_expression>
-*/
-constant_expression
- conditional_expression .and .true .emit OP_END;
-
-/*
- <declaration> ::= <function_prototype> ";"
- | <init_declarator_list> ";"
-*/
-declaration
- declaration_1 .or declaration_2;
-declaration_1
- function_prototype .emit DECLARATION_FUNCTION_PROTOTYPE .and semicolon;
-declaration_2
- init_declarator_list .emit DECLARATION_INIT_DECLARATOR_LIST .and semicolon;
-
-/*
- <function_prototype> ::= <function_header> "void" ")"
- | <function_declarator> ")"
-*/
-function_prototype
- function_prototype_1 .or function_prototype_2;
-function_prototype_1
- function_header .and "void" .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE;
-function_prototype_2
- function_declarator .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE;
-
-/*
- <function_declarator> ::= <function_header>
- | <function_header_with_parameters>
-*/
-function_declarator
- function_header_with_parameters .or function_header;
-
-/*
- <function_header_with_parameters> ::= <function_header> <parameter_declaration>
- | <function_header_with_parameters> ","
- <parameter_declaration>
-*/
-function_header_with_parameters
- function_header .and parameter_declaration .and .loop function_header_with_parameters_1;
-function_header_with_parameters_1
- comma .and parameter_declaration;
-
-/*
- <function_header> ::= <fully_specified_type> <identifier> "("
-*/
-function_header
- function_header_nospace .or function_header_space;
-function_header_space
- fully_specified_type_space .and space .and function_decl_identifier .and lparen;
-function_header_nospace
- fully_specified_type_nospace .and function_decl_identifier .and lparen;
-
-/*
- <function_decl_identifier> ::= "__constructor"
- | <__operator>
- | <identifier>
-
-note: this is an extension to the standard language specification - normally slang disallows
- operator and constructor prototypes and definitions
-*/
-function_decl_identifier
- .if (parsing_builtin != 0) __operator .emit FUNCTION_OPERATOR .or
- .if (parsing_builtin != 0) "__constructor" .emit FUNCTION_CONSTRUCTOR .or
- identifier .emit FUNCTION_ORDINARY;
-
-/*
- <__operator> ::= "__operator" <overriden_op>
-
-note: this is an extension to the standard language specification - normally slang disallows
- operator prototypes and definitions
-*/
-__operator
- "__operator" .and overriden_operator .error INVALID_OPERATOR_OVERRIDE;
-
-/*
- <overriden_op> ::= "="
- | "+="
- | "-="
- | "*="
- | "/="
- | "%=" // reserved
- | "<<=" // reserved
- | ">>=" // reserved
- | "&=" // reserved
- | "^=" // reserved
- | "|=" // reserved
- | "^^"
- | "|" // reserved
- | "^" // reserved
- | "&" // reserved
- | "=="
- | "!="
- | "<"
- | ">"
- | "<="
- | ">="
- | "<<" // reserved
- | ">>" // reserved
- | "*"
- | "/"
- | "%" // reserved
- | "++"
- | "--"
- | "+"
- | "-"
- | "~" // reserved
- | "!"
-
-note: this is an extension to the standard language specification - normally slang disallows
- operator prototypes and definitions
-*/
-overriden_operator
- plusplus .emit OPERATOR_INCREMENT .or
- plusequals .emit OPERATOR_ADDASSIGN .or
- plus .emit OPERATOR_PLUS .or
- minusminus .emit OPERATOR_DECREMENT .or
- minusequals .emit OPERATOR_SUBASSIGN .or
- minus .emit OPERATOR_MINUS .or
- bang .emit OPERATOR_NOT .or
- starequals .emit OPERATOR_MULASSIGN .or
- star .emit OPERATOR_MULTIPLY .or
- slashequals .emit OPERATOR_DIVASSIGN .or
- slash .emit OPERATOR_DIVIDE .or
- lessequals .emit OPERATOR_LESSEQUAL .or
- /*lesslessequals .emit OPERATOR_LSHASSIGN .or*/
- /*lessless .emit OPERATOR_LSHIFT .or*/
- less .emit OPERATOR_LESS .or
- greaterequals .emit OPERATOR_GREATEREQUAL .or
- /*greatergreaterequals .emit OPERATOR_RSHASSIGN .or*/
- /*greatergreater .emit OPERATOR_RSHIFT .or*/
- greater .emit OPERATOR_GREATER .or
- /*percentequals .emit OPERATOR_MODASSIGN .or*/
- /*percent .emit OPERATOR_MODULUS .or*/
- /*ampersandequals .emit OPERATOR_ANDASSIGN */
- /*ampersand .emit OPERATOR_BITAND .or*/
- /*barequals .emit OPERATOR_ORASSIGN .or*/
- /*bar .emit OPERATOR_BITOR .or*/
- /*tilde .emit OPERATOR_COMPLEMENT .or*/
- /*caretequals .emit OPERATOR_XORASSIGN .or*/
- caretcaret .emit OPERATOR_LOGICALXOR /*.or
- caret .emit OPERATOR_BITXOR*/;
-
-/*
- <parameter_declarator> ::= <type_specifier> <identifier>
- | <type_specifier> <identifier> "[" <constant_expression>
- "]"
-*/
-parameter_declarator
- parameter_declarator_nospace .or parameter_declarator_space;
-parameter_declarator_nospace
- type_specifier_nospace .and identifier .and parameter_declarator_1;
-parameter_declarator_space
- type_specifier_space .and space .and identifier .and parameter_declarator_1;
-parameter_declarator_1
- parameter_declarator_2 .emit PARAMETER_ARRAY_PRESENT .or
- .true .emit PARAMETER_ARRAY_NOT_PRESENT;
-parameter_declarator_2
- lbracket .and constant_expression .and rbracket;
-
-/*
- <parameter_declaration> ::= <type_qualifier> <parameter_qualifier>
- <parameter_declarator>
- | <type_qualifier> <parameter_qualifier>
- <parameter_type_specifier>
- | <parameter_qualifier> <parameter_declarator>
- | <parameter_qualifier> <parameter_type_specifier>
-*/
-parameter_declaration
- parameter_declaration_1 .emit PARAMETER_NEXT;
-parameter_declaration_1
- parameter_declaration_2 .or parameter_declaration_3;
-parameter_declaration_2
- type_qualifier .and space .and parameter_qualifier .and parameter_declaration_4;
-parameter_declaration_3
- parameter_qualifier .emit TYPE_QUALIFIER_NONE .and parameter_declaration_4;
-parameter_declaration_4
- parameter_declarator .or parameter_type_specifier;
-
-/*
- <parameter_qualifier> ::= "in"
- | "out"
- | "inout"
- | ""
-*/
-parameter_qualifier
- parameter_qualifier_1 .or .true .emit PARAM_QUALIFIER_IN;
-parameter_qualifier_1
- parameter_qualifier_2 .and space;
-parameter_qualifier_2
- "in" .emit PARAM_QUALIFIER_IN .or
- "out" .emit PARAM_QUALIFIER_OUT .or
- "inout" .emit PARAM_QUALIFIER_INOUT;
-
-/*
- <parameter_type_specifier> ::= <type_specifier>
- | <type_specifier> "[" <constant_expression> "]"
-*/
-parameter_type_specifier
- parameter_type_specifier_1 .and .true .emit '\0' .and parameter_type_specifier_2;
-parameter_type_specifier_1
- type_specifier_nospace .or type_specifier_space;
-parameter_type_specifier_2
- parameter_type_specifier_3 .emit PARAMETER_ARRAY_PRESENT .or
- .true .emit PARAMETER_ARRAY_NOT_PRESENT;
-parameter_type_specifier_3
- lbracket .and constant_expression .and rbracket;
-
-/*
- <init_declarator_list> ::= <single_declaration>
- | <init_declarator_list> "," <identifier>
- | <init_declarator_list> "," <identifier> "[" "]"
- | <init_declarator_list> "," <identifier> "["
- <constant_expression> "]"
- | <init_declarator_list> "," <identifier> "="
- <initializer>
-*/
-init_declarator_list
- single_declaration .and .loop init_declarator_list_1 .emit DECLARATOR_NEXT .and
- .true .emit DECLARATOR_NONE;
-init_declarator_list_1
- comma .and identifier .emit VARIABLE_IDENTIFIER .and init_declarator_list_2;
-init_declarator_list_2
- init_declarator_list_3 .or init_declarator_list_4 .or .true .emit VARIABLE_NONE;
-init_declarator_list_3
- equals .and initializer .emit VARIABLE_INITIALIZER;
-init_declarator_list_4
- lbracket .and init_declarator_list_5 .and rbracket;
-init_declarator_list_5
- constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN;
-
-/*
- <single_declaration> ::= <fully_specified_type>
- | <fully_specified_type> <identifier>
- | <fully_specified_type> <identifier> "[" "]"
- | <fully_specified_type> <identifier> "["
- <constant_expression> "]"
- | <fully_specified_type> <identifier> "=" <initializer>
-*/
-single_declaration
- single_declaration_nospace .or single_declaration_space;
-single_declaration_space
- fully_specified_type_space .and single_declaration_space_1;
-single_declaration_nospace
- fully_specified_type_nospace .and single_declaration_nospace_1;
-single_declaration_space_1
- single_declaration_space_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE;
-single_declaration_nospace_1
- single_declaration_nospace_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE;
-single_declaration_space_2
- space .and identifier .and single_declaration_3;
-single_declaration_nospace_2
- identifier .and single_declaration_3;
-single_declaration_3
- single_declaration_4 .or single_declaration_5 .or .true .emit VARIABLE_NONE;
-single_declaration_4
- equals .and initializer .emit VARIABLE_INITIALIZER;
-single_declaration_5
- lbracket .and single_declaration_6 .and rbracket;
-single_declaration_6
- constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN;
-
-/*
- <fully_specified_type> ::= <type_specifier>
- | <type_qualifier> <type_specifier>
-*/
-fully_specified_type_space
- fully_specified_type_1 .and type_specifier_space;
-fully_specified_type_nospace
- fully_specified_type_1 .and type_specifier_nospace;
-fully_specified_type_1
- fully_specified_type_2 .or .true .emit TYPE_QUALIFIER_NONE;
-fully_specified_type_2
- type_qualifier .and space;
-
-/*
- <type_qualifier> ::= "const"
- | "attribute" // Vertex only.
- | "varying"
- | "uniform"
- | "__fixed_output"
- | "__fixed_input"
-
-note: this is an extension to the standard language specification - normally slang disallows
- __fixed_output and __fixed_input type qualifiers
-*/
-type_qualifier
- "const" .emit TYPE_QUALIFIER_CONST .or
- .if (shader_type == 2) "attribute" .emit TYPE_QUALIFIER_ATTRIBUTE .or
- "varying" .emit TYPE_QUALIFIER_VARYING .or
- "uniform" .emit TYPE_QUALIFIER_UNIFORM .or
- .if (parsing_builtin != 0) "__fixed_output" .emit TYPE_QUALIFIER_FIXEDOUTPUT .or
- .if (parsing_builtin != 0) "__fixed_input" .emit TYPE_QUALIFIER_FIXEDINPUT;
-
-/*
- <type_specifier> ::= "void"
- | "float"
- | "int"
- | "bool"
- | "vec2"
- | "vec3"
- | "vec4"
- | "bvec2"
- | "bvec3"
- | "bvec4"
- | "ivec2"
- | "ivec3"
- | "ivec4"
- | "mat2"
- | "mat3"
- | "mat4"
- | "sampler1D"
- | "sampler2D"
- | "sampler3D"
- | "samplerCube"
- | "sampler1DShadow"
- | "sampler2DShadow"
- | <struct_specifier>
- | <type_name>
-*/
-type_specifier_space
- "void" .emit TYPE_SPECIFIER_VOID .or
- "float" .emit TYPE_SPECIFIER_FLOAT .or
- "int" .emit TYPE_SPECIFIER_INT .or
- "bool" .emit TYPE_SPECIFIER_BOOL .or
- "vec2" .emit TYPE_SPECIFIER_VEC2 .or
- "vec3" .emit TYPE_SPECIFIER_VEC3 .or
- "vec4" .emit TYPE_SPECIFIER_VEC4 .or
- "bvec2" .emit TYPE_SPECIFIER_BVEC2 .or
- "bvec3" .emit TYPE_SPECIFIER_BVEC3 .or
- "bvec4" .emit TYPE_SPECIFIER_BVEC4 .or
- "ivec2" .emit TYPE_SPECIFIER_IVEC2 .or
- "ivec3" .emit TYPE_SPECIFIER_IVEC3 .or
- "ivec4" .emit TYPE_SPECIFIER_IVEC4 .or
- "mat2" .emit TYPE_SPECIFIER_MAT2 .or
- "mat3" .emit TYPE_SPECIFIER_MAT3 .or
- "mat4" .emit TYPE_SPECIFIER_MAT4 .or
- "sampler1D" .emit TYPE_SPECIFIER_SAMPLER1D .or
- "sampler2D" .emit TYPE_SPECIFIER_SAMPLER2D .or
- "sampler3D" .emit TYPE_SPECIFIER_SAMPLER3D .or
- "samplerCube" .emit TYPE_SPECIFIER_SAMPLERCUBE .or
- "sampler1DShadow" .emit TYPE_SPECIFIER_SAMPLER1DSHADOW .or
- "sampler2DShadow" .emit TYPE_SPECIFIER_SAMPLER2DSHADOW .or
- type_name .emit TYPE_SPECIFIER_TYPENAME;
-type_specifier_nospace
- struct_specifier .emit TYPE_SPECIFIER_STRUCT;
-
-/*
- <struct_specifier> ::= "struct" <identifier> "{" <struct_declaration_list> "}"
- | "struct" "{" <struct_declaration_list> "}"
-*/
-struct_specifier
- "struct" .and struct_specifier_1 .and optional_space .and lbrace .error LBRACE_EXPECTED .and
- struct_declaration_list .and rbrace .emit FIELD_NONE;
-struct_specifier_1
- struct_specifier_2 .or .true .emit '\0';
-struct_specifier_2
- space .and identifier;
-
-/*
- <struct_declaration_list> ::= <struct_declaration>
- | <struct_declaration_list> <struct_declaration>
-*/
-struct_declaration_list
- struct_declaration .and .loop struct_declaration .emit FIELD_NEXT;
-
-/*
- <struct_declaration> ::= <type_specifier> <struct_declarator_list> ";"
-*/
-struct_declaration
- struct_declaration_nospace .or struct_declaration_space;
-struct_declaration_space
- type_specifier_space .and space .and struct_declarator_list .and semicolon .emit FIELD_NONE;
-struct_declaration_nospace
- type_specifier_nospace .and struct_declarator_list .and semicolon .emit FIELD_NONE;
-
-/*
- <struct_declarator_list> ::= <struct_declarator>
- | <struct_declarator_list> "," <struct_declarator>
-*/
-struct_declarator_list
- struct_declarator .and .loop struct_declarator_list_1 .emit FIELD_NEXT;
-struct_declarator_list_1
- comma .and struct_declarator;
-
-/*
- <struct_declarator> ::= <identifier>
- | <identifier> "[" <constant_expression> "]"
-*/
-struct_declarator
- identifier .and struct_declarator_1;
-struct_declarator_1
- struct_declarator_2 .emit FIELD_ARRAY .or .true .emit FIELD_NONE;
-struct_declarator_2
- lbracket .and constant_expression .and rbracket;
-
-/*
- <initializer> ::= <assignment_expression>
-*/
-initializer
- assignment_expression .and .true .emit OP_END;
-
-/*
- <declaration_statement> ::= <declaration>
-*/
-declaration_statement
- declaration;
-
-/*
- <statement> ::= <compound_statement>
- | <simple_statement>
-*/
-statement
- compound_statement .or simple_statement;
-statement_space
- compound_statement .or statement_space_1;
-statement_space_1
- space .and simple_statement;
-
-/*
- <simple_statement> ::= <__asm_statement>
- | <selection_statement>
- | <iteration_statement>
- | <jump_statement>
- | <expression_statement>
- | <declaration_statement>
-
-note: this is an extension to the standard language specification - normally slang disallows
- use of __asm statements
-*/
-simple_statement
- .if (parsing_builtin != 0) __asm_statement .emit OP_ASM .or
- selection_statement .or
- iteration_statement .or
- jump_statement .or
- expression_statement .emit OP_EXPRESSION .or
- declaration_statement .emit OP_DECLARE;
-
-/*
- <compound_statement> ::= "{" "}"
- | "{" <statement_list> "}"
-*/
-compound_statement
- compound_statement_1 .emit OP_BLOCK_BEGIN_NEW_SCOPE .and .true .emit OP_END;
-compound_statement_1
- compound_statement_2 .or compound_statement_3;
-compound_statement_2
- lbrace .and rbrace;
-compound_statement_3
- lbrace .and statement_list .and rbrace;
-
-/*
- <statement_no_new_scope> ::= <compound_statement_no_new_scope>
- | <simple_statement>
-*/
-statement_no_new_scope
- compound_statement_no_new_scope .or simple_statement;
-
-/*
- <compound_statement_no_new_scope> ::= "{" "}"
- | "{" <statement_list> "}"
-*/
-compound_statement_no_new_scope
- compound_statement_no_new_scope_1 .emit OP_BLOCK_BEGIN_NO_NEW_SCOPE .and .true .emit OP_END;
-compound_statement_no_new_scope_1
- compound_statement_no_new_scope_2 .or compound_statement_no_new_scope_3;
-compound_statement_no_new_scope_2
- lbrace .and rbrace;
-compound_statement_no_new_scope_3
- lbrace .and statement_list .and rbrace;
-
-/*
- <statement_list> ::= <statement>
- | <statement_list> <statement>
-*/
-statement_list
- statement .and .loop statement;
-
-/*
- <expression_statement> ::= ";"
- | <expression> ";"
-*/
-expression_statement
- expression_statement_1 .or expression_statement_2;
-expression_statement_1
- semicolon .emit OP_PUSH_VOID .emit OP_END;
-expression_statement_2
- expression .and semicolon .emit OP_END;
-
-/*
- <selection_statement> ::= "if" "(" <expression> ")" <selection_rest_statement>
-*/
-selection_statement
- "if" .emit OP_IF .and lparen .error LPAREN_EXPECTED .and expression .and
- rparen .error RPAREN_EXPECTED .emit OP_END .and selection_rest_statement;
-
-/*
- <selection_rest_statement> ::= <statement> "else" <statement>
- | <statement>
-*/
-selection_rest_statement
- statement .and selection_rest_statement_1;
-selection_rest_statement_1
- selection_rest_statement_2 .or .true .emit OP_EXPRESSION .emit OP_PUSH_VOID .emit OP_END;
-selection_rest_statement_2
- "else" .and optional_space .and statement;
-
-/*
- <condition> ::= <expression>
- | <fully_specified_type> <identifier> "=" <initializer>
-
-note: if <condition_1> is executed, the emit format must match <declaration> emit format
-*/
-condition
- condition_1 .emit OP_DECLARE .emit DECLARATION_INIT_DECLARATOR_LIST .or
- condition_3 .emit OP_EXPRESSION;
-condition_1
- condition_1_nospace .or condition_1_space;
-condition_1_nospace
- fully_specified_type_nospace .and condition_2;
-condition_1_space
- fully_specified_type_space .and space .and condition_2;
-condition_2
- identifier .emit VARIABLE_IDENTIFIER .and equals .emit VARIABLE_INITIALIZER .and
- initializer .and .true .emit DECLARATOR_NONE;
-condition_3
- expression .and .true .emit OP_END;
-
-/*
- <iteration_statement> ::= "while" "(" <condition> ")" <statement_no_new_scope>
- | "do" <statement> "while" "(" <expression> ")" ";"
- | "for" "(" <for_init_statement> <for_rest_statement> ")"
- <statement_no_new_scope>
-*/
-iteration_statement
- iteration_statement_1 .or iteration_statement_2 .or iteration_statement_3;
-iteration_statement_1
- "while" .emit OP_WHILE .and lparen .error LPAREN_EXPECTED .and condition .and
- rparen .error RPAREN_EXPECTED .and statement_no_new_scope;
-iteration_statement_2
- "do" .emit OP_DO .and statement_space .and "while" .and lparen .error LPAREN_EXPECTED .and
- expression .and rparen .error RPAREN_EXPECTED .emit OP_END .and semicolon;
-iteration_statement_3
- "for" .emit OP_FOR .and lparen .error LPAREN_EXPECTED .and for_init_statement .and
- for_rest_statement .and rparen .error RPAREN_EXPECTED .and statement_no_new_scope;
-
-/*
- <for_init_statement> ::= <expression_statement>
- | <declaration_statement>
-*/
-for_init_statement
- expression_statement .emit OP_EXPRESSION .or declaration_statement .emit OP_DECLARE;
-
-/*
- <conditionopt> ::= <condition>
- | ""
-
-note: <conditionopt> is used only by "for" statement - if <condition> is ommitted, parser
- simulates default behaviour, that is simulates "true" expression
-*/
-conditionopt
- condition .or
- .true .emit OP_EXPRESSION .emit OP_PUSH_BOOL .emit 2 .emit '1' .emit '\0' .emit OP_END;
-
-/*
- <for_rest_statement> ::= <conditionopt> ";"
- | <conditionopt> ";" <expression>
-*/
-for_rest_statement
- conditionopt .and semicolon .and for_rest_statement_1;
-for_rest_statement_1
- for_rest_statement_2 .or .true .emit OP_PUSH_VOID .emit OP_END;
-for_rest_statement_2
- expression .and .true .emit OP_END;
-
-/*
- <jump_statement> ::= "continue" ";"
- | "break" ";"
- | "return" ";"
- | "return" <expression> ";"
- | "discard" ";" // Fragment shader only.
-*/
-jump_statement
- jump_statement_1 .or jump_statement_2 .or jump_statement_3 .or jump_statement_4 .or
- .if (shader_type == 1) jump_statement_5;
-jump_statement_1
- "continue" .and semicolon .emit OP_CONTINUE;
-jump_statement_2
- "break" .and semicolon .emit OP_BREAK;
-jump_statement_3
- "return" .emit OP_RETURN .and optional_space .and expression .and semicolon .emit OP_END;
-jump_statement_4
- "return" .emit OP_RETURN .and semicolon .emit OP_PUSH_VOID .emit OP_END;
-jump_statement_5
- "discard" .and semicolon .emit OP_DISCARD;
-
-/*
- <__asm_statement> ::= "__asm" <identifier> <asm_arguments> ";"
-
-note: this is an extension to the standard language specification - normally slang disallows
- __asm statements
-*/
-__asm_statement
- "__asm" .and space .and identifier .and space .and asm_arguments .and semicolon .emit OP_END;
-
-/*
- <asm_arguments> ::= <asm_argument>
- | <asm_arguments> "," <asm_argument>
-
-note: this is an extension to the standard language specification - normally slang disallows
- __asm statements
-*/
-asm_arguments
- asm_argument .and .true .emit OP_END .and .loop asm_arguments_1;
-asm_arguments_1
- comma .and asm_argument .and .true .emit OP_END;
-
-/*
- <asm_argument> ::= <variable_identifier>
- | <floatconstant>
-
-note: this is an extension to the standard language specification - normally slang disallows
- __asm statements
-*/
-asm_argument
- variable_identifier .or floatconstant;
-
-/*
- <translation_unit> ::= <external_declaration>
- | <translation_unit> <external_declaration>
-*/
-translation_unit
- optional_space .emit REVISION .and external_declaration .error INVALID_EXTERNAL_DECLARATION .and
- .loop external_declaration .and optional_space .and
- '\0' .error INVALID_EXTERNAL_DECLARATION .emit EXTERNAL_NULL;
-
-/*
- <external_declaration> ::= <function_definition>
- | <declaration>
-*/
-external_declaration
- function_definition .emit EXTERNAL_FUNCTION_DEFINITION .or
- declaration .emit EXTERNAL_DECLARATION;
-
-/*
- <function_definition> :: <function_prototype> <compound_statement_no_new_scope>
-*/
-function_definition
- function_prototype .and compound_statement_no_new_scope;
-
-/* helper rulez, not part of the official language syntax */
-
-digit_oct
- '0'-'7';
-
-digit_dec
- '0'-'9';
-
-digit_hex
- '0'-'9' .or 'A'-'F' .or 'a'-'f';
-
-id_character_first
- 'a'-'z' .or 'A'-'Z' .or '_';
-
-id_character_next
- id_character_first .or digit_dec;
-
-identifier
- id_character_first .emit * .and .loop id_character_next .emit * .and .true .emit '\0';
-
-float
- float_1 .or float_2;
-float_1
- float_fractional_constant .and float_optional_exponent_part;
-float_2
- float_digit_sequence .and .true .emit '\0' .and float_exponent_part;
-
-float_fractional_constant
- float_fractional_constant_1 .or float_fractional_constant_2 .or float_fractional_constant_3;
-float_fractional_constant_1
- float_digit_sequence .and '.' .and float_digit_sequence;
-float_fractional_constant_2
- float_digit_sequence .and '.' .and .true .emit '\0';
-float_fractional_constant_3
- '.' .emit '\0' .and float_digit_sequence;
-
-float_optional_exponent_part
- float_exponent_part .or .true .emit '\0';
-
-float_digit_sequence
- digit_dec .emit * .and .loop digit_dec .emit * .and .true .emit '\0';
-
-float_exponent_part
- float_exponent_part_1 .or float_exponent_part_2;
-float_exponent_part_1
- 'e' .and float_optional_sign .and float_digit_sequence;
-float_exponent_part_2
- 'E' .and float_optional_sign .and float_digit_sequence;
-
-float_optional_sign
- float_sign .or .true;
-
-float_sign
- '+' .or '-' .emit '-';
-
-integer
- integer_hex .or integer_oct .or integer_dec;
-
-integer_hex
- '0' .and integer_hex_1 .emit 0x10 .and digit_hex .emit * .and .loop digit_hex .emit * .and
- .true .emit '\0';
-integer_hex_1
- 'x' .or 'X';
-
-integer_oct
- '0' .emit 8 .emit * .and .loop digit_oct .emit * .and .true .emit '\0';
-
-integer_dec
- digit_dec .emit 10 .emit * .and .loop digit_dec .emit * .and .true .emit '\0';
-
-boolean
- "true" .emit 2 .emit '1' .emit '\0' .or
- "false" .emit 2 .emit '0' .emit '\0';
-
-type_name
- identifier;
-
-field_selection
- identifier;
-
-floatconstant
- float .emit OP_PUSH_FLOAT;
-
-intconstant
- integer .emit OP_PUSH_INT;
-
-boolconstant
- boolean .emit OP_PUSH_BOOL;
-
-optional_space
- .loop single_space;
-
-space
- single_space .and .loop single_space;
-
-single_space
- white_char .or c_style_comment_block .or cpp_style_comment_block;
-
-white_char
- ' ' .or '\t' .or new_line .or '\v' .or '\f';
-
-new_line
- cr_lf .or lf_cr .or '\n' .or '\r';
-
-cr_lf
- '\r' .and '\n';
-
-lf_cr
- '\n' .and '\r';
-
-c_style_comment_block
- '/' .and '*' .and c_style_comment_rest;
-
-c_style_comment_rest
- .loop c_style_comment_char_no_star .and c_style_comment_rest_1;
-c_style_comment_rest_1
- c_style_comment_end .or c_style_comment_rest_2;
-c_style_comment_rest_2
- '*' .and c_style_comment_rest;
-
-c_style_comment_char_no_star
- '\x2B'-'\xFF' .or '\x01'-'\x29';
-
-c_style_comment_end
- '*' .and '/';
-
-cpp_style_comment_block
- '/' .and '/' .and cpp_style_comment_block_1;
-cpp_style_comment_block_1
- cpp_style_comment_block_2 .or cpp_style_comment_block_3;
-cpp_style_comment_block_2
- .loop cpp_style_comment_char .and new_line;
-cpp_style_comment_block_3
- .loop cpp_style_comment_char;
-
-cpp_style_comment_char
- '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C';
-
-/* lexical rulez */
-
-/*ampersand
- optional_space .and '&' .and optional_space;*/
-
-ampersandampersand
- optional_space .and '&' .and '&' .and optional_space;
-
-/*ampersandequals
- optional_space .and '&' .and '=' .and optional_space;*/
-
-/*bar
- optional_space .and '|' .and optional_space;*/
-
-barbar
- optional_space .and '|' .and '|' .and optional_space;
-
-/*barequals
- optional_space .and '|' .and '=' .and optional_space;*/
-
-bang
- optional_space .and '!' .and optional_space;
-
-bangequals
- optional_space .and '!' .and '=' .and optional_space;
-
-/*caret
- optional_space .and '^' .and optional_space;*/
-
-caretcaret
- optional_space .and '^' .and '^' .and optional_space;
-
-/*caretequals
- optional_space .and '^' .and '=' .and optional_space;*/
-
-colon
- optional_space .and ':' .and optional_space;
-
-comma
- optional_space .and ',' .and optional_space;
-
-dot
- optional_space .and '.' .and optional_space;
-
-equals
- optional_space .and '=' .and optional_space;
-
-equalsequals
- optional_space .and '=' .and '=' .and optional_space;
-
-greater
- optional_space .and '>' .and optional_space;
-
-greaterequals
- optional_space .and '>' .and '=' .and optional_space;
-
-/*greatergreater
- optional_space .and '>' .and '>' .and optional_space;*/
-
-/*greatergreaterequals
- optional_space .and '>' .and '>' .and '=' .and optional_space;*/
-
-lbrace
- optional_space .and '{' .and optional_space;
-
-lbracket
- optional_space .and '[' .and optional_space;
-
-less
- optional_space .and '<' .and optional_space;
-
-lessequals
- optional_space .and '<' .and '=' .and optional_space;
-
-/*lessless
- optional_space .and '<' .and '<' .and optional_space;*/
-
-/*lesslessequals
- optional_space .and '<' .and '<' .and '=' .and optional_space;*/
-
-lparen
- optional_space .and '(' .and optional_space;
-
-minus
- optional_space .and '-' .and optional_space;
-
-minusequals
- optional_space .and '-' .and '=' .and optional_space;
-
-minusminus
- optional_space .and '-' .and '-' .and optional_space;
-
-/*percent
- optional_space .and '%' .and optional_space;*/
-
-/*percentequals
- optional_space .and '%' .and '=' .and optional_space;*/
-
-plus
- optional_space .and '+' .and optional_space;
-
-plusequals
- optional_space .and '+' .and '=' .and optional_space;
-
-plusplus
- optional_space .and '+' .and '+' .and optional_space;
-
-question
- optional_space .and '?' .and optional_space;
-
-rbrace
- optional_space .and '}' .and optional_space;
-
-rbracket
- optional_space .and ']' .and optional_space;
-
-rparen
- optional_space .and ')' .and optional_space;
-
-semicolon
- optional_space .and ';' .and optional_space;
-
-slash
- optional_space .and '/' .and optional_space;
-
-slashequals
- optional_space .and '/' .and '=' .and optional_space;
-
-star
- optional_space .and '*' .and optional_space;
-
-starequals
- optional_space .and '*' .and '=' .and optional_space;
-
-/*tilde
- optional_space .and '~' .and optional_space;*/
-
-/* string rulez - these are used internally by the parser when parsing quoted strings */
-
-.string string_lexer;
-
-string_lexer
- lex_first_identifier_character .and .loop lex_next_identifier_character;
-
-lex_first_identifier_character
- 'a'-'z' .or 'A'-'Z' .or '_';
-
-lex_next_identifier_character
- 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_';
-
-/* error rulez - these are used by error messages */
-
-err_token
- '~' .or '`' .or '!' .or '@' .or '#' .or '$' .or '%' .or '^' .or '&' .or '*' .or '(' .or ')' .or
- '-' .or '+' .or '=' .or '|' .or '\\' .or '[' .or ']' .or '{' .or '}' .or ':' .or ';' .or '"' .or
- '\'' .or '<' .or ',' .or '>' .or '.' .or '/' .or '?' .or err_identifier;
-
-err_identifier
- id_character_first .and .loop id_character_next;
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2004-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * \file slang_shader.syn
+ * slang vertex/fragment shader syntax
+ * \author Michal Krol
+ */
+
+/*
+ * usage:
+ * syn2c slang_shader.syn > slang_shader_syn.h
+ *
+ * when modifying or extending this file, several things must be taken into consideration:
+ * - when adding new operators that were marked as reserved in the initial specification,
+ * one must only uncomment particular lines of code that refer to operators being added;
+ * - when adding new shader target, one must reserve new value for shader_type register and
+ * use it in .if constructs for symbols that are exclusive for that shader;
+ * - some symbols mimic output of other symbols - the best example is the "for" construct:
+ * expression "for (foo(); ; bar())" is seen as "for (foo(); true; bar())" by the output
+ * processor - hence, special care must be taken when rearranging output of essential symbols;
+ * - order of single-quoted tokens does matter in alternatives - so do not parse "<" operator
+ * before "<<" and "<<" before "<<=";
+ * - all double-quoted tokens are internally preprocessed to eliminate problems with parsing
+ * strings that are prefixes of other strings, like "sampler1D" and "sampler1DShadow";
+ */
+
+.syntax translation_unit;
+
+/* revision number - increment after each change affecting emitted output */
+.emtcode REVISION 3
+
+/* external declaration */
+.emtcode EXTERNAL_NULL 0
+.emtcode EXTERNAL_FUNCTION_DEFINITION 1
+.emtcode EXTERNAL_DECLARATION 2
+
+/* declaration */
+.emtcode DECLARATION_FUNCTION_PROTOTYPE 1
+.emtcode DECLARATION_INIT_DECLARATOR_LIST 2
+
+/* function type */
+.emtcode FUNCTION_ORDINARY 0
+.emtcode FUNCTION_CONSTRUCTOR 1
+.emtcode FUNCTION_OPERATOR 2
+
+/* operator type */
+.emtcode OPERATOR_ADDASSIGN 1
+.emtcode OPERATOR_SUBASSIGN 2
+.emtcode OPERATOR_MULASSIGN 3
+.emtcode OPERATOR_DIVASSIGN 4
+/*.emtcode OPERATOR_MODASSIGN 5*/
+/*.emtcode OPERATOR_LSHASSIGN 6*/
+/*.emtcode OPERATOR_RSHASSIGN 7*/
+/*.emtcode OPERATOR_ORASSIGN 8*/
+/*.emtcode OPERATOR_XORASSIGN 9*/
+/*.emtcode OPERATOR_ANDASSIGN 10*/
+.emtcode OPERATOR_LOGICALXOR 11
+/*.emtcode OPERATOR_BITOR 12*/
+/*.emtcode OPERATOR_BITXOR 13*/
+/*.emtcode OPERATOR_BITAND 14*/
+.emtcode OPERATOR_LESS 15
+.emtcode OPERATOR_GREATER 16
+.emtcode OPERATOR_LESSEQUAL 17
+.emtcode OPERATOR_GREATEREQUAL 18
+/*.emtcode OPERATOR_LSHIFT 19*/
+/*.emtcode OPERATOR_RSHIFT 20*/
+.emtcode OPERATOR_MULTIPLY 21
+.emtcode OPERATOR_DIVIDE 22
+/*.emtcode OPERATOR_MODULUS 23*/
+.emtcode OPERATOR_INCREMENT 24
+.emtcode OPERATOR_DECREMENT 25
+.emtcode OPERATOR_PLUS 26
+.emtcode OPERATOR_MINUS 27
+/*.emtcode OPERATOR_COMPLEMENT 28*/
+.emtcode OPERATOR_NOT 29
+
+/* init declarator list */
+.emtcode DECLARATOR_NONE 0
+.emtcode DECLARATOR_NEXT 1
+
+/* variable declaration */
+.emtcode VARIABLE_NONE 0
+.emtcode VARIABLE_IDENTIFIER 1
+.emtcode VARIABLE_INITIALIZER 2
+.emtcode VARIABLE_ARRAY_EXPLICIT 3
+.emtcode VARIABLE_ARRAY_UNKNOWN 4
+
+/* type qualifier */
+.emtcode TYPE_QUALIFIER_NONE 0
+.emtcode TYPE_QUALIFIER_CONST 1
+.emtcode TYPE_QUALIFIER_ATTRIBUTE 2
+.emtcode TYPE_QUALIFIER_VARYING 3
+.emtcode TYPE_QUALIFIER_UNIFORM 4
+.emtcode TYPE_QUALIFIER_FIXEDOUTPUT 5
+.emtcode TYPE_QUALIFIER_FIXEDINPUT 6
+
+/* type specifier */
+.emtcode TYPE_SPECIFIER_VOID 0
+.emtcode TYPE_SPECIFIER_BOOL 1
+.emtcode TYPE_SPECIFIER_BVEC2 2
+.emtcode TYPE_SPECIFIER_BVEC3 3
+.emtcode TYPE_SPECIFIER_BVEC4 4
+.emtcode TYPE_SPECIFIER_INT 5
+.emtcode TYPE_SPECIFIER_IVEC2 6
+.emtcode TYPE_SPECIFIER_IVEC3 7
+.emtcode TYPE_SPECIFIER_IVEC4 8
+.emtcode TYPE_SPECIFIER_FLOAT 9
+.emtcode TYPE_SPECIFIER_VEC2 10
+.emtcode TYPE_SPECIFIER_VEC3 11
+.emtcode TYPE_SPECIFIER_VEC4 12
+.emtcode TYPE_SPECIFIER_MAT2 13
+.emtcode TYPE_SPECIFIER_MAT3 14
+.emtcode TYPE_SPECIFIER_MAT4 15
+.emtcode TYPE_SPECIFIER_SAMPLER1D 16
+.emtcode TYPE_SPECIFIER_SAMPLER2D 17
+.emtcode TYPE_SPECIFIER_SAMPLER3D 18
+.emtcode TYPE_SPECIFIER_SAMPLERCUBE 19
+.emtcode TYPE_SPECIFIER_SAMPLER1DSHADOW 20
+.emtcode TYPE_SPECIFIER_SAMPLER2DSHADOW 21
+.emtcode TYPE_SPECIFIER_STRUCT 22
+.emtcode TYPE_SPECIFIER_TYPENAME 23
+
+/* structure field */
+.emtcode FIELD_NONE 0
+.emtcode FIELD_NEXT 1
+.emtcode FIELD_ARRAY 2
+
+/* operation */
+.emtcode OP_END 0
+.emtcode OP_BLOCK_BEGIN_NO_NEW_SCOPE 1
+.emtcode OP_BLOCK_BEGIN_NEW_SCOPE 2
+.emtcode OP_DECLARE 3
+.emtcode OP_ASM 4
+.emtcode OP_BREAK 5
+.emtcode OP_CONTINUE 6
+.emtcode OP_DISCARD 7
+.emtcode OP_RETURN 8
+.emtcode OP_EXPRESSION 9
+.emtcode OP_IF 10
+.emtcode OP_WHILE 11
+.emtcode OP_DO 12
+.emtcode OP_FOR 13
+.emtcode OP_PUSH_VOID 14
+.emtcode OP_PUSH_BOOL 15
+.emtcode OP_PUSH_INT 16
+.emtcode OP_PUSH_FLOAT 17
+.emtcode OP_PUSH_IDENTIFIER 18
+.emtcode OP_SEQUENCE 19
+.emtcode OP_ASSIGN 20
+.emtcode OP_ADDASSIGN 21
+.emtcode OP_SUBASSIGN 22
+.emtcode OP_MULASSIGN 23
+.emtcode OP_DIVASSIGN 24
+/*.emtcode OP_MODASSIGN 25*/
+/*.emtcode OP_LSHASSIGN 26*/
+/*.emtcode OP_RSHASSIGN 27*/
+/*.emtcode OP_ORASSIGN 28*/
+/*.emtcode OP_XORASSIGN 29*/
+/*.emtcode OP_ANDASSIGN 30*/
+.emtcode OP_SELECT 31
+.emtcode OP_LOGICALOR 32
+.emtcode OP_LOGICALXOR 33
+.emtcode OP_LOGICALAND 34
+/*.emtcode OP_BITOR 35*/
+/*.emtcode OP_BITXOR 36*/
+/*.emtcode OP_BITAND 37*/
+.emtcode OP_EQUAL 38
+.emtcode OP_NOTEQUAL 39
+.emtcode OP_LESS 40
+.emtcode OP_GREATER 41
+.emtcode OP_LESSEQUAL 42
+.emtcode OP_GREATEREQUAL 43
+/*.emtcode OP_LSHIFT 44*/
+/*.emtcode OP_RSHIFT 45*/
+.emtcode OP_ADD 46
+.emtcode OP_SUBTRACT 47
+.emtcode OP_MULTIPLY 48
+.emtcode OP_DIVIDE 49
+/*.emtcode OP_MODULUS 50*/
+.emtcode OP_PREINCREMENT 51
+.emtcode OP_PREDECREMENT 52
+.emtcode OP_PLUS 53
+.emtcode OP_MINUS 54
+/*.emtcode OP_COMPLEMENT 55*/
+.emtcode OP_NOT 56
+.emtcode OP_SUBSCRIPT 57
+.emtcode OP_CALL 58
+.emtcode OP_FIELD 59
+.emtcode OP_POSTINCREMENT 60
+.emtcode OP_POSTDECREMENT 61
+
+/* parameter qualifier */
+.emtcode PARAM_QUALIFIER_IN 0
+.emtcode PARAM_QUALIFIER_OUT 1
+.emtcode PARAM_QUALIFIER_INOUT 2
+
+/* function parameter */
+.emtcode PARAMETER_NONE 0
+.emtcode PARAMETER_NEXT 1
+
+/* function parameter array presence */
+.emtcode PARAMETER_ARRAY_NOT_PRESENT 0
+.emtcode PARAMETER_ARRAY_PRESENT 1
+
+.errtext INVALID_EXTERNAL_DECLARATION "error 2001: invalid external declaration"
+.errtext INVALID_OPERATOR_OVERRIDE "error 2002: invalid operator override"
+.errtext LBRACE_EXPECTED "error 2003: '{' expected but '$err_token$' found"
+.errtext LPAREN_EXPECTED "error 2004: '(' expected but '$err_token$' found"
+.errtext RPAREN_EXPECTED "error 2005: ')' expected but '$err_token$' found"
+
+/* tells whether the shader that is being parsed is a built-in shader or not */
+/* 0 - normal behaviour */
+/* 1 - accepts constructor and operator definitions and __asm statements */
+/* the implementation will set it to 1 when compiling internal built-in shaders */
+.regbyte parsing_builtin 0
+
+/* holds the type of the shader being parsed; possible values are listed below */
+/* FRAGMENT_SHADER 1 */
+/* VERTEX_SHADER 2 */
+/* shader type is set by the caller before parsing */
+.regbyte shader_type 0
+
+/*
+ <variable_identifier> ::= <identifier>
+*/
+variable_identifier
+ identifier .emit OP_PUSH_IDENTIFIER;
+
+/*
+ <primary_expression> ::= <variable_identifier>
+ | <intconstant>
+ | <floatconstant>
+ | <boolconstant>
+ | "(" <expression> ")"
+*/
+primary_expression
+ floatconstant .or boolconstant .or intconstant .or variable_identifier .or primary_expression_1;
+primary_expression_1
+ lparen .and expression .and rparen;
+
+/*
+ <postfix_expression> ::= <primary_expression>
+ | <postfix_expression> "[" <integer_expression> "]"
+ | <function_call>
+ | <postfix_expression> "." <field_selection>
+ | <postfix_expression> "++"
+ | <postfix_expression> "--"
+*/
+postfix_expression
+ postfix_expression_1 .and .loop postfix_expression_2;
+postfix_expression_1
+ function_call .or primary_expression;
+postfix_expression_2
+ postfix_expression_3 .or postfix_expression_4 .or
+ plusplus .emit OP_POSTINCREMENT .or
+ minusminus .emit OP_POSTDECREMENT;
+postfix_expression_3
+ lbracket .and integer_expression .and rbracket .emit OP_SUBSCRIPT;
+postfix_expression_4
+ dot .and field_selection .emit OP_FIELD;
+
+/*
+ <integer_expression> ::= <expression>
+*/
+integer_expression
+ expression;
+
+/*
+ <function_call> ::= <function_call_generic>
+*/
+function_call
+ function_call_generic .emit OP_CALL .and .true .emit OP_END;
+
+/*
+ <function_call_generic> ::= <function_call_header_with_parameters> ")"
+ | <function_call_header_no_parameters> ")"
+*/
+function_call_generic
+ function_call_generic_1 .or function_call_generic_2;
+function_call_generic_1
+ function_call_header_with_parameters .and rparen .error RPAREN_EXPECTED;
+function_call_generic_2
+ function_call_header_no_parameters .and rparen .error RPAREN_EXPECTED;
+
+/*
+ <function_call_header_no_parameters>::= <function_call_header> "void"
+ | <function_call_header>
+*/
+function_call_header_no_parameters
+ function_call_header .and function_call_header_no_parameters_1;
+function_call_header_no_parameters_1
+ "void" .or .true;
+
+/*
+ <function_call_header_with_parameters>::= <function_call_header> <assignment_expression>
+ | <function_call_header_with_parameters> ","
+ <assignment_expression>
+*/
+function_call_header_with_parameters
+ function_call_header .and assignment_expression .and .true .emit OP_END .and
+ .loop function_call_header_with_parameters_1;
+function_call_header_with_parameters_1
+ comma .and assignment_expression .and .true .emit OP_END;
+
+/*
+ <function_call_header> ::= <function_identifier> "("
+*/
+function_call_header
+ function_identifier .and lparen;
+
+/*
+ <function_identifier> ::= <constructor_identifier>
+ | <identifier>
+
+note: <constructor_identifier> has been deleted
+*/
+function_identifier
+ identifier;
+
+/*
+ <unary_expression> ::= <postfix_expression>
+ | "++" <unary_expression>
+ | "--" <unary_expression>
+ | <unary_operator> <unary_expression>
+
+ <unary_operator> ::= "+"
+ | "-"
+ | "!"
+ | "~" // reserved
+*/
+unary_expression
+ postfix_expression .or unary_expression_1 .or unary_expression_2 .or unary_expression_3 .or
+ unary_expression_4 .or unary_expression_5/* .or unary_expression_6*/;
+unary_expression_1
+ plusplus .and unary_expression .and .true .emit OP_PREINCREMENT;
+unary_expression_2
+ minusminus .and unary_expression .and .true .emit OP_PREDECREMENT;
+unary_expression_3
+ plus .and unary_expression .and .true .emit OP_PLUS;
+unary_expression_4
+ minus .and unary_expression .and .true .emit OP_MINUS;
+unary_expression_5
+ bang .and unary_expression .and .true .emit OP_NOT;
+/*unary_expression_6
+ tilde .and unary_expression .and .true .emit OP_COMPLEMENT;*/
+
+/*
+ <multiplicative_expression> ::= <unary_expression>
+ | <multiplicative_expression> "*" <unary_expression>
+ | <multiplicative_expression> "/" <unary_expression>
+ | <multiplicative_expression> "%" <unary_expression> // reserved
+*/
+multiplicative_expression
+ unary_expression .and .loop multiplicative_expression_1;
+multiplicative_expression_1
+ multiplicative_expression_2 .or multiplicative_expression_3/* .or multiplicative_expression_4*/;
+multiplicative_expression_2
+ star .and unary_expression .and .true .emit OP_MULTIPLY;
+multiplicative_expression_3
+ slash .and unary_expression .and .true .emit OP_DIVIDE;
+/*multiplicative_expression_4
+ percent .and unary_expression .and .true .emit OP_MODULUS;*/
+
+/*
+ <additive_expression> ::= <multiplicative_expression>
+ | <additive_expression> "+" <multiplicative_expression>
+ | <additive_expression> "-" <multiplicative_expression>
+*/
+additive_expression
+ multiplicative_expression .and .loop additive_expression_1;
+additive_expression_1
+ additive_expression_2 .or additive_expression_3;
+additive_expression_2
+ plus .and multiplicative_expression .and .true .emit OP_ADD;
+additive_expression_3
+ minus .and multiplicative_expression .and .true .emit OP_SUBTRACT;
+
+/*
+ <shift_expression> ::= <additive_expression>
+ | <shift_expression> "<<" <additive_expression> // reserved
+ | <shift_expression> ">>" <additive_expression> // reserved
+*/
+shift_expression
+ additive_expression/* .and .loop shift_expression_1*/;
+/*shift_expression_1
+ shift_expression_2 .or shift_expression_3;*/
+/*shift_expression_2
+ lessless .and additive_expression .and .true .emit OP_LSHIFT;*/
+/*shift_expression_3
+ greatergreater .and additive_expression .and .true .emit OP_RSHIFT;*/
+
+/*
+ <relational_expression> ::= <shift_expression>
+ | <relational_expression> "<" <shift_expression>
+ | <relational_expression> ">" <shift_expression>
+ | <relational_expression> "<=" <shift_expression>
+ | <relational_expression> ">=" <shift_expression>
+*/
+relational_expression
+ shift_expression .and .loop relational_expression_1;
+relational_expression_1
+ relational_expression_2 .or relational_expression_3 .or relational_expression_4 .or
+ relational_expression_5;
+relational_expression_2
+ lessequals .and shift_expression .and .true .emit OP_LESSEQUAL;
+relational_expression_3
+ greaterequals .and shift_expression .and .true .emit OP_GREATEREQUAL;
+relational_expression_4
+ less .and shift_expression .and .true .emit OP_LESS;
+relational_expression_5
+ greater .and shift_expression .and .true .emit OP_GREATER;
+
+/*
+ <equality_expression> ::= <relational_expression>
+ | <equality_expression> "==" <relational_expression>
+ | <equality_expression> "!=" <relational_expression>
+*/
+equality_expression
+ relational_expression .and .loop equality_expression_1;
+equality_expression_1
+ equality_expression_2 .or equality_expression_3;
+equality_expression_2
+ equalsequals .and relational_expression .and .true .emit OP_EQUAL;
+equality_expression_3
+ bangequals .and relational_expression .and .true .emit OP_NOTEQUAL;
+
+/*
+ <and_expression> ::= <equality_expression>
+ | <and_expression> "&" <equality_expression> // reserved
+*/
+and_expression
+ equality_expression/* .and .loop and_expression_1*/;
+/*and_expression_1
+ ampersand .and equality_expression .and .true .emit OP_BITAND;*/
+
+/*
+ <exclusive_or_expression> ::= <and_expression>
+ | <exclusive_or_expression> "^" <and_expression> // reserved
+*/
+exclusive_or_expression
+ and_expression/* .and .loop exclusive_or_expression_1*/;
+/*exclusive_or_expression_1
+ caret .and and_expression .and .true .emit OP_BITXOR;*/
+
+/*
+ <inclusive_or_expression> ::= <exclusive_or_expression>
+ | <inclusive_or_expression> "|" <exclusive_or_expression> // reserved
+*/
+inclusive_or_expression
+ exclusive_or_expression/* .and .loop inclusive_or_expression_1*/;
+/*inclusive_or_expression_1
+ bar .and exclusive_or_expression .and .true .emit OP_BITOR;*/
+
+/*
+ <logical_and_expression> ::= <inclusive_or_expression>
+ | <logical_and_expression> "&&" <inclusive_or_expression>
+*/
+logical_and_expression
+ inclusive_or_expression .and .loop logical_and_expression_1;
+logical_and_expression_1
+ ampersandampersand .and inclusive_or_expression .and .true .emit OP_LOGICALAND;
+
+/*
+ <logical_xor_expression> ::= <logical_and_expression>
+ | <logical_xor_expression> "^^" <logical_and_expression>
+*/
+logical_xor_expression
+ logical_and_expression .and .loop logical_xor_expression_1;
+logical_xor_expression_1
+ caretcaret .and logical_and_expression .and .true .emit OP_LOGICALXOR;
+
+/*
+ <logical_or_expression> ::= <logical_xor_expression>
+ | <logical_or_expression> "||" <logical_xor_expression>
+*/
+logical_or_expression
+ logical_xor_expression .and .loop logical_or_expression_1;
+logical_or_expression_1
+ barbar .and logical_xor_expression .and .true .emit OP_LOGICALOR;
+
+/*
+ <conditional_expression> ::= <logical_or_expression>
+ | <logical_or_expression> "?" <expression> ":"
+ <conditional_expression>
+*/
+conditional_expression
+ logical_or_expression .and .loop conditional_expression_1;
+conditional_expression_1
+ question .and expression .and colon .and conditional_expression .and .true .emit OP_SELECT;
+
+/*
+ <assignment_expression> ::= <conditional_expression>
+ | <unary_expression> <assignment_operator>
+ <assignment_expression>
+
+ <assignment_operator> ::= "="
+ | "*="
+ | "/="
+ | "+="
+ | "-="
+ | "%=" // reserved
+ | "<<=" // reserved
+ | ">>=" // reserved
+ | "&=" // reserved
+ | "^=" // reserved
+ | "|=" // reserved
+*/
+assignment_expression
+ assignment_expression_1 .or assignment_expression_2 .or assignment_expression_3 .or
+ assignment_expression_4 .or assignment_expression_5/* .or assignment_expression_6 .or
+ assignment_expression_7 .or assignment_expression_8 .or assignment_expression_9 .or
+ assignment_expression_10 .or assignment_expression_11*/ .or conditional_expression;
+assignment_expression_1
+ unary_expression .and equals .and assignment_expression .and .true .emit OP_ASSIGN;
+assignment_expression_2
+ unary_expression .and starequals .and assignment_expression .and .true .emit OP_MULASSIGN;
+assignment_expression_3
+ unary_expression .and slashequals .and assignment_expression .and .true .emit OP_DIVASSIGN;
+assignment_expression_4
+ unary_expression .and plusequals .and assignment_expression .and .true .emit OP_ADDASSIGN;
+assignment_expression_5
+ unary_expression .and minusequals .and assignment_expression .and .true .emit OP_SUBASSIGN;
+/*assignment_expression_6
+ unary_expression .and percentequals .and assignment_expression .and .true .emit OP_MODASSIGN;*/
+/*assignment_expression_7
+ unary_expression .and lesslessequals .and assignment_expression .and .true .emit OP_LSHASSIGN;*/
+/*assignment_expression_8
+ unary_expression .and greatergreaterequals .and assignment_expression .and
+ .true .emit OP_RSHASSIGN;*/
+/*assignment_expression_9
+ unary_expression .and ampersandequals .and assignment_expression .and .true .emit OP_ANDASSIGN;*/
+/*assignment_expression_10
+ unary_expression .and caretequals .and assignment_expression .and .true .emit OP_XORASSIGN;*/
+/*assignment_expression_11
+ unary_expression .and barequals .and assignment_expression .and .true .emit OP_ORASSIGN;*/
+
+/*
+ <expression> ::= <assignment_expression>
+ | <expression> "," <assignment_expression>
+*/
+expression
+ assignment_expression .and .loop expression_1;
+expression_1
+ comma .and assignment_expression .and .true .emit OP_SEQUENCE;
+
+/*
+ <constant_expression> ::= <conditional_expression>
+*/
+constant_expression
+ conditional_expression .and .true .emit OP_END;
+
+/*
+ <declaration> ::= <function_prototype> ";"
+ | <init_declarator_list> ";"
+*/
+declaration
+ declaration_1 .or declaration_2;
+declaration_1
+ function_prototype .emit DECLARATION_FUNCTION_PROTOTYPE .and semicolon;
+declaration_2
+ init_declarator_list .emit DECLARATION_INIT_DECLARATOR_LIST .and semicolon;
+
+/*
+ <function_prototype> ::= <function_header> "void" ")"
+ | <function_declarator> ")"
+*/
+function_prototype
+ function_prototype_1 .or function_prototype_2;
+function_prototype_1
+ function_header .and "void" .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE;
+function_prototype_2
+ function_declarator .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE;
+
+/*
+ <function_declarator> ::= <function_header>
+ | <function_header_with_parameters>
+*/
+function_declarator
+ function_header_with_parameters .or function_header;
+
+/*
+ <function_header_with_parameters> ::= <function_header> <parameter_declaration>
+ | <function_header_with_parameters> ","
+ <parameter_declaration>
+*/
+function_header_with_parameters
+ function_header .and parameter_declaration .and .loop function_header_with_parameters_1;
+function_header_with_parameters_1
+ comma .and parameter_declaration;
+
+/*
+ <function_header> ::= <fully_specified_type> <identifier> "("
+*/
+function_header
+ function_header_nospace .or function_header_space;
+function_header_space
+ fully_specified_type_space .and space .and function_decl_identifier .and lparen;
+function_header_nospace
+ fully_specified_type_nospace .and function_decl_identifier .and lparen;
+
+/*
+ <function_decl_identifier> ::= "__constructor"
+ | <__operator>
+ | <identifier>
+
+note: this is an extension to the standard language specification - normally slang disallows
+ operator and constructor prototypes and definitions
+*/
+function_decl_identifier
+ .if (parsing_builtin != 0) __operator .emit FUNCTION_OPERATOR .or
+ .if (parsing_builtin != 0) "__constructor" .emit FUNCTION_CONSTRUCTOR .or
+ identifier .emit FUNCTION_ORDINARY;
+
+/*
+ <__operator> ::= "__operator" <overriden_op>
+
+note: this is an extension to the standard language specification - normally slang disallows
+ operator prototypes and definitions
+*/
+__operator
+ "__operator" .and overriden_operator .error INVALID_OPERATOR_OVERRIDE;
+
+/*
+ <overriden_op> ::= "="
+ | "+="
+ | "-="
+ | "*="
+ | "/="
+ | "%=" // reserved
+ | "<<=" // reserved
+ | ">>=" // reserved
+ | "&=" // reserved
+ | "^=" // reserved
+ | "|=" // reserved
+ | "^^"
+ | "|" // reserved
+ | "^" // reserved
+ | "&" // reserved
+ | "=="
+ | "!="
+ | "<"
+ | ">"
+ | "<="
+ | ">="
+ | "<<" // reserved
+ | ">>" // reserved
+ | "*"
+ | "/"
+ | "%" // reserved
+ | "++"
+ | "--"
+ | "+"
+ | "-"
+ | "~" // reserved
+ | "!"
+
+note: this is an extension to the standard language specification - normally slang disallows
+ operator prototypes and definitions
+*/
+overriden_operator
+ plusplus .emit OPERATOR_INCREMENT .or
+ plusequals .emit OPERATOR_ADDASSIGN .or
+ plus .emit OPERATOR_PLUS .or
+ minusminus .emit OPERATOR_DECREMENT .or
+ minusequals .emit OPERATOR_SUBASSIGN .or
+ minus .emit OPERATOR_MINUS .or
+ bang .emit OPERATOR_NOT .or
+ starequals .emit OPERATOR_MULASSIGN .or
+ star .emit OPERATOR_MULTIPLY .or
+ slashequals .emit OPERATOR_DIVASSIGN .or
+ slash .emit OPERATOR_DIVIDE .or
+ lessequals .emit OPERATOR_LESSEQUAL .or
+ /*lesslessequals .emit OPERATOR_LSHASSIGN .or*/
+ /*lessless .emit OPERATOR_LSHIFT .or*/
+ less .emit OPERATOR_LESS .or
+ greaterequals .emit OPERATOR_GREATEREQUAL .or
+ /*greatergreaterequals .emit OPERATOR_RSHASSIGN .or*/
+ /*greatergreater .emit OPERATOR_RSHIFT .or*/
+ greater .emit OPERATOR_GREATER .or
+ /*percentequals .emit OPERATOR_MODASSIGN .or*/
+ /*percent .emit OPERATOR_MODULUS .or*/
+ /*ampersandequals .emit OPERATOR_ANDASSIGN */
+ /*ampersand .emit OPERATOR_BITAND .or*/
+ /*barequals .emit OPERATOR_ORASSIGN .or*/
+ /*bar .emit OPERATOR_BITOR .or*/
+ /*tilde .emit OPERATOR_COMPLEMENT .or*/
+ /*caretequals .emit OPERATOR_XORASSIGN .or*/
+ caretcaret .emit OPERATOR_LOGICALXOR /*.or
+ caret .emit OPERATOR_BITXOR*/;
+
+/*
+ <parameter_declarator> ::= <type_specifier> <identifier>
+ | <type_specifier> <identifier> "[" <constant_expression>
+ "]"
+*/
+parameter_declarator
+ parameter_declarator_nospace .or parameter_declarator_space;
+parameter_declarator_nospace
+ type_specifier_nospace .and identifier .and parameter_declarator_1;
+parameter_declarator_space
+ type_specifier_space .and space .and identifier .and parameter_declarator_1;
+parameter_declarator_1
+ parameter_declarator_2 .emit PARAMETER_ARRAY_PRESENT .or
+ .true .emit PARAMETER_ARRAY_NOT_PRESENT;
+parameter_declarator_2
+ lbracket .and constant_expression .and rbracket;
+
+/*
+ <parameter_declaration> ::= <type_qualifier> <parameter_qualifier>
+ <parameter_declarator>
+ | <type_qualifier> <parameter_qualifier>
+ <parameter_type_specifier>
+ | <parameter_qualifier> <parameter_declarator>
+ | <parameter_qualifier> <parameter_type_specifier>
+*/
+parameter_declaration
+ parameter_declaration_1 .emit PARAMETER_NEXT;
+parameter_declaration_1
+ parameter_declaration_2 .or parameter_declaration_3;
+parameter_declaration_2
+ type_qualifier .and space .and parameter_qualifier .and parameter_declaration_4;
+parameter_declaration_3
+ parameter_qualifier .emit TYPE_QUALIFIER_NONE .and parameter_declaration_4;
+parameter_declaration_4
+ parameter_declarator .or parameter_type_specifier;
+
+/*
+ <parameter_qualifier> ::= "in"
+ | "out"
+ | "inout"
+ | ""
+*/
+parameter_qualifier
+ parameter_qualifier_1 .or .true .emit PARAM_QUALIFIER_IN;
+parameter_qualifier_1
+ parameter_qualifier_2 .and space;
+parameter_qualifier_2
+ "in" .emit PARAM_QUALIFIER_IN .or
+ "out" .emit PARAM_QUALIFIER_OUT .or
+ "inout" .emit PARAM_QUALIFIER_INOUT;
+
+/*
+ <parameter_type_specifier> ::= <type_specifier>
+ | <type_specifier> "[" <constant_expression> "]"
+*/
+parameter_type_specifier
+ parameter_type_specifier_1 .and .true .emit '\0' .and parameter_type_specifier_2;
+parameter_type_specifier_1
+ type_specifier_nospace .or type_specifier_space;
+parameter_type_specifier_2
+ parameter_type_specifier_3 .emit PARAMETER_ARRAY_PRESENT .or
+ .true .emit PARAMETER_ARRAY_NOT_PRESENT;
+parameter_type_specifier_3
+ lbracket .and constant_expression .and rbracket;
+
+/*
+ <init_declarator_list> ::= <single_declaration>
+ | <init_declarator_list> "," <identifier>
+ | <init_declarator_list> "," <identifier> "[" "]"
+ | <init_declarator_list> "," <identifier> "["
+ <constant_expression> "]"
+ | <init_declarator_list> "," <identifier> "="
+ <initializer>
+*/
+init_declarator_list
+ single_declaration .and .loop init_declarator_list_1 .emit DECLARATOR_NEXT .and
+ .true .emit DECLARATOR_NONE;
+init_declarator_list_1
+ comma .and identifier .emit VARIABLE_IDENTIFIER .and init_declarator_list_2;
+init_declarator_list_2
+ init_declarator_list_3 .or init_declarator_list_4 .or .true .emit VARIABLE_NONE;
+init_declarator_list_3
+ equals .and initializer .emit VARIABLE_INITIALIZER;
+init_declarator_list_4
+ lbracket .and init_declarator_list_5 .and rbracket;
+init_declarator_list_5
+ constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN;
+
+/*
+ <single_declaration> ::= <fully_specified_type>
+ | <fully_specified_type> <identifier>
+ | <fully_specified_type> <identifier> "[" "]"
+ | <fully_specified_type> <identifier> "["
+ <constant_expression> "]"
+ | <fully_specified_type> <identifier> "=" <initializer>
+*/
+single_declaration
+ single_declaration_nospace .or single_declaration_space;
+single_declaration_space
+ fully_specified_type_space .and single_declaration_space_1;
+single_declaration_nospace
+ fully_specified_type_nospace .and single_declaration_nospace_1;
+single_declaration_space_1
+ single_declaration_space_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE;
+single_declaration_nospace_1
+ single_declaration_nospace_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE;
+single_declaration_space_2
+ space .and identifier .and single_declaration_3;
+single_declaration_nospace_2
+ identifier .and single_declaration_3;
+single_declaration_3
+ single_declaration_4 .or single_declaration_5 .or .true .emit VARIABLE_NONE;
+single_declaration_4
+ equals .and initializer .emit VARIABLE_INITIALIZER;
+single_declaration_5
+ lbracket .and single_declaration_6 .and rbracket;
+single_declaration_6
+ constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN;
+
+/*
+ <fully_specified_type> ::= <type_specifier>
+ | <type_qualifier> <type_specifier>
+*/
+fully_specified_type_space
+ fully_specified_type_1 .and type_specifier_space;
+fully_specified_type_nospace
+ fully_specified_type_1 .and type_specifier_nospace;
+fully_specified_type_1
+ fully_specified_type_2 .or .true .emit TYPE_QUALIFIER_NONE;
+fully_specified_type_2
+ type_qualifier .and space;
+
+/*
+ <type_qualifier> ::= "const"
+ | "attribute" // Vertex only.
+ | "varying"
+ | "uniform"
+ | "__fixed_output"
+ | "__fixed_input"
+
+note: this is an extension to the standard language specification - normally slang disallows
+ __fixed_output and __fixed_input type qualifiers
+*/
+type_qualifier
+ "const" .emit TYPE_QUALIFIER_CONST .or
+ .if (shader_type == 2) "attribute" .emit TYPE_QUALIFIER_ATTRIBUTE .or
+ "varying" .emit TYPE_QUALIFIER_VARYING .or
+ "uniform" .emit TYPE_QUALIFIER_UNIFORM .or
+ .if (parsing_builtin != 0) "__fixed_output" .emit TYPE_QUALIFIER_FIXEDOUTPUT .or
+ .if (parsing_builtin != 0) "__fixed_input" .emit TYPE_QUALIFIER_FIXEDINPUT;
+
+/*
+ <type_specifier> ::= "void"
+ | "float"
+ | "int"
+ | "bool"
+ | "vec2"
+ | "vec3"
+ | "vec4"
+ | "bvec2"
+ | "bvec3"
+ | "bvec4"
+ | "ivec2"
+ | "ivec3"
+ | "ivec4"
+ | "mat2"
+ | "mat3"
+ | "mat4"
+ | "sampler1D"
+ | "sampler2D"
+ | "sampler3D"
+ | "samplerCube"
+ | "sampler1DShadow"
+ | "sampler2DShadow"
+ | <struct_specifier>
+ | <type_name>
+*/
+type_specifier_space
+ "void" .emit TYPE_SPECIFIER_VOID .or
+ "float" .emit TYPE_SPECIFIER_FLOAT .or
+ "int" .emit TYPE_SPECIFIER_INT .or
+ "bool" .emit TYPE_SPECIFIER_BOOL .or
+ "vec2" .emit TYPE_SPECIFIER_VEC2 .or
+ "vec3" .emit TYPE_SPECIFIER_VEC3 .or
+ "vec4" .emit TYPE_SPECIFIER_VEC4 .or
+ "bvec2" .emit TYPE_SPECIFIER_BVEC2 .or
+ "bvec3" .emit TYPE_SPECIFIER_BVEC3 .or
+ "bvec4" .emit TYPE_SPECIFIER_BVEC4 .or
+ "ivec2" .emit TYPE_SPECIFIER_IVEC2 .or
+ "ivec3" .emit TYPE_SPECIFIER_IVEC3 .or
+ "ivec4" .emit TYPE_SPECIFIER_IVEC4 .or
+ "mat2" .emit TYPE_SPECIFIER_MAT2 .or
+ "mat3" .emit TYPE_SPECIFIER_MAT3 .or
+ "mat4" .emit TYPE_SPECIFIER_MAT4 .or
+ "sampler1D" .emit TYPE_SPECIFIER_SAMPLER1D .or
+ "sampler2D" .emit TYPE_SPECIFIER_SAMPLER2D .or
+ "sampler3D" .emit TYPE_SPECIFIER_SAMPLER3D .or
+ "samplerCube" .emit TYPE_SPECIFIER_SAMPLERCUBE .or
+ "sampler1DShadow" .emit TYPE_SPECIFIER_SAMPLER1DSHADOW .or
+ "sampler2DShadow" .emit TYPE_SPECIFIER_SAMPLER2DSHADOW .or
+ type_name .emit TYPE_SPECIFIER_TYPENAME;
+type_specifier_nospace
+ struct_specifier .emit TYPE_SPECIFIER_STRUCT;
+
+/*
+ <struct_specifier> ::= "struct" <identifier> "{" <struct_declaration_list> "}"
+ | "struct" "{" <struct_declaration_list> "}"
+*/
+struct_specifier
+ "struct" .and struct_specifier_1 .and optional_space .and lbrace .error LBRACE_EXPECTED .and
+ struct_declaration_list .and rbrace .emit FIELD_NONE;
+struct_specifier_1
+ struct_specifier_2 .or .true .emit '\0';
+struct_specifier_2
+ space .and identifier;
+
+/*
+ <struct_declaration_list> ::= <struct_declaration>
+ | <struct_declaration_list> <struct_declaration>
+*/
+struct_declaration_list
+ struct_declaration .and .loop struct_declaration .emit FIELD_NEXT;
+
+/*
+ <struct_declaration> ::= <type_specifier> <struct_declarator_list> ";"
+*/
+struct_declaration
+ struct_declaration_nospace .or struct_declaration_space;
+struct_declaration_space
+ type_specifier_space .and space .and struct_declarator_list .and semicolon .emit FIELD_NONE;
+struct_declaration_nospace
+ type_specifier_nospace .and struct_declarator_list .and semicolon .emit FIELD_NONE;
+
+/*
+ <struct_declarator_list> ::= <struct_declarator>
+ | <struct_declarator_list> "," <struct_declarator>
+*/
+struct_declarator_list
+ struct_declarator .and .loop struct_declarator_list_1 .emit FIELD_NEXT;
+struct_declarator_list_1
+ comma .and struct_declarator;
+
+/*
+ <struct_declarator> ::= <identifier>
+ | <identifier> "[" <constant_expression> "]"
+*/
+struct_declarator
+ identifier .and struct_declarator_1;
+struct_declarator_1
+ struct_declarator_2 .emit FIELD_ARRAY .or .true .emit FIELD_NONE;
+struct_declarator_2
+ lbracket .and constant_expression .and rbracket;
+
+/*
+ <initializer> ::= <assignment_expression>
+*/
+initializer
+ assignment_expression .and .true .emit OP_END;
+
+/*
+ <declaration_statement> ::= <declaration>
+*/
+declaration_statement
+ declaration;
+
+/*
+ <statement> ::= <compound_statement>
+ | <simple_statement>
+*/
+statement
+ compound_statement .or simple_statement;
+statement_space
+ compound_statement .or statement_space_1;
+statement_space_1
+ space .and simple_statement;
+
+/*
+ <simple_statement> ::= <__asm_statement>
+ | <selection_statement>
+ | <iteration_statement>
+ | <jump_statement>
+ | <expression_statement>
+ | <declaration_statement>
+
+note: this is an extension to the standard language specification - normally slang disallows
+ use of __asm statements
+*/
+simple_statement
+ .if (parsing_builtin != 0) __asm_statement .emit OP_ASM .or
+ selection_statement .or
+ iteration_statement .or
+ jump_statement .or
+ expression_statement .emit OP_EXPRESSION .or
+ declaration_statement .emit OP_DECLARE;
+
+/*
+ <compound_statement> ::= "{" "}"
+ | "{" <statement_list> "}"
+*/
+compound_statement
+ compound_statement_1 .emit OP_BLOCK_BEGIN_NEW_SCOPE .and .true .emit OP_END;
+compound_statement_1
+ compound_statement_2 .or compound_statement_3;
+compound_statement_2
+ lbrace .and rbrace;
+compound_statement_3
+ lbrace .and statement_list .and rbrace;
+
+/*
+ <statement_no_new_scope> ::= <compound_statement_no_new_scope>
+ | <simple_statement>
+*/
+statement_no_new_scope
+ compound_statement_no_new_scope .or simple_statement;
+
+/*
+ <compound_statement_no_new_scope> ::= "{" "}"
+ | "{" <statement_list> "}"
+*/
+compound_statement_no_new_scope
+ compound_statement_no_new_scope_1 .emit OP_BLOCK_BEGIN_NO_NEW_SCOPE .and .true .emit OP_END;
+compound_statement_no_new_scope_1
+ compound_statement_no_new_scope_2 .or compound_statement_no_new_scope_3;
+compound_statement_no_new_scope_2
+ lbrace .and rbrace;
+compound_statement_no_new_scope_3
+ lbrace .and statement_list .and rbrace;
+
+/*
+ <statement_list> ::= <statement>
+ | <statement_list> <statement>
+*/
+statement_list
+ statement .and .loop statement;
+
+/*
+ <expression_statement> ::= ";"
+ | <expression> ";"
+*/
+expression_statement
+ expression_statement_1 .or expression_statement_2;
+expression_statement_1
+ semicolon .emit OP_PUSH_VOID .emit OP_END;
+expression_statement_2
+ expression .and semicolon .emit OP_END;
+
+/*
+ <selection_statement> ::= "if" "(" <expression> ")" <selection_rest_statement>
+*/
+selection_statement
+ "if" .emit OP_IF .and lparen .error LPAREN_EXPECTED .and expression .and
+ rparen .error RPAREN_EXPECTED .emit OP_END .and selection_rest_statement;
+
+/*
+ <selection_rest_statement> ::= <statement> "else" <statement>
+ | <statement>
+*/
+selection_rest_statement
+ statement .and selection_rest_statement_1;
+selection_rest_statement_1
+ selection_rest_statement_2 .or .true .emit OP_EXPRESSION .emit OP_PUSH_VOID .emit OP_END;
+selection_rest_statement_2
+ "else" .and optional_space .and statement;
+
+/*
+ <condition> ::= <expression>
+ | <fully_specified_type> <identifier> "=" <initializer>
+
+note: if <condition_1> is executed, the emit format must match <declaration> emit format
+*/
+condition
+ condition_1 .emit OP_DECLARE .emit DECLARATION_INIT_DECLARATOR_LIST .or
+ condition_3 .emit OP_EXPRESSION;
+condition_1
+ condition_1_nospace .or condition_1_space;
+condition_1_nospace
+ fully_specified_type_nospace .and condition_2;
+condition_1_space
+ fully_specified_type_space .and space .and condition_2;
+condition_2
+ identifier .emit VARIABLE_IDENTIFIER .and equals .emit VARIABLE_INITIALIZER .and
+ initializer .and .true .emit DECLARATOR_NONE;
+condition_3
+ expression .and .true .emit OP_END;
+
+/*
+ <iteration_statement> ::= "while" "(" <condition> ")" <statement_no_new_scope>
+ | "do" <statement> "while" "(" <expression> ")" ";"
+ | "for" "(" <for_init_statement> <for_rest_statement> ")"
+ <statement_no_new_scope>
+*/
+iteration_statement
+ iteration_statement_1 .or iteration_statement_2 .or iteration_statement_3;
+iteration_statement_1
+ "while" .emit OP_WHILE .and lparen .error LPAREN_EXPECTED .and condition .and
+ rparen .error RPAREN_EXPECTED .and statement_no_new_scope;
+iteration_statement_2
+ "do" .emit OP_DO .and statement_space .and "while" .and lparen .error LPAREN_EXPECTED .and
+ expression .and rparen .error RPAREN_EXPECTED .emit OP_END .and semicolon;
+iteration_statement_3
+ "for" .emit OP_FOR .and lparen .error LPAREN_EXPECTED .and for_init_statement .and
+ for_rest_statement .and rparen .error RPAREN_EXPECTED .and statement_no_new_scope;
+
+/*
+ <for_init_statement> ::= <expression_statement>
+ | <declaration_statement>
+*/
+for_init_statement
+ expression_statement .emit OP_EXPRESSION .or declaration_statement .emit OP_DECLARE;
+
+/*
+ <conditionopt> ::= <condition>
+ | ""
+
+note: <conditionopt> is used only by "for" statement - if <condition> is ommitted, parser
+ simulates default behaviour, that is simulates "true" expression
+*/
+conditionopt
+ condition .or
+ .true .emit OP_EXPRESSION .emit OP_PUSH_BOOL .emit 2 .emit '1' .emit '\0' .emit OP_END;
+
+/*
+ <for_rest_statement> ::= <conditionopt> ";"
+ | <conditionopt> ";" <expression>
+*/
+for_rest_statement
+ conditionopt .and semicolon .and for_rest_statement_1;
+for_rest_statement_1
+ for_rest_statement_2 .or .true .emit OP_PUSH_VOID .emit OP_END;
+for_rest_statement_2
+ expression .and .true .emit OP_END;
+
+/*
+ <jump_statement> ::= "continue" ";"
+ | "break" ";"
+ | "return" ";"
+ | "return" <expression> ";"
+ | "discard" ";" // Fragment shader only.
+*/
+jump_statement
+ jump_statement_1 .or jump_statement_2 .or jump_statement_3 .or jump_statement_4 .or
+ .if (shader_type == 1) jump_statement_5;
+jump_statement_1
+ "continue" .and semicolon .emit OP_CONTINUE;
+jump_statement_2
+ "break" .and semicolon .emit OP_BREAK;
+jump_statement_3
+ "return" .emit OP_RETURN .and optional_space .and expression .and semicolon .emit OP_END;
+jump_statement_4
+ "return" .emit OP_RETURN .and semicolon .emit OP_PUSH_VOID .emit OP_END;
+jump_statement_5
+ "discard" .and semicolon .emit OP_DISCARD;
+
+/*
+ <__asm_statement> ::= "__asm" <identifier> <asm_arguments> ";"
+
+note: this is an extension to the standard language specification - normally slang disallows
+ __asm statements
+*/
+__asm_statement
+ "__asm" .and space .and identifier .and space .and asm_arguments .and semicolon .emit OP_END;
+
+/*
+ <asm_arguments> ::= <asm_argument>
+ | <asm_arguments> "," <asm_argument>
+
+note: this is an extension to the standard language specification - normally slang disallows
+ __asm statements
+*/
+asm_arguments
+ asm_argument .and .true .emit OP_END .and .loop asm_arguments_1;
+asm_arguments_1
+ comma .and asm_argument .and .true .emit OP_END;
+
+/*
+ <asm_argument> ::= <variable_identifier>
+ | <floatconstant>
+
+note: this is an extension to the standard language specification - normally slang disallows
+ __asm statements
+*/
+asm_argument
+ variable_identifier .or floatconstant;
+
+/*
+ <translation_unit> ::= <external_declaration>
+ | <translation_unit> <external_declaration>
+*/
+translation_unit
+ optional_space .emit REVISION .and external_declaration .error INVALID_EXTERNAL_DECLARATION .and
+ .loop external_declaration .and optional_space .and
+ '\0' .error INVALID_EXTERNAL_DECLARATION .emit EXTERNAL_NULL;
+
+/*
+ <external_declaration> ::= <function_definition>
+ | <declaration>
+*/
+external_declaration
+ function_definition .emit EXTERNAL_FUNCTION_DEFINITION .or
+ declaration .emit EXTERNAL_DECLARATION;
+
+/*
+ <function_definition> :: <function_prototype> <compound_statement_no_new_scope>
+*/
+function_definition
+ function_prototype .and compound_statement_no_new_scope;
+
+/* helper rulez, not part of the official language syntax */
+
+digit_oct
+ '0'-'7';
+
+digit_dec
+ '0'-'9';
+
+digit_hex
+ '0'-'9' .or 'A'-'F' .or 'a'-'f';
+
+id_character_first
+ 'a'-'z' .or 'A'-'Z' .or '_';
+
+id_character_next
+ id_character_first .or digit_dec;
+
+identifier
+ id_character_first .emit * .and .loop id_character_next .emit * .and .true .emit '\0';
+
+float
+ float_1 .or float_2;
+float_1
+ float_fractional_constant .and float_optional_exponent_part;
+float_2
+ float_digit_sequence .and .true .emit '\0' .and float_exponent_part;
+
+float_fractional_constant
+ float_fractional_constant_1 .or float_fractional_constant_2 .or float_fractional_constant_3;
+float_fractional_constant_1
+ float_digit_sequence .and '.' .and float_digit_sequence;
+float_fractional_constant_2
+ float_digit_sequence .and '.' .and .true .emit '\0';
+float_fractional_constant_3
+ '.' .emit '\0' .and float_digit_sequence;
+
+float_optional_exponent_part
+ float_exponent_part .or .true .emit '\0';
+
+float_digit_sequence
+ digit_dec .emit * .and .loop digit_dec .emit * .and .true .emit '\0';
+
+float_exponent_part
+ float_exponent_part_1 .or float_exponent_part_2;
+float_exponent_part_1
+ 'e' .and float_optional_sign .and float_digit_sequence;
+float_exponent_part_2
+ 'E' .and float_optional_sign .and float_digit_sequence;
+
+float_optional_sign
+ float_sign .or .true;
+
+float_sign
+ '+' .or '-' .emit '-';
+
+integer
+ integer_hex .or integer_oct .or integer_dec;
+
+integer_hex
+ '0' .and integer_hex_1 .emit 0x10 .and digit_hex .emit * .and .loop digit_hex .emit * .and
+ .true .emit '\0';
+integer_hex_1
+ 'x' .or 'X';
+
+integer_oct
+ '0' .emit 8 .emit * .and .loop digit_oct .emit * .and .true .emit '\0';
+
+integer_dec
+ digit_dec .emit 10 .emit * .and .loop digit_dec .emit * .and .true .emit '\0';
+
+boolean
+ "true" .emit 2 .emit '1' .emit '\0' .or
+ "false" .emit 2 .emit '0' .emit '\0';
+
+type_name
+ identifier;
+
+field_selection
+ identifier;
+
+floatconstant
+ float .emit OP_PUSH_FLOAT;
+
+intconstant
+ integer .emit OP_PUSH_INT;
+
+boolconstant
+ boolean .emit OP_PUSH_BOOL;
+
+optional_space
+ .loop single_space;
+
+space
+ single_space .and .loop single_space;
+
+single_space
+ white_char .or c_style_comment_block .or cpp_style_comment_block;
+
+white_char
+ ' ' .or '\t' .or new_line .or '\v' .or '\f';
+
+new_line
+ cr_lf .or lf_cr .or '\n' .or '\r';
+
+cr_lf
+ '\r' .and '\n';
+
+lf_cr
+ '\n' .and '\r';
+
+c_style_comment_block
+ '/' .and '*' .and c_style_comment_rest;
+
+c_style_comment_rest
+ .loop c_style_comment_char_no_star .and c_style_comment_rest_1;
+c_style_comment_rest_1
+ c_style_comment_end .or c_style_comment_rest_2;
+c_style_comment_rest_2
+ '*' .and c_style_comment_rest;
+
+c_style_comment_char_no_star
+ '\x2B'-'\xFF' .or '\x01'-'\x29';
+
+c_style_comment_end
+ '*' .and '/';
+
+cpp_style_comment_block
+ '/' .and '/' .and cpp_style_comment_block_1;
+cpp_style_comment_block_1
+ cpp_style_comment_block_2 .or cpp_style_comment_block_3;
+cpp_style_comment_block_2
+ .loop cpp_style_comment_char .and new_line;
+cpp_style_comment_block_3
+ .loop cpp_style_comment_char;
+
+cpp_style_comment_char
+ '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C';
+
+/* lexical rulez */
+
+/*ampersand
+ optional_space .and '&' .and optional_space;*/
+
+ampersandampersand
+ optional_space .and '&' .and '&' .and optional_space;
+
+/*ampersandequals
+ optional_space .and '&' .and '=' .and optional_space;*/
+
+/*bar
+ optional_space .and '|' .and optional_space;*/
+
+barbar
+ optional_space .and '|' .and '|' .and optional_space;
+
+/*barequals
+ optional_space .and '|' .and '=' .and optional_space;*/
+
+bang
+ optional_space .and '!' .and optional_space;
+
+bangequals
+ optional_space .and '!' .and '=' .and optional_space;
+
+/*caret
+ optional_space .and '^' .and optional_space;*/
+
+caretcaret
+ optional_space .and '^' .and '^' .and optional_space;
+
+/*caretequals
+ optional_space .and '^' .and '=' .and optional_space;*/
+
+colon
+ optional_space .and ':' .and optional_space;
+
+comma
+ optional_space .and ',' .and optional_space;
+
+dot
+ optional_space .and '.' .and optional_space;
+
+equals
+ optional_space .and '=' .and optional_space;
+
+equalsequals
+ optional_space .and '=' .and '=' .and optional_space;
+
+greater
+ optional_space .and '>' .and optional_space;
+
+greaterequals
+ optional_space .and '>' .and '=' .and optional_space;
+
+/*greatergreater
+ optional_space .and '>' .and '>' .and optional_space;*/
+
+/*greatergreaterequals
+ optional_space .and '>' .and '>' .and '=' .and optional_space;*/
+
+lbrace
+ optional_space .and '{' .and optional_space;
+
+lbracket
+ optional_space .and '[' .and optional_space;
+
+less
+ optional_space .and '<' .and optional_space;
+
+lessequals
+ optional_space .and '<' .and '=' .and optional_space;
+
+/*lessless
+ optional_space .and '<' .and '<' .and optional_space;*/
+
+/*lesslessequals
+ optional_space .and '<' .and '<' .and '=' .and optional_space;*/
+
+lparen
+ optional_space .and '(' .and optional_space;
+
+minus
+ optional_space .and '-' .and optional_space;
+
+minusequals
+ optional_space .and '-' .and '=' .and optional_space;
+
+minusminus
+ optional_space .and '-' .and '-' .and optional_space;
+
+/*percent
+ optional_space .and '%' .and optional_space;*/
+
+/*percentequals
+ optional_space .and '%' .and '=' .and optional_space;*/
+
+plus
+ optional_space .and '+' .and optional_space;
+
+plusequals
+ optional_space .and '+' .and '=' .and optional_space;
+
+plusplus
+ optional_space .and '+' .and '+' .and optional_space;
+
+question
+ optional_space .and '?' .and optional_space;
+
+rbrace
+ optional_space .and '}' .and optional_space;
+
+rbracket
+ optional_space .and ']' .and optional_space;
+
+rparen
+ optional_space .and ')' .and optional_space;
+
+semicolon
+ optional_space .and ';' .and optional_space;
+
+slash
+ optional_space .and '/' .and optional_space;
+
+slashequals
+ optional_space .and '/' .and '=' .and optional_space;
+
+star
+ optional_space .and '*' .and optional_space;
+
+starequals
+ optional_space .and '*' .and '=' .and optional_space;
+
+/*tilde
+ optional_space .and '~' .and optional_space;*/
+
+/* string rulez - these are used internally by the parser when parsing quoted strings */
+
+.string string_lexer;
+
+string_lexer
+ lex_first_identifier_character .and .loop lex_next_identifier_character;
+
+lex_first_identifier_character
+ 'a'-'z' .or 'A'-'Z' .or '_';
+
+lex_next_identifier_character
+ 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_';
+
+/* error rulez - these are used by error messages */
+
+err_token
+ '~' .or '`' .or '!' .or '@' .or '#' .or '$' .or '%' .or '^' .or '&' .or '*' .or '(' .or ')' .or
+ '-' .or '+' .or '=' .or '|' .or '\\' .or '[' .or ']' .or '{' .or '}' .or ':' .or ';' .or '"' .or
+ '\'' .or '<' .or ',' .or '>' .or '.' .or '/' .or '?' .or err_identifier;
+
+err_identifier
+ id_character_first .and .loop id_character_next;
+
diff --git a/src/mesa/shader/slang/library/slang_shader_syn.h b/src/mesa/shader/slang/library/slang_shader_syn.h
index 62433d796f..6ee8145ab2 100644
--- a/src/mesa/shader/slang/library/slang_shader_syn.h
+++ b/src/mesa/shader/slang/library/slang_shader_syn.h
@@ -1,758 +1,758 @@
-".syntax translation_unit;\n"
-".emtcode REVISION 3\n"
-".emtcode EXTERNAL_NULL 0\n"
-".emtcode EXTERNAL_FUNCTION_DEFINITION 1\n"
-".emtcode EXTERNAL_DECLARATION 2\n"
-".emtcode DECLARATION_FUNCTION_PROTOTYPE 1\n"
-".emtcode DECLARATION_INIT_DECLARATOR_LIST 2\n"
-".emtcode FUNCTION_ORDINARY 0\n"
-".emtcode FUNCTION_CONSTRUCTOR 1\n"
-".emtcode FUNCTION_OPERATOR 2\n"
-".emtcode OPERATOR_ADDASSIGN 1\n"
-".emtcode OPERATOR_SUBASSIGN 2\n"
-".emtcode OPERATOR_MULASSIGN 3\n"
-".emtcode OPERATOR_DIVASSIGN 4\n"
-".emtcode OPERATOR_LOGICALXOR 11\n"
-".emtcode OPERATOR_LESS 15\n"
-".emtcode OPERATOR_GREATER 16\n"
-".emtcode OPERATOR_LESSEQUAL 17\n"
-".emtcode OPERATOR_GREATEREQUAL 18\n"
-".emtcode OPERATOR_MULTIPLY 21\n"
-".emtcode OPERATOR_DIVIDE 22\n"
-".emtcode OPERATOR_INCREMENT 24\n"
-".emtcode OPERATOR_DECREMENT 25\n"
-".emtcode OPERATOR_PLUS 26\n"
-".emtcode OPERATOR_MINUS 27\n"
-".emtcode OPERATOR_NOT 29\n"
-".emtcode DECLARATOR_NONE 0\n"
-".emtcode DECLARATOR_NEXT 1\n"
-".emtcode VARIABLE_NONE 0\n"
-".emtcode VARIABLE_IDENTIFIER 1\n"
-".emtcode VARIABLE_INITIALIZER 2\n"
-".emtcode VARIABLE_ARRAY_EXPLICIT 3\n"
-".emtcode VARIABLE_ARRAY_UNKNOWN 4\n"
-".emtcode TYPE_QUALIFIER_NONE 0\n"
-".emtcode TYPE_QUALIFIER_CONST 1\n"
-".emtcode TYPE_QUALIFIER_ATTRIBUTE 2\n"
-".emtcode TYPE_QUALIFIER_VARYING 3\n"
-".emtcode TYPE_QUALIFIER_UNIFORM 4\n"
-".emtcode TYPE_QUALIFIER_FIXEDOUTPUT 5\n"
-".emtcode TYPE_QUALIFIER_FIXEDINPUT 6\n"
-".emtcode TYPE_SPECIFIER_VOID 0\n"
-".emtcode TYPE_SPECIFIER_BOOL 1\n"
-".emtcode TYPE_SPECIFIER_BVEC2 2\n"
-".emtcode TYPE_SPECIFIER_BVEC3 3\n"
-".emtcode TYPE_SPECIFIER_BVEC4 4\n"
-".emtcode TYPE_SPECIFIER_INT 5\n"
-".emtcode TYPE_SPECIFIER_IVEC2 6\n"
-".emtcode TYPE_SPECIFIER_IVEC3 7\n"
-".emtcode TYPE_SPECIFIER_IVEC4 8\n"
-".emtcode TYPE_SPECIFIER_FLOAT 9\n"
-".emtcode TYPE_SPECIFIER_VEC2 10\n"
-".emtcode TYPE_SPECIFIER_VEC3 11\n"
-".emtcode TYPE_SPECIFIER_VEC4 12\n"
-".emtcode TYPE_SPECIFIER_MAT2 13\n"
-".emtcode TYPE_SPECIFIER_MAT3 14\n"
-".emtcode TYPE_SPECIFIER_MAT4 15\n"
-".emtcode TYPE_SPECIFIER_SAMPLER1D 16\n"
-".emtcode TYPE_SPECIFIER_SAMPLER2D 17\n"
-".emtcode TYPE_SPECIFIER_SAMPLER3D 18\n"
-".emtcode TYPE_SPECIFIER_SAMPLERCUBE 19\n"
-".emtcode TYPE_SPECIFIER_SAMPLER1DSHADOW 20\n"
-".emtcode TYPE_SPECIFIER_SAMPLER2DSHADOW 21\n"
-".emtcode TYPE_SPECIFIER_STRUCT 22\n"
-".emtcode TYPE_SPECIFIER_TYPENAME 23\n"
-".emtcode FIELD_NONE 0\n"
-".emtcode FIELD_NEXT 1\n"
-".emtcode FIELD_ARRAY 2\n"
-".emtcode OP_END 0\n"
-".emtcode OP_BLOCK_BEGIN_NO_NEW_SCOPE 1\n"
-".emtcode OP_BLOCK_BEGIN_NEW_SCOPE 2\n"
-".emtcode OP_DECLARE 3\n"
-".emtcode OP_ASM 4\n"
-".emtcode OP_BREAK 5\n"
-".emtcode OP_CONTINUE 6\n"
-".emtcode OP_DISCARD 7\n"
-".emtcode OP_RETURN 8\n"
-".emtcode OP_EXPRESSION 9\n"
-".emtcode OP_IF 10\n"
-".emtcode OP_WHILE 11\n"
-".emtcode OP_DO 12\n"
-".emtcode OP_FOR 13\n"
-".emtcode OP_PUSH_VOID 14\n"
-".emtcode OP_PUSH_BOOL 15\n"
-".emtcode OP_PUSH_INT 16\n"
-".emtcode OP_PUSH_FLOAT 17\n"
-".emtcode OP_PUSH_IDENTIFIER 18\n"
-".emtcode OP_SEQUENCE 19\n"
-".emtcode OP_ASSIGN 20\n"
-".emtcode OP_ADDASSIGN 21\n"
-".emtcode OP_SUBASSIGN 22\n"
-".emtcode OP_MULASSIGN 23\n"
-".emtcode OP_DIVASSIGN 24\n"
-".emtcode OP_SELECT 31\n"
-".emtcode OP_LOGICALOR 32\n"
-".emtcode OP_LOGICALXOR 33\n"
-".emtcode OP_LOGICALAND 34\n"
-".emtcode OP_EQUAL 38\n"
-".emtcode OP_NOTEQUAL 39\n"
-".emtcode OP_LESS 40\n"
-".emtcode OP_GREATER 41\n"
-".emtcode OP_LESSEQUAL 42\n"
-".emtcode OP_GREATEREQUAL 43\n"
-".emtcode OP_ADD 46\n"
-".emtcode OP_SUBTRACT 47\n"
-".emtcode OP_MULTIPLY 48\n"
-".emtcode OP_DIVIDE 49\n"
-".emtcode OP_PREINCREMENT 51\n"
-".emtcode OP_PREDECREMENT 52\n"
-".emtcode OP_PLUS 53\n"
-".emtcode OP_MINUS 54\n"
-".emtcode OP_NOT 56\n"
-".emtcode OP_SUBSCRIPT 57\n"
-".emtcode OP_CALL 58\n"
-".emtcode OP_FIELD 59\n"
-".emtcode OP_POSTINCREMENT 60\n"
-".emtcode OP_POSTDECREMENT 61\n"
-".emtcode PARAM_QUALIFIER_IN 0\n"
-".emtcode PARAM_QUALIFIER_OUT 1\n"
-".emtcode PARAM_QUALIFIER_INOUT 2\n"
-".emtcode PARAMETER_NONE 0\n"
-".emtcode PARAMETER_NEXT 1\n"
-".emtcode PARAMETER_ARRAY_NOT_PRESENT 0\n"
-".emtcode PARAMETER_ARRAY_PRESENT 1\n"
-".errtext INVALID_EXTERNAL_DECLARATION \"error 2001: invalid external declaration\"\n"
-".errtext INVALID_OPERATOR_OVERRIDE \"error 2002: invalid operator override\"\n"
-".errtext LBRACE_EXPECTED \"error 2003: '{' expected but '$err_token$' found\"\n"
-".errtext LPAREN_EXPECTED \"error 2004: '(' expected but '$err_token$' found\"\n"
-".errtext RPAREN_EXPECTED \"error 2005: ')' expected but '$err_token$' found\"\n"
-".regbyte parsing_builtin 0\n"
-".regbyte shader_type 0\n"
-"variable_identifier\n"
-" identifier .emit OP_PUSH_IDENTIFIER;\n"
-"primary_expression\n"
-" floatconstant .or boolconstant .or intconstant .or variable_identifier .or primary_expression_1;\n"
-"primary_expression_1\n"
-" lparen .and expression .and rparen;\n"
-"postfix_expression\n"
-" postfix_expression_1 .and .loop postfix_expression_2;\n"
-"postfix_expression_1\n"
-" function_call .or primary_expression;\n"
-"postfix_expression_2\n"
-" postfix_expression_3 .or postfix_expression_4 .or\n"
-" plusplus .emit OP_POSTINCREMENT .or\n"
-" minusminus .emit OP_POSTDECREMENT;\n"
-"postfix_expression_3\n"
-" lbracket .and integer_expression .and rbracket .emit OP_SUBSCRIPT;\n"
-"postfix_expression_4\n"
-" dot .and field_selection .emit OP_FIELD;\n"
-"integer_expression\n"
-" expression;\n"
-"function_call\n"
-" function_call_generic .emit OP_CALL .and .true .emit OP_END;\n"
-"function_call_generic\n"
-" function_call_generic_1 .or function_call_generic_2;\n"
-"function_call_generic_1\n"
-" function_call_header_with_parameters .and rparen .error RPAREN_EXPECTED;\n"
-"function_call_generic_2\n"
-" function_call_header_no_parameters .and rparen .error RPAREN_EXPECTED;\n"
-"function_call_header_no_parameters\n"
-" function_call_header .and function_call_header_no_parameters_1;\n"
-"function_call_header_no_parameters_1\n"
-" \"void\" .or .true;\n"
-"function_call_header_with_parameters\n"
-" function_call_header .and assignment_expression .and .true .emit OP_END .and\n"
-" .loop function_call_header_with_parameters_1;\n"
-"function_call_header_with_parameters_1\n"
-" comma .and assignment_expression .and .true .emit OP_END;\n"
-"function_call_header\n"
-" function_identifier .and lparen;\n"
-"function_identifier\n"
-" identifier;\n"
-"unary_expression\n"
-" postfix_expression .or unary_expression_1 .or unary_expression_2 .or unary_expression_3 .or\n"
-" unary_expression_4 .or unary_expression_5;\n"
-"unary_expression_1\n"
-" plusplus .and unary_expression .and .true .emit OP_PREINCREMENT;\n"
-"unary_expression_2\n"
-" minusminus .and unary_expression .and .true .emit OP_PREDECREMENT;\n"
-"unary_expression_3\n"
-" plus .and unary_expression .and .true .emit OP_PLUS;\n"
-"unary_expression_4\n"
-" minus .and unary_expression .and .true .emit OP_MINUS;\n"
-"unary_expression_5\n"
-" bang .and unary_expression .and .true .emit OP_NOT;\n"
-"multiplicative_expression\n"
-" unary_expression .and .loop multiplicative_expression_1;\n"
-"multiplicative_expression_1\n"
-" multiplicative_expression_2 .or multiplicative_expression_3;\n"
-"multiplicative_expression_2\n"
-" star .and unary_expression .and .true .emit OP_MULTIPLY;\n"
-"multiplicative_expression_3\n"
-" slash .and unary_expression .and .true .emit OP_DIVIDE;\n"
-"additive_expression\n"
-" multiplicative_expression .and .loop additive_expression_1;\n"
-"additive_expression_1\n"
-" additive_expression_2 .or additive_expression_3;\n"
-"additive_expression_2\n"
-" plus .and multiplicative_expression .and .true .emit OP_ADD;\n"
-"additive_expression_3\n"
-" minus .and multiplicative_expression .and .true .emit OP_SUBTRACT;\n"
-"shift_expression\n"
-" additive_expression;\n"
-"relational_expression\n"
-" shift_expression .and .loop relational_expression_1;\n"
-"relational_expression_1\n"
-" relational_expression_2 .or relational_expression_3 .or relational_expression_4 .or\n"
-" relational_expression_5;\n"
-"relational_expression_2\n"
-" lessequals .and shift_expression .and .true .emit OP_LESSEQUAL;\n"
-"relational_expression_3\n"
-" greaterequals .and shift_expression .and .true .emit OP_GREATEREQUAL;\n"
-"relational_expression_4\n"
-" less .and shift_expression .and .true .emit OP_LESS;\n"
-"relational_expression_5\n"
-" greater .and shift_expression .and .true .emit OP_GREATER;\n"
-"equality_expression\n"
-" relational_expression .and .loop equality_expression_1;\n"
-"equality_expression_1\n"
-" equality_expression_2 .or equality_expression_3;\n"
-"equality_expression_2\n"
-" equalsequals .and relational_expression .and .true .emit OP_EQUAL;\n"
-"equality_expression_3\n"
-" bangequals .and relational_expression .and .true .emit OP_NOTEQUAL;\n"
-"and_expression\n"
-" equality_expression;\n"
-"exclusive_or_expression\n"
-" and_expression;\n"
-"inclusive_or_expression\n"
-" exclusive_or_expression;\n"
-"logical_and_expression\n"
-" inclusive_or_expression .and .loop logical_and_expression_1;\n"
-"logical_and_expression_1\n"
-" ampersandampersand .and inclusive_or_expression .and .true .emit OP_LOGICALAND;\n"
-"logical_xor_expression\n"
-" logical_and_expression .and .loop logical_xor_expression_1;\n"
-"logical_xor_expression_1\n"
-" caretcaret .and logical_and_expression .and .true .emit OP_LOGICALXOR;\n"
-"logical_or_expression\n"
-" logical_xor_expression .and .loop logical_or_expression_1;\n"
-"logical_or_expression_1\n"
-" barbar .and logical_xor_expression .and .true .emit OP_LOGICALOR;\n"
-"conditional_expression\n"
-" logical_or_expression .and .loop conditional_expression_1;\n"
-"conditional_expression_1\n"
-" question .and expression .and colon .and conditional_expression .and .true .emit OP_SELECT;\n"
-"assignment_expression\n"
-" assignment_expression_1 .or assignment_expression_2 .or assignment_expression_3 .or\n"
-" assignment_expression_4 .or assignment_expression_5 .or conditional_expression;\n"
-"assignment_expression_1\n"
-" unary_expression .and equals .and assignment_expression .and .true .emit OP_ASSIGN;\n"
-"assignment_expression_2\n"
-" unary_expression .and starequals .and assignment_expression .and .true .emit OP_MULASSIGN;\n"
-"assignment_expression_3\n"
-" unary_expression .and slashequals .and assignment_expression .and .true .emit OP_DIVASSIGN;\n"
-"assignment_expression_4\n"
-" unary_expression .and plusequals .and assignment_expression .and .true .emit OP_ADDASSIGN;\n"
-"assignment_expression_5\n"
-" unary_expression .and minusequals .and assignment_expression .and .true .emit OP_SUBASSIGN;\n"
-"expression\n"
-" assignment_expression .and .loop expression_1;\n"
-"expression_1\n"
-" comma .and assignment_expression .and .true .emit OP_SEQUENCE;\n"
-"constant_expression\n"
-" conditional_expression .and .true .emit OP_END;\n"
-"declaration\n"
-" declaration_1 .or declaration_2;\n"
-"declaration_1\n"
-" function_prototype .emit DECLARATION_FUNCTION_PROTOTYPE .and semicolon;\n"
-"declaration_2\n"
-" init_declarator_list .emit DECLARATION_INIT_DECLARATOR_LIST .and semicolon;\n"
-"function_prototype\n"
-" function_prototype_1 .or function_prototype_2;\n"
-"function_prototype_1\n"
-" function_header .and \"void\" .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE;\n"
-"function_prototype_2\n"
-" function_declarator .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE;\n"
-"function_declarator\n"
-" function_header_with_parameters .or function_header;\n"
-"function_header_with_parameters\n"
-" function_header .and parameter_declaration .and .loop function_header_with_parameters_1;\n"
-"function_header_with_parameters_1\n"
-" comma .and parameter_declaration;\n"
-"function_header\n"
-" function_header_nospace .or function_header_space;\n"
-"function_header_space\n"
-" fully_specified_type_space .and space .and function_decl_identifier .and lparen;\n"
-"function_header_nospace\n"
-" fully_specified_type_nospace .and function_decl_identifier .and lparen;\n"
-"function_decl_identifier\n"
-" .if (parsing_builtin != 0) __operator .emit FUNCTION_OPERATOR .or\n"
-" .if (parsing_builtin != 0) \"__constructor\" .emit FUNCTION_CONSTRUCTOR .or\n"
-" identifier .emit FUNCTION_ORDINARY;\n"
-"__operator\n"
-" \"__operator\" .and overriden_operator .error INVALID_OPERATOR_OVERRIDE;\n"
-"overriden_operator\n"
-" plusplus .emit OPERATOR_INCREMENT .or\n"
-" plusequals .emit OPERATOR_ADDASSIGN .or\n"
-" plus .emit OPERATOR_PLUS .or\n"
-" minusminus .emit OPERATOR_DECREMENT .or\n"
-" minusequals .emit OPERATOR_SUBASSIGN .or\n"
-" minus .emit OPERATOR_MINUS .or\n"
-" bang .emit OPERATOR_NOT .or\n"
-" starequals .emit OPERATOR_MULASSIGN .or\n"
-" star .emit OPERATOR_MULTIPLY .or\n"
-" slashequals .emit OPERATOR_DIVASSIGN .or\n"
-" slash .emit OPERATOR_DIVIDE .or\n"
-" lessequals .emit OPERATOR_LESSEQUAL .or\n"
-" \n"
-" \n"
-" less .emit OPERATOR_LESS .or\n"
-" greaterequals .emit OPERATOR_GREATEREQUAL .or\n"
-" \n"
-" \n"
-" greater .emit OPERATOR_GREATER .or\n"
-" \n"
-" \n"
-" \n"
-" \n"
-" \n"
-" \n"
-" \n"
-" \n"
-" caretcaret .emit OPERATOR_LOGICALXOR ;\n"
-"parameter_declarator\n"
-" parameter_declarator_nospace .or parameter_declarator_space;\n"
-"parameter_declarator_nospace\n"
-" type_specifier_nospace .and identifier .and parameter_declarator_1;\n"
-"parameter_declarator_space\n"
-" type_specifier_space .and space .and identifier .and parameter_declarator_1;\n"
-"parameter_declarator_1\n"
-" parameter_declarator_2 .emit PARAMETER_ARRAY_PRESENT .or\n"
-" .true .emit PARAMETER_ARRAY_NOT_PRESENT;\n"
-"parameter_declarator_2\n"
-" lbracket .and constant_expression .and rbracket;\n"
-"parameter_declaration\n"
-" parameter_declaration_1 .emit PARAMETER_NEXT;\n"
-"parameter_declaration_1\n"
-" parameter_declaration_2 .or parameter_declaration_3;\n"
-"parameter_declaration_2\n"
-" type_qualifier .and space .and parameter_qualifier .and parameter_declaration_4;\n"
-"parameter_declaration_3\n"
-" parameter_qualifier .emit TYPE_QUALIFIER_NONE .and parameter_declaration_4;\n"
-"parameter_declaration_4\n"
-" parameter_declarator .or parameter_type_specifier;\n"
-"parameter_qualifier\n"
-" parameter_qualifier_1 .or .true .emit PARAM_QUALIFIER_IN;\n"
-"parameter_qualifier_1\n"
-" parameter_qualifier_2 .and space;\n"
-"parameter_qualifier_2\n"
-" \"in\" .emit PARAM_QUALIFIER_IN .or\n"
-" \"out\" .emit PARAM_QUALIFIER_OUT .or\n"
-" \"inout\" .emit PARAM_QUALIFIER_INOUT;\n"
-"parameter_type_specifier\n"
-" parameter_type_specifier_1 .and .true .emit '\\0' .and parameter_type_specifier_2;\n"
-"parameter_type_specifier_1\n"
-" type_specifier_nospace .or type_specifier_space;\n"
-"parameter_type_specifier_2\n"
-" parameter_type_specifier_3 .emit PARAMETER_ARRAY_PRESENT .or\n"
-" .true .emit PARAMETER_ARRAY_NOT_PRESENT;\n"
-"parameter_type_specifier_3\n"
-" lbracket .and constant_expression .and rbracket;\n"
-"init_declarator_list\n"
-" single_declaration .and .loop init_declarator_list_1 .emit DECLARATOR_NEXT .and\n"
-" .true .emit DECLARATOR_NONE;\n"
-"init_declarator_list_1\n"
-" comma .and identifier .emit VARIABLE_IDENTIFIER .and init_declarator_list_2;\n"
-"init_declarator_list_2\n"
-" init_declarator_list_3 .or init_declarator_list_4 .or .true .emit VARIABLE_NONE;\n"
-"init_declarator_list_3\n"
-" equals .and initializer .emit VARIABLE_INITIALIZER;\n"
-"init_declarator_list_4\n"
-" lbracket .and init_declarator_list_5 .and rbracket;\n"
-"init_declarator_list_5\n"
-" constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN;\n"
-"single_declaration\n"
-" single_declaration_nospace .or single_declaration_space;\n"
-"single_declaration_space\n"
-" fully_specified_type_space .and single_declaration_space_1;\n"
-"single_declaration_nospace\n"
-" fully_specified_type_nospace .and single_declaration_nospace_1;\n"
-"single_declaration_space_1\n"
-" single_declaration_space_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE;\n"
-"single_declaration_nospace_1\n"
-" single_declaration_nospace_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE;\n"
-"single_declaration_space_2\n"
-" space .and identifier .and single_declaration_3;\n"
-"single_declaration_nospace_2\n"
-" identifier .and single_declaration_3;\n"
-"single_declaration_3\n"
-" single_declaration_4 .or single_declaration_5 .or .true .emit VARIABLE_NONE;\n"
-"single_declaration_4\n"
-" equals .and initializer .emit VARIABLE_INITIALIZER;\n"
-"single_declaration_5\n"
-" lbracket .and single_declaration_6 .and rbracket;\n"
-"single_declaration_6\n"
-" constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN;\n"
-"fully_specified_type_space\n"
-" fully_specified_type_1 .and type_specifier_space;\n"
-"fully_specified_type_nospace\n"
-" fully_specified_type_1 .and type_specifier_nospace;\n"
-"fully_specified_type_1\n"
-" fully_specified_type_2 .or .true .emit TYPE_QUALIFIER_NONE;\n"
-"fully_specified_type_2\n"
-" type_qualifier .and space;\n"
-"type_qualifier\n"
-" \"const\" .emit TYPE_QUALIFIER_CONST .or\n"
-" .if (shader_type == 2) \"attribute\" .emit TYPE_QUALIFIER_ATTRIBUTE .or\n"
-" \"varying\" .emit TYPE_QUALIFIER_VARYING .or\n"
-" \"uniform\" .emit TYPE_QUALIFIER_UNIFORM .or\n"
-" .if (parsing_builtin != 0) \"__fixed_output\" .emit TYPE_QUALIFIER_FIXEDOUTPUT .or\n"
-" .if (parsing_builtin != 0) \"__fixed_input\" .emit TYPE_QUALIFIER_FIXEDINPUT;\n"
-"type_specifier_space\n"
-" \"void\" .emit TYPE_SPECIFIER_VOID .or\n"
-" \"float\" .emit TYPE_SPECIFIER_FLOAT .or\n"
-" \"int\" .emit TYPE_SPECIFIER_INT .or\n"
-" \"bool\" .emit TYPE_SPECIFIER_BOOL .or\n"
-" \"vec2\" .emit TYPE_SPECIFIER_VEC2 .or\n"
-" \"vec3\" .emit TYPE_SPECIFIER_VEC3 .or\n"
-" \"vec4\" .emit TYPE_SPECIFIER_VEC4 .or\n"
-" \"bvec2\" .emit TYPE_SPECIFIER_BVEC2 .or\n"
-" \"bvec3\" .emit TYPE_SPECIFIER_BVEC3 .or\n"
-" \"bvec4\" .emit TYPE_SPECIFIER_BVEC4 .or\n"
-" \"ivec2\" .emit TYPE_SPECIFIER_IVEC2 .or\n"
-" \"ivec3\" .emit TYPE_SPECIFIER_IVEC3 .or\n"
-" \"ivec4\" .emit TYPE_SPECIFIER_IVEC4 .or\n"
-" \"mat2\" .emit TYPE_SPECIFIER_MAT2 .or\n"
-" \"mat3\" .emit TYPE_SPECIFIER_MAT3 .or\n"
-" \"mat4\" .emit TYPE_SPECIFIER_MAT4 .or\n"
-" \"sampler1D\" .emit TYPE_SPECIFIER_SAMPLER1D .or\n"
-" \"sampler2D\" .emit TYPE_SPECIFIER_SAMPLER2D .or\n"
-" \"sampler3D\" .emit TYPE_SPECIFIER_SAMPLER3D .or\n"
-" \"samplerCube\" .emit TYPE_SPECIFIER_SAMPLERCUBE .or\n"
-" \"sampler1DShadow\" .emit TYPE_SPECIFIER_SAMPLER1DSHADOW .or\n"
-" \"sampler2DShadow\" .emit TYPE_SPECIFIER_SAMPLER2DSHADOW .or\n"
-" type_name .emit TYPE_SPECIFIER_TYPENAME;\n"
-"type_specifier_nospace\n"
-" struct_specifier .emit TYPE_SPECIFIER_STRUCT;\n"
-"struct_specifier\n"
-" \"struct\" .and struct_specifier_1 .and optional_space .and lbrace .error LBRACE_EXPECTED .and\n"
-" struct_declaration_list .and rbrace .emit FIELD_NONE;\n"
-"struct_specifier_1\n"
-" struct_specifier_2 .or .true .emit '\\0';\n"
-"struct_specifier_2\n"
-" space .and identifier;\n"
-"struct_declaration_list\n"
-" struct_declaration .and .loop struct_declaration .emit FIELD_NEXT;\n"
-"struct_declaration\n"
-" struct_declaration_nospace .or struct_declaration_space;\n"
-"struct_declaration_space\n"
-" type_specifier_space .and space .and struct_declarator_list .and semicolon .emit FIELD_NONE;\n"
-"struct_declaration_nospace\n"
-" type_specifier_nospace .and struct_declarator_list .and semicolon .emit FIELD_NONE;\n"
-"struct_declarator_list\n"
-" struct_declarator .and .loop struct_declarator_list_1 .emit FIELD_NEXT;\n"
-"struct_declarator_list_1\n"
-" comma .and struct_declarator;\n"
-"struct_declarator\n"
-" identifier .and struct_declarator_1;\n"
-"struct_declarator_1\n"
-" struct_declarator_2 .emit FIELD_ARRAY .or .true .emit FIELD_NONE;\n"
-"struct_declarator_2\n"
-" lbracket .and constant_expression .and rbracket;\n"
-"initializer\n"
-" assignment_expression .and .true .emit OP_END;\n"
-"declaration_statement\n"
-" declaration;\n"
-"statement\n"
-" compound_statement .or simple_statement;\n"
-"statement_space\n"
-" compound_statement .or statement_space_1;\n"
-"statement_space_1\n"
-" space .and simple_statement;\n"
-"simple_statement\n"
-" .if (parsing_builtin != 0) __asm_statement .emit OP_ASM .or\n"
-" selection_statement .or\n"
-" iteration_statement .or\n"
-" jump_statement .or\n"
-" expression_statement .emit OP_EXPRESSION .or\n"
-" declaration_statement .emit OP_DECLARE;\n"
-"compound_statement\n"
-" compound_statement_1 .emit OP_BLOCK_BEGIN_NEW_SCOPE .and .true .emit OP_END;\n"
-"compound_statement_1\n"
-" compound_statement_2 .or compound_statement_3;\n"
-"compound_statement_2\n"
-" lbrace .and rbrace;\n"
-"compound_statement_3\n"
-" lbrace .and statement_list .and rbrace;\n"
-"statement_no_new_scope\n"
-" compound_statement_no_new_scope .or simple_statement;\n"
-"compound_statement_no_new_scope\n"
-" compound_statement_no_new_scope_1 .emit OP_BLOCK_BEGIN_NO_NEW_SCOPE .and .true .emit OP_END;\n"
-"compound_statement_no_new_scope_1\n"
-" compound_statement_no_new_scope_2 .or compound_statement_no_new_scope_3;\n"
-"compound_statement_no_new_scope_2\n"
-" lbrace .and rbrace;\n"
-"compound_statement_no_new_scope_3\n"
-" lbrace .and statement_list .and rbrace;\n"
-"statement_list\n"
-" statement .and .loop statement;\n"
-"expression_statement\n"
-" expression_statement_1 .or expression_statement_2;\n"
-"expression_statement_1\n"
-" semicolon .emit OP_PUSH_VOID .emit OP_END;\n"
-"expression_statement_2\n"
-" expression .and semicolon .emit OP_END;\n"
-"selection_statement\n"
-" \"if\" .emit OP_IF .and lparen .error LPAREN_EXPECTED .and expression .and\n"
-" rparen .error RPAREN_EXPECTED .emit OP_END .and selection_rest_statement;\n"
-"selection_rest_statement\n"
-" statement .and selection_rest_statement_1;\n"
-"selection_rest_statement_1\n"
-" selection_rest_statement_2 .or .true .emit OP_EXPRESSION .emit OP_PUSH_VOID .emit OP_END;\n"
-"selection_rest_statement_2\n"
-" \"else\" .and optional_space .and statement;\n"
-"condition\n"
-" condition_1 .emit OP_DECLARE .emit DECLARATION_INIT_DECLARATOR_LIST .or\n"
-" condition_3 .emit OP_EXPRESSION;\n"
-"condition_1\n"
-" condition_1_nospace .or condition_1_space;\n"
-"condition_1_nospace\n"
-" fully_specified_type_nospace .and condition_2;\n"
-"condition_1_space\n"
-" fully_specified_type_space .and space .and condition_2;\n"
-"condition_2\n"
-" identifier .emit VARIABLE_IDENTIFIER .and equals .emit VARIABLE_INITIALIZER .and\n"
-" initializer .and .true .emit DECLARATOR_NONE;\n"
-"condition_3\n"
-" expression .and .true .emit OP_END;\n"
-"iteration_statement\n"
-" iteration_statement_1 .or iteration_statement_2 .or iteration_statement_3;\n"
-"iteration_statement_1\n"
-" \"while\" .emit OP_WHILE .and lparen .error LPAREN_EXPECTED .and condition .and\n"
-" rparen .error RPAREN_EXPECTED .and statement_no_new_scope;\n"
-"iteration_statement_2\n"
-" \"do\" .emit OP_DO .and statement_space .and \"while\" .and lparen .error LPAREN_EXPECTED .and\n"
-" expression .and rparen .error RPAREN_EXPECTED .emit OP_END .and semicolon;\n"
-"iteration_statement_3\n"
-" \"for\" .emit OP_FOR .and lparen .error LPAREN_EXPECTED .and for_init_statement .and\n"
-" for_rest_statement .and rparen .error RPAREN_EXPECTED .and statement_no_new_scope;\n"
-"for_init_statement\n"
-" expression_statement .emit OP_EXPRESSION .or declaration_statement .emit OP_DECLARE;\n"
-"conditionopt\n"
-" condition .or\n"
-" .true .emit OP_EXPRESSION .emit OP_PUSH_BOOL .emit 2 .emit '1' .emit '\\0' .emit OP_END;\n"
-"for_rest_statement\n"
-" conditionopt .and semicolon .and for_rest_statement_1;\n"
-"for_rest_statement_1\n"
-" for_rest_statement_2 .or .true .emit OP_PUSH_VOID .emit OP_END;\n"
-"for_rest_statement_2\n"
-" expression .and .true .emit OP_END;\n"
-"jump_statement\n"
-" jump_statement_1 .or jump_statement_2 .or jump_statement_3 .or jump_statement_4 .or\n"
-" .if (shader_type == 1) jump_statement_5;\n"
-"jump_statement_1\n"
-" \"continue\" .and semicolon .emit OP_CONTINUE;\n"
-"jump_statement_2\n"
-" \"break\" .and semicolon .emit OP_BREAK;\n"
-"jump_statement_3\n"
-" \"return\" .emit OP_RETURN .and optional_space .and expression .and semicolon .emit OP_END;\n"
-"jump_statement_4\n"
-" \"return\" .emit OP_RETURN .and semicolon .emit OP_PUSH_VOID .emit OP_END;\n"
-"jump_statement_5\n"
-" \"discard\" .and semicolon .emit OP_DISCARD;\n"
-"__asm_statement\n"
-" \"__asm\" .and space .and identifier .and space .and asm_arguments .and semicolon .emit OP_END;\n"
-"asm_arguments\n"
-" asm_argument .and .true .emit OP_END .and .loop asm_arguments_1;\n"
-"asm_arguments_1\n"
-" comma .and asm_argument .and .true .emit OP_END;\n"
-"asm_argument\n"
-" variable_identifier .or floatconstant;\n"
-"translation_unit\n"
-" optional_space .emit REVISION .and external_declaration .error INVALID_EXTERNAL_DECLARATION .and\n"
-" .loop external_declaration .and optional_space .and\n"
-" '\\0' .error INVALID_EXTERNAL_DECLARATION .emit EXTERNAL_NULL;\n"
-"external_declaration\n"
-" function_definition .emit EXTERNAL_FUNCTION_DEFINITION .or\n"
-" declaration .emit EXTERNAL_DECLARATION;\n"
-"function_definition\n"
-" function_prototype .and compound_statement_no_new_scope;\n"
-"digit_oct\n"
-" '0'-'7';\n"
-"digit_dec\n"
-" '0'-'9';\n"
-"digit_hex\n"
-" '0'-'9' .or 'A'-'F' .or 'a'-'f';\n"
-"id_character_first\n"
-" 'a'-'z' .or 'A'-'Z' .or '_';\n"
-"id_character_next\n"
-" id_character_first .or digit_dec;\n"
-"identifier\n"
-" id_character_first .emit * .and .loop id_character_next .emit * .and .true .emit '\\0';\n"
-"float\n"
-" float_1 .or float_2;\n"
-"float_1\n"
-" float_fractional_constant .and float_optional_exponent_part;\n"
-"float_2\n"
-" float_digit_sequence .and .true .emit '\\0' .and float_exponent_part;\n"
-"float_fractional_constant\n"
-" float_fractional_constant_1 .or float_fractional_constant_2 .or float_fractional_constant_3;\n"
-"float_fractional_constant_1\n"
-" float_digit_sequence .and '.' .and float_digit_sequence;\n"
-"float_fractional_constant_2\n"
-" float_digit_sequence .and '.' .and .true .emit '\\0';\n"
-"float_fractional_constant_3\n"
-" '.' .emit '\\0' .and float_digit_sequence;\n"
-"float_optional_exponent_part\n"
-" float_exponent_part .or .true .emit '\\0';\n"
-"float_digit_sequence\n"
-" digit_dec .emit * .and .loop digit_dec .emit * .and .true .emit '\\0';\n"
-"float_exponent_part\n"
-" float_exponent_part_1 .or float_exponent_part_2;\n"
-"float_exponent_part_1\n"
-" 'e' .and float_optional_sign .and float_digit_sequence;\n"
-"float_exponent_part_2\n"
-" 'E' .and float_optional_sign .and float_digit_sequence;\n"
-"float_optional_sign\n"
-" float_sign .or .true;\n"
-"float_sign\n"
-" '+' .or '-' .emit '-';\n"
-"integer\n"
-" integer_hex .or integer_oct .or integer_dec;\n"
-"integer_hex\n"
-" '0' .and integer_hex_1 .emit 0x10 .and digit_hex .emit * .and .loop digit_hex .emit * .and\n"
-" .true .emit '\\0';\n"
-"integer_hex_1\n"
-" 'x' .or 'X';\n"
-"integer_oct\n"
-" '0' .emit 8 .emit * .and .loop digit_oct .emit * .and .true .emit '\\0';\n"
-"integer_dec\n"
-" digit_dec .emit 10 .emit * .and .loop digit_dec .emit * .and .true .emit '\\0';\n"
-"boolean\n"
-" \"true\" .emit 2 .emit '1' .emit '\\0' .or\n"
-" \"false\" .emit 2 .emit '0' .emit '\\0';\n"
-"type_name\n"
-" identifier;\n"
-"field_selection\n"
-" identifier;\n"
-"floatconstant\n"
-" float .emit OP_PUSH_FLOAT;\n"
-"intconstant\n"
-" integer .emit OP_PUSH_INT;\n"
-"boolconstant\n"
-" boolean .emit OP_PUSH_BOOL;\n"
-"optional_space\n"
-" .loop single_space;\n"
-"space\n"
-" single_space .and .loop single_space;\n"
-"single_space\n"
-" white_char .or c_style_comment_block .or cpp_style_comment_block;\n"
-"white_char\n"
-" ' ' .or '\\t' .or new_line .or '\\v' .or '\\f';\n"
-"new_line\n"
-" cr_lf .or lf_cr .or '\\n' .or '\\r';\n"
-"cr_lf\n"
-" '\\r' .and '\\n';\n"
-"lf_cr\n"
-" '\\n' .and '\\r';\n"
-"c_style_comment_block\n"
-" '/' .and '*' .and c_style_comment_rest;\n"
-"c_style_comment_rest\n"
-" .loop c_style_comment_char_no_star .and c_style_comment_rest_1;\n"
-"c_style_comment_rest_1\n"
-" c_style_comment_end .or c_style_comment_rest_2;\n"
-"c_style_comment_rest_2\n"
-" '*' .and c_style_comment_rest;\n"
-"c_style_comment_char_no_star\n"
-" '\\x2B'-'\\xFF' .or '\\x01'-'\\x29';\n"
-"c_style_comment_end\n"
-" '*' .and '/';\n"
-"cpp_style_comment_block\n"
-" '/' .and '/' .and cpp_style_comment_block_1;\n"
-"cpp_style_comment_block_1\n"
-" cpp_style_comment_block_2 .or cpp_style_comment_block_3;\n"
-"cpp_style_comment_block_2\n"
-" .loop cpp_style_comment_char .and new_line;\n"
-"cpp_style_comment_block_3\n"
-" .loop cpp_style_comment_char;\n"
-"cpp_style_comment_char\n"
-" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n"
-"ampersandampersand\n"
-" optional_space .and '&' .and '&' .and optional_space;\n"
-"barbar\n"
-" optional_space .and '|' .and '|' .and optional_space;\n"
-"bang\n"
-" optional_space .and '!' .and optional_space;\n"
-"bangequals\n"
-" optional_space .and '!' .and '=' .and optional_space;\n"
-"caretcaret\n"
-" optional_space .and '^' .and '^' .and optional_space;\n"
-"colon\n"
-" optional_space .and ':' .and optional_space;\n"
-"comma\n"
-" optional_space .and ',' .and optional_space;\n"
-"dot\n"
-" optional_space .and '.' .and optional_space;\n"
-"equals\n"
-" optional_space .and '=' .and optional_space;\n"
-"equalsequals\n"
-" optional_space .and '=' .and '=' .and optional_space;\n"
-"greater\n"
-" optional_space .and '>' .and optional_space;\n"
-"greaterequals\n"
-" optional_space .and '>' .and '=' .and optional_space;\n"
-"lbrace\n"
-" optional_space .and '{' .and optional_space;\n"
-"lbracket\n"
-" optional_space .and '[' .and optional_space;\n"
-"less\n"
-" optional_space .and '<' .and optional_space;\n"
-"lessequals\n"
-" optional_space .and '<' .and '=' .and optional_space;\n"
-"lparen\n"
-" optional_space .and '(' .and optional_space;\n"
-"minus\n"
-" optional_space .and '-' .and optional_space;\n"
-"minusequals\n"
-" optional_space .and '-' .and '=' .and optional_space;\n"
-"minusminus\n"
-" optional_space .and '-' .and '-' .and optional_space;\n"
-"plus\n"
-" optional_space .and '+' .and optional_space;\n"
-"plusequals\n"
-" optional_space .and '+' .and '=' .and optional_space;\n"
-"plusplus\n"
-" optional_space .and '+' .and '+' .and optional_space;\n"
-"question\n"
-" optional_space .and '?' .and optional_space;\n"
-"rbrace\n"
-" optional_space .and '}' .and optional_space;\n"
-"rbracket\n"
-" optional_space .and ']' .and optional_space;\n"
-"rparen\n"
-" optional_space .and ')' .and optional_space;\n"
-"semicolon\n"
-" optional_space .and ';' .and optional_space;\n"
-"slash\n"
-" optional_space .and '/' .and optional_space;\n"
-"slashequals\n"
-" optional_space .and '/' .and '=' .and optional_space;\n"
-"star\n"
-" optional_space .and '*' .and optional_space;\n"
-"starequals\n"
-" optional_space .and '*' .and '=' .and optional_space;\n"
-".string string_lexer;\n"
-"string_lexer\n"
-" lex_first_identifier_character .and .loop lex_next_identifier_character;\n"
-"lex_first_identifier_character\n"
-" 'a'-'z' .or 'A'-'Z' .or '_';\n"
-"lex_next_identifier_character\n"
-" 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_';\n"
-"err_token\n"
-" '~' .or '`' .or '!' .or '@' .or '#' .or '$' .or '%' .or '^' .or '&' .or '*' .or '(' .or ')' .or\n"
-" '-' .or '+' .or '=' .or '|' .or '\\\\' .or '[' .or ']' .or '{' .or '}' .or ':' .or ';' .or '\"' .or\n"
-" '\\'' .or '<' .or ',' .or '>' .or '.' .or '/' .or '?' .or err_identifier;\n"
-"err_identifier\n"
-" id_character_first .and .loop id_character_next;\n"
+".syntax translation_unit;\n"
+".emtcode REVISION 3\n"
+".emtcode EXTERNAL_NULL 0\n"
+".emtcode EXTERNAL_FUNCTION_DEFINITION 1\n"
+".emtcode EXTERNAL_DECLARATION 2\n"
+".emtcode DECLARATION_FUNCTION_PROTOTYPE 1\n"
+".emtcode DECLARATION_INIT_DECLARATOR_LIST 2\n"
+".emtcode FUNCTION_ORDINARY 0\n"
+".emtcode FUNCTION_CONSTRUCTOR 1\n"
+".emtcode FUNCTION_OPERATOR 2\n"
+".emtcode OPERATOR_ADDASSIGN 1\n"
+".emtcode OPERATOR_SUBASSIGN 2\n"
+".emtcode OPERATOR_MULASSIGN 3\n"
+".emtcode OPERATOR_DIVASSIGN 4\n"
+".emtcode OPERATOR_LOGICALXOR 11\n"
+".emtcode OPERATOR_LESS 15\n"
+".emtcode OPERATOR_GREATER 16\n"
+".emtcode OPERATOR_LESSEQUAL 17\n"
+".emtcode OPERATOR_GREATEREQUAL 18\n"
+".emtcode OPERATOR_MULTIPLY 21\n"
+".emtcode OPERATOR_DIVIDE 22\n"
+".emtcode OPERATOR_INCREMENT 24\n"
+".emtcode OPERATOR_DECREMENT 25\n"
+".emtcode OPERATOR_PLUS 26\n"
+".emtcode OPERATOR_MINUS 27\n"
+".emtcode OPERATOR_NOT 29\n"
+".emtcode DECLARATOR_NONE 0\n"
+".emtcode DECLARATOR_NEXT 1\n"
+".emtcode VARIABLE_NONE 0\n"
+".emtcode VARIABLE_IDENTIFIER 1\n"
+".emtcode VARIABLE_INITIALIZER 2\n"
+".emtcode VARIABLE_ARRAY_EXPLICIT 3\n"
+".emtcode VARIABLE_ARRAY_UNKNOWN 4\n"
+".emtcode TYPE_QUALIFIER_NONE 0\n"
+".emtcode TYPE_QUALIFIER_CONST 1\n"
+".emtcode TYPE_QUALIFIER_ATTRIBUTE 2\n"
+".emtcode TYPE_QUALIFIER_VARYING 3\n"
+".emtcode TYPE_QUALIFIER_UNIFORM 4\n"
+".emtcode TYPE_QUALIFIER_FIXEDOUTPUT 5\n"
+".emtcode TYPE_QUALIFIER_FIXEDINPUT 6\n"
+".emtcode TYPE_SPECIFIER_VOID 0\n"
+".emtcode TYPE_SPECIFIER_BOOL 1\n"
+".emtcode TYPE_SPECIFIER_BVEC2 2\n"
+".emtcode TYPE_SPECIFIER_BVEC3 3\n"
+".emtcode TYPE_SPECIFIER_BVEC4 4\n"
+".emtcode TYPE_SPECIFIER_INT 5\n"
+".emtcode TYPE_SPECIFIER_IVEC2 6\n"
+".emtcode TYPE_SPECIFIER_IVEC3 7\n"
+".emtcode TYPE_SPECIFIER_IVEC4 8\n"
+".emtcode TYPE_SPECIFIER_FLOAT 9\n"
+".emtcode TYPE_SPECIFIER_VEC2 10\n"
+".emtcode TYPE_SPECIFIER_VEC3 11\n"
+".emtcode TYPE_SPECIFIER_VEC4 12\n"
+".emtcode TYPE_SPECIFIER_MAT2 13\n"
+".emtcode TYPE_SPECIFIER_MAT3 14\n"
+".emtcode TYPE_SPECIFIER_MAT4 15\n"
+".emtcode TYPE_SPECIFIER_SAMPLER1D 16\n"
+".emtcode TYPE_SPECIFIER_SAMPLER2D 17\n"
+".emtcode TYPE_SPECIFIER_SAMPLER3D 18\n"
+".emtcode TYPE_SPECIFIER_SAMPLERCUBE 19\n"
+".emtcode TYPE_SPECIFIER_SAMPLER1DSHADOW 20\n"
+".emtcode TYPE_SPECIFIER_SAMPLER2DSHADOW 21\n"
+".emtcode TYPE_SPECIFIER_STRUCT 22\n"
+".emtcode TYPE_SPECIFIER_TYPENAME 23\n"
+".emtcode FIELD_NONE 0\n"
+".emtcode FIELD_NEXT 1\n"
+".emtcode FIELD_ARRAY 2\n"
+".emtcode OP_END 0\n"
+".emtcode OP_BLOCK_BEGIN_NO_NEW_SCOPE 1\n"
+".emtcode OP_BLOCK_BEGIN_NEW_SCOPE 2\n"
+".emtcode OP_DECLARE 3\n"
+".emtcode OP_ASM 4\n"
+".emtcode OP_BREAK 5\n"
+".emtcode OP_CONTINUE 6\n"
+".emtcode OP_DISCARD 7\n"
+".emtcode OP_RETURN 8\n"
+".emtcode OP_EXPRESSION 9\n"
+".emtcode OP_IF 10\n"
+".emtcode OP_WHILE 11\n"
+".emtcode OP_DO 12\n"
+".emtcode OP_FOR 13\n"
+".emtcode OP_PUSH_VOID 14\n"
+".emtcode OP_PUSH_BOOL 15\n"
+".emtcode OP_PUSH_INT 16\n"
+".emtcode OP_PUSH_FLOAT 17\n"
+".emtcode OP_PUSH_IDENTIFIER 18\n"
+".emtcode OP_SEQUENCE 19\n"
+".emtcode OP_ASSIGN 20\n"
+".emtcode OP_ADDASSIGN 21\n"
+".emtcode OP_SUBASSIGN 22\n"
+".emtcode OP_MULASSIGN 23\n"
+".emtcode OP_DIVASSIGN 24\n"
+".emtcode OP_SELECT 31\n"
+".emtcode OP_LOGICALOR 32\n"
+".emtcode OP_LOGICALXOR 33\n"
+".emtcode OP_LOGICALAND 34\n"
+".emtcode OP_EQUAL 38\n"
+".emtcode OP_NOTEQUAL 39\n"
+".emtcode OP_LESS 40\n"
+".emtcode OP_GREATER 41\n"
+".emtcode OP_LESSEQUAL 42\n"
+".emtcode OP_GREATEREQUAL 43\n"
+".emtcode OP_ADD 46\n"
+".emtcode OP_SUBTRACT 47\n"
+".emtcode OP_MULTIPLY 48\n"
+".emtcode OP_DIVIDE 49\n"
+".emtcode OP_PREINCREMENT 51\n"
+".emtcode OP_PREDECREMENT 52\n"
+".emtcode OP_PLUS 53\n"
+".emtcode OP_MINUS 54\n"
+".emtcode OP_NOT 56\n"
+".emtcode OP_SUBSCRIPT 57\n"
+".emtcode OP_CALL 58\n"
+".emtcode OP_FIELD 59\n"
+".emtcode OP_POSTINCREMENT 60\n"
+".emtcode OP_POSTDECREMENT 61\n"
+".emtcode PARAM_QUALIFIER_IN 0\n"
+".emtcode PARAM_QUALIFIER_OUT 1\n"
+".emtcode PARAM_QUALIFIER_INOUT 2\n"
+".emtcode PARAMETER_NONE 0\n"
+".emtcode PARAMETER_NEXT 1\n"
+".emtcode PARAMETER_ARRAY_NOT_PRESENT 0\n"
+".emtcode PARAMETER_ARRAY_PRESENT 1\n"
+".errtext INVALID_EXTERNAL_DECLARATION \"error 2001: invalid external declaration\"\n"
+".errtext INVALID_OPERATOR_OVERRIDE \"error 2002: invalid operator override\"\n"
+".errtext LBRACE_EXPECTED \"error 2003: '{' expected but '$err_token$' found\"\n"
+".errtext LPAREN_EXPECTED \"error 2004: '(' expected but '$err_token$' found\"\n"
+".errtext RPAREN_EXPECTED \"error 2005: ')' expected but '$err_token$' found\"\n"
+".regbyte parsing_builtin 0\n"
+".regbyte shader_type 0\n"
+"variable_identifier\n"
+" identifier .emit OP_PUSH_IDENTIFIER;\n"
+"primary_expression\n"
+" floatconstant .or boolconstant .or intconstant .or variable_identifier .or primary_expression_1;\n"
+"primary_expression_1\n"
+" lparen .and expression .and rparen;\n"
+"postfix_expression\n"
+" postfix_expression_1 .and .loop postfix_expression_2;\n"
+"postfix_expression_1\n"
+" function_call .or primary_expression;\n"
+"postfix_expression_2\n"
+" postfix_expression_3 .or postfix_expression_4 .or\n"
+" plusplus .emit OP_POSTINCREMENT .or\n"
+" minusminus .emit OP_POSTDECREMENT;\n"
+"postfix_expression_3\n"
+" lbracket .and integer_expression .and rbracket .emit OP_SUBSCRIPT;\n"
+"postfix_expression_4\n"
+" dot .and field_selection .emit OP_FIELD;\n"
+"integer_expression\n"
+" expression;\n"
+"function_call\n"
+" function_call_generic .emit OP_CALL .and .true .emit OP_END;\n"
+"function_call_generic\n"
+" function_call_generic_1 .or function_call_generic_2;\n"
+"function_call_generic_1\n"
+" function_call_header_with_parameters .and rparen .error RPAREN_EXPECTED;\n"
+"function_call_generic_2\n"
+" function_call_header_no_parameters .and rparen .error RPAREN_EXPECTED;\n"
+"function_call_header_no_parameters\n"
+" function_call_header .and function_call_header_no_parameters_1;\n"
+"function_call_header_no_parameters_1\n"
+" \"void\" .or .true;\n"
+"function_call_header_with_parameters\n"
+" function_call_header .and assignment_expression .and .true .emit OP_END .and\n"
+" .loop function_call_header_with_parameters_1;\n"
+"function_call_header_with_parameters_1\n"
+" comma .and assignment_expression .and .true .emit OP_END;\n"
+"function_call_header\n"
+" function_identifier .and lparen;\n"
+"function_identifier\n"
+" identifier;\n"
+"unary_expression\n"
+" postfix_expression .or unary_expression_1 .or unary_expression_2 .or unary_expression_3 .or\n"
+" unary_expression_4 .or unary_expression_5;\n"
+"unary_expression_1\n"
+" plusplus .and unary_expression .and .true .emit OP_PREINCREMENT;\n"
+"unary_expression_2\n"
+" minusminus .and unary_expression .and .true .emit OP_PREDECREMENT;\n"
+"unary_expression_3\n"
+" plus .and unary_expression .and .true .emit OP_PLUS;\n"
+"unary_expression_4\n"
+" minus .and unary_expression .and .true .emit OP_MINUS;\n"
+"unary_expression_5\n"
+" bang .and unary_expression .and .true .emit OP_NOT;\n"
+"multiplicative_expression\n"
+" unary_expression .and .loop multiplicative_expression_1;\n"
+"multiplicative_expression_1\n"
+" multiplicative_expression_2 .or multiplicative_expression_3;\n"
+"multiplicative_expression_2\n"
+" star .and unary_expression .and .true .emit OP_MULTIPLY;\n"
+"multiplicative_expression_3\n"
+" slash .and unary_expression .and .true .emit OP_DIVIDE;\n"
+"additive_expression\n"
+" multiplicative_expression .and .loop additive_expression_1;\n"
+"additive_expression_1\n"
+" additive_expression_2 .or additive_expression_3;\n"
+"additive_expression_2\n"
+" plus .and multiplicative_expression .and .true .emit OP_ADD;\n"
+"additive_expression_3\n"
+" minus .and multiplicative_expression .and .true .emit OP_SUBTRACT;\n"
+"shift_expression\n"
+" additive_expression;\n"
+"relational_expression\n"
+" shift_expression .and .loop relational_expression_1;\n"
+"relational_expression_1\n"
+" relational_expression_2 .or relational_expression_3 .or relational_expression_4 .or\n"
+" relational_expression_5;\n"
+"relational_expression_2\n"
+" lessequals .and shift_expression .and .true .emit OP_LESSEQUAL;\n"
+"relational_expression_3\n"
+" greaterequals .and shift_expression .and .true .emit OP_GREATEREQUAL;\n"
+"relational_expression_4\n"
+" less .and shift_expression .and .true .emit OP_LESS;\n"
+"relational_expression_5\n"
+" greater .and shift_expression .and .true .emit OP_GREATER;\n"
+"equality_expression\n"
+" relational_expression .and .loop equality_expression_1;\n"
+"equality_expression_1\n"
+" equality_expression_2 .or equality_expression_3;\n"
+"equality_expression_2\n"
+" equalsequals .and relational_expression .and .true .emit OP_EQUAL;\n"
+"equality_expression_3\n"
+" bangequals .and relational_expression .and .true .emit OP_NOTEQUAL;\n"
+"and_expression\n"
+" equality_expression;\n"
+"exclusive_or_expression\n"
+" and_expression;\n"
+"inclusive_or_expression\n"
+" exclusive_or_expression;\n"
+"logical_and_expression\n"
+" inclusive_or_expression .and .loop logical_and_expression_1;\n"
+"logical_and_expression_1\n"
+" ampersandampersand .and inclusive_or_expression .and .true .emit OP_LOGICALAND;\n"
+"logical_xor_expression\n"
+" logical_and_expression .and .loop logical_xor_expression_1;\n"
+"logical_xor_expression_1\n"
+" caretcaret .and logical_and_expression .and .true .emit OP_LOGICALXOR;\n"
+"logical_or_expression\n"
+" logical_xor_expression .and .loop logical_or_expression_1;\n"
+"logical_or_expression_1\n"
+" barbar .and logical_xor_expression .and .true .emit OP_LOGICALOR;\n"
+"conditional_expression\n"
+" logical_or_expression .and .loop conditional_expression_1;\n"
+"conditional_expression_1\n"
+" question .and expression .and colon .and conditional_expression .and .true .emit OP_SELECT;\n"
+"assignment_expression\n"
+" assignment_expression_1 .or assignment_expression_2 .or assignment_expression_3 .or\n"
+" assignment_expression_4 .or assignment_expression_5 .or conditional_expression;\n"
+"assignment_expression_1\n"
+" unary_expression .and equals .and assignment_expression .and .true .emit OP_ASSIGN;\n"
+"assignment_expression_2\n"
+" unary_expression .and starequals .and assignment_expression .and .true .emit OP_MULASSIGN;\n"
+"assignment_expression_3\n"
+" unary_expression .and slashequals .and assignment_expression .and .true .emit OP_DIVASSIGN;\n"
+"assignment_expression_4\n"
+" unary_expression .and plusequals .and assignment_expression .and .true .emit OP_ADDASSIGN;\n"
+"assignment_expression_5\n"
+" unary_expression .and minusequals .and assignment_expression .and .true .emit OP_SUBASSIGN;\n"
+"expression\n"
+" assignment_expression .and .loop expression_1;\n"
+"expression_1\n"
+" comma .and assignment_expression .and .true .emit OP_SEQUENCE;\n"
+"constant_expression\n"
+" conditional_expression .and .true .emit OP_END;\n"
+"declaration\n"
+" declaration_1 .or declaration_2;\n"
+"declaration_1\n"
+" function_prototype .emit DECLARATION_FUNCTION_PROTOTYPE .and semicolon;\n"
+"declaration_2\n"
+" init_declarator_list .emit DECLARATION_INIT_DECLARATOR_LIST .and semicolon;\n"
+"function_prototype\n"
+" function_prototype_1 .or function_prototype_2;\n"
+"function_prototype_1\n"
+" function_header .and \"void\" .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE;\n"
+"function_prototype_2\n"
+" function_declarator .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE;\n"
+"function_declarator\n"
+" function_header_with_parameters .or function_header;\n"
+"function_header_with_parameters\n"
+" function_header .and parameter_declaration .and .loop function_header_with_parameters_1;\n"
+"function_header_with_parameters_1\n"
+" comma .and parameter_declaration;\n"
+"function_header\n"
+" function_header_nospace .or function_header_space;\n"
+"function_header_space\n"
+" fully_specified_type_space .and space .and function_decl_identifier .and lparen;\n"
+"function_header_nospace\n"
+" fully_specified_type_nospace .and function_decl_identifier .and lparen;\n"
+"function_decl_identifier\n"
+" .if (parsing_builtin != 0) __operator .emit FUNCTION_OPERATOR .or\n"
+" .if (parsing_builtin != 0) \"__constructor\" .emit FUNCTION_CONSTRUCTOR .or\n"
+" identifier .emit FUNCTION_ORDINARY;\n"
+"__operator\n"
+" \"__operator\" .and overriden_operator .error INVALID_OPERATOR_OVERRIDE;\n"
+"overriden_operator\n"
+" plusplus .emit OPERATOR_INCREMENT .or\n"
+" plusequals .emit OPERATOR_ADDASSIGN .or\n"
+" plus .emit OPERATOR_PLUS .or\n"
+" minusminus .emit OPERATOR_DECREMENT .or\n"
+" minusequals .emit OPERATOR_SUBASSIGN .or\n"
+" minus .emit OPERATOR_MINUS .or\n"
+" bang .emit OPERATOR_NOT .or\n"
+" starequals .emit OPERATOR_MULASSIGN .or\n"
+" star .emit OPERATOR_MULTIPLY .or\n"
+" slashequals .emit OPERATOR_DIVASSIGN .or\n"
+" slash .emit OPERATOR_DIVIDE .or\n"
+" lessequals .emit OPERATOR_LESSEQUAL .or\n"
+" \n"
+" \n"
+" less .emit OPERATOR_LESS .or\n"
+" greaterequals .emit OPERATOR_GREATEREQUAL .or\n"
+" \n"
+" \n"
+" greater .emit OPERATOR_GREATER .or\n"
+" \n"
+" \n"
+" \n"
+" \n"
+" \n"
+" \n"
+" \n"
+" \n"
+" caretcaret .emit OPERATOR_LOGICALXOR ;\n"
+"parameter_declarator\n"
+" parameter_declarator_nospace .or parameter_declarator_space;\n"
+"parameter_declarator_nospace\n"
+" type_specifier_nospace .and identifier .and parameter_declarator_1;\n"
+"parameter_declarator_space\n"
+" type_specifier_space .and space .and identifier .and parameter_declarator_1;\n"
+"parameter_declarator_1\n"
+" parameter_declarator_2 .emit PARAMETER_ARRAY_PRESENT .or\n"
+" .true .emit PARAMETER_ARRAY_NOT_PRESENT;\n"
+"parameter_declarator_2\n"
+" lbracket .and constant_expression .and rbracket;\n"
+"parameter_declaration\n"
+" parameter_declaration_1 .emit PARAMETER_NEXT;\n"
+"parameter_declaration_1\n"
+" parameter_declaration_2 .or parameter_declaration_3;\n"
+"parameter_declaration_2\n"
+" type_qualifier .and space .and parameter_qualifier .and parameter_declaration_4;\n"
+"parameter_declaration_3\n"
+" parameter_qualifier .emit TYPE_QUALIFIER_NONE .and parameter_declaration_4;\n"
+"parameter_declaration_4\n"
+" parameter_declarator .or parameter_type_specifier;\n"
+"parameter_qualifier\n"
+" parameter_qualifier_1 .or .true .emit PARAM_QUALIFIER_IN;\n"
+"parameter_qualifier_1\n"
+" parameter_qualifier_2 .and space;\n"
+"parameter_qualifier_2\n"
+" \"in\" .emit PARAM_QUALIFIER_IN .or\n"
+" \"out\" .emit PARAM_QUALIFIER_OUT .or\n"
+" \"inout\" .emit PARAM_QUALIFIER_INOUT;\n"
+"parameter_type_specifier\n"
+" parameter_type_specifier_1 .and .true .emit '\\0' .and parameter_type_specifier_2;\n"
+"parameter_type_specifier_1\n"
+" type_specifier_nospace .or type_specifier_space;\n"
+"parameter_type_specifier_2\n"
+" parameter_type_specifier_3 .emit PARAMETER_ARRAY_PRESENT .or\n"
+" .true .emit PARAMETER_ARRAY_NOT_PRESENT;\n"
+"parameter_type_specifier_3\n"
+" lbracket .and constant_expression .and rbracket;\n"
+"init_declarator_list\n"
+" single_declaration .and .loop init_declarator_list_1 .emit DECLARATOR_NEXT .and\n"
+" .true .emit DECLARATOR_NONE;\n"
+"init_declarator_list_1\n"
+" comma .and identifier .emit VARIABLE_IDENTIFIER .and init_declarator_list_2;\n"
+"init_declarator_list_2\n"
+" init_declarator_list_3 .or init_declarator_list_4 .or .true .emit VARIABLE_NONE;\n"
+"init_declarator_list_3\n"
+" equals .and initializer .emit VARIABLE_INITIALIZER;\n"
+"init_declarator_list_4\n"
+" lbracket .and init_declarator_list_5 .and rbracket;\n"
+"init_declarator_list_5\n"
+" constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN;\n"
+"single_declaration\n"
+" single_declaration_nospace .or single_declaration_space;\n"
+"single_declaration_space\n"
+" fully_specified_type_space .and single_declaration_space_1;\n"
+"single_declaration_nospace\n"
+" fully_specified_type_nospace .and single_declaration_nospace_1;\n"
+"single_declaration_space_1\n"
+" single_declaration_space_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE;\n"
+"single_declaration_nospace_1\n"
+" single_declaration_nospace_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE;\n"
+"single_declaration_space_2\n"
+" space .and identifier .and single_declaration_3;\n"
+"single_declaration_nospace_2\n"
+" identifier .and single_declaration_3;\n"
+"single_declaration_3\n"
+" single_declaration_4 .or single_declaration_5 .or .true .emit VARIABLE_NONE;\n"
+"single_declaration_4\n"
+" equals .and initializer .emit VARIABLE_INITIALIZER;\n"
+"single_declaration_5\n"
+" lbracket .and single_declaration_6 .and rbracket;\n"
+"single_declaration_6\n"
+" constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN;\n"
+"fully_specified_type_space\n"
+" fully_specified_type_1 .and type_specifier_space;\n"
+"fully_specified_type_nospace\n"
+" fully_specified_type_1 .and type_specifier_nospace;\n"
+"fully_specified_type_1\n"
+" fully_specified_type_2 .or .true .emit TYPE_QUALIFIER_NONE;\n"
+"fully_specified_type_2\n"
+" type_qualifier .and space;\n"
+"type_qualifier\n"
+" \"const\" .emit TYPE_QUALIFIER_CONST .or\n"
+" .if (shader_type == 2) \"attribute\" .emit TYPE_QUALIFIER_ATTRIBUTE .or\n"
+" \"varying\" .emit TYPE_QUALIFIER_VARYING .or\n"
+" \"uniform\" .emit TYPE_QUALIFIER_UNIFORM .or\n"
+" .if (parsing_builtin != 0) \"__fixed_output\" .emit TYPE_QUALIFIER_FIXEDOUTPUT .or\n"
+" .if (parsing_builtin != 0) \"__fixed_input\" .emit TYPE_QUALIFIER_FIXEDINPUT;\n"
+"type_specifier_space\n"
+" \"void\" .emit TYPE_SPECIFIER_VOID .or\n"
+" \"float\" .emit TYPE_SPECIFIER_FLOAT .or\n"
+" \"int\" .emit TYPE_SPECIFIER_INT .or\n"
+" \"bool\" .emit TYPE_SPECIFIER_BOOL .or\n"
+" \"vec2\" .emit TYPE_SPECIFIER_VEC2 .or\n"
+" \"vec3\" .emit TYPE_SPECIFIER_VEC3 .or\n"
+" \"vec4\" .emit TYPE_SPECIFIER_VEC4 .or\n"
+" \"bvec2\" .emit TYPE_SPECIFIER_BVEC2 .or\n"
+" \"bvec3\" .emit TYPE_SPECIFIER_BVEC3 .or\n"
+" \"bvec4\" .emit TYPE_SPECIFIER_BVEC4 .or\n"
+" \"ivec2\" .emit TYPE_SPECIFIER_IVEC2 .or\n"
+" \"ivec3\" .emit TYPE_SPECIFIER_IVEC3 .or\n"
+" \"ivec4\" .emit TYPE_SPECIFIER_IVEC4 .or\n"
+" \"mat2\" .emit TYPE_SPECIFIER_MAT2 .or\n"
+" \"mat3\" .emit TYPE_SPECIFIER_MAT3 .or\n"
+" \"mat4\" .emit TYPE_SPECIFIER_MAT4 .or\n"
+" \"sampler1D\" .emit TYPE_SPECIFIER_SAMPLER1D .or\n"
+" \"sampler2D\" .emit TYPE_SPECIFIER_SAMPLER2D .or\n"
+" \"sampler3D\" .emit TYPE_SPECIFIER_SAMPLER3D .or\n"
+" \"samplerCube\" .emit TYPE_SPECIFIER_SAMPLERCUBE .or\n"
+" \"sampler1DShadow\" .emit TYPE_SPECIFIER_SAMPLER1DSHADOW .or\n"
+" \"sampler2DShadow\" .emit TYPE_SPECIFIER_SAMPLER2DSHADOW .or\n"
+" type_name .emit TYPE_SPECIFIER_TYPENAME;\n"
+"type_specifier_nospace\n"
+" struct_specifier .emit TYPE_SPECIFIER_STRUCT;\n"
+"struct_specifier\n"
+" \"struct\" .and struct_specifier_1 .and optional_space .and lbrace .error LBRACE_EXPECTED .and\n"
+" struct_declaration_list .and rbrace .emit FIELD_NONE;\n"
+"struct_specifier_1\n"
+" struct_specifier_2 .or .true .emit '\\0';\n"
+"struct_specifier_2\n"
+" space .and identifier;\n"
+"struct_declaration_list\n"
+" struct_declaration .and .loop struct_declaration .emit FIELD_NEXT;\n"
+"struct_declaration\n"
+" struct_declaration_nospace .or struct_declaration_space;\n"
+"struct_declaration_space\n"
+" type_specifier_space .and space .and struct_declarator_list .and semicolon .emit FIELD_NONE;\n"
+"struct_declaration_nospace\n"
+" type_specifier_nospace .and struct_declarator_list .and semicolon .emit FIELD_NONE;\n"
+"struct_declarator_list\n"
+" struct_declarator .and .loop struct_declarator_list_1 .emit FIELD_NEXT;\n"
+"struct_declarator_list_1\n"
+" comma .and struct_declarator;\n"
+"struct_declarator\n"
+" identifier .and struct_declarator_1;\n"
+"struct_declarator_1\n"
+" struct_declarator_2 .emit FIELD_ARRAY .or .true .emit FIELD_NONE;\n"
+"struct_declarator_2\n"
+" lbracket .and constant_expression .and rbracket;\n"
+"initializer\n"
+" assignment_expression .and .true .emit OP_END;\n"
+"declaration_statement\n"
+" declaration;\n"
+"statement\n"
+" compound_statement .or simple_statement;\n"
+"statement_space\n"
+" compound_statement .or statement_space_1;\n"
+"statement_space_1\n"
+" space .and simple_statement;\n"
+"simple_statement\n"
+" .if (parsing_builtin != 0) __asm_statement .emit OP_ASM .or\n"
+" selection_statement .or\n"
+" iteration_statement .or\n"
+" jump_statement .or\n"
+" expression_statement .emit OP_EXPRESSION .or\n"
+" declaration_statement .emit OP_DECLARE;\n"
+"compound_statement\n"
+" compound_statement_1 .emit OP_BLOCK_BEGIN_NEW_SCOPE .and .true .emit OP_END;\n"
+"compound_statement_1\n"
+" compound_statement_2 .or compound_statement_3;\n"
+"compound_statement_2\n"
+" lbrace .and rbrace;\n"
+"compound_statement_3\n"
+" lbrace .and statement_list .and rbrace;\n"
+"statement_no_new_scope\n"
+" compound_statement_no_new_scope .or simple_statement;\n"
+"compound_statement_no_new_scope\n"
+" compound_statement_no_new_scope_1 .emit OP_BLOCK_BEGIN_NO_NEW_SCOPE .and .true .emit OP_END;\n"
+"compound_statement_no_new_scope_1\n"
+" compound_statement_no_new_scope_2 .or compound_statement_no_new_scope_3;\n"
+"compound_statement_no_new_scope_2\n"
+" lbrace .and rbrace;\n"
+"compound_statement_no_new_scope_3\n"
+" lbrace .and statement_list .and rbrace;\n"
+"statement_list\n"
+" statement .and .loop statement;\n"
+"expression_statement\n"
+" expression_statement_1 .or expression_statement_2;\n"
+"expression_statement_1\n"
+" semicolon .emit OP_PUSH_VOID .emit OP_END;\n"
+"expression_statement_2\n"
+" expression .and semicolon .emit OP_END;\n"
+"selection_statement\n"
+" \"if\" .emit OP_IF .and lparen .error LPAREN_EXPECTED .and expression .and\n"
+" rparen .error RPAREN_EXPECTED .emit OP_END .and selection_rest_statement;\n"
+"selection_rest_statement\n"
+" statement .and selection_rest_statement_1;\n"
+"selection_rest_statement_1\n"
+" selection_rest_statement_2 .or .true .emit OP_EXPRESSION .emit OP_PUSH_VOID .emit OP_END;\n"
+"selection_rest_statement_2\n"
+" \"else\" .and optional_space .and statement;\n"
+"condition\n"
+" condition_1 .emit OP_DECLARE .emit DECLARATION_INIT_DECLARATOR_LIST .or\n"
+" condition_3 .emit OP_EXPRESSION;\n"
+"condition_1\n"
+" condition_1_nospace .or condition_1_space;\n"
+"condition_1_nospace\n"
+" fully_specified_type_nospace .and condition_2;\n"
+"condition_1_space\n"
+" fully_specified_type_space .and space .and condition_2;\n"
+"condition_2\n"
+" identifier .emit VARIABLE_IDENTIFIER .and equals .emit VARIABLE_INITIALIZER .and\n"
+" initializer .and .true .emit DECLARATOR_NONE;\n"
+"condition_3\n"
+" expression .and .true .emit OP_END;\n"
+"iteration_statement\n"
+" iteration_statement_1 .or iteration_statement_2 .or iteration_statement_3;\n"
+"iteration_statement_1\n"
+" \"while\" .emit OP_WHILE .and lparen .error LPAREN_EXPECTED .and condition .and\n"
+" rparen .error RPAREN_EXPECTED .and statement_no_new_scope;\n"
+"iteration_statement_2\n"
+" \"do\" .emit OP_DO .and statement_space .and \"while\" .and lparen .error LPAREN_EXPECTED .and\n"
+" expression .and rparen .error RPAREN_EXPECTED .emit OP_END .and semicolon;\n"
+"iteration_statement_3\n"
+" \"for\" .emit OP_FOR .and lparen .error LPAREN_EXPECTED .and for_init_statement .and\n"
+" for_rest_statement .and rparen .error RPAREN_EXPECTED .and statement_no_new_scope;\n"
+"for_init_statement\n"
+" expression_statement .emit OP_EXPRESSION .or declaration_statement .emit OP_DECLARE;\n"
+"conditionopt\n"
+" condition .or\n"
+" .true .emit OP_EXPRESSION .emit OP_PUSH_BOOL .emit 2 .emit '1' .emit '\\0' .emit OP_END;\n"
+"for_rest_statement\n"
+" conditionopt .and semicolon .and for_rest_statement_1;\n"
+"for_rest_statement_1\n"
+" for_rest_statement_2 .or .true .emit OP_PUSH_VOID .emit OP_END;\n"
+"for_rest_statement_2\n"
+" expression .and .true .emit OP_END;\n"
+"jump_statement\n"
+" jump_statement_1 .or jump_statement_2 .or jump_statement_3 .or jump_statement_4 .or\n"
+" .if (shader_type == 1) jump_statement_5;\n"
+"jump_statement_1\n"
+" \"continue\" .and semicolon .emit OP_CONTINUE;\n"
+"jump_statement_2\n"
+" \"break\" .and semicolon .emit OP_BREAK;\n"
+"jump_statement_3\n"
+" \"return\" .emit OP_RETURN .and optional_space .and expression .and semicolon .emit OP_END;\n"
+"jump_statement_4\n"
+" \"return\" .emit OP_RETURN .and semicolon .emit OP_PUSH_VOID .emit OP_END;\n"
+"jump_statement_5\n"
+" \"discard\" .and semicolon .emit OP_DISCARD;\n"
+"__asm_statement\n"
+" \"__asm\" .and space .and identifier .and space .and asm_arguments .and semicolon .emit OP_END;\n"
+"asm_arguments\n"
+" asm_argument .and .true .emit OP_END .and .loop asm_arguments_1;\n"
+"asm_arguments_1\n"
+" comma .and asm_argument .and .true .emit OP_END;\n"
+"asm_argument\n"
+" variable_identifier .or floatconstant;\n"
+"translation_unit\n"
+" optional_space .emit REVISION .and external_declaration .error INVALID_EXTERNAL_DECLARATION .and\n"
+" .loop external_declaration .and optional_space .and\n"
+" '\\0' .error INVALID_EXTERNAL_DECLARATION .emit EXTERNAL_NULL;\n"
+"external_declaration\n"
+" function_definition .emit EXTERNAL_FUNCTION_DEFINITION .or\n"
+" declaration .emit EXTERNAL_DECLARATION;\n"
+"function_definition\n"
+" function_prototype .and compound_statement_no_new_scope;\n"
+"digit_oct\n"
+" '0'-'7';\n"
+"digit_dec\n"
+" '0'-'9';\n"
+"digit_hex\n"
+" '0'-'9' .or 'A'-'F' .or 'a'-'f';\n"
+"id_character_first\n"
+" 'a'-'z' .or 'A'-'Z' .or '_';\n"
+"id_character_next\n"
+" id_character_first .or digit_dec;\n"
+"identifier\n"
+" id_character_first .emit * .and .loop id_character_next .emit * .and .true .emit '\\0';\n"
+"float\n"
+" float_1 .or float_2;\n"
+"float_1\n"
+" float_fractional_constant .and float_optional_exponent_part;\n"
+"float_2\n"
+" float_digit_sequence .and .true .emit '\\0' .and float_exponent_part;\n"
+"float_fractional_constant\n"
+" float_fractional_constant_1 .or float_fractional_constant_2 .or float_fractional_constant_3;\n"
+"float_fractional_constant_1\n"
+" float_digit_sequence .and '.' .and float_digit_sequence;\n"
+"float_fractional_constant_2\n"
+" float_digit_sequence .and '.' .and .true .emit '\\0';\n"
+"float_fractional_constant_3\n"
+" '.' .emit '\\0' .and float_digit_sequence;\n"
+"float_optional_exponent_part\n"
+" float_exponent_part .or .true .emit '\\0';\n"
+"float_digit_sequence\n"
+" digit_dec .emit * .and .loop digit_dec .emit * .and .true .emit '\\0';\n"
+"float_exponent_part\n"
+" float_exponent_part_1 .or float_exponent_part_2;\n"
+"float_exponent_part_1\n"
+" 'e' .and float_optional_sign .and float_digit_sequence;\n"
+"float_exponent_part_2\n"
+" 'E' .and float_optional_sign .and float_digit_sequence;\n"
+"float_optional_sign\n"
+" float_sign .or .true;\n"
+"float_sign\n"
+" '+' .or '-' .emit '-';\n"
+"integer\n"
+" integer_hex .or integer_oct .or integer_dec;\n"
+"integer_hex\n"
+" '0' .and integer_hex_1 .emit 0x10 .and digit_hex .emit * .and .loop digit_hex .emit * .and\n"
+" .true .emit '\\0';\n"
+"integer_hex_1\n"
+" 'x' .or 'X';\n"
+"integer_oct\n"
+" '0' .emit 8 .emit * .and .loop digit_oct .emit * .and .true .emit '\\0';\n"
+"integer_dec\n"
+" digit_dec .emit 10 .emit * .and .loop digit_dec .emit * .and .true .emit '\\0';\n"
+"boolean\n"
+" \"true\" .emit 2 .emit '1' .emit '\\0' .or\n"
+" \"false\" .emit 2 .emit '0' .emit '\\0';\n"
+"type_name\n"
+" identifier;\n"
+"field_selection\n"
+" identifier;\n"
+"floatconstant\n"
+" float .emit OP_PUSH_FLOAT;\n"
+"intconstant\n"
+" integer .emit OP_PUSH_INT;\n"
+"boolconstant\n"
+" boolean .emit OP_PUSH_BOOL;\n"
+"optional_space\n"
+" .loop single_space;\n"
+"space\n"
+" single_space .and .loop single_space;\n"
+"single_space\n"
+" white_char .or c_style_comment_block .or cpp_style_comment_block;\n"
+"white_char\n"
+" ' ' .or '\\t' .or new_line .or '\\v' .or '\\f';\n"
+"new_line\n"
+" cr_lf .or lf_cr .or '\\n' .or '\\r';\n"
+"cr_lf\n"
+" '\\r' .and '\\n';\n"
+"lf_cr\n"
+" '\\n' .and '\\r';\n"
+"c_style_comment_block\n"
+" '/' .and '*' .and c_style_comment_rest;\n"
+"c_style_comment_rest\n"
+" .loop c_style_comment_char_no_star .and c_style_comment_rest_1;\n"
+"c_style_comment_rest_1\n"
+" c_style_comment_end .or c_style_comment_rest_2;\n"
+"c_style_comment_rest_2\n"
+" '*' .and c_style_comment_rest;\n"
+"c_style_comment_char_no_star\n"
+" '\\x2B'-'\\xFF' .or '\\x01'-'\\x29';\n"
+"c_style_comment_end\n"
+" '*' .and '/';\n"
+"cpp_style_comment_block\n"
+" '/' .and '/' .and cpp_style_comment_block_1;\n"
+"cpp_style_comment_block_1\n"
+" cpp_style_comment_block_2 .or cpp_style_comment_block_3;\n"
+"cpp_style_comment_block_2\n"
+" .loop cpp_style_comment_char .and new_line;\n"
+"cpp_style_comment_block_3\n"
+" .loop cpp_style_comment_char;\n"
+"cpp_style_comment_char\n"
+" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n"
+"ampersandampersand\n"
+" optional_space .and '&' .and '&' .and optional_space;\n"
+"barbar\n"
+" optional_space .and '|' .and '|' .and optional_space;\n"
+"bang\n"
+" optional_space .and '!' .and optional_space;\n"
+"bangequals\n"
+" optional_space .and '!' .and '=' .and optional_space;\n"
+"caretcaret\n"
+" optional_space .and '^' .and '^' .and optional_space;\n"
+"colon\n"
+" optional_space .and ':' .and optional_space;\n"
+"comma\n"
+" optional_space .and ',' .and optional_space;\n"
+"dot\n"
+" optional_space .and '.' .and optional_space;\n"
+"equals\n"
+" optional_space .and '=' .and optional_space;\n"
+"equalsequals\n"
+" optional_space .and '=' .and '=' .and optional_space;\n"
+"greater\n"
+" optional_space .and '>' .and optional_space;\n"
+"greaterequals\n"
+" optional_space .and '>' .and '=' .and optional_space;\n"
+"lbrace\n"
+" optional_space .and '{' .and optional_space;\n"
+"lbracket\n"
+" optional_space .and '[' .and optional_space;\n"
+"less\n"
+" optional_space .and '<' .and optional_space;\n"
+"lessequals\n"
+" optional_space .and '<' .and '=' .and optional_space;\n"
+"lparen\n"
+" optional_space .and '(' .and optional_space;\n"
+"minus\n"
+" optional_space .and '-' .and optional_space;\n"
+"minusequals\n"
+" optional_space .and '-' .and '=' .and optional_space;\n"
+"minusminus\n"
+" optional_space .and '-' .and '-' .and optional_space;\n"
+"plus\n"
+" optional_space .and '+' .and optional_space;\n"
+"plusequals\n"
+" optional_space .and '+' .and '=' .and optional_space;\n"
+"plusplus\n"
+" optional_space .and '+' .and '+' .and optional_space;\n"
+"question\n"
+" optional_space .and '?' .and optional_space;\n"
+"rbrace\n"
+" optional_space .and '}' .and optional_space;\n"
+"rbracket\n"
+" optional_space .and ']' .and optional_space;\n"
+"rparen\n"
+" optional_space .and ')' .and optional_space;\n"
+"semicolon\n"
+" optional_space .and ';' .and optional_space;\n"
+"slash\n"
+" optional_space .and '/' .and optional_space;\n"
+"slashequals\n"
+" optional_space .and '/' .and '=' .and optional_space;\n"
+"star\n"
+" optional_space .and '*' .and optional_space;\n"
+"starequals\n"
+" optional_space .and '*' .and '=' .and optional_space;\n"
+".string string_lexer;\n"
+"string_lexer\n"
+" lex_first_identifier_character .and .loop lex_next_identifier_character;\n"
+"lex_first_identifier_character\n"
+" 'a'-'z' .or 'A'-'Z' .or '_';\n"
+"lex_next_identifier_character\n"
+" 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_';\n"
+"err_token\n"
+" '~' .or '`' .or '!' .or '@' .or '#' .or '$' .or '%' .or '^' .or '&' .or '*' .or '(' .or ')' .or\n"
+" '-' .or '+' .or '=' .or '|' .or '\\\\' .or '[' .or ']' .or '{' .or '}' .or ':' .or ';' .or '\"' .or\n"
+" '\\'' .or '<' .or ',' .or '>' .or '.' .or '/' .or '?' .or err_identifier;\n"
+"err_identifier\n"
+" id_character_first .and .loop id_character_next;\n"
"" \ No newline at end of file
diff --git a/src/mesa/shader/slang/library/slang_version.syn b/src/mesa/shader/slang/library/slang_version.syn
index 3a8c7046b5..aaf8bef342 100755
--- a/src/mesa/shader/slang/library/slang_version.syn
+++ b/src/mesa/shader/slang/library/slang_version.syn
@@ -1,118 +1,118 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.3
- *
- * Copyright (C) 2005 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_version.syn
- * slang #version directive syntax
- * \author Michal Krol
- */
-
-.syntax version_directive;
-
-version_directive
- version_directive_1 .and .loop version_directive_2;
-version_directive_1
- prior_optional_spaces .and optional_version_directive .and .true .emit $;
-version_directive_2
- prior_optional_spaces .and version_directive_body .and .true .emit $;
-
-optional_version_directive
- version_directive_body .or .true .emit 10 .emit 1;
-
-version_directive_body
- '#' .and optional_space .and "version" .and space .and version_number .and optional_space .and
- new_line;
-
-version_number
- version_number_110;
-
-version_number_110
- leading_zeroes .and "110" .emit 10 .emit 1;
-
-leading_zeroes
- .loop zero;
-
-zero
- '0';
-
-space
- single_space .and .loop single_space;
-
-optional_space
- .loop single_space;
-
-single_space
- ' ' .or '\t';
-
-prior_optional_spaces
- .loop prior_space;
-
-prior_space
- c_style_comment_block .or cpp_style_comment_block .or space .or new_line;
-
-c_style_comment_block
- '/' .and '*' .and c_style_comment_rest;
-
-c_style_comment_rest
- .loop c_style_comment_char_no_star .and c_style_comment_rest_1;
-c_style_comment_rest_1
- c_style_comment_end .or c_style_comment_rest_2;
-c_style_comment_rest_2
- '*' .and c_style_comment_rest;
-
-c_style_comment_char_no_star
- '\x2B'-'\xFF' .or '\x01'-'\x29';
-
-c_style_comment_end
- '*' .and '/';
-
-cpp_style_comment_block
- '/' .and '/' .and cpp_style_comment_block_1;
-cpp_style_comment_block_1
- cpp_style_comment_block_2 .or cpp_style_comment_block_3;
-cpp_style_comment_block_2
- .loop cpp_style_comment_char .and new_line;
-cpp_style_comment_block_3
- .loop cpp_style_comment_char;
-
-cpp_style_comment_char
- '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C';
-
-new_line
- cr_lf .or lf_cr .or '\n' .or '\r';
-
-cr_lf
- '\r' .and '\n';
-
-lf_cr
- '\n' .and '\r';
-
-.string __string_filter;
-
-__string_filter
- .loop __identifier_char;
-
-__identifier_char
- 'a'-'z' .or 'A'-'Z' .or '_' .or '0'-'9';
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.3
+ *
+ * Copyright (C) 2005 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file slang_version.syn
+ * slang #version directive syntax
+ * \author Michal Krol
+ */
+
+.syntax version_directive;
+
+version_directive
+ version_directive_1 .and .loop version_directive_2;
+version_directive_1
+ prior_optional_spaces .and optional_version_directive .and .true .emit $;
+version_directive_2
+ prior_optional_spaces .and version_directive_body .and .true .emit $;
+
+optional_version_directive
+ version_directive_body .or .true .emit 10 .emit 1;
+
+version_directive_body
+ '#' .and optional_space .and "version" .and space .and version_number .and optional_space .and
+ new_line;
+
+version_number
+ version_number_110;
+
+version_number_110
+ leading_zeroes .and "110" .emit 10 .emit 1;
+
+leading_zeroes
+ .loop zero;
+
+zero
+ '0';
+
+space
+ single_space .and .loop single_space;
+
+optional_space
+ .loop single_space;
+
+single_space
+ ' ' .or '\t';
+
+prior_optional_spaces
+ .loop prior_space;
+
+prior_space
+ c_style_comment_block .or cpp_style_comment_block .or space .or new_line;
+
+c_style_comment_block
+ '/' .and '*' .and c_style_comment_rest;
+
+c_style_comment_rest
+ .loop c_style_comment_char_no_star .and c_style_comment_rest_1;
+c_style_comment_rest_1
+ c_style_comment_end .or c_style_comment_rest_2;
+c_style_comment_rest_2
+ '*' .and c_style_comment_rest;
+
+c_style_comment_char_no_star
+ '\x2B'-'\xFF' .or '\x01'-'\x29';
+
+c_style_comment_end
+ '*' .and '/';
+
+cpp_style_comment_block
+ '/' .and '/' .and cpp_style_comment_block_1;
+cpp_style_comment_block_1
+ cpp_style_comment_block_2 .or cpp_style_comment_block_3;
+cpp_style_comment_block_2
+ .loop cpp_style_comment_char .and new_line;
+cpp_style_comment_block_3
+ .loop cpp_style_comment_char;
+
+cpp_style_comment_char
+ '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C';
+
+new_line
+ cr_lf .or lf_cr .or '\n' .or '\r';
+
+cr_lf
+ '\r' .and '\n';
+
+lf_cr
+ '\n' .and '\r';
+
+.string __string_filter;
+
+__string_filter
+ .loop __identifier_char;
+
+__identifier_char
+ 'a'-'z' .or 'A'-'Z' .or '_' .or '0'-'9';
+
diff --git a/src/mesa/shader/slang/library/slang_version_syn.h b/src/mesa/shader/slang/library/slang_version_syn.h
index 1c27546d76..3b94d85927 100755
--- a/src/mesa/shader/slang/library/slang_version_syn.h
+++ b/src/mesa/shader/slang/library/slang_version_syn.h
@@ -1,64 +1,64 @@
-".syntax version_directive;\n"
-"version_directive\n"
-" version_directive_1 .and .loop version_directive_2;\n"
-"version_directive_1\n"
-" prior_optional_spaces .and optional_version_directive .and .true .emit $;\n"
-"version_directive_2\n"
-" prior_optional_spaces .and version_directive_body .and .true .emit $;\n"
-"optional_version_directive\n"
-" version_directive_body .or .true .emit 10 .emit 1;\n"
-"version_directive_body\n"
-" '#' .and optional_space .and \"version\" .and space .and version_number .and optional_space .and\n"
-" new_line;\n"
-"version_number\n"
-" version_number_110;\n"
-"version_number_110\n"
-" leading_zeroes .and \"110\" .emit 10 .emit 1;\n"
-"leading_zeroes\n"
-" .loop zero;\n"
-"zero\n"
-" '0';\n"
-"space\n"
-" single_space .and .loop single_space;\n"
-"optional_space\n"
-" .loop single_space;\n"
-"single_space\n"
-" ' ' .or '\\t';\n"
-"prior_optional_spaces\n"
-" .loop prior_space;\n"
-"prior_space\n"
-" c_style_comment_block .or cpp_style_comment_block .or space .or new_line;\n"
-"c_style_comment_block\n"
-" '/' .and '*' .and c_style_comment_rest;\n"
-"c_style_comment_rest\n"
-" .loop c_style_comment_char_no_star .and c_style_comment_rest_1;\n"
-"c_style_comment_rest_1\n"
-" c_style_comment_end .or c_style_comment_rest_2;\n"
-"c_style_comment_rest_2\n"
-" '*' .and c_style_comment_rest;\n"
-"c_style_comment_char_no_star\n"
-" '\\x2B'-'\\xFF' .or '\\x01'-'\\x29';\n"
-"c_style_comment_end\n"
-" '*' .and '/';\n"
-"cpp_style_comment_block\n"
-" '/' .and '/' .and cpp_style_comment_block_1;\n"
-"cpp_style_comment_block_1\n"
-" cpp_style_comment_block_2 .or cpp_style_comment_block_3;\n"
-"cpp_style_comment_block_2\n"
-" .loop cpp_style_comment_char .and new_line;\n"
-"cpp_style_comment_block_3\n"
-" .loop cpp_style_comment_char;\n"
-"cpp_style_comment_char\n"
-" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n"
-"new_line\n"
-" cr_lf .or lf_cr .or '\\n' .or '\\r';\n"
-"cr_lf\n"
-" '\\r' .and '\\n';\n"
-"lf_cr\n"
-" '\\n' .and '\\r';\n"
-".string __string_filter;\n"
-"__string_filter\n"
-" .loop __identifier_char;\n"
-"__identifier_char\n"
-" 'a'-'z' .or 'A'-'Z' .or '_' .or '0'-'9';\n"
-""
+".syntax version_directive;\n"
+"version_directive\n"
+" version_directive_1 .and .loop version_directive_2;\n"
+"version_directive_1\n"
+" prior_optional_spaces .and optional_version_directive .and .true .emit $;\n"
+"version_directive_2\n"
+" prior_optional_spaces .and version_directive_body .and .true .emit $;\n"
+"optional_version_directive\n"
+" version_directive_body .or .true .emit 10 .emit 1;\n"
+"version_directive_body\n"
+" '#' .and optional_space .and \"version\" .and space .and version_number .and optional_space .and\n"
+" new_line;\n"
+"version_number\n"
+" version_number_110;\n"
+"version_number_110\n"
+" leading_zeroes .and \"110\" .emit 10 .emit 1;\n"
+"leading_zeroes\n"
+" .loop zero;\n"
+"zero\n"
+" '0';\n"
+"space\n"
+" single_space .and .loop single_space;\n"
+"optional_space\n"
+" .loop single_space;\n"
+"single_space\n"
+" ' ' .or '\\t';\n"
+"prior_optional_spaces\n"
+" .loop prior_space;\n"
+"prior_space\n"
+" c_style_comment_block .or cpp_style_comment_block .or space .or new_line;\n"
+"c_style_comment_block\n"
+" '/' .and '*' .and c_style_comment_rest;\n"
+"c_style_comment_rest\n"
+" .loop c_style_comment_char_no_star .and c_style_comment_rest_1;\n"
+"c_style_comment_rest_1\n"
+" c_style_comment_end .or c_style_comment_rest_2;\n"
+"c_style_comment_rest_2\n"
+" '*' .and c_style_comment_rest;\n"
+"c_style_comment_char_no_star\n"
+" '\\x2B'-'\\xFF' .or '\\x01'-'\\x29';\n"
+"c_style_comment_end\n"
+" '*' .and '/';\n"
+"cpp_style_comment_block\n"
+" '/' .and '/' .and cpp_style_comment_block_1;\n"
+"cpp_style_comment_block_1\n"
+" cpp_style_comment_block_2 .or cpp_style_comment_block_3;\n"
+"cpp_style_comment_block_2\n"
+" .loop cpp_style_comment_char .and new_line;\n"
+"cpp_style_comment_block_3\n"
+" .loop cpp_style_comment_char;\n"
+"cpp_style_comment_char\n"
+" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n"
+"new_line\n"
+" cr_lf .or lf_cr .or '\\n' .or '\\r';\n"
+"cr_lf\n"
+" '\\r' .and '\\n';\n"
+"lf_cr\n"
+" '\\n' .and '\\r';\n"
+".string __string_filter;\n"
+"__string_filter\n"
+" .loop __identifier_char;\n"
+"__identifier_char\n"
+" 'a'-'z' .or 'A'-'Z' .or '_' .or '0'-'9';\n"
+""
diff --git a/src/mesa/shader/slang/library/slang_vertex_builtin.gc b/src/mesa/shader/slang/library/slang_vertex_builtin.gc
index 37555ebd1b..8afb723ee2 100755
--- a/src/mesa/shader/slang/library/slang_vertex_builtin.gc
+++ b/src/mesa/shader/slang/library/slang_vertex_builtin.gc
@@ -1,26 +1,26 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
//
// From Shader Spec, ver. 1.10, rev. 59
@@ -54,7 +54,7 @@ varying float gl_FogFragCoord;
//
// Geometric Functions
//
-
+
vec4 ftransform () {
return gl_ModelViewProjectionMatrix * gl_Vertex;
}
@@ -63,66 +63,66 @@ vec4 ftransform () {
// 8.7 Texture Lookup Functions
//
-vec4 texture1DLod (sampler1D sampler, float coord, float lod) {
- vec4 texel;
- __asm vec4_tex1d texel, sampler, coord, lod;
+vec4 texture1DLod (sampler1D sampler, float coord, float lod) {
+ vec4 texel;
+ __asm vec4_tex1d texel, sampler, coord, lod;
return texel;
-}
+}
vec4 texture1DProjLod (sampler1D sampler, vec2 coord, float lod) {
return texture1DLod (sampler, coord.s / coord.t, lod);
-}
+}
vec4 texture1DProjLod (sampler1D sampler, vec4 coord, float lod) {
return texture1DLod (sampler, coord.s / coord.q, lod);
}
-vec4 texture2DLod (sampler2D sampler, vec2 coord, float lod) {
- vec4 texel;
- __asm vec4_tex2d texel, sampler, coord, lod;
+vec4 texture2DLod (sampler2D sampler, vec2 coord, float lod) {
+ vec4 texel;
+ __asm vec4_tex2d texel, sampler, coord, lod;
return texel;
-}
+}
-vec4 texture2DProjLod (sampler2D sampler, vec3 coord, float lod) {
+vec4 texture2DProjLod (sampler2D sampler, vec3 coord, float lod) {
return texture2DLod (sampler, vec2 (coord.s / coord.p, coord.t / coord.p), lod);
-}
+}
-vec4 texture2DProjLod (sampler2D sampler, vec4 coord, float lod) {
+vec4 texture2DProjLod (sampler2D sampler, vec4 coord, float lod) {
return texture2DLod (sampler, vec2 (coord.s / coord.q, coord.t / coord.q), lod);
}
-vec4 texture3DLod (sampler3D sampler, vec3 coord, float lod) {
- vec4 texel;
- __asm vec4_tex3d texel, sampler, coord, lod;
+vec4 texture3DLod (sampler3D sampler, vec3 coord, float lod) {
+ vec4 texel;
+ __asm vec4_tex3d texel, sampler, coord, lod;
return texel;
}
-vec4 texture3DProjLod (sampler3D sampler, vec4 coord, float lod) {
+vec4 texture3DProjLod (sampler3D sampler, vec4 coord, float lod) {
return texture3DLod (sampler, vec3 (coord.s / coord.q, coord.t / coord.q, coord.p / coord.q), lod);
}
-vec4 textureCubeLod (samplerCube sampler, vec3 coord, float lod) {
- vec4 texel;
- __asm vec4_texcube texel, sampler, coord, lod;
+vec4 textureCubeLod (samplerCube sampler, vec3 coord, float lod) {
+ vec4 texel;
+ __asm vec4_texcube texel, sampler, coord, lod;
return texel;
}
-vec4 shadow1DLod (sampler1DShadow sampler, vec3 coord, float lod) {
- vec4 texel;
- __asm vec4_shad1d texel, sampler, coord, lod;
+vec4 shadow1DLod (sampler1DShadow sampler, vec3 coord, float lod) {
+ vec4 texel;
+ __asm vec4_shad1d texel, sampler, coord, lod;
return texel;
}
-vec4 shadow1DProjLod (sampler1DShadow sampler, vec4 coord, float lod) {
- return shadow1DLod (sampler, vec3 (coord.s / coord.q, 0.0, coord.p / coord.q), lod);
-}
-
-vec4 shadow2DLod (sampler2DShadow sampler, vec3 coord, float lod) {
- vec4 texel;
- __asm vec4_shad2d texel, sampler, coord, lod;
+vec4 shadow1DProjLod (sampler1DShadow sampler, vec4 coord, float lod) {
+ return shadow1DLod (sampler, vec3 (coord.s / coord.q, 0.0, coord.p / coord.q), lod);
+}
+
+vec4 shadow2DLod (sampler2DShadow sampler, vec3 coord, float lod) {
+ vec4 texel;
+ __asm vec4_shad2d texel, sampler, coord, lod;
return texel;
-}
+}
-vec4 shadow2DProjLod (sampler2DShadow sampler, vec4 coord, float lod) {
+vec4 shadow2DProjLod (sampler2DShadow sampler, vec4 coord, float lod) {
return shadow2DLod (sampler, vec3 (coord.s / coord.q, coord.t / coord.q, coord.p / coord.q), lod);
}
diff --git a/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h b/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h
index 62e081957f..55324b12dd 100644
--- a/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h
+++ b/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h
@@ -1,78 +1,78 @@
-
-/* DO NOT EDIT - THIS FILE AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */
-/* slang_vertex_builtin.gc */
-
-3,2,2,5,12,1,103,108,95,80,111,115,105,116,105,111,110,0,0,0,2,2,5,9,1,103,108,95,80,111,105,110,
-116,83,105,122,101,0,0,0,2,2,5,12,1,103,108,95,67,108,105,112,86,101,114,116,101,120,0,0,0,2,2,2,
-12,1,103,108,95,67,111,108,111,114,0,0,0,2,2,2,12,1,103,108,95,83,101,99,111,110,100,97,114,121,67,
-111,108,111,114,0,0,0,2,2,2,11,1,103,108,95,78,111,114,109,97,108,0,0,0,2,2,2,12,1,103,108,95,86,
-101,114,116,101,120,0,0,0,2,2,2,12,1,103,108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,
-48,0,0,0,2,2,2,12,1,103,108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,49,0,0,0,2,2,2,12,
-1,103,108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,50,0,0,0,2,2,2,12,1,103,108,95,77,
-117,108,116,105,84,101,120,67,111,111,114,100,51,0,0,0,2,2,2,12,1,103,108,95,77,117,108,116,105,84,
-101,120,67,111,111,114,100,52,0,0,0,2,2,2,12,1,103,108,95,77,117,108,116,105,84,101,120,67,111,111,
-114,100,53,0,0,0,2,2,2,12,1,103,108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,54,0,0,0,2,
-2,2,12,1,103,108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,55,0,0,0,2,2,2,9,1,103,108,95,
-70,111,103,67,111,111,114,100,0,0,0,2,2,3,12,1,103,108,95,70,114,111,110,116,67,111,108,111,114,0,
-0,0,2,2,3,12,1,103,108,95,66,97,99,107,67,111,108,111,114,0,0,0,2,2,3,12,1,103,108,95,70,114,111,
-110,116,83,101,99,111,110,100,97,114,121,67,111,108,111,114,0,0,0,2,2,3,12,1,103,108,95,66,97,99,
-107,83,101,99,111,110,100,97,114,121,67,111,108,111,114,0,0,0,2,2,3,12,1,103,108,95,84,101,120,67,
-111,111,114,100,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,
-0,2,2,3,9,1,103,108,95,70,111,103,70,114,97,103,67,111,111,114,100,0,0,0,1,0,12,0,102,116,114,97,
-110,115,102,111,114,109,0,0,1,8,18,103,108,95,77,111,100,101,108,86,105,101,119,80,114,111,106,101,
-99,116,105,111,110,77,97,116,114,105,120,0,18,103,108,95,86,101,114,116,101,120,0,48,0,0,1,0,12,0,
-116,101,120,116,117,114,101,49,68,76,111,100,0,1,0,0,16,115,97,109,112,108,101,114,0,0,1,0,0,9,99,
-111,111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,
-52,95,116,101,120,49,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,
-111,114,100,0,0,18,108,111,100,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,
-114,101,49,68,80,114,111,106,76,111,100,0,1,0,0,16,115,97,109,112,108,101,114,0,0,1,0,0,10,99,111,
-111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,8,58,116,101,120,116,117,114,101,49,68,76,111,100,0,18,
-115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,116,0,
-49,0,18,108,111,100,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,76,111,100,
-0,1,0,0,16,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,108,111,100,0,0,
-0,1,8,58,116,101,120,116,117,114,101,49,68,76,111,100,0,18,115,97,109,112,108,101,114,0,0,18,99,
-111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,108,111,100,0,0,0,0,0,1,0,12,0,
-116,101,120,116,117,114,101,50,68,76,111,100,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,10,99,
-111,111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,
-52,95,116,101,120,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,
-111,114,100,0,0,18,108,111,100,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,
-114,101,50,68,80,114,111,106,76,111,100,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,
-111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,8,58,116,101,120,116,117,114,101,50,68,76,111,100,0,18,
-115,97,109,112,108,101,114,0,0,58,118,101,99,50,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,
-114,100,0,59,112,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,112,0,49,0,0,0,
-18,108,111,100,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,80,114,111,106,76,111,100,0,1,
-0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,
-8,58,116,101,120,116,117,114,101,50,68,76,111,100,0,18,115,97,109,112,108,101,114,0,0,58,118,101,
-99,50,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,
-100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,18,108,111,100,0,0,0,0,0,1,0,12,0,116,101,
-120,116,117,114,101,51,68,76,111,100,0,1,0,0,18,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,
-114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,
-116,101,120,51,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,
-114,100,0,0,18,108,111,100,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,114,
-101,51,68,80,114,111,106,76,111,100,0,1,0,0,18,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,
-114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,8,58,116,101,120,116,117,114,101,51,68,76,111,100,0,18,115,
-97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,
-100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,
-111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,18,108,111,100,0,0,0,0,0,1,0,
-12,0,116,101,120,116,117,114,101,67,117,98,101,76,111,100,0,1,0,0,19,115,97,109,112,108,101,114,0,
-0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,
-4,118,101,99,52,95,116,101,120,99,117,98,101,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,
-101,114,0,0,18,99,111,111,114,100,0,0,18,108,111,100,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,
-115,104,97,100,111,119,49,68,76,111,100,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,
-111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,
-95,115,104,97,100,49,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,
-111,114,100,0,0,18,108,111,100,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,
-119,49,68,80,114,111,106,76,111,100,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,
-114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,8,58,115,104,97,100,111,119,49,68,76,111,100,0,18,115,97,
-109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,
-0,59,113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,
-49,0,0,0,18,108,111,100,0,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,76,111,100,0,1,0,0,21,115,
-97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,3,2,0,12,1,
-116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,50,100,0,18,116,101,120,101,108,0,0,18,
-115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,18,108,111,100,0,0,0,8,18,116,101,120,101,
-108,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,80,114,111,106,76,111,100,0,1,0,0,21,115,97,109,
-112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,8,58,115,104,97,
-100,111,119,50,68,76,111,100,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,
-114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,
-111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,
-49,0,0,0,18,108,111,100,0,0,0,0,0,0
+
+/* DO NOT EDIT - THIS FILE AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */
+/* slang_vertex_builtin.gc */
+
+3,2,2,5,12,1,103,108,95,80,111,115,105,116,105,111,110,0,0,0,2,2,5,9,1,103,108,95,80,111,105,110,
+116,83,105,122,101,0,0,0,2,2,5,12,1,103,108,95,67,108,105,112,86,101,114,116,101,120,0,0,0,2,2,2,
+12,1,103,108,95,67,111,108,111,114,0,0,0,2,2,2,12,1,103,108,95,83,101,99,111,110,100,97,114,121,67,
+111,108,111,114,0,0,0,2,2,2,11,1,103,108,95,78,111,114,109,97,108,0,0,0,2,2,2,12,1,103,108,95,86,
+101,114,116,101,120,0,0,0,2,2,2,12,1,103,108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,
+48,0,0,0,2,2,2,12,1,103,108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,49,0,0,0,2,2,2,12,
+1,103,108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,50,0,0,0,2,2,2,12,1,103,108,95,77,
+117,108,116,105,84,101,120,67,111,111,114,100,51,0,0,0,2,2,2,12,1,103,108,95,77,117,108,116,105,84,
+101,120,67,111,111,114,100,52,0,0,0,2,2,2,12,1,103,108,95,77,117,108,116,105,84,101,120,67,111,111,
+114,100,53,0,0,0,2,2,2,12,1,103,108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,54,0,0,0,2,
+2,2,12,1,103,108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,55,0,0,0,2,2,2,9,1,103,108,95,
+70,111,103,67,111,111,114,100,0,0,0,2,2,3,12,1,103,108,95,70,114,111,110,116,67,111,108,111,114,0,
+0,0,2,2,3,12,1,103,108,95,66,97,99,107,67,111,108,111,114,0,0,0,2,2,3,12,1,103,108,95,70,114,111,
+110,116,83,101,99,111,110,100,97,114,121,67,111,108,111,114,0,0,0,2,2,3,12,1,103,108,95,66,97,99,
+107,83,101,99,111,110,100,97,114,121,67,111,108,111,114,0,0,0,2,2,3,12,1,103,108,95,84,101,120,67,
+111,111,114,100,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,
+0,2,2,3,9,1,103,108,95,70,111,103,70,114,97,103,67,111,111,114,100,0,0,0,1,0,12,0,102,116,114,97,
+110,115,102,111,114,109,0,0,1,8,18,103,108,95,77,111,100,101,108,86,105,101,119,80,114,111,106,101,
+99,116,105,111,110,77,97,116,114,105,120,0,18,103,108,95,86,101,114,116,101,120,0,48,0,0,1,0,12,0,
+116,101,120,116,117,114,101,49,68,76,111,100,0,1,0,0,16,115,97,109,112,108,101,114,0,0,1,0,0,9,99,
+111,111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,
+52,95,116,101,120,49,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,
+111,114,100,0,0,18,108,111,100,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,
+114,101,49,68,80,114,111,106,76,111,100,0,1,0,0,16,115,97,109,112,108,101,114,0,0,1,0,0,10,99,111,
+111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,8,58,116,101,120,116,117,114,101,49,68,76,111,100,0,18,
+115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,116,0,
+49,0,18,108,111,100,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,49,68,80,114,111,106,76,111,100,
+0,1,0,0,16,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,108,111,100,0,0,
+0,1,8,58,116,101,120,116,117,114,101,49,68,76,111,100,0,18,115,97,109,112,108,101,114,0,0,18,99,
+111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,108,111,100,0,0,0,0,0,1,0,12,0,
+116,101,120,116,117,114,101,50,68,76,111,100,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,10,99,
+111,111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,
+52,95,116,101,120,50,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,
+111,114,100,0,0,18,108,111,100,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,
+114,101,50,68,80,114,111,106,76,111,100,0,1,0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,
+111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,8,58,116,101,120,116,117,114,101,50,68,76,111,100,0,18,
+115,97,109,112,108,101,114,0,0,58,118,101,99,50,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,
+114,100,0,59,112,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,112,0,49,0,0,0,
+18,108,111,100,0,0,0,0,0,1,0,12,0,116,101,120,116,117,114,101,50,68,80,114,111,106,76,111,100,0,1,
+0,0,17,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,
+8,58,116,101,120,116,117,114,101,50,68,76,111,100,0,18,115,97,109,112,108,101,114,0,0,58,118,101,
+99,50,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,
+100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,18,108,111,100,0,0,0,0,0,1,0,12,0,116,101,
+120,116,117,114,101,51,68,76,111,100,0,1,0,0,18,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,
+114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,95,
+116,101,120,51,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,
+114,100,0,0,18,108,111,100,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,116,101,120,116,117,114,
+101,51,68,80,114,111,106,76,111,100,0,1,0,0,18,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,
+114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,8,58,116,101,120,116,117,114,101,51,68,76,111,100,0,18,115,
+97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,
+100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,
+111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,49,0,0,0,18,108,111,100,0,0,0,0,0,1,0,
+12,0,116,101,120,116,117,114,101,67,117,98,101,76,111,100,0,1,0,0,19,115,97,109,112,108,101,114,0,
+0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,
+4,118,101,99,52,95,116,101,120,99,117,98,101,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,
+101,114,0,0,18,99,111,111,114,100,0,0,18,108,111,100,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,
+115,104,97,100,111,119,49,68,76,111,100,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,11,99,111,
+111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,3,2,0,12,1,116,101,120,101,108,0,0,0,4,118,101,99,52,
+95,115,104,97,100,49,100,0,18,116,101,120,101,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,
+111,114,100,0,0,18,108,111,100,0,0,0,8,18,116,101,120,101,108,0,0,0,1,0,12,0,115,104,97,100,111,
+119,49,68,80,114,111,106,76,111,100,0,1,0,0,20,115,97,109,112,108,101,114,0,0,1,0,0,12,99,111,111,
+114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,8,58,115,104,97,100,111,119,49,68,76,111,100,0,18,115,97,
+109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,114,100,0,59,115,0,18,99,111,111,114,100,
+0,59,113,0,49,0,17,48,0,48,0,0,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,
+49,0,0,0,18,108,111,100,0,0,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,76,111,100,0,1,0,0,21,115,
+97,109,112,108,101,114,0,0,1,0,0,11,99,111,111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,3,2,0,12,1,
+116,101,120,101,108,0,0,0,4,118,101,99,52,95,115,104,97,100,50,100,0,18,116,101,120,101,108,0,0,18,
+115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,18,108,111,100,0,0,0,8,18,116,101,120,101,
+108,0,0,0,1,0,12,0,115,104,97,100,111,119,50,68,80,114,111,106,76,111,100,0,1,0,0,21,115,97,109,
+112,108,101,114,0,0,1,0,0,12,99,111,111,114,100,0,0,1,0,0,9,108,111,100,0,0,0,1,8,58,115,104,97,
+100,111,119,50,68,76,111,100,0,18,115,97,109,112,108,101,114,0,0,58,118,101,99,51,0,18,99,111,111,
+114,100,0,59,115,0,18,99,111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,116,0,18,99,
+111,111,114,100,0,59,113,0,49,0,18,99,111,111,114,100,0,59,112,0,18,99,111,111,114,100,0,59,113,0,
+49,0,0,0,18,108,111,100,0,0,0,0,0,0
diff --git a/src/mesa/shader/slang/slang_analyse.c b/src/mesa/shader/slang/slang_analyse.c
index 76320848b5..7a38dbbcbb 100644
--- a/src/mesa/shader/slang/slang_analyse.c
+++ b/src/mesa/shader/slang/slang_analyse.c
@@ -1,100 +1,100 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_analyse.c
- * slang assembly code analysis
- * \author Michal Krol
- */
-
-#include "imports.h"
-#include "slang_analyse.h"
-#include "slang_utility.h"
-
-GLboolean _slang_analyse_texture_usage (slang_program *prog)
-{
- GLuint i, count = 0;
-
- slang_texture_usages_dtr (&prog->texture_usage);
- slang_texture_usages_ctr (&prog->texture_usage);
-
- /*
- * We could do a full code analysis to find out which uniforms are actually used.
- * For now, we are very conservative and extract them from uniform binding table, which
- * in turn also do not come from code analysis.
- */
-
- for (i = 0; i < prog->uniforms.count; i++)
- {
- slang_uniform_binding *b = &prog->uniforms.table[i];
-
- if (b->address[SLANG_SHADER_FRAGMENT] != ~0 && !slang_export_data_quant_struct (b->quant))
- {
- switch (slang_export_data_quant_type (b->quant))
- {
- case GL_SAMPLER_1D_ARB:
- case GL_SAMPLER_2D_ARB:
- case GL_SAMPLER_3D_ARB:
- case GL_SAMPLER_CUBE_ARB:
- case GL_SAMPLER_1D_SHADOW_ARB:
- case GL_SAMPLER_2D_SHADOW_ARB:
- count++;
- break;
- }
- }
- }
-
- if (count == 0)
- return GL_TRUE;
- prog->texture_usage.table = (slang_texture_usage *) slang_alloc_malloc (
- count * sizeof (slang_texture_usage));
- if (prog->texture_usage.table == NULL)
- return GL_FALSE;
- prog->texture_usage.count = count;
-
- for (count = i = 0; i < prog->uniforms.count; i++)
- {
- slang_uniform_binding *b = &prog->uniforms.table[i];
-
- if (b->address[SLANG_SHADER_FRAGMENT] != ~0 && !slang_export_data_quant_struct (b->quant))
- {
- switch (slang_export_data_quant_type (b->quant))
- {
- case GL_SAMPLER_1D_ARB:
- case GL_SAMPLER_2D_ARB:
- case GL_SAMPLER_3D_ARB:
- case GL_SAMPLER_CUBE_ARB:
- case GL_SAMPLER_1D_SHADOW_ARB:
- case GL_SAMPLER_2D_SHADOW_ARB:
- prog->texture_usage.table[count].quant = b->quant;
- prog->texture_usage.table[count].frag_address = b->address[SLANG_SHADER_FRAGMENT];
- count++;
- break;
- }
- }
- }
-
- return GL_TRUE;
-}
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file slang_analyse.c
+ * slang assembly code analysis
+ * \author Michal Krol
+ */
+
+#include "imports.h"
+#include "slang_analyse.h"
+#include "slang_utility.h"
+
+GLboolean _slang_analyse_texture_usage (slang_program *prog)
+{
+ GLuint i, count = 0;
+
+ slang_texture_usages_dtr (&prog->texture_usage);
+ slang_texture_usages_ctr (&prog->texture_usage);
+
+ /*
+ * We could do a full code analysis to find out which uniforms are actually used.
+ * For now, we are very conservative and extract them from uniform binding table, which
+ * in turn also do not come from code analysis.
+ */
+
+ for (i = 0; i < prog->uniforms.count; i++)
+ {
+ slang_uniform_binding *b = &prog->uniforms.table[i];
+
+ if (b->address[SLANG_SHADER_FRAGMENT] != ~0 && !slang_export_data_quant_struct (b->quant))
+ {
+ switch (slang_export_data_quant_type (b->quant))
+ {
+ case GL_SAMPLER_1D_ARB:
+ case GL_SAMPLER_2D_ARB:
+ case GL_SAMPLER_3D_ARB:
+ case GL_SAMPLER_CUBE_ARB:
+ case GL_SAMPLER_1D_SHADOW_ARB:
+ case GL_SAMPLER_2D_SHADOW_ARB:
+ count++;
+ break;
+ }
+ }
+ }
+
+ if (count == 0)
+ return GL_TRUE;
+ prog->texture_usage.table = (slang_texture_usage *) slang_alloc_malloc (
+ count * sizeof (slang_texture_usage));
+ if (prog->texture_usage.table == NULL)
+ return GL_FALSE;
+ prog->texture_usage.count = count;
+
+ for (count = i = 0; i < prog->uniforms.count; i++)
+ {
+ slang_uniform_binding *b = &prog->uniforms.table[i];
+
+ if (b->address[SLANG_SHADER_FRAGMENT] != ~0 && !slang_export_data_quant_struct (b->quant))
+ {
+ switch (slang_export_data_quant_type (b->quant))
+ {
+ case GL_SAMPLER_1D_ARB:
+ case GL_SAMPLER_2D_ARB:
+ case GL_SAMPLER_3D_ARB:
+ case GL_SAMPLER_CUBE_ARB:
+ case GL_SAMPLER_1D_SHADOW_ARB:
+ case GL_SAMPLER_2D_SHADOW_ARB:
+ prog->texture_usage.table[count].quant = b->quant;
+ prog->texture_usage.table[count].frag_address = b->address[SLANG_SHADER_FRAGMENT];
+ count++;
+ break;
+ }
+ }
+ }
+
+ return GL_TRUE;
+}
+
diff --git a/src/mesa/shader/slang/slang_analyse.h b/src/mesa/shader/slang/slang_analyse.h
index 89814b3cc3..d7e39ae7ce 100644
--- a/src/mesa/shader/slang/slang_analyse.h
+++ b/src/mesa/shader/slang/slang_analyse.h
@@ -1,50 +1,50 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#if !defined SLANG_ANALYSE_H
-#define SLANG_ANALYSE_H
-
-#include "slang_link.h"
-
-#if defined __cplusplus
-extern "C" {
-#endif
-
-/*
- * Texture usage analysis is a bit more difficult than for fragment programs. While fragment
- * programs statically link to texture targets and texture units, shaders statically link
- * only to texture targets. The texture unit linkage is determined just before the execution
- * of a given primitive by reading active uniform samplers.
- *
- * This procedure retrieves a list of uniforms that reach texture sample instructions.
- */
-
-GLboolean _slang_analyse_texture_usage (slang_program *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#if !defined SLANG_ANALYSE_H
+#define SLANG_ANALYSE_H
+
+#include "slang_link.h"
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Texture usage analysis is a bit more difficult than for fragment programs. While fragment
+ * programs statically link to texture targets and texture units, shaders statically link
+ * only to texture targets. The texture unit linkage is determined just before the execution
+ * of a given primitive by reading active uniform samplers.
+ *
+ * This procedure retrieves a list of uniforms that reach texture sample instructions.
+ */
+
+GLboolean _slang_analyse_texture_usage (slang_program *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/src/mesa/shader/slang/slang_assemble.c b/src/mesa/shader/slang/slang_assemble.c
index b7904b72fe..0b87f7ce86 100644
--- a/src/mesa/shader/slang/slang_assemble.c
+++ b/src/mesa/shader/slang/slang_assemble.c
@@ -1,1464 +1,1464 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_assemble.c
- * slang intermediate code assembler
- * \author Michal Krol
- */
-
-#include "imports.h"
-#include "slang_assemble.h"
-#include "slang_compile.h"
-#include "slang_storage.h"
-
-/* slang_assembly */
-
-static GLboolean slang_assembly_construct (slang_assembly *assem)
-{
- assem->type = slang_asm_none;
- return GL_TRUE;
-}
-
-static GLvoid slang_assembly_destruct (slang_assembly *assem)
-{
-}
-
-/* slang_assembly_file */
-
-GLboolean slang_assembly_file_construct (slang_assembly_file *file)
-{
- file->code = NULL;
- file->count = 0;
- file->capacity = 0;
- return GL_TRUE;
-}
-
-GLvoid slang_assembly_file_destruct (slang_assembly_file *file)
-{
- GLuint i;
-
- for (i = 0; i < file->count; i++)
- slang_assembly_destruct (&file->code[i]);
- slang_alloc_free (file->code);
-}
-
-static GLboolean push_new (slang_assembly_file *file)
-{
- if (file->count == file->capacity)
- {
- GLuint n;
-
- if (file->capacity == 0)
- n = 256;
- else
- n = file->capacity * 2;
- file->code = (slang_assembly *) slang_alloc_realloc (file->code,
- file->capacity * sizeof (slang_assembly), n * sizeof (slang_assembly));
- if (file->code == NULL)
- return GL_FALSE;
- file->capacity = n;
- }
- if (!slang_assembly_construct (&file->code[file->count]))
- return GL_FALSE;
- file->count++;
- return GL_TRUE;
-}
-
-static GLboolean push_gen (slang_assembly_file *file, slang_assembly_type type, GLfloat literal,
- GLuint label, GLuint size)
-{
- slang_assembly *assem;
-
- if (!push_new (file))
- return GL_FALSE;
- assem = &file->code[file->count - 1];
- assem->type = type;
- assem->literal = literal;
- assem->param[0] = label;
- assem->param[1] = size;
- return GL_TRUE;
-}
-
-GLboolean slang_assembly_file_push (slang_assembly_file *file, slang_assembly_type type)
-{
- return push_gen (file, type, (GLfloat) 0, 0, 0);
-}
-
-GLboolean slang_assembly_file_push_label (slang_assembly_file *file, slang_assembly_type type,
- GLuint label)
-{
- return push_gen (file, type, (GLfloat) 0, label, 0);
-}
-
-GLboolean slang_assembly_file_push_label2 (slang_assembly_file *file, slang_assembly_type type,
- GLuint label1, GLuint label2)
-{
- return push_gen (file, type, (GLfloat) 0, label1, label2);
-}
-
-GLboolean slang_assembly_file_push_literal (slang_assembly_file *file, slang_assembly_type type,
- GLfloat literal)
-{
- return push_gen (file, type, literal, 0, 0);
-}
-
-#define PUSH slang_assembly_file_push
-#define PLAB slang_assembly_file_push_label
-#define PLAB2 slang_assembly_file_push_label2
-#define PLIT slang_assembly_file_push_literal
-
-/* slang_assembly_file_restore_point */
-
-GLboolean slang_assembly_file_restore_point_save (slang_assembly_file *file,
- slang_assembly_file_restore_point *point)
-{
- point->count = file->count;
- return GL_TRUE;
-}
-
-GLboolean slang_assembly_file_restore_point_load (slang_assembly_file *file,
- slang_assembly_file_restore_point *point)
-{
- GLuint i;
-
- for (i = point->count; i < file->count; i++)
- slang_assembly_destruct (&file->code[i]);
- file->count = point->count;
- return GL_TRUE;
-}
-
-/* utility functions */
-
-static GLboolean sizeof_variable (slang_assemble_ctx *A, slang_type_specifier *spec,
- slang_type_qualifier qual, GLuint array_len, GLuint *size)
-{
- slang_storage_aggregate agg;
-
- /* calculate the size of the variable's aggregate */
- if (!slang_storage_aggregate_construct (&agg))
- return GL_FALSE;
- if (!_slang_aggregate_variable (&agg, spec, array_len, A->space.funcs, A->space.structs,
- A->space.vars, A->mach, A->file, A->atoms))
- {
- slang_storage_aggregate_destruct (&agg);
- return GL_FALSE;
- }
- *size += _slang_sizeof_aggregate (&agg);
- slang_storage_aggregate_destruct (&agg);
-
- /* for reference variables consider the additional address overhead */
- if (qual == slang_qual_out || qual == slang_qual_inout)
- *size += 4;
-
- return GL_TRUE;
-}
-
-static GLboolean sizeof_variable2 (slang_assemble_ctx *A, slang_variable *var, GLuint *size)
-{
- var->address = *size;
- if (var->type.qualifier == slang_qual_out || var->type.qualifier == slang_qual_inout)
- var->address += 4;
- return sizeof_variable (A, &var->type.specifier, var->type.qualifier, var->array_len, size);
-}
-
-static GLboolean sizeof_variables (slang_assemble_ctx *A, slang_variable_scope *vars, GLuint start,
- GLuint stop, GLuint *size)
-{
- GLuint i;
-
- for (i = start; i < stop; i++)
- if (!sizeof_variable2 (A, &vars->variables[i], size))
- return GL_FALSE;
- return GL_TRUE;
-}
-
-static GLboolean collect_locals (slang_assemble_ctx *A, slang_operation *op, GLuint *size)
-{
- GLuint i;
-
- if (!sizeof_variables (A, op->locals, 0, op->locals->num_variables, size))
- return GL_FALSE;
- for (i = 0; i < op->num_children; i++)
- if (!collect_locals (A, &op->children[i], size))
- return GL_FALSE;
- return GL_TRUE;
-}
-
-/* _slang_locate_function() */
-
-slang_function *_slang_locate_function (slang_function_scope *funcs, slang_atom a_name,
- slang_operation *params, GLuint num_params, slang_assembly_name_space *space,
- slang_atom_pool *atoms)
-{
- GLuint i;
-
- for (i = 0; i < funcs->num_functions; i++)
- {
- GLuint j;
- slang_function *f = &funcs->functions[i];
-
- if (a_name != f->header.a_name)
- continue;
- if (f->param_count != num_params)
- continue;
- for (j = 0; j < num_params; j++)
- {
- slang_assembly_typeinfo ti;
-
- if (!slang_assembly_typeinfo_construct (&ti))
- return NULL;
- if (!_slang_typeof_operation_ (&params[j], space, &ti, atoms))
- {
- slang_assembly_typeinfo_destruct (&ti);
- return NULL;
- }
- if (!slang_type_specifier_equal (&ti.spec, &f->parameters->variables[j].type.specifier))
- {
- slang_assembly_typeinfo_destruct (&ti);
- break;
- }
- slang_assembly_typeinfo_destruct (&ti);
-
- /* "out" and "inout" formal parameter requires the actual parameter to be l-value */
- if (!ti.can_be_referenced &&
- (f->parameters->variables[j].type.qualifier == slang_qual_out ||
- f->parameters->variables[j].type.qualifier == slang_qual_inout))
- break;
- }
- if (j == num_params)
- return f;
- }
- if (funcs->outer_scope != NULL)
- return _slang_locate_function (funcs->outer_scope, a_name, params, num_params, space, atoms);
- return NULL;
-}
-
-/* _slang_assemble_function() */
-
-GLboolean _slang_assemble_function (slang_assemble_ctx *A, slang_function *fun)
-{
- GLuint param_size, local_size;
- GLuint skip, cleanup;
-
- fun->address = A->file->count;
-
- if (fun->body == NULL)
- {
- /* jump to the actual function body - we do not know it, so add the instruction
- * to fixup table */
- fun->fixups.table = (GLuint *) slang_alloc_realloc (fun->fixups.table,
- fun->fixups.count * sizeof (GLuint), (fun->fixups.count + 1) * sizeof (GLuint));
- if (fun->fixups.table == NULL)
- return GL_FALSE;
- fun->fixups.table[fun->fixups.count] = fun->address;
- fun->fixups.count++;
- if (!PUSH (A->file, slang_asm_jump))
- return GL_FALSE;
- return GL_TRUE;
- }
- else
- {
- GLuint i;
-
- /* resolve all fixup table entries and delete it */
- for (i = 0; i < fun->fixups.count; i++)
- A->file->code[fun->fixups.table[i]].param[0] = fun->address;
- slang_fixup_table_free (&fun->fixups);
- }
-
- /* At this point traverse function formal parameters and code to calculate
- * total memory size to be allocated on the stack.
- * During this process the variables will be assigned local addresses to
- * reference them in the code.
- * No storage optimizations are performed so exclusive scopes are not detected and shared. */
-
- /* calculate return value size */
- param_size = 0;
- if (fun->header.type.specifier.type != slang_spec_void)
- if (!sizeof_variable (A, &fun->header.type.specifier, slang_qual_none, 0, &param_size))
- return GL_FALSE;
- A->local.ret_size = param_size;
-
- /* calculate formal parameter list size */
- if (!sizeof_variables (A, fun->parameters, 0, fun->param_count, &param_size))
- return GL_FALSE;
-
- /* calculate local variables size - take into account the four-byte return address and
- * temporaries for various tasks (4 for addr and 16 for swizzle temporaries).
- * these include variables from the formal parameter scope and from the code */
- A->local.addr_tmp = param_size + 4;
- A->local.swizzle_tmp = param_size + 4 + 4;
- local_size = param_size + 4 + 4 + 16;
- if (!sizeof_variables (A, fun->parameters, fun->param_count, fun->parameters->num_variables,
- &local_size))
- return GL_FALSE;
- if (!collect_locals (A, fun->body, &local_size))
- return GL_FALSE;
-
- /* allocate local variable storage */
- if (!PLAB (A->file, slang_asm_local_alloc, local_size - param_size - 4))
- return GL_FALSE;
-
- /* mark a new frame for function variable storage */
- if (!PLAB (A->file, slang_asm_enter, local_size))
- return GL_FALSE;
-
- /* jump directly to the actual code */
- skip = A->file->count;
- if (!push_new (A->file))
- return GL_FALSE;
- A->file->code[skip].type = slang_asm_jump;
-
- /* all "return" statements will be directed here */
- A->flow.function_end = A->file->count;
- cleanup = A->file->count;
- if (!push_new (A->file))
- return GL_FALSE;
- A->file->code[cleanup].type = slang_asm_jump;
-
- /* execute the function body */
- A->file->code[skip].param[0] = A->file->count;
- if (!_slang_assemble_operation (A, fun->body, /*slang_ref_freelance*/slang_ref_forbid))
- return GL_FALSE;
-
- /* this is the end of the function - restore the old function frame */
- A->file->code[cleanup].param[0] = A->file->count;
- if (!PUSH (A->file, slang_asm_leave))
- return GL_FALSE;
-
- /* free local variable storage */
- if (!PLAB (A->file, slang_asm_local_free, local_size - param_size - 4))
- return GL_FALSE;
-
- /* return from the function */
- if (!PUSH (A->file, slang_asm_return))
- return GL_FALSE;
-
- return GL_TRUE;
-}
-
-GLboolean _slang_cleanup_stack (slang_assemble_ctx *A, slang_operation *op)
-{
- slang_assembly_typeinfo ti;
- GLuint size = 0;
-
- /* get type info of the operation and calculate its size */
- if (!slang_assembly_typeinfo_construct (&ti))
- return GL_FALSE;
- if (!_slang_typeof_operation (A, op, &ti))
- {
- slang_assembly_typeinfo_destruct (&ti);
- return GL_FALSE;
- }
- if (ti.spec.type != slang_spec_void) {
- if (A->ref == slang_ref_force) {
- size = 4;
- }
- else if (!sizeof_variable (A, &ti.spec, slang_qual_none, 0, &size))
- {
- slang_assembly_typeinfo_destruct (&ti);
- return GL_FALSE;
- }
- }
- slang_assembly_typeinfo_destruct (&ti);
-
- /* if nonzero, free it from the stack */
- if (size != 0)
- {
- if (!PLAB (A->file, slang_asm_local_free, size))
- return GL_FALSE;
- }
-
- return GL_TRUE;
-}
-
-/* _slang_assemble_operation() */
-
-static GLboolean dereference_aggregate (slang_assemble_ctx *A, const slang_storage_aggregate *agg,
- GLuint *size, slang_swizzle *swz, GLboolean is_swizzled)
-{
- GLuint i;
-
- for (i = agg->count; i > 0; i--)
- {
- const slang_storage_array *arr = &agg->arrays[i - 1];
- GLuint j;
-
- for (j = arr->length; j > 0; j--)
- {
- if (arr->type == slang_stor_aggregate)
- {
- if (!dereference_aggregate (A, arr->aggregate, size, swz, is_swizzled))
- return GL_FALSE;
- }
- else
- {
- GLuint src_offset;
- slang_assembly_type ty;
-
- *size -= 4;
-
- /* calculate the offset within source variable to read */
- if (is_swizzled)
- {
- /* swizzle the index to get the actual offset */
- src_offset = swz->swizzle[*size / 4] * 4;
- }
- else
- {
- /* no swizzling - read sequentially */
- src_offset = *size;
- }
-
- /* dereference data slot of a basic type */
- if (!PLAB2 (A->file, slang_asm_local_addr, A->local.addr_tmp, 4))
- return GL_FALSE;
- if (!PUSH (A->file, slang_asm_addr_deref))
- return GL_FALSE;
- if (!PLAB (A->file, slang_asm_addr_push, src_offset))
- return GL_FALSE;
- if (!PUSH (A->file, slang_asm_addr_add))
- return GL_FALSE;
-
- switch (arr->type)
- {
- case slang_stor_bool:
- ty = slang_asm_bool_deref;
- break;
- case slang_stor_int:
- ty = slang_asm_int_deref;
- break;
- case slang_stor_float:
- ty = slang_asm_float_deref;
- break;
- default:
- _mesa_problem(NULL, "Unexpected arr->type in dereference_aggregate");
- ty = slang_asm_none;
- }
- if (!PUSH (A->file, ty))
- return GL_FALSE;
- }
- }
- }
-
- return GL_TRUE;
-}
-
-GLboolean _slang_dereference (slang_assemble_ctx *A, slang_operation *op)
-{
- slang_assembly_typeinfo ti;
- GLboolean result = GL_FALSE;
- slang_storage_aggregate agg;
- GLuint size;
-
- /* get type information of the given operation */
- if (!slang_assembly_typeinfo_construct (&ti))
- return GL_FALSE;
- if (!_slang_typeof_operation (A, op, &ti))
- goto end1;
-
- /* construct aggregate from the type info */
- if (!slang_storage_aggregate_construct (&agg))
- goto end1;
- if (!_slang_aggregate_variable (&agg, &ti.spec, ti.array_len, A->space.funcs, A->space.structs,
- A->space.vars, A->mach, A->file, A->atoms))
- goto end;
-
- /* dereference the resulting aggregate */
- size = _slang_sizeof_aggregate (&agg);
- result = dereference_aggregate (A, &agg, &size, &ti.swz, ti.is_swizzled);
-
-end:
- slang_storage_aggregate_destruct (&agg);
-end1:
- slang_assembly_typeinfo_destruct (&ti);
- return result;
-}
-
-GLboolean _slang_assemble_function_call (slang_assemble_ctx *A, slang_function *fun,
- slang_operation *params, GLuint param_count, GLboolean assignment)
-{
- GLuint i;
- slang_swizzle p_swz[64];
- slang_ref_type p_ref[64];
-
- /* TODO: fix this, allocate dynamically */
- if (param_count > 64)
- return GL_FALSE;
-
- /* make room for the return value, if any */
- if (fun->header.type.specifier.type != slang_spec_void)
- {
- GLuint ret_size = 0;
-
- if (!sizeof_variable (A, &fun->header.type.specifier, slang_qual_none, 0, &ret_size))
- return GL_FALSE;
- if (!PLAB (A->file, slang_asm_local_alloc, ret_size))
- return GL_FALSE;
- }
-
- /* push the actual parameters on the stack */
- for (i = 0; i < param_count; i++)
- {
- if (fun->parameters->variables[i].type.qualifier == slang_qual_inout ||
- fun->parameters->variables[i].type.qualifier == slang_qual_out)
- {
- if (!PLAB2 (A->file, slang_asm_local_addr, A->local.addr_tmp, 4))
- return GL_FALSE;
- /* TODO: optimize the "out" parameter case */
- if (!_slang_assemble_operation (A, &params[i], slang_ref_force))
- return GL_FALSE;
- p_swz[i] = A->swz;
- p_ref[i] = A->ref;
- if (!PUSH (A->file, slang_asm_addr_copy))
- return GL_FALSE;
- if (!PUSH (A->file, slang_asm_addr_deref))
- return GL_FALSE;
- if (i == 0 && assignment)
- {
- /* duplicate the resulting address */
- if (!PLAB2 (A->file, slang_asm_local_addr, A->local.addr_tmp, 4))
- return GL_FALSE;
- if (!PUSH (A->file, slang_asm_addr_deref))
- return GL_FALSE;
- }
- if (!_slang_dereference (A, &params[i]))
- return GL_FALSE;
- }
- else
- {
- if (!_slang_assemble_operation (A, &params[i], slang_ref_forbid))
- return GL_FALSE;
- p_swz[i] = A->swz;
- p_ref[i] = A->ref;
- }
- }
-
- /* call the function */
- if (!PLAB (A->file, slang_asm_call, fun->address))
- return GL_FALSE;
-
- /* pop the parameters from the stack */
- for (i = param_count; i > 0; i--)
- {
- GLuint j = i - 1;
-
- A->swz = p_swz[j];
- A->ref = p_ref[j];
- if (fun->parameters->variables[j].type.qualifier == slang_qual_inout ||
- fun->parameters->variables[j].type.qualifier == slang_qual_out)
- {
- /* for output parameter copy the contents of the formal parameter
- * back to the original actual parameter */
- if (!_slang_assemble_assignment (A, &params[j]))
- return GL_FALSE;
- /* pop the actual parameter's address */
- if (!PLAB (A->file, slang_asm_local_free, 4))
- return GL_FALSE;
- }
- else
- {
- /* pop the value of the parameter */
- if (!_slang_cleanup_stack (A, &params[j]))
- return GL_FALSE;
- }
- }
-
- return GL_TRUE;
-}
-
-GLboolean _slang_assemble_function_call_name (slang_assemble_ctx *A, const char *name,
- slang_operation *params, GLuint param_count, GLboolean assignment)
-{
- slang_atom atom;
- slang_function *fun;
-
- atom = slang_atom_pool_atom (A->atoms, name);
- if (atom == SLANG_ATOM_NULL)
- return GL_FALSE;
- fun = _slang_locate_function (A->space.funcs, atom, params, param_count, &A->space, A->atoms);
- if (fun == NULL)
- return GL_FALSE;
- return _slang_assemble_function_call (A, fun, params, param_count, assignment);
-}
-
-static GLboolean assemble_function_call_name_dummyint (slang_assemble_ctx *A, const char *name,
- slang_operation *params)
-{
- slang_operation p[2];
- GLboolean result;
-
- p[0] = params[0];
- if (!slang_operation_construct (&p[1]))
- return GL_FALSE;
- p[1].type = slang_oper_literal_int;
- result = _slang_assemble_function_call_name (A, name, p, 2, GL_FALSE);
- slang_operation_destruct (&p[1]);
- return result;
-}
-
-static const struct
-{
- const char *name;
- slang_assembly_type code1, code2;
-} inst[] = {
- /* core */
- { "float_add", slang_asm_float_add, slang_asm_float_copy },
- { "float_multiply", slang_asm_float_multiply, slang_asm_float_copy },
- { "float_divide", slang_asm_float_divide, slang_asm_float_copy },
- { "float_negate", slang_asm_float_negate, slang_asm_float_copy },
- { "float_less", slang_asm_float_less, slang_asm_bool_copy },
- { "float_equal", slang_asm_float_equal_exp,slang_asm_bool_copy },
- { "float_to_int", slang_asm_float_to_int, slang_asm_int_copy },
- { "float_sine", slang_asm_float_sine, slang_asm_float_copy },
- { "float_arcsine", slang_asm_float_arcsine, slang_asm_float_copy },
- { "float_arctan", slang_asm_float_arctan, slang_asm_float_copy },
- { "float_power", slang_asm_float_power, slang_asm_float_copy },
- { "float_log2", slang_asm_float_log2, slang_asm_float_copy },
- { "float_floor", slang_asm_float_floor, slang_asm_float_copy },
- { "float_ceil", slang_asm_float_ceil, slang_asm_float_copy },
- { "float_noise1", slang_asm_float_noise1, slang_asm_float_copy },
- { "float_noise2", slang_asm_float_noise2, slang_asm_float_copy },
- { "float_noise3", slang_asm_float_noise3, slang_asm_float_copy },
- { "float_noise4", slang_asm_float_noise4, slang_asm_float_copy },
- { "int_to_float", slang_asm_int_to_float, slang_asm_float_copy },
- { "vec4_tex1d", slang_asm_vec4_tex1d, slang_asm_none },
- { "vec4_tex2d", slang_asm_vec4_tex2d, slang_asm_none },
- { "vec4_tex3d", slang_asm_vec4_tex3d, slang_asm_none },
- { "vec4_texcube", slang_asm_vec4_texcube, slang_asm_none },
- { "vec4_shad1d", slang_asm_vec4_shad1d, slang_asm_none },
- { "vec4_shad2d", slang_asm_vec4_shad2d, slang_asm_none },
- /* mesa-specific extensions */
- { "float_print", slang_asm_float_deref, slang_asm_float_print },
- { "int_print", slang_asm_int_deref, slang_asm_int_print },
- { "bool_print", slang_asm_bool_deref, slang_asm_bool_print },
- { NULL, slang_asm_none, slang_asm_none }
-};
-
-static GLboolean call_asm_instruction (slang_assemble_ctx *A, slang_atom a_name)
-{
- const char *id;
- GLuint i;
-
- id = slang_atom_pool_id (A->atoms, a_name);
-
- for (i = 0; inst[i].name != NULL; i++)
- if (slang_string_compare (id, inst[i].name) == 0)
- break;
- if (inst[i].name == NULL)
- return GL_FALSE;
-
- if (!PLAB2 (A->file, inst[i].code1, 4, 0))
- return GL_FALSE;
- if (inst[i].code2 != slang_asm_none)
- if (!PLAB2 (A->file, inst[i].code2, 4, 0))
- return GL_FALSE;
-
- /* clean-up the stack from the remaining dst address */
- if (!PLAB (A->file, slang_asm_local_free, 4))
- return GL_FALSE;
-
- return GL_TRUE;
-}
-
-static GLboolean equality_aggregate (slang_assemble_ctx *A, const slang_storage_aggregate *agg,
- GLuint *index, GLuint size, GLuint z_label)
-{
- GLuint i;
-
- for (i = 0; i < agg->count; i++)
- {
- const slang_storage_array *arr = &agg->arrays[i];
- GLuint j;
-
- for (j = 0; j < arr->length; j++)
- {
- if (arr->type == slang_stor_aggregate)
- {
- if (!equality_aggregate (A, arr->aggregate, index, size, z_label))
- return GL_FALSE;
- }
- else
- {
- if (!PLAB2 (A->file, slang_asm_float_equal_int, size + *index, *index))
- return GL_FALSE;
- *index += 4;
- if (!PLAB (A->file, slang_asm_jump_if_zero, z_label))
- return GL_FALSE;
- }
- }
- }
-
- return GL_TRUE;
-}
-
-static GLboolean equality (slang_assemble_ctx *A, slang_operation *op, GLboolean equal)
-{
- slang_assembly_typeinfo ti;
- GLboolean result = GL_FALSE;
- slang_storage_aggregate agg;
- GLuint index, size;
- GLuint skip_jump, true_label, true_jump, false_label, false_jump;
-
- /* get type of operation */
- if (!slang_assembly_typeinfo_construct (&ti))
- return GL_FALSE;
- if (!_slang_typeof_operation (A, op, &ti))
- goto end1;
-
- /* convert it to an aggregate */
- if (!slang_storage_aggregate_construct (&agg))
- goto end1;
- if (!_slang_aggregate_variable (&agg, &ti.spec, 0, A->space.funcs, A->space.structs,
- A->space.vars, A->mach, A->file, A->atoms))
- goto end;
-
- /* compute the size of the agregate - there are two such aggregates on the stack */
- size = _slang_sizeof_aggregate (&agg);
-
- /* jump to the actual data-comparison code */
- skip_jump = A->file->count;
- if (!PUSH (A->file, slang_asm_jump))
- goto end;
-
- /* pop off the stack the compared data and push 1 */
- true_label = A->file->count;
- if (!PLAB (A->file, slang_asm_local_free, size * 2))
- goto end;
- if (!PLIT (A->file, slang_asm_bool_push, (GLfloat) 1))
- goto end;
- true_jump = A->file->count;
- if (!PUSH (A->file, slang_asm_jump))
- goto end;
-
- false_label = A->file->count;
- if (!PLAB (A->file, slang_asm_local_free, size * 2))
- goto end;
- if (!PLIT (A->file, slang_asm_bool_push, (GLfloat) 0))
- goto end;
- false_jump = A->file->count;
- if (!PUSH (A->file, slang_asm_jump))
- goto end;
-
- A->file->code[skip_jump].param[0] = A->file->count;
-
- /* compare the data on stack, it will eventually jump either to true or false label */
- index = 0;
- if (!equality_aggregate (A, &agg, &index, size, equal ? false_label : true_label))
- goto end;
- if (!PLAB (A->file, slang_asm_jump, equal ? true_label : false_label))
- goto end;
-
- A->file->code[true_jump].param[0] = A->file->count;
- A->file->code[false_jump].param[0] = A->file->count;
-
- result = GL_TRUE;
-end:
- slang_storage_aggregate_destruct (&agg);
-end1:
- slang_assembly_typeinfo_destruct (&ti);
- return result;
-}
-
-static GLboolean handle_subscript (slang_assemble_ctx *A, slang_assembly_typeinfo *tie,
- slang_assembly_typeinfo *tia, slang_operation *op, slang_ref_type ref)
-{
- GLuint asize = 0, esize = 0;
-
- /* get type info of the master expression (matrix, vector or an array */
- if (!_slang_typeof_operation (A, &op->children[0], tia))
- return GL_FALSE;
- if (!sizeof_variable (A, &tia->spec, slang_qual_none, tia->array_len, &asize))
- return GL_FALSE;
-
- /* get type info of the result (matrix column, vector row or array element) */
- if (!_slang_typeof_operation (A, op, tie))
- return GL_FALSE;
- if (!sizeof_variable (A, &tie->spec, slang_qual_none, 0, &esize))
- return GL_FALSE;
-
- /* assemble the master expression */
- if (!_slang_assemble_operation (A, &op->children[0], ref))
- return GL_FALSE;
-
- /* when indexing an l-value swizzle, push the swizzle_tmp */
- if (ref == slang_ref_force && tia->is_swizzled)
- if (!PLAB2 (A->file, slang_asm_local_addr, A->local.swizzle_tmp, 16))
- return GL_FALSE;
-
- /* assemble the subscript expression */
- if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid))
- return GL_FALSE;
-
- if (ref == slang_ref_force && tia->is_swizzled)
- {
- GLuint i;
-
- /* copy the swizzle indexes to the swizzle_tmp */
- for (i = 0; i < tia->swz.num_components; i++)
- {
- if (!PLAB2 (A->file, slang_asm_local_addr, A->local.swizzle_tmp, 16))
- return GL_FALSE;
- if (!PLAB (A->file, slang_asm_addr_push, i * 4))
- return GL_FALSE;
- if (!PUSH (A->file, slang_asm_addr_add))
- return GL_FALSE;
- if (!PLAB (A->file, slang_asm_addr_push, tia->swz.swizzle[i]))
- return GL_FALSE;
- if (!PUSH (A->file, slang_asm_addr_copy))
- return GL_FALSE;
- if (!PLAB (A->file, slang_asm_local_free, 4))
- return GL_FALSE;
- }
-
- /* offset the pushed swizzle_tmp address and dereference it */
- if (!PUSH (A->file, slang_asm_int_to_addr))
- return GL_FALSE;
- if (!PLAB (A->file, slang_asm_addr_push, 4))
- return GL_FALSE;
- if (!PUSH (A->file, slang_asm_addr_multiply))
- return GL_FALSE;
- if (!PUSH (A->file, slang_asm_addr_add))
- return GL_FALSE;
- if (!PUSH (A->file, slang_asm_addr_deref))
- return GL_FALSE;
- }
- else
- {
- /* convert the integer subscript to a relative address */
- if (!PUSH (A->file, slang_asm_int_to_addr))
- return GL_FALSE;
- }
-
- if (!PLAB (A->file, slang_asm_addr_push, esize))
- return GL_FALSE;
- if (!PUSH (A->file, slang_asm_addr_multiply))
- return GL_FALSE;
-
- if (ref == slang_ref_force)
- {
- /* offset the base address with the relative address */
- if (!PUSH (A->file, slang_asm_addr_add))
- return GL_FALSE;
- }
- else
- {
- GLuint i;
-
- /* move the selected element to the beginning of the master expression */
- for (i = 0; i < esize; i += 4)
- if (!PLAB2 (A->file, slang_asm_float_move, asize - esize + i + 4, i + 4))
- return GL_FALSE;
- if (!PLAB (A->file, slang_asm_local_free, 4))
- return GL_FALSE;
-
- /* free the rest of the master expression */
- if (!PLAB (A->file, slang_asm_local_free, asize - esize))
- return GL_FALSE;
- }
-
- return GL_TRUE;
-}
-
-static GLboolean handle_field (slang_assemble_ctx *A, slang_assembly_typeinfo *tia,
- slang_assembly_typeinfo *tib, slang_operation *op, slang_ref_type ref)
-{
- /* get type info of the result (field or swizzle) */
- if (!_slang_typeof_operation (A, op, tia))
- return GL_FALSE;
-
- /* get type info of the master expression being accessed (struct or vector) */
- if (!_slang_typeof_operation (A, &op->children[0], tib))
- return GL_FALSE;
-
- /* if swizzling a vector in-place, the swizzle temporary is needed */
- if (ref == slang_ref_forbid && tia->is_swizzled)
- if (!PLAB2 (A->file, slang_asm_local_addr, A->local.swizzle_tmp, 16))
- return GL_FALSE;
-
- /* assemble the master expression */
- if (!_slang_assemble_operation (A, &op->children[0], ref))
- return GL_FALSE;
-
- /* assemble the field expression */
- if (tia->is_swizzled)
- {
- if (ref == slang_ref_force)
- {
-#if 0
- if (tia->swz.num_components == 1)
- {
- /* simple case - adjust the vector's address to point to the selected component */
- if (!PLAB (file, slang_asm_addr_push, tia->swz.swizzle[0] * 4))
- return 0;
- if (!PUSH (file, slang_asm_addr_add))
- return 0;
- }
- else
-#endif
- {
- /* two or more vector components are being referenced - the so-called write mask
- * must be passed to the upper operations and applied when assigning value
- * to this swizzle */
- A->swz = tia->swz;
- }
- }
- else
- {
- /* swizzle the vector in-place using the swizzle temporary */
- if (!_slang_assemble_constructor_from_swizzle (A, &tia->swz, &tia->spec, &tib->spec))
- return GL_FALSE;
- }
- }
- else
- {
- GLuint i, struct_size = 0, field_offset = 0, field_size = 0;
- GLboolean relocate, shrink;
-
- /* calculate struct size, field offset and field size */
- for (i = 0; i < tib->spec._struct->fields->num_variables; i++)
- {
- slang_variable *field;
- slang_storage_aggregate agg;
- GLuint size;
-
- field = &tib->spec._struct->fields->variables[i];
- if (!slang_storage_aggregate_construct (&agg))
- return GL_FALSE;
- if (!_slang_aggregate_variable (&agg, &field->type.specifier, field->array_len,
- A->space.funcs, A->space.structs, A->space.vars, A->mach, A->file, A->atoms))
- {
- slang_storage_aggregate_destruct (&agg);
- return GL_FALSE;
- }
- size = _slang_sizeof_aggregate (&agg);
- slang_storage_aggregate_destruct (&agg);
-
- if (op->a_id == field->a_name)
- {
- field_size = size;
- struct_size = field_offset + size;
- }
- else if (struct_size != 0)
- struct_size += size;
- else
- field_offset += size;
- }
-
- /*
- * OPTIMIZATION: If selecting the last field, no relocation is needed.
- */
- relocate = field_offset != struct_size - field_size;
-
- /*
- * OPTIMIZATION: If field and struct sizes are equal, no partial free is needed.
- */
- shrink = field_size != struct_size;
-
- if (relocate)
- {
- if (!PLAB (A->file, slang_asm_addr_push, field_offset))
- return GL_FALSE;
- }
-
- if (ref == slang_ref_force)
- {
- if (relocate)
- {
- if (!PUSH (A->file, slang_asm_addr_add))
- return GL_FALSE;
- }
- }
- else
- {
- GLuint free_b = 0;
-
- if (relocate)
- {
- GLuint i;
-
- /*
- * Move the selected element to the end of the master expression.
- * Do it in reverse order to avoid overwriting itself.
- */
- for (i = field_size; i > 0; i -= 4)
- if (!PLAB2 (A->file, slang_asm_float_move, struct_size - field_size + i, i))
- return GL_FALSE;
- free_b += 4;
- }
-
- if (shrink)
- {
- /* free the rest of the master expression */
- free_b += struct_size - field_size;
- }
-
- if (free_b)
- {
- if (!PLAB (A->file, slang_asm_local_free, free_b))
- return GL_FALSE;
- }
- }
- }
-
- return GL_TRUE;
-}
-
-GLboolean _slang_assemble_operation (slang_assemble_ctx *A, slang_operation *op, slang_ref_type ref)
-{
- /* set default results */
- A->ref = /*(ref == slang_ref_freelance) ? slang_ref_force : */ref;
- A->swz.num_components = 0;
-
- switch (op->type)
- {
- case slang_oper_block_no_new_scope:
- case slang_oper_block_new_scope:
- {
- GLuint i;
-
- for (i = 0; i < op->num_children; i++)
- {
- if (!_slang_assemble_operation (A, &op->children[i], slang_ref_forbid/*slang_ref_freelance*/))
- return GL_FALSE;
- if (!_slang_cleanup_stack (A, &op->children[i]))
- return GL_FALSE;
- }
- }
- break;
- case slang_oper_variable_decl:
- {
- GLuint i;
- slang_operation assign;
- GLboolean result;
-
- /* Construct assignment expression placeholder. */
- if (!slang_operation_construct (&assign))
- return GL_FALSE;
- assign.type = slang_oper_assign;
- assign.children = (slang_operation *) slang_alloc_malloc (2 * sizeof (slang_operation));
- if (assign.children == NULL)
- {
- slang_operation_destruct (&assign);
- return GL_FALSE;
- }
- for (assign.num_children = 0; assign.num_children < 2; assign.num_children++)
- if (!slang_operation_construct (&assign.children[assign.num_children]))
- {
- slang_operation_destruct (&assign);
- return GL_FALSE;
- }
-
- result = GL_TRUE;
- for (i = 0; i < op->num_children; i++)
- {
- slang_variable *var;
-
- var = _slang_locate_variable (op->children[i].locals, op->children[i].a_id, GL_TRUE);
- if (var == NULL)
- {
- result = GL_FALSE;
- break;
- }
- if (var->initializer == NULL)
- continue;
-
- if (!slang_operation_copy (&assign.children[0], &op->children[i]) ||
- !slang_operation_copy (&assign.children[1], var->initializer) ||
- !_slang_assemble_assign (A, &assign, "=", slang_ref_forbid) ||
- !_slang_cleanup_stack (A, &assign))
- {
- result = GL_FALSE;
- break;
- }
- }
- slang_operation_destruct (&assign);
- if (!result)
- return GL_FALSE;
- }
- break;
- case slang_oper_asm:
- {
- GLuint i;
-
- if (!_slang_assemble_operation (A, &op->children[0], slang_ref_force))
- return GL_FALSE;
- for (i = 1; i < op->num_children; i++)
- if (!_slang_assemble_operation (A, &op->children[i], slang_ref_forbid))
- return GL_FALSE;
- if (!call_asm_instruction (A, op->a_id))
- return GL_FALSE;
- }
- break;
- case slang_oper_break:
- if (!PLAB (A->file, slang_asm_jump, A->flow.loop_end))
- return GL_FALSE;
- break;
- case slang_oper_continue:
- if (!PLAB (A->file, slang_asm_jump, A->flow.loop_start))
- return GL_FALSE;
- break;
- case slang_oper_discard:
- if (!PUSH (A->file, slang_asm_discard))
- return GL_FALSE;
- if (!PUSH (A->file, slang_asm_exit))
- return GL_FALSE;
- break;
- case slang_oper_return:
- if (A->local.ret_size != 0)
- {
- /* push the result's address */
- if (!PLAB2 (A->file, slang_asm_local_addr, 0, A->local.ret_size))
- return GL_FALSE;
- if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid))
- return GL_FALSE;
-
- A->swz.num_components = 0;
- /* assign the operation to the function result (it was reserved on the stack) */
- if (!_slang_assemble_assignment (A, op->children))
- return GL_FALSE;
-
- if (!PLAB (A->file, slang_asm_local_free, 4))
- return GL_FALSE;
- }
- if (!PLAB (A->file, slang_asm_jump, A->flow.function_end))
- return GL_FALSE;
- break;
- case slang_oper_expression:
- if (ref == slang_ref_force)
- return GL_FALSE;
- if (!_slang_assemble_operation (A, &op->children[0], ref))
- return GL_FALSE;
- break;
- case slang_oper_if:
- if (!_slang_assemble_if (A, op))
- return GL_FALSE;
- break;
- case slang_oper_while:
- if (!_slang_assemble_while (A, op))
- return GL_FALSE;
- break;
- case slang_oper_do:
- if (!_slang_assemble_do (A, op))
- return GL_FALSE;
- break;
- case slang_oper_for:
- if (!_slang_assemble_for (A, op))
- return GL_FALSE;
- break;
- case slang_oper_void:
- break;
- case slang_oper_literal_bool:
- if (ref == slang_ref_force)
- return GL_FALSE;
- if (!PLIT (A->file, slang_asm_bool_push, op->literal))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- case slang_oper_literal_int:
- if (ref == slang_ref_force)
- return GL_FALSE;
- if (!PLIT (A->file, slang_asm_int_push, op->literal))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- case slang_oper_literal_float:
- if (ref == slang_ref_force)
- return GL_FALSE;
- if (!PLIT (A->file, slang_asm_float_push, op->literal))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- case slang_oper_identifier:
- {
- slang_variable *var;
- GLuint size;
-
- /* find the variable and calculate its size */
- var = _slang_locate_variable (op->locals, op->a_id, GL_TRUE);
- if (var == NULL)
- return GL_FALSE;
- size = 0;
- if (!sizeof_variable (A, &var->type.specifier, slang_qual_none, var->array_len, &size))
- return GL_FALSE;
-
- /* prepare stack for dereferencing */
- if (ref == slang_ref_forbid)
- if (!PLAB2 (A->file, slang_asm_local_addr, A->local.addr_tmp, 4))
- return GL_FALSE;
-
- /* push the variable's address */
- if (var->global)
- {
- if (!PLAB (A->file, slang_asm_global_addr, var->address))
- return GL_FALSE;
- }
- else
- {
- if (!PLAB2 (A->file, slang_asm_local_addr, var->address, size))
- return GL_FALSE;
- }
-
- /* perform the dereference */
- if (ref == slang_ref_forbid)
- {
- if (!PUSH (A->file, slang_asm_addr_copy))
- return GL_FALSE;
- if (!PLAB (A->file, slang_asm_local_free, 4))
- return GL_FALSE;
- if (!_slang_dereference (A, op))
- return GL_FALSE;
- }
- }
- break;
- case slang_oper_sequence:
- if (ref == slang_ref_force)
- return GL_FALSE;
- if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid/*slang_ref_freelance*/))
- return GL_FALSE;
- if (!_slang_cleanup_stack (A, &op->children[0]))
- return GL_FALSE;
- if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- case slang_oper_assign:
- if (!_slang_assemble_assign (A, op, "=", ref))
- return GL_FALSE;
- break;
- case slang_oper_addassign:
- if (!_slang_assemble_assign (A, op, "+=", ref))
- return GL_FALSE;
- A->ref = ref;
- break;
- case slang_oper_subassign:
- if (!_slang_assemble_assign (A, op, "-=", ref))
- return GL_FALSE;
- A->ref = ref;
- break;
- case slang_oper_mulassign:
- if (!_slang_assemble_assign (A, op, "*=", ref))
- return GL_FALSE;
- A->ref = ref;
- break;
- /*case slang_oper_modassign:*/
- /*case slang_oper_lshassign:*/
- /*case slang_oper_rshassign:*/
- /*case slang_oper_orassign:*/
- /*case slang_oper_xorassign:*/
- /*case slang_oper_andassign:*/
- case slang_oper_divassign:
- if (!_slang_assemble_assign (A, op, "/=", ref))
- return GL_FALSE;
- A->ref = ref;
- break;
- case slang_oper_select:
- if (!_slang_assemble_select (A, op))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- case slang_oper_logicalor:
- if (!_slang_assemble_logicalor (A, op))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- case slang_oper_logicaland:
- if (!_slang_assemble_logicaland (A, op))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- case slang_oper_logicalxor:
- if (!_slang_assemble_function_call_name (A, "^^", op->children, 2, GL_FALSE))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- /*case slang_oper_bitor:*/
- /*case slang_oper_bitxor:*/
- /*case slang_oper_bitand:*/
- case slang_oper_less:
- if (!_slang_assemble_function_call_name (A, "<", op->children, 2, GL_FALSE))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- case slang_oper_greater:
- if (!_slang_assemble_function_call_name (A, ">", op->children, 2, GL_FALSE))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- case slang_oper_lessequal:
- if (!_slang_assemble_function_call_name (A, "<=", op->children, 2, GL_FALSE))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- case slang_oper_greaterequal:
- if (!_slang_assemble_function_call_name (A, ">=", op->children, 2, GL_FALSE))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- /*case slang_oper_lshift:*/
- /*case slang_oper_rshift:*/
- case slang_oper_add:
- if (!_slang_assemble_function_call_name (A, "+", op->children, 2, GL_FALSE))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- case slang_oper_subtract:
- if (!_slang_assemble_function_call_name (A, "-", op->children, 2, GL_FALSE))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- case slang_oper_multiply:
- if (!_slang_assemble_function_call_name (A, "*", op->children, 2, GL_FALSE))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- /*case slang_oper_modulus:*/
- case slang_oper_divide:
- if (!_slang_assemble_function_call_name (A, "/", op->children, 2, GL_FALSE))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- case slang_oper_equal:
- if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid))
- return GL_FALSE;
- if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid))
- return GL_FALSE;
- if (!equality (A, op->children, GL_TRUE))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- case slang_oper_notequal:
- if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid))
- return GL_FALSE;
- if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid))
- return GL_FALSE;
- if (!equality (A, op->children, GL_FALSE))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- case slang_oper_preincrement:
- if (!_slang_assemble_assign (A, op, "++", ref))
- return GL_FALSE;
- A->ref = ref;
- break;
- case slang_oper_predecrement:
- if (!_slang_assemble_assign (A, op, "--", ref))
- return GL_FALSE;
- A->ref = ref;
- break;
- case slang_oper_plus:
- if (!_slang_dereference (A, op))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- case slang_oper_minus:
- if (!_slang_assemble_function_call_name (A, "-", op->children, 1, GL_FALSE))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- /*case slang_oper_complement:*/
- case slang_oper_not:
- if (!_slang_assemble_function_call_name (A, "!", op->children, 1, GL_FALSE))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- case slang_oper_subscript:
- {
- slang_assembly_typeinfo ti_arr, ti_elem;
-
- if (!slang_assembly_typeinfo_construct (&ti_arr))
- return GL_FALSE;
- if (!slang_assembly_typeinfo_construct (&ti_elem))
- {
- slang_assembly_typeinfo_destruct (&ti_arr);
- return GL_FALSE;
- }
- if (!handle_subscript (A, &ti_elem, &ti_arr, op, ref))
- {
- slang_assembly_typeinfo_destruct (&ti_arr);
- slang_assembly_typeinfo_destruct (&ti_elem);
- return GL_FALSE;
- }
- slang_assembly_typeinfo_destruct (&ti_arr);
- slang_assembly_typeinfo_destruct (&ti_elem);
- }
- break;
- case slang_oper_call:
- {
- slang_function *fun;
-
- fun = _slang_locate_function (A->space.funcs, op->a_id, op->children, op->num_children,
- &A->space, A->atoms);
- if (fun == NULL)
- {
- if (!_slang_assemble_constructor (A, op))
- return GL_FALSE;
- }
- else
- {
- if (!_slang_assemble_function_call (A, fun, op->children, op->num_children, GL_FALSE))
- return GL_FALSE;
- }
- A->ref = slang_ref_forbid;
- }
- break;
- case slang_oper_field:
- {
- slang_assembly_typeinfo ti_after, ti_before;
-
- if (!slang_assembly_typeinfo_construct (&ti_after))
- return GL_FALSE;
- if (!slang_assembly_typeinfo_construct (&ti_before))
- {
- slang_assembly_typeinfo_destruct (&ti_after);
- return GL_FALSE;
- }
- if (!handle_field (A, &ti_after, &ti_before, op, ref))
- {
- slang_assembly_typeinfo_destruct (&ti_after);
- slang_assembly_typeinfo_destruct (&ti_before);
- return GL_FALSE;
- }
- slang_assembly_typeinfo_destruct (&ti_after);
- slang_assembly_typeinfo_destruct (&ti_before);
- }
- break;
- case slang_oper_postincrement:
- if (!assemble_function_call_name_dummyint (A, "++", op->children))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- case slang_oper_postdecrement:
- if (!assemble_function_call_name_dummyint (A, "--", op->children))
- return GL_FALSE;
- A->ref = slang_ref_forbid;
- break;
- default:
- return GL_FALSE;
- }
-
- return GL_TRUE;
-}
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file slang_assemble.c
+ * slang intermediate code assembler
+ * \author Michal Krol
+ */
+
+#include "imports.h"
+#include "slang_assemble.h"
+#include "slang_compile.h"
+#include "slang_storage.h"
+
+/* slang_assembly */
+
+static GLboolean slang_assembly_construct (slang_assembly *assem)
+{
+ assem->type = slang_asm_none;
+ return GL_TRUE;
+}
+
+static GLvoid slang_assembly_destruct (slang_assembly *assem)
+{
+}
+
+/* slang_assembly_file */
+
+GLboolean slang_assembly_file_construct (slang_assembly_file *file)
+{
+ file->code = NULL;
+ file->count = 0;
+ file->capacity = 0;
+ return GL_TRUE;
+}
+
+GLvoid slang_assembly_file_destruct (slang_assembly_file *file)
+{
+ GLuint i;
+
+ for (i = 0; i < file->count; i++)
+ slang_assembly_destruct (&file->code[i]);
+ slang_alloc_free (file->code);
+}
+
+static GLboolean push_new (slang_assembly_file *file)
+{
+ if (file->count == file->capacity)
+ {
+ GLuint n;
+
+ if (file->capacity == 0)
+ n = 256;
+ else
+ n = file->capacity * 2;
+ file->code = (slang_assembly *) slang_alloc_realloc (file->code,
+ file->capacity * sizeof (slang_assembly), n * sizeof (slang_assembly));
+ if (file->code == NULL)
+ return GL_FALSE;
+ file->capacity = n;
+ }
+ if (!slang_assembly_construct (&file->code[file->count]))
+ return GL_FALSE;
+ file->count++;
+ return GL_TRUE;
+}
+
+static GLboolean push_gen (slang_assembly_file *file, slang_assembly_type type, GLfloat literal,
+ GLuint label, GLuint size)
+{
+ slang_assembly *assem;
+
+ if (!push_new (file))
+ return GL_FALSE;
+ assem = &file->code[file->count - 1];
+ assem->type = type;
+ assem->literal = literal;
+ assem->param[0] = label;
+ assem->param[1] = size;
+ return GL_TRUE;
+}
+
+GLboolean slang_assembly_file_push (slang_assembly_file *file, slang_assembly_type type)
+{
+ return push_gen (file, type, (GLfloat) 0, 0, 0);
+}
+
+GLboolean slang_assembly_file_push_label (slang_assembly_file *file, slang_assembly_type type,
+ GLuint label)
+{
+ return push_gen (file, type, (GLfloat) 0, label, 0);
+}
+
+GLboolean slang_assembly_file_push_label2 (slang_assembly_file *file, slang_assembly_type type,
+ GLuint label1, GLuint label2)
+{
+ return push_gen (file, type, (GLfloat) 0, label1, label2);
+}
+
+GLboolean slang_assembly_file_push_literal (slang_assembly_file *file, slang_assembly_type type,
+ GLfloat literal)
+{
+ return push_gen (file, type, literal, 0, 0);
+}
+
+#define PUSH slang_assembly_file_push
+#define PLAB slang_assembly_file_push_label
+#define PLAB2 slang_assembly_file_push_label2
+#define PLIT slang_assembly_file_push_literal
+
+/* slang_assembly_file_restore_point */
+
+GLboolean slang_assembly_file_restore_point_save (slang_assembly_file *file,
+ slang_assembly_file_restore_point *point)
+{
+ point->count = file->count;
+ return GL_TRUE;
+}
+
+GLboolean slang_assembly_file_restore_point_load (slang_assembly_file *file,
+ slang_assembly_file_restore_point *point)
+{
+ GLuint i;
+
+ for (i = point->count; i < file->count; i++)
+ slang_assembly_destruct (&file->code[i]);
+ file->count = point->count;
+ return GL_TRUE;
+}
+
+/* utility functions */
+
+static GLboolean sizeof_variable (slang_assemble_ctx *A, slang_type_specifier *spec,
+ slang_type_qualifier qual, GLuint array_len, GLuint *size)
+{
+ slang_storage_aggregate agg;
+
+ /* calculate the size of the variable's aggregate */
+ if (!slang_storage_aggregate_construct (&agg))
+ return GL_FALSE;
+ if (!_slang_aggregate_variable (&agg, spec, array_len, A->space.funcs, A->space.structs,
+ A->space.vars, A->mach, A->file, A->atoms))
+ {
+ slang_storage_aggregate_destruct (&agg);
+ return GL_FALSE;
+ }
+ *size += _slang_sizeof_aggregate (&agg);
+ slang_storage_aggregate_destruct (&agg);
+
+ /* for reference variables consider the additional address overhead */
+ if (qual == slang_qual_out || qual == slang_qual_inout)
+ *size += 4;
+
+ return GL_TRUE;
+}
+
+static GLboolean sizeof_variable2 (slang_assemble_ctx *A, slang_variable *var, GLuint *size)
+{
+ var->address = *size;
+ if (var->type.qualifier == slang_qual_out || var->type.qualifier == slang_qual_inout)
+ var->address += 4;
+ return sizeof_variable (A, &var->type.specifier, var->type.qualifier, var->array_len, size);
+}
+
+static GLboolean sizeof_variables (slang_assemble_ctx *A, slang_variable_scope *vars, GLuint start,
+ GLuint stop, GLuint *size)
+{
+ GLuint i;
+
+ for (i = start; i < stop; i++)
+ if (!sizeof_variable2 (A, &vars->variables[i], size))
+ return GL_FALSE;
+ return GL_TRUE;
+}
+
+static GLboolean collect_locals (slang_assemble_ctx *A, slang_operation *op, GLuint *size)
+{
+ GLuint i;
+
+ if (!sizeof_variables (A, op->locals, 0, op->locals->num_variables, size))
+ return GL_FALSE;
+ for (i = 0; i < op->num_children; i++)
+ if (!collect_locals (A, &op->children[i], size))
+ return GL_FALSE;
+ return GL_TRUE;
+}
+
+/* _slang_locate_function() */
+
+slang_function *_slang_locate_function (slang_function_scope *funcs, slang_atom a_name,
+ slang_operation *params, GLuint num_params, slang_assembly_name_space *space,
+ slang_atom_pool *atoms)
+{
+ GLuint i;
+
+ for (i = 0; i < funcs->num_functions; i++)
+ {
+ GLuint j;
+ slang_function *f = &funcs->functions[i];
+
+ if (a_name != f->header.a_name)
+ continue;
+ if (f->param_count != num_params)
+ continue;
+ for (j = 0; j < num_params; j++)
+ {
+ slang_assembly_typeinfo ti;
+
+ if (!slang_assembly_typeinfo_construct (&ti))
+ return NULL;
+ if (!_slang_typeof_operation_ (&params[j], space, &ti, atoms))
+ {
+ slang_assembly_typeinfo_destruct (&ti);
+ return NULL;
+ }
+ if (!slang_type_specifier_equal (&ti.spec, &f->parameters->variables[j].type.specifier))
+ {
+ slang_assembly_typeinfo_destruct (&ti);
+ break;
+ }
+ slang_assembly_typeinfo_destruct (&ti);
+
+ /* "out" and "inout" formal parameter requires the actual parameter to be l-value */
+ if (!ti.can_be_referenced &&
+ (f->parameters->variables[j].type.qualifier == slang_qual_out ||
+ f->parameters->variables[j].type.qualifier == slang_qual_inout))
+ break;
+ }
+ if (j == num_params)
+ return f;
+ }
+ if (funcs->outer_scope != NULL)
+ return _slang_locate_function (funcs->outer_scope, a_name, params, num_params, space, atoms);
+ return NULL;
+}
+
+/* _slang_assemble_function() */
+
+GLboolean _slang_assemble_function (slang_assemble_ctx *A, slang_function *fun)
+{
+ GLuint param_size, local_size;
+ GLuint skip, cleanup;
+
+ fun->address = A->file->count;
+
+ if (fun->body == NULL)
+ {
+ /* jump to the actual function body - we do not know it, so add the instruction
+ * to fixup table */
+ fun->fixups.table = (GLuint *) slang_alloc_realloc (fun->fixups.table,
+ fun->fixups.count * sizeof (GLuint), (fun->fixups.count + 1) * sizeof (GLuint));
+ if (fun->fixups.table == NULL)
+ return GL_FALSE;
+ fun->fixups.table[fun->fixups.count] = fun->address;
+ fun->fixups.count++;
+ if (!PUSH (A->file, slang_asm_jump))
+ return GL_FALSE;
+ return GL_TRUE;
+ }
+ else
+ {
+ GLuint i;
+
+ /* resolve all fixup table entries and delete it */
+ for (i = 0; i < fun->fixups.count; i++)
+ A->file->code[fun->fixups.table[i]].param[0] = fun->address;
+ slang_fixup_table_free (&fun->fixups);
+ }
+
+ /* At this point traverse function formal parameters and code to calculate
+ * total memory size to be allocated on the stack.
+ * During this process the variables will be assigned local addresses to
+ * reference them in the code.
+ * No storage optimizations are performed so exclusive scopes are not detected and shared. */
+
+ /* calculate return value size */
+ param_size = 0;
+ if (fun->header.type.specifier.type != slang_spec_void)
+ if (!sizeof_variable (A, &fun->header.type.specifier, slang_qual_none, 0, &param_size))
+ return GL_FALSE;
+ A->local.ret_size = param_size;
+
+ /* calculate formal parameter list size */
+ if (!sizeof_variables (A, fun->parameters, 0, fun->param_count, &param_size))
+ return GL_FALSE;
+
+ /* calculate local variables size - take into account the four-byte return address and
+ * temporaries for various tasks (4 for addr and 16 for swizzle temporaries).
+ * these include variables from the formal parameter scope and from the code */
+ A->local.addr_tmp = param_size + 4;
+ A->local.swizzle_tmp = param_size + 4 + 4;
+ local_size = param_size + 4 + 4 + 16;
+ if (!sizeof_variables (A, fun->parameters, fun->param_count, fun->parameters->num_variables,
+ &local_size))
+ return GL_FALSE;
+ if (!collect_locals (A, fun->body, &local_size))
+ return GL_FALSE;
+
+ /* allocate local variable storage */
+ if (!PLAB (A->file, slang_asm_local_alloc, local_size - param_size - 4))
+ return GL_FALSE;
+
+ /* mark a new frame for function variable storage */
+ if (!PLAB (A->file, slang_asm_enter, local_size))
+ return GL_FALSE;
+
+ /* jump directly to the actual code */
+ skip = A->file->count;
+ if (!push_new (A->file))
+ return GL_FALSE;
+ A->file->code[skip].type = slang_asm_jump;
+
+ /* all "return" statements will be directed here */
+ A->flow.function_end = A->file->count;
+ cleanup = A->file->count;
+ if (!push_new (A->file))
+ return GL_FALSE;
+ A->file->code[cleanup].type = slang_asm_jump;
+
+ /* execute the function body */
+ A->file->code[skip].param[0] = A->file->count;
+ if (!_slang_assemble_operation (A, fun->body, /*slang_ref_freelance*/slang_ref_forbid))
+ return GL_FALSE;
+
+ /* this is the end of the function - restore the old function frame */
+ A->file->code[cleanup].param[0] = A->file->count;
+ if (!PUSH (A->file, slang_asm_leave))
+ return GL_FALSE;
+
+ /* free local variable storage */
+ if (!PLAB (A->file, slang_asm_local_free, local_size - param_size - 4))
+ return GL_FALSE;
+
+ /* return from the function */
+ if (!PUSH (A->file, slang_asm_return))
+ return GL_FALSE;
+
+ return GL_TRUE;
+}
+
+GLboolean _slang_cleanup_stack (slang_assemble_ctx *A, slang_operation *op)
+{
+ slang_assembly_typeinfo ti;
+ GLuint size = 0;
+
+ /* get type info of the operation and calculate its size */
+ if (!slang_assembly_typeinfo_construct (&ti))
+ return GL_FALSE;
+ if (!_slang_typeof_operation (A, op, &ti))
+ {
+ slang_assembly_typeinfo_destruct (&ti);
+ return GL_FALSE;
+ }
+ if (ti.spec.type != slang_spec_void) {
+ if (A->ref == slang_ref_force) {
+ size = 4;
+ }
+ else if (!sizeof_variable (A, &ti.spec, slang_qual_none, 0, &size))
+ {
+ slang_assembly_typeinfo_destruct (&ti);
+ return GL_FALSE;
+ }
+ }
+ slang_assembly_typeinfo_destruct (&ti);
+
+ /* if nonzero, free it from the stack */
+ if (size != 0)
+ {
+ if (!PLAB (A->file, slang_asm_local_free, size))
+ return GL_FALSE;
+ }
+
+ return GL_TRUE;
+}
+
+/* _slang_assemble_operation() */
+
+static GLboolean dereference_aggregate (slang_assemble_ctx *A, const slang_storage_aggregate *agg,
+ GLuint *size, slang_swizzle *swz, GLboolean is_swizzled)
+{
+ GLuint i;
+
+ for (i = agg->count; i > 0; i--)
+ {
+ const slang_storage_array *arr = &agg->arrays[i - 1];
+ GLuint j;
+
+ for (j = arr->length; j > 0; j--)
+ {
+ if (arr->type == slang_stor_aggregate)
+ {
+ if (!dereference_aggregate (A, arr->aggregate, size, swz, is_swizzled))
+ return GL_FALSE;
+ }
+ else
+ {
+ GLuint src_offset;
+ slang_assembly_type ty;
+
+ *size -= 4;
+
+ /* calculate the offset within source variable to read */
+ if (is_swizzled)
+ {
+ /* swizzle the index to get the actual offset */
+ src_offset = swz->swizzle[*size / 4] * 4;
+ }
+ else
+ {
+ /* no swizzling - read sequentially */
+ src_offset = *size;
+ }
+
+ /* dereference data slot of a basic type */
+ if (!PLAB2 (A->file, slang_asm_local_addr, A->local.addr_tmp, 4))
+ return GL_FALSE;
+ if (!PUSH (A->file, slang_asm_addr_deref))
+ return GL_FALSE;
+ if (!PLAB (A->file, slang_asm_addr_push, src_offset))
+ return GL_FALSE;
+ if (!PUSH (A->file, slang_asm_addr_add))
+ return GL_FALSE;
+
+ switch (arr->type)
+ {
+ case slang_stor_bool:
+ ty = slang_asm_bool_deref;
+ break;
+ case slang_stor_int:
+ ty = slang_asm_int_deref;
+ break;
+ case slang_stor_float:
+ ty = slang_asm_float_deref;
+ break;
+ default:
+ _mesa_problem(NULL, "Unexpected arr->type in dereference_aggregate");
+ ty = slang_asm_none;
+ }
+ if (!PUSH (A->file, ty))
+ return GL_FALSE;
+ }
+ }
+ }
+
+ return GL_TRUE;
+}
+
+GLboolean _slang_dereference (slang_assemble_ctx *A, slang_operation *op)
+{
+ slang_assembly_typeinfo ti;
+ GLboolean result = GL_FALSE;
+ slang_storage_aggregate agg;
+ GLuint size;
+
+ /* get type information of the given operation */
+ if (!slang_assembly_typeinfo_construct (&ti))
+ return GL_FALSE;
+ if (!_slang_typeof_operation (A, op, &ti))
+ goto end1;
+
+ /* construct aggregate from the type info */
+ if (!slang_storage_aggregate_construct (&agg))
+ goto end1;
+ if (!_slang_aggregate_variable (&agg, &ti.spec, ti.array_len, A->space.funcs, A->space.structs,
+ A->space.vars, A->mach, A->file, A->atoms))
+ goto end;
+
+ /* dereference the resulting aggregate */
+ size = _slang_sizeof_aggregate (&agg);
+ result = dereference_aggregate (A, &agg, &size, &ti.swz, ti.is_swizzled);
+
+end:
+ slang_storage_aggregate_destruct (&agg);
+end1:
+ slang_assembly_typeinfo_destruct (&ti);
+ return result;
+}
+
+GLboolean _slang_assemble_function_call (slang_assemble_ctx *A, slang_function *fun,
+ slang_operation *params, GLuint param_count, GLboolean assignment)
+{
+ GLuint i;
+ slang_swizzle p_swz[64];
+ slang_ref_type p_ref[64];
+
+ /* TODO: fix this, allocate dynamically */
+ if (param_count > 64)
+ return GL_FALSE;
+
+ /* make room for the return value, if any */
+ if (fun->header.type.specifier.type != slang_spec_void)
+ {
+ GLuint ret_size = 0;
+
+ if (!sizeof_variable (A, &fun->header.type.specifier, slang_qual_none, 0, &ret_size))
+ return GL_FALSE;
+ if (!PLAB (A->file, slang_asm_local_alloc, ret_size))
+ return GL_FALSE;
+ }
+
+ /* push the actual parameters on the stack */
+ for (i = 0; i < param_count; i++)
+ {
+ if (fun->parameters->variables[i].type.qualifier == slang_qual_inout ||
+ fun->parameters->variables[i].type.qualifier == slang_qual_out)
+ {
+ if (!PLAB2 (A->file, slang_asm_local_addr, A->local.addr_tmp, 4))
+ return GL_FALSE;
+ /* TODO: optimize the "out" parameter case */
+ if (!_slang_assemble_operation (A, &params[i], slang_ref_force))
+ return GL_FALSE;
+ p_swz[i] = A->swz;
+ p_ref[i] = A->ref;
+ if (!PUSH (A->file, slang_asm_addr_copy))
+ return GL_FALSE;
+ if (!PUSH (A->file, slang_asm_addr_deref))
+ return GL_FALSE;
+ if (i == 0 && assignment)
+ {
+ /* duplicate the resulting address */
+ if (!PLAB2 (A->file, slang_asm_local_addr, A->local.addr_tmp, 4))
+ return GL_FALSE;
+ if (!PUSH (A->file, slang_asm_addr_deref))
+ return GL_FALSE;
+ }
+ if (!_slang_dereference (A, &params[i]))
+ return GL_FALSE;
+ }
+ else
+ {
+ if (!_slang_assemble_operation (A, &params[i], slang_ref_forbid))
+ return GL_FALSE;
+ p_swz[i] = A->swz;
+ p_ref[i] = A->ref;
+ }
+ }
+
+ /* call the function */
+ if (!PLAB (A->file, slang_asm_call, fun->address))
+ return GL_FALSE;
+
+ /* pop the parameters from the stack */
+ for (i = param_count; i > 0; i--)
+ {
+ GLuint j = i - 1;
+
+ A->swz = p_swz[j];
+ A->ref = p_ref[j];
+ if (fun->parameters->variables[j].type.qualifier == slang_qual_inout ||
+ fun->parameters->variables[j].type.qualifier == slang_qual_out)
+ {
+ /* for output parameter copy the contents of the formal parameter
+ * back to the original actual parameter */
+ if (!_slang_assemble_assignment (A, &params[j]))
+ return GL_FALSE;
+ /* pop the actual parameter's address */
+ if (!PLAB (A->file, slang_asm_local_free, 4))
+ return GL_FALSE;
+ }
+ else
+ {
+ /* pop the value of the parameter */
+ if (!_slang_cleanup_stack (A, &params[j]))
+ return GL_FALSE;
+ }
+ }
+
+ return GL_TRUE;
+}
+
+GLboolean _slang_assemble_function_call_name (slang_assemble_ctx *A, const char *name,
+ slang_operation *params, GLuint param_count, GLboolean assignment)
+{
+ slang_atom atom;
+ slang_function *fun;
+
+ atom = slang_atom_pool_atom (A->atoms, name);
+ if (atom == SLANG_ATOM_NULL)
+ return GL_FALSE;
+ fun = _slang_locate_function (A->space.funcs, atom, params, param_count, &A->space, A->atoms);
+ if (fun == NULL)
+ return GL_FALSE;
+ return _slang_assemble_function_call (A, fun, params, param_count, assignment);
+}
+
+static GLboolean assemble_function_call_name_dummyint (slang_assemble_ctx *A, const char *name,
+ slang_operation *params)
+{
+ slang_operation p[2];
+ GLboolean result;
+
+ p[0] = params[0];
+ if (!slang_operation_construct (&p[1]))
+ return GL_FALSE;
+ p[1].type = slang_oper_literal_int;
+ result = _slang_assemble_function_call_name (A, name, p, 2, GL_FALSE);
+ slang_operation_destruct (&p[1]);
+ return result;
+}
+
+static const struct
+{
+ const char *name;
+ slang_assembly_type code1, code2;
+} inst[] = {
+ /* core */
+ { "float_add", slang_asm_float_add, slang_asm_float_copy },
+ { "float_multiply", slang_asm_float_multiply, slang_asm_float_copy },
+ { "float_divide", slang_asm_float_divide, slang_asm_float_copy },
+ { "float_negate", slang_asm_float_negate, slang_asm_float_copy },
+ { "float_less", slang_asm_float_less, slang_asm_bool_copy },
+ { "float_equal", slang_asm_float_equal_exp,slang_asm_bool_copy },
+ { "float_to_int", slang_asm_float_to_int, slang_asm_int_copy },
+ { "float_sine", slang_asm_float_sine, slang_asm_float_copy },
+ { "float_arcsine", slang_asm_float_arcsine, slang_asm_float_copy },
+ { "float_arctan", slang_asm_float_arctan, slang_asm_float_copy },
+ { "float_power", slang_asm_float_power, slang_asm_float_copy },
+ { "float_log2", slang_asm_float_log2, slang_asm_float_copy },
+ { "float_floor", slang_asm_float_floor, slang_asm_float_copy },
+ { "float_ceil", slang_asm_float_ceil, slang_asm_float_copy },
+ { "float_noise1", slang_asm_float_noise1, slang_asm_float_copy },
+ { "float_noise2", slang_asm_float_noise2, slang_asm_float_copy },
+ { "float_noise3", slang_asm_float_noise3, slang_asm_float_copy },
+ { "float_noise4", slang_asm_float_noise4, slang_asm_float_copy },
+ { "int_to_float", slang_asm_int_to_float, slang_asm_float_copy },
+ { "vec4_tex1d", slang_asm_vec4_tex1d, slang_asm_none },
+ { "vec4_tex2d", slang_asm_vec4_tex2d, slang_asm_none },
+ { "vec4_tex3d", slang_asm_vec4_tex3d, slang_asm_none },
+ { "vec4_texcube", slang_asm_vec4_texcube, slang_asm_none },
+ { "vec4_shad1d", slang_asm_vec4_shad1d, slang_asm_none },
+ { "vec4_shad2d", slang_asm_vec4_shad2d, slang_asm_none },
+ /* mesa-specific extensions */
+ { "float_print", slang_asm_float_deref, slang_asm_float_print },
+ { "int_print", slang_asm_int_deref, slang_asm_int_print },
+ { "bool_print", slang_asm_bool_deref, slang_asm_bool_print },
+ { NULL, slang_asm_none, slang_asm_none }
+};
+
+static GLboolean call_asm_instruction (slang_assemble_ctx *A, slang_atom a_name)
+{
+ const char *id;
+ GLuint i;
+
+ id = slang_atom_pool_id (A->atoms, a_name);
+
+ for (i = 0; inst[i].name != NULL; i++)
+ if (slang_string_compare (id, inst[i].name) == 0)
+ break;
+ if (inst[i].name == NULL)
+ return GL_FALSE;
+
+ if (!PLAB2 (A->file, inst[i].code1, 4, 0))
+ return GL_FALSE;
+ if (inst[i].code2 != slang_asm_none)
+ if (!PLAB2 (A->file, inst[i].code2, 4, 0))
+ return GL_FALSE;
+
+ /* clean-up the stack from the remaining dst address */
+ if (!PLAB (A->file, slang_asm_local_free, 4))
+ return GL_FALSE;
+
+ return GL_TRUE;
+}
+
+static GLboolean equality_aggregate (slang_assemble_ctx *A, const slang_storage_aggregate *agg,
+ GLuint *index, GLuint size, GLuint z_label)
+{
+ GLuint i;
+
+ for (i = 0; i < agg->count; i++)
+ {
+ const slang_storage_array *arr = &agg->arrays[i];
+ GLuint j;
+
+ for (j = 0; j < arr->length; j++)
+ {
+ if (arr->type == slang_stor_aggregate)
+ {
+ if (!equality_aggregate (A, arr->aggregate, index, size, z_label))
+ return GL_FALSE;
+ }
+ else
+ {
+ if (!PLAB2 (A->file, slang_asm_float_equal_int, size + *index, *index))
+ return GL_FALSE;
+ *index += 4;
+ if (!PLAB (A->file, slang_asm_jump_if_zero, z_label))
+ return GL_FALSE;
+ }
+ }
+ }
+
+ return GL_TRUE;
+}
+
+static GLboolean equality (slang_assemble_ctx *A, slang_operation *op, GLboolean equal)
+{
+ slang_assembly_typeinfo ti;
+ GLboolean result = GL_FALSE;
+ slang_storage_aggregate agg;
+ GLuint index, size;
+ GLuint skip_jump, true_label, true_jump, false_label, false_jump;
+
+ /* get type of operation */
+ if (!slang_assembly_typeinfo_construct (&ti))
+ return GL_FALSE;
+ if (!_slang_typeof_operation (A, op, &ti))
+ goto end1;
+
+ /* convert it to an aggregate */
+ if (!slang_storage_aggregate_construct (&agg))
+ goto end1;
+ if (!_slang_aggregate_variable (&agg, &ti.spec, 0, A->space.funcs, A->space.structs,
+ A->space.vars, A->mach, A->file, A->atoms))
+ goto end;
+
+ /* compute the size of the agregate - there are two such aggregates on the stack */
+ size = _slang_sizeof_aggregate (&agg);
+
+ /* jump to the actual data-comparison code */
+ skip_jump = A->file->count;
+ if (!PUSH (A->file, slang_asm_jump))
+ goto end;
+
+ /* pop off the stack the compared data and push 1 */
+ true_label = A->file->count;
+ if (!PLAB (A->file, slang_asm_local_free, size * 2))
+ goto end;
+ if (!PLIT (A->file, slang_asm_bool_push, (GLfloat) 1))
+ goto end;
+ true_jump = A->file->count;
+ if (!PUSH (A->file, slang_asm_jump))
+ goto end;
+
+ false_label = A->file->count;
+ if (!PLAB (A->file, slang_asm_local_free, size * 2))
+ goto end;
+ if (!PLIT (A->file, slang_asm_bool_push, (GLfloat) 0))
+ goto end;
+ false_jump = A->file->count;
+ if (!PUSH (A->file, slang_asm_jump))
+ goto end;
+
+ A->file->code[skip_jump].param[0] = A->file->count;
+
+ /* compare the data on stack, it will eventually jump either to true or false label */
+ index = 0;
+ if (!equality_aggregate (A, &agg, &index, size, equal ? false_label : true_label))
+ goto end;
+ if (!PLAB (A->file, slang_asm_jump, equal ? true_label : false_label))
+ goto end;
+
+ A->file->code[true_jump].param[0] = A->file->count;
+ A->file->code[false_jump].param[0] = A->file->count;
+
+ result = GL_TRUE;
+end:
+ slang_storage_aggregate_destruct (&agg);
+end1:
+ slang_assembly_typeinfo_destruct (&ti);
+ return result;
+}
+
+static GLboolean handle_subscript (slang_assemble_ctx *A, slang_assembly_typeinfo *tie,
+ slang_assembly_typeinfo *tia, slang_operation *op, slang_ref_type ref)
+{
+ GLuint asize = 0, esize = 0;
+
+ /* get type info of the master expression (matrix, vector or an array */
+ if (!_slang_typeof_operation (A, &op->children[0], tia))
+ return GL_FALSE;
+ if (!sizeof_variable (A, &tia->spec, slang_qual_none, tia->array_len, &asize))
+ return GL_FALSE;
+
+ /* get type info of the result (matrix column, vector row or array element) */
+ if (!_slang_typeof_operation (A, op, tie))
+ return GL_FALSE;
+ if (!sizeof_variable (A, &tie->spec, slang_qual_none, 0, &esize))
+ return GL_FALSE;
+
+ /* assemble the master expression */
+ if (!_slang_assemble_operation (A, &op->children[0], ref))
+ return GL_FALSE;
+
+ /* when indexing an l-value swizzle, push the swizzle_tmp */
+ if (ref == slang_ref_force && tia->is_swizzled)
+ if (!PLAB2 (A->file, slang_asm_local_addr, A->local.swizzle_tmp, 16))
+ return GL_FALSE;
+
+ /* assemble the subscript expression */
+ if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid))
+ return GL_FALSE;
+
+ if (ref == slang_ref_force && tia->is_swizzled)
+ {
+ GLuint i;
+
+ /* copy the swizzle indexes to the swizzle_tmp */
+ for (i = 0; i < tia->swz.num_components; i++)
+ {
+ if (!PLAB2 (A->file, slang_asm_local_addr, A->local.swizzle_tmp, 16))
+ return GL_FALSE;
+ if (!PLAB (A->file, slang_asm_addr_push, i * 4))
+ return GL_FALSE;
+ if (!PUSH (A->file, slang_asm_addr_add))
+ return GL_FALSE;
+ if (!PLAB (A->file, slang_asm_addr_push, tia->swz.swizzle[i]))
+ return GL_FALSE;
+ if (!PUSH (A->file, slang_asm_addr_copy))
+ return GL_FALSE;
+ if (!PLAB (A->file, slang_asm_local_free, 4))
+ return GL_FALSE;
+ }
+
+ /* offset the pushed swizzle_tmp address and dereference it */
+ if (!PUSH (A->file, slang_asm_int_to_addr))
+ return GL_FALSE;
+ if (!PLAB (A->file, slang_asm_addr_push, 4))
+ return GL_FALSE;
+ if (!PUSH (A->file, slang_asm_addr_multiply))
+ return GL_FALSE;
+ if (!PUSH (A->file, slang_asm_addr_add))
+ return GL_FALSE;
+ if (!PUSH (A->file, slang_asm_addr_deref))
+ return GL_FALSE;
+ }
+ else
+ {
+ /* convert the integer subscript to a relative address */
+ if (!PUSH (A->file, slang_asm_int_to_addr))
+ return GL_FALSE;
+ }
+
+ if (!PLAB (A->file, slang_asm_addr_push, esize))
+ return GL_FALSE;
+ if (!PUSH (A->file, slang_asm_addr_multiply))
+ return GL_FALSE;
+
+ if (ref == slang_ref_force)
+ {
+ /* offset the base address with the relative address */
+ if (!PUSH (A->file, slang_asm_addr_add))
+ return GL_FALSE;
+ }
+ else
+ {
+ GLuint i;
+
+ /* move the selected element to the beginning of the master expression */
+ for (i = 0; i < esize; i += 4)
+ if (!PLAB2 (A->file, slang_asm_float_move, asize - esize + i + 4, i + 4))
+ return GL_FALSE;
+ if (!PLAB (A->file, slang_asm_local_free, 4))
+ return GL_FALSE;
+
+ /* free the rest of the master expression */
+ if (!PLAB (A->file, slang_asm_local_free, asize - esize))
+ return GL_FALSE;
+ }
+
+ return GL_TRUE;
+}
+
+static GLboolean handle_field (slang_assemble_ctx *A, slang_assembly_typeinfo *tia,
+ slang_assembly_typeinfo *tib, slang_operation *op, slang_ref_type ref)
+{
+ /* get type info of the result (field or swizzle) */
+ if (!_slang_typeof_operation (A, op, tia))
+ return GL_FALSE;
+
+ /* get type info of the master expression being accessed (struct or vector) */
+ if (!_slang_typeof_operation (A, &op->children[0], tib))
+ return GL_FALSE;
+
+ /* if swizzling a vector in-place, the swizzle temporary is needed */
+ if (ref == slang_ref_forbid && tia->is_swizzled)
+ if (!PLAB2 (A->file, slang_asm_local_addr, A->local.swizzle_tmp, 16))
+ return GL_FALSE;
+
+ /* assemble the master expression */
+ if (!_slang_assemble_operation (A, &op->children[0], ref))
+ return GL_FALSE;
+
+ /* assemble the field expression */
+ if (tia->is_swizzled)
+ {
+ if (ref == slang_ref_force)
+ {
+#if 0
+ if (tia->swz.num_components == 1)
+ {
+ /* simple case - adjust the vector's address to point to the selected component */
+ if (!PLAB (file, slang_asm_addr_push, tia->swz.swizzle[0] * 4))
+ return 0;
+ if (!PUSH (file, slang_asm_addr_add))
+ return 0;
+ }
+ else
+#endif
+ {
+ /* two or more vector components are being referenced - the so-called write mask
+ * must be passed to the upper operations and applied when assigning value
+ * to this swizzle */
+ A->swz = tia->swz;
+ }
+ }
+ else
+ {
+ /* swizzle the vector in-place using the swizzle temporary */
+ if (!_slang_assemble_constructor_from_swizzle (A, &tia->swz, &tia->spec, &tib->spec))
+ return GL_FALSE;
+ }
+ }
+ else
+ {
+ GLuint i, struct_size = 0, field_offset = 0, field_size = 0;
+ GLboolean relocate, shrink;
+
+ /* calculate struct size, field offset and field size */
+ for (i = 0; i < tib->spec._struct->fields->num_variables; i++)
+ {
+ slang_variable *field;
+ slang_storage_aggregate agg;
+ GLuint size;
+
+ field = &tib->spec._struct->fields->variables[i];
+ if (!slang_storage_aggregate_construct (&agg))
+ return GL_FALSE;
+ if (!_slang_aggregate_variable (&agg, &field->type.specifier, field->array_len,
+ A->space.funcs, A->space.structs, A->space.vars, A->mach, A->file, A->atoms))
+ {
+ slang_storage_aggregate_destruct (&agg);
+ return GL_FALSE;
+ }
+ size = _slang_sizeof_aggregate (&agg);
+ slang_storage_aggregate_destruct (&agg);
+
+ if (op->a_id == field->a_name)
+ {
+ field_size = size;
+ struct_size = field_offset + size;
+ }
+ else if (struct_size != 0)
+ struct_size += size;
+ else
+ field_offset += size;
+ }
+
+ /*
+ * OPTIMIZATION: If selecting the last field, no relocation is needed.
+ */
+ relocate = field_offset != struct_size - field_size;
+
+ /*
+ * OPTIMIZATION: If field and struct sizes are equal, no partial free is needed.
+ */
+ shrink = field_size != struct_size;
+
+ if (relocate)
+ {
+ if (!PLAB (A->file, slang_asm_addr_push, field_offset))
+ return GL_FALSE;
+ }
+
+ if (ref == slang_ref_force)
+ {
+ if (relocate)
+ {
+ if (!PUSH (A->file, slang_asm_addr_add))
+ return GL_FALSE;
+ }
+ }
+ else
+ {
+ GLuint free_b = 0;
+
+ if (relocate)
+ {
+ GLuint i;
+
+ /*
+ * Move the selected element to the end of the master expression.
+ * Do it in reverse order to avoid overwriting itself.
+ */
+ for (i = field_size; i > 0; i -= 4)
+ if (!PLAB2 (A->file, slang_asm_float_move, struct_size - field_size + i, i))
+ return GL_FALSE;
+ free_b += 4;
+ }
+
+ if (shrink)
+ {
+ /* free the rest of the master expression */
+ free_b += struct_size - field_size;
+ }
+
+ if (free_b)
+ {
+ if (!PLAB (A->file, slang_asm_local_free, free_b))
+ return GL_FALSE;
+ }
+ }
+ }
+
+ return GL_TRUE;
+}
+
+GLboolean _slang_assemble_operation (slang_assemble_ctx *A, slang_operation *op, slang_ref_type ref)
+{
+ /* set default results */
+ A->ref = /*(ref == slang_ref_freelance) ? slang_ref_force : */ref;
+ A->swz.num_components = 0;
+
+ switch (op->type)
+ {
+ case slang_oper_block_no_new_scope:
+ case slang_oper_block_new_scope:
+ {
+ GLuint i;
+
+ for (i = 0; i < op->num_children; i++)
+ {
+ if (!_slang_assemble_operation (A, &op->children[i], slang_ref_forbid/*slang_ref_freelance*/))
+ return GL_FALSE;
+ if (!_slang_cleanup_stack (A, &op->children[i]))
+ return GL_FALSE;
+ }
+ }
+ break;
+ case slang_oper_variable_decl:
+ {
+ GLuint i;
+ slang_operation assign;
+ GLboolean result;
+
+ /* Construct assignment expression placeholder. */
+ if (!slang_operation_construct (&assign))
+ return GL_FALSE;
+ assign.type = slang_oper_assign;
+ assign.children = (slang_operation *) slang_alloc_malloc (2 * sizeof (slang_operation));
+ if (assign.children == NULL)
+ {
+ slang_operation_destruct (&assign);
+ return GL_FALSE;
+ }
+ for (assign.num_children = 0; assign.num_children < 2; assign.num_children++)
+ if (!slang_operation_construct (&assign.children[assign.num_children]))
+ {
+ slang_operation_destruct (&assign);
+ return GL_FALSE;
+ }
+
+ result = GL_TRUE;
+ for (i = 0; i < op->num_children; i++)
+ {
+ slang_variable *var;
+
+ var = _slang_locate_variable (op->children[i].locals, op->children[i].a_id, GL_TRUE);
+ if (var == NULL)
+ {
+ result = GL_FALSE;
+ break;
+ }
+ if (var->initializer == NULL)
+ continue;
+
+ if (!slang_operation_copy (&assign.children[0], &op->children[i]) ||
+ !slang_operation_copy (&assign.children[1], var->initializer) ||
+ !_slang_assemble_assign (A, &assign, "=", slang_ref_forbid) ||
+ !_slang_cleanup_stack (A, &assign))
+ {
+ result = GL_FALSE;
+ break;
+ }
+ }
+ slang_operation_destruct (&assign);
+ if (!result)
+ return GL_FALSE;
+ }
+ break;
+ case slang_oper_asm:
+ {
+ GLuint i;
+
+ if (!_slang_assemble_operation (A, &op->children[0], slang_ref_force))
+ return GL_FALSE;
+ for (i = 1; i < op->num_children; i++)
+ if (!_slang_assemble_operation (A, &op->children[i], slang_ref_forbid))
+ return GL_FALSE;
+ if (!call_asm_instruction (A, op->a_id))
+ return GL_FALSE;
+ }
+ break;
+ case slang_oper_break:
+ if (!PLAB (A->file, slang_asm_jump, A->flow.loop_end))
+ return GL_FALSE;
+ break;
+ case slang_oper_continue:
+ if (!PLAB (A->file, slang_asm_jump, A->flow.loop_start))
+ return GL_FALSE;
+ break;
+ case slang_oper_discard:
+ if (!PUSH (A->file, slang_asm_discard))
+ return GL_FALSE;
+ if (!PUSH (A->file, slang_asm_exit))
+ return GL_FALSE;
+ break;
+ case slang_oper_return:
+ if (A->local.ret_size != 0)
+ {
+ /* push the result's address */
+ if (!PLAB2 (A->file, slang_asm_local_addr, 0, A->local.ret_size))
+ return GL_FALSE;
+ if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid))
+ return GL_FALSE;
+
+ A->swz.num_components = 0;
+ /* assign the operation to the function result (it was reserved on the stack) */
+ if (!_slang_assemble_assignment (A, op->children))
+ return GL_FALSE;
+
+ if (!PLAB (A->file, slang_asm_local_free, 4))
+ return GL_FALSE;
+ }
+ if (!PLAB (A->file, slang_asm_jump, A->flow.function_end))
+ return GL_FALSE;
+ break;
+ case slang_oper_expression:
+ if (ref == slang_ref_force)
+ return GL_FALSE;
+ if (!_slang_assemble_operation (A, &op->children[0], ref))
+ return GL_FALSE;
+ break;
+ case slang_oper_if:
+ if (!_slang_assemble_if (A, op))
+ return GL_FALSE;
+ break;
+ case slang_oper_while:
+ if (!_slang_assemble_while (A, op))
+ return GL_FALSE;
+ break;
+ case slang_oper_do:
+ if (!_slang_assemble_do (A, op))
+ return GL_FALSE;
+ break;
+ case slang_oper_for:
+ if (!_slang_assemble_for (A, op))
+ return GL_FALSE;
+ break;
+ case slang_oper_void:
+ break;
+ case slang_oper_literal_bool:
+ if (ref == slang_ref_force)
+ return GL_FALSE;
+ if (!PLIT (A->file, slang_asm_bool_push, op->literal))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ case slang_oper_literal_int:
+ if (ref == slang_ref_force)
+ return GL_FALSE;
+ if (!PLIT (A->file, slang_asm_int_push, op->literal))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ case slang_oper_literal_float:
+ if (ref == slang_ref_force)
+ return GL_FALSE;
+ if (!PLIT (A->file, slang_asm_float_push, op->literal))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ case slang_oper_identifier:
+ {
+ slang_variable *var;
+ GLuint size;
+
+ /* find the variable and calculate its size */
+ var = _slang_locate_variable (op->locals, op->a_id, GL_TRUE);
+ if (var == NULL)
+ return GL_FALSE;
+ size = 0;
+ if (!sizeof_variable (A, &var->type.specifier, slang_qual_none, var->array_len, &size))
+ return GL_FALSE;
+
+ /* prepare stack for dereferencing */
+ if (ref == slang_ref_forbid)
+ if (!PLAB2 (A->file, slang_asm_local_addr, A->local.addr_tmp, 4))
+ return GL_FALSE;
+
+ /* push the variable's address */
+ if (var->global)
+ {
+ if (!PLAB (A->file, slang_asm_global_addr, var->address))
+ return GL_FALSE;
+ }
+ else
+ {
+ if (!PLAB2 (A->file, slang_asm_local_addr, var->address, size))
+ return GL_FALSE;
+ }
+
+ /* perform the dereference */
+ if (ref == slang_ref_forbid)
+ {
+ if (!PUSH (A->file, slang_asm_addr_copy))
+ return GL_FALSE;
+ if (!PLAB (A->file, slang_asm_local_free, 4))
+ return GL_FALSE;
+ if (!_slang_dereference (A, op))
+ return GL_FALSE;
+ }
+ }
+ break;
+ case slang_oper_sequence:
+ if (ref == slang_ref_force)
+ return GL_FALSE;
+ if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid/*slang_ref_freelance*/))
+ return GL_FALSE;
+ if (!_slang_cleanup_stack (A, &op->children[0]))
+ return GL_FALSE;
+ if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ case slang_oper_assign:
+ if (!_slang_assemble_assign (A, op, "=", ref))
+ return GL_FALSE;
+ break;
+ case slang_oper_addassign:
+ if (!_slang_assemble_assign (A, op, "+=", ref))
+ return GL_FALSE;
+ A->ref = ref;
+ break;
+ case slang_oper_subassign:
+ if (!_slang_assemble_assign (A, op, "-=", ref))
+ return GL_FALSE;
+ A->ref = ref;
+ break;
+ case slang_oper_mulassign:
+ if (!_slang_assemble_assign (A, op, "*=", ref))
+ return GL_FALSE;
+ A->ref = ref;
+ break;
+ /*case slang_oper_modassign:*/
+ /*case slang_oper_lshassign:*/
+ /*case slang_oper_rshassign:*/
+ /*case slang_oper_orassign:*/
+ /*case slang_oper_xorassign:*/
+ /*case slang_oper_andassign:*/
+ case slang_oper_divassign:
+ if (!_slang_assemble_assign (A, op, "/=", ref))
+ return GL_FALSE;
+ A->ref = ref;
+ break;
+ case slang_oper_select:
+ if (!_slang_assemble_select (A, op))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ case slang_oper_logicalor:
+ if (!_slang_assemble_logicalor (A, op))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ case slang_oper_logicaland:
+ if (!_slang_assemble_logicaland (A, op))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ case slang_oper_logicalxor:
+ if (!_slang_assemble_function_call_name (A, "^^", op->children, 2, GL_FALSE))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ /*case slang_oper_bitor:*/
+ /*case slang_oper_bitxor:*/
+ /*case slang_oper_bitand:*/
+ case slang_oper_less:
+ if (!_slang_assemble_function_call_name (A, "<", op->children, 2, GL_FALSE))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ case slang_oper_greater:
+ if (!_slang_assemble_function_call_name (A, ">", op->children, 2, GL_FALSE))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ case slang_oper_lessequal:
+ if (!_slang_assemble_function_call_name (A, "<=", op->children, 2, GL_FALSE))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ case slang_oper_greaterequal:
+ if (!_slang_assemble_function_call_name (A, ">=", op->children, 2, GL_FALSE))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ /*case slang_oper_lshift:*/
+ /*case slang_oper_rshift:*/
+ case slang_oper_add:
+ if (!_slang_assemble_function_call_name (A, "+", op->children, 2, GL_FALSE))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ case slang_oper_subtract:
+ if (!_slang_assemble_function_call_name (A, "-", op->children, 2, GL_FALSE))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ case slang_oper_multiply:
+ if (!_slang_assemble_function_call_name (A, "*", op->children, 2, GL_FALSE))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ /*case slang_oper_modulus:*/
+ case slang_oper_divide:
+ if (!_slang_assemble_function_call_name (A, "/", op->children, 2, GL_FALSE))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ case slang_oper_equal:
+ if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid))
+ return GL_FALSE;
+ if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid))
+ return GL_FALSE;
+ if (!equality (A, op->children, GL_TRUE))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ case slang_oper_notequal:
+ if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid))
+ return GL_FALSE;
+ if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid))
+ return GL_FALSE;
+ if (!equality (A, op->children, GL_FALSE))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ case slang_oper_preincrement:
+ if (!_slang_assemble_assign (A, op, "++", ref))
+ return GL_FALSE;
+ A->ref = ref;
+ break;
+ case slang_oper_predecrement:
+ if (!_slang_assemble_assign (A, op, "--", ref))
+ return GL_FALSE;
+ A->ref = ref;
+ break;
+ case slang_oper_plus:
+ if (!_slang_dereference (A, op))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ case slang_oper_minus:
+ if (!_slang_assemble_function_call_name (A, "-", op->children, 1, GL_FALSE))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ /*case slang_oper_complement:*/
+ case slang_oper_not:
+ if (!_slang_assemble_function_call_name (A, "!", op->children, 1, GL_FALSE))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ case slang_oper_subscript:
+ {
+ slang_assembly_typeinfo ti_arr, ti_elem;
+
+ if (!slang_assembly_typeinfo_construct (&ti_arr))
+ return GL_FALSE;
+ if (!slang_assembly_typeinfo_construct (&ti_elem))
+ {
+ slang_assembly_typeinfo_destruct (&ti_arr);
+ return GL_FALSE;
+ }
+ if (!handle_subscript (A, &ti_elem, &ti_arr, op, ref))
+ {
+ slang_assembly_typeinfo_destruct (&ti_arr);
+ slang_assembly_typeinfo_destruct (&ti_elem);
+ return GL_FALSE;
+ }
+ slang_assembly_typeinfo_destruct (&ti_arr);
+ slang_assembly_typeinfo_destruct (&ti_elem);
+ }
+ break;
+ case slang_oper_call:
+ {
+ slang_function *fun;
+
+ fun = _slang_locate_function (A->space.funcs, op->a_id, op->children, op->num_children,
+ &A->space, A->atoms);
+ if (fun == NULL)
+ {
+ if (!_slang_assemble_constructor (A, op))
+ return GL_FALSE;
+ }
+ else
+ {
+ if (!_slang_assemble_function_call (A, fun, op->children, op->num_children, GL_FALSE))
+ return GL_FALSE;
+ }
+ A->ref = slang_ref_forbid;
+ }
+ break;
+ case slang_oper_field:
+ {
+ slang_assembly_typeinfo ti_after, ti_before;
+
+ if (!slang_assembly_typeinfo_construct (&ti_after))
+ return GL_FALSE;
+ if (!slang_assembly_typeinfo_construct (&ti_before))
+ {
+ slang_assembly_typeinfo_destruct (&ti_after);
+ return GL_FALSE;
+ }
+ if (!handle_field (A, &ti_after, &ti_before, op, ref))
+ {
+ slang_assembly_typeinfo_destruct (&ti_after);
+ slang_assembly_typeinfo_destruct (&ti_before);
+ return GL_FALSE;
+ }
+ slang_assembly_typeinfo_destruct (&ti_after);
+ slang_assembly_typeinfo_destruct (&ti_before);
+ }
+ break;
+ case slang_oper_postincrement:
+ if (!assemble_function_call_name_dummyint (A, "++", op->children))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ case slang_oper_postdecrement:
+ if (!assemble_function_call_name_dummyint (A, "--", op->children))
+ return GL_FALSE;
+ A->ref = slang_ref_forbid;
+ break;
+ default:
+ return GL_FALSE;
+ }
+
+ return GL_TRUE;
+}
+
diff --git a/src/mesa/shader/slang/slang_assemble.h b/src/mesa/shader/slang/slang_assemble.h
index 0cde845f85..f1aa1360ba 100644
--- a/src/mesa/shader/slang/slang_assemble.h
+++ b/src/mesa/shader/slang/slang_assemble.h
@@ -1,214 +1,214 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#if !defined SLANG_ASSEMBLE_H
-#define SLANG_ASSEMBLE_H
-
-#include "slang_utility.h"
-
-#if defined __cplusplus
-extern "C" {
-#endif
-
-struct slang_operation_;
-
-typedef enum slang_assembly_type_
-{
- /* core */
- slang_asm_none,
- slang_asm_float_copy,
- slang_asm_float_move,
- slang_asm_float_push,
- slang_asm_float_deref,
- slang_asm_float_add,
- slang_asm_float_multiply,
- slang_asm_float_divide,
- slang_asm_float_negate,
- slang_asm_float_less,
- slang_asm_float_equal_exp,
- slang_asm_float_equal_int,
- slang_asm_float_to_int,
- slang_asm_float_sine,
- slang_asm_float_arcsine,
- slang_asm_float_arctan,
- slang_asm_float_power,
- slang_asm_float_log2,
- slang_asm_float_floor,
- slang_asm_float_ceil,
- slang_asm_float_noise1,
- slang_asm_float_noise2,
- slang_asm_float_noise3,
- slang_asm_float_noise4,
- slang_asm_int_copy,
- slang_asm_int_move,
- slang_asm_int_push,
- slang_asm_int_deref,
- slang_asm_int_to_float,
- slang_asm_int_to_addr,
- slang_asm_bool_copy,
- slang_asm_bool_move,
- slang_asm_bool_push,
- slang_asm_bool_deref,
- slang_asm_addr_copy,
- slang_asm_addr_push,
- slang_asm_addr_deref,
- slang_asm_addr_add,
- slang_asm_addr_multiply,
- slang_asm_vec4_tex1d,
- slang_asm_vec4_tex2d,
- slang_asm_vec4_tex3d,
- slang_asm_vec4_texcube,
- slang_asm_vec4_shad1d,
- slang_asm_vec4_shad2d,
- slang_asm_jump,
- slang_asm_jump_if_zero,
- slang_asm_enter,
- slang_asm_leave,
- slang_asm_local_alloc,
- slang_asm_local_free,
- slang_asm_local_addr,
- slang_asm_global_addr,
- slang_asm_call,
- slang_asm_return,
- slang_asm_discard,
- slang_asm_exit,
- /* mesa-specific extensions */
- slang_asm_float_print,
- slang_asm_int_print,
- slang_asm_bool_print,
- slang_asm__last
-} slang_assembly_type;
-
-typedef struct slang_assembly_
-{
- slang_assembly_type type;
- GLfloat literal;
- GLuint param[2];
-} slang_assembly;
-
-typedef struct slang_assembly_file_
-{
- slang_assembly *code;
- GLuint count;
- GLuint capacity;
-} slang_assembly_file;
-
-GLboolean slang_assembly_file_construct (slang_assembly_file *);
-GLvoid slang_assembly_file_destruct (slang_assembly_file *);
-GLboolean slang_assembly_file_push (slang_assembly_file *, slang_assembly_type);
-GLboolean slang_assembly_file_push_label (slang_assembly_file *, slang_assembly_type, GLuint);
-GLboolean slang_assembly_file_push_label2 (slang_assembly_file *, slang_assembly_type, GLuint, GLuint);
-GLboolean slang_assembly_file_push_literal (slang_assembly_file *, slang_assembly_type, GLfloat);
-
-typedef struct slang_assembly_file_restore_point_
-{
- GLuint count;
-} slang_assembly_file_restore_point;
-
-GLboolean slang_assembly_file_restore_point_save (slang_assembly_file *,
- slang_assembly_file_restore_point *);
-GLboolean slang_assembly_file_restore_point_load (slang_assembly_file *,
- slang_assembly_file_restore_point *);
-
-typedef struct slang_assembly_flow_control_
-{
- GLuint loop_start; /* for "continue" statement */
- GLuint loop_end; /* for "break" statement */
- GLuint function_end; /* for "return" statement */
-} slang_assembly_flow_control;
-
-typedef struct slang_assembly_local_info_
-{
- GLuint ret_size;
- GLuint addr_tmp;
- GLuint swizzle_tmp;
-} slang_assembly_local_info;
-
-typedef enum
-{
- slang_ref_force,
- slang_ref_forbid/*,
- slang_ref_freelance*/
-} slang_ref_type;
-
-/*
- * Holds a complete information about vector swizzle - the <swizzle> array contains
- * vector component source indices, where 0 is "x", 1 is "y", 2 is "z" and 3 is "w".
- * Example: "xwz" --> { 3, { 0, 3, 2, not used } }.
- */
-typedef struct slang_swizzle_
-{
- GLuint num_components;
- GLuint swizzle[4];
-} slang_swizzle;
-
-typedef struct slang_assembly_name_space_
-{
- struct slang_function_scope_ *funcs;
- struct slang_struct_scope_ *structs;
- struct slang_variable_scope_ *vars;
-} slang_assembly_name_space;
-
-typedef struct slang_assemble_ctx_
-{
- slang_assembly_file *file;
- struct slang_machine_ *mach;
- slang_atom_pool *atoms;
- slang_assembly_name_space space;
- slang_assembly_flow_control flow;
- slang_assembly_local_info local;
- slang_ref_type ref;
- slang_swizzle swz;
-} slang_assemble_ctx;
-
-struct slang_function_ *_slang_locate_function (struct slang_function_scope_ *funcs, slang_atom name,
- struct slang_operation_ *params, GLuint num_params, slang_assembly_name_space *space,
- slang_atom_pool *);
-
-GLboolean _slang_assemble_function (slang_assemble_ctx *, struct slang_function_ *);
-
-GLboolean _slang_cleanup_stack (slang_assemble_ctx *, struct slang_operation_ *);
-
-GLboolean _slang_dereference (slang_assemble_ctx *, struct slang_operation_ *);
-
-GLboolean _slang_assemble_function_call (slang_assemble_ctx *, struct slang_function_ *,
- struct slang_operation_ *, GLuint, GLboolean);
-
-GLboolean _slang_assemble_function_call_name (slang_assemble_ctx *, const char *,
- struct slang_operation_ *, GLuint, GLboolean);
-
-GLboolean _slang_assemble_operation (slang_assemble_ctx *, struct slang_operation_ *,
- slang_ref_type);
-
-#ifdef __cplusplus
-}
-#endif
-
-#include "slang_assemble_assignment.h"
-#include "slang_assemble_typeinfo.h"
-#include "slang_assemble_constructor.h"
-#include "slang_assemble_conditional.h"
-
-#endif
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#if !defined SLANG_ASSEMBLE_H
+#define SLANG_ASSEMBLE_H
+
+#include "slang_utility.h"
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+struct slang_operation_;
+
+typedef enum slang_assembly_type_
+{
+ /* core */
+ slang_asm_none,
+ slang_asm_float_copy,
+ slang_asm_float_move,
+ slang_asm_float_push,
+ slang_asm_float_deref,
+ slang_asm_float_add,
+ slang_asm_float_multiply,
+ slang_asm_float_divide,
+ slang_asm_float_negate,
+ slang_asm_float_less,
+ slang_asm_float_equal_exp,
+ slang_asm_float_equal_int,
+ slang_asm_float_to_int,
+ slang_asm_float_sine,
+ slang_asm_float_arcsine,
+ slang_asm_float_arctan,
+ slang_asm_float_power,
+ slang_asm_float_log2,
+ slang_asm_float_floor,
+ slang_asm_float_ceil,
+ slang_asm_float_noise1,
+ slang_asm_float_noise2,
+ slang_asm_float_noise3,
+ slang_asm_float_noise4,
+ slang_asm_int_copy,
+ slang_asm_int_move,
+ slang_asm_int_push,
+ slang_asm_int_deref,
+ slang_asm_int_to_float,
+ slang_asm_int_to_addr,
+ slang_asm_bool_copy,
+ slang_asm_bool_move,
+ slang_asm_bool_push,
+ slang_asm_bool_deref,
+ slang_asm_addr_copy,
+ slang_asm_addr_push,
+ slang_asm_addr_deref,
+ slang_asm_addr_add,
+ slang_asm_addr_multiply,
+ slang_asm_vec4_tex1d,
+ slang_asm_vec4_tex2d,
+ slang_asm_vec4_tex3d,
+ slang_asm_vec4_texcube,
+ slang_asm_vec4_shad1d,
+ slang_asm_vec4_shad2d,
+ slang_asm_jump,
+ slang_asm_jump_if_zero,
+ slang_asm_enter,
+ slang_asm_leave,
+ slang_asm_local_alloc,
+ slang_asm_local_free,
+ slang_asm_local_addr,
+ slang_asm_global_addr,
+ slang_asm_call,
+ slang_asm_return,
+ slang_asm_discard,
+ slang_asm_exit,
+ /* mesa-specific extensions */
+ slang_asm_float_print,
+ slang_asm_int_print,
+ slang_asm_bool_print,
+ slang_asm__last
+} slang_assembly_type;
+
+typedef struct slang_assembly_
+{
+ slang_assembly_type type;
+ GLfloat literal;
+ GLuint param[2];
+} slang_assembly;
+
+typedef struct slang_assembly_file_
+{
+ slang_assembly *code;
+ GLuint count;
+ GLuint capacity;
+} slang_assembly_file;
+
+GLboolean slang_assembly_file_construct (slang_assembly_file *);
+GLvoid slang_assembly_file_destruct (slang_assembly_file *);
+GLboolean slang_assembly_file_push (slang_assembly_file *, slang_assembly_type);
+GLboolean slang_assembly_file_push_label (slang_assembly_file *, slang_assembly_type, GLuint);
+GLboolean slang_assembly_file_push_label2 (slang_assembly_file *, slang_assembly_type, GLuint, GLuint);
+GLboolean slang_assembly_file_push_literal (slang_assembly_file *, slang_assembly_type, GLfloat);
+
+typedef struct slang_assembly_file_restore_point_
+{
+ GLuint count;
+} slang_assembly_file_restore_point;
+
+GLboolean slang_assembly_file_restore_point_save (slang_assembly_file *,
+ slang_assembly_file_restore_point *);
+GLboolean slang_assembly_file_restore_point_load (slang_assembly_file *,
+ slang_assembly_file_restore_point *);
+
+typedef struct slang_assembly_flow_control_
+{
+ GLuint loop_start; /* for "continue" statement */
+ GLuint loop_end; /* for "break" statement */
+ GLuint function_end; /* for "return" statement */
+} slang_assembly_flow_control;
+
+typedef struct slang_assembly_local_info_
+{
+ GLuint ret_size;
+ GLuint addr_tmp;
+ GLuint swizzle_tmp;
+} slang_assembly_local_info;
+
+typedef enum
+{
+ slang_ref_force,
+ slang_ref_forbid/*,
+ slang_ref_freelance*/
+} slang_ref_type;
+
+/*
+ * Holds a complete information about vector swizzle - the <swizzle> array contains
+ * vector component source indices, where 0 is "x", 1 is "y", 2 is "z" and 3 is "w".
+ * Example: "xwz" --> { 3, { 0, 3, 2, not used } }.
+ */
+typedef struct slang_swizzle_
+{
+ GLuint num_components;
+ GLuint swizzle[4];
+} slang_swizzle;
+
+typedef struct slang_assembly_name_space_
+{
+ struct slang_function_scope_ *funcs;
+ struct slang_struct_scope_ *structs;
+ struct slang_variable_scope_ *vars;
+} slang_assembly_name_space;
+
+typedef struct slang_assemble_ctx_
+{
+ slang_assembly_file *file;
+ struct slang_machine_ *mach;
+ slang_atom_pool *atoms;
+ slang_assembly_name_space space;
+ slang_assembly_flow_control flow;
+ slang_assembly_local_info local;
+ slang_ref_type ref;
+ slang_swizzle swz;
+} slang_assemble_ctx;
+
+struct slang_function_ *_slang_locate_function (struct slang_function_scope_ *funcs, slang_atom name,
+ struct slang_operation_ *params, GLuint num_params, slang_assembly_name_space *space,
+ slang_atom_pool *);
+
+GLboolean _slang_assemble_function (slang_assemble_ctx *, struct slang_function_ *);
+
+GLboolean _slang_cleanup_stack (slang_assemble_ctx *, struct slang_operation_ *);
+
+GLboolean _slang_dereference (slang_assemble_ctx *, struct slang_operation_ *);
+
+GLboolean _slang_assemble_function_call (slang_assemble_ctx *, struct slang_function_ *,
+ struct slang_operation_ *, GLuint, GLboolean);
+
+GLboolean _slang_assemble_function_call_name (slang_assemble_ctx *, const char *,
+ struct slang_operation_ *, GLuint, GLboolean);
+
+GLboolean _slang_assemble_operation (slang_assemble_ctx *, struct slang_operation_ *,
+ slang_ref_type);
+
+#ifdef __cplusplus
+}
+#endif
+
+#include "slang_assemble_assignment.h"
+#include "slang_assemble_typeinfo.h"
+#include "slang_assemble_constructor.h"
+#include "slang_assemble_conditional.h"
+
+#endif
+
diff --git a/src/mesa/shader/slang/slang_assemble_assignment.c b/src/mesa/shader/slang/slang_assemble_assignment.c
index 868724ed3e..2f4cb1423f 100644
--- a/src/mesa/shader/slang/slang_assemble_assignment.c
+++ b/src/mesa/shader/slang/slang_assemble_assignment.c
@@ -1,194 +1,194 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_assemble_assignment.c
- * slang assignment expressions assembler
- * \author Michal Krol
- */
-
-#include "imports.h"
-#include "slang_assemble.h"
-#include "slang_storage.h"
-
-/*
- * _slang_assemble_assignment()
- *
- * Copies values on the stack (<component 0> to <component N-1>) to a memory
- * location pointed by <addr of variable>.
- *
- * in:
- * +------------------+
- * | addr of variable |
- * +------------------+
- * | component N-1 |
- * | ... |
- * | component 0 |
- * +------------------+
- *
- * out:
- * +------------------+
- * | addr of variable |
- * +------------------+
- */
-
-static GLboolean assign_aggregate (slang_assemble_ctx *A, const slang_storage_aggregate *agg,
- GLuint *index, GLuint size)
-{
- GLuint i;
-
- for (i = 0; i < agg->count; i++)
- {
- const slang_storage_array *arr = &agg->arrays[i];
- GLuint j;
-
- for (j = 0; j < arr->length; j++)
- {
- if (arr->type == slang_stor_aggregate)
- {
- if (!assign_aggregate (A, arr->aggregate, index, size))
- return GL_FALSE;
- }
- else
- {
- GLuint dst_addr_loc, dst_offset;
- slang_assembly_type ty;
-
- /* calculate the distance from top of the stack to the destination address */
- dst_addr_loc = size - *index;
-
- /* calculate the offset within destination variable to write */
- if (A->swz.num_components != 0)
- {
- /* swizzle the index to get the actual offset */
- dst_offset = A->swz.swizzle[*index / 4] * 4;
- }
- else
- {
- /* no swizzling - write sequentially */
- dst_offset = *index;
- }
-
- switch (arr->type)
- {
- case slang_stor_bool:
- ty = slang_asm_bool_copy;
- break;
- case slang_stor_int:
- ty = slang_asm_int_copy;
- break;
- case slang_stor_float:
- ty = slang_asm_float_copy;
- break;
- default:
- break;
- }
- if (!slang_assembly_file_push_label2 (A->file, ty, dst_addr_loc, dst_offset))
- return GL_FALSE;
-
- *index += 4;
- }
- }
- }
-
- return GL_TRUE;
-}
-
-GLboolean _slang_assemble_assignment (slang_assemble_ctx *A, slang_operation *op)
-{
- slang_assembly_typeinfo ti;
- GLboolean result = GL_FALSE;
- slang_storage_aggregate agg;
- GLuint index, size;
-
- if (!slang_assembly_typeinfo_construct (&ti))
- return GL_FALSE;
- if (!_slang_typeof_operation (A, op, &ti))
- goto end1;
-
- if (!slang_storage_aggregate_construct (&agg))
- goto end1;
- if (!_slang_aggregate_variable (&agg, &ti.spec, 0, A->space.funcs, A->space.structs,
- A->space.vars, A->mach, A->file, A->atoms))
- goto end;
-
- index = 0;
- size = _slang_sizeof_aggregate (&agg);
- result = assign_aggregate (A, &agg, &index, size);
-
-end1:
- slang_storage_aggregate_destruct (&agg);
-end:
- slang_assembly_typeinfo_destruct (&ti);
- return result;
-}
-
-/*
- * _slang_assemble_assign()
- *
- * Performs unary (pre ++ and --) or binary (=, +=, -=, *=, /=) assignment on the operation's
- * children.
- */
-
-GLboolean _slang_assemble_assign (slang_assemble_ctx *A, slang_operation *op, const char *oper,
- slang_ref_type ref)
-{
- slang_swizzle swz;
-
- if (ref == slang_ref_forbid)
- {
- if (!slang_assembly_file_push_label2 (A->file, slang_asm_local_addr, A->local.addr_tmp, 4))
- return GL_FALSE;
- }
-
- if (slang_string_compare ("=", oper) == 0)
- {
- if (!_slang_assemble_operation (A, &op->children[0], slang_ref_force))
- return GL_FALSE;
- swz = A->swz;
- if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid))
- return GL_FALSE;
- A->swz = swz;
- if (!_slang_assemble_assignment (A, op->children))
- return GL_FALSE;
- }
- else
- {
- if (!_slang_assemble_function_call_name (A, oper, op->children, op->num_children, GL_TRUE))
- return GL_FALSE;
- }
-
- if (ref == slang_ref_forbid)
- {
- if (!slang_assembly_file_push (A->file, slang_asm_addr_copy))
- return GL_FALSE;
- if (!slang_assembly_file_push_label (A->file, slang_asm_local_free, 4))
- return GL_FALSE;
- if (!_slang_dereference (A, op->children))
- return GL_FALSE;
- }
-
- return GL_TRUE;
-}
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file slang_assemble_assignment.c
+ * slang assignment expressions assembler
+ * \author Michal Krol
+ */
+
+#include "imports.h"
+#include "slang_assemble.h"
+#include "slang_storage.h"
+
+/*
+ * _slang_assemble_assignment()
+ *
+ * Copies values on the stack (<component 0> to <component N-1>) to a memory
+ * location pointed by <addr of variable>.
+ *
+ * in:
+ * +------------------+
+ * | addr of variable |
+ * +------------------+
+ * | component N-1 |
+ * | ... |
+ * | component 0 |
+ * +------------------+
+ *
+ * out:
+ * +------------------+
+ * | addr of variable |
+ * +------------------+
+ */
+
+static GLboolean assign_aggregate (slang_assemble_ctx *A, const slang_storage_aggregate *agg,
+ GLuint *index, GLuint size)
+{
+ GLuint i;
+
+ for (i = 0; i < agg->count; i++)
+ {
+ const slang_storage_array *arr = &agg->arrays[i];
+ GLuint j;
+
+ for (j = 0; j < arr->length; j++)
+ {
+ if (arr->type == slang_stor_aggregate)
+ {
+ if (!assign_aggregate (A, arr->aggregate, index, size))
+ return GL_FALSE;
+ }
+ else
+ {
+ GLuint dst_addr_loc, dst_offset;
+ slang_assembly_type ty;
+
+ /* calculate the distance from top of the stack to the destination address */
+ dst_addr_loc = size - *index;
+
+ /* calculate the offset within destination variable to write */
+ if (A->swz.num_components != 0)
+ {
+ /* swizzle the index to get the actual offset */
+ dst_offset = A->swz.swizzle[*index / 4] * 4;
+ }
+ else
+ {
+ /* no swizzling - write sequentially */
+ dst_offset = *index;
+ }
+
+ switch (arr->type)
+ {
+ case slang_stor_bool:
+ ty = slang_asm_bool_copy;
+ break;
+ case slang_stor_int:
+ ty = slang_asm_int_copy;
+ break;
+ case slang_stor_float:
+ ty = slang_asm_float_copy;
+ break;
+ default:
+ break;
+ }
+ if (!slang_assembly_file_push_label2 (A->file, ty, dst_addr_loc, dst_offset))
+ return GL_FALSE;
+
+ *index += 4;
+ }
+ }
+ }
+
+ return GL_TRUE;
+}
+
+GLboolean _slang_assemble_assignment (slang_assemble_ctx *A, slang_operation *op)
+{
+ slang_assembly_typeinfo ti;
+ GLboolean result = GL_FALSE;
+ slang_storage_aggregate agg;
+ GLuint index, size;
+
+ if (!slang_assembly_typeinfo_construct (&ti))
+ return GL_FALSE;
+ if (!_slang_typeof_operation (A, op, &ti))
+ goto end1;
+
+ if (!slang_storage_aggregate_construct (&agg))
+ goto end1;
+ if (!_slang_aggregate_variable (&agg, &ti.spec, 0, A->space.funcs, A->space.structs,
+ A->space.vars, A->mach, A->file, A->atoms))
+ goto end;
+
+ index = 0;
+ size = _slang_sizeof_aggregate (&agg);
+ result = assign_aggregate (A, &agg, &index, size);
+
+end1:
+ slang_storage_aggregate_destruct (&agg);
+end:
+ slang_assembly_typeinfo_destruct (&ti);
+ return result;
+}
+
+/*
+ * _slang_assemble_assign()
+ *
+ * Performs unary (pre ++ and --) or binary (=, +=, -=, *=, /=) assignment on the operation's
+ * children.
+ */
+
+GLboolean _slang_assemble_assign (slang_assemble_ctx *A, slang_operation *op, const char *oper,
+ slang_ref_type ref)
+{
+ slang_swizzle swz;
+
+ if (ref == slang_ref_forbid)
+ {
+ if (!slang_assembly_file_push_label2 (A->file, slang_asm_local_addr, A->local.addr_tmp, 4))
+ return GL_FALSE;
+ }
+
+ if (slang_string_compare ("=", oper) == 0)
+ {
+ if (!_slang_assemble_operation (A, &op->children[0], slang_ref_force))
+ return GL_FALSE;
+ swz = A->swz;
+ if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid))
+ return GL_FALSE;
+ A->swz = swz;
+ if (!_slang_assemble_assignment (A, op->children))
+ return GL_FALSE;
+ }
+ else
+ {
+ if (!_slang_assemble_function_call_name (A, oper, op->children, op->num_children, GL_TRUE))
+ return GL_FALSE;
+ }
+
+ if (ref == slang_ref_forbid)
+ {
+ if (!slang_assembly_file_push (A->file, slang_asm_addr_copy))
+ return GL_FALSE;
+ if (!slang_assembly_file_push_label (A->file, slang_asm_local_free, 4))
+ return GL_FALSE;
+ if (!_slang_dereference (A, op->children))
+ return GL_FALSE;
+ }
+
+ return GL_TRUE;
+}
+
diff --git a/src/mesa/shader/slang/slang_assemble_assignment.h b/src/mesa/shader/slang/slang_assemble_assignment.h
index 111459be92..7b993b543b 100644
--- a/src/mesa/shader/slang/slang_assemble_assignment.h
+++ b/src/mesa/shader/slang/slang_assemble_assignment.h
@@ -1,42 +1,42 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#if !defined SLANG_ASSEMBLE_ASSIGNMENT_H
-#define SLANG_ASSEMBLE_ASSIGNMENT_H
-
-#if defined __cplusplus
-extern "C" {
-#endif
-
-GLboolean _slang_assemble_assignment (slang_assemble_ctx *, struct slang_operation_ *);
-
-GLboolean _slang_assemble_assign (slang_assemble_ctx *, struct slang_operation_ *, const char *,
- slang_ref_type);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#if !defined SLANG_ASSEMBLE_ASSIGNMENT_H
+#define SLANG_ASSEMBLE_ASSIGNMENT_H
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+GLboolean _slang_assemble_assignment (slang_assemble_ctx *, struct slang_operation_ *);
+
+GLboolean _slang_assemble_assign (slang_assemble_ctx *, struct slang_operation_ *, const char *,
+ slang_ref_type);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/src/mesa/shader/slang/slang_assemble_conditional.c b/src/mesa/shader/slang/slang_assemble_conditional.c
index b29d0cf30c..f3400e8753 100644
--- a/src/mesa/shader/slang/slang_assemble_conditional.c
+++ b/src/mesa/shader/slang/slang_assemble_conditional.c
@@ -1,448 +1,448 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_assemble_conditional.c
- * slang condtional expressions assembler
- * \author Michal Krol
- */
-
-#include "imports.h"
-#include "slang_assemble.h"
-#include "slang_compile.h"
-
-/*
- * _slang_assemble_logicaland()
- *
- * and:
- * <left-expression>
- * jumpz zero
- * <right-expression>
- * jump end
- * zero:
- * push 0
- * end:
- */
-
-GLboolean _slang_assemble_logicaland (slang_assemble_ctx *A, slang_operation *op)
-{
- GLuint zero_jump, end_jump;
-
- /* evaluate left expression */
- if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid))
- return GL_FALSE;
-
- /* jump to pushing 0 if not true */
- zero_jump = A->file->count;
- if (!slang_assembly_file_push (A->file, slang_asm_jump_if_zero))
- return GL_FALSE;
-
- /* evaluate right expression */
- if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid))
- return GL_FALSE;
-
- /* jump to the end of the expression */
- end_jump = A->file->count;
- if (!slang_assembly_file_push (A->file, slang_asm_jump))
- return GL_FALSE;
-
- /* push 0 on stack */
- A->file->code[zero_jump].param[0] = A->file->count;
- if (!slang_assembly_file_push_literal (A->file, slang_asm_bool_push, (GLfloat) 0))
- return GL_FALSE;
-
- /* the end of the expression */
- A->file->code[end_jump].param[0] = A->file->count;
-
- return GL_TRUE;
-}
-
-/*
- * _slang_assemble_logicalor()
- *
- * or:
- * <left-expression>
- * jumpz right
- * push 1
- * jump end
- * right:
- * <right-expression>
- * end:
- */
-
-GLboolean _slang_assemble_logicalor (slang_assemble_ctx *A, slang_operation *op)
-{
- GLuint right_jump, end_jump;
-
- /* evaluate left expression */
- if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid))
- return GL_FALSE;
-
- /* jump to evaluation of right expression if not true */
- right_jump = A->file->count;
- if (!slang_assembly_file_push (A->file, slang_asm_jump_if_zero))
- return GL_FALSE;
-
- /* push 1 on stack */
- if (!slang_assembly_file_push_literal (A->file, slang_asm_bool_push, (GLfloat) 1))
- return GL_FALSE;
-
- /* jump to the end of the expression */
- end_jump = A->file->count;
- if (!slang_assembly_file_push (A->file, slang_asm_jump))
- return GL_FALSE;
-
- /* evaluate right expression */
- A->file->code[right_jump].param[0] = A->file->count;
- if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid))
- return GL_FALSE;
-
- /* the end of the expression */
- A->file->code[end_jump].param[0] = A->file->count;
-
- return GL_TRUE;
-}
-
-/*
- * _slang_assemble_select()
- *
- * select:
- * <condition-expression>
- * jumpz false
- * <true-expression>
- * jump end
- * false:
- * <false-expression>
- * end:
- */
-
-GLboolean _slang_assemble_select (slang_assemble_ctx *A, slang_operation *op)
-{
- GLuint cond_jump, end_jump;
-
- /* execute condition expression */
- if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid))
- return GL_FALSE;
-
- /* jump to false expression if not true */
- cond_jump = A->file->count;
- if (!slang_assembly_file_push (A->file, slang_asm_jump_if_zero))
- return GL_FALSE;
-
- /* execute true expression */
- if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid))
- return GL_FALSE;
-
- /* jump to the end of the expression */
- end_jump = A->file->count;
- if (!slang_assembly_file_push (A->file, slang_asm_jump))
- return GL_FALSE;
-
- /* resolve false point */
- A->file->code[cond_jump].param[0] = A->file->count;
-
- /* execute false expression */
- if (!_slang_assemble_operation (A, &op->children[2], slang_ref_forbid))
- return GL_FALSE;
-
- /* resolve the end of the expression */
- A->file->code[end_jump].param[0] = A->file->count;
-
- return GL_TRUE;
-}
-
-/*
- * _slang_assemble_for()
- *
- * for:
- * <init-statement>
- * jump start
- * break:
- * jump end
- * continue:
- * <loop-increment>
- * start:
- * <condition-statement>
- * jumpz end
- * <loop-body>
- * jump continue
- * end:
- */
-
-GLboolean _slang_assemble_for (slang_assemble_ctx *A, slang_operation *op)
-{
- GLuint start_jump, end_jump, cond_jump;
- GLuint break_label, cont_label;
- slang_assembly_flow_control save_flow = A->flow;
-
- /* execute initialization statement */
- if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid/*slang_ref_freelance*/))
- return GL_FALSE;
- if (!_slang_cleanup_stack (A, &op->children[0]))
- return GL_FALSE;
-
- /* skip the "go to the end of the loop" and loop-increment statements */
- start_jump = A->file->count;
- if (!slang_assembly_file_push (A->file, slang_asm_jump))
- return GL_FALSE;
-
- /* go to the end of the loop - break statements are directed here */
- break_label = A->file->count;
- end_jump = A->file->count;
- if (!slang_assembly_file_push (A->file, slang_asm_jump))
- return GL_FALSE;
-
- /* resolve the beginning of the loop - continue statements are directed here */
- cont_label = A->file->count;
-
- /* execute loop-increment statement */
- if (!_slang_assemble_operation (A, &op->children[2], slang_ref_forbid/*slang_ref_freelance*/))
- return GL_FALSE;
- if (!_slang_cleanup_stack (A, &op->children[2]))
- return GL_FALSE;
-
- /* resolve the condition point */
- A->file->code[start_jump].param[0] = A->file->count;
-
- /* execute condition statement */
- if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid))
- return GL_FALSE;
-
- /* jump to the end of the loop if not true */
- cond_jump = A->file->count;
- if (!slang_assembly_file_push (A->file, slang_asm_jump_if_zero))
- return GL_FALSE;
-
- /* execute loop body */
- A->flow.loop_start = cont_label;
- A->flow.loop_end = break_label;
- if (!_slang_assemble_operation (A, &op->children[3], slang_ref_forbid/*slang_ref_freelance*/))
- return GL_FALSE;
- if (!_slang_cleanup_stack (A, &op->children[3]))
- return GL_FALSE;
- A->flow = save_flow;
-
- /* go to the beginning of the loop */
- if (!slang_assembly_file_push_label (A->file, slang_asm_jump, cont_label))
- return GL_FALSE;
-
- /* resolve the end of the loop */
- A->file->code[end_jump].param[0] = A->file->count;
- A->file->code[cond_jump].param[0] = A->file->count;
-
- return GL_TRUE;
-}
-
-/*
- * _slang_assemble_do()
- *
- * do:
- * jump start
- * break:
- * jump end
- * continue:
- * jump condition
- * start:
- * <loop-body>
- * condition:
- * <condition-statement>
- * jumpz end
- * jump start
- * end:
- */
-
-GLboolean _slang_assemble_do (slang_assemble_ctx *A, slang_operation *op)
-{
- GLuint skip_jump, end_jump, cont_jump, cond_jump;
- GLuint break_label, cont_label;
- slang_assembly_flow_control save_flow = A->flow;
-
- /* skip the "go to the end of the loop" and "go to condition" statements */
- skip_jump = A->file->count;
- if (!slang_assembly_file_push (A->file, slang_asm_jump))
- return GL_FALSE;
-
- /* go to the end of the loop - break statements are directed here */
- break_label = A->file->count;
- end_jump = A->file->count;
- if (!slang_assembly_file_push (A->file, slang_asm_jump))
- return GL_FALSE;
-
- /* go to condition - continue statements are directed here */
- cont_label = A->file->count;
- cont_jump = A->file->count;
- if (!slang_assembly_file_push (A->file, slang_asm_jump))
- return GL_FALSE;
-
- /* resolve the beginning of the loop */
- A->file->code[skip_jump].param[0] = A->file->count;
-
- /* execute loop body */
- A->flow.loop_start = cont_label;
- A->flow.loop_end = break_label;
- if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid/*slang_ref_freelance*/))
- return GL_FALSE;
- if (!_slang_cleanup_stack (A, &op->children[0]))
- return GL_FALSE;
- A->flow = save_flow;
-
- /* resolve condition point */
- A->file->code[cont_jump].param[0] = A->file->count;
-
- /* execute condition statement */
- if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid))
- return GL_FALSE;
-
- /* jump to the end of the loop if not true */
- cond_jump = A->file->count;
- if (!slang_assembly_file_push (A->file, slang_asm_jump_if_zero))
- return GL_FALSE;
-
- /* jump to the beginning of the loop */
- if (!slang_assembly_file_push_label (A->file, slang_asm_jump, A->file->code[skip_jump].param[0]))
- return GL_FALSE;
-
- /* resolve the end of the loop */
- A->file->code[end_jump].param[0] = A->file->count;
- A->file->code[cond_jump].param[0] = A->file->count;
-
- return GL_TRUE;
-}
-
-/*
- * _slang_assemble_while()
- *
- * while:
- * jump continue
- * break:
- * jump end
- * continue:
- * <condition-statement>
- * jumpz end
- * <loop-body>
- * jump continue
- * end:
- */
-
-GLboolean _slang_assemble_while (slang_assemble_ctx *A, slang_operation *op)
-{
- GLuint skip_jump, end_jump, cond_jump;
- GLuint break_label;
- slang_assembly_flow_control save_flow = A->flow;
-
- /* skip the "go to the end of the loop" statement */
- skip_jump = A->file->count;
- if (!slang_assembly_file_push (A->file, slang_asm_jump))
- return GL_FALSE;
-
- /* go to the end of the loop - break statements are directed here */
- break_label = A->file->count;
- end_jump = A->file->count;
- if (!slang_assembly_file_push (A->file, slang_asm_jump))
- return GL_FALSE;
-
- /* resolve the beginning of the loop - continue statements are directed here */
- A->file->code[skip_jump].param[0] = A->file->count;
-
- /* execute condition statement */
- if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid))
- return GL_FALSE;
-
- /* jump to the end of the loop if not true */
- cond_jump = A->file->count;
- if (!slang_assembly_file_push (A->file, slang_asm_jump_if_zero))
- return GL_FALSE;
-
- /* execute loop body */
- A->flow.loop_start = A->file->code[skip_jump].param[0];
- A->flow.loop_end = break_label;
- if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid/*slang_ref_freelance*/))
- return GL_FALSE;
- if (!_slang_cleanup_stack (A, &op->children[1]))
- return GL_FALSE;
- A->flow = save_flow;
-
- /* jump to the beginning of the loop */
- if (!slang_assembly_file_push_label (A->file, slang_asm_jump, A->file->code[skip_jump].param[0]))
- return GL_FALSE;
-
- /* resolve the end of the loop */
- A->file->code[end_jump].param[0] = A->file->count;
- A->file->code[cond_jump].param[0] = A->file->count;
-
- return GL_TRUE;
-}
-
-/*
- * _slang_assemble_if()
- *
- * if:
- * <condition-statement>
- * jumpz else
- * <true-statement>
- * jump end
- * else:
- * <false-statement>
- * end:
- */
-
-GLboolean _slang_assemble_if (slang_assemble_ctx *A, slang_operation *op)
-{
- GLuint cond_jump, else_jump;
-
- /* execute condition statement */
- if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid))
- return GL_FALSE;
-
- /* jump to false-statement if not true */
- cond_jump = A->file->count;
- if (!slang_assembly_file_push (A->file, slang_asm_jump_if_zero))
- return GL_FALSE;
-
- /* execute true-statement */
- if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid/*slang_ref_freelance*/))
- return GL_FALSE;
- if (!_slang_cleanup_stack (A, &op->children[1]))
- return GL_FALSE;
-
- /* skip if-false statement */
- else_jump = A->file->count;
- if (!slang_assembly_file_push (A->file, slang_asm_jump))
- return GL_FALSE;
-
- /* resolve start of false-statement */
- A->file->code[cond_jump].param[0] = A->file->count;
-
- /* execute false-statement */
- if (!_slang_assemble_operation (A, &op->children[2], slang_ref_forbid/*slang_ref_freelance*/))
- return GL_FALSE;
- if (!_slang_cleanup_stack (A, &op->children[2]))
- return GL_FALSE;
-
- /* resolve end of if-false statement */
- A->file->code[else_jump].param[0] = A->file->count;
-
- return GL_TRUE;
-}
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file slang_assemble_conditional.c
+ * slang condtional expressions assembler
+ * \author Michal Krol
+ */
+
+#include "imports.h"
+#include "slang_assemble.h"
+#include "slang_compile.h"
+
+/*
+ * _slang_assemble_logicaland()
+ *
+ * and:
+ * <left-expression>
+ * jumpz zero
+ * <right-expression>
+ * jump end
+ * zero:
+ * push 0
+ * end:
+ */
+
+GLboolean _slang_assemble_logicaland (slang_assemble_ctx *A, slang_operation *op)
+{
+ GLuint zero_jump, end_jump;
+
+ /* evaluate left expression */
+ if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid))
+ return GL_FALSE;
+
+ /* jump to pushing 0 if not true */
+ zero_jump = A->file->count;
+ if (!slang_assembly_file_push (A->file, slang_asm_jump_if_zero))
+ return GL_FALSE;
+
+ /* evaluate right expression */
+ if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid))
+ return GL_FALSE;
+
+ /* jump to the end of the expression */
+ end_jump = A->file->count;
+ if (!slang_assembly_file_push (A->file, slang_asm_jump))
+ return GL_FALSE;
+
+ /* push 0 on stack */
+ A->file->code[zero_jump].param[0] = A->file->count;
+ if (!slang_assembly_file_push_literal (A->file, slang_asm_bool_push, (GLfloat) 0))
+ return GL_FALSE;
+
+ /* the end of the expression */
+ A->file->code[end_jump].param[0] = A->file->count;
+
+ return GL_TRUE;
+}
+
+/*
+ * _slang_assemble_logicalor()
+ *
+ * or:
+ * <left-expression>
+ * jumpz right
+ * push 1
+ * jump end
+ * right:
+ * <right-expression>
+ * end:
+ */
+
+GLboolean _slang_assemble_logicalor (slang_assemble_ctx *A, slang_operation *op)
+{
+ GLuint right_jump, end_jump;
+
+ /* evaluate left expression */
+ if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid))
+ return GL_FALSE;
+
+ /* jump to evaluation of right expression if not true */
+ right_jump = A->file->count;
+ if (!slang_assembly_file_push (A->file, slang_asm_jump_if_zero))
+ return GL_FALSE;
+
+ /* push 1 on stack */
+ if (!slang_assembly_file_push_literal (A->file, slang_asm_bool_push, (GLfloat) 1))
+ return GL_FALSE;
+
+ /* jump to the end of the expression */
+ end_jump = A->file->count;
+ if (!slang_assembly_file_push (A->file, slang_asm_jump))
+ return GL_FALSE;
+
+ /* evaluate right expression */
+ A->file->code[right_jump].param[0] = A->file->count;
+ if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid))
+ return GL_FALSE;
+
+ /* the end of the expression */
+ A->file->code[end_jump].param[0] = A->file->count;
+
+ return GL_TRUE;
+}
+
+/*
+ * _slang_assemble_select()
+ *
+ * select:
+ * <condition-expression>
+ * jumpz false
+ * <true-expression>
+ * jump end
+ * false:
+ * <false-expression>
+ * end:
+ */
+
+GLboolean _slang_assemble_select (slang_assemble_ctx *A, slang_operation *op)
+{
+ GLuint cond_jump, end_jump;
+
+ /* execute condition expression */
+ if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid))
+ return GL_FALSE;
+
+ /* jump to false expression if not true */
+ cond_jump = A->file->count;
+ if (!slang_assembly_file_push (A->file, slang_asm_jump_if_zero))
+ return GL_FALSE;
+
+ /* execute true expression */
+ if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid))
+ return GL_FALSE;
+
+ /* jump to the end of the expression */
+ end_jump = A->file->count;
+ if (!slang_assembly_file_push (A->file, slang_asm_jump))
+ return GL_FALSE;
+
+ /* resolve false point */
+ A->file->code[cond_jump].param[0] = A->file->count;
+
+ /* execute false expression */
+ if (!_slang_assemble_operation (A, &op->children[2], slang_ref_forbid))
+ return GL_FALSE;
+
+ /* resolve the end of the expression */
+ A->file->code[end_jump].param[0] = A->file->count;
+
+ return GL_TRUE;
+}
+
+/*
+ * _slang_assemble_for()
+ *
+ * for:
+ * <init-statement>
+ * jump start
+ * break:
+ * jump end
+ * continue:
+ * <loop-increment>
+ * start:
+ * <condition-statement>
+ * jumpz end
+ * <loop-body>
+ * jump continue
+ * end:
+ */
+
+GLboolean _slang_assemble_for (slang_assemble_ctx *A, slang_operation *op)
+{
+ GLuint start_jump, end_jump, cond_jump;
+ GLuint break_label, cont_label;
+ slang_assembly_flow_control save_flow = A->flow;
+
+ /* execute initialization statement */
+ if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid/*slang_ref_freelance*/))
+ return GL_FALSE;
+ if (!_slang_cleanup_stack (A, &op->children[0]))
+ return GL_FALSE;
+
+ /* skip the "go to the end of the loop" and loop-increment statements */
+ start_jump = A->file->count;
+ if (!slang_assembly_file_push (A->file, slang_asm_jump))
+ return GL_FALSE;
+
+ /* go to the end of the loop - break statements are directed here */
+ break_label = A->file->count;
+ end_jump = A->file->count;
+ if (!slang_assembly_file_push (A->file, slang_asm_jump))
+ return GL_FALSE;
+
+ /* resolve the beginning of the loop - continue statements are directed here */
+ cont_label = A->file->count;
+
+ /* execute loop-increment statement */
+ if (!_slang_assemble_operation (A, &op->children[2], slang_ref_forbid/*slang_ref_freelance*/))
+ return GL_FALSE;
+ if (!_slang_cleanup_stack (A, &op->children[2]))
+ return GL_FALSE;
+
+ /* resolve the condition point */
+ A->file->code[start_jump].param[0] = A->file->count;
+
+ /* execute condition statement */
+ if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid))
+ return GL_FALSE;
+
+ /* jump to the end of the loop if not true */
+ cond_jump = A->file->count;
+ if (!slang_assembly_file_push (A->file, slang_asm_jump_if_zero))
+ return GL_FALSE;
+
+ /* execute loop body */
+ A->flow.loop_start = cont_label;
+ A->flow.loop_end = break_label;
+ if (!_slang_assemble_operation (A, &op->children[3], slang_ref_forbid/*slang_ref_freelance*/))
+ return GL_FALSE;
+ if (!_slang_cleanup_stack (A, &op->children[3]))
+ return GL_FALSE;
+ A->flow = save_flow;
+
+ /* go to the beginning of the loop */
+ if (!slang_assembly_file_push_label (A->file, slang_asm_jump, cont_label))
+ return GL_FALSE;
+
+ /* resolve the end of the loop */
+ A->file->code[end_jump].param[0] = A->file->count;
+ A->file->code[cond_jump].param[0] = A->file->count;
+
+ return GL_TRUE;
+}
+
+/*
+ * _slang_assemble_do()
+ *
+ * do:
+ * jump start
+ * break:
+ * jump end
+ * continue:
+ * jump condition
+ * start:
+ * <loop-body>
+ * condition:
+ * <condition-statement>
+ * jumpz end
+ * jump start
+ * end:
+ */
+
+GLboolean _slang_assemble_do (slang_assemble_ctx *A, slang_operation *op)
+{
+ GLuint skip_jump, end_jump, cont_jump, cond_jump;
+ GLuint break_label, cont_label;
+ slang_assembly_flow_control save_flow = A->flow;
+
+ /* skip the "go to the end of the loop" and "go to condition" statements */
+ skip_jump = A->file->count;
+ if (!slang_assembly_file_push (A->file, slang_asm_jump))
+ return GL_FALSE;
+
+ /* go to the end of the loop - break statements are directed here */
+ break_label = A->file->count;
+ end_jump = A->file->count;
+ if (!slang_assembly_file_push (A->file, slang_asm_jump))
+ return GL_FALSE;
+
+ /* go to condition - continue statements are directed here */
+ cont_label = A->file->count;
+ cont_jump = A->file->count;
+ if (!slang_assembly_file_push (A->file, slang_asm_jump))
+ return GL_FALSE;
+
+ /* resolve the beginning of the loop */
+ A->file->code[skip_jump].param[0] = A->file->count;
+
+ /* execute loop body */
+ A->flow.loop_start = cont_label;
+ A->flow.loop_end = break_label;
+ if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid/*slang_ref_freelance*/))
+ return GL_FALSE;
+ if (!_slang_cleanup_stack (A, &op->children[0]))
+ return GL_FALSE;
+ A->flow = save_flow;
+
+ /* resolve condition point */
+ A->file->code[cont_jump].param[0] = A->file->count;
+
+ /* execute condition statement */
+ if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid))
+ return GL_FALSE;
+
+ /* jump to the end of the loop if not true */
+ cond_jump = A->file->count;
+ if (!slang_assembly_file_push (A->file, slang_asm_jump_if_zero))
+ return GL_FALSE;
+
+ /* jump to the beginning of the loop */
+ if (!slang_assembly_file_push_label (A->file, slang_asm_jump, A->file->code[skip_jump].param[0]))
+ return GL_FALSE;
+
+ /* resolve the end of the loop */
+ A->file->code[end_jump].param[0] = A->file->count;
+ A->file->code[cond_jump].param[0] = A->file->count;
+
+ return GL_TRUE;
+}
+
+/*
+ * _slang_assemble_while()
+ *
+ * while:
+ * jump continue
+ * break:
+ * jump end
+ * continue:
+ * <condition-statement>
+ * jumpz end
+ * <loop-body>
+ * jump continue
+ * end:
+ */
+
+GLboolean _slang_assemble_while (slang_assemble_ctx *A, slang_operation *op)
+{
+ GLuint skip_jump, end_jump, cond_jump;
+ GLuint break_label;
+ slang_assembly_flow_control save_flow = A->flow;
+
+ /* skip the "go to the end of the loop" statement */
+ skip_jump = A->file->count;
+ if (!slang_assembly_file_push (A->file, slang_asm_jump))
+ return GL_FALSE;
+
+ /* go to the end of the loop - break statements are directed here */
+ break_label = A->file->count;
+ end_jump = A->file->count;
+ if (!slang_assembly_file_push (A->file, slang_asm_jump))
+ return GL_FALSE;
+
+ /* resolve the beginning of the loop - continue statements are directed here */
+ A->file->code[skip_jump].param[0] = A->file->count;
+
+ /* execute condition statement */
+ if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid))
+ return GL_FALSE;
+
+ /* jump to the end of the loop if not true */
+ cond_jump = A->file->count;
+ if (!slang_assembly_file_push (A->file, slang_asm_jump_if_zero))
+ return GL_FALSE;
+
+ /* execute loop body */
+ A->flow.loop_start = A->file->code[skip_jump].param[0];
+ A->flow.loop_end = break_label;
+ if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid/*slang_ref_freelance*/))
+ return GL_FALSE;
+ if (!_slang_cleanup_stack (A, &op->children[1]))
+ return GL_FALSE;
+ A->flow = save_flow;
+
+ /* jump to the beginning of the loop */
+ if (!slang_assembly_file_push_label (A->file, slang_asm_jump, A->file->code[skip_jump].param[0]))
+ return GL_FALSE;
+
+ /* resolve the end of the loop */
+ A->file->code[end_jump].param[0] = A->file->count;
+ A->file->code[cond_jump].param[0] = A->file->count;
+
+ return GL_TRUE;
+}
+
+/*
+ * _slang_assemble_if()
+ *
+ * if:
+ * <condition-statement>
+ * jumpz else
+ * <true-statement>
+ * jump end
+ * else:
+ * <false-statement>
+ * end:
+ */
+
+GLboolean _slang_assemble_if (slang_assemble_ctx *A, slang_operation *op)
+{
+ GLuint cond_jump, else_jump;
+
+ /* execute condition statement */
+ if (!_slang_assemble_operation (A, &op->children[0], slang_ref_forbid))
+ return GL_FALSE;
+
+ /* jump to false-statement if not true */
+ cond_jump = A->file->count;
+ if (!slang_assembly_file_push (A->file, slang_asm_jump_if_zero))
+ return GL_FALSE;
+
+ /* execute true-statement */
+ if (!_slang_assemble_operation (A, &op->children[1], slang_ref_forbid/*slang_ref_freelance*/))
+ return GL_FALSE;
+ if (!_slang_cleanup_stack (A, &op->children[1]))
+ return GL_FALSE;
+
+ /* skip if-false statement */
+ else_jump = A->file->count;
+ if (!slang_assembly_file_push (A->file, slang_asm_jump))
+ return GL_FALSE;
+
+ /* resolve start of false-statement */
+ A->file->code[cond_jump].param[0] = A->file->count;
+
+ /* execute false-statement */
+ if (!_slang_assemble_operation (A, &op->children[2], slang_ref_forbid/*slang_ref_freelance*/))
+ return GL_FALSE;
+ if (!_slang_cleanup_stack (A, &op->children[2]))
+ return GL_FALSE;
+
+ /* resolve end of if-false statement */
+ A->file->code[else_jump].param[0] = A->file->count;
+
+ return GL_TRUE;
+}
+
diff --git a/src/mesa/shader/slang/slang_assemble_conditional.h b/src/mesa/shader/slang/slang_assemble_conditional.h
index ef0c2172c9..ce9e4de6c9 100644
--- a/src/mesa/shader/slang/slang_assemble_conditional.h
+++ b/src/mesa/shader/slang/slang_assemble_conditional.h
@@ -1,51 +1,51 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#if !defined SLANG_ASSEMBLE_CONDITIONAL_H
-#define SLANG_ASSEMBLE_CONDITIONAL_H
-
-#if defined __cplusplus
-extern "C" {
-#endif
-
-GLboolean _slang_assemble_logicaland (slang_assemble_ctx *, struct slang_operation_ *);
-
-GLboolean _slang_assemble_logicalor (slang_assemble_ctx *, struct slang_operation_ *);
-
-GLboolean _slang_assemble_select (slang_assemble_ctx *, struct slang_operation_ *);
-
-GLboolean _slang_assemble_for (slang_assemble_ctx *, struct slang_operation_ *);
-
-GLboolean _slang_assemble_do (slang_assemble_ctx *, struct slang_operation_ *);
-
-GLboolean _slang_assemble_while (slang_assemble_ctx *, struct slang_operation_ *);
-
-GLboolean _slang_assemble_if (slang_assemble_ctx *, struct slang_operation_ *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#if !defined SLANG_ASSEMBLE_CONDITIONAL_H
+#define SLANG_ASSEMBLE_CONDITIONAL_H
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+GLboolean _slang_assemble_logicaland (slang_assemble_ctx *, struct slang_operation_ *);
+
+GLboolean _slang_assemble_logicalor (slang_assemble_ctx *, struct slang_operation_ *);
+
+GLboolean _slang_assemble_select (slang_assemble_ctx *, struct slang_operation_ *);
+
+GLboolean _slang_assemble_for (slang_assemble_ctx *, struct slang_operation_ *);
+
+GLboolean _slang_assemble_do (slang_assemble_ctx *, struct slang_operation_ *);
+
+GLboolean _slang_assemble_while (slang_assemble_ctx *, struct slang_operation_ *);
+
+GLboolean _slang_assemble_if (slang_assemble_ctx *, struct slang_operation_ *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/src/mesa/shader/slang/slang_assemble_constructor.c b/src/mesa/shader/slang/slang_assemble_constructor.c
index ea82e85342..6f02772bcd 100644
--- a/src/mesa/shader/slang/slang_assemble_constructor.c
+++ b/src/mesa/shader/slang/slang_assemble_constructor.c
@@ -1,385 +1,385 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_assemble_constructor.c
- * slang constructor and vector swizzle assembler
- * \author Michal Krol
- */
-
-#include "imports.h"
-#include "slang_assemble.h"
-#include "slang_storage.h"
-
-/* _slang_is_swizzle() */
-
-GLboolean _slang_is_swizzle (const char *field, GLuint rows, slang_swizzle *swz)
-{
- GLuint i;
- GLboolean xyzw = GL_FALSE, rgba = GL_FALSE, stpq = GL_FALSE;
-
- /* the swizzle can be at most 4-component long */
- swz->num_components = slang_string_length (field);
- if (swz->num_components > 4)
- return GL_FALSE;
-
- for (i = 0; i < swz->num_components; i++)
- {
- /* mark which swizzle group is used */
- switch (field[i])
- {
- case 'x':
- case 'y':
- case 'z':
- case 'w':
- xyzw = GL_TRUE;
- break;
- case 'r':
- case 'g':
- case 'b':
- case 'a':
- rgba = GL_TRUE;
- break;
- case 's':
- case 't':
- case 'p':
- case 'q':
- stpq = GL_TRUE;
- break;
- default:
- return GL_FALSE;
- }
-
- /* collect swizzle component */
- switch (field[i])
- {
- case 'x':
- case 'r':
- case 's':
- swz->swizzle[i] = 0;
- break;
- case 'y':
- case 'g':
- case 't':
- swz->swizzle[i] = 1;
- break;
- case 'z':
- case 'b':
- case 'p':
- swz->swizzle[i] = 2;
- break;
- case 'w':
- case 'a':
- case 'q':
- swz->swizzle[i] = 3;
- break;
- }
-
- /* check if the component is valid for given vector's row count */
- if (rows <= swz->swizzle[i])
- return GL_FALSE;
- }
-
- /* only one swizzle group can be used */
- if ((xyzw && rgba) || (xyzw && stpq) || (rgba && stpq))
- return GL_FALSE;
-
- return GL_TRUE;
-}
-
-/* _slang_is_swizzle_mask() */
-
-GLboolean _slang_is_swizzle_mask (const slang_swizzle *swz, GLuint rows)
-{
- GLuint i, c = 0;
-
- /* the swizzle may not be longer than the vector dim */
- if (swz->num_components > rows)
- return GL_FALSE;
-
- /* the swizzle components cannot be duplicated */
- for (i = 0; i < swz->num_components; i++)
- {
- if ((c & (1 << swz->swizzle[i])) != 0)
- return GL_FALSE;
- c |= 1 << swz->swizzle[i];
- }
-
- return GL_TRUE;
-}
-
-/* _slang_multiply_swizzles() */
-
-GLvoid _slang_multiply_swizzles (slang_swizzle *dst, const slang_swizzle *left,
- const slang_swizzle *right)
-{
- GLuint i;
-
- dst->num_components = right->num_components;
- for (i = 0; i < right->num_components; i++)
- dst->swizzle[i] = left->swizzle[right->swizzle[i]];
-}
-
-/* _slang_assemble_constructor() */
-
-static GLboolean sizeof_argument (slang_assemble_ctx *A, GLuint *size, slang_operation *op)
-{
- slang_assembly_typeinfo ti;
- GLboolean result = GL_FALSE;
- slang_storage_aggregate agg, flat_agg;
-
- if (!slang_assembly_typeinfo_construct (&ti))
- return GL_FALSE;
- if (!_slang_typeof_operation (A, op, &ti))
- goto end1;
-
- if (!slang_storage_aggregate_construct (&agg))
- goto end1;
- if (!_slang_aggregate_variable (&agg, &ti.spec, 0, A->space.funcs, A->space.structs,
- A->space.vars, A->mach, A->file, A->atoms))
- goto end2;
-
- if (!slang_storage_aggregate_construct (&flat_agg))
- goto end2;
- if (!_slang_flatten_aggregate (&flat_agg, &agg))
- goto end;
-
- *size = flat_agg.count * 4;
-
- result = GL_TRUE;
-end:
- slang_storage_aggregate_destruct (&flat_agg);
-end2:
- slang_storage_aggregate_destruct (&agg);
-end1:
- slang_assembly_typeinfo_destruct (&ti);
- return result;
-}
-
-static GLboolean constructor_aggregate (slang_assemble_ctx *A, const slang_storage_aggregate *flat,
- slang_operation *op, GLuint garbage_size)
-{
- slang_assembly_typeinfo ti;
- GLboolean result = GL_FALSE;
- slang_storage_aggregate agg, flat_agg;
-
- if (!slang_assembly_typeinfo_construct (&ti))
- return GL_FALSE;
- if (!_slang_typeof_operation (A, op, &ti))
- goto end1;
-
- if (!slang_storage_aggregate_construct (&agg))
- goto end1;
- if (!_slang_aggregate_variable (&agg, &ti.spec, 0, A->space.funcs, A->space.structs,
- A->space.vars, A->mach, A->file, A->atoms))
- goto end2;
-
- if (!slang_storage_aggregate_construct (&flat_agg))
- goto end2;
- if (!_slang_flatten_aggregate (&flat_agg, &agg))
- goto end;
-
- if (!_slang_assemble_operation (A, op, slang_ref_forbid))
- goto end;
-
- /* TODO: convert (generic) elements */
-
- /* free the garbage */
- if (garbage_size != 0)
- {
- GLuint i;
-
- /* move the non-garbage part to the end of the argument */
- if (!slang_assembly_file_push_label (A->file, slang_asm_addr_push, 0))
- goto end;
- for (i = flat_agg.count * 4 - garbage_size; i > 0; i -= 4)
- {
- if (!slang_assembly_file_push_label2 (A->file, slang_asm_float_move,
- garbage_size + i, i))
- {
- goto end;
- }
- }
- if (!slang_assembly_file_push_label (A->file, slang_asm_local_free, garbage_size + 4))
- goto end;
- }
-
- result = GL_TRUE;
-end:
- slang_storage_aggregate_destruct (&flat_agg);
-end2:
- slang_storage_aggregate_destruct (&agg);
-end1:
- slang_assembly_typeinfo_destruct (&ti);
- return result;
-}
-
-GLboolean _slang_assemble_constructor (slang_assemble_ctx *A, slang_operation *op)
-{
- slang_assembly_typeinfo ti;
- GLboolean result = GL_FALSE;
- slang_storage_aggregate agg, flat;
- GLuint size, i;
- GLuint arg_sums[2];
-
- /* get typeinfo of the constructor (the result of constructor expression) */
- if (!slang_assembly_typeinfo_construct (&ti))
- return GL_FALSE;
- if (!_slang_typeof_operation (A, op, &ti))
- goto end1;
-
- /* create an aggregate of the constructor */
- if (!slang_storage_aggregate_construct (&agg))
- goto end1;
- if (!_slang_aggregate_variable (&agg, &ti.spec, 0, A->space.funcs, A->space.structs,
- A->space.vars, A->mach, A->file, A->atoms))
- goto end2;
-
- /* calculate size of the constructor */
- size = _slang_sizeof_aggregate (&agg);
-
- /* flatten the constructor */
- if (!slang_storage_aggregate_construct (&flat))
- goto end2;
- if (!_slang_flatten_aggregate (&flat, &agg))
- goto end;
-
- /* collect the last two constructor's argument size sums */
- arg_sums[0] = 0; /* will hold all but the last argument's size sum */
- arg_sums[1] = 0; /* will hold all argument's size sum */
- for (i = 0; i < op->num_children; i++)
- {
- GLuint arg_size;
-
- if (!sizeof_argument (A, &arg_size, &op->children[i]))
- goto end;
- if (i > 0)
- arg_sums[0] = arg_sums[1];
- arg_sums[1] += arg_size;
- }
-
- /* check if there are too many arguments */
- if (arg_sums[0] >= size)
- {
- /* TODO: info log: too many arguments in constructor list */
- goto end;
- }
-
- /* check if there are too few arguments */
- if (arg_sums[1] < size)
- {
- /* TODO: info log: too few arguments in constructor list */
- goto end;
- }
-
- /* traverse the children that form the constructor expression */
- for (i = op->num_children; i > 0; i--)
- {
- GLuint garbage_size;
-
- /* the last argument may be too big - calculate the unnecessary data size */
- if (i == op->num_children)
- garbage_size = arg_sums[1] - size;
- else
- garbage_size = 0;
-
- if (!constructor_aggregate (A, &flat, &op->children[i - 1], garbage_size))
- goto end;
- }
-
- result = GL_TRUE;
-end:
- slang_storage_aggregate_destruct (&flat);
-end2:
- slang_storage_aggregate_destruct (&agg);
-end1:
- slang_assembly_typeinfo_destruct (&ti);
- return result;
-}
-
-/* _slang_assemble_constructor_from_swizzle() */
-
-GLboolean _slang_assemble_constructor_from_swizzle (slang_assemble_ctx *A, const slang_swizzle *swz,
- slang_type_specifier *spec, slang_type_specifier *master_spec)
-{
- GLuint master_rows, i;
-
- master_rows = _slang_type_dim (master_spec->type);
- for (i = 0; i < master_rows; i++)
- {
- switch (_slang_type_base (master_spec->type))
- {
- case slang_spec_bool:
- if (!slang_assembly_file_push_label2 (A->file, slang_asm_bool_copy,
- (master_rows - i) * 4, i * 4))
- return GL_FALSE;
- break;
- case slang_spec_int:
- if (!slang_assembly_file_push_label2 (A->file, slang_asm_int_copy,
- (master_rows - i) * 4, i * 4))
- return GL_FALSE;
- break;
- case slang_spec_float:
- if (!slang_assembly_file_push_label2 (A->file, slang_asm_float_copy,
- (master_rows - i) * 4, i * 4))
- return GL_FALSE;
- break;
- default:
- break;
- }
- }
- if (!slang_assembly_file_push_label (A->file, slang_asm_local_free, 4))
- return GL_FALSE;
- for (i = swz->num_components; i > 0; i--)
- {
- GLuint n = i - 1;
-
- if (!slang_assembly_file_push_label2 (A->file, slang_asm_local_addr, A->local.swizzle_tmp, 16))
- return GL_FALSE;
- if (!slang_assembly_file_push_label (A->file, slang_asm_addr_push, swz->swizzle[n] * 4))
- return GL_FALSE;
- if (!slang_assembly_file_push (A->file, slang_asm_addr_add))
- return GL_FALSE;
- switch (_slang_type_base (master_spec->type))
- {
- case slang_spec_bool:
- if (!slang_assembly_file_push (A->file, slang_asm_bool_deref))
- return GL_FALSE;
- break;
- case slang_spec_int:
- if (!slang_assembly_file_push (A->file, slang_asm_int_deref))
- return GL_FALSE;
- break;
- case slang_spec_float:
- if (!slang_assembly_file_push (A->file, slang_asm_float_deref))
- return GL_FALSE;
- break;
- default:
- break;
- }
- }
-
- return GL_TRUE;
-}
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file slang_assemble_constructor.c
+ * slang constructor and vector swizzle assembler
+ * \author Michal Krol
+ */
+
+#include "imports.h"
+#include "slang_assemble.h"
+#include "slang_storage.h"
+
+/* _slang_is_swizzle() */
+
+GLboolean _slang_is_swizzle (const char *field, GLuint rows, slang_swizzle *swz)
+{
+ GLuint i;
+ GLboolean xyzw = GL_FALSE, rgba = GL_FALSE, stpq = GL_FALSE;
+
+ /* the swizzle can be at most 4-component long */
+ swz->num_components = slang_string_length (field);
+ if (swz->num_components > 4)
+ return GL_FALSE;
+
+ for (i = 0; i < swz->num_components; i++)
+ {
+ /* mark which swizzle group is used */
+ switch (field[i])
+ {
+ case 'x':
+ case 'y':
+ case 'z':
+ case 'w':
+ xyzw = GL_TRUE;
+ break;
+ case 'r':
+ case 'g':
+ case 'b':
+ case 'a':
+ rgba = GL_TRUE;
+ break;
+ case 's':
+ case 't':
+ case 'p':
+ case 'q':
+ stpq = GL_TRUE;
+ break;
+ default:
+ return GL_FALSE;
+ }
+
+ /* collect swizzle component */
+ switch (field[i])
+ {
+ case 'x':
+ case 'r':
+ case 's':
+ swz->swizzle[i] = 0;
+ break;
+ case 'y':
+ case 'g':
+ case 't':
+ swz->swizzle[i] = 1;
+ break;
+ case 'z':
+ case 'b':
+ case 'p':
+ swz->swizzle[i] = 2;
+ break;
+ case 'w':
+ case 'a':
+ case 'q':
+ swz->swizzle[i] = 3;
+ break;
+ }
+
+ /* check if the component is valid for given vector's row count */
+ if (rows <= swz->swizzle[i])
+ return GL_FALSE;
+ }
+
+ /* only one swizzle group can be used */
+ if ((xyzw && rgba) || (xyzw && stpq) || (rgba && stpq))
+ return GL_FALSE;
+
+ return GL_TRUE;
+}
+
+/* _slang_is_swizzle_mask() */
+
+GLboolean _slang_is_swizzle_mask (const slang_swizzle *swz, GLuint rows)
+{
+ GLuint i, c = 0;
+
+ /* the swizzle may not be longer than the vector dim */
+ if (swz->num_components > rows)
+ return GL_FALSE;
+
+ /* the swizzle components cannot be duplicated */
+ for (i = 0; i < swz->num_components; i++)
+ {
+ if ((c & (1 << swz->swizzle[i])) != 0)
+ return GL_FALSE;
+ c |= 1 << swz->swizzle[i];
+ }
+
+ return GL_TRUE;
+}
+
+/* _slang_multiply_swizzles() */
+
+GLvoid _slang_multiply_swizzles (slang_swizzle *dst, const slang_swizzle *left,
+ const slang_swizzle *right)
+{
+ GLuint i;
+
+ dst->num_components = right->num_components;
+ for (i = 0; i < right->num_components; i++)
+ dst->swizzle[i] = left->swizzle[right->swizzle[i]];
+}
+
+/* _slang_assemble_constructor() */
+
+static GLboolean sizeof_argument (slang_assemble_ctx *A, GLuint *size, slang_operation *op)
+{
+ slang_assembly_typeinfo ti;
+ GLboolean result = GL_FALSE;
+ slang_storage_aggregate agg, flat_agg;
+
+ if (!slang_assembly_typeinfo_construct (&ti))
+ return GL_FALSE;
+ if (!_slang_typeof_operation (A, op, &ti))
+ goto end1;
+
+ if (!slang_storage_aggregate_construct (&agg))
+ goto end1;
+ if (!_slang_aggregate_variable (&agg, &ti.spec, 0, A->space.funcs, A->space.structs,
+ A->space.vars, A->mach, A->file, A->atoms))
+ goto end2;
+
+ if (!slang_storage_aggregate_construct (&flat_agg))
+ goto end2;
+ if (!_slang_flatten_aggregate (&flat_agg, &agg))
+ goto end;
+
+ *size = flat_agg.count * 4;
+
+ result = GL_TRUE;
+end:
+ slang_storage_aggregate_destruct (&flat_agg);
+end2:
+ slang_storage_aggregate_destruct (&agg);
+end1:
+ slang_assembly_typeinfo_destruct (&ti);
+ return result;
+}
+
+static GLboolean constructor_aggregate (slang_assemble_ctx *A, const slang_storage_aggregate *flat,
+ slang_operation *op, GLuint garbage_size)
+{
+ slang_assembly_typeinfo ti;
+ GLboolean result = GL_FALSE;
+ slang_storage_aggregate agg, flat_agg;
+
+ if (!slang_assembly_typeinfo_construct (&ti))
+ return GL_FALSE;
+ if (!_slang_typeof_operation (A, op, &ti))
+ goto end1;
+
+ if (!slang_storage_aggregate_construct (&agg))
+ goto end1;
+ if (!_slang_aggregate_variable (&agg, &ti.spec, 0, A->space.funcs, A->space.structs,
+ A->space.vars, A->mach, A->file, A->atoms))
+ goto end2;
+
+ if (!slang_storage_aggregate_construct (&flat_agg))
+ goto end2;
+ if (!_slang_flatten_aggregate (&flat_agg, &agg))
+ goto end;
+
+ if (!_slang_assemble_operation (A, op, slang_ref_forbid))
+ goto end;
+
+ /* TODO: convert (generic) elements */
+
+ /* free the garbage */
+ if (garbage_size != 0)
+ {
+ GLuint i;
+
+ /* move the non-garbage part to the end of the argument */
+ if (!slang_assembly_file_push_label (A->file, slang_asm_addr_push, 0))
+ goto end;
+ for (i = flat_agg.count * 4 - garbage_size; i > 0; i -= 4)
+ {
+ if (!slang_assembly_file_push_label2 (A->file, slang_asm_float_move,
+ garbage_size + i, i))
+ {
+ goto end;
+ }
+ }
+ if (!slang_assembly_file_push_label (A->file, slang_asm_local_free, garbage_size + 4))
+ goto end;
+ }
+
+ result = GL_TRUE;
+end:
+ slang_storage_aggregate_destruct (&flat_agg);
+end2:
+ slang_storage_aggregate_destruct (&agg);
+end1:
+ slang_assembly_typeinfo_destruct (&ti);
+ return result;
+}
+
+GLboolean _slang_assemble_constructor (slang_assemble_ctx *A, slang_operation *op)
+{
+ slang_assembly_typeinfo ti;
+ GLboolean result = GL_FALSE;
+ slang_storage_aggregate agg, flat;
+ GLuint size, i;
+ GLuint arg_sums[2];
+
+ /* get typeinfo of the constructor (the result of constructor expression) */
+ if (!slang_assembly_typeinfo_construct (&ti))
+ return GL_FALSE;
+ if (!_slang_typeof_operation (A, op, &ti))
+ goto end1;
+
+ /* create an aggregate of the constructor */
+ if (!slang_storage_aggregate_construct (&agg))
+ goto end1;
+ if (!_slang_aggregate_variable (&agg, &ti.spec, 0, A->space.funcs, A->space.structs,
+ A->space.vars, A->mach, A->file, A->atoms))
+ goto end2;
+
+ /* calculate size of the constructor */
+ size = _slang_sizeof_aggregate (&agg);
+
+ /* flatten the constructor */
+ if (!slang_storage_aggregate_construct (&flat))
+ goto end2;
+ if (!_slang_flatten_aggregate (&flat, &agg))
+ goto end;
+
+ /* collect the last two constructor's argument size sums */
+ arg_sums[0] = 0; /* will hold all but the last argument's size sum */
+ arg_sums[1] = 0; /* will hold all argument's size sum */
+ for (i = 0; i < op->num_children; i++)
+ {
+ GLuint arg_size;
+
+ if (!sizeof_argument (A, &arg_size, &op->children[i]))
+ goto end;
+ if (i > 0)
+ arg_sums[0] = arg_sums[1];
+ arg_sums[1] += arg_size;
+ }
+
+ /* check if there are too many arguments */
+ if (arg_sums[0] >= size)
+ {
+ /* TODO: info log: too many arguments in constructor list */
+ goto end;
+ }
+
+ /* check if there are too few arguments */
+ if (arg_sums[1] < size)
+ {
+ /* TODO: info log: too few arguments in constructor list */
+ goto end;
+ }
+
+ /* traverse the children that form the constructor expression */
+ for (i = op->num_children; i > 0; i--)
+ {
+ GLuint garbage_size;
+
+ /* the last argument may be too big - calculate the unnecessary data size */
+ if (i == op->num_children)
+ garbage_size = arg_sums[1] - size;
+ else
+ garbage_size = 0;
+
+ if (!constructor_aggregate (A, &flat, &op->children[i - 1], garbage_size))
+ goto end;
+ }
+
+ result = GL_TRUE;
+end:
+ slang_storage_aggregate_destruct (&flat);
+end2:
+ slang_storage_aggregate_destruct (&agg);
+end1:
+ slang_assembly_typeinfo_destruct (&ti);
+ return result;
+}
+
+/* _slang_assemble_constructor_from_swizzle() */
+
+GLboolean _slang_assemble_constructor_from_swizzle (slang_assemble_ctx *A, const slang_swizzle *swz,
+ slang_type_specifier *spec, slang_type_specifier *master_spec)
+{
+ GLuint master_rows, i;
+
+ master_rows = _slang_type_dim (master_spec->type);
+ for (i = 0; i < master_rows; i++)
+ {
+ switch (_slang_type_base (master_spec->type))
+ {
+ case slang_spec_bool:
+ if (!slang_assembly_file_push_label2 (A->file, slang_asm_bool_copy,
+ (master_rows - i) * 4, i * 4))
+ return GL_FALSE;
+ break;
+ case slang_spec_int:
+ if (!slang_assembly_file_push_label2 (A->file, slang_asm_int_copy,
+ (master_rows - i) * 4, i * 4))
+ return GL_FALSE;
+ break;
+ case slang_spec_float:
+ if (!slang_assembly_file_push_label2 (A->file, slang_asm_float_copy,
+ (master_rows - i) * 4, i * 4))
+ return GL_FALSE;
+ break;
+ default:
+ break;
+ }
+ }
+ if (!slang_assembly_file_push_label (A->file, slang_asm_local_free, 4))
+ return GL_FALSE;
+ for (i = swz->num_components; i > 0; i--)
+ {
+ GLuint n = i - 1;
+
+ if (!slang_assembly_file_push_label2 (A->file, slang_asm_local_addr, A->local.swizzle_tmp, 16))
+ return GL_FALSE;
+ if (!slang_assembly_file_push_label (A->file, slang_asm_addr_push, swz->swizzle[n] * 4))
+ return GL_FALSE;
+ if (!slang_assembly_file_push (A->file, slang_asm_addr_add))
+ return GL_FALSE;
+ switch (_slang_type_base (master_spec->type))
+ {
+ case slang_spec_bool:
+ if (!slang_assembly_file_push (A->file, slang_asm_bool_deref))
+ return GL_FALSE;
+ break;
+ case slang_spec_int:
+ if (!slang_assembly_file_push (A->file, slang_asm_int_deref))
+ return GL_FALSE;
+ break;
+ case slang_spec_float:
+ if (!slang_assembly_file_push (A->file, slang_asm_float_deref))
+ return GL_FALSE;
+ break;
+ default:
+ break;
+ }
+ }
+
+ return GL_TRUE;
+}
+
diff --git a/src/mesa/shader/slang/slang_assemble_constructor.h b/src/mesa/shader/slang/slang_assemble_constructor.h
index 4bd120c4a8..41a03943cf 100644
--- a/src/mesa/shader/slang/slang_assemble_constructor.h
+++ b/src/mesa/shader/slang/slang_assemble_constructor.h
@@ -1,64 +1,64 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#if !defined SLANG_ASSEMBLE_CONSTRUCTOR_H
-#define SLANG_ASSEMBLE_CONSTRUCTOR_H
-
-#if defined __cplusplus
-extern "C" {
-#endif
-
-/*
- * Checks if a field selector is a general swizzle (an r-value swizzle with replicated
- * components or an l-value swizzle mask) for a vector.
- * Returns GL_TRUE if this is the case, <swz> is filled with swizzle information.
- * Returns GL_FALSE otherwise.
- */
-GLboolean _slang_is_swizzle (const char *field, GLuint rows, slang_swizzle *swz);
-
-/*
- * Checks if a general swizzle is an l-value swizzle - these swizzles do not have
- * duplicated fields.
- * Returns GL_TRUE if this is a swizzle mask.
- * Returns GL_FALSE otherwise
- */
-GLboolean _slang_is_swizzle_mask (const slang_swizzle *swz, GLuint rows);
-
-/*
- * Combines (multiplies) two swizzles to form single swizzle.
- * Example: "vec.wzyx.yx" --> "vec.zw".
- */
-GLvoid _slang_multiply_swizzles (slang_swizzle *, const slang_swizzle *, const slang_swizzle *);
-
-GLboolean _slang_assemble_constructor (slang_assemble_ctx *, struct slang_operation_ *);
-
-GLboolean _slang_assemble_constructor_from_swizzle (slang_assemble_ctx *, const slang_swizzle *,
- slang_type_specifier *, slang_type_specifier *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#if !defined SLANG_ASSEMBLE_CONSTRUCTOR_H
+#define SLANG_ASSEMBLE_CONSTRUCTOR_H
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Checks if a field selector is a general swizzle (an r-value swizzle with replicated
+ * components or an l-value swizzle mask) for a vector.
+ * Returns GL_TRUE if this is the case, <swz> is filled with swizzle information.
+ * Returns GL_FALSE otherwise.
+ */
+GLboolean _slang_is_swizzle (const char *field, GLuint rows, slang_swizzle *swz);
+
+/*
+ * Checks if a general swizzle is an l-value swizzle - these swizzles do not have
+ * duplicated fields.
+ * Returns GL_TRUE if this is a swizzle mask.
+ * Returns GL_FALSE otherwise
+ */
+GLboolean _slang_is_swizzle_mask (const slang_swizzle *swz, GLuint rows);
+
+/*
+ * Combines (multiplies) two swizzles to form single swizzle.
+ * Example: "vec.wzyx.yx" --> "vec.zw".
+ */
+GLvoid _slang_multiply_swizzles (slang_swizzle *, const slang_swizzle *, const slang_swizzle *);
+
+GLboolean _slang_assemble_constructor (slang_assemble_ctx *, struct slang_operation_ *);
+
+GLboolean _slang_assemble_constructor_from_swizzle (slang_assemble_ctx *, const slang_swizzle *,
+ slang_type_specifier *, slang_type_specifier *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/src/mesa/shader/slang/slang_assemble_typeinfo.c b/src/mesa/shader/slang/slang_assemble_typeinfo.c
index 8c5275f7d5..58f4e24f25 100644
--- a/src/mesa/shader/slang/slang_assemble_typeinfo.c
+++ b/src/mesa/shader/slang/slang_assemble_typeinfo.c
@@ -1,587 +1,587 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_assemble_typeinfo.c
- * slang type info
- * \author Michal Krol
- */
-
-#include "imports.h"
-#include "slang_assemble.h"
-#include "slang_compile.h"
-
-/*
- * slang_type_specifier
- */
-
-GLvoid slang_type_specifier_ctr (slang_type_specifier *self)
-{
- self->type = slang_spec_void;
- self->_struct = NULL;
- self->_array = NULL;
-}
-
-GLvoid slang_type_specifier_dtr (slang_type_specifier *self)
-{
- if (self->_struct != NULL)
- {
- slang_struct_destruct (self->_struct);
- slang_alloc_free (self->_struct);
- }
- if (self->_array != NULL)
- {
- slang_type_specifier_dtr (self->_array);
- slang_alloc_free (self->_array);
- }
-}
-
-GLboolean slang_type_specifier_copy (slang_type_specifier *x, const slang_type_specifier *y)
-{
- slang_type_specifier z;
-
- slang_type_specifier_ctr (&z);
- z.type = y->type;
- if (z.type == slang_spec_struct)
- {
- z._struct = (slang_struct *) slang_alloc_malloc (sizeof (slang_struct));
- if (z._struct == NULL)
- {
- slang_type_specifier_dtr (&z);
- return GL_FALSE;
- }
- if (!slang_struct_construct (z._struct))
- {
- slang_alloc_free (z._struct);
- slang_type_specifier_dtr (&z);
- return GL_FALSE;
- }
- if (!slang_struct_copy (z._struct, y->_struct))
- {
- slang_type_specifier_dtr (&z);
- return GL_FALSE;
- }
- }
- else if (z.type == slang_spec_array)
- {
- z._array = (slang_type_specifier *) slang_alloc_malloc (sizeof (slang_type_specifier));
- if (z._array == NULL)
- {
- slang_type_specifier_dtr (&z);
- return GL_FALSE;
- }
- slang_type_specifier_ctr (z._array);
- if (!slang_type_specifier_copy (z._array, y->_array))
- {
- slang_type_specifier_dtr (&z);
- return GL_FALSE;
- }
- }
- slang_type_specifier_dtr (x);
- *x = z;
- return GL_TRUE;
-}
-
-GLboolean slang_type_specifier_equal (const slang_type_specifier *x, const slang_type_specifier *y)
-{
- if (x->type != y->type)
- return 0;
- if (x->type == slang_spec_struct)
- return slang_struct_equal (x->_struct, y->_struct);
- if (x->type == slang_spec_array)
- return slang_type_specifier_equal (x->_array, y->_array);
- return 1;
-}
-
-/* slang_assembly_typeinfo */
-
-GLboolean slang_assembly_typeinfo_construct (slang_assembly_typeinfo *ti)
-{
- slang_type_specifier_ctr (&ti->spec);
- ti->array_len = 0;
- return GL_TRUE;
-}
-
-GLvoid slang_assembly_typeinfo_destruct (slang_assembly_typeinfo *ti)
-{
- slang_type_specifier_dtr (&ti->spec);
-}
-
-/* _slang_typeof_operation() */
-
-static GLboolean typeof_existing_function (const char *name, slang_operation *params,
- GLuint num_params, slang_assembly_name_space *space, slang_type_specifier *spec,
- slang_atom_pool *atoms)
-{
- slang_atom atom;
- GLboolean exists;
-
- atom = slang_atom_pool_atom (atoms, name);
- if (!_slang_typeof_function (atom, params, num_params, space, spec, &exists, atoms))
- return GL_FALSE;
- return exists;
-}
-
-GLboolean _slang_typeof_operation (slang_assemble_ctx *A, slang_operation *op,
- slang_assembly_typeinfo *ti)
-{
- return _slang_typeof_operation_ (op, &A->space, ti, A->atoms);
-}
-
-GLboolean _slang_typeof_operation_ (slang_operation *op, slang_assembly_name_space *space,
- slang_assembly_typeinfo *ti, slang_atom_pool *atoms)
-{
- ti->can_be_referenced = GL_FALSE;
- ti->is_swizzled = GL_FALSE;
-
- switch (op->type)
- {
- case slang_oper_block_no_new_scope:
- case slang_oper_block_new_scope:
- case slang_oper_variable_decl:
- case slang_oper_asm:
- case slang_oper_break:
- case slang_oper_continue:
- case slang_oper_discard:
- case slang_oper_return:
- case slang_oper_if:
- case slang_oper_while:
- case slang_oper_do:
- case slang_oper_for:
- case slang_oper_void:
- ti->spec.type = slang_spec_void;
- break;
- case slang_oper_expression:
- case slang_oper_assign:
- case slang_oper_addassign:
- case slang_oper_subassign:
- case slang_oper_mulassign:
- case slang_oper_divassign:
- case slang_oper_preincrement:
- case slang_oper_predecrement:
- if (!_slang_typeof_operation_ (op->children, space, ti, atoms))
- return 0;
- break;
- case slang_oper_literal_bool:
- case slang_oper_logicalor:
- case slang_oper_logicalxor:
- case slang_oper_logicaland:
- case slang_oper_equal:
- case slang_oper_notequal:
- case slang_oper_less:
- case slang_oper_greater:
- case slang_oper_lessequal:
- case slang_oper_greaterequal:
- case slang_oper_not:
- ti->spec.type = slang_spec_bool;
- break;
- case slang_oper_literal_int:
- ti->spec.type = slang_spec_int;
- break;
- case slang_oper_literal_float:
- ti->spec.type = slang_spec_float;
- break;
- case slang_oper_identifier:
- {
- slang_variable *var;
-
- var = _slang_locate_variable (op->locals, op->a_id, GL_TRUE);
- if (var == NULL)
- return GL_FALSE;
- if (!slang_type_specifier_copy (&ti->spec, &var->type.specifier))
- return GL_FALSE;
- ti->can_be_referenced = GL_TRUE;
- ti->array_len = var->array_len;
- }
- break;
- case slang_oper_sequence:
- /* TODO: check [0] and [1] if they match */
- if (!_slang_typeof_operation_ (&op->children[1], space, ti, atoms))
- return GL_FALSE;
- ti->can_be_referenced = GL_FALSE;
- ti->is_swizzled = GL_FALSE;
- break;
- /*case slang_oper_modassign:*/
- /*case slang_oper_lshassign:*/
- /*case slang_oper_rshassign:*/
- /*case slang_oper_orassign:*/
- /*case slang_oper_xorassign:*/
- /*case slang_oper_andassign:*/
- case slang_oper_select:
- /* TODO: check [1] and [2] if they match */
- if (!_slang_typeof_operation_ (&op->children[1], space, ti, atoms))
- return GL_FALSE;
- ti->can_be_referenced = GL_FALSE;
- ti->is_swizzled = GL_FALSE;
- break;
- /*case slang_oper_bitor:*/
- /*case slang_oper_bitxor:*/
- /*case slang_oper_bitand:*/
- /*case slang_oper_lshift:*/
- /*case slang_oper_rshift:*/
- case slang_oper_add:
- if (!typeof_existing_function ("+", op->children, 2, space, &ti->spec, atoms))
- return GL_FALSE;
- break;
- case slang_oper_subtract:
- if (!typeof_existing_function ("-", op->children, 2, space, &ti->spec, atoms))
- return GL_FALSE;
- break;
- case slang_oper_multiply:
- if (!typeof_existing_function ("*", op->children, 2, space, &ti->spec, atoms))
- return GL_FALSE;
- break;
- case slang_oper_divide:
- if (!typeof_existing_function ("/", op->children, 2, space, &ti->spec, atoms))
- return GL_FALSE;
- break;
- /*case slang_oper_modulus:*/
- case slang_oper_plus:
- if (!_slang_typeof_operation_ (op->children, space, ti, atoms))
- return GL_FALSE;
- ti->can_be_referenced = GL_FALSE;
- ti->is_swizzled = GL_FALSE;
- break;
- case slang_oper_minus:
- if (!typeof_existing_function ("-", op->children, 1, space, &ti->spec, atoms))
- return GL_FALSE;
- break;
- /*case slang_oper_complement:*/
- case slang_oper_subscript:
- {
- slang_assembly_typeinfo _ti;
-
- if (!slang_assembly_typeinfo_construct (&_ti))
- return GL_FALSE;
- if (!_slang_typeof_operation_ (op->children, space, &_ti, atoms))
- {
- slang_assembly_typeinfo_destruct (&_ti);
- return GL_FALSE;
- }
- ti->can_be_referenced = _ti.can_be_referenced;
- if (_ti.spec.type == slang_spec_array)
- {
- if (!slang_type_specifier_copy (&ti->spec, _ti.spec._array))
- {
- slang_assembly_typeinfo_destruct (&_ti);
- return GL_FALSE;
- }
- }
- else
- {
- if (!_slang_type_is_vector (_ti.spec.type) && !_slang_type_is_matrix (_ti.spec.type))
- {
- slang_assembly_typeinfo_destruct (&_ti);
- return GL_FALSE;
- }
- ti->spec.type = _slang_type_base (_ti.spec.type);
- }
- slang_assembly_typeinfo_destruct (&_ti);
- }
- break;
- case slang_oper_call:
- {
- GLboolean exists;
-
- if (!_slang_typeof_function (op->a_id, op->children, op->num_children, space, &ti->spec,
- &exists, atoms))
- return GL_FALSE;
- if (!exists)
- {
- slang_struct *s = slang_struct_scope_find (space->structs, op->a_id, GL_TRUE);
- if (s != NULL)
- {
- ti->spec.type = slang_spec_struct;
- ti->spec._struct = (slang_struct *) slang_alloc_malloc (sizeof (slang_struct));
- if (ti->spec._struct == NULL)
- return GL_FALSE;
- if (!slang_struct_construct (ti->spec._struct))
- {
- slang_alloc_free (ti->spec._struct);
- ti->spec._struct = NULL;
- return GL_FALSE;
- }
- if (!slang_struct_copy (ti->spec._struct, s))
- return GL_FALSE;
- }
- else
- {
- const char *name;
- slang_type_specifier_type type;
-
- name = slang_atom_pool_id (atoms, op->a_id);
- type = slang_type_specifier_type_from_string (name);
- if (type == slang_spec_void)
- return GL_FALSE;
- ti->spec.type = type;
- }
- }
- }
- break;
- case slang_oper_field:
- {
- slang_assembly_typeinfo _ti;
-
- if (!slang_assembly_typeinfo_construct (&_ti))
- return GL_FALSE;
- if (!_slang_typeof_operation_ (op->children, space, &_ti, atoms))
- {
- slang_assembly_typeinfo_destruct (&_ti);
- return GL_FALSE;
- }
- if (_ti.spec.type == slang_spec_struct)
- {
- slang_variable *field;
-
- field = _slang_locate_variable (_ti.spec._struct->fields, op->a_id, GL_FALSE);
- if (field == NULL)
- {
- slang_assembly_typeinfo_destruct (&_ti);
- return GL_FALSE;
- }
- if (!slang_type_specifier_copy (&ti->spec, &field->type.specifier))
- {
- slang_assembly_typeinfo_destruct (&_ti);
- return GL_FALSE;
- }
- ti->can_be_referenced = _ti.can_be_referenced;
- }
- else
- {
- GLuint rows;
- const char *swizzle;
- slang_type_specifier_type base;
-
- /* determine the swizzle of the field expression */
- if (!_slang_type_is_vector (_ti.spec.type))
- {
- slang_assembly_typeinfo_destruct (&_ti);
- return GL_FALSE;
- }
- rows = _slang_type_dim (_ti.spec.type);
- swizzle = slang_atom_pool_id (atoms, op->a_id);
- if (!_slang_is_swizzle (swizzle, rows, &ti->swz))
- {
- slang_assembly_typeinfo_destruct (&_ti);
- return GL_FALSE;
- }
- ti->is_swizzled = GL_TRUE;
- ti->can_be_referenced = _ti.can_be_referenced && _slang_is_swizzle_mask (&ti->swz,
- rows);
- if (_ti.is_swizzled)
- {
- slang_swizzle swz;
-
- /* swizzle the swizzle */
- _slang_multiply_swizzles (&swz, &_ti.swz, &ti->swz);
- ti->swz = swz;
- }
- base = _slang_type_base (_ti.spec.type);
- switch (ti->swz.num_components)
- {
- case 1:
- ti->spec.type = base;
- break;
- case 2:
- switch (base)
- {
- case slang_spec_float:
- ti->spec.type = slang_spec_vec2;
- break;
- case slang_spec_int:
- ti->spec.type = slang_spec_ivec2;
- break;
- case slang_spec_bool:
- ti->spec.type = slang_spec_bvec2;
- break;
- default:
- break;
- }
- break;
- case 3:
- switch (base)
- {
- case slang_spec_float:
- ti->spec.type = slang_spec_vec3;
- break;
- case slang_spec_int:
- ti->spec.type = slang_spec_ivec3;
- break;
- case slang_spec_bool:
- ti->spec.type = slang_spec_bvec3;
- break;
- default:
- break;
- }
- break;
- case 4:
- switch (base)
- {
- case slang_spec_float:
- ti->spec.type = slang_spec_vec4;
- break;
- case slang_spec_int:
- ti->spec.type = slang_spec_ivec4;
- break;
- case slang_spec_bool:
- ti->spec.type = slang_spec_bvec4;
- break;
- default:
- break;
- }
- break;
- default:
- break;
- }
- }
- slang_assembly_typeinfo_destruct (&_ti);
- }
- break;
- case slang_oper_postincrement:
- case slang_oper_postdecrement:
- if (!_slang_typeof_operation_ (op->children, space, ti, atoms))
- return GL_FALSE;
- ti->can_be_referenced = GL_FALSE;
- ti->is_swizzled = GL_FALSE;
- break;
- default:
- return GL_FALSE;
- }
-
- return GL_TRUE;
-}
-
-/* _slang_typeof_function() */
-
-GLboolean _slang_typeof_function (slang_atom a_name, slang_operation *params, GLuint num_params,
- slang_assembly_name_space *space, slang_type_specifier *spec, GLboolean *exists,
- slang_atom_pool *atoms)
-{
- slang_function *fun;
-
- fun = _slang_locate_function (space->funcs, a_name, params, num_params, space, atoms);
- *exists = fun != NULL;
- if (fun == NULL)
- return GL_TRUE;
- return slang_type_specifier_copy (spec, &fun->header.type.specifier);
-}
-
-/* _slang_type_is_matrix() */
-
-GLboolean _slang_type_is_matrix (slang_type_specifier_type ty)
-{
- switch (ty)
- {
- case slang_spec_mat2:
- case slang_spec_mat3:
- case slang_spec_mat4:
- return GL_TRUE;
- default:
- return GL_FALSE;
- }
-}
-
-/* _slang_type_is_vector() */
-
-GLboolean _slang_type_is_vector (slang_type_specifier_type ty)
-{
- switch (ty)
- {
- case slang_spec_vec2:
- case slang_spec_vec3:
- case slang_spec_vec4:
- case slang_spec_ivec2:
- case slang_spec_ivec3:
- case slang_spec_ivec4:
- case slang_spec_bvec2:
- case slang_spec_bvec3:
- case slang_spec_bvec4:
- return GL_TRUE;
- default:
- return GL_FALSE;
- }
-}
-
-/* _slang_type_base_of_vector() */
-
-slang_type_specifier_type _slang_type_base (slang_type_specifier_type ty)
-{
- switch (ty)
- {
- case slang_spec_float:
- case slang_spec_vec2:
- case slang_spec_vec3:
- case slang_spec_vec4:
- return slang_spec_float;
- case slang_spec_int:
- case slang_spec_ivec2:
- case slang_spec_ivec3:
- case slang_spec_ivec4:
- return slang_spec_int;
- case slang_spec_bool:
- case slang_spec_bvec2:
- case slang_spec_bvec3:
- case slang_spec_bvec4:
- return slang_spec_bool;
- case slang_spec_mat2:
- return slang_spec_vec2;
- case slang_spec_mat3:
- return slang_spec_vec3;
- case slang_spec_mat4:
- return slang_spec_vec4;
- default:
- return slang_spec_void;
- }
-}
-
-/* _slang_type_dim */
-
-GLuint _slang_type_dim (slang_type_specifier_type ty)
-{
- switch (ty)
- {
- case slang_spec_float:
- case slang_spec_int:
- case slang_spec_bool:
- return 1;
- case slang_spec_vec2:
- case slang_spec_ivec2:
- case slang_spec_bvec2:
- case slang_spec_mat2:
- return 2;
- case slang_spec_vec3:
- case slang_spec_ivec3:
- case slang_spec_bvec3:
- case slang_spec_mat3:
- return 3;
- case slang_spec_vec4:
- case slang_spec_ivec4:
- case slang_spec_bvec4:
- case slang_spec_mat4:
- return 4;
- default:
- return 0;
- }
-}
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file slang_assemble_typeinfo.c
+ * slang type info
+ * \author Michal Krol
+ */
+
+#include "imports.h"
+#include "slang_assemble.h"
+#include "slang_compile.h"
+
+/*
+ * slang_type_specifier
+ */
+
+GLvoid slang_type_specifier_ctr (slang_type_specifier *self)
+{
+ self->type = slang_spec_void;
+ self->_struct = NULL;
+ self->_array = NULL;
+}
+
+GLvoid slang_type_specifier_dtr (slang_type_specifier *self)
+{
+ if (self->_struct != NULL)
+ {
+ slang_struct_destruct (self->_struct);
+ slang_alloc_free (self->_struct);
+ }
+ if (self->_array != NULL)
+ {
+ slang_type_specifier_dtr (self->_array);
+ slang_alloc_free (self->_array);
+ }
+}
+
+GLboolean slang_type_specifier_copy (slang_type_specifier *x, const slang_type_specifier *y)
+{
+ slang_type_specifier z;
+
+ slang_type_specifier_ctr (&z);
+ z.type = y->type;
+ if (z.type == slang_spec_struct)
+ {
+ z._struct = (slang_struct *) slang_alloc_malloc (sizeof (slang_struct));
+ if (z._struct == NULL)
+ {
+ slang_type_specifier_dtr (&z);
+ return GL_FALSE;
+ }
+ if (!slang_struct_construct (z._struct))
+ {
+ slang_alloc_free (z._struct);
+ slang_type_specifier_dtr (&z);
+ return GL_FALSE;
+ }
+ if (!slang_struct_copy (z._struct, y->_struct))
+ {
+ slang_type_specifier_dtr (&z);
+ return GL_FALSE;
+ }
+ }
+ else if (z.type == slang_spec_array)
+ {
+ z._array = (slang_type_specifier *) slang_alloc_malloc (sizeof (slang_type_specifier));
+ if (z._array == NULL)
+ {
+ slang_type_specifier_dtr (&z);
+ return GL_FALSE;
+ }
+ slang_type_specifier_ctr (z._array);
+ if (!slang_type_specifier_copy (z._array, y->_array))
+ {
+ slang_type_specifier_dtr (&z);
+ return GL_FALSE;
+ }
+ }
+ slang_type_specifier_dtr (x);
+ *x = z;
+ return GL_TRUE;
+}
+
+GLboolean slang_type_specifier_equal (const slang_type_specifier *x, const slang_type_specifier *y)
+{
+ if (x->type != y->type)
+ return 0;
+ if (x->type == slang_spec_struct)
+ return slang_struct_equal (x->_struct, y->_struct);
+ if (x->type == slang_spec_array)
+ return slang_type_specifier_equal (x->_array, y->_array);
+ return 1;
+}
+
+/* slang_assembly_typeinfo */
+
+GLboolean slang_assembly_typeinfo_construct (slang_assembly_typeinfo *ti)
+{
+ slang_type_specifier_ctr (&ti->spec);
+ ti->array_len = 0;
+ return GL_TRUE;
+}
+
+GLvoid slang_assembly_typeinfo_destruct (slang_assembly_typeinfo *ti)
+{
+ slang_type_specifier_dtr (&ti->spec);
+}
+
+/* _slang_typeof_operation() */
+
+static GLboolean typeof_existing_function (const char *name, slang_operation *params,
+ GLuint num_params, slang_assembly_name_space *space, slang_type_specifier *spec,
+ slang_atom_pool *atoms)
+{
+ slang_atom atom;
+ GLboolean exists;
+
+ atom = slang_atom_pool_atom (atoms, name);
+ if (!_slang_typeof_function (atom, params, num_params, space, spec, &exists, atoms))
+ return GL_FALSE;
+ return exists;
+}
+
+GLboolean _slang_typeof_operation (slang_assemble_ctx *A, slang_operation *op,
+ slang_assembly_typeinfo *ti)
+{
+ return _slang_typeof_operation_ (op, &A->space, ti, A->atoms);
+}
+
+GLboolean _slang_typeof_operation_ (slang_operation *op, slang_assembly_name_space *space,
+ slang_assembly_typeinfo *ti, slang_atom_pool *atoms)
+{
+ ti->can_be_referenced = GL_FALSE;
+ ti->is_swizzled = GL_FALSE;
+
+ switch (op->type)
+ {
+ case slang_oper_block_no_new_scope:
+ case slang_oper_block_new_scope:
+ case slang_oper_variable_decl:
+ case slang_oper_asm:
+ case slang_oper_break:
+ case slang_oper_continue:
+ case slang_oper_discard:
+ case slang_oper_return:
+ case slang_oper_if:
+ case slang_oper_while:
+ case slang_oper_do:
+ case slang_oper_for:
+ case slang_oper_void:
+ ti->spec.type = slang_spec_void;
+ break;
+ case slang_oper_expression:
+ case slang_oper_assign:
+ case slang_oper_addassign:
+ case slang_oper_subassign:
+ case slang_oper_mulassign:
+ case slang_oper_divassign:
+ case slang_oper_preincrement:
+ case slang_oper_predecrement:
+ if (!_slang_typeof_operation_ (op->children, space, ti, atoms))
+ return 0;
+ break;
+ case slang_oper_literal_bool:
+ case slang_oper_logicalor:
+ case slang_oper_logicalxor:
+ case slang_oper_logicaland:
+ case slang_oper_equal:
+ case slang_oper_notequal:
+ case slang_oper_less:
+ case slang_oper_greater:
+ case slang_oper_lessequal:
+ case slang_oper_greaterequal:
+ case slang_oper_not:
+ ti->spec.type = slang_spec_bool;
+ break;
+ case slang_oper_literal_int:
+ ti->spec.type = slang_spec_int;
+ break;
+ case slang_oper_literal_float:
+ ti->spec.type = slang_spec_float;
+ break;
+ case slang_oper_identifier:
+ {
+ slang_variable *var;
+
+ var = _slang_locate_variable (op->locals, op->a_id, GL_TRUE);
+ if (var == NULL)
+ return GL_FALSE;
+ if (!slang_type_specifier_copy (&ti->spec, &var->type.specifier))
+ return GL_FALSE;
+ ti->can_be_referenced = GL_TRUE;
+ ti->array_len = var->array_len;
+ }
+ break;
+ case slang_oper_sequence:
+ /* TODO: check [0] and [1] if they match */
+ if (!_slang_typeof_operation_ (&op->children[1], space, ti, atoms))
+ return GL_FALSE;
+ ti->can_be_referenced = GL_FALSE;
+ ti->is_swizzled = GL_FALSE;
+ break;
+ /*case slang_oper_modassign:*/
+ /*case slang_oper_lshassign:*/
+ /*case slang_oper_rshassign:*/
+ /*case slang_oper_orassign:*/
+ /*case slang_oper_xorassign:*/
+ /*case slang_oper_andassign:*/
+ case slang_oper_select:
+ /* TODO: check [1] and [2] if they match */
+ if (!_slang_typeof_operation_ (&op->children[1], space, ti, atoms))
+ return GL_FALSE;
+ ti->can_be_referenced = GL_FALSE;
+ ti->is_swizzled = GL_FALSE;
+ break;
+ /*case slang_oper_bitor:*/
+ /*case slang_oper_bitxor:*/
+ /*case slang_oper_bitand:*/
+ /*case slang_oper_lshift:*/
+ /*case slang_oper_rshift:*/
+ case slang_oper_add:
+ if (!typeof_existing_function ("+", op->children, 2, space, &ti->spec, atoms))
+ return GL_FALSE;
+ break;
+ case slang_oper_subtract:
+ if (!typeof_existing_function ("-", op->children, 2, space, &ti->spec, atoms))
+ return GL_FALSE;
+ break;
+ case slang_oper_multiply:
+ if (!typeof_existing_function ("*", op->children, 2, space, &ti->spec, atoms))
+ return GL_FALSE;
+ break;
+ case slang_oper_divide:
+ if (!typeof_existing_function ("/", op->children, 2, space, &ti->spec, atoms))
+ return GL_FALSE;
+ break;
+ /*case slang_oper_modulus:*/
+ case slang_oper_plus:
+ if (!_slang_typeof_operation_ (op->children, space, ti, atoms))
+ return GL_FALSE;
+ ti->can_be_referenced = GL_FALSE;
+ ti->is_swizzled = GL_FALSE;
+ break;
+ case slang_oper_minus:
+ if (!typeof_existing_function ("-", op->children, 1, space, &ti->spec, atoms))
+ return GL_FALSE;
+ break;
+ /*case slang_oper_complement:*/
+ case slang_oper_subscript:
+ {
+ slang_assembly_typeinfo _ti;
+
+ if (!slang_assembly_typeinfo_construct (&_ti))
+ return GL_FALSE;
+ if (!_slang_typeof_operation_ (op->children, space, &_ti, atoms))
+ {
+ slang_assembly_typeinfo_destruct (&_ti);
+ return GL_FALSE;
+ }
+ ti->can_be_referenced = _ti.can_be_referenced;
+ if (_ti.spec.type == slang_spec_array)
+ {
+ if (!slang_type_specifier_copy (&ti->spec, _ti.spec._array))
+ {
+ slang_assembly_typeinfo_destruct (&_ti);
+ return GL_FALSE;
+ }
+ }
+ else
+ {
+ if (!_slang_type_is_vector (_ti.spec.type) && !_slang_type_is_matrix (_ti.spec.type))
+ {
+ slang_assembly_typeinfo_destruct (&_ti);
+ return GL_FALSE;
+ }
+ ti->spec.type = _slang_type_base (_ti.spec.type);
+ }
+ slang_assembly_typeinfo_destruct (&_ti);
+ }
+ break;
+ case slang_oper_call:
+ {
+ GLboolean exists;
+
+ if (!_slang_typeof_function (op->a_id, op->children, op->num_children, space, &ti->spec,
+ &exists, atoms))
+ return GL_FALSE;
+ if (!exists)
+ {
+ slang_struct *s = slang_struct_scope_find (space->structs, op->a_id, GL_TRUE);
+ if (s != NULL)
+ {
+ ti->spec.type = slang_spec_struct;
+ ti->spec._struct = (slang_struct *) slang_alloc_malloc (sizeof (slang_struct));
+ if (ti->spec._struct == NULL)
+ return GL_FALSE;
+ if (!slang_struct_construct (ti->spec._struct))
+ {
+ slang_alloc_free (ti->spec._struct);
+ ti->spec._struct = NULL;
+ return GL_FALSE;
+ }
+ if (!slang_struct_copy (ti->spec._struct, s))
+ return GL_FALSE;
+ }
+ else
+ {
+ const char *name;
+ slang_type_specifier_type type;
+
+ name = slang_atom_pool_id (atoms, op->a_id);
+ type = slang_type_specifier_type_from_string (name);
+ if (type == slang_spec_void)
+ return GL_FALSE;
+ ti->spec.type = type;
+ }
+ }
+ }
+ break;
+ case slang_oper_field:
+ {
+ slang_assembly_typeinfo _ti;
+
+ if (!slang_assembly_typeinfo_construct (&_ti))
+ return GL_FALSE;
+ if (!_slang_typeof_operation_ (op->children, space, &_ti, atoms))
+ {
+ slang_assembly_typeinfo_destruct (&_ti);
+ return GL_FALSE;
+ }
+ if (_ti.spec.type == slang_spec_struct)
+ {
+ slang_variable *field;
+
+ field = _slang_locate_variable (_ti.spec._struct->fields, op->a_id, GL_FALSE);
+ if (field == NULL)
+ {
+ slang_assembly_typeinfo_destruct (&_ti);
+ return GL_FALSE;
+ }
+ if (!slang_type_specifier_copy (&ti->spec, &field->type.specifier))
+ {
+ slang_assembly_typeinfo_destruct (&_ti);
+ return GL_FALSE;
+ }
+ ti->can_be_referenced = _ti.can_be_referenced;
+ }
+ else
+ {
+ GLuint rows;
+ const char *swizzle;
+ slang_type_specifier_type base;
+
+ /* determine the swizzle of the field expression */
+ if (!_slang_type_is_vector (_ti.spec.type))
+ {
+ slang_assembly_typeinfo_destruct (&_ti);
+ return GL_FALSE;
+ }
+ rows = _slang_type_dim (_ti.spec.type);
+ swizzle = slang_atom_pool_id (atoms, op->a_id);
+ if (!_slang_is_swizzle (swizzle, rows, &ti->swz))
+ {
+ slang_assembly_typeinfo_destruct (&_ti);
+ return GL_FALSE;
+ }
+ ti->is_swizzled = GL_TRUE;
+ ti->can_be_referenced = _ti.can_be_referenced && _slang_is_swizzle_mask (&ti->swz,
+ rows);
+ if (_ti.is_swizzled)
+ {
+ slang_swizzle swz;
+
+ /* swizzle the swizzle */
+ _slang_multiply_swizzles (&swz, &_ti.swz, &ti->swz);
+ ti->swz = swz;
+ }
+ base = _slang_type_base (_ti.spec.type);
+ switch (ti->swz.num_components)
+ {
+ case 1:
+ ti->spec.type = base;
+ break;
+ case 2:
+ switch (base)
+ {
+ case slang_spec_float:
+ ti->spec.type = slang_spec_vec2;
+ break;
+ case slang_spec_int:
+ ti->spec.type = slang_spec_ivec2;
+ break;
+ case slang_spec_bool:
+ ti->spec.type = slang_spec_bvec2;
+ break;
+ default:
+ break;
+ }
+ break;
+ case 3:
+ switch (base)
+ {
+ case slang_spec_float:
+ ti->spec.type = slang_spec_vec3;
+ break;
+ case slang_spec_int:
+ ti->spec.type = slang_spec_ivec3;
+ break;
+ case slang_spec_bool:
+ ti->spec.type = slang_spec_bvec3;
+ break;
+ default:
+ break;
+ }
+ break;
+ case 4:
+ switch (base)
+ {
+ case slang_spec_float:
+ ti->spec.type = slang_spec_vec4;
+ break;
+ case slang_spec_int:
+ ti->spec.type = slang_spec_ivec4;
+ break;
+ case slang_spec_bool:
+ ti->spec.type = slang_spec_bvec4;
+ break;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ slang_assembly_typeinfo_destruct (&_ti);
+ }
+ break;
+ case slang_oper_postincrement:
+ case slang_oper_postdecrement:
+ if (!_slang_typeof_operation_ (op->children, space, ti, atoms))
+ return GL_FALSE;
+ ti->can_be_referenced = GL_FALSE;
+ ti->is_swizzled = GL_FALSE;
+ break;
+ default:
+ return GL_FALSE;
+ }
+
+ return GL_TRUE;
+}
+
+/* _slang_typeof_function() */
+
+GLboolean _slang_typeof_function (slang_atom a_name, slang_operation *params, GLuint num_params,
+ slang_assembly_name_space *space, slang_type_specifier *spec, GLboolean *exists,
+ slang_atom_pool *atoms)
+{
+ slang_function *fun;
+
+ fun = _slang_locate_function (space->funcs, a_name, params, num_params, space, atoms);
+ *exists = fun != NULL;
+ if (fun == NULL)
+ return GL_TRUE;
+ return slang_type_specifier_copy (spec, &fun->header.type.specifier);
+}
+
+/* _slang_type_is_matrix() */
+
+GLboolean _slang_type_is_matrix (slang_type_specifier_type ty)
+{
+ switch (ty)
+ {
+ case slang_spec_mat2:
+ case slang_spec_mat3:
+ case slang_spec_mat4:
+ return GL_TRUE;
+ default:
+ return GL_FALSE;
+ }
+}
+
+/* _slang_type_is_vector() */
+
+GLboolean _slang_type_is_vector (slang_type_specifier_type ty)
+{
+ switch (ty)
+ {
+ case slang_spec_vec2:
+ case slang_spec_vec3:
+ case slang_spec_vec4:
+ case slang_spec_ivec2:
+ case slang_spec_ivec3:
+ case slang_spec_ivec4:
+ case slang_spec_bvec2:
+ case slang_spec_bvec3:
+ case slang_spec_bvec4:
+ return GL_TRUE;
+ default:
+ return GL_FALSE;
+ }
+}
+
+/* _slang_type_base_of_vector() */
+
+slang_type_specifier_type _slang_type_base (slang_type_specifier_type ty)
+{
+ switch (ty)
+ {
+ case slang_spec_float:
+ case slang_spec_vec2:
+ case slang_spec_vec3:
+ case slang_spec_vec4:
+ return slang_spec_float;
+ case slang_spec_int:
+ case slang_spec_ivec2:
+ case slang_spec_ivec3:
+ case slang_spec_ivec4:
+ return slang_spec_int;
+ case slang_spec_bool:
+ case slang_spec_bvec2:
+ case slang_spec_bvec3:
+ case slang_spec_bvec4:
+ return slang_spec_bool;
+ case slang_spec_mat2:
+ return slang_spec_vec2;
+ case slang_spec_mat3:
+ return slang_spec_vec3;
+ case slang_spec_mat4:
+ return slang_spec_vec4;
+ default:
+ return slang_spec_void;
+ }
+}
+
+/* _slang_type_dim */
+
+GLuint _slang_type_dim (slang_type_specifier_type ty)
+{
+ switch (ty)
+ {
+ case slang_spec_float:
+ case slang_spec_int:
+ case slang_spec_bool:
+ return 1;
+ case slang_spec_vec2:
+ case slang_spec_ivec2:
+ case slang_spec_bvec2:
+ case slang_spec_mat2:
+ return 2;
+ case slang_spec_vec3:
+ case slang_spec_ivec3:
+ case slang_spec_bvec3:
+ case slang_spec_mat3:
+ return 3;
+ case slang_spec_vec4:
+ case slang_spec_ivec4:
+ case slang_spec_bvec4:
+ case slang_spec_mat4:
+ return 4;
+ default:
+ return 0;
+ }
+}
+
diff --git a/src/mesa/shader/slang/slang_assemble_typeinfo.h b/src/mesa/shader/slang/slang_assemble_typeinfo.h
index 257793990b..7e8af96915 100644
--- a/src/mesa/shader/slang/slang_assemble_typeinfo.h
+++ b/src/mesa/shader/slang/slang_assemble_typeinfo.h
@@ -1,116 +1,116 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#if !defined SLANG_ASSEMBLE_TYPEINFO_H
-#define SLANG_ASSEMBLE_TYPEINFO_H
-
-#if defined __cplusplus
-extern "C" {
-#endif
-
-typedef enum slang_type_specifier_type_
-{
- slang_spec_void,
- slang_spec_bool,
- slang_spec_bvec2,
- slang_spec_bvec3,
- slang_spec_bvec4,
- slang_spec_int,
- slang_spec_ivec2,
- slang_spec_ivec3,
- slang_spec_ivec4,
- slang_spec_float,
- slang_spec_vec2,
- slang_spec_vec3,
- slang_spec_vec4,
- slang_spec_mat2,
- slang_spec_mat3,
- slang_spec_mat4,
- slang_spec_sampler1D,
- slang_spec_sampler2D,
- slang_spec_sampler3D,
- slang_spec_samplerCube,
- slang_spec_sampler1DShadow,
- slang_spec_sampler2DShadow,
- slang_spec_struct,
- slang_spec_array
-} slang_type_specifier_type;
-
-typedef struct slang_type_specifier_
-{
- slang_type_specifier_type type;
- struct slang_struct_ *_struct; /* type: spec_struct */
- struct slang_type_specifier_ *_array; /* type: spec_array */
-} slang_type_specifier;
-
-GLvoid slang_type_specifier_ctr (slang_type_specifier *);
-GLvoid slang_type_specifier_dtr (slang_type_specifier *);
-GLboolean slang_type_specifier_copy (slang_type_specifier *, const slang_type_specifier *);
-GLboolean slang_type_specifier_equal (const slang_type_specifier *, const slang_type_specifier *);
-
-typedef struct slang_assembly_typeinfo_
-{
- GLboolean can_be_referenced;
- GLboolean is_swizzled;
- slang_swizzle swz;
- slang_type_specifier spec;
- GLuint array_len;
-} slang_assembly_typeinfo;
-
-GLboolean slang_assembly_typeinfo_construct (slang_assembly_typeinfo *);
-GLvoid slang_assembly_typeinfo_destruct (slang_assembly_typeinfo *);
-
-/*
- * Retrieves type information about an operation.
- * Returns GL_TRUE on success.
- * Returns GL_FALSE otherwise.
- */
-GLboolean _slang_typeof_operation (slang_assemble_ctx *, struct slang_operation_ *,
- slang_assembly_typeinfo *);
-GLboolean _slang_typeof_operation_ (struct slang_operation_ *, slang_assembly_name_space *,
- slang_assembly_typeinfo *, slang_atom_pool *);
-
-/*
- * Retrieves type of a function prototype, if one exists.
- * Returns GL_TRUE on success, even if the function was not found.
- * Returns GL_FALSE otherwise.
- */
-GLboolean _slang_typeof_function (slang_atom a_name, struct slang_operation_ *params,
- GLuint num_params, slang_assembly_name_space *, slang_type_specifier *spec, GLboolean *exists,
- slang_atom_pool *);
-
-GLboolean _slang_type_is_matrix (slang_type_specifier_type);
-
-GLboolean _slang_type_is_vector (slang_type_specifier_type);
-
-slang_type_specifier_type _slang_type_base (slang_type_specifier_type);
-
-GLuint _slang_type_dim (slang_type_specifier_type);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#if !defined SLANG_ASSEMBLE_TYPEINFO_H
+#define SLANG_ASSEMBLE_TYPEINFO_H
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+typedef enum slang_type_specifier_type_
+{
+ slang_spec_void,
+ slang_spec_bool,
+ slang_spec_bvec2,
+ slang_spec_bvec3,
+ slang_spec_bvec4,
+ slang_spec_int,
+ slang_spec_ivec2,
+ slang_spec_ivec3,
+ slang_spec_ivec4,
+ slang_spec_float,
+ slang_spec_vec2,
+ slang_spec_vec3,
+ slang_spec_vec4,
+ slang_spec_mat2,
+ slang_spec_mat3,
+ slang_spec_mat4,
+ slang_spec_sampler1D,
+ slang_spec_sampler2D,
+ slang_spec_sampler3D,
+ slang_spec_samplerCube,
+ slang_spec_sampler1DShadow,
+ slang_spec_sampler2DShadow,
+ slang_spec_struct,
+ slang_spec_array
+} slang_type_specifier_type;
+
+typedef struct slang_type_specifier_
+{
+ slang_type_specifier_type type;
+ struct slang_struct_ *_struct; /* type: spec_struct */
+ struct slang_type_specifier_ *_array; /* type: spec_array */
+} slang_type_specifier;
+
+GLvoid slang_type_specifier_ctr (slang_type_specifier *);
+GLvoid slang_type_specifier_dtr (slang_type_specifier *);
+GLboolean slang_type_specifier_copy (slang_type_specifier *, const slang_type_specifier *);
+GLboolean slang_type_specifier_equal (const slang_type_specifier *, const slang_type_specifier *);
+
+typedef struct slang_assembly_typeinfo_
+{
+ GLboolean can_be_referenced;
+ GLboolean is_swizzled;
+ slang_swizzle swz;
+ slang_type_specifier spec;
+ GLuint array_len;
+} slang_assembly_typeinfo;
+
+GLboolean slang_assembly_typeinfo_construct (slang_assembly_typeinfo *);
+GLvoid slang_assembly_typeinfo_destruct (slang_assembly_typeinfo *);
+
+/*
+ * Retrieves type information about an operation.
+ * Returns GL_TRUE on success.
+ * Returns GL_FALSE otherwise.
+ */
+GLboolean _slang_typeof_operation (slang_assemble_ctx *, struct slang_operation_ *,
+ slang_assembly_typeinfo *);
+GLboolean _slang_typeof_operation_ (struct slang_operation_ *, slang_assembly_name_space *,
+ slang_assembly_typeinfo *, slang_atom_pool *);
+
+/*
+ * Retrieves type of a function prototype, if one exists.
+ * Returns GL_TRUE on success, even if the function was not found.
+ * Returns GL_FALSE otherwise.
+ */
+GLboolean _slang_typeof_function (slang_atom a_name, struct slang_operation_ *params,
+ GLuint num_params, slang_assembly_name_space *, slang_type_specifier *spec, GLboolean *exists,
+ slang_atom_pool *);
+
+GLboolean _slang_type_is_matrix (slang_type_specifier_type);
+
+GLboolean _slang_type_is_vector (slang_type_specifier_type);
+
+slang_type_specifier_type _slang_type_base (slang_type_specifier_type);
+
+GLuint _slang_type_dim (slang_type_specifier_type);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/src/mesa/shader/slang/slang_compile.h b/src/mesa/shader/slang/slang_compile.h
index cbf0bf907a..a1957bc3cf 100644
--- a/src/mesa/shader/slang/slang_compile.h
+++ b/src/mesa/shader/slang/slang_compile.h
@@ -23,13 +23,13 @@
*/
#if !defined SLANG_COMPILE_H
-#define SLANG_COMPILE_H
-
-#include "slang_export.h"
-#include "slang_execute.h"
-#include "slang_compile_variable.h"
-#include "slang_compile_struct.h"
-#include "slang_compile_operation.h"
+#define SLANG_COMPILE_H
+
+#include "slang_export.h"
+#include "slang_execute.h"
+#include "slang_compile_variable.h"
+#include "slang_compile_struct.h"
+#include "slang_compile_operation.h"
#include "slang_compile_function.h"
#if defined __cplusplus
@@ -42,33 +42,33 @@ typedef enum slang_unit_type_
slang_unit_vertex_shader,
slang_unit_fragment_builtin,
slang_unit_vertex_builtin
-} slang_unit_type;
-
-typedef struct slang_var_pool_
-{
- GLuint next_addr;
-} slang_var_pool;
-
+} slang_unit_type;
+
+typedef struct slang_var_pool_
+{
+ GLuint next_addr;
+} slang_var_pool;
+
typedef struct slang_translation_unit_
{
slang_variable_scope globals;
slang_function_scope functions;
slang_struct_scope structs;
- slang_unit_type type;
- slang_assembly_file *assembly;
- int free_assembly;
- slang_var_pool *global_pool;
- int free_global_pool;
- slang_machine *machine;
- int free_machine;
- slang_atom_pool *atom_pool;
- int free_atom_pool;
- slang_export_data_table exp_data;
+ slang_unit_type type;
+ slang_assembly_file *assembly;
+ int free_assembly;
+ slang_var_pool *global_pool;
+ int free_global_pool;
+ slang_machine *machine;
+ int free_machine;
+ slang_atom_pool *atom_pool;
+ int free_atom_pool;
+ slang_export_data_table exp_data;
slang_export_code_table exp_code;
} slang_translation_unit;
-int slang_translation_unit_construct (slang_translation_unit *);
-int slang_translation_unit_construct2 (slang_translation_unit *, slang_assembly_file *,
+int slang_translation_unit_construct (slang_translation_unit *);
+int slang_translation_unit_construct2 (slang_translation_unit *, slang_assembly_file *,
slang_var_pool *, slang_machine *, slang_atom_pool *);
void slang_translation_unit_destruct (slang_translation_unit *);
diff --git a/src/mesa/shader/slang/slang_compile_function.c b/src/mesa/shader/slang/slang_compile_function.c
index 60d9e3360b..ff9854f33b 100644
--- a/src/mesa/shader/slang/slang_compile_function.c
+++ b/src/mesa/shader/slang/slang_compile_function.c
@@ -1,190 +1,190 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_compile_function.c
- * slang front-end compiler
- * \author Michal Krol
- */
-
-#include "imports.h"
-#include "slang_compile.h"
-
-/* slang_fixup_table */
-
-void slang_fixup_table_init (slang_fixup_table *fix)
-{
- fix->table = NULL;
- fix->count = 0;
-}
-
-void slang_fixup_table_free (slang_fixup_table *fix)
-{
- slang_alloc_free (fix->table);
- slang_fixup_table_init (fix);
-}
-
-/* slang_function */
-
-int slang_function_construct (slang_function *func)
-{
- func->kind = slang_func_ordinary;
- if (!slang_variable_construct (&func->header))
- return 0;
- func->parameters = (slang_variable_scope *) slang_alloc_malloc (sizeof (slang_variable_scope));
- if (func->parameters == NULL)
- {
- slang_variable_destruct (&func->header);
- return 0;
- }
- if (!slang_variable_scope_construct (func->parameters))
- {
- slang_alloc_free (func->parameters);
- slang_variable_destruct (&func->header);
- return 0;
- }
- func->param_count = 0;
- func->body = NULL;
- func->address = ~0;
- slang_fixup_table_init (&func->fixups);
- return 1;
-}
-
-void slang_function_destruct (slang_function *func)
-{
- slang_variable_destruct (&func->header);
- slang_variable_scope_destruct (func->parameters);
- slang_alloc_free (func->parameters);
- if (func->body != NULL)
- {
- slang_operation_destruct (func->body);
- slang_alloc_free (func->body);
- }
- slang_fixup_table_free (&func->fixups);
-}
-
-/* slang_function_scope */
-
-int slang_function_scope_construct (slang_function_scope *scope)
-{
- scope->functions = NULL;
- scope->num_functions = 0;
- scope->outer_scope = NULL;
- return 1;
-}
-
-void slang_function_scope_destruct (slang_function_scope *scope)
-{
- unsigned int i;
-
- for (i = 0; i < scope->num_functions; i++)
- slang_function_destruct (scope->functions + i);
- slang_alloc_free (scope->functions);
-}
-
-int slang_function_scope_find_by_name (slang_function_scope *funcs, slang_atom a_name, int all_scopes)
-{
- unsigned int i;
-
- for (i = 0; i < funcs->num_functions; i++)
- if (a_name == funcs->functions[i].header.a_name)
- return 1;
- if (all_scopes && funcs->outer_scope != NULL)
- return slang_function_scope_find_by_name (funcs->outer_scope, a_name, 1);
- return 0;
-}
-
-slang_function *slang_function_scope_find (slang_function_scope *funcs, slang_function *fun,
- int all_scopes)
-{
- unsigned int i;
-
- for (i = 0; i < funcs->num_functions; i++)
- {
- slang_function *f = &funcs->functions[i];
- unsigned int j;
-
- if (fun->header.a_name != f->header.a_name)
- continue;
- if (fun->param_count != f->param_count)
- continue;
- for (j = 0; j < fun->param_count; j++)
- {
- if (!slang_type_specifier_equal (&fun->parameters->variables[j].type.specifier,
- &f->parameters->variables[j].type.specifier))
- break;
- }
- if (j == fun->param_count)
- return f;
- }
- if (all_scopes && funcs->outer_scope != NULL)
- return slang_function_scope_find (funcs->outer_scope, fun, 1);
- return NULL;
-}
-
-/*
- * _slang_build_export_code_table()
- */
-
-GLboolean _slang_build_export_code_table (slang_export_code_table *tbl, slang_function_scope *funs,
- slang_translation_unit *unit)
-{
- slang_atom mainAtom;
- GLuint i;
-
- mainAtom = slang_atom_pool_atom (tbl->atoms, "main");
- if (mainAtom == SLANG_ATOM_NULL)
- return GL_FALSE;
-
- for (i = 0; i < funs->num_functions; i++)
- {
- if (funs->functions[i].header.a_name == mainAtom)
- {
- slang_function *fun = &funs->functions[i];
- slang_export_code_entry *e;
- slang_assemble_ctx A;
-
- e = slang_export_code_table_add (tbl);
- if (e == NULL)
- return GL_FALSE;
- e->address = unit->assembly->count;
- e->name = slang_atom_pool_atom (tbl->atoms, "@main");
- if (e->name == SLANG_ATOM_NULL)
- return GL_FALSE;
-
- A.file = unit->assembly;
- A.mach = unit->machine;
- A.atoms = unit->atom_pool;
- A.space.funcs = &unit->functions;
- A.space.structs = &unit->structs;
- A.space.vars = &unit->globals;
- slang_assembly_file_push_label (unit->assembly, slang_asm_local_alloc, 20);
- slang_assembly_file_push_label (unit->assembly, slang_asm_enter, 20);
- _slang_assemble_function_call (&A, fun, NULL, 0, GL_FALSE);
- slang_assembly_file_push (unit->assembly, slang_asm_exit);
- }
- }
- return GL_TRUE;
-}
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file slang_compile_function.c
+ * slang front-end compiler
+ * \author Michal Krol
+ */
+
+#include "imports.h"
+#include "slang_compile.h"
+
+/* slang_fixup_table */
+
+void slang_fixup_table_init (slang_fixup_table *fix)
+{
+ fix->table = NULL;
+ fix->count = 0;
+}
+
+void slang_fixup_table_free (slang_fixup_table *fix)
+{
+ slang_alloc_free (fix->table);
+ slang_fixup_table_init (fix);
+}
+
+/* slang_function */
+
+int slang_function_construct (slang_function *func)
+{
+ func->kind = slang_func_ordinary;
+ if (!slang_variable_construct (&func->header))
+ return 0;
+ func->parameters = (slang_variable_scope *) slang_alloc_malloc (sizeof (slang_variable_scope));
+ if (func->parameters == NULL)
+ {
+ slang_variable_destruct (&func->header);
+ return 0;
+ }
+ if (!slang_variable_scope_construct (func->parameters))
+ {
+ slang_alloc_free (func->parameters);
+ slang_variable_destruct (&func->header);
+ return 0;
+ }
+ func->param_count = 0;
+ func->body = NULL;
+ func->address = ~0;
+ slang_fixup_table_init (&func->fixups);
+ return 1;
+}
+
+void slang_function_destruct (slang_function *func)
+{
+ slang_variable_destruct (&func->header);
+ slang_variable_scope_destruct (func->parameters);
+ slang_alloc_free (func->parameters);
+ if (func->body != NULL)
+ {
+ slang_operation_destruct (func->body);
+ slang_alloc_free (func->body);
+ }
+ slang_fixup_table_free (&func->fixups);
+}
+
+/* slang_function_scope */
+
+int slang_function_scope_construct (slang_function_scope *scope)
+{
+ scope->functions = NULL;
+ scope->num_functions = 0;
+ scope->outer_scope = NULL;
+ return 1;
+}
+
+void slang_function_scope_destruct (slang_function_scope *scope)
+{
+ unsigned int i;
+
+ for (i = 0; i < scope->num_functions; i++)
+ slang_function_destruct (scope->functions + i);
+ slang_alloc_free (scope->functions);
+}
+
+int slang_function_scope_find_by_name (slang_function_scope *funcs, slang_atom a_name, int all_scopes)
+{
+ unsigned int i;
+
+ for (i = 0; i < funcs->num_functions; i++)
+ if (a_name == funcs->functions[i].header.a_name)
+ return 1;
+ if (all_scopes && funcs->outer_scope != NULL)
+ return slang_function_scope_find_by_name (funcs->outer_scope, a_name, 1);
+ return 0;
+}
+
+slang_function *slang_function_scope_find (slang_function_scope *funcs, slang_function *fun,
+ int all_scopes)
+{
+ unsigned int i;
+
+ for (i = 0; i < funcs->num_functions; i++)
+ {
+ slang_function *f = &funcs->functions[i];
+ unsigned int j;
+
+ if (fun->header.a_name != f->header.a_name)
+ continue;
+ if (fun->param_count != f->param_count)
+ continue;
+ for (j = 0; j < fun->param_count; j++)
+ {
+ if (!slang_type_specifier_equal (&fun->parameters->variables[j].type.specifier,
+ &f->parameters->variables[j].type.specifier))
+ break;
+ }
+ if (j == fun->param_count)
+ return f;
+ }
+ if (all_scopes && funcs->outer_scope != NULL)
+ return slang_function_scope_find (funcs->outer_scope, fun, 1);
+ return NULL;
+}
+
+/*
+ * _slang_build_export_code_table()
+ */
+
+GLboolean _slang_build_export_code_table (slang_export_code_table *tbl, slang_function_scope *funs,
+ slang_translation_unit *unit)
+{
+ slang_atom mainAtom;
+ GLuint i;
+
+ mainAtom = slang_atom_pool_atom (tbl->atoms, "main");
+ if (mainAtom == SLANG_ATOM_NULL)
+ return GL_FALSE;
+
+ for (i = 0; i < funs->num_functions; i++)
+ {
+ if (funs->functions[i].header.a_name == mainAtom)
+ {
+ slang_function *fun = &funs->functions[i];
+ slang_export_code_entry *e;
+ slang_assemble_ctx A;
+
+ e = slang_export_code_table_add (tbl);
+ if (e == NULL)
+ return GL_FALSE;
+ e->address = unit->assembly->count;
+ e->name = slang_atom_pool_atom (tbl->atoms, "@main");
+ if (e->name == SLANG_ATOM_NULL)
+ return GL_FALSE;
+
+ A.file = unit->assembly;
+ A.mach = unit->machine;
+ A.atoms = unit->atom_pool;
+ A.space.funcs = &unit->functions;
+ A.space.structs = &unit->structs;
+ A.space.vars = &unit->globals;
+ slang_assembly_file_push_label (unit->assembly, slang_asm_local_alloc, 20);
+ slang_assembly_file_push_label (unit->assembly, slang_asm_enter, 20);
+ _slang_assemble_function_call (&A, fun, NULL, 0, GL_FALSE);
+ slang_assembly_file_push (unit->assembly, slang_asm_exit);
+ }
+ }
+ return GL_TRUE;
+}
+
diff --git a/src/mesa/shader/slang/slang_compile_function.h b/src/mesa/shader/slang/slang_compile_function.h
index 0c88434539..b1f2bc7565 100644
--- a/src/mesa/shader/slang/slang_compile_function.h
+++ b/src/mesa/shader/slang/slang_compile_function.h
@@ -1,84 +1,84 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#if !defined SLANG_COMPILE_FUNCTION_H
-#define SLANG_COMPILE_FUNCTION_H
-
-#if defined __cplusplus
-extern "C" {
-#endif
-
-struct slang_translation_unit_;
-
-typedef enum slang_function_kind_
-{
- slang_func_ordinary,
- slang_func_constructor,
- slang_func_operator
-} slang_function_kind;
-
-typedef struct slang_fixup_table_
-{
- GLuint *table;
- GLuint count;
-} slang_fixup_table;
-
-void slang_fixup_table_init (slang_fixup_table *);
-void slang_fixup_table_free (slang_fixup_table *);
-
-typedef struct slang_function_
-{
- slang_function_kind kind;
- slang_variable header;
- slang_variable_scope *parameters;
- unsigned int param_count;
- slang_operation *body;
- unsigned int address;
- slang_fixup_table fixups;
-} slang_function;
-
-int slang_function_construct (slang_function *);
-void slang_function_destruct (slang_function *);
-
-typedef struct slang_function_scope_
-{
- slang_function *functions;
- unsigned int num_functions;
- struct slang_function_scope_ *outer_scope;
-} slang_function_scope;
-
-int slang_function_scope_construct (slang_function_scope *);
-void slang_function_scope_destruct (slang_function_scope *);
-int slang_function_scope_find_by_name (slang_function_scope *, slang_atom, int);
-slang_function *slang_function_scope_find (slang_function_scope *, slang_function *, int);
-
-GLboolean _slang_build_export_code_table (slang_export_code_table *, slang_function_scope *,
- struct slang_translation_unit_ *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#if !defined SLANG_COMPILE_FUNCTION_H
+#define SLANG_COMPILE_FUNCTION_H
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+struct slang_translation_unit_;
+
+typedef enum slang_function_kind_
+{
+ slang_func_ordinary,
+ slang_func_constructor,
+ slang_func_operator
+} slang_function_kind;
+
+typedef struct slang_fixup_table_
+{
+ GLuint *table;
+ GLuint count;
+} slang_fixup_table;
+
+void slang_fixup_table_init (slang_fixup_table *);
+void slang_fixup_table_free (slang_fixup_table *);
+
+typedef struct slang_function_
+{
+ slang_function_kind kind;
+ slang_variable header;
+ slang_variable_scope *parameters;
+ unsigned int param_count;
+ slang_operation *body;
+ unsigned int address;
+ slang_fixup_table fixups;
+} slang_function;
+
+int slang_function_construct (slang_function *);
+void slang_function_destruct (slang_function *);
+
+typedef struct slang_function_scope_
+{
+ slang_function *functions;
+ unsigned int num_functions;
+ struct slang_function_scope_ *outer_scope;
+} slang_function_scope;
+
+int slang_function_scope_construct (slang_function_scope *);
+void slang_function_scope_destruct (slang_function_scope *);
+int slang_function_scope_find_by_name (slang_function_scope *, slang_atom, int);
+slang_function *slang_function_scope_find (slang_function_scope *, slang_function *, int);
+
+GLboolean _slang_build_export_code_table (slang_export_code_table *, slang_function_scope *,
+ struct slang_translation_unit_ *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/src/mesa/shader/slang/slang_compile_operation.c b/src/mesa/shader/slang/slang_compile_operation.c
index 8af8d1f82b..30df4b00a9 100644
--- a/src/mesa/shader/slang/slang_compile_operation.c
+++ b/src/mesa/shader/slang/slang_compile_operation.c
@@ -1,102 +1,102 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_compile_operation.c
- * slang front-end compiler
- * \author Michal Krol
- */
-
-#include "imports.h"
-#include "slang_compile.h"
-
-/* slang_operation */
-
-int slang_operation_construct (slang_operation *oper)
-{
- oper->type = slang_oper_none;
- oper->children = NULL;
- oper->num_children = 0;
- oper->literal = (float) 0;
- oper->a_id = SLANG_ATOM_NULL;
- oper->locals = (slang_variable_scope *) slang_alloc_malloc (sizeof (slang_variable_scope));
- if (oper->locals == NULL)
- return 0;
- if (!slang_variable_scope_construct (oper->locals))
- {
- slang_alloc_free (oper->locals);
- return 0;
- }
- return 1;
-}
-
-void slang_operation_destruct (slang_operation *oper)
-{
- unsigned int i;
-
- for (i = 0; i < oper->num_children; i++)
- slang_operation_destruct (oper->children + i);
- slang_alloc_free (oper->children);
- slang_variable_scope_destruct (oper->locals);
- slang_alloc_free (oper->locals);
-}
-
-int slang_operation_copy (slang_operation *x, const slang_operation *y)
-{
- slang_operation z;
- unsigned int i;
-
- if (!slang_operation_construct (&z))
- return 0;
- z.type = y->type;
- z.children = (slang_operation *) slang_alloc_malloc (y->num_children * sizeof (slang_operation));
- if (z.children == NULL)
- {
- slang_operation_destruct (&z);
- return 0;
- }
- for (z.num_children = 0; z.num_children < y->num_children; z.num_children++)
- if (!slang_operation_construct (&z.children[z.num_children]))
- {
- slang_operation_destruct (&z);
- return 0;
- }
- for (i = 0; i < z.num_children; i++)
- if (!slang_operation_copy (&z.children[i], &y->children[i]))
- {
- slang_operation_destruct (&z);
- return 0;
- }
- z.literal = y->literal;
- z.a_id = y->a_id;
- if (!slang_variable_scope_copy (z.locals, y->locals))
- {
- slang_operation_destruct (&z);
- return 0;
- }
- slang_operation_destruct (x);
- *x = z;
- return 1;
-}
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file slang_compile_operation.c
+ * slang front-end compiler
+ * \author Michal Krol
+ */
+
+#include "imports.h"
+#include "slang_compile.h"
+
+/* slang_operation */
+
+int slang_operation_construct (slang_operation *oper)
+{
+ oper->type = slang_oper_none;
+ oper->children = NULL;
+ oper->num_children = 0;
+ oper->literal = (float) 0;
+ oper->a_id = SLANG_ATOM_NULL;
+ oper->locals = (slang_variable_scope *) slang_alloc_malloc (sizeof (slang_variable_scope));
+ if (oper->locals == NULL)
+ return 0;
+ if (!slang_variable_scope_construct (oper->locals))
+ {
+ slang_alloc_free (oper->locals);
+ return 0;
+ }
+ return 1;
+}
+
+void slang_operation_destruct (slang_operation *oper)
+{
+ unsigned int i;
+
+ for (i = 0; i < oper->num_children; i++)
+ slang_operation_destruct (oper->children + i);
+ slang_alloc_free (oper->children);
+ slang_variable_scope_destruct (oper->locals);
+ slang_alloc_free (oper->locals);
+}
+
+int slang_operation_copy (slang_operation *x, const slang_operation *y)
+{
+ slang_operation z;
+ unsigned int i;
+
+ if (!slang_operation_construct (&z))
+ return 0;
+ z.type = y->type;
+ z.children = (slang_operation *) slang_alloc_malloc (y->num_children * sizeof (slang_operation));
+ if (z.children == NULL)
+ {
+ slang_operation_destruct (&z);
+ return 0;
+ }
+ for (z.num_children = 0; z.num_children < y->num_children; z.num_children++)
+ if (!slang_operation_construct (&z.children[z.num_children]))
+ {
+ slang_operation_destruct (&z);
+ return 0;
+ }
+ for (i = 0; i < z.num_children; i++)
+ if (!slang_operation_copy (&z.children[i], &y->children[i]))
+ {
+ slang_operation_destruct (&z);
+ return 0;
+ }
+ z.literal = y->literal;
+ z.a_id = y->a_id;
+ if (!slang_variable_scope_copy (z.locals, y->locals))
+ {
+ slang_operation_destruct (&z);
+ return 0;
+ }
+ slang_operation_destruct (x);
+ *x = z;
+ return 1;
+}
+
diff --git a/src/mesa/shader/slang/slang_compile_operation.h b/src/mesa/shader/slang/slang_compile_operation.h
index 9e64848a0a..d9bce36b9b 100644
--- a/src/mesa/shader/slang/slang_compile_operation.h
+++ b/src/mesa/shader/slang/slang_compile_operation.h
@@ -1,117 +1,117 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#if !defined SLANG_COMPILE_OPERATION_H
-#define SLANG_COMPILE_OPERATION_H
-
-#if defined __cplusplus
-extern "C" {
-#endif
-
-typedef enum slang_operation_type_
-{
- slang_oper_none,
- slang_oper_block_no_new_scope,
- slang_oper_block_new_scope,
- slang_oper_variable_decl,
- slang_oper_asm,
- slang_oper_break,
- slang_oper_continue,
- slang_oper_discard,
- slang_oper_return,
- slang_oper_expression,
- slang_oper_if,
- slang_oper_while,
- slang_oper_do,
- slang_oper_for,
- slang_oper_void,
- slang_oper_literal_bool,
- slang_oper_literal_int,
- slang_oper_literal_float,
- slang_oper_identifier,
- slang_oper_sequence,
- slang_oper_assign,
- slang_oper_addassign,
- slang_oper_subassign,
- slang_oper_mulassign,
- slang_oper_divassign,
- /*slang_oper_modassign,*/
- /*slang_oper_lshassign,*/
- /*slang_oper_rshassign,*/
- /*slang_oper_orassign,*/
- /*slang_oper_xorassign,*/
- /*slang_oper_andassign,*/
- slang_oper_select,
- slang_oper_logicalor,
- slang_oper_logicalxor,
- slang_oper_logicaland,
- /*slang_oper_bitor,*/
- /*slang_oper_bitxor,*/
- /*slang_oper_bitand,*/
- slang_oper_equal,
- slang_oper_notequal,
- slang_oper_less,
- slang_oper_greater,
- slang_oper_lessequal,
- slang_oper_greaterequal,
- /*slang_oper_lshift,*/
- /*slang_oper_rshift,*/
- slang_oper_add,
- slang_oper_subtract,
- slang_oper_multiply,
- slang_oper_divide,
- /*slang_oper_modulus,*/
- slang_oper_preincrement,
- slang_oper_predecrement,
- slang_oper_plus,
- slang_oper_minus,
- /*slang_oper_complement,*/
- slang_oper_not,
- slang_oper_subscript,
- slang_oper_call,
- slang_oper_field,
- slang_oper_postincrement,
- slang_oper_postdecrement
-} slang_operation_type;
-
-typedef struct slang_operation_
-{
- slang_operation_type type;
- struct slang_operation_ *children;
- unsigned int num_children;
- float literal; /* type: bool, literal_int, literal_float */
- slang_atom a_id; /* type: asm, identifier, call, field */
- slang_variable_scope *locals;
-} slang_operation;
-
-int slang_operation_construct (slang_operation *);
-void slang_operation_destruct (slang_operation *);
-int slang_operation_copy (slang_operation *, const slang_operation *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#if !defined SLANG_COMPILE_OPERATION_H
+#define SLANG_COMPILE_OPERATION_H
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+typedef enum slang_operation_type_
+{
+ slang_oper_none,
+ slang_oper_block_no_new_scope,
+ slang_oper_block_new_scope,
+ slang_oper_variable_decl,
+ slang_oper_asm,
+ slang_oper_break,
+ slang_oper_continue,
+ slang_oper_discard,
+ slang_oper_return,
+ slang_oper_expression,
+ slang_oper_if,
+ slang_oper_while,
+ slang_oper_do,
+ slang_oper_for,
+ slang_oper_void,
+ slang_oper_literal_bool,
+ slang_oper_literal_int,
+ slang_oper_literal_float,
+ slang_oper_identifier,
+ slang_oper_sequence,
+ slang_oper_assign,
+ slang_oper_addassign,
+ slang_oper_subassign,
+ slang_oper_mulassign,
+ slang_oper_divassign,
+ /*slang_oper_modassign,*/
+ /*slang_oper_lshassign,*/
+ /*slang_oper_rshassign,*/
+ /*slang_oper_orassign,*/
+ /*slang_oper_xorassign,*/
+ /*slang_oper_andassign,*/
+ slang_oper_select,
+ slang_oper_logicalor,
+ slang_oper_logicalxor,
+ slang_oper_logicaland,
+ /*slang_oper_bitor,*/
+ /*slang_oper_bitxor,*/
+ /*slang_oper_bitand,*/
+ slang_oper_equal,
+ slang_oper_notequal,
+ slang_oper_less,
+ slang_oper_greater,
+ slang_oper_lessequal,
+ slang_oper_greaterequal,
+ /*slang_oper_lshift,*/
+ /*slang_oper_rshift,*/
+ slang_oper_add,
+ slang_oper_subtract,
+ slang_oper_multiply,
+ slang_oper_divide,
+ /*slang_oper_modulus,*/
+ slang_oper_preincrement,
+ slang_oper_predecrement,
+ slang_oper_plus,
+ slang_oper_minus,
+ /*slang_oper_complement,*/
+ slang_oper_not,
+ slang_oper_subscript,
+ slang_oper_call,
+ slang_oper_field,
+ slang_oper_postincrement,
+ slang_oper_postdecrement
+} slang_operation_type;
+
+typedef struct slang_operation_
+{
+ slang_operation_type type;
+ struct slang_operation_ *children;
+ unsigned int num_children;
+ float literal; /* type: bool, literal_int, literal_float */
+ slang_atom a_id; /* type: asm, identifier, call, field */
+ slang_variable_scope *locals;
+} slang_operation;
+
+int slang_operation_construct (slang_operation *);
+void slang_operation_destruct (slang_operation *);
+int slang_operation_copy (slang_operation *, const slang_operation *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/src/mesa/shader/slang/slang_compile_struct.c b/src/mesa/shader/slang/slang_compile_struct.c
index 627f0597e1..c8f851b4ad 100644
--- a/src/mesa/shader/slang/slang_compile_struct.c
+++ b/src/mesa/shader/slang/slang_compile_struct.c
@@ -1,178 +1,178 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_compile_struct.c
- * slang front-end compiler
- * \author Michal Krol
- */
-
-#include "imports.h"
-#include "slang_compile.h"
-
-/* slang_struct_scope */
-
-int slang_struct_scope_construct (slang_struct_scope *scope)
-{
- scope->structs = NULL;
- scope->num_structs = 0;
- scope->outer_scope = NULL;
- return 1;
-}
-
-void slang_struct_scope_destruct (slang_struct_scope *scope)
-{
- unsigned int i;
-
- for (i = 0; i < scope->num_structs; i++)
- slang_struct_destruct (scope->structs + i);
- slang_alloc_free (scope->structs);
- /* do not free scope->outer_scope */
-}
-
-int slang_struct_scope_copy (slang_struct_scope *x, const slang_struct_scope *y)
-{
- slang_struct_scope z;
- unsigned int i;
-
- if (!slang_struct_scope_construct (&z))
- return 0;
- z.structs = (slang_struct *) slang_alloc_malloc (y->num_structs * sizeof (slang_struct));
- if (z.structs == NULL)
- {
- slang_struct_scope_destruct (&z);
- return 0;
- }
- for (z.num_structs = 0; z.num_structs < y->num_structs; z.num_structs++)
- if (!slang_struct_construct (&z.structs[z.num_structs]))
- {
- slang_struct_scope_destruct (&z);
- return 0;
- }
- for (i = 0; i < z.num_structs; i++)
- if (!slang_struct_copy (&z.structs[i], &y->structs[i]))
- {
- slang_struct_scope_destruct (&z);
- return 0;
- }
- z.outer_scope = y->outer_scope;
- slang_struct_scope_destruct (x);
- *x = z;
- return 1;
-}
-
-slang_struct *slang_struct_scope_find (slang_struct_scope *stru, slang_atom a_name, int all_scopes)
-{
- unsigned int i;
-
- for (i = 0; i < stru->num_structs; i++)
- if (a_name == stru->structs[i].a_name)
- return &stru->structs[i];
- if (all_scopes && stru->outer_scope != NULL)
- return slang_struct_scope_find (stru->outer_scope, a_name, 1);
- return NULL;
-}
-
-/* slang_struct */
-
-int slang_struct_construct (slang_struct *stru)
-{
- stru->a_name = SLANG_ATOM_NULL;
- stru->fields = (slang_variable_scope *) slang_alloc_malloc (sizeof (slang_variable_scope));
- if (stru->fields == NULL)
- return 0;
- if (!slang_variable_scope_construct (stru->fields))
- {
- slang_alloc_free (stru->fields);
- return 0;
- }
- stru->structs = (slang_struct_scope *) slang_alloc_malloc (sizeof (slang_struct_scope));
- if (stru->structs == NULL)
- {
- slang_variable_scope_destruct (stru->fields);
- slang_alloc_free (stru->fields);
- return 0;
- }
- if (!slang_struct_scope_construct (stru->structs))
- {
- slang_variable_scope_destruct (stru->fields);
- slang_alloc_free (stru->fields);
- slang_alloc_free (stru->structs);
- return 0;
- }
- return 1;
-}
-
-void slang_struct_destruct (slang_struct *stru)
-{
- slang_variable_scope_destruct (stru->fields);
- slang_alloc_free (stru->fields);
- slang_struct_scope_destruct (stru->structs);
- slang_alloc_free (stru->structs);
-}
-
-int slang_struct_copy (slang_struct *x, const slang_struct *y)
-{
- slang_struct z;
-
- if (!slang_struct_construct (&z))
- return 0;
- z.a_name = y->a_name;
- if (!slang_variable_scope_copy (z.fields, y->fields))
- {
- slang_struct_destruct (&z);
- return 0;
- }
- if (!slang_struct_scope_copy (z.structs, y->structs))
- {
- slang_struct_destruct (&z);
- return 0;
- }
- slang_struct_destruct (x);
- *x = z;
- return 1;
-}
-
-int slang_struct_equal (const slang_struct *x, const slang_struct *y)
-{
- unsigned int i;
-
- if (x->fields->num_variables != y->fields->num_variables)
- return 0;
- for (i = 0; i < x->fields->num_variables; i++)
- {
- slang_variable *varx = &x->fields->variables[i];
- slang_variable *vary = &y->fields->variables[i];
-
- if (varx->a_name != vary->a_name)
- return 0;
- if (!slang_type_specifier_equal (&varx->type.specifier, &vary->type.specifier))
- return 0;
- if (varx->type.specifier.type == slang_spec_array)
- if (varx->array_len != vary->array_len)
- return GL_FALSE;
- }
- return 1;
-}
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file slang_compile_struct.c
+ * slang front-end compiler
+ * \author Michal Krol
+ */
+
+#include "imports.h"
+#include "slang_compile.h"
+
+/* slang_struct_scope */
+
+int slang_struct_scope_construct (slang_struct_scope *scope)
+{
+ scope->structs = NULL;
+ scope->num_structs = 0;
+ scope->outer_scope = NULL;
+ return 1;
+}
+
+void slang_struct_scope_destruct (slang_struct_scope *scope)
+{
+ unsigned int i;
+
+ for (i = 0; i < scope->num_structs; i++)
+ slang_struct_destruct (scope->structs + i);
+ slang_alloc_free (scope->structs);
+ /* do not free scope->outer_scope */
+}
+
+int slang_struct_scope_copy (slang_struct_scope *x, const slang_struct_scope *y)
+{
+ slang_struct_scope z;
+ unsigned int i;
+
+ if (!slang_struct_scope_construct (&z))
+ return 0;
+ z.structs = (slang_struct *) slang_alloc_malloc (y->num_structs * sizeof (slang_struct));
+ if (z.structs == NULL)
+ {
+ slang_struct_scope_destruct (&z);
+ return 0;
+ }
+ for (z.num_structs = 0; z.num_structs < y->num_structs; z.num_structs++)
+ if (!slang_struct_construct (&z.structs[z.num_structs]))
+ {
+ slang_struct_scope_destruct (&z);
+ return 0;
+ }
+ for (i = 0; i < z.num_structs; i++)
+ if (!slang_struct_copy (&z.structs[i], &y->structs[i]))
+ {
+ slang_struct_scope_destruct (&z);
+ return 0;
+ }
+ z.outer_scope = y->outer_scope;
+ slang_struct_scope_destruct (x);
+ *x = z;
+ return 1;
+}
+
+slang_struct *slang_struct_scope_find (slang_struct_scope *stru, slang_atom a_name, int all_scopes)
+{
+ unsigned int i;
+
+ for (i = 0; i < stru->num_structs; i++)
+ if (a_name == stru->structs[i].a_name)
+ return &stru->structs[i];
+ if (all_scopes && stru->outer_scope != NULL)
+ return slang_struct_scope_find (stru->outer_scope, a_name, 1);
+ return NULL;
+}
+
+/* slang_struct */
+
+int slang_struct_construct (slang_struct *stru)
+{
+ stru->a_name = SLANG_ATOM_NULL;
+ stru->fields = (slang_variable_scope *) slang_alloc_malloc (sizeof (slang_variable_scope));
+ if (stru->fields == NULL)
+ return 0;
+ if (!slang_variable_scope_construct (stru->fields))
+ {
+ slang_alloc_free (stru->fields);
+ return 0;
+ }
+ stru->structs = (slang_struct_scope *) slang_alloc_malloc (sizeof (slang_struct_scope));
+ if (stru->structs == NULL)
+ {
+ slang_variable_scope_destruct (stru->fields);
+ slang_alloc_free (stru->fields);
+ return 0;
+ }
+ if (!slang_struct_scope_construct (stru->structs))
+ {
+ slang_variable_scope_destruct (stru->fields);
+ slang_alloc_free (stru->fields);
+ slang_alloc_free (stru->structs);
+ return 0;
+ }
+ return 1;
+}
+
+void slang_struct_destruct (slang_struct *stru)
+{
+ slang_variable_scope_destruct (stru->fields);
+ slang_alloc_free (stru->fields);
+ slang_struct_scope_destruct (stru->structs);
+ slang_alloc_free (stru->structs);
+}
+
+int slang_struct_copy (slang_struct *x, const slang_struct *y)
+{
+ slang_struct z;
+
+ if (!slang_struct_construct (&z))
+ return 0;
+ z.a_name = y->a_name;
+ if (!slang_variable_scope_copy (z.fields, y->fields))
+ {
+ slang_struct_destruct (&z);
+ return 0;
+ }
+ if (!slang_struct_scope_copy (z.structs, y->structs))
+ {
+ slang_struct_destruct (&z);
+ return 0;
+ }
+ slang_struct_destruct (x);
+ *x = z;
+ return 1;
+}
+
+int slang_struct_equal (const slang_struct *x, const slang_struct *y)
+{
+ unsigned int i;
+
+ if (x->fields->num_variables != y->fields->num_variables)
+ return 0;
+ for (i = 0; i < x->fields->num_variables; i++)
+ {
+ slang_variable *varx = &x->fields->variables[i];
+ slang_variable *vary = &y->fields->variables[i];
+
+ if (varx->a_name != vary->a_name)
+ return 0;
+ if (!slang_type_specifier_equal (&varx->type.specifier, &vary->type.specifier))
+ return 0;
+ if (varx->type.specifier.type == slang_spec_array)
+ if (varx->array_len != vary->array_len)
+ return GL_FALSE;
+ }
+ return 1;
+}
+
diff --git a/src/mesa/shader/slang/slang_compile_struct.h b/src/mesa/shader/slang/slang_compile_struct.h
index 4798b6042f..a2a90704cd 100644
--- a/src/mesa/shader/slang/slang_compile_struct.h
+++ b/src/mesa/shader/slang/slang_compile_struct.h
@@ -1,61 +1,61 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#if !defined SLANG_COMPILE_STRUCT_H
-#define SLANG_COMPILE_STRUCT_H
-
-#if defined __cplusplus
-extern "C" {
-#endif
-
-typedef struct slang_struct_scope_
-{
- struct slang_struct_ *structs;
- unsigned int num_structs;
- struct slang_struct_scope_ *outer_scope;
-} slang_struct_scope;
-
-int slang_struct_scope_construct (slang_struct_scope *);
-void slang_struct_scope_destruct (slang_struct_scope *);
-int slang_struct_scope_copy (slang_struct_scope *, const slang_struct_scope *);
-struct slang_struct_ *slang_struct_scope_find (slang_struct_scope *, slang_atom, int);
-
-typedef struct slang_struct_
-{
- slang_atom a_name;
- struct slang_variable_scope_ *fields;
- slang_struct_scope *structs;
-} slang_struct;
-
-int slang_struct_construct (slang_struct *);
-void slang_struct_destruct (slang_struct *);
-int slang_struct_copy (slang_struct *, const slang_struct *);
-int slang_struct_equal (const slang_struct *, const slang_struct *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#if !defined SLANG_COMPILE_STRUCT_H
+#define SLANG_COMPILE_STRUCT_H
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+typedef struct slang_struct_scope_
+{
+ struct slang_struct_ *structs;
+ unsigned int num_structs;
+ struct slang_struct_scope_ *outer_scope;
+} slang_struct_scope;
+
+int slang_struct_scope_construct (slang_struct_scope *);
+void slang_struct_scope_destruct (slang_struct_scope *);
+int slang_struct_scope_copy (slang_struct_scope *, const slang_struct_scope *);
+struct slang_struct_ *slang_struct_scope_find (slang_struct_scope *, slang_atom, int);
+
+typedef struct slang_struct_
+{
+ slang_atom a_name;
+ struct slang_variable_scope_ *fields;
+ slang_struct_scope *structs;
+} slang_struct;
+
+int slang_struct_construct (slang_struct *);
+void slang_struct_destruct (slang_struct *);
+int slang_struct_copy (slang_struct *, const slang_struct *);
+int slang_struct_equal (const slang_struct *, const slang_struct *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/src/mesa/shader/slang/slang_compile_variable.c b/src/mesa/shader/slang/slang_compile_variable.c
index 0c8f6c5727..063709b303 100644
--- a/src/mesa/shader/slang/slang_compile_variable.c
+++ b/src/mesa/shader/slang/slang_compile_variable.c
@@ -1,369 +1,369 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_compile_variable.c
- * slang front-end compiler
- * \author Michal Krol
- */
-
-#include "imports.h"
-#include "slang_compile.h"
-
-/* slang_type_specifier_type */
-
-typedef struct
-{
- const char *name;
- slang_type_specifier_type type;
-} type_specifier_type_name;
-
-static type_specifier_type_name type_specifier_type_names[] = {
- { "void", slang_spec_void },
- { "bool", slang_spec_bool },
- { "bvec2", slang_spec_bvec2 },
- { "bvec3", slang_spec_bvec3 },
- { "bvec4", slang_spec_bvec4 },
- { "int", slang_spec_int },
- { "ivec2", slang_spec_ivec2 },
- { "ivec3", slang_spec_ivec3 },
- { "ivec4", slang_spec_ivec4 },
- { "float", slang_spec_float },
- { "vec2", slang_spec_vec2 },
- { "vec3", slang_spec_vec3 },
- { "vec4", slang_spec_vec4 },
- { "mat2", slang_spec_mat2 },
- { "mat3", slang_spec_mat3 },
- { "mat4", slang_spec_mat4 },
- { "sampler1D", slang_spec_sampler1D },
- { "sampler2D", slang_spec_sampler2D },
- { "sampler3D", slang_spec_sampler3D },
- { "samplerCube", slang_spec_samplerCube },
- { "sampler1DShadow", slang_spec_sampler1DShadow },
- { "sampler2DShadow", slang_spec_sampler2DShadow },
- { NULL, slang_spec_void }
-};
-
-slang_type_specifier_type slang_type_specifier_type_from_string (const char *name)
-{
- type_specifier_type_name *p = type_specifier_type_names;
- while (p->name != NULL)
- {
- if (slang_string_compare (p->name, name) == 0)
- break;
- p++;
- }
- return p->type;
-}
-
-const char *slang_type_specifier_type_to_string (slang_type_specifier_type type)
-{
- type_specifier_type_name *p = type_specifier_type_names;
- while (p->name != NULL)
- {
- if (p->type == type)
- break;
- p++;
- }
- return p->name;
-}
-
-/* slang_fully_specified_type */
-
-int slang_fully_specified_type_construct (slang_fully_specified_type *type)
-{
- type->qualifier = slang_qual_none;
- slang_type_specifier_ctr (&type->specifier);
- return 1;
-}
-
-void slang_fully_specified_type_destruct (slang_fully_specified_type *type)
-{
- slang_type_specifier_dtr (&type->specifier);
-}
-
-int slang_fully_specified_type_copy (slang_fully_specified_type *x, const slang_fully_specified_type *y)
-{
- slang_fully_specified_type z;
-
- if (!slang_fully_specified_type_construct (&z))
- return 0;
- z.qualifier = y->qualifier;
- if (!slang_type_specifier_copy (&z.specifier, &y->specifier))
- {
- slang_fully_specified_type_destruct (&z);
- return 0;
- }
- slang_fully_specified_type_destruct (x);
- *x = z;
- return 1;
-}
-
-/* slang_variable_scope */
-
-int slang_variable_scope_construct (slang_variable_scope *scope)
-{
- scope->variables = NULL;
- scope->num_variables = 0;
- scope->outer_scope = NULL;
- return 1;
-}
-
-void slang_variable_scope_destruct (slang_variable_scope *scope)
-{
- unsigned int i;
-
- for (i = 0; i < scope->num_variables; i++)
- slang_variable_destruct (scope->variables + i);
- slang_alloc_free (scope->variables);
- /* do not free scope->outer_scope */
-}
-
-int slang_variable_scope_copy (slang_variable_scope *x, const slang_variable_scope *y)
-{
- slang_variable_scope z;
- unsigned int i;
-
- if (!slang_variable_scope_construct (&z))
- return 0;
- z.variables = (slang_variable *) slang_alloc_malloc (y->num_variables * sizeof (slang_variable));
- if (z.variables == NULL)
- {
- slang_variable_scope_destruct (&z);
- return 0;
- }
- for (z.num_variables = 0; z.num_variables < y->num_variables; z.num_variables++)
- if (!slang_variable_construct (&z.variables[z.num_variables]))
- {
- slang_variable_scope_destruct (&z);
- return 0;
- }
- for (i = 0; i < z.num_variables; i++)
- if (!slang_variable_copy (&z.variables[i], &y->variables[i]))
- {
- slang_variable_scope_destruct (&z);
- return 0;
- }
- z.outer_scope = y->outer_scope;
- slang_variable_scope_destruct (x);
- *x = z;
- return 1;
-}
-
-/* slang_variable */
-
-int slang_variable_construct (slang_variable *var)
-{
- if (!slang_fully_specified_type_construct (&var->type))
- return 0;
- var->a_name = SLANG_ATOM_NULL;
- var->array_len = 0;
- var->initializer = NULL;
- var->address = ~0;
- var->size = 0;
- var->global = 0;
- return 1;
-}
-
-void slang_variable_destruct (slang_variable *var)
-{
- slang_fully_specified_type_destruct (&var->type);
- if (var->initializer != NULL)
- {
- slang_operation_destruct (var->initializer);
- slang_alloc_free (var->initializer);
- }
-}
-
-int slang_variable_copy (slang_variable *x, const slang_variable *y)
-{
- slang_variable z;
-
- if (!slang_variable_construct (&z))
- return 0;
- if (!slang_fully_specified_type_copy (&z.type, &y->type))
- {
- slang_variable_destruct (&z);
- return 0;
- }
- z.a_name = y->a_name;
- z.array_len = y->array_len;
- if (y->initializer != NULL)
- {
- z.initializer = (slang_operation *) slang_alloc_malloc (sizeof (slang_operation));
- if (z.initializer == NULL)
- {
- slang_variable_destruct (&z);
- return 0;
- }
- if (!slang_operation_construct (z.initializer))
- {
- slang_alloc_free (z.initializer);
- slang_variable_destruct (&z);
- return 0;
- }
- if (!slang_operation_copy (z.initializer, y->initializer))
- {
- slang_variable_destruct (&z);
- return 0;
- }
- }
- z.address = y->address;
- z.size = y->size;
- z.global = y->global;
- slang_variable_destruct (x);
- *x = z;
- return 1;
-}
-
-slang_variable *_slang_locate_variable (slang_variable_scope *scope, slang_atom a_name, GLboolean all)
-{
- GLuint i;
-
- for (i = 0; i < scope->num_variables; i++)
- if (a_name == scope->variables[i].a_name)
- return &scope->variables[i];
- if (all && scope->outer_scope != NULL)
- return _slang_locate_variable (scope->outer_scope, a_name, 1);
- return NULL;
-}
-
-/*
- * _slang_build_export_data_table()
- */
-
-static GLenum gl_type_from_specifier (const slang_type_specifier *type)
-{
- switch (type->type)
- {
- case slang_spec_bool:
- return GL_BOOL_ARB;
- case slang_spec_bvec2:
- return GL_BOOL_VEC2_ARB;
- case slang_spec_bvec3:
- return GL_BOOL_VEC3_ARB;
- case slang_spec_bvec4:
- return GL_BOOL_VEC4_ARB;
- case slang_spec_int:
- return GL_INT;
- case slang_spec_ivec2:
- return GL_INT_VEC2_ARB;
- case slang_spec_ivec3:
- return GL_INT_VEC3_ARB;
- case slang_spec_ivec4:
- return GL_INT_VEC4_ARB;
- case slang_spec_float:
- return GL_FLOAT;
- case slang_spec_vec2:
- return GL_FLOAT_VEC2_ARB;
- case slang_spec_vec3:
- return GL_FLOAT_VEC3_ARB;
- case slang_spec_vec4:
- return GL_FLOAT_VEC4_ARB;
- case slang_spec_mat2:
- return GL_FLOAT_MAT2_ARB;
- case slang_spec_mat3:
- return GL_FLOAT_MAT3_ARB;
- case slang_spec_mat4:
- return GL_FLOAT_MAT4_ARB;
- case slang_spec_sampler1D:
- return GL_SAMPLER_1D_ARB;
- case slang_spec_sampler2D:
- return GL_SAMPLER_2D_ARB;
- case slang_spec_sampler3D:
- return GL_SAMPLER_3D_ARB;
- case slang_spec_samplerCube:
- return GL_SAMPLER_CUBE_ARB;
- case slang_spec_sampler1DShadow:
- return GL_SAMPLER_1D_SHADOW_ARB;
- case slang_spec_sampler2DShadow:
- return GL_SAMPLER_2D_SHADOW_ARB;
- case slang_spec_array:
- return gl_type_from_specifier (type->_array);
- default:
- return GL_FLOAT;
- }
-}
-
-static GLboolean build_quant (slang_export_data_quant *q, slang_variable *var)
-{
- slang_type_specifier *spec = &var->type.specifier;
-
- q->name = var->a_name;
- q->size = var->size;
- if (spec->type == slang_spec_array)
- {
- q->array_len = var->array_len;
- q->size /= var->array_len;
- spec = spec->_array;
- }
- if (spec->type == slang_spec_struct)
- {
- GLuint i;
-
- q->u.field_count = spec->_struct->fields->num_variables;
- q->structure = (slang_export_data_quant *) slang_alloc_malloc (
- q->u.field_count * sizeof (slang_export_data_quant));
- if (q->structure == NULL)
- return GL_FALSE;
-
- for (i = 0; i < q->u.field_count; i++)
- slang_export_data_quant_ctr (&q->structure[i]);
- for (i = 0; i < q->u.field_count; i++)
- if (!build_quant (&q->structure[i], &spec->_struct->fields->variables[i]))
- return GL_FALSE;
- }
- else
- q->u.basic_type = gl_type_from_specifier (spec);
- return GL_TRUE;
-}
-
-GLboolean _slang_build_export_data_table (slang_export_data_table *tbl, slang_variable_scope *vars)
-{
- GLuint i;
-
- for (i = 0; i < vars->num_variables; i++)
- {
- slang_variable *var = &vars->variables[i];
- slang_export_data_entry *e;
-
- e = slang_export_data_table_add (tbl);
- if (e == NULL)
- return GL_FALSE;
- if (!build_quant (&e->quant, var))
- return GL_FALSE;
- if (var->type.qualifier == slang_qual_uniform)
- e->access = slang_exp_uniform;
- else if (var->type.qualifier == slang_qual_attribute)
- e->access = slang_exp_attribute;
- else
- e->access = slang_exp_varying;
- e->address = var->address;
- }
-
- if (vars->outer_scope != NULL)
- return _slang_build_export_data_table (tbl, vars->outer_scope);
- return GL_TRUE;
-}
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file slang_compile_variable.c
+ * slang front-end compiler
+ * \author Michal Krol
+ */
+
+#include "imports.h"
+#include "slang_compile.h"
+
+/* slang_type_specifier_type */
+
+typedef struct
+{
+ const char *name;
+ slang_type_specifier_type type;
+} type_specifier_type_name;
+
+static type_specifier_type_name type_specifier_type_names[] = {
+ { "void", slang_spec_void },
+ { "bool", slang_spec_bool },
+ { "bvec2", slang_spec_bvec2 },
+ { "bvec3", slang_spec_bvec3 },
+ { "bvec4", slang_spec_bvec4 },
+ { "int", slang_spec_int },
+ { "ivec2", slang_spec_ivec2 },
+ { "ivec3", slang_spec_ivec3 },
+ { "ivec4", slang_spec_ivec4 },
+ { "float", slang_spec_float },
+ { "vec2", slang_spec_vec2 },
+ { "vec3", slang_spec_vec3 },
+ { "vec4", slang_spec_vec4 },
+ { "mat2", slang_spec_mat2 },
+ { "mat3", slang_spec_mat3 },
+ { "mat4", slang_spec_mat4 },
+ { "sampler1D", slang_spec_sampler1D },
+ { "sampler2D", slang_spec_sampler2D },
+ { "sampler3D", slang_spec_sampler3D },
+ { "samplerCube", slang_spec_samplerCube },
+ { "sampler1DShadow", slang_spec_sampler1DShadow },
+ { "sampler2DShadow", slang_spec_sampler2DShadow },
+ { NULL, slang_spec_void }
+};
+
+slang_type_specifier_type slang_type_specifier_type_from_string (const char *name)
+{
+ type_specifier_type_name *p = type_specifier_type_names;
+ while (p->name != NULL)
+ {
+ if (slang_string_compare (p->name, name) == 0)
+ break;
+ p++;
+ }
+ return p->type;
+}
+
+const char *slang_type_specifier_type_to_string (slang_type_specifier_type type)
+{
+ type_specifier_type_name *p = type_specifier_type_names;
+ while (p->name != NULL)
+ {
+ if (p->type == type)
+ break;
+ p++;
+ }
+ return p->name;
+}
+
+/* slang_fully_specified_type */
+
+int slang_fully_specified_type_construct (slang_fully_specified_type *type)
+{
+ type->qualifier = slang_qual_none;
+ slang_type_specifier_ctr (&type->specifier);
+ return 1;
+}
+
+void slang_fully_specified_type_destruct (slang_fully_specified_type *type)
+{
+ slang_type_specifier_dtr (&type->specifier);
+}
+
+int slang_fully_specified_type_copy (slang_fully_specified_type *x, const slang_fully_specified_type *y)
+{
+ slang_fully_specified_type z;
+
+ if (!slang_fully_specified_type_construct (&z))
+ return 0;
+ z.qualifier = y->qualifier;
+ if (!slang_type_specifier_copy (&z.specifier, &y->specifier))
+ {
+ slang_fully_specified_type_destruct (&z);
+ return 0;
+ }
+ slang_fully_specified_type_destruct (x);
+ *x = z;
+ return 1;
+}
+
+/* slang_variable_scope */
+
+int slang_variable_scope_construct (slang_variable_scope *scope)
+{
+ scope->variables = NULL;
+ scope->num_variables = 0;
+ scope->outer_scope = NULL;
+ return 1;
+}
+
+void slang_variable_scope_destruct (slang_variable_scope *scope)
+{
+ unsigned int i;
+
+ for (i = 0; i < scope->num_variables; i++)
+ slang_variable_destruct (scope->variables + i);
+ slang_alloc_free (scope->variables);
+ /* do not free scope->outer_scope */
+}
+
+int slang_variable_scope_copy (slang_variable_scope *x, const slang_variable_scope *y)
+{
+ slang_variable_scope z;
+ unsigned int i;
+
+ if (!slang_variable_scope_construct (&z))
+ return 0;
+ z.variables = (slang_variable *) slang_alloc_malloc (y->num_variables * sizeof (slang_variable));
+ if (z.variables == NULL)
+ {
+ slang_variable_scope_destruct (&z);
+ return 0;
+ }
+ for (z.num_variables = 0; z.num_variables < y->num_variables; z.num_variables++)
+ if (!slang_variable_construct (&z.variables[z.num_variables]))
+ {
+ slang_variable_scope_destruct (&z);
+ return 0;
+ }
+ for (i = 0; i < z.num_variables; i++)
+ if (!slang_variable_copy (&z.variables[i], &y->variables[i]))
+ {
+ slang_variable_scope_destruct (&z);
+ return 0;
+ }
+ z.outer_scope = y->outer_scope;
+ slang_variable_scope_destruct (x);
+ *x = z;
+ return 1;
+}
+
+/* slang_variable */
+
+int slang_variable_construct (slang_variable *var)
+{
+ if (!slang_fully_specified_type_construct (&var->type))
+ return 0;
+ var->a_name = SLANG_ATOM_NULL;
+ var->array_len = 0;
+ var->initializer = NULL;
+ var->address = ~0;
+ var->size = 0;
+ var->global = 0;
+ return 1;
+}
+
+void slang_variable_destruct (slang_variable *var)
+{
+ slang_fully_specified_type_destruct (&var->type);
+ if (var->initializer != NULL)
+ {
+ slang_operation_destruct (var->initializer);
+ slang_alloc_free (var->initializer);
+ }
+}
+
+int slang_variable_copy (slang_variable *x, const slang_variable *y)
+{
+ slang_variable z;
+
+ if (!slang_variable_construct (&z))
+ return 0;
+ if (!slang_fully_specified_type_copy (&z.type, &y->type))
+ {
+ slang_variable_destruct (&z);
+ return 0;
+ }
+ z.a_name = y->a_name;
+ z.array_len = y->array_len;
+ if (y->initializer != NULL)
+ {
+ z.initializer = (slang_operation *) slang_alloc_malloc (sizeof (slang_operation));
+ if (z.initializer == NULL)
+ {
+ slang_variable_destruct (&z);
+ return 0;
+ }
+ if (!slang_operation_construct (z.initializer))
+ {
+ slang_alloc_free (z.initializer);
+ slang_variable_destruct (&z);
+ return 0;
+ }
+ if (!slang_operation_copy (z.initializer, y->initializer))
+ {
+ slang_variable_destruct (&z);
+ return 0;
+ }
+ }
+ z.address = y->address;
+ z.size = y->size;
+ z.global = y->global;
+ slang_variable_destruct (x);
+ *x = z;
+ return 1;
+}
+
+slang_variable *_slang_locate_variable (slang_variable_scope *scope, slang_atom a_name, GLboolean all)
+{
+ GLuint i;
+
+ for (i = 0; i < scope->num_variables; i++)
+ if (a_name == scope->variables[i].a_name)
+ return &scope->variables[i];
+ if (all && scope->outer_scope != NULL)
+ return _slang_locate_variable (scope->outer_scope, a_name, 1);
+ return NULL;
+}
+
+/*
+ * _slang_build_export_data_table()
+ */
+
+static GLenum gl_type_from_specifier (const slang_type_specifier *type)
+{
+ switch (type->type)
+ {
+ case slang_spec_bool:
+ return GL_BOOL_ARB;
+ case slang_spec_bvec2:
+ return GL_BOOL_VEC2_ARB;
+ case slang_spec_bvec3:
+ return GL_BOOL_VEC3_ARB;
+ case slang_spec_bvec4:
+ return GL_BOOL_VEC4_ARB;
+ case slang_spec_int:
+ return GL_INT;
+ case slang_spec_ivec2:
+ return GL_INT_VEC2_ARB;
+ case slang_spec_ivec3:
+ return GL_INT_VEC3_ARB;
+ case slang_spec_ivec4:
+ return GL_INT_VEC4_ARB;
+ case slang_spec_float:
+ return GL_FLOAT;
+ case slang_spec_vec2:
+ return GL_FLOAT_VEC2_ARB;
+ case slang_spec_vec3:
+ return GL_FLOAT_VEC3_ARB;
+ case slang_spec_vec4:
+ return GL_FLOAT_VEC4_ARB;
+ case slang_spec_mat2:
+ return GL_FLOAT_MAT2_ARB;
+ case slang_spec_mat3:
+ return GL_FLOAT_MAT3_ARB;
+ case slang_spec_mat4:
+ return GL_FLOAT_MAT4_ARB;
+ case slang_spec_sampler1D:
+ return GL_SAMPLER_1D_ARB;
+ case slang_spec_sampler2D:
+ return GL_SAMPLER_2D_ARB;
+ case slang_spec_sampler3D:
+ return GL_SAMPLER_3D_ARB;
+ case slang_spec_samplerCube:
+ return GL_SAMPLER_CUBE_ARB;
+ case slang_spec_sampler1DShadow:
+ return GL_SAMPLER_1D_SHADOW_ARB;
+ case slang_spec_sampler2DShadow:
+ return GL_SAMPLER_2D_SHADOW_ARB;
+ case slang_spec_array:
+ return gl_type_from_specifier (type->_array);
+ default:
+ return GL_FLOAT;
+ }
+}
+
+static GLboolean build_quant (slang_export_data_quant *q, slang_variable *var)
+{
+ slang_type_specifier *spec = &var->type.specifier;
+
+ q->name = var->a_name;
+ q->size = var->size;
+ if (spec->type == slang_spec_array)
+ {
+ q->array_len = var->array_len;
+ q->size /= var->array_len;
+ spec = spec->_array;
+ }
+ if (spec->type == slang_spec_struct)
+ {
+ GLuint i;
+
+ q->u.field_count = spec->_struct->fields->num_variables;
+ q->structure = (slang_export_data_quant *) slang_alloc_malloc (
+ q->u.field_count * sizeof (slang_export_data_quant));
+ if (q->structure == NULL)
+ return GL_FALSE;
+
+ for (i = 0; i < q->u.field_count; i++)
+ slang_export_data_quant_ctr (&q->structure[i]);
+ for (i = 0; i < q->u.field_count; i++)
+ if (!build_quant (&q->structure[i], &spec->_struct->fields->variables[i]))
+ return GL_FALSE;
+ }
+ else
+ q->u.basic_type = gl_type_from_specifier (spec);
+ return GL_TRUE;
+}
+
+GLboolean _slang_build_export_data_table (slang_export_data_table *tbl, slang_variable_scope *vars)
+{
+ GLuint i;
+
+ for (i = 0; i < vars->num_variables; i++)
+ {
+ slang_variable *var = &vars->variables[i];
+ slang_export_data_entry *e;
+
+ e = slang_export_data_table_add (tbl);
+ if (e == NULL)
+ return GL_FALSE;
+ if (!build_quant (&e->quant, var))
+ return GL_FALSE;
+ if (var->type.qualifier == slang_qual_uniform)
+ e->access = slang_exp_uniform;
+ else if (var->type.qualifier == slang_qual_attribute)
+ e->access = slang_exp_attribute;
+ else
+ e->access = slang_exp_varying;
+ e->address = var->address;
+ }
+
+ if (vars->outer_scope != NULL)
+ return _slang_build_export_data_table (tbl, vars->outer_scope);
+ return GL_TRUE;
+}
+
diff --git a/src/mesa/shader/slang/slang_compile_variable.h b/src/mesa/shader/slang/slang_compile_variable.h
index 6d2e23702f..fd0d7a8737 100644
--- a/src/mesa/shader/slang/slang_compile_variable.h
+++ b/src/mesa/shader/slang/slang_compile_variable.h
@@ -1,93 +1,93 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#if !defined SLANG_COMPILE_VARIABLE_H
-#define SLANG_COMPILE_VARIABLE_H
-
-#if defined __cplusplus
-extern "C" {
-#endif
-
-typedef enum slang_type_qualifier_
-{
- slang_qual_none,
- slang_qual_const,
- slang_qual_attribute,
- slang_qual_varying,
- slang_qual_uniform,
- slang_qual_out,
- slang_qual_inout,
- slang_qual_fixedoutput, /* internal */
- slang_qual_fixedinput /* internal */
-} slang_type_qualifier;
-
-slang_type_specifier_type slang_type_specifier_type_from_string (const char *);
-const char *slang_type_specifier_type_to_string (slang_type_specifier_type);
-
-typedef struct slang_fully_specified_type_
-{
- slang_type_qualifier qualifier;
- slang_type_specifier specifier;
-} slang_fully_specified_type;
-
-int slang_fully_specified_type_construct (slang_fully_specified_type *);
-void slang_fully_specified_type_destruct (slang_fully_specified_type *);
-int slang_fully_specified_type_copy (slang_fully_specified_type *, const slang_fully_specified_type *);
-
-typedef struct slang_variable_scope_
-{
- struct slang_variable_ *variables;
- unsigned int num_variables;
- struct slang_variable_scope_ *outer_scope;
-} slang_variable_scope;
-
-int slang_variable_scope_construct (slang_variable_scope *);
-void slang_variable_scope_destruct (slang_variable_scope *);
-int slang_variable_scope_copy (slang_variable_scope *, const slang_variable_scope *);
-
-typedef struct slang_variable_
-{
- slang_fully_specified_type type;
- slang_atom a_name;
- GLuint array_len; /* type: spec_array */
- struct slang_operation_ *initializer;
- unsigned int address;
- unsigned int size;
- int global;
-} slang_variable;
-
-int slang_variable_construct (slang_variable *);
-void slang_variable_destruct (slang_variable *);
-int slang_variable_copy (slang_variable *, const slang_variable *);
-
-slang_variable *_slang_locate_variable (slang_variable_scope *, slang_atom a_name, GLboolean all);
-
-GLboolean _slang_build_export_data_table (slang_export_data_table *, slang_variable_scope *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#if !defined SLANG_COMPILE_VARIABLE_H
+#define SLANG_COMPILE_VARIABLE_H
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+typedef enum slang_type_qualifier_
+{
+ slang_qual_none,
+ slang_qual_const,
+ slang_qual_attribute,
+ slang_qual_varying,
+ slang_qual_uniform,
+ slang_qual_out,
+ slang_qual_inout,
+ slang_qual_fixedoutput, /* internal */
+ slang_qual_fixedinput /* internal */
+} slang_type_qualifier;
+
+slang_type_specifier_type slang_type_specifier_type_from_string (const char *);
+const char *slang_type_specifier_type_to_string (slang_type_specifier_type);
+
+typedef struct slang_fully_specified_type_
+{
+ slang_type_qualifier qualifier;
+ slang_type_specifier specifier;
+} slang_fully_specified_type;
+
+int slang_fully_specified_type_construct (slang_fully_specified_type *);
+void slang_fully_specified_type_destruct (slang_fully_specified_type *);
+int slang_fully_specified_type_copy (slang_fully_specified_type *, const slang_fully_specified_type *);
+
+typedef struct slang_variable_scope_
+{
+ struct slang_variable_ *variables;
+ unsigned int num_variables;
+ struct slang_variable_scope_ *outer_scope;
+} slang_variable_scope;
+
+int slang_variable_scope_construct (slang_variable_scope *);
+void slang_variable_scope_destruct (slang_variable_scope *);
+int slang_variable_scope_copy (slang_variable_scope *, const slang_variable_scope *);
+
+typedef struct slang_variable_
+{
+ slang_fully_specified_type type;
+ slang_atom a_name;
+ GLuint array_len; /* type: spec_array */
+ struct slang_operation_ *initializer;
+ unsigned int address;
+ unsigned int size;
+ int global;
+} slang_variable;
+
+int slang_variable_construct (slang_variable *);
+void slang_variable_destruct (slang_variable *);
+int slang_variable_copy (slang_variable *, const slang_variable *);
+
+slang_variable *_slang_locate_variable (slang_variable_scope *, slang_atom a_name, GLboolean all);
+
+GLboolean _slang_build_export_data_table (slang_export_data_table *, slang_variable_scope *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/src/mesa/shader/slang/slang_execute.c b/src/mesa/shader/slang/slang_execute.c
index bed63d1e5b..5577909da0 100644
--- a/src/mesa/shader/slang/slang_execute.c
+++ b/src/mesa/shader/slang/slang_execute.c
@@ -1,567 +1,567 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_execute.c
- * intermediate code interpreter
- * \author Michal Krol
- */
-
-#include "imports.h"
-#include "slang_execute.h"
-#include "slang_library_noise.h"
-#include "slang_library_texsample.h"
-
-#define DEBUG_SLANG 0
-
-GLvoid slang_machine_ctr (slang_machine *self)
-{
- slang_machine_init (self);
-#if defined(USE_X86_ASM) || defined(SLANG_X86)
- self->x86.compiled_func = NULL;
-#endif
-}
-
-GLvoid slang_machine_dtr (slang_machine *self)
-{
-#if defined(USE_X86_ASM) || defined(SLANG_X86)
- if (self->x86.compiled_func != NULL)
- _mesa_exec_free (self->x86.compiled_func);
-#endif
-}
-
-void slang_machine_init (slang_machine *mach)
-{
- mach->ip = 0;
- mach->sp = SLANG_MACHINE_STACK_SIZE;
- mach->bp = 0;
- mach->kill = 0;
- mach->exit = 0;
-}
-
-int _slang_execute (const slang_assembly_file *file)
-{
- slang_machine mach;
-
- slang_machine_ctr (&mach);
- return _slang_execute2 (file, &mach);
-}
-
-#if DEBUG_SLANG
-
-static void dump_instruction (FILE *f, slang_assembly *a, unsigned int i)
-{
- fprintf (f, "%.5u:\t", i);
-
- switch (a->type)
- {
- /* core */
- case slang_asm_none:
- fprintf (f, "none");
- break;
- case slang_asm_float_copy:
- fprintf (f, "float_copy\t%d, %d", a->param[0], a->param[1]);
- break;
- case slang_asm_float_move:
- fprintf (f, "float_move\t%d, %d", a->param[0], a->param[1]);
- break;
- case slang_asm_float_push:
- fprintf (f, "float_push\t%f", a->literal);
- break;
- case slang_asm_float_deref:
- fprintf (f, "float_deref");
- break;
- case slang_asm_float_add:
- fprintf (f, "float_add");
- break;
- case slang_asm_float_multiply:
- fprintf (f, "float_multiply");
- break;
- case slang_asm_float_divide:
- fprintf (f, "float_divide");
- break;
- case slang_asm_float_negate:
- fprintf (f, "float_negate");
- break;
- case slang_asm_float_less:
- fprintf (f, "float_less");
- break;
- case slang_asm_float_equal_exp:
- fprintf (f, "float_equal");
- break;
- case slang_asm_float_equal_int:
- fprintf (f, "float_equal\t%d, %d", a->param[0], a->param[1]);
- break;
- case slang_asm_float_to_int:
- fprintf (f, "float_to_int");
- break;
- case slang_asm_float_sine:
- fprintf (f, "float_sine");
- break;
- case slang_asm_float_arcsine:
- fprintf (f, "float_arcsine");
- break;
- case slang_asm_float_arctan:
- fprintf (f, "float_arctan");
- break;
- case slang_asm_float_power:
- fprintf (f, "float_power");
- break;
- case slang_asm_float_log2:
- fprintf (f, "float_log2");
- break;
- case slang_asm_float_floor:
- fprintf (f, "float_floor");
- break;
- case slang_asm_float_ceil:
- fprintf (f, "float_ceil");
- break;
- case slang_asm_float_noise1:
- fprintf (f, "float_noise1");
- break;
- case slang_asm_float_noise2:
- fprintf (f, "float_noise2");
- break;
- case slang_asm_float_noise3:
- fprintf (f, "float_noise3");
- break;
- case slang_asm_float_noise4:
- fprintf (f, "float_noise4");
- break;
- case slang_asm_int_copy:
- fprintf (f, "int_copy\t%d, %d", a->param[0], a->param[1]);
- break;
- case slang_asm_int_move:
- fprintf (f, "int_move\t%d, %d", a->param[0], a->param[1]);
- break;
- case slang_asm_int_push:
- fprintf (f, "int_push\t%d", (GLint) a->literal);
- break;
- case slang_asm_int_deref:
- fprintf (f, "int_deref");
- break;
- case slang_asm_int_to_float:
- fprintf (f, "int_to_float");
- break;
- case slang_asm_int_to_addr:
- fprintf (f, "int_to_addr");
- break;
- case slang_asm_bool_copy:
- fprintf (f, "bool_copy\t%d, %d", a->param[0], a->param[1]);
- break;
- case slang_asm_bool_move:
- fprintf (f, "bool_move\t%d, %d", a->param[0], a->param[1]);
- break;
- case slang_asm_bool_push:
- fprintf (f, "bool_push\t%d", a->literal != 0.0f);
- break;
- case slang_asm_bool_deref:
- fprintf (f, "bool_deref");
- break;
- case slang_asm_addr_copy:
- fprintf (f, "addr_copy");
- break;
- case slang_asm_addr_push:
- fprintf (f, "addr_push\t%u", a->param[0]);
- break;
- case slang_asm_addr_deref:
- fprintf (f, "addr_deref");
- break;
- case slang_asm_addr_add:
- fprintf (f, "addr_add");
- break;
- case slang_asm_addr_multiply:
- fprintf (f, "addr_multiply");
- break;
- case slang_asm_vec4_tex1d:
- fprintf (f, "vec4_tex1d");
- break;
- case slang_asm_vec4_tex2d:
- fprintf (f, "vec4_tex2d");
- break;
- case slang_asm_vec4_tex3d:
- fprintf (f, "vec4_tex3d");
- break;
- case slang_asm_vec4_texcube:
- fprintf (f, "vec4_texcube");
- break;
- case slang_asm_vec4_shad1d:
- fprintf (f, "vec4_shad1d");
- break;
- case slang_asm_vec4_shad2d:
- fprintf (f, "vec4_shad2d");
- break;
- case slang_asm_jump:
- fprintf (f, "jump\t%u", a->param[0]);
- break;
- case slang_asm_jump_if_zero:
- fprintf (f, "jump_if_zero\t%u", a->param[0]);
- break;
- case slang_asm_enter:
- fprintf (f, "enter\t%u", a->param[0]);
- break;
- case slang_asm_leave:
- fprintf (f, "leave");
- break;
- case slang_asm_local_alloc:
- fprintf (f, "local_alloc\t%u", a->param[0]);
- break;
- case slang_asm_local_free:
- fprintf (f, "local_free\t%u", a->param[0]);
- break;
- case slang_asm_local_addr:
- fprintf (f, "local_addr\t%u, %u", a->param[0], a->param[1]);
- break;
- case slang_asm_global_addr:
- fprintf (f, "global_addr\t%u", a->param[0]);
- break;
- case slang_asm_call:
- fprintf (f, "call\t%u", a->param[0]);
- break;
- case slang_asm_return:
- fprintf (f, "return");
- break;
- case slang_asm_discard:
- fprintf (f, "discard");
- break;
- case slang_asm_exit:
- fprintf (f, "exit");
- break;
- /* mesa-specific extensions */
- case slang_asm_float_print:
- fprintf (f, "float_print");
- break;
- case slang_asm_int_print:
- fprintf (f, "int_print");
- break;
- case slang_asm_bool_print:
- fprintf (f, "bool_print");
- break;
- default:
- break;
- }
-
- fprintf (f, "\n");
-}
-
-static void dump (const slang_assembly_file *file)
-{
- unsigned int i;
- static unsigned int counter = 0;
- FILE *f;
- char filename[256];
-
- counter++;
- _mesa_sprintf (filename, "~mesa-slang-assembly-dump-(%u).txt", counter);
- f = fopen (filename, "w");
- if (f == NULL)
- return;
-
- for (i = 0; i < file->count; i++)
- dump_instruction (f, file->code + i, i);
-
- fclose (f);
-}
-
-#endif
-
-int _slang_execute2 (const slang_assembly_file *file, slang_machine *mach)
-{
- slang_machine_slot *stack;
-
-#if DEBUG_SLANG
- static unsigned int counter = 0;
- char filename[256];
- FILE *f;
-#endif
-
- /* assume 32-bit floats and uints; should work fine also on 64-bit platforms */
- static_assert(sizeof (GLfloat) == 4);
- static_assert(sizeof (GLuint) == 4);
-
-#if DEBUG_SLANG
- dump (file);
- counter++;
- _mesa_sprintf (filename, "~mesa-slang-assembly-exec-(%u).txt", counter);
- f = fopen (filename, "w");
-#endif
-
-#if defined(USE_X86_ASM) || defined(SLANG_X86)
- if (mach->x86.compiled_func != NULL)
- {
- mach->x86.compiled_func (mach);
- return 1;
- }
-#endif
-
- stack = mach->mem + SLANG_MACHINE_GLOBAL_SIZE;
-
- while (!mach->exit)
- {
- slang_assembly *a = &file->code[mach->ip];
-
-#if DEBUG_SLANG
- if (f != NULL && a->type != slang_asm_none)
- {
- unsigned int i;
-
- dump_instruction (f, file->code + mach->ip, mach->ip);
- fprintf (f, "\t\tsp=%u bp=%u\n", mach->sp, mach->bp);
- for (i = mach->sp; i < SLANG_MACHINE_STACK_SIZE; i++)
- fprintf (f, "\t%.5u\t%6f\t%u\n", i, stack[i]._float, stack[i]._addr);
- fflush (f);
- }
-#endif
-
- mach->ip++;
-
- switch (a->type)
- {
- /* core */
- case slang_asm_none:
- break;
- case slang_asm_float_copy:
- case slang_asm_int_copy:
- case slang_asm_bool_copy:
- mach->mem[(stack[mach->sp + a->param[0] / 4]._addr + a->param[1]) / 4]._float =
- stack[mach->sp]._float;
- mach->sp++;
- break;
- case slang_asm_float_move:
- case slang_asm_int_move:
- case slang_asm_bool_move:
- stack[mach->sp + a->param[0] / 4]._float =
- stack[mach->sp + (stack[mach->sp]._addr + a->param[1]) / 4]._float;
- break;
- case slang_asm_float_push:
- case slang_asm_int_push:
- case slang_asm_bool_push:
- mach->sp--;
- stack[mach->sp]._float = a->literal;
- break;
- case slang_asm_float_deref:
- case slang_asm_int_deref:
- case slang_asm_bool_deref:
- stack[mach->sp]._float = mach->mem[stack[mach->sp]._addr / 4]._float;
- break;
- case slang_asm_float_add:
- stack[mach->sp + 1]._float += stack[mach->sp]._float;
- mach->sp++;
- break;
- case slang_asm_float_multiply:
- stack[mach->sp + 1]._float *= stack[mach->sp]._float;
- mach->sp++;
- break;
- case slang_asm_float_divide:
- stack[mach->sp + 1]._float /= stack[mach->sp]._float;
- mach->sp++;
- break;
- case slang_asm_float_negate:
- stack[mach->sp]._float = -stack[mach->sp]._float;
- break;
- case slang_asm_float_less:
- stack[mach->sp + 1]._float =
- stack[mach->sp + 1]._float < stack[mach->sp]._float ? (GLfloat) 1 : (GLfloat) 0;
- mach->sp++;
- break;
- case slang_asm_float_equal_exp:
- stack[mach->sp + 1]._float =
- stack[mach->sp + 1]._float == stack[mach->sp]._float ? (GLfloat) 1 : (GLfloat) 0;
- mach->sp++;
- break;
- case slang_asm_float_equal_int:
- mach->sp--;
- stack[mach->sp]._float = stack[mach->sp + 1 + a->param[0] / 4]._float ==
- stack[mach->sp + 1 + a->param[1] / 4]._float ? (GLfloat) 1 : (GLfloat) 0;
- break;
- case slang_asm_float_to_int:
- stack[mach->sp]._float = (GLfloat) (GLint) stack[mach->sp]._float;
- break;
- case slang_asm_float_sine:
- stack[mach->sp]._float = (GLfloat) _mesa_sin (stack[mach->sp]._float);
- break;
- case slang_asm_float_arcsine:
- stack[mach->sp]._float = _mesa_asinf (stack[mach->sp]._float);
- break;
- case slang_asm_float_arctan:
- stack[mach->sp]._float = _mesa_atanf (stack[mach->sp]._float);
- break;
- case slang_asm_float_power:
- stack[mach->sp + 1]._float =
- (GLfloat) _mesa_pow (stack[mach->sp + 1]._float, stack[mach->sp]._float);
- mach->sp++;
- break;
- case slang_asm_float_log2:
- stack[mach->sp]._float = LOG2 (stack[mach->sp]._float);
- break;
- case slang_asm_float_floor:
- stack[mach->sp]._float = FLOORF (stack[mach->sp]._float);
- break;
- case slang_asm_float_ceil:
- stack[mach->sp]._float = CEILF (stack[mach->sp]._float);
- break;
- case slang_asm_float_noise1:
- stack[mach->sp]._float = _slang_library_noise1 (stack[mach->sp]._float);
- break;
- case slang_asm_float_noise2:
- stack[mach->sp + 1]._float = _slang_library_noise2 (stack[mach->sp]._float,
- stack[mach->sp + 1]._float);
- mach->sp++;
- break;
- case slang_asm_float_noise3:
- stack[mach->sp + 2]._float = _slang_library_noise3 (stack[mach->sp]._float,
- stack[mach->sp + 1]._float, stack[mach->sp + 2]._float);
- mach->sp += 2;
- break;
- case slang_asm_float_noise4:
- stack[mach->sp + 3]._float = _slang_library_noise4 (stack[mach->sp]._float,
- stack[mach->sp + 1]._float, stack[mach->sp + 2]._float, stack[mach->sp + 3]._float);
- mach->sp += 3;
- break;
- case slang_asm_int_to_float:
- break;
- case slang_asm_int_to_addr:
- stack[mach->sp]._addr = (GLuint) (GLint) stack[mach->sp]._float;
- break;
- case slang_asm_addr_copy:
- mach->mem[stack[mach->sp + 1]._addr / 4]._addr = stack[mach->sp]._addr;
- mach->sp++;
- break;
- case slang_asm_addr_push:
- case slang_asm_global_addr:
- mach->sp--;
- stack[mach->sp]._addr = a->param[0];
- break;
- case slang_asm_addr_deref:
- stack[mach->sp]._addr = mach->mem[stack[mach->sp]._addr / 4]._addr;
- break;
- case slang_asm_addr_add:
- stack[mach->sp + 1]._addr += stack[mach->sp]._addr;
- mach->sp++;
- break;
- case slang_asm_addr_multiply:
- stack[mach->sp + 1]._addr *= stack[mach->sp]._addr;
- mach->sp++;
- break;
- case slang_asm_vec4_tex1d:
- _slang_library_tex1d (stack[mach->sp]._float, stack[mach->sp + 1]._float,
- stack[mach->sp + 2]._float, &mach->mem[stack[mach->sp + 3]._addr / 4]._float);
- mach->sp += 3;
- break;
- case slang_asm_vec4_tex2d:
- _slang_library_tex2d (stack[mach->sp]._float, stack[mach->sp + 1]._float,
- stack[mach->sp + 2]._float, stack[mach->sp + 3]._float,
- &mach->mem[stack[mach->sp + 4]._addr / 4]._float);
- mach->sp += 4;
- break;
- case slang_asm_vec4_tex3d:
- _slang_library_tex3d (stack[mach->sp]._float, stack[mach->sp + 1]._float,
- stack[mach->sp + 2]._float, stack[mach->sp + 3]._float, stack[mach->sp + 4]._float,
- &mach->mem[stack[mach->sp + 5]._addr / 4]._float);
- mach->sp += 5;
- break;
- case slang_asm_vec4_texcube:
- _slang_library_texcube (stack[mach->sp]._float, stack[mach->sp + 1]._float,
- stack[mach->sp + 2]._float, stack[mach->sp + 3]._float, stack[mach->sp + 4]._float,
- &mach->mem[stack[mach->sp + 5]._addr / 4]._float);
- mach->sp += 5;
- break;
- case slang_asm_vec4_shad1d:
- _slang_library_shad1d (stack[mach->sp]._float, stack[mach->sp + 1]._float,
- stack[mach->sp + 2]._float, stack[mach->sp + 3]._float, stack[mach->sp + 4]._float,
- &mach->mem[stack[mach->sp + 5]._addr / 4]._float);
- mach->sp += 5;
- break;
- case slang_asm_vec4_shad2d:
- _slang_library_shad2d (stack[mach->sp]._float, stack[mach->sp + 1]._float,
- stack[mach->sp + 2]._float, stack[mach->sp + 3]._float, stack[mach->sp + 4]._float,
- &mach->mem[stack[mach->sp + 5]._addr / 4]._float);
- mach->sp += 5;
- break;
- case slang_asm_jump:
- mach->ip = a->param[0];
- break;
- case slang_asm_jump_if_zero:
- if (stack[mach->sp]._float == 0.0f)
- mach->ip = a->param[0];
- mach->sp++;
- break;
- case slang_asm_enter:
- mach->sp--;
- stack[mach->sp]._addr = mach->bp;
- mach->bp = mach->sp + a->param[0] / 4;
- break;
- case slang_asm_leave:
- mach->bp = stack[mach->sp]._addr;
- mach->sp++;
- break;
- case slang_asm_local_alloc:
- mach->sp -= a->param[0] / 4;
- break;
- case slang_asm_local_free:
- mach->sp += a->param[0] / 4;
- break;
- case slang_asm_local_addr:
- mach->sp--;
- stack[mach->sp]._addr = SLANG_MACHINE_GLOBAL_SIZE * 4 + mach->bp * 4 -
- (a->param[0] + a->param[1]) + 4;
- break;
- case slang_asm_call:
- mach->sp--;
- stack[mach->sp]._addr = mach->ip;
- mach->ip = a->param[0];
- break;
- case slang_asm_return:
- mach->ip = stack[mach->sp]._addr;
- mach->sp++;
- break;
- case slang_asm_discard:
- mach->kill = 1;
- break;
- case slang_asm_exit:
- mach->exit = 1;
- break;
- /* mesa-specific extensions */
- case slang_asm_float_print:
- _mesa_printf ("slang print: %f\n", stack[mach->sp]._float);
- break;
- case slang_asm_int_print:
- _mesa_printf ("slang print: %d\n", (GLint) stack[mach->sp]._float);
- break;
- case slang_asm_bool_print:
- _mesa_printf ("slang print: %s\n", (GLint) stack[mach->sp]._float ? "true" : "false");
- break;
- default:
- assert (0);
- }
- }
-
-#if DEBUG_SLANG
- if (f != NULL)
- fclose (f);
-#endif
-
- return 1;
-}
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file slang_execute.c
+ * intermediate code interpreter
+ * \author Michal Krol
+ */
+
+#include "imports.h"
+#include "slang_execute.h"
+#include "slang_library_noise.h"
+#include "slang_library_texsample.h"
+
+#define DEBUG_SLANG 0
+
+GLvoid slang_machine_ctr (slang_machine *self)
+{
+ slang_machine_init (self);
+#if defined(USE_X86_ASM) || defined(SLANG_X86)
+ self->x86.compiled_func = NULL;
+#endif
+}
+
+GLvoid slang_machine_dtr (slang_machine *self)
+{
+#if defined(USE_X86_ASM) || defined(SLANG_X86)
+ if (self->x86.compiled_func != NULL)
+ _mesa_exec_free (self->x86.compiled_func);
+#endif
+}
+
+void slang_machine_init (slang_machine *mach)
+{
+ mach->ip = 0;
+ mach->sp = SLANG_MACHINE_STACK_SIZE;
+ mach->bp = 0;
+ mach->kill = 0;
+ mach->exit = 0;
+}
+
+int _slang_execute (const slang_assembly_file *file)
+{
+ slang_machine mach;
+
+ slang_machine_ctr (&mach);
+ return _slang_execute2 (file, &mach);
+}
+
+#if DEBUG_SLANG
+
+static void dump_instruction (FILE *f, slang_assembly *a, unsigned int i)
+{
+ fprintf (f, "%.5u:\t", i);
+
+ switch (a->type)
+ {
+ /* core */
+ case slang_asm_none:
+ fprintf (f, "none");
+ break;
+ case slang_asm_float_copy:
+ fprintf (f, "float_copy\t%d, %d", a->param[0], a->param[1]);
+ break;
+ case slang_asm_float_move:
+ fprintf (f, "float_move\t%d, %d", a->param[0], a->param[1]);
+ break;
+ case slang_asm_float_push:
+ fprintf (f, "float_push\t%f", a->literal);
+ break;
+ case slang_asm_float_deref:
+ fprintf (f, "float_deref");
+ break;
+ case slang_asm_float_add:
+ fprintf (f, "float_add");
+ break;
+ case slang_asm_float_multiply:
+ fprintf (f, "float_multiply");
+ break;
+ case slang_asm_float_divide:
+ fprintf (f, "float_divide");
+ break;
+ case slang_asm_float_negate:
+ fprintf (f, "float_negate");
+ break;
+ case slang_asm_float_less:
+ fprintf (f, "float_less");
+ break;
+ case slang_asm_float_equal_exp:
+ fprintf (f, "float_equal");
+ break;
+ case slang_asm_float_equal_int:
+ fprintf (f, "float_equal\t%d, %d", a->param[0], a->param[1]);
+ break;
+ case slang_asm_float_to_int:
+ fprintf (f, "float_to_int");
+ break;
+ case slang_asm_float_sine:
+ fprintf (f, "float_sine");
+ break;
+ case slang_asm_float_arcsine:
+ fprintf (f, "float_arcsine");
+ break;
+ case slang_asm_float_arctan:
+ fprintf (f, "float_arctan");
+ break;
+ case slang_asm_float_power:
+ fprintf (f, "float_power");
+ break;
+ case slang_asm_float_log2:
+ fprintf (f, "float_log2");
+ break;
+ case slang_asm_float_floor:
+ fprintf (f, "float_floor");
+ break;
+ case slang_asm_float_ceil:
+ fprintf (f, "float_ceil");
+ break;
+ case slang_asm_float_noise1:
+ fprintf (f, "float_noise1");
+ break;
+ case slang_asm_float_noise2:
+ fprintf (f, "float_noise2");
+ break;
+ case slang_asm_float_noise3:
+ fprintf (f, "float_noise3");
+ break;
+ case slang_asm_float_noise4:
+ fprintf (f, "float_noise4");
+ break;
+ case slang_asm_int_copy:
+ fprintf (f, "int_copy\t%d, %d", a->param[0], a->param[1]);
+ break;
+ case slang_asm_int_move:
+ fprintf (f, "int_move\t%d, %d", a->param[0], a->param[1]);
+ break;
+ case slang_asm_int_push:
+ fprintf (f, "int_push\t%d", (GLint) a->literal);
+ break;
+ case slang_asm_int_deref:
+ fprintf (f, "int_deref");
+ break;
+ case slang_asm_int_to_float:
+ fprintf (f, "int_to_float");
+ break;
+ case slang_asm_int_to_addr:
+ fprintf (f, "int_to_addr");
+ break;
+ case slang_asm_bool_copy:
+ fprintf (f, "bool_copy\t%d, %d", a->param[0], a->param[1]);
+ break;
+ case slang_asm_bool_move:
+ fprintf (f, "bool_move\t%d, %d", a->param[0], a->param[1]);
+ break;
+ case slang_asm_bool_push:
+ fprintf (f, "bool_push\t%d", a->literal != 0.0f);
+ break;
+ case slang_asm_bool_deref:
+ fprintf (f, "bool_deref");
+ break;
+ case slang_asm_addr_copy:
+ fprintf (f, "addr_copy");
+ break;
+ case slang_asm_addr_push:
+ fprintf (f, "addr_push\t%u", a->param[0]);
+ break;
+ case slang_asm_addr_deref:
+ fprintf (f, "addr_deref");
+ break;
+ case slang_asm_addr_add:
+ fprintf (f, "addr_add");
+ break;
+ case slang_asm_addr_multiply:
+ fprintf (f, "addr_multiply");
+ break;
+ case slang_asm_vec4_tex1d:
+ fprintf (f, "vec4_tex1d");
+ break;
+ case slang_asm_vec4_tex2d:
+ fprintf (f, "vec4_tex2d");
+ break;
+ case slang_asm_vec4_tex3d:
+ fprintf (f, "vec4_tex3d");
+ break;
+ case slang_asm_vec4_texcube:
+ fprintf (f, "vec4_texcube");
+ break;
+ case slang_asm_vec4_shad1d:
+ fprintf (f, "vec4_shad1d");
+ break;
+ case slang_asm_vec4_shad2d:
+ fprintf (f, "vec4_shad2d");
+ break;
+ case slang_asm_jump:
+ fprintf (f, "jump\t%u", a->param[0]);
+ break;
+ case slang_asm_jump_if_zero:
+ fprintf (f, "jump_if_zero\t%u", a->param[0]);
+ break;
+ case slang_asm_enter:
+ fprintf (f, "enter\t%u", a->param[0]);
+ break;
+ case slang_asm_leave:
+ fprintf (f, "leave");
+ break;
+ case slang_asm_local_alloc:
+ fprintf (f, "local_alloc\t%u", a->param[0]);
+ break;
+ case slang_asm_local_free:
+ fprintf (f, "local_free\t%u", a->param[0]);
+ break;
+ case slang_asm_local_addr:
+ fprintf (f, "local_addr\t%u, %u", a->param[0], a->param[1]);
+ break;
+ case slang_asm_global_addr:
+ fprintf (f, "global_addr\t%u", a->param[0]);
+ break;
+ case slang_asm_call:
+ fprintf (f, "call\t%u", a->param[0]);
+ break;
+ case slang_asm_return:
+ fprintf (f, "return");
+ break;
+ case slang_asm_discard:
+ fprintf (f, "discard");
+ break;
+ case slang_asm_exit:
+ fprintf (f, "exit");
+ break;
+ /* mesa-specific extensions */
+ case slang_asm_float_print:
+ fprintf (f, "float_print");
+ break;
+ case slang_asm_int_print:
+ fprintf (f, "int_print");
+ break;
+ case slang_asm_bool_print:
+ fprintf (f, "bool_print");
+ break;
+ default:
+ break;
+ }
+
+ fprintf (f, "\n");
+}
+
+static void dump (const slang_assembly_file *file)
+{
+ unsigned int i;
+ static unsigned int counter = 0;
+ FILE *f;
+ char filename[256];
+
+ counter++;
+ _mesa_sprintf (filename, "~mesa-slang-assembly-dump-(%u).txt", counter);
+ f = fopen (filename, "w");
+ if (f == NULL)
+ return;
+
+ for (i = 0; i < file->count; i++)
+ dump_instruction (f, file->code + i, i);
+
+ fclose (f);
+}
+
+#endif
+
+int _slang_execute2 (const slang_assembly_file *file, slang_machine *mach)
+{
+ slang_machine_slot *stack;
+
+#if DEBUG_SLANG
+ static unsigned int counter = 0;
+ char filename[256];
+ FILE *f;
+#endif
+
+ /* assume 32-bit floats and uints; should work fine also on 64-bit platforms */
+ static_assert(sizeof (GLfloat) == 4);
+ static_assert(sizeof (GLuint) == 4);
+
+#if DEBUG_SLANG
+ dump (file);
+ counter++;
+ _mesa_sprintf (filename, "~mesa-slang-assembly-exec-(%u).txt", counter);
+ f = fopen (filename, "w");
+#endif
+
+#if defined(USE_X86_ASM) || defined(SLANG_X86)
+ if (mach->x86.compiled_func != NULL)
+ {
+ mach->x86.compiled_func (mach);
+ return 1;
+ }
+#endif
+
+ stack = mach->mem + SLANG_MACHINE_GLOBAL_SIZE;
+
+ while (!mach->exit)
+ {
+ slang_assembly *a = &file->code[mach->ip];
+
+#if DEBUG_SLANG
+ if (f != NULL && a->type != slang_asm_none)
+ {
+ unsigned int i;
+
+ dump_instruction (f, file->code + mach->ip, mach->ip);
+ fprintf (f, "\t\tsp=%u bp=%u\n", mach->sp, mach->bp);
+ for (i = mach->sp; i < SLANG_MACHINE_STACK_SIZE; i++)
+ fprintf (f, "\t%.5u\t%6f\t%u\n", i, stack[i]._float, stack[i]._addr);
+ fflush (f);
+ }
+#endif
+
+ mach->ip++;
+
+ switch (a->type)
+ {
+ /* core */
+ case slang_asm_none:
+ break;
+ case slang_asm_float_copy:
+ case slang_asm_int_copy:
+ case slang_asm_bool_copy:
+ mach->mem[(stack[mach->sp + a->param[0] / 4]._addr + a->param[1]) / 4]._float =
+ stack[mach->sp]._float;
+ mach->sp++;
+ break;
+ case slang_asm_float_move:
+ case slang_asm_int_move:
+ case slang_asm_bool_move:
+ stack[mach->sp + a->param[0] / 4]._float =
+ stack[mach->sp + (stack[mach->sp]._addr + a->param[1]) / 4]._float;
+ break;
+ case slang_asm_float_push:
+ case slang_asm_int_push:
+ case slang_asm_bool_push:
+ mach->sp--;
+ stack[mach->sp]._float = a->literal;
+ break;
+ case slang_asm_float_deref:
+ case slang_asm_int_deref:
+ case slang_asm_bool_deref:
+ stack[mach->sp]._float = mach->mem[stack[mach->sp]._addr / 4]._float;
+ break;
+ case slang_asm_float_add:
+ stack[mach->sp + 1]._float += stack[mach->sp]._float;
+ mach->sp++;
+ break;
+ case slang_asm_float_multiply:
+ stack[mach->sp + 1]._float *= stack[mach->sp]._float;
+ mach->sp++;
+ break;
+ case slang_asm_float_divide:
+ stack[mach->sp + 1]._float /= stack[mach->sp]._float;
+ mach->sp++;
+ break;
+ case slang_asm_float_negate:
+ stack[mach->sp]._float = -stack[mach->sp]._float;
+ break;
+ case slang_asm_float_less:
+ stack[mach->sp + 1]._float =
+ stack[mach->sp + 1]._float < stack[mach->sp]._float ? (GLfloat) 1 : (GLfloat) 0;
+ mach->sp++;
+ break;
+ case slang_asm_float_equal_exp:
+ stack[mach->sp + 1]._float =
+ stack[mach->sp + 1]._float == stack[mach->sp]._float ? (GLfloat) 1 : (GLfloat) 0;
+ mach->sp++;
+ break;
+ case slang_asm_float_equal_int:
+ mach->sp--;
+ stack[mach->sp]._float = stack[mach->sp + 1 + a->param[0] / 4]._float ==
+ stack[mach->sp + 1 + a->param[1] / 4]._float ? (GLfloat) 1 : (GLfloat) 0;
+ break;
+ case slang_asm_float_to_int:
+ stack[mach->sp]._float = (GLfloat) (GLint) stack[mach->sp]._float;
+ break;
+ case slang_asm_float_sine:
+ stack[mach->sp]._float = (GLfloat) _mesa_sin (stack[mach->sp]._float);
+ break;
+ case slang_asm_float_arcsine:
+ stack[mach->sp]._float = _mesa_asinf (stack[mach->sp]._float);
+ break;
+ case slang_asm_float_arctan:
+ stack[mach->sp]._float = _mesa_atanf (stack[mach->sp]._float);
+ break;
+ case slang_asm_float_power:
+ stack[mach->sp + 1]._float =
+ (GLfloat) _mesa_pow (stack[mach->sp + 1]._float, stack[mach->sp]._float);
+ mach->sp++;
+ break;
+ case slang_asm_float_log2:
+ stack[mach->sp]._float = LOG2 (stack[mach->sp]._float);
+ break;
+ case slang_asm_float_floor:
+ stack[mach->sp]._float = FLOORF (stack[mach->sp]._float);
+ break;
+ case slang_asm_float_ceil:
+ stack[mach->sp]._float = CEILF (stack[mach->sp]._float);
+ break;
+ case slang_asm_float_noise1:
+ stack[mach->sp]._float = _slang_library_noise1 (stack[mach->sp]._float);
+ break;
+ case slang_asm_float_noise2:
+ stack[mach->sp + 1]._float = _slang_library_noise2 (stack[mach->sp]._float,
+ stack[mach->sp + 1]._float);
+ mach->sp++;
+ break;
+ case slang_asm_float_noise3:
+ stack[mach->sp + 2]._float = _slang_library_noise3 (stack[mach->sp]._float,
+ stack[mach->sp + 1]._float, stack[mach->sp + 2]._float);
+ mach->sp += 2;
+ break;
+ case slang_asm_float_noise4:
+ stack[mach->sp + 3]._float = _slang_library_noise4 (stack[mach->sp]._float,
+ stack[mach->sp + 1]._float, stack[mach->sp + 2]._float, stack[mach->sp + 3]._float);
+ mach->sp += 3;
+ break;
+ case slang_asm_int_to_float:
+ break;
+ case slang_asm_int_to_addr:
+ stack[mach->sp]._addr = (GLuint) (GLint) stack[mach->sp]._float;
+ break;
+ case slang_asm_addr_copy:
+ mach->mem[stack[mach->sp + 1]._addr / 4]._addr = stack[mach->sp]._addr;
+ mach->sp++;
+ break;
+ case slang_asm_addr_push:
+ case slang_asm_global_addr:
+ mach->sp--;
+ stack[mach->sp]._addr = a->param[0];
+ break;
+ case slang_asm_addr_deref:
+ stack[mach->sp]._addr = mach->mem[stack[mach->sp]._addr / 4]._addr;
+ break;
+ case slang_asm_addr_add:
+ stack[mach->sp + 1]._addr += stack[mach->sp]._addr;
+ mach->sp++;
+ break;
+ case slang_asm_addr_multiply:
+ stack[mach->sp + 1]._addr *= stack[mach->sp]._addr;
+ mach->sp++;
+ break;
+ case slang_asm_vec4_tex1d:
+ _slang_library_tex1d (stack[mach->sp]._float, stack[mach->sp + 1]._float,
+ stack[mach->sp + 2]._float, &mach->mem[stack[mach->sp + 3]._addr / 4]._float);
+ mach->sp += 3;
+ break;
+ case slang_asm_vec4_tex2d:
+ _slang_library_tex2d (stack[mach->sp]._float, stack[mach->sp + 1]._float,
+ stack[mach->sp + 2]._float, stack[mach->sp + 3]._float,
+ &mach->mem[stack[mach->sp + 4]._addr / 4]._float);
+ mach->sp += 4;
+ break;
+ case slang_asm_vec4_tex3d:
+ _slang_library_tex3d (stack[mach->sp]._float, stack[mach->sp + 1]._float,
+ stack[mach->sp + 2]._float, stack[mach->sp + 3]._float, stack[mach->sp + 4]._float,
+ &mach->mem[stack[mach->sp + 5]._addr / 4]._float);
+ mach->sp += 5;
+ break;
+ case slang_asm_vec4_texcube:
+ _slang_library_texcube (stack[mach->sp]._float, stack[mach->sp + 1]._float,
+ stack[mach->sp + 2]._float, stack[mach->sp + 3]._float, stack[mach->sp + 4]._float,
+ &mach->mem[stack[mach->sp + 5]._addr / 4]._float);
+ mach->sp += 5;
+ break;
+ case slang_asm_vec4_shad1d:
+ _slang_library_shad1d (stack[mach->sp]._float, stack[mach->sp + 1]._float,
+ stack[mach->sp + 2]._float, stack[mach->sp + 3]._float, stack[mach->sp + 4]._float,
+ &mach->mem[stack[mach->sp + 5]._addr / 4]._float);
+ mach->sp += 5;
+ break;
+ case slang_asm_vec4_shad2d:
+ _slang_library_shad2d (stack[mach->sp]._float, stack[mach->sp + 1]._float,
+ stack[mach->sp + 2]._float, stack[mach->sp + 3]._float, stack[mach->sp + 4]._float,
+ &mach->mem[stack[mach->sp + 5]._addr / 4]._float);
+ mach->sp += 5;
+ break;
+ case slang_asm_jump:
+ mach->ip = a->param[0];
+ break;
+ case slang_asm_jump_if_zero:
+ if (stack[mach->sp]._float == 0.0f)
+ mach->ip = a->param[0];
+ mach->sp++;
+ break;
+ case slang_asm_enter:
+ mach->sp--;
+ stack[mach->sp]._addr = mach->bp;
+ mach->bp = mach->sp + a->param[0] / 4;
+ break;
+ case slang_asm_leave:
+ mach->bp = stack[mach->sp]._addr;
+ mach->sp++;
+ break;
+ case slang_asm_local_alloc:
+ mach->sp -= a->param[0] / 4;
+ break;
+ case slang_asm_local_free:
+ mach->sp += a->param[0] / 4;
+ break;
+ case slang_asm_local_addr:
+ mach->sp--;
+ stack[mach->sp]._addr = SLANG_MACHINE_GLOBAL_SIZE * 4 + mach->bp * 4 -
+ (a->param[0] + a->param[1]) + 4;
+ break;
+ case slang_asm_call:
+ mach->sp--;
+ stack[mach->sp]._addr = mach->ip;
+ mach->ip = a->param[0];
+ break;
+ case slang_asm_return:
+ mach->ip = stack[mach->sp]._addr;
+ mach->sp++;
+ break;
+ case slang_asm_discard:
+ mach->kill = 1;
+ break;
+ case slang_asm_exit:
+ mach->exit = 1;
+ break;
+ /* mesa-specific extensions */
+ case slang_asm_float_print:
+ _mesa_printf ("slang print: %f\n", stack[mach->sp]._float);
+ break;
+ case slang_asm_int_print:
+ _mesa_printf ("slang print: %d\n", (GLint) stack[mach->sp]._float);
+ break;
+ case slang_asm_bool_print:
+ _mesa_printf ("slang print: %s\n", (GLint) stack[mach->sp]._float ? "true" : "false");
+ break;
+ default:
+ assert (0);
+ }
+ }
+
+#if DEBUG_SLANG
+ if (f != NULL)
+ fclose (f);
+#endif
+
+ return 1;
+}
+
diff --git a/src/mesa/shader/slang/slang_execute.h b/src/mesa/shader/slang/slang_execute.h
index 99be0fff8e..4fca84c550 100644
--- a/src/mesa/shader/slang/slang_execute.h
+++ b/src/mesa/shader/slang/slang_execute.h
@@ -1,84 +1,84 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#if !defined SLANG_EXECUTE_H
-#define SLANG_EXECUTE_H
-
-#include "slang_assemble.h"
-
-#if defined __cplusplus
-extern "C" {
-#endif
-
-typedef union slang_machine_slot_
-{
- GLfloat _float;
- GLuint _addr;
-} slang_machine_slot;
-
-#define SLANG_MACHINE_GLOBAL_SIZE 3072
-#define SLANG_MACHINE_STACK_SIZE 1024
-#define SLANG_MACHINE_MEMORY_SIZE (SLANG_MACHINE_GLOBAL_SIZE + SLANG_MACHINE_STACK_SIZE)
-
-#if defined(USE_X86_ASM) || defined(SLANG_X86)
-typedef struct
-{
- GLvoid (* compiled_func) (struct slang_machine_ *);
- GLuint esp_restore;
- GLshort fpucntl_rnd_neg;
- GLshort fpucntl_restore;
-} slang_machine_x86;
-#endif
-
-typedef struct slang_machine_
-{
- GLuint ip; /* instruction pointer, for flow control */
- GLuint sp; /* stack pointer, for stack access */
- GLuint bp; /* base pointer, for local variable access */
- GLuint kill; /* discard the fragment */
- GLuint exit; /* terminate the shader */
- slang_machine_slot mem[SLANG_MACHINE_MEMORY_SIZE];
-#if defined(USE_X86_ASM) || defined(SLANG_X86)
- slang_machine_x86 x86;
-#endif
-} slang_machine;
-
-GLvoid slang_machine_ctr (slang_machine *);
-GLvoid slang_machine_dtr (slang_machine *);
-
-void slang_machine_init (slang_machine *);
-
-int _slang_execute (const slang_assembly_file *);
-int _slang_execute2 (const slang_assembly_file *, slang_machine *);
-
-#if defined(USE_X86_ASM) || defined(SLANG_X86)
-GLboolean _slang_x86_codegen (slang_machine *, slang_assembly_file *, GLuint);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#if !defined SLANG_EXECUTE_H
+#define SLANG_EXECUTE_H
+
+#include "slang_assemble.h"
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+typedef union slang_machine_slot_
+{
+ GLfloat _float;
+ GLuint _addr;
+} slang_machine_slot;
+
+#define SLANG_MACHINE_GLOBAL_SIZE 3072
+#define SLANG_MACHINE_STACK_SIZE 1024
+#define SLANG_MACHINE_MEMORY_SIZE (SLANG_MACHINE_GLOBAL_SIZE + SLANG_MACHINE_STACK_SIZE)
+
+#if defined(USE_X86_ASM) || defined(SLANG_X86)
+typedef struct
+{
+ GLvoid (* compiled_func) (struct slang_machine_ *);
+ GLuint esp_restore;
+ GLshort fpucntl_rnd_neg;
+ GLshort fpucntl_restore;
+} slang_machine_x86;
+#endif
+
+typedef struct slang_machine_
+{
+ GLuint ip; /* instruction pointer, for flow control */
+ GLuint sp; /* stack pointer, for stack access */
+ GLuint bp; /* base pointer, for local variable access */
+ GLuint kill; /* discard the fragment */
+ GLuint exit; /* terminate the shader */
+ slang_machine_slot mem[SLANG_MACHINE_MEMORY_SIZE];
+#if defined(USE_X86_ASM) || defined(SLANG_X86)
+ slang_machine_x86 x86;
+#endif
+} slang_machine;
+
+GLvoid slang_machine_ctr (slang_machine *);
+GLvoid slang_machine_dtr (slang_machine *);
+
+void slang_machine_init (slang_machine *);
+
+int _slang_execute (const slang_assembly_file *);
+int _slang_execute2 (const slang_assembly_file *, slang_machine *);
+
+#if defined(USE_X86_ASM) || defined(SLANG_X86)
+GLboolean _slang_x86_codegen (slang_machine *, slang_assembly_file *, GLuint);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/src/mesa/shader/slang/slang_execute_x86.c b/src/mesa/shader/slang/slang_execute_x86.c
index b578838e82..ea140bd0b0 100644
--- a/src/mesa/shader/slang/slang_execute_x86.c
+++ b/src/mesa/shader/slang/slang_execute_x86.c
@@ -1,565 +1,565 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_execute_x86.c
- * x86 back end compiler
- * \author Michal Krol, Keith Whitwell
- */
-
-#include "imports.h"
-#include "slang_execute.h"
-#include "slang_library_noise.h"
-#include "slang_library_texsample.h"
-
-#if defined(USE_X86_ASM) || defined(SLANG_X86)
-
-#include "x86/rtasm/x86sse.h"
-
-typedef struct
-{
- GLuint index;
- GLubyte *csr;
-} fixup;
-
-typedef struct
-{
- struct x86_function f;
- struct x86_reg r_eax;
- struct x86_reg r_ecx;
- struct x86_reg r_edx;
- struct x86_reg r_esp;
- struct x86_reg r_ebp;
- struct x86_reg r_st0;
- struct x86_reg r_st1;
- struct x86_reg r_st2;
- struct x86_reg r_st3;
- fixup *fixups;
- GLuint fixup_count;
- GLubyte **labels;
- slang_machine *mach;
- GLubyte *l_discard;
- GLubyte *l_exit;
- GLshort fpucntl;
-} codegen_ctx;
-
-static GLvoid add_fixup (codegen_ctx *G, GLuint index, GLubyte *csr)
-{
- G->fixups = (fixup *) slang_alloc_realloc (G->fixups, G->fixup_count * sizeof (fixup),
- (G->fixup_count + 1) * sizeof (fixup));
- G->fixups[G->fixup_count].index = index;
- G->fixups[G->fixup_count].csr = csr;
- G->fixup_count++;
-}
-
-#ifdef NO_FAST_MATH
-#define RESTORE_FPU (DEFAULT_X86_FPU)
-#define RND_NEG_FPU (DEFAULT_X86_FPU | 0x400)
-#else
-#define RESTORE_FPU (FAST_X86_FPU)
-#define RND_NEG_FPU (FAST_X86_FPU | 0x400)
-#endif
-
-#if 0
-
-/*
- * XXX
- * These should produce a valid code that computes powers. Unfortunately, it does not.
- */
-static void set_fpu_round_neg_inf (codegen_ctx *G)
-{
- if (G->fpucntl != RND_NEG_FPU)
- {
- G->fpucntl = RND_NEG_FPU;
- x87_fnclex (&G->f);
- x86_mov_reg_imm (&G->f, G->r_eax, (GLint) &G->mach->x86.fpucntl_rnd_neg);
- x87_fldcw (&G->f, x86_deref (G->r_eax));
- }
-}
-
-static void emit_x87_ex2 (codegen_ctx *G)
-{
- set_fpu_round_neg_inf (G);
-
- x87_fld (&G->f, G->r_st0); /* a a */
- x87_fprndint (&G->f); /* int(a) a */
- x87_fld (&G->f, G->r_st0); /* int(a) int(a) a */
- x87_fstp (&G->f, G->r_st3); /* int(a) a int(a)*/
- x87_fsubp (&G->f, G->r_st1);/* frac(a) int(a) */
- x87_f2xm1 (&G->f); /* (2^frac(a))-1 int(a)*/
- x87_fld1 (&G->f); /* 1 (2^frac(a))-1 int(a)*/
- x87_faddp (&G->f, G->r_st1);/* 2^frac(a) int(a) */
- x87_fscale (&G->f); /* 2^a */
-}
-
-static void emit_pow (codegen_ctx *G)
-{
- x87_fld (&G->f, x86_deref (G->r_esp));
- x87_fld (&G->f, x86_make_disp (G->r_esp, 4));
- x87_fyl2x (&G->f);
- emit_x87_ex2 (G);
-}
-
-#endif
-
-static GLfloat do_ceilf (GLfloat x)
-{
- return CEILF (x);
-}
-
-static GLfloat do_floorf (GLfloat x)
-{
- return FLOORF (x);
-}
-
-static GLfloat do_powf (GLfloat y, GLfloat x)
-{
- return (GLfloat) _mesa_pow ((GLdouble) x, (GLdouble) y);
-}
-
-static GLvoid do_print_float (GLfloat x)
-{
- _mesa_printf ("slang print: %f\n", x);
-}
-
-static GLvoid do_print_int (GLfloat x)
-{
- _mesa_printf ("slang print: %d\n", (GLint) x);
-}
-
-static GLvoid do_print_bool (GLfloat x)
-{
- _mesa_printf ("slang print: %s\n", (GLint) x ? "true" : "false");
-}
-
-#define FLOAT_ONE 0x3f800000
-#define FLOAT_ZERO 0
-
-static GLvoid codegen_assem (codegen_ctx *G, slang_assembly *a)
-{
- GLint disp;
-
- switch (a->type)
- {
- case slang_asm_none:
- break;
- case slang_asm_float_copy:
- case slang_asm_int_copy:
- case slang_asm_bool_copy:
- x86_mov (&G->f, G->r_eax, x86_make_disp (G->r_esp, a->param[0]));
- x86_pop (&G->f, G->r_ecx);
- x86_mov (&G->f, x86_make_disp (G->r_eax, a->param[1]), G->r_ecx);
- break;
- case slang_asm_float_move:
- case slang_asm_int_move:
- case slang_asm_bool_move:
- x86_lea (&G->f, G->r_eax, x86_make_disp (G->r_esp, a->param[1]));
- x86_add (&G->f, G->r_eax, x86_deref (G->r_esp));
- x86_mov (&G->f, G->r_eax, x86_deref (G->r_eax));
- x86_mov (&G->f, x86_make_disp (G->r_esp, a->param[0]), G->r_eax);
- break;
- case slang_asm_float_push:
- case slang_asm_int_push:
- case slang_asm_bool_push:
- /* TODO: use push imm32 */
- x86_mov_reg_imm (&G->f, G->r_eax, *((GLint *) &a->literal));
- x86_push (&G->f, G->r_eax);
- break;
- case slang_asm_float_deref:
- case slang_asm_int_deref:
- case slang_asm_bool_deref:
- case slang_asm_addr_deref:
- x86_mov (&G->f, G->r_eax, x86_deref (G->r_esp));
- x86_mov (&G->f, G->r_eax, x86_deref (G->r_eax));
- x86_mov (&G->f, x86_deref (G->r_esp), G->r_eax);
- break;
- case slang_asm_float_add:
- x87_fld (&G->f, x86_make_disp (G->r_esp, 4));
- x87_fld (&G->f, x86_deref (G->r_esp));
- x87_faddp (&G->f, G->r_st1);
- x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));
- x87_fstp (&G->f, x86_deref (G->r_esp));
- break;
- case slang_asm_float_multiply:
- x87_fld (&G->f, x86_make_disp (G->r_esp, 4));
- x87_fld (&G->f, x86_deref (G->r_esp));
- x87_fmulp (&G->f, G->r_st1);
- x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));
- x87_fstp (&G->f, x86_deref (G->r_esp));
- break;
- case slang_asm_float_divide:
- x87_fld (&G->f, x86_make_disp (G->r_esp, 4));
- x87_fld (&G->f, x86_deref (G->r_esp));
- x87_fdivp (&G->f, G->r_st1);
- x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));
- x87_fstp (&G->f, x86_deref (G->r_esp));
- break;
- case slang_asm_float_negate:
- x87_fld (&G->f, x86_deref (G->r_esp));
- x87_fchs (&G->f);
- x87_fstp (&G->f, x86_deref (G->r_esp));
- break;
- case slang_asm_float_less:
- x87_fld (&G->f, x86_make_disp (G->r_esp, 4));
- x87_fcomp (&G->f, x86_deref (G->r_esp));
- x87_fnstsw (&G->f, G->r_eax);
- /* TODO: use test r8,imm8 */
- x86_mov_reg_imm (&G->f, G->r_ecx, 0x100);
- x86_test (&G->f, G->r_eax, G->r_ecx);
- {
- GLubyte *lab0, *lab1;
-
- /* TODO: use jcc rel8 */
- lab0 = x86_jcc_forward (&G->f, cc_E);
- x86_mov_reg_imm (&G->f, G->r_ecx, FLOAT_ONE);
- /* TODO: use jmp rel8 */
- lab1 = x86_jmp_forward (&G->f);
- x86_fixup_fwd_jump (&G->f, lab0);
- x86_mov_reg_imm (&G->f, G->r_ecx, FLOAT_ZERO);
- x86_fixup_fwd_jump (&G->f, lab1);
- x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));
- x86_mov (&G->f, x86_deref (G->r_esp), G->r_ecx);
- }
- break;
- case slang_asm_float_equal_exp:
- x87_fld (&G->f, x86_make_disp (G->r_esp, 4));
- x87_fcomp (&G->f, x86_deref (G->r_esp));
- x87_fnstsw (&G->f, G->r_eax);
- /* TODO: use test r8,imm8 */
- x86_mov_reg_imm (&G->f, G->r_ecx, 0x4000);
- x86_test (&G->f, G->r_eax, G->r_ecx);
- {
- GLubyte *lab0, *lab1;
-
- /* TODO: use jcc rel8 */
- lab0 = x86_jcc_forward (&G->f, cc_E);
- x86_mov_reg_imm (&G->f, G->r_ecx, FLOAT_ONE);
- /* TODO: use jmp rel8 */
- lab1 = x86_jmp_forward (&G->f);
- x86_fixup_fwd_jump (&G->f, lab0);
- x86_mov_reg_imm (&G->f, G->r_ecx, FLOAT_ZERO);
- x86_fixup_fwd_jump (&G->f, lab1);
- x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));
- x86_mov (&G->f, x86_deref (G->r_esp), G->r_ecx);
- }
- break;
- case slang_asm_float_equal_int:
- x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, -4));
- x87_fld (&G->f, x86_make_disp (G->r_esp, a->param[0] + 4));
- x87_fcomp (&G->f, x86_make_disp (G->r_esp, a->param[1] + 4));
- x87_fnstsw (&G->f, G->r_eax);
- /* TODO: use test r8,imm8 */
- x86_mov_reg_imm (&G->f, G->r_ecx, 0x4000);
- x86_test (&G->f, G->r_eax, G->r_ecx);
- {
- GLubyte *lab0, *lab1;
-
- /* TODO: use jcc rel8 */
- lab0 = x86_jcc_forward (&G->f, cc_E);
- x86_mov_reg_imm (&G->f, G->r_ecx, FLOAT_ONE);
- /* TODO: use jmp rel8 */
- lab1 = x86_jmp_forward (&G->f);
- x86_fixup_fwd_jump (&G->f, lab0);
- x86_mov_reg_imm (&G->f, G->r_ecx, FLOAT_ZERO);
- x86_fixup_fwd_jump (&G->f, lab1);
- x86_mov (&G->f, x86_deref (G->r_esp), G->r_ecx);
- }
- break;
- case slang_asm_float_to_int:
- x87_fld (&G->f, x86_deref (G->r_esp));
- x87_fistp (&G->f, x86_deref (G->r_esp));
- break;
- case slang_asm_float_sine:
- /* TODO: use fsin */
- x86_call (&G->f, (GLubyte *) _mesa_sinf);
- x87_fstp (&G->f, x86_deref (G->r_esp));
- break;
- case slang_asm_float_arcsine:
- /* TODO: use fpatan (?) */
- x86_call (&G->f, (GLubyte *) _mesa_asinf);
- x87_fstp (&G->f, x86_deref (G->r_esp));
- break;
- case slang_asm_float_arctan:
- /* TODO: use fpatan */
- x86_call (&G->f, (GLubyte *) _mesa_atanf);
- x87_fstp (&G->f, x86_deref (G->r_esp));
- break;
- case slang_asm_float_power:
- /* TODO: use emit_pow() */
- x86_call (&G->f, (GLubyte *) do_powf);
- x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));
- x87_fstp (&G->f, x86_deref (G->r_esp));
- break;
- case slang_asm_float_log2:
- x87_fld1 (&G->f);
- x87_fld (&G->f, x86_deref (G->r_esp));
- x87_fyl2x (&G->f);
- x87_fstp (&G->f, x86_deref (G->r_esp));
- break;
- case slang_asm_float_floor:
- x86_call (&G->f, (GLubyte *) do_floorf);
- x87_fstp (&G->f, x86_deref (G->r_esp));
- break;
- case slang_asm_float_ceil:
- x86_call (&G->f, (GLubyte *) do_ceilf);
- x87_fstp (&G->f, x86_deref (G->r_esp));
- break;
- case slang_asm_float_noise1:
- x86_call (&G->f, (GLubyte *) _slang_library_noise1);
- x87_fstp (&G->f, x86_deref (G->r_esp));
- break;
- case slang_asm_float_noise2:
- x86_call (&G->f, (GLubyte *) _slang_library_noise2);
- x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));
- x87_fstp (&G->f, x86_deref (G->r_esp));
- break;
- case slang_asm_float_noise3:
- x86_call (&G->f, (GLubyte *) _slang_library_noise4);
- x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 8));
- x87_fstp (&G->f, x86_deref (G->r_esp));
- break;
- case slang_asm_float_noise4:
- x86_call (&G->f, (GLubyte *) _slang_library_noise4);
- x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 12));
- x87_fstp (&G->f, x86_deref (G->r_esp));
- break;
- case slang_asm_int_to_float:
- break;
- case slang_asm_int_to_addr:
- x87_fld (&G->f, x86_deref (G->r_esp));
- x87_fistp (&G->f, x86_deref (G->r_esp));
- break;
- case slang_asm_addr_copy:
- x86_pop (&G->f, G->r_eax);
- x86_mov (&G->f, G->r_ecx, x86_deref (G->r_esp));
- x86_mov (&G->f, x86_deref (G->r_ecx), G->r_eax);
- break;
- case slang_asm_addr_push:
- /* TODO: use push imm32 */
- x86_mov_reg_imm (&G->f, G->r_eax, (GLint) a->param[0]);
- x86_push (&G->f, G->r_eax);
- break;
- case slang_asm_addr_add:
- x86_pop (&G->f, G->r_eax);
- x86_add (&G->f, x86_deref (G->r_esp), G->r_eax);
- break;
- case slang_asm_addr_multiply:
- x86_pop (&G->f, G->r_ecx);
- x86_mov (&G->f, G->r_eax, x86_deref (G->r_esp));
- x86_mul (&G->f, G->r_ecx);
- x86_mov (&G->f, x86_deref (G->r_esp), G->r_eax);
- break;
- case slang_asm_vec4_tex1d:
- x86_call (&G->f, (GLubyte *) _slang_library_tex1d);
- x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 12));
- break;
- case slang_asm_vec4_tex2d:
- x86_call (&G->f, (GLubyte *) _slang_library_tex2d);
- x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 16));
- break;
- case slang_asm_vec4_tex3d:
- x86_call (&G->f, (GLubyte *) _slang_library_tex3d);
- x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 20));
- break;
- case slang_asm_vec4_texcube:
- x86_call (&G->f, (GLubyte *) _slang_library_texcube);
- x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 20));
- break;
- case slang_asm_vec4_shad1d:
- x86_call (&G->f, (GLubyte *) _slang_library_shad1d);
- x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 20));
- break;
- case slang_asm_vec4_shad2d:
- x86_call (&G->f, (GLubyte *) _slang_library_shad2d);
- x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 20));
- break;
- case slang_asm_jump:
- add_fixup (G, a->param[0], x86_jmp_forward (&G->f));
- break;
- case slang_asm_jump_if_zero:
- x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));
- x86_xor (&G->f, G->r_eax, G->r_eax);
- x86_cmp (&G->f, G->r_eax, x86_make_disp (G->r_esp, -4));
- {
- GLubyte *lab0;
-
- /* TODO: use jcc rel8 */
- lab0 = x86_jcc_forward (&G->f, cc_NE);
- add_fixup (G, a->param[0], x86_jmp_forward (&G->f));
- x86_fixup_fwd_jump (&G->f, lab0);
- }
- break;
- case slang_asm_enter:
- /* FIXME: x86_make_disp(esp, 0) + x86_lea() generates bogus code */
- assert (a->param[0] != 0);
- x86_push (&G->f, G->r_ebp);
- x86_lea (&G->f, G->r_ebp, x86_make_disp (G->r_esp, (GLint) a->param[0]));
- break;
- case slang_asm_leave:
- x86_pop (&G->f, G->r_ebp);
- break;
- case slang_asm_local_alloc:
- /* FIXME: x86_make_disp(esp, 0) + x86_lea() generates bogus code */
- assert (a->param[0] != 0);
- x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, -(GLint) a->param[0]));
- break;
- case slang_asm_local_free:
- /* FIXME: x86_make_disp(esp, 0) + x86_lea() generates bogus code */
- assert (a->param[0] != 0);
- x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, (GLint) a->param[0]));
- break;
- case slang_asm_local_addr:
- disp = -(GLint) (a->param[0] + a->param[1]) + 4;
- if (disp != 0)
- {
- x86_lea (&G->f, G->r_eax, x86_make_disp (G->r_ebp, disp));
- x86_push (&G->f, G->r_eax);
- }
- else
- x86_push (&G->f, G->r_ebp);
- break;
- case slang_asm_global_addr:
- /* TODO: use push imm32 */
- x86_mov_reg_imm (&G->f, G->r_eax, (GLint) &G->mach->mem + a->param[0]);
- x86_push (&G->f, G->r_eax);
- break;
- case slang_asm_call:
- add_fixup (G, a->param[0], x86_call_forward (&G->f));
- break;
- case slang_asm_return:
- x86_ret (&G->f);
- break;
- case slang_asm_discard:
- x86_jmp (&G->f, G->l_discard);
- break;
- case slang_asm_exit:
- x86_jmp (&G->f, G->l_exit);
- break;
- /* mesa-specific extensions */
- case slang_asm_float_print:
- x86_call (&G->f, (GLubyte *) do_print_float);
- break;
- case slang_asm_int_print:
- x86_call (&G->f, (GLubyte *) do_print_int);
- break;
- case slang_asm_bool_print:
- x86_call (&G->f, (GLubyte *) do_print_bool);
- break;
- default:
- assert (0);
- }
-}
-
-GLboolean _slang_x86_codegen (slang_machine *mach, slang_assembly_file *file, GLuint start)
-{
- codegen_ctx G;
- GLubyte *j_body, *j_exit;
- GLuint i;
-
- /*
- * We need as much as 1M because *all* assembly, including built-in library, is
- * being translated to x86.
- * The built-in library occupies 450K, so we can be safe for now.
- * It is going to change in the future, when we get assembly analysis running.
- */
- x86_init_func_size (&G.f, 1048576);
- G.r_eax = x86_make_reg (file_REG32, reg_AX);
- G.r_ecx = x86_make_reg (file_REG32, reg_CX);
- G.r_edx = x86_make_reg (file_REG32, reg_DX);
- G.r_esp = x86_make_reg (file_REG32, reg_SP);
- G.r_ebp = x86_make_reg (file_REG32, reg_BP);
- G.r_st0 = x86_make_reg (file_x87, 0);
- G.r_st1 = x86_make_reg (file_x87, 1);
- G.r_st2 = x86_make_reg (file_x87, 2);
- G.r_st3 = x86_make_reg (file_x87, 3);
- G.fixups = NULL;
- G.fixup_count = 0;
- G.labels = (GLubyte **) slang_alloc_malloc (file->count * sizeof (GLubyte *));
- G.mach = mach;
- G.fpucntl = RESTORE_FPU;
-
- mach->x86.fpucntl_rnd_neg = RND_NEG_FPU;
- mach->x86.fpucntl_restore = RESTORE_FPU;
-
- /* prepare stack and jump to start */
- x86_push (&G.f, G.r_ebp);
- x86_mov_reg_imm (&G.f, G.r_eax, (GLint) &mach->x86.esp_restore);
- x86_push (&G.f, G.r_esp);
- x86_pop (&G.f, G.r_ecx);
- x86_mov (&G.f, x86_deref (G.r_eax), G.r_ecx);
- j_body = x86_jmp_forward (&G.f);
-
- /* "discard" instructions jump to this label */
- G.l_discard = x86_get_label (&G.f);
- x86_mov_reg_imm (&G.f, G.r_eax, (GLint) &G.mach->kill);
- x86_mov_reg_imm (&G.f, G.r_ecx, 1);
- x86_mov (&G.f, x86_deref (G.r_eax), G.r_ecx);
- G.l_exit = x86_get_label (&G.f);
- j_exit = x86_jmp_forward (&G.f);
-
- for (i = 0; i < file->count; i++)
- {
- G.labels[i] = x86_get_label (&G.f);
- if (i == start)
- x86_fixup_fwd_jump (&G.f, j_body);
- codegen_assem (&G, &file->code[i]);
- }
-
- /*
- * Restore stack and return.
- * This must be handled this way, because "discard" can be invoked from any
- * place in the code.
- */
- x86_fixup_fwd_jump (&G.f, j_exit);
- x86_mov_reg_imm (&G.f, G.r_eax, (GLint) &mach->x86.esp_restore);
- x86_mov (&G.f, G.r_esp, x86_deref (G.r_eax));
- x86_pop (&G.f, G.r_ebp);
- if (G.fpucntl != RESTORE_FPU)
- {
- x87_fnclex (&G.f);
- x86_mov_reg_imm (&G.f, G.r_eax, (GLint) &G.mach->x86.fpucntl_restore);
- x87_fldcw (&G.f, x86_deref (G.r_eax));
- }
- x86_ret (&G.f);
-
- /* fixup forward labels */
- for (i = 0; i < G.fixup_count; i++)
- {
- G.f.csr = G.labels[G.fixups[i].index];
- x86_fixup_fwd_jump (&G.f, G.fixups[i].csr);
- }
-
- slang_alloc_free (G.fixups);
- slang_alloc_free (G.labels);
-
- /* install new code */
- if (mach->x86.compiled_func != NULL)
- _mesa_exec_free (mach->x86.compiled_func);
- mach->x86.compiled_func = (GLvoid (*) (slang_machine *)) x86_get_func (&G.f);
-
- return GL_TRUE;
-}
-
-#endif
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file slang_execute_x86.c
+ * x86 back end compiler
+ * \author Michal Krol, Keith Whitwell
+ */
+
+#include "imports.h"
+#include "slang_execute.h"
+#include "slang_library_noise.h"
+#include "slang_library_texsample.h"
+
+#if defined(USE_X86_ASM) || defined(SLANG_X86)
+
+#include "x86/rtasm/x86sse.h"
+
+typedef struct
+{
+ GLuint index;
+ GLubyte *csr;
+} fixup;
+
+typedef struct
+{
+ struct x86_function f;
+ struct x86_reg r_eax;
+ struct x86_reg r_ecx;
+ struct x86_reg r_edx;
+ struct x86_reg r_esp;
+ struct x86_reg r_ebp;
+ struct x86_reg r_st0;
+ struct x86_reg r_st1;
+ struct x86_reg r_st2;
+ struct x86_reg r_st3;
+ fixup *fixups;
+ GLuint fixup_count;
+ GLubyte **labels;
+ slang_machine *mach;
+ GLubyte *l_discard;
+ GLubyte *l_exit;
+ GLshort fpucntl;
+} codegen_ctx;
+
+static GLvoid add_fixup (codegen_ctx *G, GLuint index, GLubyte *csr)
+{
+ G->fixups = (fixup *) slang_alloc_realloc (G->fixups, G->fixup_count * sizeof (fixup),
+ (G->fixup_count + 1) * sizeof (fixup));
+ G->fixups[G->fixup_count].index = index;
+ G->fixups[G->fixup_count].csr = csr;
+ G->fixup_count++;
+}
+
+#ifdef NO_FAST_MATH
+#define RESTORE_FPU (DEFAULT_X86_FPU)
+#define RND_NEG_FPU (DEFAULT_X86_FPU | 0x400)
+#else
+#define RESTORE_FPU (FAST_X86_FPU)
+#define RND_NEG_FPU (FAST_X86_FPU | 0x400)
+#endif
+
+#if 0
+
+/*
+ * XXX
+ * These should produce a valid code that computes powers. Unfortunately, it does not.
+ */
+static void set_fpu_round_neg_inf (codegen_ctx *G)
+{
+ if (G->fpucntl != RND_NEG_FPU)
+ {
+ G->fpucntl = RND_NEG_FPU;
+ x87_fnclex (&G->f);
+ x86_mov_reg_imm (&G->f, G->r_eax, (GLint) &G->mach->x86.fpucntl_rnd_neg);
+ x87_fldcw (&G->f, x86_deref (G->r_eax));
+ }
+}
+
+static void emit_x87_ex2 (codegen_ctx *G)
+{
+ set_fpu_round_neg_inf (G);
+
+ x87_fld (&G->f, G->r_st0); /* a a */
+ x87_fprndint (&G->f); /* int(a) a */
+ x87_fld (&G->f, G->r_st0); /* int(a) int(a) a */
+ x87_fstp (&G->f, G->r_st3); /* int(a) a int(a)*/
+ x87_fsubp (&G->f, G->r_st1);/* frac(a) int(a) */
+ x87_f2xm1 (&G->f); /* (2^frac(a))-1 int(a)*/
+ x87_fld1 (&G->f); /* 1 (2^frac(a))-1 int(a)*/
+ x87_faddp (&G->f, G->r_st1);/* 2^frac(a) int(a) */
+ x87_fscale (&G->f); /* 2^a */
+}
+
+static void emit_pow (codegen_ctx *G)
+{
+ x87_fld (&G->f, x86_deref (G->r_esp));
+ x87_fld (&G->f, x86_make_disp (G->r_esp, 4));
+ x87_fyl2x (&G->f);
+ emit_x87_ex2 (G);
+}
+
+#endif
+
+static GLfloat do_ceilf (GLfloat x)
+{
+ return CEILF (x);
+}
+
+static GLfloat do_floorf (GLfloat x)
+{
+ return FLOORF (x);
+}
+
+static GLfloat do_powf (GLfloat y, GLfloat x)
+{
+ return (GLfloat) _mesa_pow ((GLdouble) x, (GLdouble) y);
+}
+
+static GLvoid do_print_float (GLfloat x)
+{
+ _mesa_printf ("slang print: %f\n", x);
+}
+
+static GLvoid do_print_int (GLfloat x)
+{
+ _mesa_printf ("slang print: %d\n", (GLint) x);
+}
+
+static GLvoid do_print_bool (GLfloat x)
+{
+ _mesa_printf ("slang print: %s\n", (GLint) x ? "true" : "false");
+}
+
+#define FLOAT_ONE 0x3f800000
+#define FLOAT_ZERO 0
+
+static GLvoid codegen_assem (codegen_ctx *G, slang_assembly *a)
+{
+ GLint disp;
+
+ switch (a->type)
+ {
+ case slang_asm_none:
+ break;
+ case slang_asm_float_copy:
+ case slang_asm_int_copy:
+ case slang_asm_bool_copy:
+ x86_mov (&G->f, G->r_eax, x86_make_disp (G->r_esp, a->param[0]));
+ x86_pop (&G->f, G->r_ecx);
+ x86_mov (&G->f, x86_make_disp (G->r_eax, a->param[1]), G->r_ecx);
+ break;
+ case slang_asm_float_move:
+ case slang_asm_int_move:
+ case slang_asm_bool_move:
+ x86_lea (&G->f, G->r_eax, x86_make_disp (G->r_esp, a->param[1]));
+ x86_add (&G->f, G->r_eax, x86_deref (G->r_esp));
+ x86_mov (&G->f, G->r_eax, x86_deref (G->r_eax));
+ x86_mov (&G->f, x86_make_disp (G->r_esp, a->param[0]), G->r_eax);
+ break;
+ case slang_asm_float_push:
+ case slang_asm_int_push:
+ case slang_asm_bool_push:
+ /* TODO: use push imm32 */
+ x86_mov_reg_imm (&G->f, G->r_eax, *((GLint *) &a->literal));
+ x86_push (&G->f, G->r_eax);
+ break;
+ case slang_asm_float_deref:
+ case slang_asm_int_deref:
+ case slang_asm_bool_deref:
+ case slang_asm_addr_deref:
+ x86_mov (&G->f, G->r_eax, x86_deref (G->r_esp));
+ x86_mov (&G->f, G->r_eax, x86_deref (G->r_eax));
+ x86_mov (&G->f, x86_deref (G->r_esp), G->r_eax);
+ break;
+ case slang_asm_float_add:
+ x87_fld (&G->f, x86_make_disp (G->r_esp, 4));
+ x87_fld (&G->f, x86_deref (G->r_esp));
+ x87_faddp (&G->f, G->r_st1);
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));
+ x87_fstp (&G->f, x86_deref (G->r_esp));
+ break;
+ case slang_asm_float_multiply:
+ x87_fld (&G->f, x86_make_disp (G->r_esp, 4));
+ x87_fld (&G->f, x86_deref (G->r_esp));
+ x87_fmulp (&G->f, G->r_st1);
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));
+ x87_fstp (&G->f, x86_deref (G->r_esp));
+ break;
+ case slang_asm_float_divide:
+ x87_fld (&G->f, x86_make_disp (G->r_esp, 4));
+ x87_fld (&G->f, x86_deref (G->r_esp));
+ x87_fdivp (&G->f, G->r_st1);
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));
+ x87_fstp (&G->f, x86_deref (G->r_esp));
+ break;
+ case slang_asm_float_negate:
+ x87_fld (&G->f, x86_deref (G->r_esp));
+ x87_fchs (&G->f);
+ x87_fstp (&G->f, x86_deref (G->r_esp));
+ break;
+ case slang_asm_float_less:
+ x87_fld (&G->f, x86_make_disp (G->r_esp, 4));
+ x87_fcomp (&G->f, x86_deref (G->r_esp));
+ x87_fnstsw (&G->f, G->r_eax);
+ /* TODO: use test r8,imm8 */
+ x86_mov_reg_imm (&G->f, G->r_ecx, 0x100);
+ x86_test (&G->f, G->r_eax, G->r_ecx);
+ {
+ GLubyte *lab0, *lab1;
+
+ /* TODO: use jcc rel8 */
+ lab0 = x86_jcc_forward (&G->f, cc_E);
+ x86_mov_reg_imm (&G->f, G->r_ecx, FLOAT_ONE);
+ /* TODO: use jmp rel8 */
+ lab1 = x86_jmp_forward (&G->f);
+ x86_fixup_fwd_jump (&G->f, lab0);
+ x86_mov_reg_imm (&G->f, G->r_ecx, FLOAT_ZERO);
+ x86_fixup_fwd_jump (&G->f, lab1);
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));
+ x86_mov (&G->f, x86_deref (G->r_esp), G->r_ecx);
+ }
+ break;
+ case slang_asm_float_equal_exp:
+ x87_fld (&G->f, x86_make_disp (G->r_esp, 4));
+ x87_fcomp (&G->f, x86_deref (G->r_esp));
+ x87_fnstsw (&G->f, G->r_eax);
+ /* TODO: use test r8,imm8 */
+ x86_mov_reg_imm (&G->f, G->r_ecx, 0x4000);
+ x86_test (&G->f, G->r_eax, G->r_ecx);
+ {
+ GLubyte *lab0, *lab1;
+
+ /* TODO: use jcc rel8 */
+ lab0 = x86_jcc_forward (&G->f, cc_E);
+ x86_mov_reg_imm (&G->f, G->r_ecx, FLOAT_ONE);
+ /* TODO: use jmp rel8 */
+ lab1 = x86_jmp_forward (&G->f);
+ x86_fixup_fwd_jump (&G->f, lab0);
+ x86_mov_reg_imm (&G->f, G->r_ecx, FLOAT_ZERO);
+ x86_fixup_fwd_jump (&G->f, lab1);
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));
+ x86_mov (&G->f, x86_deref (G->r_esp), G->r_ecx);
+ }
+ break;
+ case slang_asm_float_equal_int:
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, -4));
+ x87_fld (&G->f, x86_make_disp (G->r_esp, a->param[0] + 4));
+ x87_fcomp (&G->f, x86_make_disp (G->r_esp, a->param[1] + 4));
+ x87_fnstsw (&G->f, G->r_eax);
+ /* TODO: use test r8,imm8 */
+ x86_mov_reg_imm (&G->f, G->r_ecx, 0x4000);
+ x86_test (&G->f, G->r_eax, G->r_ecx);
+ {
+ GLubyte *lab0, *lab1;
+
+ /* TODO: use jcc rel8 */
+ lab0 = x86_jcc_forward (&G->f, cc_E);
+ x86_mov_reg_imm (&G->f, G->r_ecx, FLOAT_ONE);
+ /* TODO: use jmp rel8 */
+ lab1 = x86_jmp_forward (&G->f);
+ x86_fixup_fwd_jump (&G->f, lab0);
+ x86_mov_reg_imm (&G->f, G->r_ecx, FLOAT_ZERO);
+ x86_fixup_fwd_jump (&G->f, lab1);
+ x86_mov (&G->f, x86_deref (G->r_esp), G->r_ecx);
+ }
+ break;
+ case slang_asm_float_to_int:
+ x87_fld (&G->f, x86_deref (G->r_esp));
+ x87_fistp (&G->f, x86_deref (G->r_esp));
+ break;
+ case slang_asm_float_sine:
+ /* TODO: use fsin */
+ x86_call (&G->f, (GLubyte *) _mesa_sinf);
+ x87_fstp (&G->f, x86_deref (G->r_esp));
+ break;
+ case slang_asm_float_arcsine:
+ /* TODO: use fpatan (?) */
+ x86_call (&G->f, (GLubyte *) _mesa_asinf);
+ x87_fstp (&G->f, x86_deref (G->r_esp));
+ break;
+ case slang_asm_float_arctan:
+ /* TODO: use fpatan */
+ x86_call (&G->f, (GLubyte *) _mesa_atanf);
+ x87_fstp (&G->f, x86_deref (G->r_esp));
+ break;
+ case slang_asm_float_power:
+ /* TODO: use emit_pow() */
+ x86_call (&G->f, (GLubyte *) do_powf);
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));
+ x87_fstp (&G->f, x86_deref (G->r_esp));
+ break;
+ case slang_asm_float_log2:
+ x87_fld1 (&G->f);
+ x87_fld (&G->f, x86_deref (G->r_esp));
+ x87_fyl2x (&G->f);
+ x87_fstp (&G->f, x86_deref (G->r_esp));
+ break;
+ case slang_asm_float_floor:
+ x86_call (&G->f, (GLubyte *) do_floorf);
+ x87_fstp (&G->f, x86_deref (G->r_esp));
+ break;
+ case slang_asm_float_ceil:
+ x86_call (&G->f, (GLubyte *) do_ceilf);
+ x87_fstp (&G->f, x86_deref (G->r_esp));
+ break;
+ case slang_asm_float_noise1:
+ x86_call (&G->f, (GLubyte *) _slang_library_noise1);
+ x87_fstp (&G->f, x86_deref (G->r_esp));
+ break;
+ case slang_asm_float_noise2:
+ x86_call (&G->f, (GLubyte *) _slang_library_noise2);
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));
+ x87_fstp (&G->f, x86_deref (G->r_esp));
+ break;
+ case slang_asm_float_noise3:
+ x86_call (&G->f, (GLubyte *) _slang_library_noise4);
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 8));
+ x87_fstp (&G->f, x86_deref (G->r_esp));
+ break;
+ case slang_asm_float_noise4:
+ x86_call (&G->f, (GLubyte *) _slang_library_noise4);
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 12));
+ x87_fstp (&G->f, x86_deref (G->r_esp));
+ break;
+ case slang_asm_int_to_float:
+ break;
+ case slang_asm_int_to_addr:
+ x87_fld (&G->f, x86_deref (G->r_esp));
+ x87_fistp (&G->f, x86_deref (G->r_esp));
+ break;
+ case slang_asm_addr_copy:
+ x86_pop (&G->f, G->r_eax);
+ x86_mov (&G->f, G->r_ecx, x86_deref (G->r_esp));
+ x86_mov (&G->f, x86_deref (G->r_ecx), G->r_eax);
+ break;
+ case slang_asm_addr_push:
+ /* TODO: use push imm32 */
+ x86_mov_reg_imm (&G->f, G->r_eax, (GLint) a->param[0]);
+ x86_push (&G->f, G->r_eax);
+ break;
+ case slang_asm_addr_add:
+ x86_pop (&G->f, G->r_eax);
+ x86_add (&G->f, x86_deref (G->r_esp), G->r_eax);
+ break;
+ case slang_asm_addr_multiply:
+ x86_pop (&G->f, G->r_ecx);
+ x86_mov (&G->f, G->r_eax, x86_deref (G->r_esp));
+ x86_mul (&G->f, G->r_ecx);
+ x86_mov (&G->f, x86_deref (G->r_esp), G->r_eax);
+ break;
+ case slang_asm_vec4_tex1d:
+ x86_call (&G->f, (GLubyte *) _slang_library_tex1d);
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 12));
+ break;
+ case slang_asm_vec4_tex2d:
+ x86_call (&G->f, (GLubyte *) _slang_library_tex2d);
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 16));
+ break;
+ case slang_asm_vec4_tex3d:
+ x86_call (&G->f, (GLubyte *) _slang_library_tex3d);
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 20));
+ break;
+ case slang_asm_vec4_texcube:
+ x86_call (&G->f, (GLubyte *) _slang_library_texcube);
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 20));
+ break;
+ case slang_asm_vec4_shad1d:
+ x86_call (&G->f, (GLubyte *) _slang_library_shad1d);
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 20));
+ break;
+ case slang_asm_vec4_shad2d:
+ x86_call (&G->f, (GLubyte *) _slang_library_shad2d);
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 20));
+ break;
+ case slang_asm_jump:
+ add_fixup (G, a->param[0], x86_jmp_forward (&G->f));
+ break;
+ case slang_asm_jump_if_zero:
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, 4));
+ x86_xor (&G->f, G->r_eax, G->r_eax);
+ x86_cmp (&G->f, G->r_eax, x86_make_disp (G->r_esp, -4));
+ {
+ GLubyte *lab0;
+
+ /* TODO: use jcc rel8 */
+ lab0 = x86_jcc_forward (&G->f, cc_NE);
+ add_fixup (G, a->param[0], x86_jmp_forward (&G->f));
+ x86_fixup_fwd_jump (&G->f, lab0);
+ }
+ break;
+ case slang_asm_enter:
+ /* FIXME: x86_make_disp(esp, 0) + x86_lea() generates bogus code */
+ assert (a->param[0] != 0);
+ x86_push (&G->f, G->r_ebp);
+ x86_lea (&G->f, G->r_ebp, x86_make_disp (G->r_esp, (GLint) a->param[0]));
+ break;
+ case slang_asm_leave:
+ x86_pop (&G->f, G->r_ebp);
+ break;
+ case slang_asm_local_alloc:
+ /* FIXME: x86_make_disp(esp, 0) + x86_lea() generates bogus code */
+ assert (a->param[0] != 0);
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, -(GLint) a->param[0]));
+ break;
+ case slang_asm_local_free:
+ /* FIXME: x86_make_disp(esp, 0) + x86_lea() generates bogus code */
+ assert (a->param[0] != 0);
+ x86_lea (&G->f, G->r_esp, x86_make_disp (G->r_esp, (GLint) a->param[0]));
+ break;
+ case slang_asm_local_addr:
+ disp = -(GLint) (a->param[0] + a->param[1]) + 4;
+ if (disp != 0)
+ {
+ x86_lea (&G->f, G->r_eax, x86_make_disp (G->r_ebp, disp));
+ x86_push (&G->f, G->r_eax);
+ }
+ else
+ x86_push (&G->f, G->r_ebp);
+ break;
+ case slang_asm_global_addr:
+ /* TODO: use push imm32 */
+ x86_mov_reg_imm (&G->f, G->r_eax, (GLint) &G->mach->mem + a->param[0]);
+ x86_push (&G->f, G->r_eax);
+ break;
+ case slang_asm_call:
+ add_fixup (G, a->param[0], x86_call_forward (&G->f));
+ break;
+ case slang_asm_return:
+ x86_ret (&G->f);
+ break;
+ case slang_asm_discard:
+ x86_jmp (&G->f, G->l_discard);
+ break;
+ case slang_asm_exit:
+ x86_jmp (&G->f, G->l_exit);
+ break;
+ /* mesa-specific extensions */
+ case slang_asm_float_print:
+ x86_call (&G->f, (GLubyte *) do_print_float);
+ break;
+ case slang_asm_int_print:
+ x86_call (&G->f, (GLubyte *) do_print_int);
+ break;
+ case slang_asm_bool_print:
+ x86_call (&G->f, (GLubyte *) do_print_bool);
+ break;
+ default:
+ assert (0);
+ }
+}
+
+GLboolean _slang_x86_codegen (slang_machine *mach, slang_assembly_file *file, GLuint start)
+{
+ codegen_ctx G;
+ GLubyte *j_body, *j_exit;
+ GLuint i;
+
+ /*
+ * We need as much as 1M because *all* assembly, including built-in library, is
+ * being translated to x86.
+ * The built-in library occupies 450K, so we can be safe for now.
+ * It is going to change in the future, when we get assembly analysis running.
+ */
+ x86_init_func_size (&G.f, 1048576);
+ G.r_eax = x86_make_reg (file_REG32, reg_AX);
+ G.r_ecx = x86_make_reg (file_REG32, reg_CX);
+ G.r_edx = x86_make_reg (file_REG32, reg_DX);
+ G.r_esp = x86_make_reg (file_REG32, reg_SP);
+ G.r_ebp = x86_make_reg (file_REG32, reg_BP);
+ G.r_st0 = x86_make_reg (file_x87, 0);
+ G.r_st1 = x86_make_reg (file_x87, 1);
+ G.r_st2 = x86_make_reg (file_x87, 2);
+ G.r_st3 = x86_make_reg (file_x87, 3);
+ G.fixups = NULL;
+ G.fixup_count = 0;
+ G.labels = (GLubyte **) slang_alloc_malloc (file->count * sizeof (GLubyte *));
+ G.mach = mach;
+ G.fpucntl = RESTORE_FPU;
+
+ mach->x86.fpucntl_rnd_neg = RND_NEG_FPU;
+ mach->x86.fpucntl_restore = RESTORE_FPU;
+
+ /* prepare stack and jump to start */
+ x86_push (&G.f, G.r_ebp);
+ x86_mov_reg_imm (&G.f, G.r_eax, (GLint) &mach->x86.esp_restore);
+ x86_push (&G.f, G.r_esp);
+ x86_pop (&G.f, G.r_ecx);
+ x86_mov (&G.f, x86_deref (G.r_eax), G.r_ecx);
+ j_body = x86_jmp_forward (&G.f);
+
+ /* "discard" instructions jump to this label */
+ G.l_discard = x86_get_label (&G.f);
+ x86_mov_reg_imm (&G.f, G.r_eax, (GLint) &G.mach->kill);
+ x86_mov_reg_imm (&G.f, G.r_ecx, 1);
+ x86_mov (&G.f, x86_deref (G.r_eax), G.r_ecx);
+ G.l_exit = x86_get_label (&G.f);
+ j_exit = x86_jmp_forward (&G.f);
+
+ for (i = 0; i < file->count; i++)
+ {
+ G.labels[i] = x86_get_label (&G.f);
+ if (i == start)
+ x86_fixup_fwd_jump (&G.f, j_body);
+ codegen_assem (&G, &file->code[i]);
+ }
+
+ /*
+ * Restore stack and return.
+ * This must be handled this way, because "discard" can be invoked from any
+ * place in the code.
+ */
+ x86_fixup_fwd_jump (&G.f, j_exit);
+ x86_mov_reg_imm (&G.f, G.r_eax, (GLint) &mach->x86.esp_restore);
+ x86_mov (&G.f, G.r_esp, x86_deref (G.r_eax));
+ x86_pop (&G.f, G.r_ebp);
+ if (G.fpucntl != RESTORE_FPU)
+ {
+ x87_fnclex (&G.f);
+ x86_mov_reg_imm (&G.f, G.r_eax, (GLint) &G.mach->x86.fpucntl_restore);
+ x87_fldcw (&G.f, x86_deref (G.r_eax));
+ }
+ x86_ret (&G.f);
+
+ /* fixup forward labels */
+ for (i = 0; i < G.fixup_count; i++)
+ {
+ G.f.csr = G.labels[G.fixups[i].index];
+ x86_fixup_fwd_jump (&G.f, G.fixups[i].csr);
+ }
+
+ slang_alloc_free (G.fixups);
+ slang_alloc_free (G.labels);
+
+ /* install new code */
+ if (mach->x86.compiled_func != NULL)
+ _mesa_exec_free (mach->x86.compiled_func);
+ mach->x86.compiled_func = (GLvoid (*) (slang_machine *)) x86_get_func (&G.f);
+
+ return GL_TRUE;
+}
+
+#endif
+
diff --git a/src/mesa/shader/slang/slang_library_noise.c b/src/mesa/shader/slang/slang_library_noise.c
index d0081c542a..b30bb30ce2 100644
--- a/src/mesa/shader/slang/slang_library_noise.c
+++ b/src/mesa/shader/slang/slang_library_noise.c
@@ -1,501 +1,501 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * SimplexNoise1234
- * Copyright © 2003-2005, Stefan Gustavson
- *
- * Contact: stegu@itn.liu.se
- */
-
-/** \file
- \brief C implementation of Perlin Simplex Noise over 1,2,3, and 4 dimensions.
- \author Stefan Gustavson (stegu@itn.liu.se)
-*/
-
-/*
- * This implementation is "Simplex Noise" as presented by
- * Ken Perlin at a relatively obscure and not often cited course
- * session "Real-Time Shading" at Siggraph 2001 (before real
- * time shading actually took on), under the title "hardware noise".
- * The 3D function is numerically equivalent to his Java reference
- * code available in the PDF course notes, although I re-implemented
- * it from scratch to get more readable code. The 1D, 2D and 4D cases
- * were implemented from scratch by me from Ken Perlin's text.
- *
- * This file has no dependencies on any other file, not even its own
- * header file. The header file is made for use by external code only.
- */
-
-
-#include "imports.h"
-#include "slang_library_noise.h"
-
-#define FASTFLOOR(x) ( ((x)>0) ? ((int)x) : (((int)x)-1) )
-
-/*
- * ---------------------------------------------------------------------
- * Static data
- */
-
-/*
- * Permutation table. This is just a random jumble of all numbers 0-255,
- * repeated twice to avoid wrapping the index at 255 for each lookup.
- * This needs to be exactly the same for all instances on all platforms,
- * so it's easiest to just keep it as static explicit data.
- * This also removes the need for any initialisation of this class.
- *
- * Note that making this an int[] instead of a char[] might make the
- * code run faster on platforms with a high penalty for unaligned single
- * byte addressing. Intel x86 is generally single-byte-friendly, but
- * some other CPUs are faster with 4-aligned reads.
- * However, a char[] is smaller, which avoids cache trashing, and that
- * is probably the most important aspect on most architectures.
- * This array is accessed a *lot* by the noise functions.
- * A vector-valued noise over 3D accesses it 96 times, and a
- * float-valued 4D noise 64 times. We want this to fit in the cache!
- */
-unsigned char perm[512] = {151,160,137,91,90,15,
- 131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,
- 190, 6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,
- 88,237,149,56,87,174,20,125,136,171,168, 68,175,74,165,71,134,139,48,27,166,
- 77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,
- 102,143,54, 65,25,63,161, 1,216,80,73,209,76,132,187,208, 89,18,169,200,196,
- 135,130,116,188,159,86,164,100,109,198,173,186, 3,64,52,217,226,250,124,123,
- 5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,
- 223,183,170,213,119,248,152, 2,44,154,163, 70,221,153,101,155,167, 43,172,9,
- 129,22,39,253, 19,98,108,110,79,113,224,232,178,185, 112,104,218,246,97,228,
- 251,34,242,193,238,210,144,12,191,179,162,241, 81,51,145,235,249,14,239,107,
- 49,192,214, 31,181,199,106,157,184, 84,204,176,115,121,50,45,127, 4,150,254,
- 138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180,
- 151,160,137,91,90,15,
- 131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,
- 190, 6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,
- 88,237,149,56,87,174,20,125,136,171,168, 68,175,74,165,71,134,139,48,27,166,
- 77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,
- 102,143,54, 65,25,63,161, 1,216,80,73,209,76,132,187,208, 89,18,169,200,196,
- 135,130,116,188,159,86,164,100,109,198,173,186, 3,64,52,217,226,250,124,123,
- 5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,
- 223,183,170,213,119,248,152, 2,44,154,163, 70,221,153,101,155,167, 43,172,9,
- 129,22,39,253, 19,98,108,110,79,113,224,232,178,185, 112,104,218,246,97,228,
- 251,34,242,193,238,210,144,12,191,179,162,241, 81,51,145,235,249,14,239,107,
- 49,192,214, 31,181,199,106,157,184, 84,204,176,115,121,50,45,127, 4,150,254,
- 138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180
-};
-
-/*
- * ---------------------------------------------------------------------
- */
-
-/*
- * Helper functions to compute gradients-dot-residualvectors (1D to 4D)
- * Note that these generate gradients of more than unit length. To make
- * a close match with the value range of classic Perlin noise, the final
- * noise values need to be rescaled to fit nicely within [-1,1].
- * (The simplex noise functions as such also have different scaling.)
- * Note also that these noise functions are the most practical and useful
- * signed version of Perlin noise. To return values according to the
- * RenderMan specification from the SL noise() and pnoise() functions,
- * the noise values need to be scaled and offset to [0,1], like this:
- * float SLnoise = (SimplexNoise1234::noise(x,y,z) + 1.0) * 0.5;
- */
-
-static float grad1( int hash, float x ) {
- int h = hash & 15;
- float grad = 1.0f + (h & 7); /* Gradient value 1.0, 2.0, ..., 8.0 */
- if (h&8) grad = -grad; /* Set a random sign for the gradient */
- return ( grad * x ); /* Multiply the gradient with the distance */
-}
-
-static float grad2( int hash, float x, float y ) {
- int h = hash & 7; /* Convert low 3 bits of hash code */
- float u = h<4 ? x : y; /* into 8 simple gradient directions, */
- float v = h<4 ? y : x; /* and compute the dot product with (x,y). */
- return ((h&1)? -u : u) + ((h&2)? -2.0f*v : 2.0f*v);
-}
-
-static float grad3( int hash, float x, float y , float z ) {
- int h = hash & 15; /* Convert low 4 bits of hash code into 12 simple */
- float u = h<8 ? x : y; /* gradient directions, and compute dot product. */
- float v = h<4 ? y : h==12||h==14 ? x : z; /* Fix repeats at h = 12 to 15 */
- return ((h&1)? -u : u) + ((h&2)? -v : v);
-}
-
-static float grad4( int hash, float x, float y, float z, float t ) {
- int h = hash & 31; /* Convert low 5 bits of hash code into 32 simple */
- float u = h<24 ? x : y; /* gradient directions, and compute dot product. */
- float v = h<16 ? y : z;
- float w = h<8 ? z : t;
- return ((h&1)? -u : u) + ((h&2)? -v : v) + ((h&4)? -w : w);
-}
-
- /* A lookup table to traverse the simplex around a given point in 4D. */
- /* Details can be found where this table is used, in the 4D noise method. */
- /* TODO: This should not be required, backport it from Bill's GLSL code! */
- static unsigned char simplex[64][4] = {
- {0,1,2,3},{0,1,3,2},{0,0,0,0},{0,2,3,1},{0,0,0,0},{0,0,0,0},{0,0,0,0},{1,2,3,0},
- {0,2,1,3},{0,0,0,0},{0,3,1,2},{0,3,2,1},{0,0,0,0},{0,0,0,0},{0,0,0,0},{1,3,2,0},
- {0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},
- {1,2,0,3},{0,0,0,0},{1,3,0,2},{0,0,0,0},{0,0,0,0},{0,0,0,0},{2,3,0,1},{2,3,1,0},
- {1,0,2,3},{1,0,3,2},{0,0,0,0},{0,0,0,0},{0,0,0,0},{2,0,3,1},{0,0,0,0},{2,1,3,0},
- {0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},
- {2,0,1,3},{0,0,0,0},{0,0,0,0},{0,0,0,0},{3,0,1,2},{3,0,2,1},{0,0,0,0},{3,1,2,0},
- {2,1,0,3},{0,0,0,0},{0,0,0,0},{0,0,0,0},{3,1,0,2},{0,0,0,0},{3,2,0,1},{3,2,1,0}};
-
-/* 1D simplex noise */
-GLfloat _slang_library_noise1 (GLfloat x)
-{
- int i0 = FASTFLOOR(x);
- int i1 = i0 + 1;
- float x0 = x - i0;
- float x1 = x0 - 1.0f;
- float t1 = 1.0f - x1*x1;
- float n0, n1;
-
- float t0 = 1.0f - x0*x0;
-/* if(t0 < 0.0f) t0 = 0.0f; // this never happens for the 1D case */
- t0 *= t0;
- n0 = t0 * t0 * grad1(perm[i0 & 0xff], x0);
-
-/* if(t1 < 0.0f) t1 = 0.0f; // this never happens for the 1D case */
- t1 *= t1;
- n1 = t1 * t1 * grad1(perm[i1 & 0xff], x1);
- /* The maximum value of this noise is 8*(3/4)^4 = 2.53125 */
- /* A factor of 0.395 would scale to fit exactly within [-1,1], but */
- /* we want to match PRMan's 1D noise, so we scale it down some more. */
- return 0.25f * (n0 + n1);
-}
-
-/* 2D simplex noise */
-GLfloat _slang_library_noise2 (GLfloat x, GLfloat y)
-{
-#define F2 0.366025403f /* F2 = 0.5*(sqrt(3.0)-1.0) */
-#define G2 0.211324865f /* G2 = (3.0-Math.sqrt(3.0))/6.0 */
-
- float n0, n1, n2; /* Noise contributions from the three corners */
-
- /* Skew the input space to determine which simplex cell we're in */
- float s = (x+y)*F2; /* Hairy factor for 2D */
- float xs = x + s;
- float ys = y + s;
- int i = FASTFLOOR(xs);
- int j = FASTFLOOR(ys);
-
- float t = (float)(i+j)*G2;
- float X0 = i-t; /* Unskew the cell origin back to (x,y) space */
- float Y0 = j-t;
- float x0 = x-X0; /* The x,y distances from the cell origin */
- float y0 = y-Y0;
-
- float x1, y1, x2, y2;
- int ii, jj;
- float t0, t1, t2;
-
- /* For the 2D case, the simplex shape is an equilateral triangle. */
- /* Determine which simplex we are in. */
- int i1, j1; /* Offsets for second (middle) corner of simplex in (i,j) coords */
- if(x0>y0) {i1=1; j1=0;} /* lower triangle, XY order: (0,0)->(1,0)->(1,1) */
- else {i1=0; j1=1;} /* upper triangle, YX order: (0,0)->(0,1)->(1,1) */
-
- /* A step of (1,0) in (i,j) means a step of (1-c,-c) in (x,y), and */
- /* a step of (0,1) in (i,j) means a step of (-c,1-c) in (x,y), where */
- /* c = (3-sqrt(3))/6 */
-
- x1 = x0 - i1 + G2; /* Offsets for middle corner in (x,y) unskewed coords */
- y1 = y0 - j1 + G2;
- x2 = x0 - 1.0f + 2.0f * G2; /* Offsets for last corner in (x,y) unskewed coords */
- y2 = y0 - 1.0f + 2.0f * G2;
-
- /* Wrap the integer indices at 256, to avoid indexing perm[] out of bounds */
- ii = i % 256;
- jj = j % 256;
-
- /* Calculate the contribution from the three corners */
- t0 = 0.5f - x0*x0-y0*y0;
- if(t0 < 0.0f) n0 = 0.0f;
- else {
- t0 *= t0;
- n0 = t0 * t0 * grad2(perm[ii+perm[jj]], x0, y0);
- }
-
- t1 = 0.5f - x1*x1-y1*y1;
- if(t1 < 0.0f) n1 = 0.0f;
- else {
- t1 *= t1;
- n1 = t1 * t1 * grad2(perm[ii+i1+perm[jj+j1]], x1, y1);
- }
-
- t2 = 0.5f - x2*x2-y2*y2;
- if(t2 < 0.0f) n2 = 0.0f;
- else {
- t2 *= t2;
- n2 = t2 * t2 * grad2(perm[ii+1+perm[jj+1]], x2, y2);
- }
-
- /* Add contributions from each corner to get the final noise value. */
- /* The result is scaled to return values in the interval [-1,1]. */
- return 40.0f * (n0 + n1 + n2); /* TODO: The scale factor is preliminary! */
-}
-
-/* 3D simplex noise */
-GLfloat _slang_library_noise3 (GLfloat x, GLfloat y, GLfloat z)
-{
-/* Simple skewing factors for the 3D case */
-#define F3 0.333333333f
-#define G3 0.166666667f
-
- float n0, n1, n2, n3; /* Noise contributions from the four corners */
-
- /* Skew the input space to determine which simplex cell we're in */
- float s = (x+y+z)*F3; /* Very nice and simple skew factor for 3D */
- float xs = x+s;
- float ys = y+s;
- float zs = z+s;
- int i = FASTFLOOR(xs);
- int j = FASTFLOOR(ys);
- int k = FASTFLOOR(zs);
-
- float t = (float)(i+j+k)*G3;
- float X0 = i-t; /* Unskew the cell origin back to (x,y,z) space */
- float Y0 = j-t;
- float Z0 = k-t;
- float x0 = x-X0; /* The x,y,z distances from the cell origin */
- float y0 = y-Y0;
- float z0 = z-Z0;
-
- float x1, y1, z1, x2, y2, z2, x3, y3, z3;
- int ii, jj, kk;
- float t0, t1, t2, t3;
-
- /* For the 3D case, the simplex shape is a slightly irregular tetrahedron. */
- /* Determine which simplex we are in. */
- int i1, j1, k1; /* Offsets for second corner of simplex in (i,j,k) coords */
- int i2, j2, k2; /* Offsets for third corner of simplex in (i,j,k) coords */
-
-/* This code would benefit from a backport from the GLSL version! */
- if(x0>=y0) {
- if(y0>=z0)
- { i1=1; j1=0; k1=0; i2=1; j2=1; k2=0; } /* X Y Z order */
- else if(x0>=z0) { i1=1; j1=0; k1=0; i2=1; j2=0; k2=1; } /* X Z Y order */
- else { i1=0; j1=0; k1=1; i2=1; j2=0; k2=1; } /* Z X Y order */
- }
- else { /* x0<y0 */
- if(y0<z0) { i1=0; j1=0; k1=1; i2=0; j2=1; k2=1; } /* Z Y X order */
- else if(x0<z0) { i1=0; j1=1; k1=0; i2=0; j2=1; k2=1; } /* Y Z X order */
- else { i1=0; j1=1; k1=0; i2=1; j2=1; k2=0; } /* Y X Z order */
- }
-
- /* A step of (1,0,0) in (i,j,k) means a step of (1-c,-c,-c) in (x,y,z), */
- /* a step of (0,1,0) in (i,j,k) means a step of (-c,1-c,-c) in (x,y,z), and */
- /* a step of (0,0,1) in (i,j,k) means a step of (-c,-c,1-c) in (x,y,z), where */
- /* c = 1/6. */
-
- x1 = x0 - i1 + G3; /* Offsets for second corner in (x,y,z) coords */
- y1 = y0 - j1 + G3;
- z1 = z0 - k1 + G3;
- x2 = x0 - i2 + 2.0f*G3; /* Offsets for third corner in (x,y,z) coords */
- y2 = y0 - j2 + 2.0f*G3;
- z2 = z0 - k2 + 2.0f*G3;
- x3 = x0 - 1.0f + 3.0f*G3; /* Offsets for last corner in (x,y,z) coords */
- y3 = y0 - 1.0f + 3.0f*G3;
- z3 = z0 - 1.0f + 3.0f*G3;
-
- /* Wrap the integer indices at 256, to avoid indexing perm[] out of bounds */
- ii = i % 256;
- jj = j % 256;
- kk = k % 256;
-
- /* Calculate the contribution from the four corners */
- t0 = 0.6f - x0*x0 - y0*y0 - z0*z0;
- if(t0 < 0.0f) n0 = 0.0f;
- else {
- t0 *= t0;
- n0 = t0 * t0 * grad3(perm[ii+perm[jj+perm[kk]]], x0, y0, z0);
- }
-
- t1 = 0.6f - x1*x1 - y1*y1 - z1*z1;
- if(t1 < 0.0f) n1 = 0.0f;
- else {
- t1 *= t1;
- n1 = t1 * t1 * grad3(perm[ii+i1+perm[jj+j1+perm[kk+k1]]], x1, y1, z1);
- }
-
- t2 = 0.6f - x2*x2 - y2*y2 - z2*z2;
- if(t2 < 0.0f) n2 = 0.0f;
- else {
- t2 *= t2;
- n2 = t2 * t2 * grad3(perm[ii+i2+perm[jj+j2+perm[kk+k2]]], x2, y2, z2);
- }
-
- t3 = 0.6f - x3*x3 - y3*y3 - z3*z3;
- if(t3<0.0f) n3 = 0.0f;
- else {
- t3 *= t3;
- n3 = t3 * t3 * grad3(perm[ii+1+perm[jj+1+perm[kk+1]]], x3, y3, z3);
- }
-
- /* Add contributions from each corner to get the final noise value. */
- /* The result is scaled to stay just inside [-1,1] */
- return 32.0f * (n0 + n1 + n2 + n3); /* TODO: The scale factor is preliminary! */
-}
-
-/* 4D simplex noise */
-GLfloat _slang_library_noise4 (GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-{
- /* The skewing and unskewing factors are hairy again for the 4D case */
-#define F4 0.309016994f /* F4 = (Math.sqrt(5.0)-1.0)/4.0 */
-#define G4 0.138196601f /* G4 = (5.0-Math.sqrt(5.0))/20.0 */
-
- float n0, n1, n2, n3, n4; /* Noise contributions from the five corners */
-
- /* Skew the (x,y,z,w) space to determine which cell of 24 simplices we're in */
- float s = (x + y + z + w) * F4; /* Factor for 4D skewing */
- float xs = x + s;
- float ys = y + s;
- float zs = z + s;
- float ws = w + s;
- int i = FASTFLOOR(xs);
- int j = FASTFLOOR(ys);
- int k = FASTFLOOR(zs);
- int l = FASTFLOOR(ws);
-
- float t = (i + j + k + l) * G4; /* Factor for 4D unskewing */
- float X0 = i - t; /* Unskew the cell origin back to (x,y,z,w) space */
- float Y0 = j - t;
- float Z0 = k - t;
- float W0 = l - t;
-
- float x0 = x - X0; /* The x,y,z,w distances from the cell origin */
- float y0 = y - Y0;
- float z0 = z - Z0;
- float w0 = w - W0;
-
- /* For the 4D case, the simplex is a 4D shape I won't even try to describe. */
- /* To find out which of the 24 possible simplices we're in, we need to */
- /* determine the magnitude ordering of x0, y0, z0 and w0. */
- /* The method below is a good way of finding the ordering of x,y,z,w and */
- /* then find the correct traversal order for the simplex we’re in. */
- /* First, six pair-wise comparisons are performed between each possible pair */
- /* of the four coordinates, and the results are used to add up binary bits */
- /* for an integer index. */
- int c1 = (x0 > y0) ? 32 : 0;
- int c2 = (x0 > z0) ? 16 : 0;
- int c3 = (y0 > z0) ? 8 : 0;
- int c4 = (x0 > w0) ? 4 : 0;
- int c5 = (y0 > w0) ? 2 : 0;
- int c6 = (z0 > w0) ? 1 : 0;
- int c = c1 + c2 + c3 + c4 + c5 + c6;
-
- int i1, j1, k1, l1; /* The integer offsets for the second simplex corner */
- int i2, j2, k2, l2; /* The integer offsets for the third simplex corner */
- int i3, j3, k3, l3; /* The integer offsets for the fourth simplex corner */
-
- float x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3, x4, y4, z4, w4;
- int ii, jj, kk, ll;
- float t0, t1, t2, t3, t4;
-
- /* simplex[c] is a 4-vector with the numbers 0, 1, 2 and 3 in some order. */
- /* Many values of c will never occur, since e.g. x>y>z>w makes x<z, y<w and x<w */
- /* impossible. Only the 24 indices which have non-zero entries make any sense. */
- /* We use a thresholding to set the coordinates in turn from the largest magnitude. */
- /* The number 3 in the "simplex" array is at the position of the largest coordinate. */
- i1 = simplex[c][0]>=3 ? 1 : 0;
- j1 = simplex[c][1]>=3 ? 1 : 0;
- k1 = simplex[c][2]>=3 ? 1 : 0;
- l1 = simplex[c][3]>=3 ? 1 : 0;
- /* The number 2 in the "simplex" array is at the second largest coordinate. */
- i2 = simplex[c][0]>=2 ? 1 : 0;
- j2 = simplex[c][1]>=2 ? 1 : 0;
- k2 = simplex[c][2]>=2 ? 1 : 0;
- l2 = simplex[c][3]>=2 ? 1 : 0;
- /* The number 1 in the "simplex" array is at the second smallest coordinate. */
- i3 = simplex[c][0]>=1 ? 1 : 0;
- j3 = simplex[c][1]>=1 ? 1 : 0;
- k3 = simplex[c][2]>=1 ? 1 : 0;
- l3 = simplex[c][3]>=1 ? 1 : 0;
- /* The fifth corner has all coordinate offsets = 1, so no need to look that up. */
-
- x1 = x0 - i1 + G4; /* Offsets for second corner in (x,y,z,w) coords */
- y1 = y0 - j1 + G4;
- z1 = z0 - k1 + G4;
- w1 = w0 - l1 + G4;
- x2 = x0 - i2 + 2.0f*G4; /* Offsets for third corner in (x,y,z,w) coords */
- y2 = y0 - j2 + 2.0f*G4;
- z2 = z0 - k2 + 2.0f*G4;
- w2 = w0 - l2 + 2.0f*G4;
- x3 = x0 - i3 + 3.0f*G4; /* Offsets for fourth corner in (x,y,z,w) coords */
- y3 = y0 - j3 + 3.0f*G4;
- z3 = z0 - k3 + 3.0f*G4;
- w3 = w0 - l3 + 3.0f*G4;
- x4 = x0 - 1.0f + 4.0f*G4; /* Offsets for last corner in (x,y,z,w) coords */
- y4 = y0 - 1.0f + 4.0f*G4;
- z4 = z0 - 1.0f + 4.0f*G4;
- w4 = w0 - 1.0f + 4.0f*G4;
-
- /* Wrap the integer indices at 256, to avoid indexing perm[] out of bounds */
- ii = i % 256;
- jj = j % 256;
- kk = k % 256;
- ll = l % 256;
-
- /* Calculate the contribution from the five corners */
- t0 = 0.6f - x0*x0 - y0*y0 - z0*z0 - w0*w0;
- if(t0 < 0.0f) n0 = 0.0f;
- else {
- t0 *= t0;
- n0 = t0 * t0 * grad4(perm[ii+perm[jj+perm[kk+perm[ll]]]], x0, y0, z0, w0);
- }
-
- t1 = 0.6f - x1*x1 - y1*y1 - z1*z1 - w1*w1;
- if(t1 < 0.0f) n1 = 0.0f;
- else {
- t1 *= t1;
- n1 = t1 * t1 * grad4(perm[ii+i1+perm[jj+j1+perm[kk+k1+perm[ll+l1]]]], x1, y1, z1, w1);
- }
-
- t2 = 0.6f - x2*x2 - y2*y2 - z2*z2 - w2*w2;
- if(t2 < 0.0f) n2 = 0.0f;
- else {
- t2 *= t2;
- n2 = t2 * t2 * grad4(perm[ii+i2+perm[jj+j2+perm[kk+k2+perm[ll+l2]]]], x2, y2, z2, w2);
- }
-
- t3 = 0.6f - x3*x3 - y3*y3 - z3*z3 - w3*w3;
- if(t3 < 0.0f) n3 = 0.0f;
- else {
- t3 *= t3;
- n3 = t3 * t3 * grad4(perm[ii+i3+perm[jj+j3+perm[kk+k3+perm[ll+l3]]]], x3, y3, z3, w3);
- }
-
- t4 = 0.6f - x4*x4 - y4*y4 - z4*z4 - w4*w4;
- if(t4 < 0.0f) n4 = 0.0f;
- else {
- t4 *= t4;
- n4 = t4 * t4 * grad4(perm[ii+1+perm[jj+1+perm[kk+1+perm[ll+1]]]], x4, y4, z4, w4);
- }
-
- /* Sum up and scale the result to cover the range [-1,1] */
- return 27.0f * (n0 + n1 + n2 + n3 + n4); /* TODO: The scale factor is preliminary! */
-}
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * SimplexNoise1234
+ * Copyright © 2003-2005, Stefan Gustavson
+ *
+ * Contact: stegu@itn.liu.se
+ */
+
+/** \file
+ \brief C implementation of Perlin Simplex Noise over 1,2,3, and 4 dimensions.
+ \author Stefan Gustavson (stegu@itn.liu.se)
+*/
+
+/*
+ * This implementation is "Simplex Noise" as presented by
+ * Ken Perlin at a relatively obscure and not often cited course
+ * session "Real-Time Shading" at Siggraph 2001 (before real
+ * time shading actually took on), under the title "hardware noise".
+ * The 3D function is numerically equivalent to his Java reference
+ * code available in the PDF course notes, although I re-implemented
+ * it from scratch to get more readable code. The 1D, 2D and 4D cases
+ * were implemented from scratch by me from Ken Perlin's text.
+ *
+ * This file has no dependencies on any other file, not even its own
+ * header file. The header file is made for use by external code only.
+ */
+
+
+#include "imports.h"
+#include "slang_library_noise.h"
+
+#define FASTFLOOR(x) ( ((x)>0) ? ((int)x) : (((int)x)-1) )
+
+/*
+ * ---------------------------------------------------------------------
+ * Static data
+ */
+
+/*
+ * Permutation table. This is just a random jumble of all numbers 0-255,
+ * repeated twice to avoid wrapping the index at 255 for each lookup.
+ * This needs to be exactly the same for all instances on all platforms,
+ * so it's easiest to just keep it as static explicit data.
+ * This also removes the need for any initialisation of this class.
+ *
+ * Note that making this an int[] instead of a char[] might make the
+ * code run faster on platforms with a high penalty for unaligned single
+ * byte addressing. Intel x86 is generally single-byte-friendly, but
+ * some other CPUs are faster with 4-aligned reads.
+ * However, a char[] is smaller, which avoids cache trashing, and that
+ * is probably the most important aspect on most architectures.
+ * This array is accessed a *lot* by the noise functions.
+ * A vector-valued noise over 3D accesses it 96 times, and a
+ * float-valued 4D noise 64 times. We want this to fit in the cache!
+ */
+unsigned char perm[512] = {151,160,137,91,90,15,
+ 131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,
+ 190, 6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,
+ 88,237,149,56,87,174,20,125,136,171,168, 68,175,74,165,71,134,139,48,27,166,
+ 77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,
+ 102,143,54, 65,25,63,161, 1,216,80,73,209,76,132,187,208, 89,18,169,200,196,
+ 135,130,116,188,159,86,164,100,109,198,173,186, 3,64,52,217,226,250,124,123,
+ 5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,
+ 223,183,170,213,119,248,152, 2,44,154,163, 70,221,153,101,155,167, 43,172,9,
+ 129,22,39,253, 19,98,108,110,79,113,224,232,178,185, 112,104,218,246,97,228,
+ 251,34,242,193,238,210,144,12,191,179,162,241, 81,51,145,235,249,14,239,107,
+ 49,192,214, 31,181,199,106,157,184, 84,204,176,115,121,50,45,127, 4,150,254,
+ 138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180,
+ 151,160,137,91,90,15,
+ 131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,
+ 190, 6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,
+ 88,237,149,56,87,174,20,125,136,171,168, 68,175,74,165,71,134,139,48,27,166,
+ 77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,
+ 102,143,54, 65,25,63,161, 1,216,80,73,209,76,132,187,208, 89,18,169,200,196,
+ 135,130,116,188,159,86,164,100,109,198,173,186, 3,64,52,217,226,250,124,123,
+ 5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,
+ 223,183,170,213,119,248,152, 2,44,154,163, 70,221,153,101,155,167, 43,172,9,
+ 129,22,39,253, 19,98,108,110,79,113,224,232,178,185, 112,104,218,246,97,228,
+ 251,34,242,193,238,210,144,12,191,179,162,241, 81,51,145,235,249,14,239,107,
+ 49,192,214, 31,181,199,106,157,184, 84,204,176,115,121,50,45,127, 4,150,254,
+ 138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180
+};
+
+/*
+ * ---------------------------------------------------------------------
+ */
+
+/*
+ * Helper functions to compute gradients-dot-residualvectors (1D to 4D)
+ * Note that these generate gradients of more than unit length. To make
+ * a close match with the value range of classic Perlin noise, the final
+ * noise values need to be rescaled to fit nicely within [-1,1].
+ * (The simplex noise functions as such also have different scaling.)
+ * Note also that these noise functions are the most practical and useful
+ * signed version of Perlin noise. To return values according to the
+ * RenderMan specification from the SL noise() and pnoise() functions,
+ * the noise values need to be scaled and offset to [0,1], like this:
+ * float SLnoise = (SimplexNoise1234::noise(x,y,z) + 1.0) * 0.5;
+ */
+
+static float grad1( int hash, float x ) {
+ int h = hash & 15;
+ float grad = 1.0f + (h & 7); /* Gradient value 1.0, 2.0, ..., 8.0 */
+ if (h&8) grad = -grad; /* Set a random sign for the gradient */
+ return ( grad * x ); /* Multiply the gradient with the distance */
+}
+
+static float grad2( int hash, float x, float y ) {
+ int h = hash & 7; /* Convert low 3 bits of hash code */
+ float u = h<4 ? x : y; /* into 8 simple gradient directions, */
+ float v = h<4 ? y : x; /* and compute the dot product with (x,y). */
+ return ((h&1)? -u : u) + ((h&2)? -2.0f*v : 2.0f*v);
+}
+
+static float grad3( int hash, float x, float y , float z ) {
+ int h = hash & 15; /* Convert low 4 bits of hash code into 12 simple */
+ float u = h<8 ? x : y; /* gradient directions, and compute dot product. */
+ float v = h<4 ? y : h==12||h==14 ? x : z; /* Fix repeats at h = 12 to 15 */
+ return ((h&1)? -u : u) + ((h&2)? -v : v);
+}
+
+static float grad4( int hash, float x, float y, float z, float t ) {
+ int h = hash & 31; /* Convert low 5 bits of hash code into 32 simple */
+ float u = h<24 ? x : y; /* gradient directions, and compute dot product. */
+ float v = h<16 ? y : z;
+ float w = h<8 ? z : t;
+ return ((h&1)? -u : u) + ((h&2)? -v : v) + ((h&4)? -w : w);
+}
+
+ /* A lookup table to traverse the simplex around a given point in 4D. */
+ /* Details can be found where this table is used, in the 4D noise method. */
+ /* TODO: This should not be required, backport it from Bill's GLSL code! */
+ static unsigned char simplex[64][4] = {
+ {0,1,2,3},{0,1,3,2},{0,0,0,0},{0,2,3,1},{0,0,0,0},{0,0,0,0},{0,0,0,0},{1,2,3,0},
+ {0,2,1,3},{0,0,0,0},{0,3,1,2},{0,3,2,1},{0,0,0,0},{0,0,0,0},{0,0,0,0},{1,3,2,0},
+ {0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},
+ {1,2,0,3},{0,0,0,0},{1,3,0,2},{0,0,0,0},{0,0,0,0},{0,0,0,0},{2,3,0,1},{2,3,1,0},
+ {1,0,2,3},{1,0,3,2},{0,0,0,0},{0,0,0,0},{0,0,0,0},{2,0,3,1},{0,0,0,0},{2,1,3,0},
+ {0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},
+ {2,0,1,3},{0,0,0,0},{0,0,0,0},{0,0,0,0},{3,0,1,2},{3,0,2,1},{0,0,0,0},{3,1,2,0},
+ {2,1,0,3},{0,0,0,0},{0,0,0,0},{0,0,0,0},{3,1,0,2},{0,0,0,0},{3,2,0,1},{3,2,1,0}};
+
+/* 1D simplex noise */
+GLfloat _slang_library_noise1 (GLfloat x)
+{
+ int i0 = FASTFLOOR(x);
+ int i1 = i0 + 1;
+ float x0 = x - i0;
+ float x1 = x0 - 1.0f;
+ float t1 = 1.0f - x1*x1;
+ float n0, n1;
+
+ float t0 = 1.0f - x0*x0;
+/* if(t0 < 0.0f) t0 = 0.0f; // this never happens for the 1D case */
+ t0 *= t0;
+ n0 = t0 * t0 * grad1(perm[i0 & 0xff], x0);
+
+/* if(t1 < 0.0f) t1 = 0.0f; // this never happens for the 1D case */
+ t1 *= t1;
+ n1 = t1 * t1 * grad1(perm[i1 & 0xff], x1);
+ /* The maximum value of this noise is 8*(3/4)^4 = 2.53125 */
+ /* A factor of 0.395 would scale to fit exactly within [-1,1], but */
+ /* we want to match PRMan's 1D noise, so we scale it down some more. */
+ return 0.25f * (n0 + n1);
+}
+
+/* 2D simplex noise */
+GLfloat _slang_library_noise2 (GLfloat x, GLfloat y)
+{
+#define F2 0.366025403f /* F2 = 0.5*(sqrt(3.0)-1.0) */
+#define G2 0.211324865f /* G2 = (3.0-Math.sqrt(3.0))/6.0 */
+
+ float n0, n1, n2; /* Noise contributions from the three corners */
+
+ /* Skew the input space to determine which simplex cell we're in */
+ float s = (x+y)*F2; /* Hairy factor for 2D */
+ float xs = x + s;
+ float ys = y + s;
+ int i = FASTFLOOR(xs);
+ int j = FASTFLOOR(ys);
+
+ float t = (float)(i+j)*G2;
+ float X0 = i-t; /* Unskew the cell origin back to (x,y) space */
+ float Y0 = j-t;
+ float x0 = x-X0; /* The x,y distances from the cell origin */
+ float y0 = y-Y0;
+
+ float x1, y1, x2, y2;
+ int ii, jj;
+ float t0, t1, t2;
+
+ /* For the 2D case, the simplex shape is an equilateral triangle. */
+ /* Determine which simplex we are in. */
+ int i1, j1; /* Offsets for second (middle) corner of simplex in (i,j) coords */
+ if(x0>y0) {i1=1; j1=0;} /* lower triangle, XY order: (0,0)->(1,0)->(1,1) */
+ else {i1=0; j1=1;} /* upper triangle, YX order: (0,0)->(0,1)->(1,1) */
+
+ /* A step of (1,0) in (i,j) means a step of (1-c,-c) in (x,y), and */
+ /* a step of (0,1) in (i,j) means a step of (-c,1-c) in (x,y), where */
+ /* c = (3-sqrt(3))/6 */
+
+ x1 = x0 - i1 + G2; /* Offsets for middle corner in (x,y) unskewed coords */
+ y1 = y0 - j1 + G2;
+ x2 = x0 - 1.0f + 2.0f * G2; /* Offsets for last corner in (x,y) unskewed coords */
+ y2 = y0 - 1.0f + 2.0f * G2;
+
+ /* Wrap the integer indices at 256, to avoid indexing perm[] out of bounds */
+ ii = i % 256;
+ jj = j % 256;
+
+ /* Calculate the contribution from the three corners */
+ t0 = 0.5f - x0*x0-y0*y0;
+ if(t0 < 0.0f) n0 = 0.0f;
+ else {
+ t0 *= t0;
+ n0 = t0 * t0 * grad2(perm[ii+perm[jj]], x0, y0);
+ }
+
+ t1 = 0.5f - x1*x1-y1*y1;
+ if(t1 < 0.0f) n1 = 0.0f;
+ else {
+ t1 *= t1;
+ n1 = t1 * t1 * grad2(perm[ii+i1+perm[jj+j1]], x1, y1);
+ }
+
+ t2 = 0.5f - x2*x2-y2*y2;
+ if(t2 < 0.0f) n2 = 0.0f;
+ else {
+ t2 *= t2;
+ n2 = t2 * t2 * grad2(perm[ii+1+perm[jj+1]], x2, y2);
+ }
+
+ /* Add contributions from each corner to get the final noise value. */
+ /* The result is scaled to return values in the interval [-1,1]. */
+ return 40.0f * (n0 + n1 + n2); /* TODO: The scale factor is preliminary! */
+}
+
+/* 3D simplex noise */
+GLfloat _slang_library_noise3 (GLfloat x, GLfloat y, GLfloat z)
+{
+/* Simple skewing factors for the 3D case */
+#define F3 0.333333333f
+#define G3 0.166666667f
+
+ float n0, n1, n2, n3; /* Noise contributions from the four corners */
+
+ /* Skew the input space to determine which simplex cell we're in */
+ float s = (x+y+z)*F3; /* Very nice and simple skew factor for 3D */
+ float xs = x+s;
+ float ys = y+s;
+ float zs = z+s;
+ int i = FASTFLOOR(xs);
+ int j = FASTFLOOR(ys);
+ int k = FASTFLOOR(zs);
+
+ float t = (float)(i+j+k)*G3;
+ float X0 = i-t; /* Unskew the cell origin back to (x,y,z) space */
+ float Y0 = j-t;
+ float Z0 = k-t;
+ float x0 = x-X0; /* The x,y,z distances from the cell origin */
+ float y0 = y-Y0;
+ float z0 = z-Z0;
+
+ float x1, y1, z1, x2, y2, z2, x3, y3, z3;
+ int ii, jj, kk;
+ float t0, t1, t2, t3;
+
+ /* For the 3D case, the simplex shape is a slightly irregular tetrahedron. */
+ /* Determine which simplex we are in. */
+ int i1, j1, k1; /* Offsets for second corner of simplex in (i,j,k) coords */
+ int i2, j2, k2; /* Offsets for third corner of simplex in (i,j,k) coords */
+
+/* This code would benefit from a backport from the GLSL version! */
+ if(x0>=y0) {
+ if(y0>=z0)
+ { i1=1; j1=0; k1=0; i2=1; j2=1; k2=0; } /* X Y Z order */
+ else if(x0>=z0) { i1=1; j1=0; k1=0; i2=1; j2=0; k2=1; } /* X Z Y order */
+ else { i1=0; j1=0; k1=1; i2=1; j2=0; k2=1; } /* Z X Y order */
+ }
+ else { /* x0<y0 */
+ if(y0<z0) { i1=0; j1=0; k1=1; i2=0; j2=1; k2=1; } /* Z Y X order */
+ else if(x0<z0) { i1=0; j1=1; k1=0; i2=0; j2=1; k2=1; } /* Y Z X order */
+ else { i1=0; j1=1; k1=0; i2=1; j2=1; k2=0; } /* Y X Z order */
+ }
+
+ /* A step of (1,0,0) in (i,j,k) means a step of (1-c,-c,-c) in (x,y,z), */
+ /* a step of (0,1,0) in (i,j,k) means a step of (-c,1-c,-c) in (x,y,z), and */
+ /* a step of (0,0,1) in (i,j,k) means a step of (-c,-c,1-c) in (x,y,z), where */
+ /* c = 1/6. */
+
+ x1 = x0 - i1 + G3; /* Offsets for second corner in (x,y,z) coords */
+ y1 = y0 - j1 + G3;
+ z1 = z0 - k1 + G3;
+ x2 = x0 - i2 + 2.0f*G3; /* Offsets for third corner in (x,y,z) coords */
+ y2 = y0 - j2 + 2.0f*G3;
+ z2 = z0 - k2 + 2.0f*G3;
+ x3 = x0 - 1.0f + 3.0f*G3; /* Offsets for last corner in (x,y,z) coords */
+ y3 = y0 - 1.0f + 3.0f*G3;
+ z3 = z0 - 1.0f + 3.0f*G3;
+
+ /* Wrap the integer indices at 256, to avoid indexing perm[] out of bounds */
+ ii = i % 256;
+ jj = j % 256;
+ kk = k % 256;
+
+ /* Calculate the contribution from the four corners */
+ t0 = 0.6f - x0*x0 - y0*y0 - z0*z0;
+ if(t0 < 0.0f) n0 = 0.0f;
+ else {
+ t0 *= t0;
+ n0 = t0 * t0 * grad3(perm[ii+perm[jj+perm[kk]]], x0, y0, z0);
+ }
+
+ t1 = 0.6f - x1*x1 - y1*y1 - z1*z1;
+ if(t1 < 0.0f) n1 = 0.0f;
+ else {
+ t1 *= t1;
+ n1 = t1 * t1 * grad3(perm[ii+i1+perm[jj+j1+perm[kk+k1]]], x1, y1, z1);
+ }
+
+ t2 = 0.6f - x2*x2 - y2*y2 - z2*z2;
+ if(t2 < 0.0f) n2 = 0.0f;
+ else {
+ t2 *= t2;
+ n2 = t2 * t2 * grad3(perm[ii+i2+perm[jj+j2+perm[kk+k2]]], x2, y2, z2);
+ }
+
+ t3 = 0.6f - x3*x3 - y3*y3 - z3*z3;
+ if(t3<0.0f) n3 = 0.0f;
+ else {
+ t3 *= t3;
+ n3 = t3 * t3 * grad3(perm[ii+1+perm[jj+1+perm[kk+1]]], x3, y3, z3);
+ }
+
+ /* Add contributions from each corner to get the final noise value. */
+ /* The result is scaled to stay just inside [-1,1] */
+ return 32.0f * (n0 + n1 + n2 + n3); /* TODO: The scale factor is preliminary! */
+}
+
+/* 4D simplex noise */
+GLfloat _slang_library_noise4 (GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+{
+ /* The skewing and unskewing factors are hairy again for the 4D case */
+#define F4 0.309016994f /* F4 = (Math.sqrt(5.0)-1.0)/4.0 */
+#define G4 0.138196601f /* G4 = (5.0-Math.sqrt(5.0))/20.0 */
+
+ float n0, n1, n2, n3, n4; /* Noise contributions from the five corners */
+
+ /* Skew the (x,y,z,w) space to determine which cell of 24 simplices we're in */
+ float s = (x + y + z + w) * F4; /* Factor for 4D skewing */
+ float xs = x + s;
+ float ys = y + s;
+ float zs = z + s;
+ float ws = w + s;
+ int i = FASTFLOOR(xs);
+ int j = FASTFLOOR(ys);
+ int k = FASTFLOOR(zs);
+ int l = FASTFLOOR(ws);
+
+ float t = (i + j + k + l) * G4; /* Factor for 4D unskewing */
+ float X0 = i - t; /* Unskew the cell origin back to (x,y,z,w) space */
+ float Y0 = j - t;
+ float Z0 = k - t;
+ float W0 = l - t;
+
+ float x0 = x - X0; /* The x,y,z,w distances from the cell origin */
+ float y0 = y - Y0;
+ float z0 = z - Z0;
+ float w0 = w - W0;
+
+ /* For the 4D case, the simplex is a 4D shape I won't even try to describe. */
+ /* To find out which of the 24 possible simplices we're in, we need to */
+ /* determine the magnitude ordering of x0, y0, z0 and w0. */
+ /* The method below is a good way of finding the ordering of x,y,z,w and */
+ /* then find the correct traversal order for the simplex we’re in. */
+ /* First, six pair-wise comparisons are performed between each possible pair */
+ /* of the four coordinates, and the results are used to add up binary bits */
+ /* for an integer index. */
+ int c1 = (x0 > y0) ? 32 : 0;
+ int c2 = (x0 > z0) ? 16 : 0;
+ int c3 = (y0 > z0) ? 8 : 0;
+ int c4 = (x0 > w0) ? 4 : 0;
+ int c5 = (y0 > w0) ? 2 : 0;
+ int c6 = (z0 > w0) ? 1 : 0;
+ int c = c1 + c2 + c3 + c4 + c5 + c6;
+
+ int i1, j1, k1, l1; /* The integer offsets for the second simplex corner */
+ int i2, j2, k2, l2; /* The integer offsets for the third simplex corner */
+ int i3, j3, k3, l3; /* The integer offsets for the fourth simplex corner */
+
+ float x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3, x4, y4, z4, w4;
+ int ii, jj, kk, ll;
+ float t0, t1, t2, t3, t4;
+
+ /* simplex[c] is a 4-vector with the numbers 0, 1, 2 and 3 in some order. */
+ /* Many values of c will never occur, since e.g. x>y>z>w makes x<z, y<w and x<w */
+ /* impossible. Only the 24 indices which have non-zero entries make any sense. */
+ /* We use a thresholding to set the coordinates in turn from the largest magnitude. */
+ /* The number 3 in the "simplex" array is at the position of the largest coordinate. */
+ i1 = simplex[c][0]>=3 ? 1 : 0;
+ j1 = simplex[c][1]>=3 ? 1 : 0;
+ k1 = simplex[c][2]>=3 ? 1 : 0;
+ l1 = simplex[c][3]>=3 ? 1 : 0;
+ /* The number 2 in the "simplex" array is at the second largest coordinate. */
+ i2 = simplex[c][0]>=2 ? 1 : 0;
+ j2 = simplex[c][1]>=2 ? 1 : 0;
+ k2 = simplex[c][2]>=2 ? 1 : 0;
+ l2 = simplex[c][3]>=2 ? 1 : 0;
+ /* The number 1 in the "simplex" array is at the second smallest coordinate. */
+ i3 = simplex[c][0]>=1 ? 1 : 0;
+ j3 = simplex[c][1]>=1 ? 1 : 0;
+ k3 = simplex[c][2]>=1 ? 1 : 0;
+ l3 = simplex[c][3]>=1 ? 1 : 0;
+ /* The fifth corner has all coordinate offsets = 1, so no need to look that up. */
+
+ x1 = x0 - i1 + G4; /* Offsets for second corner in (x,y,z,w) coords */
+ y1 = y0 - j1 + G4;
+ z1 = z0 - k1 + G4;
+ w1 = w0 - l1 + G4;
+ x2 = x0 - i2 + 2.0f*G4; /* Offsets for third corner in (x,y,z,w) coords */
+ y2 = y0 - j2 + 2.0f*G4;
+ z2 = z0 - k2 + 2.0f*G4;
+ w2 = w0 - l2 + 2.0f*G4;
+ x3 = x0 - i3 + 3.0f*G4; /* Offsets for fourth corner in (x,y,z,w) coords */
+ y3 = y0 - j3 + 3.0f*G4;
+ z3 = z0 - k3 + 3.0f*G4;
+ w3 = w0 - l3 + 3.0f*G4;
+ x4 = x0 - 1.0f + 4.0f*G4; /* Offsets for last corner in (x,y,z,w) coords */
+ y4 = y0 - 1.0f + 4.0f*G4;
+ z4 = z0 - 1.0f + 4.0f*G4;
+ w4 = w0 - 1.0f + 4.0f*G4;
+
+ /* Wrap the integer indices at 256, to avoid indexing perm[] out of bounds */
+ ii = i % 256;
+ jj = j % 256;
+ kk = k % 256;
+ ll = l % 256;
+
+ /* Calculate the contribution from the five corners */
+ t0 = 0.6f - x0*x0 - y0*y0 - z0*z0 - w0*w0;
+ if(t0 < 0.0f) n0 = 0.0f;
+ else {
+ t0 *= t0;
+ n0 = t0 * t0 * grad4(perm[ii+perm[jj+perm[kk+perm[ll]]]], x0, y0, z0, w0);
+ }
+
+ t1 = 0.6f - x1*x1 - y1*y1 - z1*z1 - w1*w1;
+ if(t1 < 0.0f) n1 = 0.0f;
+ else {
+ t1 *= t1;
+ n1 = t1 * t1 * grad4(perm[ii+i1+perm[jj+j1+perm[kk+k1+perm[ll+l1]]]], x1, y1, z1, w1);
+ }
+
+ t2 = 0.6f - x2*x2 - y2*y2 - z2*z2 - w2*w2;
+ if(t2 < 0.0f) n2 = 0.0f;
+ else {
+ t2 *= t2;
+ n2 = t2 * t2 * grad4(perm[ii+i2+perm[jj+j2+perm[kk+k2+perm[ll+l2]]]], x2, y2, z2, w2);
+ }
+
+ t3 = 0.6f - x3*x3 - y3*y3 - z3*z3 - w3*w3;
+ if(t3 < 0.0f) n3 = 0.0f;
+ else {
+ t3 *= t3;
+ n3 = t3 * t3 * grad4(perm[ii+i3+perm[jj+j3+perm[kk+k3+perm[ll+l3]]]], x3, y3, z3, w3);
+ }
+
+ t4 = 0.6f - x4*x4 - y4*y4 - z4*z4 - w4*w4;
+ if(t4 < 0.0f) n4 = 0.0f;
+ else {
+ t4 *= t4;
+ n4 = t4 * t4 * grad4(perm[ii+1+perm[jj+1+perm[kk+1+perm[ll+1]]]], x4, y4, z4, w4);
+ }
+
+ /* Sum up and scale the result to cover the range [-1,1] */
+ return 27.0f * (n0 + n1 + n2 + n3 + n4); /* TODO: The scale factor is preliminary! */
+}
+
diff --git a/src/mesa/shader/slang/slang_library_noise.h b/src/mesa/shader/slang/slang_library_noise.h
index e4f419d8db..da7367c1ce 100644
--- a/src/mesa/shader/slang/slang_library_noise.h
+++ b/src/mesa/shader/slang/slang_library_noise.h
@@ -1,42 +1,42 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#if !defined SLANG_LIBRARY_NOISE_H
-#define SLANG_LIBRARY_NOISE_H
-
-#if defined __cplusplus
-extern "C" {
-#endif
-
-GLfloat _slang_library_noise1 (GLfloat);
-GLfloat _slang_library_noise2 (GLfloat, GLfloat);
-GLfloat _slang_library_noise3 (GLfloat, GLfloat, GLfloat);
-GLfloat _slang_library_noise4 (GLfloat, GLfloat, GLfloat, GLfloat);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#if !defined SLANG_LIBRARY_NOISE_H
+#define SLANG_LIBRARY_NOISE_H
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+GLfloat _slang_library_noise1 (GLfloat);
+GLfloat _slang_library_noise2 (GLfloat, GLfloat);
+GLfloat _slang_library_noise3 (GLfloat, GLfloat, GLfloat);
+GLfloat _slang_library_noise4 (GLfloat, GLfloat, GLfloat, GLfloat);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/src/mesa/shader/slang/slang_library_texsample.c b/src/mesa/shader/slang/slang_library_texsample.c
index d26b767f88..38765599cf 100644
--- a/src/mesa/shader/slang/slang_library_texsample.c
+++ b/src/mesa/shader/slang/slang_library_texsample.c
@@ -1,142 +1,142 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_library_texsample.c
- * built-in library functions for texture and shadow sampling
- * \author Michal Krol
- */
-
-#include "imports.h"
-#include "context.h"
-#include "colormac.h"
-#include "swrast/s_context.h"
-#include "slang_library_texsample.h"
-
-GLvoid _slang_library_tex1d (GLfloat bias, GLfloat s, GLfloat sampler, GLfloat *color)
-{
- GET_CURRENT_CONTEXT(ctx);
- SWcontext *swrast = SWRAST_CONTEXT(ctx);
- GLuint unit = (GLuint) sampler;
- GLfloat texcoord[4] = { s, 0.0f, 0.0f, 1.0f };
- GLfloat lambda = bias;
- GLchan rgba[4];
-
- swrast->TextureSample[unit] (ctx, ctx->Texture.Unit[unit]._Current, 1,
- (const GLfloat (*)[4]) texcoord, &lambda, &rgba);
- color[0] = CHAN_TO_FLOAT(rgba[0]);
- color[1] = CHAN_TO_FLOAT(rgba[1]);
- color[2] = CHAN_TO_FLOAT(rgba[2]);
- color[3] = CHAN_TO_FLOAT(rgba[3]);
-}
-
-GLvoid _slang_library_tex2d (GLfloat bias, GLfloat s, GLfloat t, GLfloat sampler, GLfloat *color)
-{
- GET_CURRENT_CONTEXT(ctx);
- SWcontext *swrast = SWRAST_CONTEXT(ctx);
- GLuint unit = (GLuint) sampler;
- GLfloat texcoord[4] = { s, t, 0.0f, 1.0f };
- GLfloat lambda = bias;
- GLchan rgba[4];
-
- swrast->TextureSample[unit] (ctx, ctx->Texture.Unit[unit]._Current, 1,
- (const GLfloat (*)[4]) texcoord, &lambda, &rgba);
- color[0] = CHAN_TO_FLOAT(rgba[0]);
- color[1] = CHAN_TO_FLOAT(rgba[1]);
- color[2] = CHAN_TO_FLOAT(rgba[2]);
- color[3] = CHAN_TO_FLOAT(rgba[3]);
-}
-
-GLvoid _slang_library_tex3d (GLfloat bias, GLfloat s, GLfloat t, GLfloat r, GLfloat sampler,
- GLfloat *color)
-{
- GET_CURRENT_CONTEXT(ctx);
- SWcontext *swrast = SWRAST_CONTEXT(ctx);
- GLuint unit = (GLuint) sampler;
- GLfloat texcoord[4] = { s, t, r, 1.0f };
- GLfloat lambda = bias;
- GLchan rgba[4];
-
- swrast->TextureSample[unit] (ctx, ctx->Texture.Unit[unit]._Current, 1,
- (const GLfloat (*)[4]) texcoord, &lambda, &rgba);
- color[0] = CHAN_TO_FLOAT(rgba[0]);
- color[1] = CHAN_TO_FLOAT(rgba[1]);
- color[2] = CHAN_TO_FLOAT(rgba[2]);
- color[3] = CHAN_TO_FLOAT(rgba[3]);
-}
-
-GLvoid _slang_library_texcube (GLfloat bias, GLfloat s, GLfloat t, GLfloat r, GLfloat sampler,
- GLfloat *color)
-{
- GET_CURRENT_CONTEXT(ctx);
- SWcontext *swrast = SWRAST_CONTEXT(ctx);
- GLuint unit = (GLuint) sampler;
- GLfloat texcoord[4] = { s, t, r, 1.0f };
- GLfloat lambda = bias;
- GLchan rgba[4];
-
- swrast->TextureSample[unit] (ctx, ctx->Texture.Unit[unit]._Current, 1,
- (const GLfloat (*)[4]) texcoord, &lambda, &rgba);
- color[0] = CHAN_TO_FLOAT(rgba[0]);
- color[1] = CHAN_TO_FLOAT(rgba[1]);
- color[2] = CHAN_TO_FLOAT(rgba[2]);
- color[3] = CHAN_TO_FLOAT(rgba[3]);
-}
-
-GLvoid _slang_library_shad1d (GLfloat bias, GLfloat s, GLfloat t, GLfloat r, GLfloat sampler,
- GLfloat *color)
-{
- GET_CURRENT_CONTEXT(ctx);
- SWcontext *swrast = SWRAST_CONTEXT(ctx);
- GLuint unit = (GLuint) sampler;
- GLfloat texcoord[4] = { s, t, r, 1.0f };
- GLfloat lambda = bias;
- GLchan rgba[4];
-
- swrast->TextureSample[unit] (ctx, ctx->Texture.Unit[unit]._Current, 1,
- (const GLfloat (*)[4]) texcoord, &lambda, &rgba);
- color[0] = CHAN_TO_FLOAT(rgba[0]);
- color[1] = CHAN_TO_FLOAT(rgba[1]);
- color[2] = CHAN_TO_FLOAT(rgba[2]);
- color[3] = CHAN_TO_FLOAT(rgba[3]);
-}
-
-GLvoid _slang_library_shad2d (GLfloat bias, GLfloat s, GLfloat t, GLfloat r, GLfloat sampler,
- GLfloat *color)
-{
- GET_CURRENT_CONTEXT(ctx);
- SWcontext *swrast = SWRAST_CONTEXT(ctx);
- GLuint unit = (GLuint) sampler;
- GLfloat texcoord[4] = { s, t, r, 1.0f };
- GLfloat lambda = bias;
- GLchan rgba[4];
-
- swrast->TextureSample[unit] (ctx, ctx->Texture.Unit[unit]._Current, 1,
- (const GLfloat (*)[4]) texcoord, &lambda, &rgba);
- color[0] = CHAN_TO_FLOAT(rgba[0]);
- color[1] = CHAN_TO_FLOAT(rgba[1]);
- color[2] = CHAN_TO_FLOAT(rgba[2]);
- color[3] = CHAN_TO_FLOAT(rgba[3]);
-}
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file slang_library_texsample.c
+ * built-in library functions for texture and shadow sampling
+ * \author Michal Krol
+ */
+
+#include "imports.h"
+#include "context.h"
+#include "colormac.h"
+#include "swrast/s_context.h"
+#include "slang_library_texsample.h"
+
+GLvoid _slang_library_tex1d (GLfloat bias, GLfloat s, GLfloat sampler, GLfloat *color)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ SWcontext *swrast = SWRAST_CONTEXT(ctx);
+ GLuint unit = (GLuint) sampler;
+ GLfloat texcoord[4] = { s, 0.0f, 0.0f, 1.0f };
+ GLfloat lambda = bias;
+ GLchan rgba[4];
+
+ swrast->TextureSample[unit] (ctx, ctx->Texture.Unit[unit]._Current, 1,
+ (const GLfloat (*)[4]) texcoord, &lambda, &rgba);
+ color[0] = CHAN_TO_FLOAT(rgba[0]);
+ color[1] = CHAN_TO_FLOAT(rgba[1]);
+ color[2] = CHAN_TO_FLOAT(rgba[2]);
+ color[3] = CHAN_TO_FLOAT(rgba[3]);
+}
+
+GLvoid _slang_library_tex2d (GLfloat bias, GLfloat s, GLfloat t, GLfloat sampler, GLfloat *color)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ SWcontext *swrast = SWRAST_CONTEXT(ctx);
+ GLuint unit = (GLuint) sampler;
+ GLfloat texcoord[4] = { s, t, 0.0f, 1.0f };
+ GLfloat lambda = bias;
+ GLchan rgba[4];
+
+ swrast->TextureSample[unit] (ctx, ctx->Texture.Unit[unit]._Current, 1,
+ (const GLfloat (*)[4]) texcoord, &lambda, &rgba);
+ color[0] = CHAN_TO_FLOAT(rgba[0]);
+ color[1] = CHAN_TO_FLOAT(rgba[1]);
+ color[2] = CHAN_TO_FLOAT(rgba[2]);
+ color[3] = CHAN_TO_FLOAT(rgba[3]);
+}
+
+GLvoid _slang_library_tex3d (GLfloat bias, GLfloat s, GLfloat t, GLfloat r, GLfloat sampler,
+ GLfloat *color)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ SWcontext *swrast = SWRAST_CONTEXT(ctx);
+ GLuint unit = (GLuint) sampler;
+ GLfloat texcoord[4] = { s, t, r, 1.0f };
+ GLfloat lambda = bias;
+ GLchan rgba[4];
+
+ swrast->TextureSample[unit] (ctx, ctx->Texture.Unit[unit]._Current, 1,
+ (const GLfloat (*)[4]) texcoord, &lambda, &rgba);
+ color[0] = CHAN_TO_FLOAT(rgba[0]);
+ color[1] = CHAN_TO_FLOAT(rgba[1]);
+ color[2] = CHAN_TO_FLOAT(rgba[2]);
+ color[3] = CHAN_TO_FLOAT(rgba[3]);
+}
+
+GLvoid _slang_library_texcube (GLfloat bias, GLfloat s, GLfloat t, GLfloat r, GLfloat sampler,
+ GLfloat *color)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ SWcontext *swrast = SWRAST_CONTEXT(ctx);
+ GLuint unit = (GLuint) sampler;
+ GLfloat texcoord[4] = { s, t, r, 1.0f };
+ GLfloat lambda = bias;
+ GLchan rgba[4];
+
+ swrast->TextureSample[unit] (ctx, ctx->Texture.Unit[unit]._Current, 1,
+ (const GLfloat (*)[4]) texcoord, &lambda, &rgba);
+ color[0] = CHAN_TO_FLOAT(rgba[0]);
+ color[1] = CHAN_TO_FLOAT(rgba[1]);
+ color[2] = CHAN_TO_FLOAT(rgba[2]);
+ color[3] = CHAN_TO_FLOAT(rgba[3]);
+}
+
+GLvoid _slang_library_shad1d (GLfloat bias, GLfloat s, GLfloat t, GLfloat r, GLfloat sampler,
+ GLfloat *color)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ SWcontext *swrast = SWRAST_CONTEXT(ctx);
+ GLuint unit = (GLuint) sampler;
+ GLfloat texcoord[4] = { s, t, r, 1.0f };
+ GLfloat lambda = bias;
+ GLchan rgba[4];
+
+ swrast->TextureSample[unit] (ctx, ctx->Texture.Unit[unit]._Current, 1,
+ (const GLfloat (*)[4]) texcoord, &lambda, &rgba);
+ color[0] = CHAN_TO_FLOAT(rgba[0]);
+ color[1] = CHAN_TO_FLOAT(rgba[1]);
+ color[2] = CHAN_TO_FLOAT(rgba[2]);
+ color[3] = CHAN_TO_FLOAT(rgba[3]);
+}
+
+GLvoid _slang_library_shad2d (GLfloat bias, GLfloat s, GLfloat t, GLfloat r, GLfloat sampler,
+ GLfloat *color)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ SWcontext *swrast = SWRAST_CONTEXT(ctx);
+ GLuint unit = (GLuint) sampler;
+ GLfloat texcoord[4] = { s, t, r, 1.0f };
+ GLfloat lambda = bias;
+ GLchan rgba[4];
+
+ swrast->TextureSample[unit] (ctx, ctx->Texture.Unit[unit]._Current, 1,
+ (const GLfloat (*)[4]) texcoord, &lambda, &rgba);
+ color[0] = CHAN_TO_FLOAT(rgba[0]);
+ color[1] = CHAN_TO_FLOAT(rgba[1]);
+ color[2] = CHAN_TO_FLOAT(rgba[2]);
+ color[3] = CHAN_TO_FLOAT(rgba[3]);
+}
+
diff --git a/src/mesa/shader/slang/slang_library_texsample.h b/src/mesa/shader/slang/slang_library_texsample.h
index 3aea76fd8d..f74738ffa1 100644
--- a/src/mesa/shader/slang/slang_library_texsample.h
+++ b/src/mesa/shader/slang/slang_library_texsample.h
@@ -1,44 +1,44 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#if !defined SLANG_LIBRARY_TEXSAMPLE_H
-#define SLANG_LIBRARY_TEXSAMPLE_H
-
-#if defined __cplusplus
-extern "C" {
-#endif
-
-GLvoid _slang_library_tex1d (GLfloat, GLfloat, GLfloat, GLfloat *);
-GLvoid _slang_library_tex2d (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat *);
-GLvoid _slang_library_tex3d (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat *);
-GLvoid _slang_library_texcube (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat *);
-GLvoid _slang_library_shad1d (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat *);
-GLvoid _slang_library_shad2d (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#if !defined SLANG_LIBRARY_TEXSAMPLE_H
+#define SLANG_LIBRARY_TEXSAMPLE_H
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+GLvoid _slang_library_tex1d (GLfloat, GLfloat, GLfloat, GLfloat *);
+GLvoid _slang_library_tex2d (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat *);
+GLvoid _slang_library_tex3d (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat *);
+GLvoid _slang_library_texcube (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat *);
+GLvoid _slang_library_shad1d (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat *);
+GLvoid _slang_library_shad2d (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/src/mesa/shader/slang/slang_mesa.h b/src/mesa/shader/slang/slang_mesa.h
index 41f79aa703..ca7af22d2a 100644
--- a/src/mesa/shader/slang/slang_mesa.h
+++ b/src/mesa/shader/slang/slang_mesa.h
@@ -1,36 +1,36 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.3
- *
- * Copyright (C) 2005 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#if defined __cplusplus
-extern "C" {
-#endif
-
-int _mesa_isalnum (char);
-int _glslang_3dlabs_InitProcess ();
-int _glslang_3dlabs_ShInitialize ();
-
-#if defined __cplusplus
-}
-#endif
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.3
+ *
+ * Copyright (C) 2005 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+int _mesa_isalnum (char);
+int _glslang_3dlabs_InitProcess ();
+int _glslang_3dlabs_ShInitialize ();
+
+#if defined __cplusplus
+}
+#endif
+
diff --git a/src/mesa/shader/slang/slang_preprocess.c b/src/mesa/shader/slang/slang_preprocess.c
index 0be167e2ed..005a0a534b 100644
--- a/src/mesa/shader/slang/slang_preprocess.c
+++ b/src/mesa/shader/slang/slang_preprocess.c
@@ -1,86 +1,86 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_preprocess.c
- * slang preprocessor
- * \author Michal Krol
- */
-
-#include "imports.h"
-#include "grammar_mesa.h"
-#include "slang_preprocess.h"
-
-static const char *slang_version_syn =
-#include "library/slang_version_syn.h"
-;
-
-int _slang_preprocess_version (const char *text, unsigned int *version, unsigned int *eaten,
- slang_info_log *log)
-{
- grammar id;
- byte *prod, *I;
- unsigned int size;
-
- id = grammar_load_from_text ((const byte *) slang_version_syn);
- if (id == 0)
- {
- char buf[1024];
- unsigned int pos;
- grammar_get_last_error ( (unsigned char*) buf, 1024, (int*) &pos);
- slang_info_log_error (log, buf);
- return 0;
- }
-
- if (!grammar_fast_check (id, (const byte *) text, &prod, &size, 8))
- {
- char buf[1024];
- unsigned int pos;
- grammar_get_last_error ( (unsigned char*) buf, 1024, (int*) &pos);
- slang_info_log_error (log, buf);
- grammar_destroy (id);
- return 0;
- }
-
- 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);
- I += 6;
- }
-
- grammar_alloc_free (prod);
- return 1;
-}
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file slang_preprocess.c
+ * slang preprocessor
+ * \author Michal Krol
+ */
+
+#include "imports.h"
+#include "grammar_mesa.h"
+#include "slang_preprocess.h"
+
+static const char *slang_version_syn =
+#include "library/slang_version_syn.h"
+;
+
+int _slang_preprocess_version (const char *text, unsigned int *version, unsigned int *eaten,
+ slang_info_log *log)
+{
+ grammar id;
+ byte *prod, *I;
+ unsigned int size;
+
+ id = grammar_load_from_text ((const byte *) slang_version_syn);
+ if (id == 0)
+ {
+ char buf[1024];
+ unsigned int pos;
+ grammar_get_last_error ( (unsigned char*) buf, 1024, (int*) &pos);
+ slang_info_log_error (log, buf);
+ return 0;
+ }
+
+ if (!grammar_fast_check (id, (const byte *) text, &prod, &size, 8))
+ {
+ char buf[1024];
+ unsigned int pos;
+ grammar_get_last_error ( (unsigned char*) buf, 1024, (int*) &pos);
+ slang_info_log_error (log, buf);
+ grammar_destroy (id);
+ return 0;
+ }
+
+ 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);
+ I += 6;
+ }
+
+ grammar_alloc_free (prod);
+ return 1;
+}
+
diff --git a/src/mesa/shader/slang/slang_preprocess.h b/src/mesa/shader/slang/slang_preprocess.h
index c27556d67e..60635cc40b 100644
--- a/src/mesa/shader/slang/slang_preprocess.h
+++ b/src/mesa/shader/slang/slang_preprocess.h
@@ -1,41 +1,41 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#if !defined SLANG_PREPROCESS_H
-#define SLANG_PREPROCESS_H
-
-#include "slang_compile.h"
-
-#if defined __cplusplus
-extern "C" {
-#endif
-
-int _slang_preprocess_version (const char *, unsigned int *, unsigned int *, slang_info_log *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#if !defined SLANG_PREPROCESS_H
+#define SLANG_PREPROCESS_H
+
+#include "slang_compile.h"
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+int _slang_preprocess_version (const char *, unsigned int *, unsigned int *, slang_info_log *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/src/mesa/shader/slang/slang_storage.c b/src/mesa/shader/slang/slang_storage.c
index 946dc2e6fc..34c62081f0 100644
--- a/src/mesa/shader/slang/slang_storage.c
+++ b/src/mesa/shader/slang/slang_storage.c
@@ -37,7 +37,7 @@ GLboolean slang_storage_array_construct (slang_storage_array *arr)
{
arr->type = slang_stor_aggregate;
arr->aggregate = NULL;
- arr->length = 0;
+ arr->length = 0;
return GL_TRUE;
}
@@ -55,13 +55,13 @@ GLvoid slang_storage_array_destruct (slang_storage_array *arr)
GLboolean slang_storage_aggregate_construct (slang_storage_aggregate *agg)
{
agg->arrays = NULL;
- agg->count = 0;
+ agg->count = 0;
return GL_TRUE;
}
GLvoid slang_storage_aggregate_destruct (slang_storage_aggregate *agg)
{
- GLuint i;
+ GLuint i;
for (i = 0; i < agg->count; i++)
slang_storage_array_destruct (agg->arrays + i);
@@ -70,14 +70,14 @@ GLvoid slang_storage_aggregate_destruct (slang_storage_aggregate *agg)
static slang_storage_array *slang_storage_aggregate_push_new (slang_storage_aggregate *agg)
{
- slang_storage_array *arr = NULL;
+ slang_storage_array *arr = NULL;
agg->arrays = (slang_storage_array *) slang_alloc_realloc (agg->arrays, agg->count * sizeof (
slang_storage_array), (agg->count + 1) * sizeof (slang_storage_array));
if (agg->arrays != NULL)
{
arr = agg->arrays + agg->count;
- if (!slang_storage_array_construct (arr))
+ if (!slang_storage_array_construct (arr))
return NULL;
agg->count++;
}
@@ -100,7 +100,7 @@ static GLboolean aggregate_vector (slang_storage_aggregate *agg, slang_storage_t
static GLboolean aggregate_matrix (slang_storage_aggregate *agg, slang_storage_type basic_type,
GLuint dimension)
{
- slang_storage_array *arr = slang_storage_aggregate_push_new (agg);
+ slang_storage_array *arr = slang_storage_aggregate_push_new (agg);
if (arr == NULL)
return GL_FALSE;
arr->type = slang_stor_aggregate;
@@ -108,11 +108,11 @@ static GLboolean aggregate_matrix (slang_storage_aggregate *agg, slang_storage_t
arr->aggregate = (slang_storage_aggregate *) slang_alloc_malloc (sizeof (slang_storage_aggregate));
if (arr->aggregate == NULL)
return GL_FALSE;
- if (!slang_storage_aggregate_construct (arr->aggregate))
- {
- slang_alloc_free (arr->aggregate);
- arr->aggregate = NULL;
- return GL_FALSE;
+ if (!slang_storage_aggregate_construct (arr->aggregate))
+ {
+ slang_alloc_free (arr->aggregate);
+ arr->aggregate = NULL;
+ return GL_FALSE;
}
if (!aggregate_vector (arr->aggregate, basic_type, dimension))
return GL_FALSE;
@@ -120,10 +120,10 @@ static GLboolean aggregate_matrix (slang_storage_aggregate *agg, slang_storage_t
}
static GLboolean aggregate_variables (slang_storage_aggregate *agg, slang_variable_scope *vars,
- slang_function_scope *funcs, slang_struct_scope *structs, slang_variable_scope *globals,
+ slang_function_scope *funcs, slang_struct_scope *structs, slang_variable_scope *globals,
slang_machine *mach, slang_assembly_file *file, slang_atom_pool *atoms)
{
- GLuint i;
+ GLuint i;
for (i = 0; i < vars->num_variables; i++)
if (!_slang_aggregate_variable (agg, &vars->variables[i].type.specifier,
@@ -131,60 +131,60 @@ static GLboolean aggregate_variables (slang_storage_aggregate *agg, slang_variab
return GL_FALSE;
return GL_TRUE;
}
-
-GLboolean _slang_evaluate_int (slang_assembly_file *file, slang_machine *pmach,
- slang_assembly_name_space *space, slang_operation *array_size, GLuint *pint,
- slang_atom_pool *atoms)
-{
- slang_assembly_file_restore_point point;
- slang_machine mach;
- slang_assemble_ctx A;
-
- A.file = file;
- A.mach = pmach;
- A.atoms = atoms;
- A.space = *space;
- A.local.ret_size = 0;
- A.local.addr_tmp = 0;
- A.local.swizzle_tmp = 4;
-
- /* save the current assembly */
- if (!slang_assembly_file_restore_point_save (file, &point))
- return GL_FALSE;
-
- /* setup the machine */
- mach = *pmach;
- mach.ip = file->count;
-
- /* allocate local storage for expression */
- if (!slang_assembly_file_push_label (file, slang_asm_local_alloc, 20))
- return GL_FALSE;
- if (!slang_assembly_file_push_label (file, slang_asm_enter, 20))
- return GL_FALSE;
-
- /* insert the actual expression */
- if (!_slang_assemble_operation (&A, array_size, slang_ref_forbid))
- return GL_FALSE;
- if (!slang_assembly_file_push (file, slang_asm_exit))
- return GL_FALSE;
-
- /* execute the expression */
- if (!_slang_execute2 (file, &mach))
- return GL_FALSE;
-
- /* the evaluated expression is on top of the stack */
- *pint = (GLuint) mach.mem[mach.sp + SLANG_MACHINE_GLOBAL_SIZE]._float;
-
- /* restore the old assembly */
- if (!slang_assembly_file_restore_point_load (file, &point))
- return GL_FALSE;
-
- return GL_TRUE;
-}
+
+GLboolean _slang_evaluate_int (slang_assembly_file *file, slang_machine *pmach,
+ slang_assembly_name_space *space, slang_operation *array_size, GLuint *pint,
+ slang_atom_pool *atoms)
+{
+ slang_assembly_file_restore_point point;
+ slang_machine mach;
+ slang_assemble_ctx A;
+
+ A.file = file;
+ A.mach = pmach;
+ A.atoms = atoms;
+ A.space = *space;
+ A.local.ret_size = 0;
+ A.local.addr_tmp = 0;
+ A.local.swizzle_tmp = 4;
+
+ /* save the current assembly */
+ if (!slang_assembly_file_restore_point_save (file, &point))
+ return GL_FALSE;
+
+ /* setup the machine */
+ mach = *pmach;
+ mach.ip = file->count;
+
+ /* allocate local storage for expression */
+ if (!slang_assembly_file_push_label (file, slang_asm_local_alloc, 20))
+ return GL_FALSE;
+ if (!slang_assembly_file_push_label (file, slang_asm_enter, 20))
+ return GL_FALSE;
+
+ /* insert the actual expression */
+ if (!_slang_assemble_operation (&A, array_size, slang_ref_forbid))
+ return GL_FALSE;
+ if (!slang_assembly_file_push (file, slang_asm_exit))
+ return GL_FALSE;
+
+ /* execute the expression */
+ if (!_slang_execute2 (file, &mach))
+ return GL_FALSE;
+
+ /* the evaluated expression is on top of the stack */
+ *pint = (GLuint) mach.mem[mach.sp + SLANG_MACHINE_GLOBAL_SIZE]._float;
+
+ /* restore the old assembly */
+ if (!slang_assembly_file_restore_point_load (file, &point))
+ return GL_FALSE;
+
+ return GL_TRUE;
+}
GLboolean _slang_aggregate_variable (slang_storage_aggregate *agg, slang_type_specifier *spec,
GLuint array_len, slang_function_scope *funcs, slang_struct_scope *structs,
- slang_variable_scope *vars, slang_machine *mach, slang_assembly_file *file,
+ slang_variable_scope *vars, slang_machine *mach, slang_assembly_file *file,
slang_atom_pool *atoms)
{
switch (spec->type)
@@ -227,11 +227,11 @@ GLboolean _slang_aggregate_variable (slang_storage_aggregate *agg, slang_type_sp
case slang_spec_sampler2DShadow:
return aggregate_vector (agg, slang_stor_int, 1);
case slang_spec_struct:
- return aggregate_variables (agg, spec->_struct->fields, funcs, structs, vars, mach,
+ return aggregate_variables (agg, spec->_struct->fields, funcs, structs, vars, mach,
file, atoms);
case slang_spec_array:
{
- slang_storage_array *arr;
+ slang_storage_array *arr;
arr = slang_storage_aggregate_push_new (agg);
if (arr == NULL)
@@ -240,16 +240,16 @@ GLboolean _slang_aggregate_variable (slang_storage_aggregate *agg, slang_type_sp
arr->aggregate = (slang_storage_aggregate *) slang_alloc_malloc (sizeof (slang_storage_aggregate));
if (arr->aggregate == NULL)
return GL_FALSE;
- if (!slang_storage_aggregate_construct (arr->aggregate))
- {
- slang_alloc_free (arr->aggregate);
- arr->aggregate = NULL;
- return GL_FALSE;
+ if (!slang_storage_aggregate_construct (arr->aggregate))
+ {
+ slang_alloc_free (arr->aggregate);
+ arr->aggregate = NULL;
+ return GL_FALSE;
}
- if (!_slang_aggregate_variable (arr->aggregate, spec->_array, 0, funcs, structs,
+ if (!_slang_aggregate_variable (arr->aggregate, spec->_array, 0, funcs, structs,
vars, mach, file, atoms))
- return GL_FALSE;
- arr->length = array_len;
+ return GL_FALSE;
+ arr->length = array_len;
/* TODO: check if 0 < arr->length <= 65535 */
}
return GL_TRUE;
@@ -262,11 +262,11 @@ GLboolean _slang_aggregate_variable (slang_storage_aggregate *agg, slang_type_sp
GLuint _slang_sizeof_aggregate (const slang_storage_aggregate *agg)
{
- GLuint i, size = 0;
+ GLuint i, size = 0;
for (i = 0; i < agg->count; i++)
{
- GLuint element_size;
+ GLuint element_size;
if (agg->arrays[i].type == slang_stor_aggregate)
element_size = _slang_sizeof_aggregate (agg->arrays[i].aggregate);
@@ -281,11 +281,11 @@ GLuint _slang_sizeof_aggregate (const slang_storage_aggregate *agg)
GLboolean _slang_flatten_aggregate (slang_storage_aggregate *flat, const slang_storage_aggregate *agg)
{
- GLuint i;
+ GLuint i;
for (i = 0; i < agg->count; i++)
{
- GLuint j;
+ GLuint j;
for (j = 0; j < agg->arrays[i].length; j++)
{
@@ -296,7 +296,7 @@ GLboolean _slang_flatten_aggregate (slang_storage_aggregate *flat, const slang_s
}
else
{
- slang_storage_array *arr;
+ slang_storage_array *arr;
arr = slang_storage_aggregate_push_new (flat);
if (arr == NULL)
diff --git a/src/mesa/shader/slang/slang_utility.c b/src/mesa/shader/slang/slang_utility.c
index 5075832a92..20ea6abae5 100644
--- a/src/mesa/shader/slang/slang_utility.c
+++ b/src/mesa/shader/slang/slang_utility.c
@@ -1,112 +1,112 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_utility.c
- * slang utilities
- * \author Michal Krol
- */
-
-#include "imports.h"
-#include "slang_utility.h"
-
-char *slang_string_concat (char *dst, const char *src)
-{
- return _mesa_strcpy (dst + _mesa_strlen (dst), src);
-}
-
-/* slang_atom_pool */
-
-void slang_atom_pool_construct (slang_atom_pool *pool)
-{
- GLuint i;
-
- for (i = 0; i < SLANG_ATOM_POOL_SIZE; i++)
- pool->entries[i] = NULL;
-}
-
-void slang_atom_pool_destruct (slang_atom_pool *pool)
-{
- GLuint i;
-
- for (i = 0; i < SLANG_ATOM_POOL_SIZE; i++)
- {
- slang_atom_entry *entry;
-
- entry = pool->entries[i];
- while (entry != NULL)
- {
- slang_atom_entry *next;
-
- next = entry->next;
- slang_alloc_free (entry->id);
- slang_alloc_free (entry);
- entry = next;
- }
- }
-}
-
-slang_atom slang_atom_pool_atom (slang_atom_pool *pool, const char *id)
-{
- GLuint hash;
- const char *p = id;
- slang_atom_entry **entry;
-
- hash = 0;
- while (*p != '\0')
- {
- GLuint g;
-
- hash = (hash << 4) + (GLuint) *p++;
- g = hash & 0xf0000000;
- if (g != 0)
- hash ^= g >> 24;
- hash &= ~g;
- }
- hash %= SLANG_ATOM_POOL_SIZE;
-
- entry = &pool->entries[hash];
- while (*entry != NULL)
- {
- if (slang_string_compare ((**entry).id, id) == 0)
- return (slang_atom) (**entry).id;
- entry = &(**entry).next;
- }
-
- *entry = (slang_atom_entry *) slang_alloc_malloc (sizeof (slang_atom_entry));
- if (*entry == NULL)
- return SLANG_ATOM_NULL;
-
- (**entry).next = NULL;
- (**entry).id = slang_string_duplicate (id);
- if ((**entry).id == NULL)
- return SLANG_ATOM_NULL;
- return (slang_atom) (**entry).id;
-}
-
-const char *slang_atom_pool_id (slang_atom_pool *pool, slang_atom atom)
-{
- return (const char *) atom;
-}
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file slang_utility.c
+ * slang utilities
+ * \author Michal Krol
+ */
+
+#include "imports.h"
+#include "slang_utility.h"
+
+char *slang_string_concat (char *dst, const char *src)
+{
+ return _mesa_strcpy (dst + _mesa_strlen (dst), src);
+}
+
+/* slang_atom_pool */
+
+void slang_atom_pool_construct (slang_atom_pool *pool)
+{
+ GLuint i;
+
+ for (i = 0; i < SLANG_ATOM_POOL_SIZE; i++)
+ pool->entries[i] = NULL;
+}
+
+void slang_atom_pool_destruct (slang_atom_pool *pool)
+{
+ GLuint i;
+
+ for (i = 0; i < SLANG_ATOM_POOL_SIZE; i++)
+ {
+ slang_atom_entry *entry;
+
+ entry = pool->entries[i];
+ while (entry != NULL)
+ {
+ slang_atom_entry *next;
+
+ next = entry->next;
+ slang_alloc_free (entry->id);
+ slang_alloc_free (entry);
+ entry = next;
+ }
+ }
+}
+
+slang_atom slang_atom_pool_atom (slang_atom_pool *pool, const char *id)
+{
+ GLuint hash;
+ const char *p = id;
+ slang_atom_entry **entry;
+
+ hash = 0;
+ while (*p != '\0')
+ {
+ GLuint g;
+
+ hash = (hash << 4) + (GLuint) *p++;
+ g = hash & 0xf0000000;
+ if (g != 0)
+ hash ^= g >> 24;
+ hash &= ~g;
+ }
+ hash %= SLANG_ATOM_POOL_SIZE;
+
+ entry = &pool->entries[hash];
+ while (*entry != NULL)
+ {
+ if (slang_string_compare ((**entry).id, id) == 0)
+ return (slang_atom) (**entry).id;
+ entry = &(**entry).next;
+ }
+
+ *entry = (slang_atom_entry *) slang_alloc_malloc (sizeof (slang_atom_entry));
+ if (*entry == NULL)
+ return SLANG_ATOM_NULL;
+
+ (**entry).next = NULL;
+ (**entry).id = slang_string_duplicate (id);
+ if ((**entry).id == NULL)
+ return SLANG_ATOM_NULL;
+ return (slang_atom) (**entry).id;
+}
+
+const char *slang_atom_pool_id (slang_atom_pool *pool, slang_atom atom)
+{
+ return (const char *) atom;
+}
+
diff --git a/src/mesa/shader/slang/slang_utility.h b/src/mesa/shader/slang/slang_utility.h
index 346ce6b657..7a1997e559 100644
--- a/src/mesa/shader/slang/slang_utility.h
+++ b/src/mesa/shader/slang/slang_utility.h
@@ -1,74 +1,74 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#if !defined SLANG_UTILITY_H
-#define SLANG_UTILITY_H
-
-#if defined __cplusplus
-extern "C" {
-#endif
-
-/* Compile-time assertions. If the expression is zero, try to declare an
- * array of size [-1] to cause compilation error.
- */
-#define static_assert(expr) do { int _array[(expr) ? 1 : -1]; (void) _array[0]; } while (0)
-
-#define slang_alloc_free(ptr) _mesa_free (ptr)
-#define slang_alloc_malloc(size) _mesa_malloc (size)
-#define slang_alloc_realloc(ptr, old_size, size) _mesa_realloc (ptr, old_size, size)
-#define slang_string_compare(str1, str2) _mesa_strcmp (str1, str2)
-#define slang_string_copy(dst, src) _mesa_strcpy (dst, src)
-#define slang_string_duplicate(src) _mesa_strdup (src)
-#define slang_string_length(str) _mesa_strlen (str)
-
-char *slang_string_concat (char *, const char *);
-
-typedef GLvoid *slang_atom;
-
-#define SLANG_ATOM_NULL ((slang_atom) 0)
-
-typedef struct slang_atom_entry_
-{
- char *id;
- struct slang_atom_entry_ *next;
-} slang_atom_entry;
-
-#define SLANG_ATOM_POOL_SIZE 1023
-
-typedef struct slang_atom_pool_
-{
- slang_atom_entry *entries[SLANG_ATOM_POOL_SIZE];
-} slang_atom_pool;
-
-GLvoid slang_atom_pool_construct (slang_atom_pool *);
-GLvoid slang_atom_pool_destruct (slang_atom_pool *);
-slang_atom slang_atom_pool_atom (slang_atom_pool *, const char *);
-const char *slang_atom_pool_id (slang_atom_pool *, slang_atom);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#if !defined SLANG_UTILITY_H
+#define SLANG_UTILITY_H
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+/* Compile-time assertions. If the expression is zero, try to declare an
+ * array of size [-1] to cause compilation error.
+ */
+#define static_assert(expr) do { int _array[(expr) ? 1 : -1]; (void) _array[0]; } while (0)
+
+#define slang_alloc_free(ptr) _mesa_free (ptr)
+#define slang_alloc_malloc(size) _mesa_malloc (size)
+#define slang_alloc_realloc(ptr, old_size, size) _mesa_realloc (ptr, old_size, size)
+#define slang_string_compare(str1, str2) _mesa_strcmp (str1, str2)
+#define slang_string_copy(dst, src) _mesa_strcpy (dst, src)
+#define slang_string_duplicate(src) _mesa_strdup (src)
+#define slang_string_length(str) _mesa_strlen (str)
+
+char *slang_string_concat (char *, const char *);
+
+typedef GLvoid *slang_atom;
+
+#define SLANG_ATOM_NULL ((slang_atom) 0)
+
+typedef struct slang_atom_entry_
+{
+ char *id;
+ struct slang_atom_entry_ *next;
+} slang_atom_entry;
+
+#define SLANG_ATOM_POOL_SIZE 1023
+
+typedef struct slang_atom_pool_
+{
+ slang_atom_entry *entries[SLANG_ATOM_POOL_SIZE];
+} slang_atom_pool;
+
+GLvoid slang_atom_pool_construct (slang_atom_pool *);
+GLvoid slang_atom_pool_destruct (slang_atom_pool *);
+slang_atom slang_atom_pool_atom (slang_atom_pool *, const char *);
+const char *slang_atom_pool_id (slang_atom_pool *, slang_atom);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/src/mesa/shader/slang/traverse_wrap.h b/src/mesa/shader/slang/traverse_wrap.h
index f0cc761086..b2f244ee01 100644
--- a/src/mesa/shader/slang/traverse_wrap.h
+++ b/src/mesa/shader/slang/traverse_wrap.h
@@ -1,112 +1,112 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.3
- *
- * Copyright (C) 2005 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file traverse_wrap.h
- * Handy TIntermTraverser class wrapper
- * \author Michal Krol
- */
-
-#ifndef __TRAVERSE_WRAP_H__
-#define __TRAVERSE_WRAP_H__
-
-#include "Include/intermediate.h"
-
-/*
- The original TIntermTraverser class that is used to walk the intermediate tree,
- is not very elegant in its design. One must define static functions with
- appropriate prototypes, construct TIntermTraverser object, and set its member
- function pointers to one's static functions. If traversal-specific data
- is needed, a new class must be derived, and one must up-cast the object
- passed as a parameter to the static function.
-
- The class below eliminates this burden by providing virtual methods that are
- to be overridden in the derived class.
-*/
-
-class traverse_wrap: private TIntermTraverser
-{
-private:
- static void _visitSymbol (TIntermSymbol *S, TIntermTraverser *T) {
- static_cast<traverse_wrap *> (T)->Symbol (*S);
- }
- static void _visitConstantUnion (TIntermConstantUnion *U, TIntermTraverser *T) {
- static_cast<traverse_wrap *> (T)->ConstantUnion (*U);
- }
- static bool _visitBinary (bool preVisit, TIntermBinary *B, TIntermTraverser *T) {
- return static_cast<traverse_wrap *> (T)->Binary (preVisit, *B);
- }
- static bool _visitUnary (bool preVisit, TIntermUnary *U, TIntermTraverser *T) {
- return static_cast<traverse_wrap *> (T)->Unary (preVisit, *U);
- }
- static bool _visitSelection (bool preVisit, TIntermSelection *S, TIntermTraverser *T) {
- return static_cast<traverse_wrap *> (T)->Selection (preVisit, *S);
- }
- static bool _visitAggregate (bool preVisit, TIntermAggregate *A, TIntermTraverser *T) {
- return static_cast<traverse_wrap *> (T)->Aggregate (preVisit, *A);
- }
- static bool _visitLoop (bool preVisit, TIntermLoop *L, TIntermTraverser *T) {
- return static_cast<traverse_wrap *> (T)->Loop (preVisit, *L);
- }
- static bool _visitBranch (bool preVisit, TIntermBranch *B, TIntermTraverser *T) {
- return static_cast<traverse_wrap *> (T)->Branch (preVisit, *B);
- }
-public:
- traverse_wrap () {
- visitSymbol = _visitSymbol;
- visitConstantUnion = _visitConstantUnion;
- visitBinary = _visitBinary;
- visitUnary = _visitUnary;
- visitSelection = _visitSelection;
- visitAggregate = _visitAggregate;
- visitLoop = _visitLoop;
- visitBranch = _visitBranch;
- }
-protected:
- virtual void Symbol (const TIntermSymbol &) {
- }
- virtual void ConstantUnion (const TIntermConstantUnion &) {
- }
- virtual bool Binary (bool, const TIntermBinary &) {
- return true;
- }
- virtual bool Unary (bool, const TIntermUnary &) {
- return true;
- }
- virtual bool Selection (bool, const TIntermSelection &) {
- return true;
- }
- virtual bool Aggregate (bool, const TIntermAggregate &) {
- return true;
- }
- virtual bool Loop (bool, const TIntermLoop &) {
- return true;
- }
- virtual bool Branch (bool, const TIntermBranch &) {
- return true;
- }
-};
-
-#endif
-
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.3
+ *
+ * Copyright (C) 2005 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file traverse_wrap.h
+ * Handy TIntermTraverser class wrapper
+ * \author Michal Krol
+ */
+
+#ifndef __TRAVERSE_WRAP_H__
+#define __TRAVERSE_WRAP_H__
+
+#include "Include/intermediate.h"
+
+/*
+ The original TIntermTraverser class that is used to walk the intermediate tree,
+ is not very elegant in its design. One must define static functions with
+ appropriate prototypes, construct TIntermTraverser object, and set its member
+ function pointers to one's static functions. If traversal-specific data
+ is needed, a new class must be derived, and one must up-cast the object
+ passed as a parameter to the static function.
+
+ The class below eliminates this burden by providing virtual methods that are
+ to be overridden in the derived class.
+*/
+
+class traverse_wrap: private TIntermTraverser
+{
+private:
+ static void _visitSymbol (TIntermSymbol *S, TIntermTraverser *T) {
+ static_cast<traverse_wrap *> (T)->Symbol (*S);
+ }
+ static void _visitConstantUnion (TIntermConstantUnion *U, TIntermTraverser *T) {
+ static_cast<traverse_wrap *> (T)->ConstantUnion (*U);
+ }
+ static bool _visitBinary (bool preVisit, TIntermBinary *B, TIntermTraverser *T) {
+ return static_cast<traverse_wrap *> (T)->Binary (preVisit, *B);
+ }
+ static bool _visitUnary (bool preVisit, TIntermUnary *U, TIntermTraverser *T) {
+ return static_cast<traverse_wrap *> (T)->Unary (preVisit, *U);
+ }
+ static bool _visitSelection (bool preVisit, TIntermSelection *S, TIntermTraverser *T) {
+ return static_cast<traverse_wrap *> (T)->Selection (preVisit, *S);
+ }
+ static bool _visitAggregate (bool preVisit, TIntermAggregate *A, TIntermTraverser *T) {
+ return static_cast<traverse_wrap *> (T)->Aggregate (preVisit, *A);
+ }
+ static bool _visitLoop (bool preVisit, TIntermLoop *L, TIntermTraverser *T) {
+ return static_cast<traverse_wrap *> (T)->Loop (preVisit, *L);
+ }
+ static bool _visitBranch (bool preVisit, TIntermBranch *B, TIntermTraverser *T) {
+ return static_cast<traverse_wrap *> (T)->Branch (preVisit, *B);
+ }
+public:
+ traverse_wrap () {
+ visitSymbol = _visitSymbol;
+ visitConstantUnion = _visitConstantUnion;
+ visitBinary = _visitBinary;
+ visitUnary = _visitUnary;
+ visitSelection = _visitSelection;
+ visitAggregate = _visitAggregate;
+ visitLoop = _visitLoop;
+ visitBranch = _visitBranch;
+ }
+protected:
+ virtual void Symbol (const TIntermSymbol &) {
+ }
+ virtual void ConstantUnion (const TIntermConstantUnion &) {
+ }
+ virtual bool Binary (bool, const TIntermBinary &) {
+ return true;
+ }
+ virtual bool Unary (bool, const TIntermUnary &) {
+ return true;
+ }
+ virtual bool Selection (bool, const TIntermSelection &) {
+ return true;
+ }
+ virtual bool Aggregate (bool, const TIntermAggregate &) {
+ return true;
+ }
+ virtual bool Loop (bool, const TIntermLoop &) {
+ return true;
+ }
+ virtual bool Branch (bool, const TIntermBranch &) {
+ return true;
+ }
+};
+
+#endif
+