diff options
author | Dave Airlie <[email protected]> | 2011-02-04 09:06:02 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2011-02-04 09:09:44 +1000 |
commit | 446bc12c1760fe5d402cdd519a7f0e42d89b9696 (patch) | |
tree | 76af23f9ac4648caf8946d1b2ff30fa8ab84c1cf | |
parent | 4b49fcbb9a26680e9a4ef441668e0dd817529d47 (diff) |
r600g: also check CB bindings for textures to depth flush.
This checks the color buffer bindings to make sure there is something
to flush.
Signed-off-by: Dave Airlie <[email protected]>
-rw-r--r-- | src/gallium/drivers/r600/r600_blit.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c index c11268ccca3..1a1908031f0 100644 --- a/src/gallium/drivers/r600/r600_blit.c +++ b/src/gallium/drivers/r600/r600_blit.c @@ -136,6 +136,17 @@ void r600_flush_depth_textures(struct r600_pipe_context *rctx) r600_blit_uncompress_depth(&rctx->context, tex); } + + /* also check CB here */ + for (i = 0; i < rctx->framebuffer.nr_cbufs; i++) { + struct r600_resource_texture *tex; + tex = (struct r600_resource_texture *)rctx->framebuffer.cbufs[i]->texture; + + if (!tex->depth) + continue; + + r600_blit_uncompress_depth(&rctx->context, tex); + } } static void r600_clear(struct pipe_context *ctx, unsigned buffers, |