diff options
Diffstat (limited to 'src/mesa/shader/slang/slang_codegen.c')
-rw-r--r-- | src/mesa/shader/slang/slang_codegen.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index de7e96f1674..d8a92e23c00 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2439,12 +2439,6 @@ _slang_gen_var_decl(slang_assemble_ctx *A, slang_variable *var) /*assert(!var->declared);*/ var->declared = GL_TRUE; - 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) { _slang_attach_storage(n, var); @@ -2453,7 +2447,13 @@ _slang_gen_var_decl(slang_assemble_ctx *A, slang_variable *var) assert(n->Store); assert(n->Store->Index < 0); - n->Store->File = PROGRAM_TEMPORARY; + if (is_sampler_type(&var->type)) { + n->Store->File = PROGRAM_SAMPLER; + } + else { + n->Store->File = PROGRAM_TEMPORARY; + } + n->Store->Size = _slang_sizeof_type_specifier(&n->Var->type.specifier); if (n->Store->Size <= 0) { |