summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600/r600_blit.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-02-03 13:12:35 +1000
committerDave Airlie <airlied@redhat.com>2011-02-03 14:17:05 +1000
commitb13b7b86b2e1165b24a2df20cb67f9f3baa17b13 (patch)
treee984009ca1abccc8643dff5623d885cb443bc85b /src/gallium/drivers/r600/r600_blit.c
parentd0293290ad620084d490b51693d97731a8935094 (diff)
r600g: rework dirty / depth texture tracking.
this adds a flag to keep track of whether the depth texture structure is the flushed texture or not, so we can avoid doing flushes when we do a hw rendering from one to the other. it also renames flushed to dirty_db which tracks if the DB copy has been dirtied by being bound to the hw. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/gallium/drivers/r600/r600_blit.c')
-rw-r--r--src/gallium/drivers/r600/r600_blit.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c
index a8e85df3c4..ca03281104 100644
--- a/src/gallium/drivers/r600/r600_blit.c
+++ b/src/gallium/drivers/r600/r600_blit.c
@@ -85,7 +85,8 @@ void r600_blit_uncompress_depth(struct pipe_context *ctx, struct r600_resource_t
int level = 0;
float depth = 1.0f;
- if (texture->flushed) return;
+ if (!texture->dirty_db)
+ return;
surf_tmpl.format = texture->resource.base.b.format;
surf_tmpl.u.tex.level = level;
@@ -107,10 +108,11 @@ void r600_blit_uncompress_depth(struct pipe_context *ctx, struct r600_resource_t
r600_blitter_begin(ctx, R600_CLEAR_SURFACE);
util_blitter_custom_depth_stencil(rctx->blitter, zsurf, cbsurf, rctx->custom_dsa_flush, depth);
r600_blitter_end(ctx);
- texture->flushed = true;
pipe_surface_reference(&zsurf, NULL);
pipe_surface_reference(&cbsurf, NULL);
+
+ texture->dirty_db = FALSE;
}
void r600_flush_depth_textures(struct r600_pipe_context *rctx)
@@ -132,9 +134,6 @@ void r600_flush_depth_textures(struct r600_pipe_context *rctx)
if (!tex->depth)
continue;
- if (tex->tile_type == 0)
- continue;
-
r600_blit_uncompress_depth(&rctx->context, tex);
}
}