[Bug,102955] HyperZ related rendering issue in ARK: Survival Evolved
diff mbox

Message ID bug-102955-502-ruob6JvrOr@http.bugs.freedesktop.org/
State New
Headers show

Commit Message

bugzilla-daemon@freedesktop.org Oct. 2, 2017, 4:01 p.m. UTC
https://bugs.freedesktop.org/show_bug.cgi?id=102955

--- Comment #3 from Marek Olšák <maraeo@gmail.com> ---
Workaround:


        si_blitter_begin(ctx, SI_CLEAR);

Patch
diff mbox

diff --git a/src/gallium/drivers/radeonsi/si_blit.c
b/src/gallium/drivers/radeonsi/si_blit.c
index 67972a2..dc71742 100644
--- a/src/gallium/drivers/radeonsi/si_blit.c
+++ b/src/gallium/drivers/radeonsi/si_blit.c
@@ -903,6 +903,14 @@  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 with
+                * a dirty DB cache causes corruption in ARK: Survival Evolved.
+                * https://bugs.freedesktop.org/show_bug.cgi?id=102955
+                *
+                * This hack massively decreases back-to-back ClearDepth
performance.
+                */
+               sctx->b.flags |= SI_CONTEXT_FLUSH_AND_INV_DB;
        }