summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-07-26 15:55:26 -0600
committerBrian Paul <[email protected]>2012-07-26 16:00:31 -0600
commitf37f1a72095653d4806280e5ef74373781c55184 (patch)
tree19bfb3472224084b1d23abf2673e8af42ef0dfdf /src/gallium/drivers/svga
parentdafa77201f116dc53b18a274fb41eef5bb2bd0e3 (diff)
svga: initialize svga_compile_key to zeros to be safe
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r--src/gallium/drivers/svga/svga_tgsi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi.c b/src/gallium/drivers/svga/svga_tgsi.c
index f4ddefbec27..8bea7f88dca 100644
--- a/src/gallium/drivers/svga/svga_tgsi.c
+++ b/src/gallium/drivers/svga/svga_tgsi.c
@@ -348,6 +348,8 @@ svga_translate_fragment_program( const struct svga_fragment_shader *fs,
{
struct svga_compile_key key;
+ memset(&key, 0, sizeof(key));
+
memcpy(&key.fkey, fkey, sizeof *fkey);
memcpy(key.generic_remap_table, fs->generic_remap_table,
@@ -364,6 +366,8 @@ svga_translate_vertex_program( const struct svga_vertex_shader *vs,
{
struct svga_compile_key key;
+ memset(&key, 0, sizeof(key));
+
memcpy(&key.vkey, vkey, sizeof *vkey);
/* Note: we could alternately store the remap table in the vkey but