From 0b4e2aecc3ad143759663ba79fc3474fb998ce71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 18 Sep 2013 22:46:25 +0200 Subject: [PATCH] r600g: fix constant buffer cache flushing --- src/gallium/drivers/r600/r600_hw_context.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c index d985af9..b7c345a 100644 --- a/src/gallium/drivers/r600/r600_hw_context.c +++ b/src/gallium/drivers/r600/r600_hw_context.c @@ -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) -- 1.8.1.2