summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2014-08-20 14:36:53 +0200
committerMarek Olšák <marek.olsak@amd.com>2014-09-01 21:18:37 +0200
commit0ccc653c707d8eeb793fa261f2bfa60f5ff53792 (patch)
tree5367fc19874a5bce1370bbd3a93c0ae9ba86ead8 /src/gallium/drivers/r600
parent6d751065cca931798f2ad9e68f936d3d41886e4f (diff)
r600g: enable fast depth clear for array textures and cubemaps
I have a piglit test that hits this. Acked-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/r600_blit.c3
1 files changed, 2 insertions, 1 deletions
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;