diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2007-10-30 13:16:50 +0100 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2007-10-30 13:16:50 +0100 |
commit | 3177b4e2cf7d2fff7428cb6057bebbe60ff5cc6c (patch) | |
tree | 7fdc9e12fd8b95d03e1fe768a9bbb606db8f14e9 /src/mesa/drivers/dri/i915 | |
parent | dc1264970e585c0939606922b3e964db4b9c28b3 (diff) |
More vblank cleanups.
* Fix crash at context creation in most drivers supporting vblank.
* Don't pass vblank sequence or flags to functions that get passed the drawable
private already.
* Attempt to initialize vblank related drawable private fields just once
per drawable. May need more work in some drivers.
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_blit.c | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_buffers.c | 9 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_blit.c b/src/mesa/drivers/dri/i915/intel_blit.c index 2d4d00edef..2761136f47 100644 --- a/src/mesa/drivers/dri/i915/intel_blit.c +++ b/src/mesa/drivers/dri/i915/intel_blit.c @@ -40,7 +40,6 @@ #include "intel_fbo.h" #include "intel_reg.h" #include "intel_regions.h" -#include "vblank.h" #define FILE_DEBUG_FLAG DEBUG_BLIT diff --git a/src/mesa/drivers/dri/i915/intel_buffers.c b/src/mesa/drivers/dri/i915/intel_buffers.c index faa13adbcb..1ae8b5feb4 100644 --- a/src/mesa/drivers/dri/i915/intel_buffers.c +++ b/src/mesa/drivers/dri/i915/intel_buffers.c @@ -351,7 +351,7 @@ intelWindowMoved(struct intel_context *intel) * Then get new vblank_base and vblSeq values */ dPriv->vblFlags = flags; - driGetCurrentVBlank(dPriv, dPriv->vblFlags, &dPriv->vblSeq); + driGetCurrentVBlank(dPriv); dPriv->vblank_base = dPriv->vblSeq; intel_fb->vbl_waited = dPriv->vblSeq; @@ -838,7 +838,7 @@ static GLboolean intelScheduleSwap(__DRIdrawablePrivate * dPriv, GLboolean *missed_target) { struct intel_framebuffer *intel_fb = dPriv->driverPrivate; - unsigned int interval = driGetVBlankInterval(dPriv, dPriv->vblFlags); + unsigned int interval; struct intel_context *intel = intelScreenContext(dPriv->driScreenPriv->private); const intelScreenPrivate *intelScreen = intel->intelScreen; @@ -852,6 +852,8 @@ intelScheduleSwap(__DRIdrawablePrivate * dPriv, GLboolean *missed_target) intelScreen->drmMinor < (intel_fb->pf_active ? 9 : 6)) return GL_FALSE; + interval = driGetVBlankInterval(dPriv); + swap.seqtype = DRM_VBLANK_ABSOLUTE; if (dPriv->vblFlags & VBLANK_FLAG_SYNC) { @@ -933,8 +935,7 @@ intelSwapBuffers(__DRIdrawablePrivate * dPriv) if (screen->current_rotation != 0 || !intelScheduleSwap(dPriv, &missed_target)) { - driWaitForVBlank(dPriv, &dPriv->vblSeq, dPriv->vblFlags, - &missed_target); + driWaitForVBlank(dPriv, &missed_target); if (screen->current_rotation != 0 || !intelPageFlip(dPriv)) { intelCopyBuffer(dPriv, NULL); |