From 99fba5466bfd14c4e052041c0571821be529e762 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 30 Apr 2008 10:43:59 -0600 Subject: 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. --- src/mesa/state_tracker/st_cb_bitmap.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/mesa/state_tracker/st_cb_bitmap.c') diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index d73cd4abfa..f0a3b75357 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.c +++ b/src/mesa/state_tracker/st_cb_bitmap.c @@ -50,7 +50,6 @@ #include "pipe/p_context.h" #include "pipe/p_defines.h" #include "pipe/p_inlines.h" -#include "pipe/p_winsys.h" #include "util/p_tile.h" #include "util/u_draw_quad.h" #include "util/u_simple_shaders.h" @@ -372,9 +371,8 @@ setup_bitmap_vertex_data(struct st_context *st, void *buf; if (!st->bitmap.vbuf) { - st->bitmap.vbuf = pipe->winsys->buffer_create(pipe->winsys, 32, - PIPE_BUFFER_USAGE_VERTEX, - sizeof(st->bitmap.vertices)); + st->bitmap.vbuf = pipe_buffer_create(pipe, 32, PIPE_BUFFER_USAGE_VERTEX, + sizeof(st->bitmap.vertices)); } /* Positions are in clip coords since we need to do clipping in case @@ -413,10 +411,9 @@ setup_bitmap_vertex_data(struct st_context *st, } /* put vertex data into vbuf */ - buf = pipe->winsys->buffer_map(pipe->winsys, st->bitmap.vbuf, - PIPE_BUFFER_USAGE_CPU_WRITE); + buf = pipe_buffer_map(pipe, st->bitmap.vbuf, PIPE_BUFFER_USAGE_CPU_WRITE); memcpy(buf, st->bitmap.vertices, sizeof(st->bitmap.vertices)); - pipe->winsys->buffer_unmap(pipe->winsys, st->bitmap.vbuf); + pipe_buffer_unmap(pipe, st->bitmap.vbuf); } @@ -761,7 +758,7 @@ st_destroy_bitmap(struct st_context *st) } if (st->bitmap.vbuf) { - pipe->winsys->buffer_destroy(pipe->winsys, st->bitmap.vbuf); + pipe_buffer_destroy(pipe, st->bitmap.vbuf); st->bitmap.vbuf = NULL; } -- cgit v1.2.3