From e2f623f1d6da9bc987582ff68d0471061ae44030 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sat, 28 Jul 2012 13:55:59 +0200 Subject: r600g: don't decompress depth or stencil if there isn't any --- src/gallium/drivers/r600/r600_state.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/r600/r600_state.c') diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index 82f5ffb16f3..9d9ee1f0de2 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -1684,8 +1684,10 @@ static void r600_emit_db_misc_state(struct r600_context *rctx, struct r600_atom db_render_override |= S_028D10_NOOP_CULL_DISABLE(1); } if (a->flush_depthstencil_through_cb) { - db_render_control |= S_028D0C_DEPTH_COPY_ENABLE(1) | - S_028D0C_STENCIL_COPY_ENABLE(1) | + assert(a->copy_depth || a->copy_stencil); + + db_render_control |= S_028D0C_DEPTH_COPY_ENABLE(a->copy_depth) | + S_028D0C_STENCIL_COPY_ENABLE(a->copy_stencil) | S_028D0C_COPY_CENTROID(1); } -- cgit v1.2.3