From: Roland Scheidegger Date: Tue, 9 Mar 2010 19:31:40 +0000 (+0100) Subject: mesa/st: initialize velements state properly X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a673dee4553b6f1649d4cc31f7f7849058411c49;p=mesa.git mesa/st: initialize velements state properly one variable is a bitfield where the rest is never written to, which caused valgrind to complain. Might have caused cso to not recognize an already stored state. Reported by Christoph Bumiller. --- diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 4d2e39108d5..8a6e1ed4662 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -563,6 +563,7 @@ st_draw_vbo(GLcontext *ctx, (void) check_uniforms; #endif + memset(velements, 0, sizeof(struct pipe_vertex_element) * vpv->num_inputs); /* * Setup the vbuffer[] and velements[] arrays. */