From: Brian Paul Date: Wed, 30 Apr 2008 00:34:14 +0000 (-0600) Subject: gallium: init hw_key with memset() to silence valgrind warnings X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=42fb48492e71016c5a2888cd3d2507a89dbd91f3;p=mesa.git gallium: init hw_key with memset() to silence valgrind warnings We shouldn't be hashing with keys that have uninitialized memory. --- diff --git a/src/gallium/auxiliary/draw/draw_pt_emit.c b/src/gallium/auxiliary/draw/draw_pt_emit.c index 35707af8a89..f9ac16786ef 100644 --- a/src/gallium/auxiliary/draw/draw_pt_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_emit.c @@ -58,6 +58,8 @@ void draw_pt_emit_prepare( struct pt_emit *emit, return; } + memset(&hw_key, 0, sizeof(hw_key)); + /* Must do this after set_primitive() above: */ vinfo = draw->render->get_vertex_info(draw->render);