summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_readpixels.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_cb_readpixels.c')
-rw-r--r--src/mesa/state_tracker/st_cb_readpixels.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c
index 8cc9cfac76..98ccda821c 100644
--- a/src/mesa/state_tracker/st_cb_readpixels.c
+++ b/src/mesa/state_tracker/st_cb_readpixels.c
@@ -63,7 +63,7 @@ st_read_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
GLvoid *pixels)
{
struct gl_framebuffer *fb = ctx->ReadBuffer;
- struct pipe_screen *screen = ctx->st->pipe->screen;
+ struct pipe_context *pipe = ctx->st->pipe;
struct st_renderbuffer *strb = st_renderbuffer(fb->_StencilBuffer);
struct pipe_transfer *pt;
ubyte *stmap;
@@ -81,7 +81,7 @@ st_read_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
width, height);
/* map the stencil buffer */
- stmap = screen->transfer_map(screen, pt);
+ stmap = pipe->transfer_map(pipe, pt);
/* width should never be > MAX_WIDTH since we did clipping earlier */
ASSERT(width <= MAX_WIDTH);
@@ -161,8 +161,8 @@ st_read_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
}
/* unmap the stencil buffer */
- screen->transfer_unmap(screen, pt);
- screen->tex_transfer_destroy(pt);
+ pipe->transfer_unmap(pipe, pt);
+ pipe->tex_transfer_destroy(pt);
}
@@ -234,7 +234,6 @@ st_fast_readpixels(GLcontext *ctx, struct st_renderbuffer *strb,
{
struct pipe_context *pipe = ctx->st->pipe;
- struct pipe_screen *screen = pipe->screen;
struct pipe_transfer *trans;
const GLubyte *map;
GLubyte *dst;
@@ -253,9 +252,9 @@ st_fast_readpixels(GLcontext *ctx, struct st_renderbuffer *strb,
return GL_FALSE;
}
- map = screen->transfer_map(screen, trans);
+ map = pipe->transfer_map(pipe, trans);
if (!map) {
- screen->tex_transfer_destroy(trans);
+ pipe->tex_transfer_destroy(trans);
return GL_FALSE;
}
@@ -317,8 +316,8 @@ st_fast_readpixels(GLcontext *ctx, struct st_renderbuffer *strb,
; /* nothing */
}
- screen->transfer_unmap(screen, trans);
- screen->tex_transfer_destroy(trans);
+ pipe->transfer_unmap(pipe, trans);
+ pipe->tex_transfer_destroy(trans);
}
return GL_TRUE;
@@ -337,7 +336,6 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
GLvoid *dest)
{
struct pipe_context *pipe = ctx->st->pipe;
- struct pipe_screen *screen = pipe->screen;
GLfloat temp[MAX_WIDTH][4];
const GLbitfield transferOps = ctx->_ImageTransferState;
GLsizei i, j;
@@ -541,7 +539,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
}
}
- screen->tex_transfer_destroy(trans);
+ pipe->tex_transfer_destroy(trans);
_mesa_unmap_pbo_dest(ctx, &clippedPacking);
}