diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-11-02 12:26:16 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-11-05 08:04:47 -0700 |
commit | 488326b0b9c559511e3282f4dee6027db6fcae2f (patch) | |
tree | dff7c5c30719ea246b604f169705d8023d8e9dc7 | |
parent | a5df4239c2a1b91e36e7d1191c19a078e6b74a22 (diff) |
disable vblank/sync code
5 files changed, 24 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_context.c b/src/mesa/drivers/dri/intel_winsys/intel_context.c index b0c1a608fa..ea732715a6 100644 --- a/src/mesa/drivers/dri/intel_winsys/intel_context.c +++ b/src/mesa/drivers/dri/intel_winsys/intel_context.c @@ -392,6 +392,7 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv, if (intel->driDrawable != driDrawPriv) { if (driDrawPriv->pdraw->swap_interval == (unsigned)-1) { +#if VBL int i; intel_fb->vblank_flags = driGetDefaultVBlankFlags(&intel->optionCache); @@ -404,6 +405,7 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv, for (i = 0; i < 2; i++) { intel_fb->vbl_pending[i] = intel_fb->vbl_seq; } +#endif } } } diff --git a/src/mesa/drivers/dri/intel_winsys/intel_lock.c b/src/mesa/drivers/dri/intel_winsys/intel_lock.c index 38f0a4e2d7..059393f8b7 100644 --- a/src/mesa/drivers/dri/intel_winsys/intel_lock.c +++ b/src/mesa/drivers/dri/intel_winsys/intel_lock.c @@ -127,6 +127,7 @@ void LOCK_HARDWARE( struct intel_context *intel ) curbuf = 0; /* current draw buf: 0 = front, 1 = back */ +#if VBL if (intel_fb && intel_fb->vblank_flags && !(intel_fb->vblank_flags & VBLANK_FLAG_NO_IRQ) && (intel_fb->vbl_waited - intel_fb->vbl_pending[curbuf]) > (1<<23)) { @@ -142,6 +143,7 @@ void LOCK_HARDWARE( struct intel_context *intel ) drmWaitVBlank(intel->driFd, &vbl); intel_fb->vbl_waited = vbl.reply.sequence; } +#endif DRM_CAS(intel->driHwLock, intel->hHWContext, (DRM_LOCK_HELD|intel->hHWContext), __ret); diff --git a/src/mesa/drivers/dri/intel_winsys/intel_screen.c b/src/mesa/drivers/dri/intel_winsys/intel_screen.c index be31774904..68f20556b4 100644 --- a/src/mesa/drivers/dri/intel_winsys/intel_screen.c +++ b/src/mesa/drivers/dri/intel_winsys/intel_screen.c @@ -363,6 +363,7 @@ intelGetSwapInfo(__DRIdrawablePrivate * dPriv, __DRIswapInfo * sInfo) } intel_fb = dPriv->driverPrivate; +#if VBL sInfo->swap_count = intel_fb->swap_count; sInfo->swap_ust = intel_fb->swap_ust; sInfo->swap_missed_count = intel_fb->swap_missed_count; @@ -370,6 +371,7 @@ intelGetSwapInfo(__DRIdrawablePrivate * dPriv, __DRIswapInfo * sInfo) sInfo->swap_missed_usage = (sInfo->swap_missed_count != 0) ? driCalculateSwapUsage(dPriv, 0, intel_fb->swap_missed_ust) : 0.0; +#endif return 0; } diff --git a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c index ac4ae80cfb..5d20a4b940 100644 --- a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c +++ b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c @@ -231,6 +231,7 @@ intelWindowMoved(struct intel_context *intel) intelUpdateFramebufferSize(ctx, dPriv); intel_fb->Base.Initialized = GL_TRUE; /* XXX remove someday */ +#if VBL { drmI830Sarea *sarea = intel->sarea; drm_clip_rect_t drw_rect = { .x1 = dPriv->x, .x2 = dPriv->x + dPriv->w, @@ -271,11 +272,12 @@ intelWindowMoved(struct intel_context *intel) } } - +#endif } +#if VBL static GLboolean intelScheduleSwap(const __DRIdrawablePrivate * dPriv, GLboolean *missed_target) { @@ -335,6 +337,8 @@ intelScheduleSwap(const __DRIdrawablePrivate * dPriv, GLboolean *missed_target) return ret; } +#endif + void intelSwapBuffers(__DRIdrawablePrivate * dPriv) @@ -355,6 +359,7 @@ intelSwapBuffers(__DRIdrawablePrivate * dPriv) _mesa_notifySwapBuffers(ctx); /* flush pending rendering comands */ +#if VBL if (!intelScheduleSwap(dPriv, &missed_target)) { struct pipe_surface *back_surf = get_color_surface(intel_fb, BUFFER_BACK_LEFT); @@ -364,7 +369,15 @@ intelSwapBuffers(__DRIdrawablePrivate * dPriv) intelDisplayBuffer(dPriv, back_surf, NULL); } +#else + { + struct pipe_surface *back_surf + = get_color_surface(intel_fb, BUFFER_BACK_LEFT); + intelDisplayBuffer(dPriv, back_surf, NULL); + } +#endif +#if VBL intel_fb->swap_count++; (*dri_interface->getUST) (&ust); if (missed_target) { @@ -373,6 +386,7 @@ intelSwapBuffers(__DRIdrawablePrivate * dPriv) } intel_fb->swap_ust = ust; +#endif } } else { diff --git a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.h b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.h index aae4e7c61f..138728862a 100644 --- a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.h +++ b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.h @@ -39,6 +39,8 @@ struct intel_framebuffer { struct gl_framebuffer Base; +#define VBL 0 +#if VBL /* VBI */ GLuint vbl_seq; @@ -52,6 +54,7 @@ struct intel_framebuffer GLuint swap_missed_count; GLuint vbl_pending[3]; /**< [number of color buffers] */ +#endif }; |