diff options
author | Marek Olšák <[email protected]> | 2014-12-29 15:09:22 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-01-07 12:06:43 +0100 |
commit | 7c9ec6ca7ee30109f0bcf0f3f4bcee6fb30dac81 (patch) | |
tree | b7b308c8ce932bda4d592d2b997d3deb1589866a /src/gallium/drivers/radeonsi | |
parent | a1bbccf5214f95d8e23d6da88f51aae6032cbfe9 (diff) |
radeonsi: flush all CB/DB caches unconditionally when changing the framebuffer
This is easier to read and will work better with shader image stores.
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 9e1b3cd6577..7086363b77e 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -1995,20 +1995,16 @@ static void si_set_framebuffer_state(struct pipe_context *ctx, unsigned old_nr_samples = sctx->framebuffer.nr_samples; int i; - if (sctx->framebuffer.state.nr_cbufs) { - sctx->b.flags |= SI_CONTEXT_FLUSH_AND_INV_CB | - SI_CONTEXT_FLUSH_AND_INV_CB_META; - } - if (sctx->framebuffer.state.zsbuf) { - sctx->b.flags |= SI_CONTEXT_FLUSH_AND_INV_DB | - SI_CONTEXT_FLUSH_AND_INV_DB_META; - } - /* Only flush TC when changing the framebuffer state, because * the only client not using TC that can change textures is - * the framebuffer. */ + * the framebuffer. + * + * Flush all CB and DB caches here because all buffers can be used + * for write by both TC (with shader image stores) and CB/DB. + */ sctx->b.flags |= SI_CONTEXT_INV_TC_L1 | - SI_CONTEXT_INV_TC_L2; + SI_CONTEXT_INV_TC_L2 | + SI_CONTEXT_FLUSH_AND_INV_FRAMEBUFFER; util_copy_framebuffer_state(&sctx->framebuffer.state, state); |