[Mesa-dev] [PATCH 2/4] freedreno: don't do flush unless needed.

Hyunjun Ko zzoon at igalia.com
Thu Sep 20 03:23:16 UTC 2018


The commit 4b847b38 introduced some crashes of deqp gles31 cts,
since it always tries to flush if the flag flushed is false, which
is the initial state.

This sometimes makes it trying unnecessary drawing when context is
being destroyed for example.

Fixes: dEQP-GLES31.functional.fbo.no_attachments.interaction.17x512ms4_default_16x16ms2
and other 5 relevant cts.
---
 src/gallium/drivers/freedreno/freedreno_batch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/freedreno/freedreno_batch.c b/src/gallium/drivers/freedreno/freedreno_batch.c
index ff8298e82a..8c9439bb9a 100644
--- a/src/gallium/drivers/freedreno/freedreno_batch.c
+++ b/src/gallium/drivers/freedreno/freedreno_batch.c
@@ -286,7 +286,7 @@ batch_flush(struct fd_batch *batch, bool force)
 {
 	DBG("%p: needs_flush=%d", batch, batch->needs_flush);
 
-	if (batch->flushed)
+	if (!batch->needs_flush || batch->flushed)
 		return;
 
 	batch->needs_flush = false;
-- 
2.17.1



More information about the mesa-dev mailing list