softpipe: Simplify softpipe_create's prototype.
authorJosé Fonseca <jfonseca@vmware.com>
Sat, 18 Apr 2009 22:14:42 +0000 (23:14 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 18 Apr 2009 22:15:26 +0000 (23:15 +0100)
src/gallium/drivers/softpipe/sp_context.c
src/gallium/drivers/softpipe/sp_winsys.h
src/gallium/state_trackers/python/st_softpipe_winsys.c
src/gallium/winsys/drm/radeon/core/radeon_winsys_softpipe.c
src/gallium/winsys/egl_xlib/egl_xlib.c
src/gallium/winsys/g3dvl/xsp_winsys.c
src/gallium/winsys/gdi/gdi_softpipe_winsys.c
src/gallium/winsys/xlib/xlib_softpipe.c

index 2c6a0b53b0af32361318de0cc9ba187ad5cd518a..62e8d99cfd0300c332bfe2af6a53833fdb1bb69b 100644 (file)
@@ -137,9 +137,7 @@ softpipe_is_buffer_referenced( struct pipe_context *pipe,
 }
 
 struct pipe_context *
-softpipe_create( struct pipe_screen *screen,
-                 struct pipe_winsys *pipe_winsys,
-                 void *unused )
+softpipe_create( struct pipe_screen *screen )
 {
    struct softpipe_context *softpipe = CALLOC_STRUCT(softpipe_context);
    uint i;
@@ -154,7 +152,7 @@ softpipe_create( struct pipe_screen *screen,
 
    softpipe->dump_fs = debug_get_bool_option( "GALLIUM_DUMP_FS", FALSE );
 
-   softpipe->pipe.winsys = pipe_winsys;
+   softpipe->pipe.winsys = screen->winsys;
    softpipe->pipe.screen = screen;
    softpipe->pipe.destroy = softpipe_destroy;
 
index 44720b796085aa3b5a2a8a2b0544632d8a8beac7..cf91e7782bcababdb21f84cd60a925fc7c9dca74 100644 (file)
@@ -45,9 +45,7 @@ struct pipe_winsys;
 struct pipe_context;
 
 
-struct pipe_context *softpipe_create( struct pipe_screen *,
-                                      struct pipe_winsys *,
-                                     void *unused );
+struct pipe_context *softpipe_create( struct pipe_screen * );
 
 
 struct pipe_screen *
index 41cdeaa6fdc33fba9bde4bd45b00f729a3bc1cec..f0a4826a00114c1677a70e814069b4b8779854cc 100644 (file)
@@ -260,7 +260,7 @@ st_softpipe_screen_create(void)
 static struct pipe_context *
 st_softpipe_context_create(struct pipe_screen *screen)
 {
-   return softpipe_create(screen, screen->winsys, NULL);
+   return softpipe_create(screen);
 }
 
 
index 3c0d6f11aa7e6c19717c951333ce9597ed9a6c20..f038bfa40ef4afc8fddd286df5b252aa13d6e333 100644 (file)
@@ -37,7 +37,5 @@ struct pipe_context *radeon_create_softpipe(struct pipe_winsys* winsys)
 
     pipe_screen = softpipe_create_screen(winsys);
 
-    return softpipe_create(pipe_screen,
-                           winsys,
-                           NULL);
+    return softpipe_create(pipe_screen);
 }
index 68fe64a52e1b6d659ea485d0b8ba20aad6f226f1..b52f427e4a78797ff97d80b84e34a3cb888954cb 100644 (file)
@@ -359,7 +359,7 @@ xlib_eglCreateContext(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config,
       /* fall-through */
    case EGL_OPENGL_API:
       /* create a softpipe context */
-      ctx->pipe = softpipe_create(xdrv->screen, xdrv->winsys, NULL);
+      ctx->pipe = softpipe_create(xdrv->screen);
       /* Now do xlib / state tracker inits here */
       _eglConfigToContextModesRec(conf, &visual);
       ctx->Context = st_create_context(ctx->pipe, &visual, share_ctx);
index 5b9fdb5c1f8a784ee43d01afcf1dc90e9dac6d0d..698c2856a4fbc105fcd7dda09255f7447fa0c041 100644 (file)
@@ -261,7 +261,7 @@ struct pipe_context* create_pipe_context(Display *display, int screen)
        }
 
        sp_screen = softpipe_create_screen((struct pipe_winsys*)xsp_winsys);
-       sp_pipe = softpipe_create(sp_screen, (struct pipe_winsys*)xsp_winsys, NULL);
+       sp_pipe = softpipe_create(sp_screen);
 
        xsp_context = calloc(1, sizeof(struct xsp_context));
        xsp_context->display = display;
index df7e43d56bfe97a822441ed08893d776aaa5355c..33826524d7ab7b1884f67d428f1e8336d35f6f4d 100644 (file)
@@ -263,7 +263,7 @@ gdi_softpipe_screen_create(void)
 static struct pipe_context *
 gdi_softpipe_context_create(struct pipe_screen *screen)
 {
-   return softpipe_create(screen, screen->winsys, NULL);
+   return softpipe_create(screen);
 }
 
 
index 762ebd98477b97619c4683b5b496a297ba5605b4..44b8464518ab7176d4892fcf1ae2eacaf32cbfa4 100644 (file)
@@ -482,7 +482,7 @@ xlib_create_softpipe_context( struct pipe_screen *screen,
 {
    struct pipe_context *pipe;
    
-   pipe = softpipe_create(screen, screen->winsys, NULL);
+   pipe = softpipe_create(screen);
    if (pipe == NULL)
       goto fail;