From 0ccc653c707d8eeb793fa261f2bfa60f5ff53792 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Wed, 20 Aug 2014 14:36:53 +0200 Subject: r600g: enable fast depth clear for array textures and cubemaps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I have a piglit test that hits this. Acked-by: Michel Dänzer --- src/gallium/drivers/r600/r600_blit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c index a3cfdae6b73..0f438399432 100644 --- a/src/gallium/drivers/r600/r600_blit.c +++ b/src/gallium/drivers/r600/r600_blit.c @@ -429,7 +429,8 @@ static void r600_clear(struct pipe_context *ctx, unsigned buffers, */ /* Only use htile for first level */ if (rtex->htile_buffer && !level && - util_max_layer(&rtex->resource.b.b, level) == 0) { + fb->zsbuf->u.tex.first_layer == 0 && + fb->zsbuf->u.tex.last_layer == util_max_layer(&rtex->resource.b.b, level)) { if (rtex->depth_clear_value != depth) { rtex->depth_clear_value = depth; rctx->db_state.atom.dirty = true; -- cgit v1.2.3