summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_bitmap.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2010-03-13 15:06:35 +0000
committerKeith Whitwell <keithw@vmware.com>2010-03-13 15:06:35 +0000
commit47bfbd452c93e6a8db013fb90d9f42210cf24889 (patch)
treee3cebba97261f567f461769d891aa77707b57bd7 /src/mesa/state_tracker/st_cb_bitmap.c
parentfaa14818856e1e9a4ee624c2bc04d7aecabd07ab (diff)
parenta80e33f40731f07e8a39896bfdcd1b1504aedc1f (diff)
Merge commit 'origin/master' into gallium-sampler-view
Conflicts: src/gallium/auxiliary/util/u_tile.c src/gallium/auxiliary/util/u_tile.h src/gallium/drivers/identity/id_context.c src/gallium/drivers/llvmpipe/lp_setup.c src/gallium/drivers/llvmpipe/lp_setup.h src/gallium/drivers/softpipe/sp_tex_tile_cache.c src/gallium/include/pipe/p_context.h src/mesa/state_tracker/st_cb_bitmap.c src/mesa/state_tracker/st_cb_drawpixels.c
Diffstat (limited to 'src/mesa/state_tracker/st_cb_bitmap.c')
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
index 25d33b933e..9a0446bb71 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -259,7 +259,6 @@ make_bitmap_texture(GLcontext *ctx, GLsizei width, GLsizei height,
const GLubyte *bitmap)
{
struct pipe_context *pipe = ctx->st->pipe;
- struct pipe_screen *screen = pipe->screen;
struct pipe_transfer *transfer;
ubyte *dest;
struct pipe_texture *pt;
@@ -285,7 +284,7 @@ make_bitmap_texture(GLcontext *ctx, GLsizei width, GLsizei height,
PIPE_TRANSFER_WRITE,
0, 0, width, height);
- dest = screen->transfer_map(screen, transfer);
+ dest = pipe->transfer_map(pipe, transfer);
/* Put image into texture transfer */
memset(dest, 0xff, height * transfer->stride);
@@ -295,8 +294,8 @@ make_bitmap_texture(GLcontext *ctx, GLsizei width, GLsizei height,
_mesa_unmap_pbo_source(ctx, unpack);
/* Release transfer */
- screen->transfer_unmap(screen, transfer);
- screen->tex_transfer_destroy(transfer);
+ pipe->transfer_unmap(pipe, transfer);
+ pipe->tex_transfer_destroy(pipe, transfer);
return pt;
}
@@ -520,7 +519,6 @@ static void
reset_cache(struct st_context *st)
{
struct pipe_context *pipe = st->pipe;
- struct pipe_screen *screen = pipe->screen;
struct bitmap_cache *cache = st->bitmap.cache;
/*memset(cache->buffer, 0xff, sizeof(cache->buffer));*/
@@ -532,7 +530,7 @@ reset_cache(struct st_context *st)
cache->ymax = -1000000;
if (cache->trans) {
- screen->tex_transfer_destroy(cache->trans);
+ pipe->tex_transfer_destroy(pipe, cache->trans);
cache->trans = NULL;
}
@@ -570,7 +568,6 @@ static void
create_cache_trans(struct st_context *st)
{
struct pipe_context *pipe = st->pipe;
- struct pipe_screen *screen = pipe->screen;
struct bitmap_cache *cache = st->bitmap.cache;
if (cache->trans)
@@ -583,7 +580,7 @@ create_cache_trans(struct st_context *st)
PIPE_TRANSFER_WRITE, 0, 0,
BITMAP_CACHE_WIDTH,
BITMAP_CACHE_HEIGHT);
- cache->buffer = screen->transfer_map(screen, cache->trans);
+ cache->buffer = pipe->transfer_map(pipe, cache->trans);
/* init image to all 0xff */
memset(cache->buffer, 0xff, cache->trans->stride * BITMAP_CACHE_HEIGHT);
@@ -601,7 +598,6 @@ st_flush_bitmap_cache(struct st_context *st)
if (st->ctx->DrawBuffer) {
struct pipe_context *pipe = st->pipe;
- struct pipe_screen *screen = pipe->screen;
struct pipe_sampler_view *sv;
assert(cache->xmin <= cache->xmax);
@@ -618,10 +614,10 @@ st_flush_bitmap_cache(struct st_context *st)
if (cache->trans) {
if (0)
print_cache(cache);
- screen->transfer_unmap(screen, cache->trans);
+ pipe->transfer_unmap(pipe, cache->trans);
cache->buffer = NULL;
- screen->tex_transfer_destroy(cache->trans);
+ pipe->tex_transfer_destroy(pipe, cache->trans);
cache->trans = NULL;
}
@@ -837,7 +833,6 @@ void
st_destroy_bitmap(struct st_context *st)
{
struct pipe_context *pipe = st->pipe;
- struct pipe_screen *screen = pipe->screen;
struct bitmap_cache *cache = st->bitmap.cache;
@@ -854,8 +849,8 @@ st_destroy_bitmap(struct st_context *st)
if (cache) {
if (cache->trans) {
- screen->transfer_unmap(screen, cache->trans);
- screen->tex_transfer_destroy(cache->trans);
+ pipe->transfer_unmap(pipe, cache->trans);
+ pipe->tex_transfer_destroy(pipe, cache->trans);
}
pipe_texture_reference(&st->bitmap.cache->texture, NULL);
free(st->bitmap.cache);