projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
561787e
)
mesa: prevent the slang code generator from aborting when faced with a sampler variab...
author
Sam Hocevar
<sam@zoy.org>
Thu, 25 Sep 2008 12:56:41 +0000
(14:56 +0200)
committer
Brian Paul
<brian.paul@tungstengraphics.com>
Thu, 25 Sep 2008 15:53:09 +0000
(09:53 -0600)
src/mesa/shader/slang/slang_codegen.c
patch
|
blob
|
history
diff --git
a/src/mesa/shader/slang/slang_codegen.c
b/src/mesa/shader/slang/slang_codegen.c
index
7006e86
..
72a3c0e
100644
(file)
--- 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) {