From 87a388fb29c35af9ecab9fa6eb98c7ee25306ec0 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 19 Jun 2020 16:17:48 +1000 Subject: [PATCH] draw/gs: only allocate memory for streams needed. This just allocates the sizeing for streams that are needed. Reviewed-by: Roland Scheidegger Part-of: --- src/gallium/auxiliary/draw/draw_gs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c index b87e5d35f80..f701e82b056 100644 --- a/src/gallium/auxiliary/draw/draw_gs.c +++ b/src/gallium/auxiliary/draw/draw_gs.c @@ -879,8 +879,8 @@ draw_create_geometry_shader(struct draw_context *draw, memset(gs->gs_input, 0, sizeof(struct draw_gs_inputs)); gs->llvm_prim_lengths = 0; - gs->llvm_emitted_primitives = align_malloc(vector_size * PIPE_MAX_VERTEX_STREAMS, vector_size); - gs->llvm_emitted_vertices = align_malloc(vector_size * PIPE_MAX_VERTEX_STREAMS, vector_size); + gs->llvm_emitted_primitives = align_malloc(vector_size * gs->num_vertex_streams, vector_size); + gs->llvm_emitted_vertices = align_malloc(vector_size * gs->num_vertex_streams, vector_size); gs->llvm_prim_ids = align_calloc(vector_size, vector_size); gs->fetch_outputs = llvm_fetch_gs_outputs; -- 2.30.2