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:30:09 +0000
committermarha <marha@users.sourceforge.net>2011-01-23 16:30:09 +0000
commit8cd59857a99c534c560f58c931f5c2466d4c1f9b (patch)
treefd9f3d3f8c557611c1fc509cb947e826b3da1999 /mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
parentb8ffa56f8bda74a402eae0c89aadfda7b7db507f (diff)
downloadvcxsrv-8cd59857a99c534c560f58c931f5c2466d4c1f9b.tar.gz
vcxsrv-8cd59857a99c534c560f58c931f5c2466d4c1f9b.tar.bz2
vcxsrv-8cd59857a99c534c560f58c931f5c2466d4c1f9b.zip
mesalib git update 23/1/2011
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 {