plug in GLSL 1.20 unit
authorBrian <brian@yutani.localnet.net>
Tue, 10 Apr 2007 01:04:45 +0000 (19:04 -0600)
committerBrian <brian@yutani.localnet.net>
Tue, 10 Apr 2007 01:07:22 +0000 (19:07 -0600)
src/mesa/shader/slang/slang_compile.c
src/mesa/shader/slang/slang_compile.h

index 65522ae251ef671576e092c4a4e2d101c4622871..3539d712e2c153d4def9cc275d160ae0e4de9297 100644 (file)
@@ -1967,6 +1967,10 @@ static const byte slang_core_gc[] = {
 #include "library/slang_core_gc.h"
 };
 
+static const byte slang_120_core_gc[] = {
+#include "library/slang_120_core_gc.h"
+};
+
 static const byte slang_common_builtin_gc[] = {
 #include "library/slang_common_builtin_gc.h"
 };
@@ -2016,11 +2020,24 @@ compile_object(grammar * id, const char *source, slang_code_object * object,
                           NULL, NULL, NULL))
          return GL_FALSE;
 
+#if FEATURE_ARB_shading_language_120
+      if (!compile_binary(slang_120_core_gc,
+                          &object->builtin[SLANG_BUILTIN_120_CORE],
+                          SLANG_UNIT_FRAGMENT_BUILTIN, infolog,
+                          NULL, &object->builtin[SLANG_BUILTIN_CORE], NULL))
+         return GL_FALSE;
+#endif
+
       /* compile common functions and variables, link to core */
       if (!compile_binary(slang_common_builtin_gc,
                           &object->builtin[SLANG_BUILTIN_COMMON],
                           SLANG_UNIT_FRAGMENT_BUILTIN, infolog, NULL,
-                          &object->builtin[SLANG_BUILTIN_CORE], NULL))
+#if FEATURE_ARB_shading_language_120
+                          &object->builtin[SLANG_BUILTIN_120_CORE],
+#else
+                          &object->builtin[SLANG_BUILTIN_CORE],
+#endif
+                          NULL))
          return GL_FALSE;
 
       /* compile target-specific functions and variables, link to common */
index 086e2d8dc4d386bff26751ee9c388f2e8c1547aa..0f1f820d2e065c4f4b1bd5022687160773e7dde0 100644 (file)
@@ -69,10 +69,11 @@ extern GLvoid
 _slang_code_unit_dtr (slang_code_unit *);
 
 #define SLANG_BUILTIN_CORE   0
-#define SLANG_BUILTIN_COMMON 1
-#define SLANG_BUILTIN_TARGET 2
+#define SLANG_BUILTIN_120_CORE   1
+#define SLANG_BUILTIN_COMMON 2
+#define SLANG_BUILTIN_TARGET 3
 
-#define SLANG_BUILTIN_TOTAL  3
+#define SLANG_BUILTIN_TOTAL  4
 
 typedef struct slang_code_object_
 {