[Mesa-stable] [PATCH 2/2] radeonsi: work around an MSAA fast stencil clear problem
Nicolai Hähnle
nhaehnle at gmail.com
Wed Apr 27 16:22:54 UTC 2016
Hi Emil,
I forgot to add Cc: 11.2 stable on the patches
7a215a3e274e7c793ab9c015004f5323cf85a50c "radeonsi: expclear must be
disabled on first Z/S clear"
8c43c06e0463515c1339d44cbb8f78169e6a06fb "radeonsi: work around an MSAA
fast stencil clear problem"
Fast stencil clear was added in 11.2, so these two patches should be
added there as well.
Thanks,
Nicolai
On 22.04.2016 17:31, Nicolai Hähnle wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>
> A piglit test (arb_texture_multisample-stencil-clear) has been sent.
> This problem was discovered analyzing
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93767
> ---
> src/gallium/drivers/radeonsi/si_state.c | 18 +++++++++++++++---
> 1 file changed, 15 insertions(+), 3 deletions(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
> index 7ae6e8a..eb733f4 100644
> --- a/src/gallium/drivers/radeonsi/si_state.c
> +++ b/src/gallium/drivers/radeonsi/si_state.c
> @@ -2383,9 +2383,21 @@ static void si_init_depth_surface(struct si_context *sctx,
> z_info |= S_028040_TILE_SURFACE_ENABLE(1) |
> S_028040_ALLOW_EXPCLEAR(1);
>
> - if (rtex->surface.flags & RADEON_SURF_SBUFFER)
> - s_info |= S_028044_ALLOW_EXPCLEAR(1);
> - else
> + if (rtex->surface.flags & RADEON_SURF_SBUFFER) {
> + /* Workaround: For a not yet understood reason, the
> + * combination of MSAA, fast stencil clear and stencil
> + * decompress messes with subsequent stencil buffer
> + * uses. Problem was reproduced on Verde, Bonaire,
> + * Tonga, and Carrizo.
> + *
> + * Disabling EXPCLEAR works around the problem.
> + *
> + * Check piglit's arb_texture_multisample-stencil-clear
> + * test if you want to try changing this.
> + */
> + if (rtex->resource.b.b.nr_samples <= 1)
> + s_info |= S_028044_ALLOW_EXPCLEAR(1);
> + } else
> /* Use all of the htile_buffer for depth if there's no stencil. */
> s_info |= S_028044_TILE_STENCIL_DISABLE(1);
>
>
More information about the mesa-stable
mailing list