Mesa (master): etnaviv: flush depth cache when changing depth config
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Nov 6 09:21:39 UTC 2020
Module: Mesa
Branch: master
Commit: 83c72cab7a13e2ce44e996bcf19a7e2af65daf50
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=83c72cab7a13e2ce44e996bcf19a7e2af65daf50
Author: Lucas Stach <l.stach at pengutronix.de>
Date: Sun Nov 1 16:46:23 2020 +0100
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 at pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7396>
---
src/gallium/drivers/etnaviv/etnaviv_emit.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/gallium/drivers/etnaviv/etnaviv_emit.c b/src/gallium/drivers/etnaviv/etnaviv_emit.c
index 70ee9aed05f..db9a484fc06 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_emit.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_emit.c
@@ -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? */
More information about the mesa-commit
mailing list