summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_blit.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2011-02-03 14:45:40 +1000
committerDave Airlie <[email protected]>2011-02-04 09:09:44 +1000
commit4b49fcbb9a26680e9a4ef441668e0dd817529d47 (patch)
treed0e5352edad449215887177e65e15d55b815c404 /src/gallium/drivers/r600/r600_blit.c
parent5026841d5edc1f3c94e9057f7b331d4f56f0199a (diff)
r600g: flush depth texture before a blit from it.
If we are going to blit from a depth texture we need to flush it before we blit from it. Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_blit.c')
-rw-r--r--src/gallium/drivers/r600/r600_blit.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c
index bf21ab432ef..c11268ccca3 100644
--- a/src/gallium/drivers/r600/r600_blit.c
+++ b/src/gallium/drivers/r600/r600_blit.c
@@ -208,8 +208,14 @@ static void r600_resource_copy_region(struct pipe_context *ctx,
unsigned src_level,
const struct pipe_box *src_box)
{
+ struct r600_resource_texture *rsrc = (struct r600_resource_texture*)src;
+
+ if (rsrc->depth && !rsrc->is_flushing_texture)
+ r600_texture_depth_flush(ctx, src);
+
r600_hw_copy_region(ctx, dst, dst_level, dstx, dsty, dstz,
src, src_level, src_box);
+
}
void r600_init_blit_functions(struct r600_pipe_context *rctx)