aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2020-06-19 16:17:48 +1000
committerDave Airlie <[email protected]>2020-07-08 06:06:05 +1000
commit87a388fb29c35af9ecab9fa6eb98c7ee25306ec0 (patch)
treed5eaf821d91d921b8848a8e4b37c333a70aa6a4e /src/gallium/auxiliary
parent903b5814b5c22680b9a3a74af885aa3ca99fa302 (diff)
draw/gs: only allocate memory for streams needed.
This just allocates the sizeing for streams that are needed. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5555>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/draw/draw_gs.c4
1 files 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;