From: Brian Paul Date: Thu, 15 Sep 2011 22:21:12 +0000 (-0600) Subject: softpipe: use pipe_get_tile_rgba_format() X-Git-Tag: 062012170305~4460 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=81c688babe6d2539d580429c3bfdc5fc1729ab0d;p=profile%2Fivi%2Fmesa.git softpipe: use pipe_get_tile_rgba_format() Pass an explicit surface format as we do with pipe_put_tile_rgba_format(). This fixes the piglit fbo-srgb-blit test. With GL_EXT_framebuffer_sRGB we override the resource's format with an explicit format (linear vs. sRGB). We need to do so both when getting and putting tiles. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40402 Reviewed-by: Dave Airlie --- diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c index 7372470..d3d9eb9 100644 --- a/src/gallium/drivers/softpipe/sp_tile_cache.c +++ b/src/gallium/drivers/softpipe/sp_tile_cache.c @@ -494,11 +494,12 @@ sp_find_cached_tile(struct softpipe_tile_cache *tc, tile->data.depth32, 0/*STRIDE*/); } else { - pipe_get_tile_rgba(tc->pipe, pt, - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - (float *) tile->data.color); + pipe_get_tile_rgba_format(tc->pipe, pt, + tc->tile_addrs[pos].bits.x * TILE_SIZE, + tc->tile_addrs[pos].bits.y * TILE_SIZE, + TILE_SIZE, TILE_SIZE, + tc->surface->format, + (float *) tile->data.color); } } }