On 25.07.2017 15:29, Samuel Pitoiset wrote:
This is a workaround which fixes a rendering issue with Dawn
Of War III in full bindless mode because a depth texture most
likely doesn't invoke the decompression pass when it should.
So do I understand correctly that the previous depth target is used
bindless, and for whatever reason the si_decompress_depth doesn't
properly trigger for bindless? Why doesn't it trigger?
Cheers,
Nicolai
Performance drops by 1% which doesn't really matter.
Fixes: 2263610827 ("radeonsi: flush DB caches only when transitioning from DB to
texturing")
Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Cc: "17.2" <mesa-sta...@lists.freedesktop.org>
---
src/gallium/drivers/radeonsi/si_state.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/gallium/drivers/radeonsi/si_state.c
b/src/gallium/drivers/radeonsi/si_state.c
index 7e3d1a02e0..675b61ad7f 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -2546,6 +2546,16 @@ static void si_set_framebuffer_state(struct pipe_context
*ctx,
}
sctx->b.flags |= SI_CONTEXT_CS_PARTIAL_FLUSH;
+ /* Flush DB caches when a Z/stencil buffer is attached to the
+ * framebuffer. This is a workaround which fixes a rendering issue with
+ * Dawn Of War III in full bindless mode because a depth texture most
+ * likely doesn't invoke the decompression pass when it should.
+ *
+ * TODO: Figure out a better fix.
+ */
+ if (sctx->framebuffer.state.zsbuf)
+ sctx->b.flags |= SI_CONTEXT_FLUSH_AND_INV_DB;
+
/* u_blitter doesn't invoke depth decompression when it does multiple
* blits in a row, but the only case when it matters for DB is when
* doing generate_mipmap. So here we flush DB manually between
--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev