summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_tile_cache.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2011-09-15 16:21:12 -0600
committerBrian Paul <brianp@vmware.com>2011-09-16 07:38:53 -0600
commit81c688babe6d2539d580429c3bfdc5fc1729ab0d (patch)
treeb50d81a6803a7890de71ea77c955f82783932405 /src/gallium/drivers/softpipe/sp_tile_cache.c
parent89999204eca233b879ed055aaf2c6a299c263b16 (diff)
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 <airlied@redhat.com>
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_tile_cache.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_tile_cache.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c
index 73724706744..d3d9eb98d34 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);
}
}
}