etnaviv: flush depth cache when changing depth config

Some depth config states changes require the depth cache to be
flushed, leading to a GPU hang if not done. As the conditions that
require the flush are not toally clear, better be safe than sorry
and always flush the cache on depth state changes.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7396>
This commit is contained in:
Lucas Stach 2020-11-01 16:46:23 +01:00
parent 01e2ded11f
commit 83c72cab7a

View file

@ -233,6 +233,8 @@ etna_emit_state(struct etna_context *ctx)
uint32_t to_flush = 0;
if (unlikely(dirty & (ETNA_DIRTY_BLEND)))
to_flush |= VIVS_GL_FLUSH_CACHE_COLOR;
if (unlikely(dirty & ETNA_DIRTY_ZSA))
to_flush |= VIVS_GL_FLUSH_CACHE_DEPTH;
if (unlikely(dirty & (ETNA_DIRTY_TEXTURE_CACHES)))
to_flush |= VIVS_GL_FLUSH_CACHE_TEXTURE;
if (unlikely(dirty & (ETNA_DIRTY_FRAMEBUFFER))) /* Framebuffer config changed? */