diff options
author | Sam Hocevar <[email protected]> | 2008-09-25 14:56:41 +0200 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-09-25 09:53:09 -0600 |
commit | 7be5411ce69f0f6be1f31079b9fbdea4967358a0 (patch) | |
tree | b733e98ee456bd02143bd0ddd9cb98bd28d7bf3c | |
parent | 561787e69759ed757edb897c027d2d94beac8d11 (diff) |
mesa: prevent the slang code generator from aborting when faced with a sampler variable redeclaration.
-rw-r--r-- | src/mesa/shader/slang/slang_codegen.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 7006e86958d..72a3c0ef9ea 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2439,7 +2439,11 @@ _slang_gen_var_decl(slang_assemble_ctx *A, slang_variable *var) /*assert(!var->declared);*/ var->declared = GL_TRUE; - assert(!is_sampler_type(&var->type)); + if(is_sampler_type(&var->type)) { + slang_info_log_error(A->log, "redeclaration of sampler '%s'", + (char*) var->a_name); + return NULL; + } n = new_node0(IR_VAR_DECL); if (n) { |