summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2010-03-11 16:10:25 +0000
committerKeith Whitwell <[email protected]>2010-03-11 16:18:50 +0000
commitd35ecca5ee231c072687578642e0c22c6c0590b1 (patch)
tree18059c07c64142ebf5dd7b1b674e9426418f3f6b /src/mesa
parentb43c182f19c6291c88420fa12714f952c2b461fb (diff)
gallium: remove pipe_context member from pipe_transfer
There was very little use for this beyond permitting the pipe_context::tex_transfer_destroy() function to omit the pipe_context argument. This change adds the pipe_context argument into tex_transfer_destroy() so that it looks like other pipe_context functions, and removes the pipe_context pointer from pipe_transfer.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_atom_pixeltransfer.c2
-rw-r--r--src/mesa/state_tracker/st_cb_accum.c14
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.c8
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c18
-rw-r--r--src/mesa/state_tracker/st_cb_readpixels.c22
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c12
-rw-r--r--src/mesa/state_tracker/st_gen_mipmap.c4
-rw-r--r--src/mesa/state_tracker/st_texture.c4
8 files changed, 42 insertions, 42 deletions
diff --git a/src/mesa/state_tracker/st_atom_pixeltransfer.c b/src/mesa/state_tracker/st_atom_pixeltransfer.c
index b066f5c94b7..b446b2079cf 100644
--- a/src/mesa/state_tracker/st_atom_pixeltransfer.c
+++ b/src/mesa/state_tracker/st_atom_pixeltransfer.c
@@ -172,7 +172,7 @@ load_color_map_texture(GLcontext *ctx, struct pipe_texture *pt)
}
pipe->transfer_unmap(pipe, transfer);
- pipe->tex_transfer_destroy(transfer);
+ pipe->tex_transfer_destroy(pipe, transfer);
}
diff --git a/src/mesa/state_tracker/st_cb_accum.c b/src/mesa/state_tracker/st_cb_accum.c
index 69a96e5d10c..01aba3e3dd4 100644
--- a/src/mesa/state_tracker/st_cb_accum.c
+++ b/src/mesa/state_tracker/st_cb_accum.c
@@ -144,7 +144,7 @@ accum_accum(struct st_context *st, GLfloat value,
buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- pipe_get_tile_rgba(color_trans, 0, 0, width, height, buf);
+ pipe_get_tile_rgba(pipe, color_trans, 0, 0, width, height, buf);
switch (acc_strb->format) {
case PIPE_FORMAT_R16G16B16A16_SNORM:
@@ -165,7 +165,7 @@ accum_accum(struct st_context *st, GLfloat value,
}
free(buf);
- pipe->tex_transfer_destroy(color_trans);
+ pipe->tex_transfer_destroy(pipe, color_trans);
}
@@ -192,7 +192,7 @@ accum_load(struct st_context *st, GLfloat value,
buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- pipe_get_tile_rgba(color_trans, 0, 0, width, height, buf);
+ pipe_get_tile_rgba(pipe, color_trans, 0, 0, width, height, buf);
switch (acc_strb->format) {
case PIPE_FORMAT_R16G16B16A16_SNORM:
@@ -213,7 +213,7 @@ accum_load(struct st_context *st, GLfloat value,
}
free(buf);
- pipe->tex_transfer_destroy(color_trans);
+ pipe->tex_transfer_destroy(pipe, color_trans);
}
@@ -248,7 +248,7 @@ accum_return(GLcontext *ctx, GLfloat value,
width, height);
if (usage & PIPE_TRANSFER_READ)
- pipe_get_tile_rgba(color_trans, 0, 0, width, height, buf);
+ pipe_get_tile_rgba(pipe, color_trans, 0, 0, width, height, buf);
switch (acc_strb->format) {
case PIPE_FORMAT_R16G16B16A16_SNORM:
@@ -277,10 +277,10 @@ accum_return(GLcontext *ctx, GLfloat value,
_mesa_problem(NULL, "unexpected format in st_clear_accum_buffer()");
}
- pipe_put_tile_rgba(color_trans, 0, 0, width, height, buf);
+ pipe_put_tile_rgba(pipe, color_trans, 0, 0, width, height, buf);
free(buf);
- pipe->tex_transfer_destroy(color_trans);
+ pipe->tex_transfer_destroy(pipe, color_trans);
}
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
index 723c5f180b7..dfd8925edf4 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -295,7 +295,7 @@ make_bitmap_texture(GLcontext *ctx, GLsizei width, GLsizei height,
/* Release transfer */
pipe->transfer_unmap(pipe, transfer);
- pipe->tex_transfer_destroy(transfer);
+ pipe->tex_transfer_destroy(pipe, transfer);
return pt;
}
@@ -530,7 +530,7 @@ reset_cache(struct st_context *st)
cache->ymax = -1000000;
if (cache->trans) {
- pipe->tex_transfer_destroy(cache->trans);
+ pipe->tex_transfer_destroy(pipe, cache->trans);
cache->trans = NULL;
}
@@ -616,7 +616,7 @@ st_flush_bitmap_cache(struct st_context *st)
pipe->transfer_unmap(pipe, cache->trans);
cache->buffer = NULL;
- pipe->tex_transfer_destroy(cache->trans);
+ pipe->tex_transfer_destroy(pipe, cache->trans);
cache->trans = NULL;
}
@@ -836,7 +836,7 @@ st_destroy_bitmap(struct st_context *st)
if (cache) {
if (cache->trans) {
pipe->transfer_unmap(pipe, cache->trans);
- pipe->tex_transfer_destroy(cache->trans);
+ pipe->tex_transfer_destroy(pipe, cache->trans);
}
pipe_texture_reference(&st->bitmap.cache->texture, NULL);
free(st->bitmap.cache);
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 3fa6d12f1c3..c44d0fc3e86 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -411,7 +411,7 @@ make_texture(struct st_context *st,
/* unmap */
pipe->transfer_unmap(pipe, transfer);
- pipe->tex_transfer_destroy(transfer);
+ pipe->tex_transfer_destroy(pipe, transfer);
assert(success);
@@ -791,7 +791,7 @@ draw_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
/* unmap the stencil buffer */
pipe->transfer_unmap(pipe, pt);
- pipe->tex_transfer_destroy(pt);
+ pipe->tex_transfer_destroy(pipe, pt);
}
@@ -944,7 +944,7 @@ copy_stencil_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
/* unmap the stencil buffer */
pipe->transfer_unmap(pipe, ptDraw);
- pipe->tex_transfer_destroy(ptDraw);
+ pipe->tex_transfer_destroy(pipe, ptDraw);
}
@@ -1113,21 +1113,21 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
/* alternate path using get/put_tile() */
GLfloat *buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- pipe_get_tile_rgba(ptRead, 0, 0, width, height, buf);
- pipe_put_tile_rgba(ptTex, 0, 0, width, height, buf);
+ pipe_get_tile_rgba(pipe, ptRead, 0, 0, width, height, buf);
+ pipe_put_tile_rgba(pipe, ptTex, 0, 0, width, height, buf);
free(buf);
}
else {
/* GL_DEPTH */
GLuint *buf = (GLuint *) malloc(width * height * sizeof(GLuint));
- pipe_get_tile_z(ptRead, 0, 0, width, height, buf);
- pipe_put_tile_z(ptTex, 0, 0, width, height, buf);
+ pipe_get_tile_z(pipe, ptRead, 0, 0, width, height, buf);
+ pipe_put_tile_z(pipe, ptTex, 0, 0, width, height, buf);
free(buf);
}
- pipe->tex_transfer_destroy(ptRead);
- pipe->tex_transfer_destroy(ptTex);
+ pipe->tex_transfer_destroy(pipe, ptRead);
+ pipe->tex_transfer_destroy(pipe, ptTex);
}
/* draw textured quad */
diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c
index 98ccda821c6..080a5f9bfb8 100644
--- a/src/mesa/state_tracker/st_cb_readpixels.c
+++ b/src/mesa/state_tracker/st_cb_readpixels.c
@@ -162,7 +162,7 @@ st_read_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
/* unmap the stencil buffer */
pipe->transfer_unmap(pipe, pt);
- pipe->tex_transfer_destroy(pt);
+ pipe->tex_transfer_destroy(pipe, pt);
}
@@ -254,7 +254,7 @@ st_fast_readpixels(GLcontext *ctx, struct st_renderbuffer *strb,
map = pipe->transfer_map(pipe, trans);
if (!map) {
- pipe->tex_transfer_destroy(trans);
+ pipe->tex_transfer_destroy(pipe, trans);
return GL_FALSE;
}
@@ -317,7 +317,7 @@ st_fast_readpixels(GLcontext *ctx, struct st_renderbuffer *strb,
}
pipe->transfer_unmap(pipe, trans);
- pipe->tex_transfer_destroy(trans);
+ pipe->tex_transfer_destroy(pipe, trans);
}
return GL_TRUE;
@@ -441,7 +441,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
GLuint ztemp[MAX_WIDTH];
GLfloat zfloat[MAX_WIDTH];
const double scale = 1.0 / ((1 << 24) - 1);
- pipe_get_tile_raw(trans, 0, y, width, 1, ztemp, 0);
+ pipe_get_tile_raw(pipe, trans, 0, y, width, 1, ztemp, 0);
y += yStep;
for (j = 0; j < width; j++) {
zfloat[j] = (float) (scale * (ztemp[j] & 0xffffff));
@@ -456,7 +456,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
assert(format == GL_DEPTH_STENCIL_EXT);
for (i = 0; i < height; i++) {
GLuint *zshort = (GLuint *)dst;
- pipe_get_tile_raw(trans, 0, y, width, 1, dst, 0);
+ pipe_get_tile_raw(pipe, trans, 0, y, width, 1, dst, 0);
y += yStep;
/* Reverse into 24/8 */
for (j = 0; j < width; j++) {
@@ -473,7 +473,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
GLuint ztemp[MAX_WIDTH];
GLfloat zfloat[MAX_WIDTH];
const double scale = 1.0 / ((1 << 24) - 1);
- pipe_get_tile_raw(trans, 0, y, width, 1, ztemp, 0);
+ pipe_get_tile_raw(pipe, trans, 0, y, width, 1, ztemp, 0);
y += yStep;
for (j = 0; j < width; j++) {
zfloat[j] = (float) (scale * ((ztemp[j] >> 8) & 0xffffff));
@@ -487,7 +487,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
/* XXX: unreachable code -- should be before st_read_stencil_pixels */
assert(format == GL_DEPTH_STENCIL_EXT);
for (i = 0; i < height; i++) {
- pipe_get_tile_raw(trans, 0, y, width, 1, dst, 0);
+ pipe_get_tile_raw(pipe, trans, 0, y, width, 1, dst, 0);
y += yStep;
dst += dstStride;
}
@@ -498,7 +498,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
GLushort ztemp[MAX_WIDTH];
GLfloat zfloat[MAX_WIDTH];
const double scale = 1.0 / 0xffff;
- pipe_get_tile_raw(trans, 0, y, width, 1, ztemp, 0);
+ pipe_get_tile_raw(pipe, trans, 0, y, width, 1, ztemp, 0);
y += yStep;
for (j = 0; j < width; j++) {
zfloat[j] = (float) (scale * ztemp[j]);
@@ -513,7 +513,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
GLuint ztemp[MAX_WIDTH];
GLfloat zfloat[MAX_WIDTH];
const double scale = 1.0 / 0xffffffff;
- pipe_get_tile_raw(trans, 0, y, width, 1, ztemp, 0);
+ pipe_get_tile_raw(pipe, trans, 0, y, width, 1, ztemp, 0);
y += yStep;
for (j = 0; j < width; j++) {
zfloat[j] = (float) (scale * ztemp[j]);
@@ -527,7 +527,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
/* RGBA format */
/* Do a row at a time to flip image data vertically */
for (i = 0; i < height; i++) {
- pipe_get_tile_rgba(trans, 0, y, width, 1, df);
+ pipe_get_tile_rgba(pipe, trans, 0, y, width, 1, df);
y += yStep;
df += dfStride;
if (!dfStride) {
@@ -539,7 +539,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
}
}
- pipe->tex_transfer_destroy(trans);
+ pipe->tex_transfer_destroy(pipe, trans);
_mesa_unmap_pbo_dest(ctx, &clippedPacking);
}
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 1b20b615d0f..626e6ad660d 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -435,7 +435,7 @@ compress_with_blit(GLcontext * ctx,
unpack); /* source data packing */
pipe->transfer_unmap(pipe, tex_xfer);
- pipe->tex_transfer_destroy(tex_xfer);
+ pipe->tex_transfer_destroy(pipe, tex_xfer);
/* copy / compress image */
util_blit_pixels_tex(ctx->st->blit,
@@ -873,7 +873,7 @@ decompress_with_blit(GLcontext * ctx, GLenum target, GLint level,
debug_printf("%s: fallback format translation\n", __FUNCTION__);
/* get float[4] rgba row from surface */
- pipe_get_tile_rgba(tex_xfer, 0, row, width, 1, rgba);
+ pipe_get_tile_rgba(pipe, tex_xfer, 0, row, width, 1, rgba);
_mesa_pack_rgba_span_float(ctx, width, (GLfloat (*)[4]) rgba, format,
type, dest, &ctx->Pack, transferOps);
@@ -1310,11 +1310,11 @@ fallback_copy_texsubimage(GLcontext *ctx, GLenum target, GLint level,
/* To avoid a large temp memory allocation, do copy row by row */
for (row = 0; row < height; row++, srcY += yStep) {
uint data[MAX_WIDTH];
- pipe_get_tile_z(src_trans, 0, srcY, width, 1, data);
+ pipe_get_tile_z(pipe, src_trans, 0, srcY, width, 1, data);
if (scaleOrBias) {
_mesa_scale_and_bias_depth_uint(ctx, width, data);
}
- pipe_put_tile_z(stImage->transfer, 0, row, width, 1, data);
+ pipe_put_tile_z(pipe, stImage->transfer, 0, row, width, 1, data);
}
}
else {
@@ -1336,7 +1336,7 @@ fallback_copy_texsubimage(GLcontext *ctx, GLenum target, GLint level,
/* XXX this usually involves a lot of int/float conversion.
* try to avoid that someday.
*/
- pipe_get_tile_rgba(src_trans, 0, 0, width, height, tempSrc);
+ pipe_get_tile_rgba(pipe, src_trans, 0, 0, width, height, tempSrc);
/* Store into texture memory.
* Note that this does some special things such as pixel transfer
@@ -1364,7 +1364,7 @@ fallback_copy_texsubimage(GLcontext *ctx, GLenum target, GLint level,
}
st_texture_image_unmap(ctx->st, stImage);
- pipe->tex_transfer_destroy(src_trans);
+ pipe->tex_transfer_destroy(pipe, src_trans);
}
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c
index a73b8ed8fe3..b2521433c87 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/src/mesa/state_tracker/st_gen_mipmap.c
@@ -163,8 +163,8 @@ fallback_generate_mipmap(GLcontext *ctx, GLenum target,
pipe->transfer_unmap(pipe, srcTrans);
pipe->transfer_unmap(pipe, dstTrans);
- pipe->tex_transfer_destroy(srcTrans);
- pipe->tex_transfer_destroy(dstTrans);
+ pipe->tex_transfer_destroy(pipe, srcTrans);
+ pipe->tex_transfer_destroy(pipe, dstTrans);
}
}
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
index f1eef768ebc..10a38befb41 100644
--- a/src/mesa/state_tracker/st_texture.c
+++ b/src/mesa/state_tracker/st_texture.c
@@ -217,7 +217,7 @@ st_texture_image_unmap(struct st_context *st,
pipe->transfer_unmap(pipe, stImage->transfer);
- pipe->tex_transfer_destroy(stImage->transfer);
+ pipe->tex_transfer_destroy(pipe, stImage->transfer);
}
@@ -284,7 +284,7 @@ st_texture_image_data(struct st_context *st,
u_minify(dst->width0, level),
u_minify(dst->height0, level)); /* width, height */
- pipe->tex_transfer_destroy(dst_transfer);
+ pipe->tex_transfer_destroy(pipe, dst_transfer);
srcUB += src_image_stride;
}