summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2014-04-09 11:35:54 -0600
committerCarl Worth <cworth@cworth.org>2014-04-14 11:48:53 -0700
commitc5612ba549507d239d00335cd0961d7a269b5a85 (patch)
treeab8b8043d4f8473405ebd6792bb2eac198552de5
parente52117cefb367aa1caa9159c1a28abeafb3b0f2c (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.c4
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 4da9a6551f6..0ffff9c506b 100644
--- a/src/gallium/drivers/svga/svga_context.c
+++ b/src/gallium/drivers/svga/svga_context.c
@@ -92,6 +92,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;
@@ -154,8 +156,6 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen,
svga->dirty = ~0;
- LIST_INITHEAD(&svga->dirty_buffers);
-
return &svga->pipe;
no_state: