From bcc45a202496fba9686f953011039c09e36bf3ae Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Sat, 17 Jan 2009 17:12:30 +0000 Subject: xlib: don't explicitly create the pipe_winsys struct --- src/gallium/winsys/xlib/xlib_softpipe.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/gallium/winsys/xlib/xlib_softpipe.c') diff --git a/src/gallium/winsys/xlib/xlib_softpipe.c b/src/gallium/winsys/xlib/xlib_softpipe.c index 775e345c2b..e8513069fe 100644 --- a/src/gallium/winsys/xlib/xlib_softpipe.c +++ b/src/gallium/winsys/xlib/xlib_softpipe.c @@ -232,7 +232,6 @@ xlib_softpipe_display_surface(struct xmesa_buffer *b, struct xm_buffer *xm_buf = xm_buffer(surf->buffer); static boolean no_swap = 0; static boolean firsttime = 1; - static int tileSize = 0; if (firsttime) { no_swap = getenv("SP_NO_RAST") != NULL; @@ -482,17 +481,25 @@ xlib_create_softpipe_winsys( void ) static struct pipe_screen * -xlib_create_softpipe_screen( struct pipe_winsys *pws ) +xlib_create_softpipe_screen( void ) { + struct pipe_winsys *winsys; struct pipe_screen *screen; - screen = softpipe_create_screen(pws); + winsys = xlib_create_softpipe_winsys(); + if (winsys == NULL) + return NULL; + + screen = softpipe_create_screen(winsys); if (screen == NULL) goto fail; return screen; fail: + if (winsys) + winsys->destroy( winsys ); + return NULL; } @@ -517,7 +524,6 @@ fail: struct xm_driver xlib_softpipe_driver = { - .create_pipe_winsys = xlib_create_softpipe_winsys, .create_pipe_screen = xlib_create_softpipe_screen, .create_pipe_context = xlib_create_softpipe_context, .display_surface = xlib_softpipe_display_surface -- cgit v1.2.3