From b13b7b86b2e1165b24a2df20cb67f9f3baa17b13 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 3 Feb 2011 13:12:35 +1000 Subject: 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 --- src/gallium/drivers/r600/r600_blit.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/gallium/drivers/r600/r600_blit.c') 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); } } -- cgit v1.2.3