gallium: remove unused winsys pointers in pipe_screen and pipe_context
authorMarek Olšák <maraeo@gmail.com>
Fri, 17 Feb 2012 00:49:49 +0000 (01:49 +0100)
committerMarek Olšák <maraeo@gmail.com>
Tue, 21 Feb 2012 20:09:16 +0000 (21:09 +0100)
A winsys is already a private object of a driver.

21 files changed:
src/gallium/drivers/galahad/glhd_context.c
src/gallium/drivers/galahad/glhd_screen.c
src/gallium/drivers/i915/i915_context.c
src/gallium/drivers/i915/i915_screen.c
src/gallium/drivers/identity/id_context.c
src/gallium/drivers/identity/id_screen.c
src/gallium/drivers/llvmpipe/lp_context.c
src/gallium/drivers/noop/noop_pipe.c
src/gallium/drivers/r300/r300_context.c
src/gallium/drivers/r300/r300_screen.c
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/rbug/rbug_context.c
src/gallium/drivers/rbug/rbug_screen.c
src/gallium/drivers/softpipe/sp_context.c
src/gallium/drivers/softpipe/sp_screen.c
src/gallium/drivers/svga/svga_context.c
src/gallium/drivers/trace/tr_context.c
src/gallium/drivers/trace/tr_screen.c
src/gallium/include/pipe/p_context.h
src/gallium/include/pipe/p_screen.h
src/gallium/include/state_tracker/drm_driver.h

index a4afa813f898dd25820b1962ae53835d8fcb58ad..f71048022ef5c9ca150998ca618653332e22075f 100644 (file)
@@ -973,7 +973,6 @@ galahad_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
       return NULL;
    }
 
-   glhd_pipe->base.winsys = NULL;
    glhd_pipe->base.screen = _screen;
    glhd_pipe->base.priv = pipe->priv; /* expose wrapped data */
    glhd_pipe->base.draw = NULL;
index 2fe82fe695bea9e61d8d05b9d8022cf3ddfb6898..49702b6e424ad310eb8b9235c3b5f7784051fd1c 100644 (file)
@@ -311,8 +311,6 @@ galahad_screen_create(struct pipe_screen *screen)
       return screen;
    }
 
-   glhd_screen->base.winsys = NULL;
-
    glhd_screen->base.destroy = galahad_screen_destroy;
    glhd_screen->base.get_name = galahad_screen_get_name;
    glhd_screen->base.get_vendor = galahad_screen_get_vendor;
index 81976298f072ba492130a3a2e8c95910651832d9..5e0ced235d96b195c40546c58b5cbbb023e19836 100644 (file)
@@ -143,7 +143,6 @@ i915_create_context(struct pipe_screen *screen, void *priv)
       return NULL;
 
    i915->iws = i915_screen(screen)->iws;
-   i915->base.winsys = NULL;
    i915->base.screen = screen;
    i915->base.priv = priv;
 
index a37241f5002995fa3cdaaa320cf9158c9d931b94..61340f3a5889c762de078d70dcd06ebba4d49485 100644 (file)
@@ -452,8 +452,6 @@ i915_screen_create(struct i915_winsys *iws)
 
    is->iws = iws;
 
-   is->base.winsys = NULL;
-
    is->base.destroy = i915_destroy_screen;
    is->base.flush_frontbuffer = i915_flush_frontbuffer;
 
index a9043c1590b008aba4b58a4fbe609c17ee2957ba..681ef7bf097a75fcf0492cac808d67d47aea3ff5 100644 (file)
@@ -860,7 +860,6 @@ identity_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
       return NULL;
    }
 
-   id_pipe->base.winsys = NULL;
    id_pipe->base.screen = _screen;
    id_pipe->base.priv = pipe->priv; /* expose wrapped data */
    id_pipe->base.draw = NULL;
index 5675c27c63b6c10ca75a35ebfec542c1888040b4..a173235b56390727ede076b342ea42fc2be0b2f0 100644 (file)
@@ -274,8 +274,6 @@ identity_screen_create(struct pipe_screen *screen)
       return NULL;
    }
 
-   id_screen->base.winsys = NULL;
-
    id_screen->base.destroy = identity_screen_destroy;
    id_screen->base.get_name = identity_screen_get_name;
    id_screen->base.get_vendor = identity_screen_get_vendor;
index c19272fdac693621c04828c04daebbe654096f2a..8c0206b9d9c67e39880b191c841a9649b080df41 100644 (file)
@@ -171,7 +171,6 @@ llvmpipe_create_context( struct pipe_screen *screen, void *priv )
    make_empty_list(&llvmpipe->setup_variants_list);
 
 
-   llvmpipe->pipe.winsys = screen->winsys;
    llvmpipe->pipe.screen = screen;
    llvmpipe->pipe.priv = priv;
 
index ec20e0d25a906a16f3c15618889aed7c56be8f3a..5453def8df5b227556a31ef24b74cf5a4c03ce70 100644 (file)
@@ -276,7 +276,6 @@ static struct pipe_context *noop_create_context(struct pipe_screen *screen, void
 
        if (ctx == NULL)
                return NULL;
-       ctx->winsys = screen->winsys;
        ctx->screen = screen;
        ctx->priv = priv;
        ctx->destroy = noop_destroy_context;
@@ -380,7 +379,6 @@ struct pipe_screen *noop_screen_create(struct pipe_screen *oscreen)
        noop_screen->oscreen = oscreen;
        screen = &noop_screen->pscreen;
 
-       screen->winsys = oscreen->winsys;
        screen->destroy = noop_destroy_screen;
        screen->get_name = noop_get_name;
        screen->get_vendor = noop_get_vendor;
index 7d289ca6346e3a5d326cb69c33f02c59da7f0775..158dbc07c7f28c7d239bce1a328bc8c2ff1dabd0 100644 (file)
@@ -385,7 +385,6 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
     r300->rws = rws;
     r300->screen = r300screen;
 
-    r300->context.winsys = (struct pipe_winsys*)rws;
     r300->context.screen = screen;
     r300->context.priv = priv;
 
index 6b3b6c1cccfe02773fc4c0da453229371534f346..9ac5781e949880b7deb555c5808108bd65073495 100644 (file)
@@ -526,7 +526,6 @@ struct pipe_screen* r300_screen_create(struct radeon_winsys *rws)
                      UTIL_SLAB_SINGLETHREADED);
 
     r300screen->rws = rws;
-    r300screen->screen.winsys = (struct pipe_winsys*)rws;
     r300screen->screen.destroy = r300_destroy_screen;
     r300screen->screen.get_name = r300_get_name;
     r300screen->screen.get_vendor = r300_get_vendor;
index 5ea8bb8863a9a30a52849f009a5a803b2f5afba6..2369ed4cf208aa4402908a9f7ce5c0caadf7c860 100644 (file)
@@ -220,7 +220,6 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void
 
        r600_update_num_contexts(rscreen, 1);
 
-       rctx->context.winsys = rscreen->screen.winsys;
        rctx->context.screen = screen;
        rctx->context.priv = priv;
        rctx->context.destroy = r600_destroy_context;
@@ -808,7 +807,6 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws)
                return NULL;
        }
 
-       rscreen->screen.winsys = (struct pipe_winsys*)ws;
        rscreen->screen.destroy = r600_destroy_screen;
        rscreen->screen.get_name = r600_get_name;
        rscreen->screen.get_vendor = r600_get_vendor;
index 96f4ce6b48b8f041f035f3645f000baccad22c4e..3aa4f85babbc35d3e71d1d1e7b6a985d79392bb2 100644 (file)
@@ -1174,7 +1174,6 @@ rbug_context_create(struct pipe_screen *_screen, struct pipe_context *pipe)
    pipe_mutex_init(rb_pipe->list_mutex);
    make_empty_list(&rb_pipe->shaders);
 
-   rb_pipe->base.winsys = NULL;
    rb_pipe->base.screen = _screen;
    rb_pipe->base.priv = pipe->priv; /* expose wrapped data */
    rb_pipe->base.draw = NULL;
index fe7cdd8125167b464cffa9ef8e9eeb15ddf2ddbb..1b7ca7cb6fe3a0e14f05d883c3dbc52c359ee6a6 100644 (file)
@@ -286,8 +286,6 @@ rbug_screen_create(struct pipe_screen *screen)
    make_empty_list(&rb_screen->surfaces);
    make_empty_list(&rb_screen->transfers);
 
-   rb_screen->base.winsys = NULL;
-
    rb_screen->base.destroy = rbug_screen_destroy;
    rb_screen->base.get_name = rbug_screen_get_name;
    rb_screen->base.get_vendor = rbug_screen_get_vendor;
index 1fb0a79f2074aa362dbd8cc156383d6e5dfd6b83..a79a7a04fdea8eb389544c001ca7f052e954545f 100644 (file)
@@ -239,7 +239,6 @@ softpipe_create_context( struct pipe_screen *screen,
    softpipe->dump_fs = debug_get_bool_option( "SOFTPIPE_DUMP_FS", FALSE );
    softpipe->dump_gs = debug_get_bool_option( "SOFTPIPE_DUMP_GS", FALSE );
 
-   softpipe->pipe.winsys = NULL;
    softpipe->pipe.screen = screen;
    softpipe->pipe.destroy = softpipe_destroy;
    softpipe->pipe.priv = priv;
index 5e50bfb292cdee4fbfccc46df118d0c98b085734..c983ef5b16018b7d64350b0d5e4d7eba02b919e1 100644 (file)
@@ -338,7 +338,6 @@ softpipe_create_screen(struct sw_winsys *winsys)
 
    screen->winsys = winsys;
 
-   screen->base.winsys = NULL;
    screen->base.destroy = softpipe_destroy_screen;
 
    screen->base.get_name = softpipe_get_name;
index cbeb424fff5d5e789ad6c1d72df50b99be9fcf1b..cc1ac84adfc7de71e82cbb4a07868f7896f09ac4 100644 (file)
@@ -92,7 +92,6 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen,
    if (svga == NULL)
       goto no_svga;
 
-   svga->pipe.winsys = screen->winsys;
    svga->pipe.screen = screen;
    svga->pipe.priv = priv;
    svga->pipe.destroy = svga_destroy;
index 240d85c69a183efdef440cfc156c5071ccfab998..b582abc8692f34d1cc09c50f883f75a1c0499e15 100644 (file)
@@ -1548,7 +1548,6 @@ trace_context_create(struct trace_screen *tr_scr,
    if(!tr_ctx)
       goto error1;
 
-   tr_ctx->base.winsys = NULL;
    tr_ctx->base.priv = pipe->priv; /* expose wrapped priv data */
    tr_ctx->base.screen = &tr_scr->base;
 
index 362b21a810e6fd37d1c9da63b2b5be851986ac34..fd5acbefe51de0131072bea14fa6612b1ad2f2ec 100644 (file)
@@ -480,7 +480,6 @@ struct pipe_screen *
 trace_screen_create(struct pipe_screen *screen)
 {
    struct trace_screen *tr_scr;
-   struct pipe_winsys *winsys;
 
    if(!screen)
       goto error1;
@@ -494,14 +493,6 @@ trace_screen_create(struct pipe_screen *screen)
    if(!tr_scr)
       goto error2;
 
-#if 0
-   winsys = trace_winsys_create(screen->winsys);
-   if(!winsys)
-      goto error3;
-#else
-   winsys = screen->winsys;
-#endif
-   tr_scr->base.winsys = winsys;
    tr_scr->base.destroy = trace_screen_destroy;
    tr_scr->base.get_name = trace_screen_get_name;
    tr_scr->base.get_vendor = trace_screen_get_vendor;
index 4c58ed049e937b81380ad82b1af1eef5978da8a6..aaeeb81851bec50ff526c7c7a14be6340f44ad43 100644 (file)
@@ -72,7 +72,6 @@ union pipe_color_union;
  *  - surface functions
  */
 struct pipe_context {
-   struct pipe_winsys *winsys;
    struct pipe_screen *screen;
 
    void *priv;  /**< context private data (for DRI for example) */
index 70d41357898a92e84f9d182c907369737a12ab83..45c441b2fcf775bcd79d633be088c12e28953c2f 100644 (file)
@@ -54,7 +54,6 @@ extern "C" {
 struct winsys_handle;
 /** Opaque type */
 struct pipe_fence_handle;
-struct pipe_winsys;
 struct pipe_resource;
 struct pipe_surface;
 struct pipe_transfer;
@@ -66,8 +65,6 @@ struct pipe_transfer;
  * context.
  */
 struct pipe_screen {
-   struct pipe_winsys *winsys;
-
    void (*destroy)( struct pipe_screen * );
 
 
index 2df28599fe8b263b13c0f1bd32fad2657799ae6d..f9bd2220e98fac4d22d80d3d12fb06e3ab76a6cf 100644 (file)
@@ -5,7 +5,6 @@
 #include "pipe/p_compiler.h"
 
 struct pipe_screen;
-struct pipe_winsys;
 struct pipe_context;
 struct pipe_resource;