diff options
author | Brian Paul <brianp@vmware.com> | 2014-04-09 11:35:54 -0600 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2014-04-14 15:05:35 -0700 |
commit | 45fd1d336a4fb156cb7a31f9f48bc844a9b338b1 (patch) | |
tree | 9d58a268ac6ded143b135344f96b40c48eb65d91 | |
parent | cbaaf8fe42dce5ec39d77db3334b672dc745fa9c (diff) |
svga: move LIST_INITHEAD(dirty_buffers) earlier in svga_context_create()
Fixes a crash in svga_context_flush_buffers() if we use the 'draw' module
for AA lines (when the device doesn't support that feature). We need to
initialize this list before we setup the swtnl pieces.
Found/fixed by Charmaine Lee.
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
(cherry picked from commit e853ade5441e8bf8f862ecf379c231cb439c5c00)
Conflicts:
src/gallium/drivers/svga/svga_context.c
-rw-r--r-- | src/gallium/drivers/svga/svga_context.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_context.c b/src/gallium/drivers/svga/svga_context.c index 83afe796f4b..8a866af075c 100644 --- a/src/gallium/drivers/svga/svga_context.c +++ b/src/gallium/drivers/svga/svga_context.c @@ -90,6 +90,8 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen, if (svga == NULL) goto no_svga; + LIST_INITHEAD(&svga->dirty_buffers); + svga->pipe.screen = screen; svga->pipe.priv = priv; svga->pipe.destroy = svga_destroy; @@ -155,8 +157,6 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen, svga->dirty = ~0; - LIST_INITHEAD(&svga->dirty_buffers); - return &svga->pipe; no_state: |