r600g: don't flush caches if we already did so, even for a subset of the flags
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 13 Apr 2011 18:36:15 +0000 (20:36 +0200)
committerDave Airlie <airlied@redhat.com>
Tue, 19 Apr 2011 00:12:20 +0000 (10:12 +1000)
Merging the flushes that are left doesn't seem to give a significant
performance improvement

Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/winsys/r600/drm/r600_hw_context.c

index c5d81f1a3a244cb51c3e6d043355ac89e37b837f..d91d8f619280dc63060bc9fc4b2eb77ca1048686 100644 (file)
@@ -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;
        }