diff options
author | marha <marha@users.sourceforge.net> | 2010-07-28 18:31:42 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-07-28 18:31:42 +0000 |
commit | 0c0b98ae72397aeed280ffc146b16eb13065f332 (patch) | |
tree | 4a34d9ba1cc396e912aa5b473bc0a5bba968d656 /mesalib/src/mesa/shader/slang | |
parent | ddf3c86d1414ac4d95e352b195ac30188f024429 (diff) | |
parent | 022d9c6cf6a67385d84ff33ce095f5c7f9f6d0cc (diff) | |
download | vcxsrv-0c0b98ae72397aeed280ffc146b16eb13065f332.tar.gz vcxsrv-0c0b98ae72397aeed280ffc146b16eb13065f332.tar.bz2 vcxsrv-0c0b98ae72397aeed280ffc146b16eb13065f332.zip |
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/shader/slang')
-rw-r--r-- | mesalib/src/mesa/shader/slang/slang_codegen.c | 3 | ||||
-rw-r--r-- | mesalib/src/mesa/shader/slang/slang_compile_variable.h | 2 | ||||
-rw-r--r-- | mesalib/src/mesa/shader/slang/slang_link.c | 5 |
3 files changed, 6 insertions, 4 deletions
diff --git a/mesalib/src/mesa/shader/slang/slang_codegen.c b/mesalib/src/mesa/shader/slang/slang_codegen.c index ecb2f6d5c..7d5e5eb29 100644 --- a/mesalib/src/mesa/shader/slang/slang_codegen.c +++ b/mesalib/src/mesa/shader/slang/slang_codegen.c @@ -4187,11 +4187,10 @@ _slang_gen_variable(slang_assemble_ctx * A, slang_operation *oper) slang_atom name = oper->var ? oper->var->a_name : oper->a_id; slang_variable *var = _slang_variable_locate(oper->locals, name, GL_TRUE); slang_ir_node *n; - if (!var) { + if (!var || !var->declared) { slang_info_log_error(A->log, "undefined variable '%s'", (char *) name); return NULL; } - assert(var->declared); n = new_var(A, var); return n; } diff --git a/mesalib/src/mesa/shader/slang/slang_compile_variable.h b/mesalib/src/mesa/shader/slang/slang_compile_variable.h index b4585599f..5c9d248b3 100644 --- a/mesalib/src/mesa/shader/slang/slang_compile_variable.h +++ b/mesalib/src/mesa/shader/slang/slang_compile_variable.h @@ -41,7 +41,7 @@ typedef struct slang_variable_ GLuint size; /**< Variable's size in bytes */ GLboolean is_global; GLboolean isTemp; /**< a named temporary (__resultTmp) */ - GLboolean declared; /**< for debug */ + GLboolean declared; /**< has the var been declared? */ struct slang_ir_storage_ *store; /**< Storage for this var */ } slang_variable; diff --git a/mesalib/src/mesa/shader/slang/slang_link.c b/mesalib/src/mesa/shader/slang/slang_link.c index 7c7bfbdbc..e8dca0142 100644 --- a/mesalib/src/mesa/shader/slang/slang_link.c +++ b/mesalib/src/mesa/shader/slang/slang_link.c @@ -921,7 +921,10 @@ _slang_link(GLcontext *ctx, if (!vertNotify || !fragNotify) { /* driver rejected one/both of the vertex/fragment programs */ - link_error(shProg, "Vertex and/or fragment program rejected by driver\n"); + if (!shProg->InfoLog) { + link_error(shProg, + "Vertex and/or fragment program rejected by driver\n"); + } } else { shProg->LinkStatus = (shProg->VertexProgram || shProg->FragmentProgram); |