gallivm/draw: calloc prim id toavoid undef

Otherwise masked off channels can access random bad memory

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4560>
This commit is contained in:
Dave Airlie
2020-04-08 15:43:47 +10:00
parent e20b3b3720
commit ccc6a48ec5
+1 -1
View File
@@ -880,7 +880,7 @@ draw_create_geometry_shader(struct draw_context *draw,
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_prim_ids = align_malloc(vector_size, vector_size);
gs->llvm_prim_ids = align_calloc(vector_size, vector_size);
gs->fetch_outputs = llvm_fetch_gs_outputs;
gs->fetch_inputs = llvm_fetch_gs_input;