gallium: init hw_key with memset() to silence valgrind warnings
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 30 Apr 2008 00:34:14 +0000 (18:34 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 30 Apr 2008 00:35:30 +0000 (18:35 -0600)
We shouldn't be hashing with keys that have uninitialized memory.

src/gallium/auxiliary/draw/draw_pt_emit.c

index 35707af..f9ac167 100644 (file)
@@ -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);