From: Brian Paul Date: Thu, 26 May 2011 00:16:03 +0000 (-0600) Subject: st/mesa: simplify some st_context(ctx)->pipe code X-Git-Tag: mesa-7.11-rc1~572 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e06803c2c6cf83009708b23d3ebafc0ea3dc525;p=platform%2Fupstream%2Fmesa.git st/mesa: simplify some st_context(ctx)->pipe code --- diff --git a/src/mesa/state_tracker/st_atom_pixeltransfer.c b/src/mesa/state_tracker/st_atom_pixeltransfer.c index 57430b3..95b706c 100644 --- a/src/mesa/state_tracker/st_atom_pixeltransfer.c +++ b/src/mesa/state_tracker/st_atom_pixeltransfer.c @@ -121,7 +121,7 @@ load_color_map_texture(struct gl_context *ctx, struct pipe_resource *pt) uint *dest; uint i, j; - transfer = pipe_get_transfer(st_context(ctx)->pipe, + transfer = pipe_get_transfer(pipe, pt, 0, 0, PIPE_TRANSFER_WRITE, 0, 0, texSize, texSize); dest = (uint *) pipe_transfer_map(pipe, transfer); diff --git a/src/mesa/state_tracker/st_cb_accum.c b/src/mesa/state_tracker/st_cb_accum.c index 3e01c44..3e3659d 100644 --- a/src/mesa/state_tracker/st_cb_accum.c +++ b/src/mesa/state_tracker/st_cb_accum.c @@ -248,7 +248,7 @@ accum_return(struct gl_context *ctx, GLfloat value, else usage = PIPE_TRANSFER_WRITE; - color_trans = pipe_get_transfer(st_context(ctx)->pipe, + color_trans = pipe_get_transfer(pipe, color_strb->texture, 0, 0, usage, xpos, ypos, diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c index 1e489b2..7374bb0 100644 --- a/src/mesa/state_tracker/st_cb_bufferobjects.c +++ b/src/mesa/state_tracker/st_cb_bufferobjects.c @@ -222,8 +222,7 @@ st_bufferobj_data(struct gl_context *ctx, } if (data) - pipe_buffer_write(st_context(ctx)->pipe, st_obj->buffer, 0, - size, data); + pipe_buffer_write(pipe, st_obj->buffer, 0, size, data); return GL_TRUE; } diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 94bede7..29c1df4 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -793,7 +793,7 @@ draw_stencil_pixels(struct gl_context *ctx, GLint x, GLint y, else usage = PIPE_TRANSFER_WRITE; - pt = pipe_get_transfer(st_context(ctx)->pipe, strb->texture, + pt = pipe_get_transfer(pipe, strb->texture, strb->rtt_level, strb->rtt_face + strb->rtt_slice, usage, x, y, width, height); @@ -1131,7 +1131,7 @@ copy_stencil_pixels(struct gl_context *ctx, GLint srcx, GLint srcy, dsty = rbDraw->Base.Height - dsty - height; } - ptDraw = pipe_get_transfer(st_context(ctx)->pipe, + ptDraw = pipe_get_transfer(pipe, rbDraw->texture, rbDraw->rtt_level, rbDraw->rtt_face + rbDraw->rtt_slice, diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index a27c30e..9d824b4 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -807,7 +807,7 @@ decompress_with_blit(struct gl_context * ctx, GLenum target, GLint level, PIPE_TEX_MIPFILTER_NEAREST); /* map the dst_surface so we can read from it */ - tex_xfer = pipe_get_transfer(st_context(ctx)->pipe, + tex_xfer = pipe_get_transfer(pipe, dst_texture, 0, 0, PIPE_TRANSFER_READ, 0, 0, width, height); @@ -1228,7 +1228,7 @@ fallback_copy_texsubimage(struct gl_context *ctx, GLenum target, GLint level, srcY = strb->Base.Height - srcY - height; } - src_trans = pipe_get_transfer(st_context(ctx)->pipe, + src_trans = pipe_get_transfer(pipe, strb->texture, 0, 0, PIPE_TRANSFER_READ, diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c index aea69c1..b34794f 100644 --- a/src/mesa/state_tracker/st_gen_mipmap.c +++ b/src/mesa/state_tracker/st_gen_mipmap.c @@ -229,12 +229,12 @@ fallback_generate_mipmap(struct gl_context *ctx, GLenum target, ubyte *dstData; int srcStride, dstStride; - srcTrans = pipe_get_transfer(st_context(ctx)->pipe, pt, srcLevel, + srcTrans = pipe_get_transfer(pipe, pt, srcLevel, face, PIPE_TRANSFER_READ, 0, 0, srcWidth, srcHeight); - dstTrans = pipe_get_transfer(st_context(ctx)->pipe, pt, dstLevel, + dstTrans = pipe_get_transfer(pipe, pt, dstLevel, face, PIPE_TRANSFER_WRITE, 0, 0, dstWidth, dstHeight);