Commit 96d88293 authored by Marek Olšák's avatar Marek Olšák
Browse files

gallium: remove unused winsys pointers in pipe_screen and pipe_context

A winsys is already a private object of a driver.
parent f33d100f
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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) */
......
......@@ -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 * );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment