diff options
author | Brian <[email protected]> | 2007-11-05 16:15:43 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-11-05 16:15:43 -0700 |
commit | 91564eedcc5e98e28d749267ac81ffd4082b4147 (patch) | |
tree | f6627d3d2bac227ffafcd543d6f79ccf08264148 /src/mesa | |
parent | e39f1b4cbea6d41dc09430bd3d811cb7bbdea5f8 (diff) |
Remove some temporary state tracker context/framebuffer_create functions.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/intel_winsys/intel_context.c | 4 | ||||
-rw-r--r-- | src/mesa/pipe/xlib/xm_api.c | 6 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_context.c | 56 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_public.h | 12 |
4 files changed, 34 insertions, 44 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_context.c b/src/mesa/drivers/dri/intel_winsys/intel_context.c index 607d316e36a..85ccb1bc2a9 100644 --- a/src/mesa/drivers/dri/intel_winsys/intel_context.c +++ b/src/mesa/drivers/dri/intel_winsys/intel_context.c @@ -152,7 +152,7 @@ intelCreateContext(const __GLcontextModes * mesaVis, } } - intel->st = st_create_context2(pipe, mesaVis, NULL); + intel->st = st_create_context(pipe, mesaVis, NULL); intel->st->ctx->DriverCtx = intel; /* hope to get rid of this... */ return GL_TRUE; @@ -181,7 +181,7 @@ intelDestroyContext(__DRIcontextPrivate * driContextPriv) intel->first_swap_fence = NULL; } - st_destroy_context2(intel->st); + st_destroy_context(intel->st); free(intel); } } diff --git a/src/mesa/pipe/xlib/xm_api.c b/src/mesa/pipe/xlib/xm_api.c index abd0b4f2926..ae96a866d77 100644 --- a/src/mesa/pipe/xlib/xm_api.c +++ b/src/mesa/pipe/xlib/xm_api.c @@ -1465,8 +1465,8 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) pipe = xmesa_create_softpipe( c ); - c->st = st_create_context2(pipe, &v->mesa_visual, - share_list ? share_list->st : NULL); + c->st = st_create_context(pipe, &v->mesa_visual, + share_list ? share_list->st : NULL); mesaCtx = c->st->ctx; c->st->ctx->DriverCtx = c; @@ -1513,7 +1513,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list ) PUBLIC void XMesaDestroyContext( XMesaContext c ) { - st_destroy_context2(c->st); + st_destroy_context(c->st); _mesa_free(c); } diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 138f18aa99b..88fbaeeb7ab 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -68,28 +68,8 @@ void st_invalidate_state(GLcontext * ctx, GLuint new_state) } -/* - * XXX rename after above func is removed. - */ -struct st_context *st_create_context2(struct pipe_context *pipe, - const __GLcontextModes *visual, - struct st_context *share) -{ - GLcontext *ctx; - GLcontext *shareCtx = share ? share->ctx : NULL; - struct dd_function_table funcs; - - memset(&funcs, 0, sizeof(funcs)); - st_init_driver_functions(&funcs); - - ctx = _mesa_create_context(visual, shareCtx, &funcs, NULL); - - return st_create_context(ctx, pipe); -} - - -struct st_context *st_create_context( GLcontext *ctx, - struct pipe_context *pipe ) +static struct st_context * +st_create_context_priv( GLcontext *ctx, struct pipe_context *pipe ) { struct st_context *st = CALLOC_STRUCT( st_context ); @@ -132,19 +112,24 @@ struct st_context *st_create_context( GLcontext *ctx, } -/* - * XXX rename after below func is removed. - */ -void st_destroy_context2( struct st_context *st ) +struct st_context *st_create_context(struct pipe_context *pipe, + const __GLcontextModes *visual, + struct st_context *share) { - GLcontext *ctx = st->ctx; - _mesa_free_context_data(ctx); - st_destroy_context(st); - free(ctx); + GLcontext *ctx; + GLcontext *shareCtx = share ? share->ctx : NULL; + struct dd_function_table funcs; + + memset(&funcs, 0, sizeof(funcs)); + st_init_driver_functions(&funcs); + + ctx = _mesa_create_context(visual, shareCtx, &funcs, NULL); + + return st_create_context_priv(ctx, pipe); } -void st_destroy_context( struct st_context *st ) +static void st_destroy_context_priv( struct st_context *st ) { draw_destroy(st->draw); st_destroy_atoms( st ); @@ -161,6 +146,15 @@ void st_destroy_context( struct st_context *st ) } +void st_destroy_context( struct st_context *st ) +{ + GLcontext *ctx = st->ctx; + _mesa_free_context_data(ctx); + st_destroy_context_priv(st); + free(ctx); +} + + void st_make_current(struct st_context *st, struct st_framebuffer *draw, struct st_framebuffer *read) diff --git a/src/mesa/state_tracker/st_public.h b/src/mesa/state_tracker/st_public.h index c94e8d32c8a..b21a8d3886d 100644 --- a/src/mesa/state_tracker/st_public.h +++ b/src/mesa/state_tracker/st_public.h @@ -39,20 +39,16 @@ struct st_context; struct st_framebuffer; - struct pipe_context; +struct pipe_surface; -struct st_context *st_create_context( GLcontext *ctx, - struct pipe_context *pipe); -struct st_context *st_create_context2(struct pipe_context *pipe, - const __GLcontextModes *visual, - struct st_context *share); +struct st_context *st_create_context(struct pipe_context *pipe, + const __GLcontextModes *visual, + struct st_context *share); void st_destroy_context( struct st_context *st ); -void st_destroy_context2( struct st_context *st ); - void st_copy_context_state(struct st_context *dst, struct st_context *src, uint mask); |