mesa: Branch 'master' - 3 commits
Brian Paul
brianp at kemper.freedesktop.org
Tue Apr 10 01:07:22 UTC 2007
src/mesa/shader/slang/slang_codegen.c | 2 +-
src/mesa/shader/slang/slang_compile.c | 19 ++++++++++++++++++-
src/mesa/shader/slang/slang_compile.h | 7 ++++---
src/mesa/shader/slang/slang_emit.c | 2 +-
4 files changed, 24 insertions(+), 6 deletions(-)
New commits:
diff-tree 0109b4710615d55155b4ef85a599a86769dc0325 (from 7b2626f7d8ed3a336575a7caeb4166434293e535)
Author: Brian <brian at yutani.localnet.net>
Date: Mon Apr 9 19:07:13 2007 -0600
NULL ptr check
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index a25037c..ee82a10 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -1348,7 +1348,7 @@ _slang_gen_function_call_name(slang_asse
* Try adapting the parameters.
*/
fun = _slang_first_function(A->space.funcs, name);
- if (!_slang_adapt_call(oper, fun, &A->space, A->atoms, A->log)) {
+ if (!fun || !_slang_adapt_call(oper, fun, &A->space, A->atoms, A->log)) {
slang_info_log_error(A->log, "Function '%s' not found (check argument types)", name);
return NULL;
}
diff-tree 7b2626f7d8ed3a336575a7caeb4166434293e535 (from 19121e2802ced7b4ddb64394bfb03655c3bf03dd)
Author: Brian <brian at yutani.localnet.net>
Date: Mon Apr 9 19:04:45 2007 -0600
plug in GLSL 1.20 unit
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index 65522ae..3539d71 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
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 086e2d8..0f1f820 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_
{
diff-tree 19121e2802ced7b4ddb64394bfb03655c3bf03dd (from e0bbf463428ac51f3ba022b23d93d47b1cfd152d)
Author: Brian <brian at yutani.localnet.net>
Date: Mon Apr 9 18:36:55 2007 -0600
undo a debug/test change
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index 088deaa..0fd99b8 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -1793,7 +1793,7 @@ _slang_emit_code(slang_ir_node *n, slang
emitInfo.Subroutines = NULL;
emitInfo.NumSubroutines = 0;
- emitInfo.EmitHighLevelInstructions = 0*ctx->Shader.EmitHighLevelInstructions;
+ emitInfo.EmitHighLevelInstructions = ctx->Shader.EmitHighLevelInstructions;
emitInfo.EmitCondCodes = ctx->Shader.EmitCondCodes;
emitInfo.EmitComments = ctx->Shader.EmitComments;
emitInfo.EmitBeginEndSub = GL_TRUE;
More information about the mesa-commit
mailing list