diff options
author | Brian Paul <[email protected]> | 2008-04-30 10:43:59 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-04-30 10:43:59 -0600 |
commit | 99fba5466bfd14c4e052041c0571821be529e762 (patch) | |
tree | f6d780ab8faa1be19f5657d0a7e4a0ae2dfa925c /src/mesa/state_tracker/st_atom_constbuf.c | |
parent | 15318c8d8eb97cec8c8528cc91aaeab8858f33c6 (diff) |
gallium: use new buffer wrapper functions in p_inlines.h
This allows us to remove most of the direct references to winsys in the state tracker.
Diffstat (limited to 'src/mesa/state_tracker/st_atom_constbuf.c')
-rw-r--r-- | src/mesa/state_tracker/st_atom_constbuf.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c index 03093579e15..2b659aebbc9 100644 --- a/src/mesa/state_tracker/st_atom_constbuf.c +++ b/src/mesa/state_tracker/st_atom_constbuf.c @@ -36,7 +36,6 @@ #include "pipe/p_context.h" #include "pipe/p_defines.h" -#include "pipe/p_winsys.h" #include "pipe/p_inlines.h" #include "st_context.h" @@ -54,7 +53,7 @@ void st_upload_constants( struct st_context *st, struct gl_program_parameter_list *params, unsigned id) { - struct pipe_winsys *ws = st->pipe->winsys; + struct pipe_context *pipe = st->pipe; struct pipe_constant_buffer *cbuf = &st->state.constants[id]; assert(id == PIPE_SHADER_VERTEX || id == PIPE_SHADER_FRAGMENT); @@ -74,8 +73,8 @@ void st_upload_constants( struct st_context *st, /* We always need to get a new buffer, to keep the drivers simple and * avoid gratuitous rendering synchronization. */ - pipe_buffer_reference( ws, &cbuf->buffer, NULL ); - cbuf->buffer = ws->buffer_create( ws, 1, PIPE_BUFFER_USAGE_CONSTANT, + pipe_reference_buffer(pipe, &cbuf->buffer, NULL ); + cbuf->buffer = pipe_buffer_create(pipe, 1, PIPE_BUFFER_USAGE_CONSTANT, paramBytes ); if (0) @@ -87,9 +86,10 @@ void st_upload_constants( struct st_context *st, /* load Mesa constants into the constant buffer */ if (cbuf->buffer) { - memcpy(ws->buffer_map(ws, cbuf->buffer, PIPE_BUFFER_USAGE_CPU_WRITE), - params->ParameterValues, paramBytes); - ws->buffer_unmap(ws, cbuf->buffer); + void *map = pipe_buffer_map(pipe, cbuf->buffer, + PIPE_BUFFER_USAGE_CPU_WRITE); + memcpy(map, params->ParameterValues, paramBytes); + pipe_buffer_unmap(pipe, cbuf->buffer); } cbuf->size = paramBytes; |