[Mesa-dev] [PATCH 1/3] r600g: don't flush caches if we already did so, even for a subset of the flags

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Wed Apr 13 11:36:15 PDT 2011


Merging the flushes that are left doesn't seem to give a significant
performance improvement
---
 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 7f8da12..bf4e9dc 100644
--- a/src/gallium/winsys/r600/drm/r600_hw_context.c
+++ b/src/gallium/winsys/r600/drm/r600_hw_context.c
@@ -794,8 +794,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;
 	}
-- 
1.7.3.4



More information about the mesa-dev mailing list