diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-11-01 15:53:14 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-11-01 16:05:40 -0600 |
commit | 1e1ba54a94d4c0a0685c430bffad49d47cec15ca (patch) | |
tree | 7f91a6078f17632404b3647579c264179cfd5028 /src/mesa/shader/slang/slang_vartable.c | |
parent | 131d42573ce1fc120c8ef75634979b6206e1eb0a (diff) |
mesa: fix assignment / parameter passing of sampler types
Diffstat (limited to 'src/mesa/shader/slang/slang_vartable.c')
-rw-r--r-- | src/mesa/shader/slang/slang_vartable.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_vartable.c b/src/mesa/shader/slang/slang_vartable.c index 9b607e6403..95971a70a9 100644 --- a/src/mesa/shader/slang/slang_vartable.c +++ b/src/mesa/shader/slang/slang_vartable.c @@ -115,6 +115,11 @@ _slang_pop_var_table(slang_var_table *vt) store->Index, _mesa_swizzle_string(store->Swizzle, 0, 0)); + if (store->File == PROGRAM_SAMPLER) { + /* samplers have no storage */ + continue; + } + if (store->Size == 1) comp = GET_SWZ(store->Swizzle, 0); else @@ -241,7 +246,15 @@ GLboolean _slang_alloc_var(slang_var_table *vt, slang_ir_storage *store) { struct table *t = vt->Top; - const int i = alloc_reg(vt, store->Size, GL_FALSE); + int i; + + if (store->File == PROGRAM_SAMPLER) { + /* don't really allocate storage */ + store->Index = 0; + return GL_TRUE; + } + + i = alloc_reg(vt, store->Size, GL_FALSE); if (i < 0) return GL_FALSE; |