Revert "r600g: Flush upload buffers before draws instead of before flushes."
authorHenri Verbeet <hverbeet@gmail.com>
Sun, 19 Sep 2010 20:59:14 +0000 (22:59 +0200)
committerHenri Verbeet <hverbeet@gmail.com>
Sun, 19 Sep 2010 21:03:03 +0000 (23:03 +0200)
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
src/gallium/drivers/r600/r600_draw.c

index f07cbfc2ccff4ef8cecc3142683c8972e23967e9..776dc24569b692b826382d8c100ed0bf19eb2fdd 100644 (file)
@@ -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);
 
index 00a6aeaef25f18bce2d3ee9df31c9b7965bf3004..cbfa44868e8efaff682b06c685623dc6d780ee41 100644 (file)
@@ -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;