r600g: don't flush depth textures set as colorbuffers
authorMarek Olšák <maraeo@gmail.com>
Sun, 8 Jul 2012 01:10:37 +0000 (03:10 +0200)
committerMarek Olšák <maraeo@gmail.com>
Thu, 12 Jul 2012 00:08:31 +0000 (02:08 +0200)
The only case a depth buffer can be set as a color buffer is when flushing.

That wasn't always the case, but now this code isn't required anymore.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/r600/r600_blit.c

index 23e3190b744b846ee907151a6279aefc68373dc2..fff48a41adfcb8631bbe496c9b1ccd1d12490008 100644 (file)
@@ -212,26 +212,8 @@ static void r600_flush_depth_textures(struct r600_context *rctx,
 
 void r600_flush_all_depth_textures(struct r600_context *rctx)
 {
-       unsigned i;
-
        r600_flush_depth_textures(rctx, &rctx->ps_samplers);
        r600_flush_depth_textures(rctx, &rctx->vs_samplers);
-
-       /* also check CB here */
-       for (i = 0; i < rctx->framebuffer.nr_cbufs; i++) {
-               struct r600_resource_texture *tex;
-               struct pipe_surface *surf = rctx->framebuffer.cbufs[i];
-               tex = (struct r600_resource_texture *)surf->texture;
-
-               if (!tex->is_depth || tex->is_flushing_texture)
-                       continue;
-
-               r600_blit_uncompress_depth(&rctx->context, tex, NULL,
-                                          surf->u.tex.level,
-                                          surf->u.tex.level,
-                                          surf->u.tex.first_layer,
-                                          surf->u.tex.last_layer);
-       }
 }
 
 static void r600_clear(struct pipe_context *ctx, unsigned buffers,