diff options
author | José Fonseca <jfonseca@vmware.com> | 2012-10-26 15:04:46 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2012-10-26 16:02:59 +0100 |
commit | 91332e455a530b86f897874919da29efa563fdf3 (patch) | |
tree | 26eea0cc28b2397e93a6951534f97c46d177f04a /src/gallium/targets | |
parent | 2532f0d063d8326c1ba6fdb3394bb355326c4190 (diff) | |
download | external_mesa3d-91332e455a530b86f897874919da29efa563fdf3.zip external_mesa3d-91332e455a530b86f897874919da29efa563fdf3.tar.gz external_mesa3d-91332e455a530b86f897874919da29efa563fdf3.tar.bz2 |
graw: Ensure new members are zeroed.
Several new state members were added, and they were not being zeroed,
causing random crashes.
Diffstat (limited to 'src/gallium/targets')
-rw-r--r-- | src/gallium/targets/graw-null/graw_util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/targets/graw-null/graw_util.c b/src/gallium/targets/graw-null/graw_util.c index 09cba89..07693e8 100644 --- a/src/gallium/targets/graw-null/graw_util.c +++ b/src/gallium/targets/graw-null/graw_util.c @@ -21,6 +21,7 @@ graw_parse_geometry_shader(struct pipe_context *pipe, if (!tgsi_text_translate(text, tokens, Elements(tokens))) return NULL; + memset(&state, 0, sizeof state); state.tokens = tokens; return pipe->create_gs_state(pipe, &state); } @@ -35,6 +36,7 @@ graw_parse_vertex_shader(struct pipe_context *pipe, if (!tgsi_text_translate(text, tokens, Elements(tokens))) return NULL; + memset(&state, 0, sizeof state); state.tokens = tokens; return pipe->create_vs_state(pipe, &state); } @@ -49,6 +51,7 @@ graw_parse_fragment_shader(struct pipe_context *pipe, if (!tgsi_text_translate(text, tokens, Elements(tokens))) return NULL; + memset(&state, 0, sizeof state); state.tokens = tokens; return pipe->create_fs_state(pipe, &state); } |