From ee80e0b620c5b9af62dac8ad64a84042b46f5264 Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 25 Oct 2007 18:50:15 -0600 Subject: Move the get/put_tile() functions to pipe_context. The _rgba versions are temporary until the state tracker is updated. --- src/mesa/state_tracker/st_cb_accum.c | 22 +++++++++++----------- src/mesa/state_tracker/st_cb_drawpixels.c | 4 ++-- src/mesa/state_tracker/st_cb_readpixels.c | 2 +- src/mesa/state_tracker/st_cb_texture.c | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_cb_accum.c b/src/mesa/state_tracker/st_cb_accum.c index 7c154baa15..7a245b0ed6 100644 --- a/src/mesa/state_tracker/st_cb_accum.c +++ b/src/mesa/state_tracker/st_cb_accum.c @@ -79,7 +79,7 @@ st_clear_accum_buffer(GLcontext *ctx, struct gl_renderbuffer *rb) accBuf[i * 4 + 3] = a; } - acc_ps->put_tile(acc_ps, xpos, ypos, width, height, accBuf); + pipe->put_tile_rgba(pipe, acc_ps, xpos, ypos, width, height, accBuf); free(accBuf); @@ -101,13 +101,13 @@ accum_mad(struct pipe_context *pipe, GLfloat scale, GLfloat bias, (void) pipe->region_map(pipe, acc_ps->region); - acc_ps->get_tile(acc_ps, xpos, ypos, width, height, accBuf); + pipe->get_tile_rgba(pipe, acc_ps, xpos, ypos, width, height, accBuf); for (i = 0; i < 4 * width * height; i++) { accBuf[i] = accBuf[i] * scale + bias; } - acc_ps->put_tile(acc_ps, xpos, ypos, width, height, accBuf); + pipe->put_tile_rgba(pipe, acc_ps, xpos, ypos, width, height, accBuf); free(accBuf); @@ -131,14 +131,14 @@ accum_accum(struct pipe_context *pipe, GLfloat value, colorMap = pipe->region_map(pipe, color_ps->region); accMap = pipe->region_map(pipe, acc_ps->region); - color_ps->get_tile(color_ps, xpos, ypos, width, height, colorBuf); - acc_ps->get_tile(acc_ps, xpos, ypos, width, height, accBuf); + pipe->get_tile_rgba(pipe, color_ps, xpos, ypos, width, height, colorBuf); + pipe->get_tile_rgba(pipe, acc_ps, xpos, ypos, width, height, accBuf); for (i = 0; i < 4 * width * height; i++) { accBuf[i] = accBuf[i] + colorBuf[i] * value; } - acc_ps->put_tile(acc_ps, xpos, ypos, width, height, accBuf); + pipe->put_tile_rgba(pipe, acc_ps, xpos, ypos, width, height, accBuf); free(colorBuf); free(accBuf); @@ -162,13 +162,13 @@ accum_load(struct pipe_context *pipe, GLfloat value, (void) pipe->region_map(pipe, color_ps->region); (void) pipe->region_map(pipe, acc_ps->region); - color_ps->get_tile(color_ps, xpos, ypos, width, height, buf); + pipe->get_tile_rgba(pipe, color_ps, xpos, ypos, width, height, buf); for (i = 0; i < 4 * width * height; i++) { buf[i] = buf[i] * value; } - acc_ps->put_tile(acc_ps, xpos, ypos, width, height, buf); + pipe->put_tile_rgba(pipe, acc_ps, xpos, ypos, width, height, buf); free(buf); @@ -193,11 +193,11 @@ accum_return(GLcontext *ctx, GLfloat value, (void) pipe->region_map(pipe, color_ps->region); (void) pipe->region_map(pipe, acc_ps->region); - acc_ps->get_tile(acc_ps, xpos, ypos, width, height, abuf); + pipe->get_tile_rgba(pipe, acc_ps, xpos, ypos, width, height, abuf); if (!colormask[0] || !colormask[1] || !colormask[2] || !colormask[3]) { cbuf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat)); - color_ps->get_tile(color_ps, xpos, ypos, width, height, cbuf); + pipe->get_tile_rgba(pipe, color_ps, xpos, ypos, width, height, cbuf); } for (i = 0; i < width * height; i++) { @@ -212,7 +212,7 @@ accum_return(GLcontext *ctx, GLfloat value, } } - color_ps->put_tile(color_ps, xpos, ypos, width, height, abuf); + pipe->put_tile_rgba(pipe, color_ps, xpos, ypos, width, height, abuf); free(abuf); if (cbuf) diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 4fdf1cef2b..c4a954c43d 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -1245,8 +1245,8 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy, (void) pipe->region_map(pipe, psRead->region); (void) pipe->region_map(pipe, psTex->region); - psRead->get_tile(psRead, srcx, srcy, width, height, buf); - psTex->put_tile(psTex, 0, 0, width, height, buf); + pipe->get_tile_rgba(pipe, psRead, srcx, srcy, width, height, buf); + pipe->put_tile_rgba(pipe, psTex, 0, 0, width, height, buf); pipe->region_unmap(pipe, psRead->region); pipe->region_unmap(pipe, psTex->region); diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c index 2c6847e372..c347a0b688 100644 --- a/src/mesa/state_tracker/st_cb_readpixels.c +++ b/src/mesa/state_tracker/st_cb_readpixels.c @@ -204,7 +204,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, /* Do a row at a time to flip image data vertically */ for (i = 0; i < height; i++) { - strb->surface->get_tile(strb->surface, x, y, width, 1, df); + pipe->get_tile_rgba(pipe, strb->surface, x, y, width, 1, df); y += yStep; df += dfStride; if (!dfStride) { diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 1621b56336..e1cf4861d0 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1100,7 +1100,7 @@ fallback_copy_texsubimage(GLcontext *ctx, /* do copy row by row */ for (row = 0; row < height; row++) { - src_surf->get_tile(src_surf, srcX, srcY + row, width, 1, data); + pipe->get_tile_rgba(pipe, src_surf, srcX, srcY + row, width, 1, data); /* XXX we're ignoring convolution for now */ if (ctx->_ImageTransferState) { @@ -1109,7 +1109,7 @@ fallback_copy_texsubimage(GLcontext *ctx, width, (GLfloat (*)[4])data); } - dest_surf->put_tile(dest_surf, destX, destY, width, 1, data); + pipe->put_tile_rgba(pipe, dest_surf, destX, destY, width, 1, data); destY += yStep; } -- cgit v1.2.3