radeonsi: use max_zplanes after the last write

Fixes: c0f723ce2b ("radeonsi: allow and finish TC-compatible MSAA HTILE")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14089>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2021-12-06 21:15:33 +01:00 committed by Marge Bot
parent 84fea554e3
commit 51e772586c

View file

@ -3320,8 +3320,6 @@ static void si_emit_framebuffer_state(struct si_context *sctx)
if (tex->db_render_format == PIPE_FORMAT_Z16_UNORM && tex->buffer.b.b.nr_samples > 1)
max_zplanes = 2;
db_z_info |= S_028038_DECOMPRESS_ON_N_ZPLANES(max_zplanes + 1);
if (sctx->chip_class >= GFX10) {
bool iterate256 = tex->buffer.b.b.nr_samples >= 2;
db_z_info |= S_028040_ITERATE_FLUSH(1) |
@ -3338,6 +3336,8 @@ static void si_emit_framebuffer_state(struct si_context *sctx)
db_z_info |= S_028038_ITERATE_FLUSH(1);
db_stencil_info |= S_02803C_ITERATE_FLUSH(1);
}
db_z_info |= S_028038_DECOMPRESS_ON_N_ZPLANES(max_zplanes + 1);
}
unsigned level = zb->base.u.tex.level;