From d1285a710329dca907ebab0154b6c16b89b945ef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 10 Aug 2017 21:50:59 +0200 Subject: [PATCH] radeonsi/gfx9: fix the scissor bug workaround MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit otherwise there is corruption in most apps. Fixes: 0fe0320 radeonsi: use optimal packet order when doing a pipeline sync Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_state_draw.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index 23e9778fa54..deb0691f5c3 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -1368,11 +1368,15 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info) if (!si_upload_vertex_buffer_descriptors(sctx)) return; - /* GFX9 scissor bug workaround. There is also a more efficient but - * more involved alternative workaround. */ + /* GFX9 scissor bug workaround. This must be done before VPORT scissor + * registers are changed. There is also a more efficient but more + * involved alternative workaround. + */ if (sctx->b.chip_class == GFX9 && - si_is_atom_dirty(sctx, &sctx->b.scissors.atom)) + si_is_atom_dirty(sctx, &sctx->b.scissors.atom)) { sctx->b.flags |= SI_CONTEXT_PS_PARTIAL_FLUSH; + si_emit_cache_flush(sctx); + } /* Use optimal packet order based on whether we need to sync the pipeline. */ if (unlikely(sctx->b.flags & (SI_CONTEXT_FLUSH_AND_INV_CB | -- 2.30.2