From: Tom Stellard <thomas.stell...@amd.com>

Compute shaders fetch data from vertex buffers via the texture cache, so
we need to make sure the texture cache is flushed.
---
 src/gallium/drivers/r600/evergreen_compute.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/r600/evergreen_compute.c 
b/src/gallium/drivers/r600/evergreen_compute.c
index 2749b05..e5396d8 100644
--- a/src/gallium/drivers/r600/evergreen_compute.c
+++ b/src/gallium/drivers/r600/evergreen_compute.c
@@ -96,7 +96,10 @@ static void evergreen_cs_set_vertex_buffer(
        vb->buffer = buffer;
        vb->user_buffer = NULL;
 
-       rctx->flags |= rctx->has_vertex_cache ? R600_CONTEXT_VTX_FLUSH : 
R600_CONTEXT_TEX_FLUSH;
+       /* The vertex instructions in the compute shaders use the texture cache,
+        * so we need to invalid it. */
+       rctx->flags |= rctx->has_vertex_cache | R600_CONTEXT_VTX_FLUSH
+                                               | R600_CONTEXT_TEX_FLUSH;
        state->enabled_mask |= 1 << vb_index;
        state->dirty_mask |= 1 << vb_index;
        r600_atom_dirty(rctx, &state->atom);
-- 
1.7.11.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to