diff options
author | Marek Olšák <[email protected]> | 2017-10-03 19:28:48 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-10-06 02:56:11 +0200 |
commit | c4d1a199f8379b3982a53fb18fe2b50fafd682df (patch) | |
tree | 1ff4ed86212d6f43cd56a3e98fc25ac8c4ecfb58 /src/gallium/drivers/radeonsi/si_blit.c | |
parent | 15d918e46faf08be018394747f019b082871dccf (diff) |
radeonsi: add a drirc workaround for HTILE corruption in ARK: Survival Evolved
v2: use DB_META | PS_PARTIAL_FLUSH
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102955
Reviewed-by: Samuel Pitoiset <[email protected]> (v1)
Reviewed-by: Nicolai Hähnle <[email protected]> (v1)
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_blit.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_blit.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c index 67972a24ffb..2e76a5c6998 100644 --- a/src/gallium/drivers/radeonsi/si_blit.c +++ b/src/gallium/drivers/radeonsi/si_blit.c @@ -903,6 +903,21 @@ static void si_clear(struct pipe_context *ctx, unsigned buffers, sctx->db_stencil_clear = true; si_mark_atom_dirty(sctx, &sctx->db_render_state); } + + /* TODO: Find out what's wrong here. Fast depth clear leads to + * corruption in ARK: Survival Evolved, but that may just be + * a coincidence and the root cause is elsewhere. + * + * The corruption can be fixed by putting the DB metadata flush + * before or after the depth clear. (suprisingly) + * + * https://bugs.freedesktop.org/show_bug.cgi?id=102955 (apitrace) + * + * This hack decreases back-to-back ClearDepth performance. + */ + if (sctx->screen->clear_db_meta_before_clear) + sctx->b.flags |= SI_CONTEXT_FLUSH_AND_INV_DB_META | + SI_CONTEXT_PS_PARTIAL_FLUSH; } si_blitter_begin(ctx, SI_CLEAR); |