r600g: fix constant buffer cache flushing
authorMarek Olšák <marek.olsak@amd.com>
Wed, 18 Sep 2013 20:46:25 +0000 (22:46 +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 9c0a78e0720f080ea5da69499657225eea4ffc16..18e17bb0723333c3edc629283fa9c056feee1448 100644 (file)
@@ -236,7 +236,11 @@ void r600_flush_emit(struct r600_context *rctx)
        }
 
        if (rctx->b.flags & R600_CONTEXT_INV_CONST_CACHE) {
-               cp_coher_cntl |= S_0085F0_SH_ACTION_ENA(1);
+               /* Direct constant addressing uses the shader cache.
+                * Indirect contant addressing uses the vertex cache. */
+               cp_coher_cntl |= S_0085F0_SH_ACTION_ENA(1) |
+                                (rctx->has_vertex_cache ? S_0085F0_VC_ACTION_ENA(1)
+                                                        : S_0085F0_TC_ACTION_ENA(1));
        }
        if (rctx->b.flags & R600_CONTEXT_INV_VERTEX_CACHE) {
                cp_coher_cntl |= rctx->has_vertex_cache ? S_0085F0_VC_ACTION_ENA(1)