diff options
author | Brian Paul <[email protected]> | 2008-11-01 15:53:14 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-11-01 16:05:40 -0600 |
commit | 1e1ba54a94d4c0a0685c430bffad49d47cec15ca (patch) | |
tree | 7f91a6078f17632404b3647579c264179cfd5028 /src/mesa/shader/slang/slang_emit.c | |
parent | 131d42573ce1fc120c8ef75634979b6206e1eb0a (diff) |
mesa: fix assignment / parameter passing of sampler types
Diffstat (limited to 'src/mesa/shader/slang/slang_emit.c')
-rw-r--r-- | src/mesa/shader/slang/slang_emit.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 9e8daa10517..010b55827f6 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -1085,6 +1085,14 @@ emit_copy(slang_emit_info *emitInfo, slang_ir_node *n) n->Store = n->Children[0]->Store; + if (n->Store->File == PROGRAM_SAMPLER) { + /* no code generated for sampler assignments, + * just copy the sampler index at compile time. + */ + n->Store->Index = n->Children[1]->Store->Index; + return NULL; + } + #if PEEPHOLE_OPTIMIZATIONS if (inst && _slang_is_temp(emitInfo->vt, n->Children[1]->Store) && |