glsl: Put `sample`-qualified varyings in their own packing classes
[mesa.git] / src / glsl / loop_controls.cpp
index 26481930db7eb5d44ce84805d5a8caeae56e2344..0eb103f49b86bcd4af55d1f0105b88cb8dfa135c 100644 (file)
@@ -254,7 +254,7 @@ loop_control_visitor::visit_leave(ir_loop *ir)
                     ir->from = init->clone(ir, NULL);
                     ir->to = limit->clone(ir, NULL);
                     ir->increment = lv->increment->clone(ir, NULL);
-                    ir->counter = lv->var;
+                    ir->counter = lv->var->clone(ir, NULL);
                     ir->cmp = cmp;
 
                     max_iterations = iterations;