summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/python/st_softpipe_winsys.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/python/st_softpipe_winsys.c')
-rw-r--r--src/gallium/state_trackers/python/st_softpipe_winsys.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/src/gallium/state_trackers/python/st_softpipe_winsys.c b/src/gallium/state_trackers/python/st_softpipe_winsys.c
index 1fda70ca00..6ea3c9a5cf 100644
--- a/src/gallium/state_trackers/python/st_softpipe_winsys.c
+++ b/src/gallium/state_trackers/python/st_softpipe_winsys.c
@@ -253,13 +253,9 @@ st_softpipe_fence_finish(struct pipe_winsys *winsys,
}
-static void
-st_softpipe_screen_destroy(struct pipe_screen *screen)
+static void
+st_softpipe_destroy(struct pipe_winsys *winsys)
{
- struct pipe_winsys *winsys = screen->winsys;
-
- screen->destroy(screen);
-
FREE(winsys);
}
@@ -274,6 +270,8 @@ st_softpipe_screen_create(void)
if(!winsys)
return NULL;
+ winsys->destroy = st_softpipe_destroy;
+
winsys->buffer_create = st_softpipe_buffer_create;
winsys->user_buffer_create = st_softpipe_user_buffer_create;
winsys->buffer_map = st_softpipe_buffer_map;
@@ -293,19 +291,12 @@ st_softpipe_screen_create(void)
screen = softpipe_create_screen(winsys);
if(!screen)
- FREE(winsys);
+ st_softpipe_destroy(winsys);
return screen;
}
-static void
-st_softpipe_context_destroy(struct pipe_context *pipe)
-{
- pipe->destroy(pipe);
-}
-
-
static struct pipe_context *
st_softpipe_context_create(struct pipe_screen *screen)
{
@@ -315,7 +306,5 @@ st_softpipe_context_create(struct pipe_screen *screen)
const struct st_winsys st_softpipe_winsys = {
&st_softpipe_screen_create,
- &st_softpipe_screen_destroy,
&st_softpipe_context_create,
- &st_softpipe_context_destroy
};