st/mesa: simplify some st_context(ctx)->pipe code
authorBrian Paul <brianp@vmware.com>
Thu, 26 May 2011 00:16:03 +0000 (18:16 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 26 May 2011 00:16:03 +0000 (18:16 -0600)
src/mesa/state_tracker/st_atom_pixeltransfer.c
src/mesa/state_tracker/st_cb_accum.c
src/mesa/state_tracker/st_cb_bufferobjects.c
src/mesa/state_tracker/st_cb_drawpixels.c
src/mesa/state_tracker/st_cb_texture.c
src/mesa/state_tracker/st_gen_mipmap.c

index 57430b36f8d3bc2d3d4d28f311cae2dd6c9210c3..95b706cb96c7ca1f42aea545097ef64b13d89c72 100644 (file)
@@ -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);
index 3e01c440bdad0f8a700b6ab90c115dfa28f64216..3e3659d15714cc43dd1511ef1281bb41f189ecda 100644 (file)
@@ -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,
index 1e489b29d931fc186ecf96d1e80192c3adc2bd56..7374bb0acc5ae68dbdf50e6cc7cef2bf4f5ce6c2 100644 (file)
@@ -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;
    }
 
index 94bede73daf2b3dcece5e3b11f4aac9f3db0169b..29c1df4ae5c13bbdde13ba4e75972fa9f43ae99d 100644 (file)
@@ -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,
index a27c30e51fe0b6c9b7729d5da06f41d96df125a5..9d824b46c2333679962e1276a37b4d8f3ff3a32c 100644 (file)
@@ -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,
index aea69c1b434fa02523fa7062c3a81327f95de73f..b34794f1b240fe9a54a45fc6b70699ce54d1dfdc 100644 (file)
@@ -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);