summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-11-02 12:14:01 -0600
committerBrian <[email protected]>2007-11-05 08:04:47 -0700
commitb8897d7481bb27974ccaedbe96d96fce77c1cfc8 (patch)
treec275a7d4b8e47caa24cf718038e8d7e7ef4eb753
parent0ff447e7c4ae26a1c0ae6f92265dee4561816832 (diff)
disable page flip code
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c30
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.h3
2 files changed, 27 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
index 7629a0fe293..aadd6f5665e 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
@@ -262,11 +262,13 @@ intelWindowMoved(struct intel_context *intel)
GLint areaA = driIntersectArea( drw_rect, pipeA_rect );
GLint areaB = driIntersectArea( drw_rect, pipeB_rect );
GLuint flags = intel_fb->vblank_flags;
+#if PF
GLboolean pf_active;
GLint pf_planes;
-
+#endif
/* Update page flipping info
*/
+#if PF
pf_planes = 0;
if (areaA > 0)
@@ -274,7 +276,9 @@ intelWindowMoved(struct intel_context *intel)
if (areaB > 0)
pf_planes |= 2;
+#endif
+#if PF
intel_fb->pf_current_page = (intel->sarea->pf_current_page >>
(intel_fb->pf_planes & 0x2)) & 0x3;
@@ -322,6 +326,7 @@ intelWindowMoved(struct intel_context *intel)
}
intel_fb->pf_active = pf_active;
+#endif
/* Update vblank info
*/
@@ -334,14 +339,16 @@ intelWindowMoved(struct intel_context *intel)
if (flags != intel_fb->vblank_flags && intel_fb->vblank_flags &&
!(intel_fb->vblank_flags & VBLANK_FLAG_NO_IRQ)) {
drmVBlank vbl;
+#if PF
int i;
-
+#endif
vbl.request.type = DRM_VBLANK_ABSOLUTE;
if ( intel_fb->vblank_flags & VBLANK_FLAG_SECONDARY ) {
vbl.request.type |= DRM_VBLANK_SECONDARY;
}
+#if PF
for (i = 0; i < intel_fb->pf_num_pages; i++) {
if ((intel_fb->vbl_waited - intel_fb->vbl_pending[i]) <= (1<<23))
continue;
@@ -349,14 +356,16 @@ intelWindowMoved(struct intel_context *intel)
vbl.request.sequence = intel_fb->vbl_pending[i];
drmWaitVBlank(intel->driFd, &vbl);
}
-
+#endif
intel_fb->vblank_flags = flags;
driGetCurrentVBlank(dPriv, intel_fb->vblank_flags, &intel_fb->vbl_seq);
intel_fb->vbl_waited = intel_fb->vbl_seq;
+#if PF
for (i = 0; i < intel_fb->pf_num_pages; i++) {
intel_fb->vbl_pending[i] = intel_fb->vbl_waited;
}
+#endif
}
}
@@ -468,15 +477,21 @@ intelScheduleSwap(const __DRIdrawablePrivate * dPriv, GLboolean *missed_target)
unsigned int interval = driGetVBlankInterval(dPriv, intel_fb->vblank_flags);
struct intel_context *intel =
intelScreenContext(dPriv->driScreenPriv->private);
+#if PF
const intelScreenPrivate *intelScreen = intel->intelScreen;
+#endif
unsigned int target;
drm_i915_vblank_swap_t swap;
GLboolean ret;
/* XXX: Scheduled buffer swaps don't work with private back buffers yet */
if (1 || !intel_fb->vblank_flags ||
- (intel_fb->vblank_flags & VBLANK_FLAG_NO_IRQ) ||
- intelScreen->drmMinor < (intel_fb->pf_active ? 9 : 6))
+ (intel_fb->vblank_flags & VBLANK_FLAG_NO_IRQ)
+#if PF
+ ||
+ intelScreen->drmMinor < (intel_fb->pf_active ? 9 : 6)
+#endif
+)
return GL_FALSE;
swap.seqtype = DRM_VBLANK_ABSOLUTE;
@@ -498,6 +513,7 @@ intelScheduleSwap(const __DRIdrawablePrivate * dPriv, GLboolean *missed_target)
intel_batchbuffer_flush(intel->batch);
+#if PF
if ( intel_fb->pf_active ) {
swap.seqtype |= DRM_VBLANK_FLIP;
@@ -505,6 +521,7 @@ intelScheduleSwap(const __DRIdrawablePrivate * dPriv, GLboolean *missed_target)
(intel_fb->pf_planes & 0x2)) & 0x3) + 1) %
intel_fb->pf_num_pages;
}
+#endif
if (!drmCommandWriteRead(intel->driFd, DRM_I915_VBLANK_SWAP, &swap,
sizeof(swap))) {
@@ -530,12 +547,13 @@ intelScheduleSwap(const __DRIdrawablePrivate * dPriv, GLboolean *missed_target)
ret = GL_TRUE;
} else {
+#if PF
if (swap.seqtype & DRM_VBLANK_FLIP) {
intel_fb->pf_current_page = ((intel->sarea->pf_current_page >>
(intel_fb->pf_planes & 0x2)) & 0x3) %
intel_fb->pf_num_pages;
}
-
+#endif
ret = GL_FALSE;
}
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.h b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.h
index 15ed6704d23..b7343db5e20 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.h
+++ b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.h
@@ -39,12 +39,15 @@ struct intel_framebuffer
{
struct gl_framebuffer Base;
+#define PF 0
+#if PF
/* Drawable page flipping state */
GLboolean pf_active;
GLuint pf_seq;
GLint pf_planes;
GLint pf_current_page;
GLint pf_num_pages;
+#endif
/* VBI
*/