[Mesa-dev] [PATCH 3/7] r600g: enable fast depth clear for array textures and cubemaps
Marek Olšák
maraeo at gmail.com
Thu Aug 21 08:52:06 PDT 2014
From: Marek Olšák <marek.olsak at amd.com>
I have a piglit test that hits this.
---
src/gallium/drivers/r600/r600_blit.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c
index a3cfdae..0f43839 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;
--
1.9.1
More information about the mesa-dev
mailing list