draw: use common exit path in pipeline finish.
authorDave Airlie <airlied@redhat.com>
Fri, 19 Jun 2020 05:22:18 +0000 (15:22 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 7 Jul 2020 20:06:05 +0000 (06:06 +1000)
I need to add a missing free here, and it seems pointless duplication

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5555>

src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c

index d9a5862e4428ca1012f7bfa03c3cf4903bbdc5ac..f2534709832a0b60526d1e7716dcf8050097572c 100644 (file)
@@ -728,13 +728,7 @@ llvm_pipeline_generic(struct draw_pt_middle_end *middle,
 
    if (prim_info->count == 0) {
       debug_printf("GS/IA didn't emit any vertices!\n");
-
-      FREE(vert_info->verts);
-      if (free_prim_info) {
-         FREE(tes_elts_out);
-         FREE(prim_info->primitive_lengths);
-      }
-      return;
+      goto out;
    }
 
    draw_stats_clipper_primitives(draw, prim_info);
@@ -762,6 +756,7 @@ llvm_pipeline_generic(struct draw_pt_middle_end *middle,
          emit( fpme->emit, vert_info, prim_info );
       }
    }
+out:
    FREE(vert_info->verts);
    if (free_prim_info) {
       FREE(tes_elts_out);