From: Lucas Stach Date: Sun, 1 Nov 2020 15:46:23 +0000 (+0100) Subject: etnaviv: flush depth cache when changing depth config X-Git-Tag: upstream/21.0.0~2863 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=83c72cab7a13e2ce44e996bcf19a7e2af65daf50;p=platform%2Fupstream%2Fmesa.git 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 Reviewed-by: Christian Gmeiner Part-of: --- diff --git a/src/gallium/drivers/etnaviv/etnaviv_emit.c b/src/gallium/drivers/etnaviv/etnaviv_emit.c index 70ee9ae..db9a484 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? */