summaryrefslogtreecommitdiff
path: root/src/radeon.h
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2008-12-02 22:26:21 -0500
committerAlex Deucher <alexdeucher@gmail.com>2008-12-02 22:26:21 -0500
commitca74ebf8813b7fab8d08465ef9600f001c948e94 (patch)
treef3eb4ee04a1ac0f48621dcd4d8c40905da8500e5 /src/radeon.h
parentfc079c5267baf431bbecee7744e484783d393152 (diff)
move 3d state init after RADEON_SWITCH_TO_3D()
Diffstat (limited to 'src/radeon.h')
-rw-r--r--src/radeon.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/radeon.h b/src/radeon.h
index 605b0578..227ffc6d 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -1292,6 +1292,41 @@ do { \
#endif /* XF86DRI */
+#if defined(XF86DRI) && defined(USE_EXA)
+#define RADEON_SWITCH_TO_2D() \
+do { \
+ uint32_t flush = 0; \
+ switch (info->accel_state->engineMode) { \
+ case EXA_ENGINEMODE_UNKNOWN: \
+ case EXA_ENGINEMODE_3D: \
+ flush = 1; \
+ case EXA_ENGINEMODE_2D: \
+ break; \
+ } \
+ if (flush) \
+ RADEONCPFlushIndirect(pScrn, 1); \
+ info->accel_state->engineMode = EXA_ENGINEMODE_2D; \
+} while (0);
+
+#define RADEON_SWITCH_TO_3D() \
+do { \
+ uint32_t flush = 0; \
+ switch (info->accel_state->engineMode) { \
+ case EXA_ENGINEMODE_UNKNOWN: \
+ case EXA_ENGINEMODE_2D: \
+ flush = 1; \
+ case EXA_ENGINEMODE_3D: \
+ break; \
+ } \
+ if (flush) \
+ RADEONCPFlushIndirect(pScrn, 1); \
+ info->accel_state->engineMode = EXA_ENGINEMODE_3D; \
+} while (0);
+#else
+#define RADEON_SWITCH_TO_2D()
+#define RADEON_SWITCH_TO_3D()
+#endif
+
static __inline__ void RADEON_MARK_SYNC(RADEONInfoPtr info, ScrnInfoPtr pScrn)
{
#ifdef USE_EXA