summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-10-03 16:33:32 +0200
committerMichel Dänzer <daenzer@vmware.com>2009-10-03 16:33:32 +0200
commiteade1e5be159c9f2965d611925596d33cab11d6d (patch)
tree0c03500c7b8e58ec41e205a97e70c2f26cb7bd34
parent926e414fc835ace141c066830d11d8ce32dbb06c (diff)
EXA: Don't always flush when switching between 2D/3D engines with KMS.
This seems to work fine here now and help 2D performance quite a bit, let's see if it breaks anybody else's setup...
-rw-r--r--src/radeon.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/radeon.h b/src/radeon.h
index e4f5334..db7b26b 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -1532,9 +1532,13 @@ do { \
uint32_t flush = 0; \
switch (info->accel_state->engineMode) { \
case EXA_ENGINEMODE_UNKNOWN: \
- case EXA_ENGINEMODE_3D: \
flush = 1; \
+ break; \
+ case EXA_ENGINEMODE_3D: \
+ flush = !info->cs || CS_FULL(info->cs); \
+ break; \
case EXA_ENGINEMODE_2D: \
+ flush = info->cs && CS_FULL(info->cs); \
break; \
} \
if (flush) { \
@@ -1555,7 +1559,9 @@ do { \
break; \
case EXA_ENGINEMODE_2D: \
flush = !info->cs || CS_FULL(info->cs); \
+ break; \
case EXA_ENGINEMODE_3D: \
+ flush = info->cs && CS_FULL(info->cs); \
break; \
} \
if (flush) { \