aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-01-23 16:38:21 +0000
committermarha <marha@users.sourceforge.net>2011-01-23 16:38:21 +0000
commit174c4371f04f7a77979614fb7f3633807bd428ec (patch)
tree32722d1e5ed3c6a42b63dbf9bf0248789d23a772 /mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
parentf544012f5c37fba02cae71b39a533f8296cdabb5 (diff)
downloadvcxsrv-174c4371f04f7a77979614fb7f3633807bd428ec.tar.gz
vcxsrv-174c4371f04f7a77979614fb7f3633807bd428ec.tar.bz2
vcxsrv-174c4371f04f7a77979614fb7f3633807bd428ec.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_cb_drawpixels.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_drawpixels.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
index c4906d25d..8d3eece4d 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -1302,9 +1302,13 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
if (type == GL_COLOR) {
/* alternate path using get/put_tile() */
GLfloat *buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- pipe_get_tile_rgba(pipe, ptRead, readX, readY, readW, readH, buf);
- pipe_put_tile_rgba(pipe, ptTex, pack.SkipPixels, pack.SkipRows,
- readW, readH, buf);
+ 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,
+ readFormat, buf);
+ pipe_put_tile_rgba_format(pipe, ptTex, pack.SkipPixels, pack.SkipRows,
+ readW, readH, drawFormat, buf);
free(buf);
}
else {