aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2020-06-19 15:24:59 +1000
committerDave Airlie <[email protected]>2020-07-08 06:06:05 +1000
commit72ed9e7046d437943cf2c8ac8f04147f88125cd1 (patch)
tree720f2548850587139206d1bb65fa81b19df7f1db
parentb4802d6ea13bf547b6e5f9fd0e4059965bf2794a (diff)
draw: free vertex info from geometry streams.
This info needs to be freed for the non-0 stream. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5555>
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c5
1 files changed, 5 insertions, 0 deletions
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);