Mesa (master): r600g: don't flush caches if we already did so, even for a subset of the flags

Dave Airlie airlied at kemper.freedesktop.org
Tue Apr 19 00:06:56 UTC 2011


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

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Wed Apr 13 20:36:15 2011 +0200

r600g: don't flush caches if we already did so, even for a subset of the flags

Merging the flushes that are left doesn't seem to give a significant
performance improvement

Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/gallium/winsys/r600/drm/r600_hw_context.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/winsys/r600/drm/r600_hw_context.c b/src/gallium/winsys/r600/drm/r600_hw_context.c
index c5d81f1..d91d8f6 100644
--- a/src/gallium/winsys/r600/drm/r600_hw_context.c
+++ b/src/gallium/winsys/r600/drm/r600_hw_context.c
@@ -800,8 +800,8 @@ void r600_context_bo_flush(struct r600_context *ctx, unsigned flush_flags,
 	struct radeon_bo *bo;
 
 	bo = r600_bo_get_bo(rbo);
-	/* if bo has already been flush */
-	if (!(bo->last_flush ^ flush_flags)) {
+	/* if bo has already been flushed */
+	if (!(~bo->last_flush & flush_flags)) {
 		bo->last_flush &= flush_mask;
 		return;
 	}




More information about the mesa-commit mailing list