summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-04-09 19:04:45 -0600
committerBrian <brian@yutani.localnet.net>2007-04-09 19:07:22 -0600
commit7b2626f7d8ed3a336575a7caeb4166434293e535 (patch)
tree20aca6effdaf39a55e4cdeedb397affd7280c832 /src/mesa/shader/slang
parent19121e2802ced7b4ddb64394bfb03655c3bf03dd (diff)
plug in GLSL 1.20 unit
Diffstat (limited to 'src/mesa/shader/slang')
-rw-r--r--src/mesa/shader/slang/slang_compile.c19
-rw-r--r--src/mesa/shader/slang/slang_compile.h7
2 files changed, 22 insertions, 4 deletions
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index 65522ae251..3539d712e2 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -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 */
diff --git a/src/mesa/shader/slang/slang_compile.h b/src/mesa/shader/slang/slang_compile.h
index 086e2d8dc4..0f1f820d2e 100644
--- a/src/mesa/shader/slang/slang_compile.h
+++ b/src/mesa/shader/slang/slang_compile.h
@@ -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_
{