diff options
author | Keith Whitwell <[email protected]> | 2007-08-10 15:31:26 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2007-08-10 15:35:48 +0100 |
commit | 47fc2c4349746997704a7f81dffadd22363e0ff1 (patch) | |
tree | da53b452a03ad6909a1b9b95db565fa7a73a511e /src/mesa/state_tracker | |
parent | 12e3bb1a65bbff82dabc64110249c57a711501c1 (diff) |
Lift common winsys functions into pipe's new p_winsys.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_cb_bufferobjects.c | 15 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_flush.c | 5 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_flush.h | 6 |
3 files changed, 14 insertions, 12 deletions
diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c index 9e407de34f6..f1dc4fbaf49 100644 --- a/src/mesa/state_tracker/st_cb_bufferobjects.c +++ b/src/mesa/state_tracker/st_cb_bufferobjects.c @@ -35,6 +35,7 @@ #include "pipe/p_context.h" #include "pipe/p_defines.h" +#include "pipe/p_winsys.h" @@ -62,7 +63,7 @@ st_bufferobj_alloc(GLcontext *ctx, GLuint name, GLenum target) _mesa_initialize_buffer_object(&st_obj->Base, name, target); - st_obj->buffer = st->pipe->create_buffer( st->pipe, 32, 0 ); + st_obj->buffer = st->pipe->winsys->buffer_create( st->pipe->winsys, 32 ); return &st_obj->Base; } @@ -80,7 +81,7 @@ st_bufferobj_free(GLcontext *ctx, struct gl_buffer_object *obj) struct st_buffer_object *st_obj = st_buffer_object(obj); if (st_obj->buffer) - pipe->buffer_unreference(pipe, &st_obj->buffer); + pipe->winsys->buffer_unreference(pipe->winsys, &st_obj->buffer); free(st_obj); } @@ -107,7 +108,7 @@ st_bufferobj_data(GLcontext *ctx, st_obj->Base.Size = size; st_obj->Base.Usage = usage; - pipe->buffer_data( pipe, st_obj->buffer, size, data ); + pipe->winsys->buffer_data( pipe->winsys, st_obj->buffer, size, data ); } @@ -127,7 +128,7 @@ st_bufferobj_subdata(GLcontext *ctx, struct pipe_context *pipe = st_context(ctx)->pipe; struct st_buffer_object *st_obj = st_buffer_object(obj); - pipe->buffer_subdata(pipe, st_obj->buffer, offset, size, data); + pipe->winsys->buffer_subdata(pipe->winsys, st_obj->buffer, offset, size, data); } @@ -144,7 +145,7 @@ st_bufferobj_get_subdata(GLcontext *ctx, struct pipe_context *pipe = st_context(ctx)->pipe; struct st_buffer_object *st_obj = st_buffer_object(obj); - pipe->buffer_get_subdata(pipe, st_obj->buffer, offset, size, data); + pipe->winsys->buffer_get_subdata(pipe->winsys, st_obj->buffer, offset, size, data); } @@ -173,7 +174,7 @@ st_bufferobj_map(GLcontext *ctx, GLenum target, GLenum access, break; } - obj->Pointer = pipe->buffer_map(pipe, st_obj->buffer, flags); + obj->Pointer = pipe->winsys->buffer_map(pipe->winsys, st_obj->buffer, flags); return obj->Pointer; } @@ -187,7 +188,7 @@ st_bufferobj_unmap(GLcontext *ctx, GLenum target, struct gl_buffer_object *obj) struct pipe_context *pipe = st_context(ctx)->pipe; struct st_buffer_object *st_obj = st_buffer_object(obj); - pipe->buffer_unmap(pipe, st_obj->buffer); + pipe->winsys->buffer_unmap(pipe->winsys, st_obj->buffer); obj->Pointer = NULL; return GL_TRUE; } diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c index a6a8f8d90f3..41f21c361cd 100644 --- a/src/mesa/state_tracker/st_cb_flush.c +++ b/src/mesa/state_tracker/st_cb_flush.c @@ -37,6 +37,7 @@ #include "st_cb_flush.h" #include "pipe/p_context.h" #include "pipe/p_defines.h" +#include "pipe/p_winsys.h" static void st_flush(GLcontext *ctx) @@ -60,7 +61,7 @@ static void st_flush(GLcontext *ctx) if (st->flags.frontbuffer_dirty) { /* Hook for copying "fake" frontbuffer if necessary: */ - st->pipe->flush_frontbuffer( st->pipe ); + st->pipe->winsys->flush_frontbuffer( st->pipe->winsys ); st->flags.frontbuffer_dirty = 0; } } @@ -70,7 +71,7 @@ static void st_finish(GLcontext *ctx) struct st_context *st = ctx->st; st_flush( ctx ); - st->pipe->wait_idle( st->pipe ); + st->pipe->winsys->wait_idle( st->pipe->winsys ); } diff --git a/src/mesa/state_tracker/st_cb_flush.h b/src/mesa/state_tracker/st_cb_flush.h index 29ceab3a560..c26f7792259 100644 --- a/src/mesa/state_tracker/st_cb_flush.h +++ b/src/mesa/state_tracker/st_cb_flush.h @@ -26,13 +26,13 @@ **************************************************************************/ -#ifndef ST_CB_CLEAR_H -#define ST_CB_CLEAR_H +#ifndef ST_CB_FLUSH_H +#define ST_CB_FLUSH_H extern void st_init_flush_functions(struct dd_function_table *functions); -#endif /* ST_CB_CLEAR_H */ +#endif /* ST_CB_FLUSH_H */ |