summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_emit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/slang/slang_emit.c')
-rw-r--r--src/mesa/shader/slang/slang_emit.c8
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) &&