summaryrefslogtreecommitdiff
path: root/src/i830_exa.c
diff options
context:
space:
mode:
authorWang Zhenyu <zhenyu.z.wang@intel.com>2007-05-18 10:10:34 +0800
committerWang Zhenyu <zhenyu.z.wang@intel.com>2007-05-18 10:10:34 +0800
commit4120a20626998272424225261f2cf7960b7ec0ca (patch)
treea9373564cc59d7f125e2029d68d884d4471aeaa9 /src/i830_exa.c
parent8db28aeaa6e908017b40bd9180f144a2972f6278 (diff)
EXA: add render enter helper function
That notify mesa rendering is smashing the state, and check last 3d operation to do sync after we're swapped in or others.
Diffstat (limited to 'src/i830_exa.c')
-rw-r--r--src/i830_exa.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/i830_exa.c b/src/i830_exa.c
index 17417327..ff21fbb6 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -270,6 +270,22 @@ I830EXADoneCopy(PixmapPtr pDstPixmap)
#endif
}
+void
+i830_enter_render(ScrnInfoPtr pScrn)
+{
+ I830Ptr pI830 = I830PTR(pScrn);
+#ifdef XF86DRI
+ if (pI830->directRenderingEnabled) {
+ drmI830Sarea *pSAREAPriv = DRIGetSAREAPrivate(pScrn->pScreen);
+ pSAREAPriv->ctxOwner = DRIGetContext(pScrn->pScreen);
+ }
+#endif
+ if (pI830->last_3d != LAST_3D_RENDER) {
+ i830WaitSync(pScrn);
+ pI830->last_3d = LAST_3D_RENDER;
+ }
+}
+
#define xFixedToFloat(val) \
((float)xFixedToInt(val) + ((float)xFixedFrac(val) / 65536.0))