tgsi/ureg: make the dst register match the src indirection
[mesa.git] / src / gallium / auxiliary / draw / draw_pt.c
index 853bd6716e635e4c90d8e280921a1e7892b2fefd..602d076dce29e671c09724997fbf7a791aadc767 100644 (file)
@@ -34,6 +34,7 @@
 #include "draw/draw_gs.h"
 #include "draw/draw_private.h"
 #include "draw/draw_pt.h"
+#include "draw/draw_vbuf.h"
 #include "draw/draw_vs.h"
 #include "tgsi/tgsi_dump.h"
 #include "util/u_math.h"
@@ -545,6 +546,11 @@ draw_vbo(struct draw_context *draw,
       return;
    }
 
+   /* If we're collecting stats then make sure we start from scratch */
+   if (draw->collect_statistics) {
+      memset(&draw->statistics, 0, sizeof(draw->statistics));
+   }
+
    draw->pt.max_index = index_limit - 1;
 
    /*
@@ -555,6 +561,8 @@ draw_vbo(struct draw_context *draw,
    for (instance = 0; instance < info->instance_count; instance++) {
       draw->instance_id = instance + info->start_instance;
 
+      draw_new_instance(draw);
+
       if (info->primitive_restart) {
          draw_pt_arrays_restart(draw, info);
       }
@@ -562,4 +570,9 @@ draw_vbo(struct draw_context *draw,
          draw_pt_arrays(draw, info->mode, info->start, count);
       }
    }
+
+   /* If requested emit the pipeline statistics for this run */
+   if (draw->collect_statistics) {
+      draw->render->pipeline_statistics(draw->render, &draw->statistics);
+   }
 }