From fc698d8ce740c7a0da31eaabdfbd5a57237267af Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 18 Aug 2020 15:12:06 -0700 Subject: [PATCH] freedreno/a6xx: fix occlusion query with more than one tile We need to emit epilogue after each tile, not just after the last tile. Fixes: 13fc03f4c0e ("freedreno/a6xx: Avoid stalling for occlusion queries") Signed-off-by: Rob Clark Part-of: (cherry picked from commit 7e3a788bd30664e178e1e928719bc8b9bef3a46d) --- .pick_status.json | 2 +- src/gallium/drivers/freedreno/a6xx/fd6_gmem.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index cae33079c00..38e95dc7b30 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1183,7 +1183,7 @@ "description": "freedreno/a6xx: fix occlusion query with more than one tile", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "13fc03f4c0e709f6d1a8d811f9bc8a0c8c42943c" }, diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_gmem.c b/src/gallium/drivers/freedreno/a6xx/fd6_gmem.c index a07e02c4af5..236151e01a7 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_gmem.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_gmem.c @@ -1226,6 +1226,9 @@ fd6_emit_tile(struct fd_batch *batch, const struct fd_tile *tile) } else { emit_conditional_ib(batch, tile, batch->draw); } + + if (batch->epilogue) + fd6_emit_ib(batch->gmem, batch->epilogue); } static void @@ -1267,9 +1270,6 @@ fd6_emit_tile_fini(struct fd_batch *batch) { struct fd_ringbuffer *ring = batch->gmem; - if (batch->epilogue) - fd6_emit_ib(batch->gmem, batch->epilogue); - OUT_PKT4(ring, REG_A6XX_GRAS_LRZ_CNTL, 1); OUT_RING(ring, A6XX_GRAS_LRZ_CNTL_ENABLE);