From: Sam Hocevar Date: Thu, 25 Sep 2008 12:56:41 +0000 (+0200) Subject: mesa: prevent the slang code generator from aborting when faced with a sampler variab... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7be5411ce69f0f6be1f31079b9fbdea4967358a0;p=mesa.git mesa: prevent the slang code generator from aborting when faced with a sampler variable redeclaration. --- 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) {