r600g: fix texture buffer object cache flushing
authorMarek Olšák <marek.olsak@amd.com>
Thu, 19 Sep 2013 13:07:41 +0000 (15:07 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 25 Sep 2013 18:45:22 +0000 (20:45 +0200)
Cc: "9.2" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/r600/r600_hw_context.c

index 18e17bb0723333c3edc629283fa9c056feee1448..eba09a4f71d02c5db4faac4fbcc585583111d3e2 100644 (file)
@@ -247,7 +247,10 @@ void r600_flush_emit(struct r600_context *rctx)
                                                        : S_0085F0_TC_ACTION_ENA(1);
        }
        if (rctx->b.flags & R600_CONTEXT_INV_TEX_CACHE) {
-               cp_coher_cntl |= S_0085F0_TC_ACTION_ENA(1);
+               /* Textures use the texture cache.
+                * Texture buffer objects use the vertex cache. */
+               cp_coher_cntl |= S_0085F0_TC_ACTION_ENA(1) |
+                                (rctx->has_vertex_cache ? S_0085F0_VC_ACTION_ENA(1) : 0);
        }
 
        /* Don't use the DB CP COHER logic on r6xx.