diff --git a/src/mesa/drivers/dri/intel/intel_buffers.c b/src/mesa/drivers/dri/intel/intel_buffers.c index 3f572faca2f..5ec5bf1fc22 100644 --- a/src/mesa/drivers/dri/intel/intel_buffers.c +++ b/src/mesa/drivers/dri/intel/intel_buffers.c @@ -166,14 +166,6 @@ intelFixupVblank(struct intel_context *intel, __DRIdrawablePrivate *dPriv) GLint areaB = driIntersectArea( drw_rect, planeB_rect ); GLuint flags = dPriv->vblFlags; - /* Do the stupid test: Is one of them actually disabled? - */ - if (sarea->planeA_w == 0 || sarea->planeA_h == 0) { - flags = dPriv->vblFlags | VBLANK_FLAG_SECONDARY; - } else if (sarea->planeB_w == 0 || sarea->planeB_h == 0) { - flags = dPriv->vblFlags & ~VBLANK_FLAG_SECONDARY; - } - /* Update vblank info */ if (areaB > areaA || (areaA == areaB && areaB > 0)) { @@ -182,6 +174,14 @@ intelFixupVblank(struct intel_context *intel, __DRIdrawablePrivate *dPriv) flags = dPriv->vblFlags & ~VBLANK_FLAG_SECONDARY; } + /* Do the stupid test: Is one of them actually disabled? + */ + if (sarea->planeA_w == 0 || sarea->planeA_h == 0) { + flags = dPriv->vblFlags | VBLANK_FLAG_SECONDARY; + } else if (sarea->planeB_w == 0 || sarea->planeB_h == 0) { + flags = dPriv->vblFlags & ~VBLANK_FLAG_SECONDARY; + } + return flags; } else { return dPriv->vblFlags & ~VBLANK_FLAG_SECONDARY;