summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-04-29 18:34:14 -0600
committerBrian Paul <[email protected]>2008-04-29 18:35:30 -0600
commit42fb48492e71016c5a2888cd3d2507a89dbd91f3 (patch)
treebe2762782d473e7c6cfedd3f21af0b2cd4bac8f8
parentd0b2561c57763db196b45ab052a01a12fc37b06f (diff)
gallium: init hw_key with memset() to silence valgrind warnings
We shouldn't be hashing with keys that have uninitialized memory.
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_emit.c2
1 files changed, 2 insertions, 0 deletions
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);