From: Dave Airlie Date: Fri, 19 Jun 2020 05:24:59 +0000 (+1000) Subject: draw: free vertex info from geometry streams. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=72ed9e7046d437943cf2c8ac8f04147f88125cd1;p=mesa.git draw: free vertex info from geometry streams. This info needs to be freed for the non-0 stream. Reviewed-by: Roland Scheidegger Part-of: --- diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c index f2534709832..e198f8f92d8 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c @@ -582,6 +582,7 @@ llvm_pipeline_generic(struct draw_pt_middle_end *middle, const unsigned *elts; ushort *tes_elts_out = NULL; + memset(&gs_vert_info, 0, sizeof(struct draw_vertex_info) * TGSI_MAX_VERTEX_STREAMS); assert(fetch_info->count > 0); llvm_vert_info.count = fetch_info->count; llvm_vert_info.vertex_size = fpme->vertex_size; @@ -758,6 +759,10 @@ llvm_pipeline_generic(struct draw_pt_middle_end *middle, } out: FREE(vert_info->verts); + if (gshader && gshader->num_vertex_streams > 1) + for (unsigned i = 1; i < gshader->num_vertex_streams; i++) + FREE(gs_vert_info[i].verts); + if (free_prim_info) { FREE(tes_elts_out); FREE(prim_info->primitive_lengths);