diff options
author | Brian Paul <[email protected]> | 2011-02-17 10:09:37 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-02-17 10:13:33 -0700 |
commit | d1becefb057ce89eeb93e130cb0d0c63de4be3d8 (patch) | |
tree | 1534a430e99a0343b436ca8ada0871146829753b /src/mesa/state_tracker | |
parent | 1fa97ddb25c008c9edd0a137198eb89c3650d6fa (diff) |
st/mesa: fix incorrect glCopyPixels position on fallback path
If we hit the pipe_get/put_tile() path for setting up the glCopyPixels
texture we were passing the wrong x/y position to pipe_get_tile().
The x/y position was already accounted for in the pipe_get_transfer()
call so we were effectively reading from 2*readX, 2*readY.
NOTE: This is a candidate for the 7.9 and 7.10 branches.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_cb_drawpixels.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 07527002b4a..63b646be720 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -1284,7 +1284,8 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy, else { /* CPU-based fallback/conversion */ struct pipe_transfer *ptRead = - pipe_get_transfer(st->pipe, rbRead->texture, 0, 0, + pipe_get_transfer(st->pipe, rbRead->texture, + 0, 0, /* level, layer */ PIPE_TRANSFER_READ, readX, readY, readW, readH); struct pipe_transfer *ptTex; @@ -1308,7 +1309,7 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy, enum pipe_format readFormat, drawFormat; readFormat = util_format_linear(rbRead->texture->format); drawFormat = util_format_linear(pt->format); - pipe_get_tile_rgba_format(pipe, ptRead, readX, readY, readW, readH, + pipe_get_tile_rgba_format(pipe, ptRead, 0, 0, readW, readH, readFormat, buf); pipe_put_tile_rgba_format(pipe, ptTex, pack.SkipPixels, pack.SkipRows, readW, readH, drawFormat, buf); @@ -1317,7 +1318,7 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy, else { /* GL_DEPTH */ GLuint *buf = (GLuint *) malloc(width * height * sizeof(GLuint)); - pipe_get_tile_z(pipe, ptRead, readX, readY, readW, readH, buf); + pipe_get_tile_z(pipe, ptRead, 0, 0, readW, readH, buf); pipe_put_tile_z(pipe, ptTex, pack.SkipPixels, pack.SkipRows, readW, readH, buf); free(buf); |