diff options
author | Brian Paul <[email protected]> | 2014-04-09 11:35:54 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2014-04-09 12:02:03 -0600 |
commit | e853ade5441e8bf8f862ecf379c231cb439c5c00 (patch) | |
tree | 2bf7e0cdf4b17c91258f905f756cccf4359eb01f /src | |
parent | 26ae030fcc364a4cfcdec0cbac2ca87d096c6cd0 (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" <[email protected]>
Reviewed-by: Thomas Hellstrom <[email protected]>
Reviewed-by: Jakob Bornecrantz <[email protected]>
Diffstat (limited to 'src')
-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 0ba09ce2ebc..8389384307d 100644 --- a/src/gallium/drivers/svga/svga_context.c +++ b/src/gallium/drivers/svga/svga_context.c @@ -123,6 +123,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; @@ -185,8 +187,6 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen, svga->dirty = ~0; - LIST_INITHEAD(&svga->dirty_buffers); - check_for_workarounds(svga); return &svga->pipe; |