mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
mesa: prevent the slang code generator from aborting when faced with a sampler variable redeclaration.
This commit is contained in:
parent
561787e697
commit
7be5411ce6
1 changed files with 5 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue