Mesa (master): Revert "r600g: Flush upload buffers before draws instead of before flushes."

Henri Verbeet hverbeet at kemper.freedesktop.org
Sun Sep 19 21:03:27 UTC 2010


Module: Mesa
Branch: master
Commit: 1934ade18309d44f6e98f571674404ecb19d6364
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1934ade18309d44f6e98f571674404ecb19d6364

Author: Henri Verbeet <hverbeet at gmail.com>
Date:   Sun Sep 19 22:59:14 2010 +0200

Revert "r600g: Flush upload buffers before draws instead of before flushes."

This reverts commit a1d9a58b825825723f1c5f7705f2ed3ef834038a.
Flushing the upload buffers on draw is wrong, uploads aren't supposed to
cause flushes in the first place. The real issue was
radeon_bo_pb_map_internal() not respecting PB_USAGE_UNSYNCHRONIZED.

---

 src/gallium/drivers/r600/r600_context.c |    4 ++++
 src/gallium/drivers/r600/r600_draw.c    |    5 -----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_context.c b/src/gallium/drivers/r600/r600_context.c
index f07cbfc..776dc24 100644
--- a/src/gallium/drivers/r600/r600_context.c
+++ b/src/gallium/drivers/r600/r600_context.c
@@ -70,6 +70,10 @@ void r600_flush(struct pipe_context *ctx, unsigned flags,
 	struct r600_context *rctx = r600_context(ctx);
 	struct r600_query *rquery = NULL;
 
+	/* flush upload buffers */
+	u_upload_flush(rctx->upload_vb);
+	u_upload_flush(rctx->upload_ib);
+
 	/* suspend queries */
 	r600_queries_suspend(ctx);
 
diff --git a/src/gallium/drivers/r600/r600_draw.c b/src/gallium/drivers/r600/r600_draw.c
index 00a6aea..cbfa448 100644
--- a/src/gallium/drivers/r600/r600_draw.c
+++ b/src/gallium/drivers/r600/r600_draw.c
@@ -31,7 +31,6 @@
 #include <util/u_math.h>
 #include <util/u_inlines.h>
 #include <util/u_memory.h>
-#include <util/u_upload_mgr.h>
 #include "radeon.h"
 #include "r600_screen.h"
 #include "r600_context.h"
@@ -126,10 +125,6 @@ void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
 
 	memset(&draw, 0, sizeof(draw));
 
-	/* flush upload buffers */
-	u_upload_flush(rctx->upload_vb);
-	u_upload_flush(rctx->upload_ib);
-
 	if (rctx->any_user_vbs) {
 		r600_upload_user_buffers(rctx);
 		rctx->any_user_vbs = false;




More information about the mesa-commit mailing list