Mesa (master): r600g: Invalidate texture cache when creating vertex buffers for compute v2
Tom Stellard
tstellar at kemper.freedesktop.org
Wed Sep 19 21:06:34 UTC 2012
Module: Mesa
Branch: master
Commit: 69b387fbdc42883fb2e9c27942f97e62ca06be4d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=69b387fbdc42883fb2e9c27942f97e62ca06be4d
Author: Tom Stellard <thomas.stellard at amd.com>
Date: Wed Aug 1 20:42:53 2012 +0000
r600g: Invalidate texture cache when creating vertex buffers for compute v2
Compute shaders fetch data from vertex buffers via the texture cache, so
we need to make sure the texture cache is flushed.
v2:
- Fix rebase mistake
- Fix spelling in comment
Reviewed-by: Marek Olšák <maraeo at gmail.com>
---
src/gallium/drivers/r600/evergreen_compute.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c
index 1056cf2..2c66306 100644
--- a/src/gallium/drivers/r600/evergreen_compute.c
+++ b/src/gallium/drivers/r600/evergreen_compute.c
@@ -96,7 +96,9 @@ 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 invalidate it. */
+ rctx->flags |= R600_CONTEXT_TEX_FLUSH;
state->enabled_mask |= 1 << vb_index;
state->dirty_mask |= 1 << vb_index;
r600_atom_dirty(rctx, &state->atom);
More information about the mesa-commit
mailing list