From 1e1ba54a94d4c0a0685c430bffad49d47cec15ca Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 1 Nov 2008 15:53:14 -0600 Subject: mesa: fix assignment / parameter passing of sampler types --- src/mesa/shader/slang/slang_codegen.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/mesa/shader/slang/slang_codegen.c') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index de7e96f167..d8a92e23c0 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) { -- cgit v1.2.3