summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2017-11-14 10:21:22 +0100
committerChristian Gmeiner <[email protected]>2017-11-15 23:27:39 +0100
commit59d76e7ab67e61f0ea2a798025e89bbe5a28e393 (patch)
tree28f944ab27cf7fc2c4702b1005cacf0663ce9c48 /src
parent0d6d9b520bb0a294dbad1be1b7facca4791250b4 (diff)
etnaviv: Flush TS cache before changing TS configuration
This is to make sure that the TS is properly flushed to memory before rendering to a new surface starts. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Lucas Stach <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_emit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_emit.c b/src/gallium/drivers/etnaviv/etnaviv_emit.c
index d313af60cf4..b6b06e3c1fa 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_emit.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_emit.c
@@ -322,6 +322,11 @@ etna_emit_state(struct etna_context *ctx)
etna_stall(stream, SYNC_RECIPIENT_RA, SYNC_RECIPIENT_PE);
}
+ /* Flush TS cache before changing TS configuration. */
+ if (unlikely(dirty & ETNA_DIRTY_TS)) {
+ etna_set_state(stream, VIVS_TS_FLUSH_CACHE, VIVS_TS_FLUSH_CACHE_FLUSH);
+ }
+
/* If MULTI_SAMPLE_CONFIG.MSAA_SAMPLES changed, clobber affected shader
* state to make sure it is always rewritten. */
if (unlikely(dirty & (ETNA_DIRTY_FRAMEBUFFER))) {