From 8cd59857a99c534c560f58c931f5c2466d4c1f9b Mon Sep 17 00:00:00 2001 From: marha Date: Sun, 23 Jan 2011 16:30:09 +0000 Subject: mesalib git update 23/1/2011 --- mesalib/src/mesa/state_tracker/st_cb_drawpixels.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'mesalib/src/mesa/state_tracker/st_cb_drawpixels.c') 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 { -- cgit v1.2.3