From 38b54158b68479e1f97c8452ba0d67f50dce7582 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Sun, 30 Jan 2011 18:57:39 +0100 Subject: r600g: Update the flushed depth texture after drawing to the corresponding texture. I know Jerome will probably rewrite the way depth textures work sometime soon. For the time being this should at least make common depth texture usage for shadowing work properly though. --- src/gallium/drivers/r600/r600_state_common.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/gallium/drivers/r600/r600_state_common.c') diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index 2df8188f0a..e086e272c8 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -496,6 +496,8 @@ void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info) struct r600_drawl draw = {}; unsigned prim; + r600_flush_depth_textures(rctx); + if (rctx->vertex_elements->incompatible_layout) { r600_begin_vertex_translate(rctx, info->min_index, info->max_index); } @@ -597,6 +599,12 @@ void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info) r600_context_draw(&rctx->ctx, &rdraw); } + if (rctx->framebuffer.zsbuf) + { + struct pipe_resource *tex = rctx->framebuffer.zsbuf->texture; + ((struct r600_resource_texture *)tex)->flushed = false; + } + pipe_resource_reference(&draw.index_buffer, NULL); /* delete previous translated vertex elements */ -- cgit v1.2.3