From: Marek Olšák Date: Wed, 12 Feb 2020 20:32:50 +0000 (-0500) Subject: mesa: don't use memset in glDrawArrays X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a6d31589097ef3fb99477809da7f6d571b85629e;p=mesa.git mesa: don't use memset in glDrawArrays Reviewed-by: Mathias Fröhlich Part-of: --- diff --git a/src/mesa/main/draw.c b/src/mesa/main/draw.c index 9f314dadebe..2062f99dc0e 100644 --- a/src/mesa/main/draw.c +++ b/src/mesa/main/draw.c @@ -360,7 +360,6 @@ _mesa_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start, /* OpenGL 4.5 says that primitive restart is ignored with non-indexed * draws. */ - memset(&prim, 0, sizeof(prim)); prim.begin = 1; prim.end = 1; prim.mode = mode; @@ -369,6 +368,7 @@ _mesa_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start, prim.draw_id = drawID; prim.start = start; prim.count = count; + prim.basevertex = 0; ctx->Driver.Draw(ctx, &prim, 1, NULL, GL_TRUE, start, start + count - 1, NULL, 0, NULL);