radeonsi: stop using v16i8
[mesa.git] / src / gallium / auxiliary / draw / draw_pt_vsplit_tmp.h
index 0afabb013984c944f0c92533ef7f769f087d7faa..be353c418d8851d5d4f92eae8743280f83618f4a 100644 (file)
@@ -49,9 +49,8 @@ CONCAT(vsplit_primitive_, ELT_TYPE)(struct vsplit_frontend *vsplit,
 
    /* If the index buffer overflows we'll need to run
     * through the normal paths */
-   if (start >= draw->pt.user.eltMax ||
-       end > draw->pt.user.eltMax ||
-       end < istart || end < icount)
+   if (end >= draw->pt.user.eltMax ||
+       end < istart)
       return FALSE;
 
    /* use the ib directly */
@@ -157,7 +156,7 @@ CONCAT(vsplit_segment_cache_, ELT_TYPE)(struct vsplit_frontend *vsplit,
       if (close)
          ADD_CACHE(vsplit, ib, 0, iclose, 0);
    }
-   else if (ibias > 0) {
+   else {
       if (spoken)
          ADD_CACHE(vsplit, ib, 0, ispoken, ibias);
 
@@ -167,19 +166,6 @@ CONCAT(vsplit_segment_cache_, ELT_TYPE)(struct vsplit_frontend *vsplit,
       if (close)
          ADD_CACHE(vsplit, ib, 0, iclose, ibias);
    }
-   else {
-      if (spoken) {
-         ADD_CACHE(vsplit, ib, 0, ispoken, ibias);
-      }
-
-      for (i = spoken; i < icount; i++) {
-         ADD_CACHE(vsplit, ib, istart, i, ibias);
-      }
-
-      if (close) {
-         ADD_CACHE(vsplit, ib, 0, iclose, ibias);
-      }
-   }
 
    vsplit_flush_cache(vsplit, flags);
 }
@@ -249,6 +235,9 @@ vsplit_segment_loop_linear(struct vsplit_frontend *vsplit, unsigned flags,
 
    assert(icount + !!close_loop <= vsplit->segment_size);
 
+   /* need to draw the sections of the line loop as line strips */
+   flags |= DRAW_LINE_LOOP_AS_STRIP;
+
    if (close_loop) {
       for (nr = 0; nr < icount; nr++)
          vsplit->fetch_elts[nr] = istart + nr;