i915: Fix wait for scheduled swap on secondary display.
authorMichel Dänzer <michel@daenzer.net>
Fri, 29 Sep 2006 10:22:54 +0000 (10:22 +0000)
committerMichel Dänzer <michel@daenzer.net>
Fri, 29 Sep 2006 10:22:54 +0000 (10:22 +0000)
src/mesa/drivers/dri/i915/intel_context.h

index 6cd6272053f032a38e0d44085a43f96c247b22bb..05195e76d65bdbea3bff352cc659c204b74e4ca1 100644 (file)
@@ -34,6 +34,7 @@
 #include "drm.h"
 #include "mm.h"
 #include "texmem.h"
+#include "vblank.h"
 
 #include "intel_screen.h"
 #include "i915_drm.h"
@@ -326,6 +327,10 @@ do {                                                       \
     if ((intel)->swap_scheduled) {                     \
         drmVBlank vbl;                                 \
         vbl.request.type = DRM_VBLANK_ABSOLUTE;                \
+        if ((intel)->vblank_flags &                    \
+            VBLANK_FLAG_SECONDARY) {                   \
+            vbl.request.type |= DRM_VBLANK_SECONDARY;  \
+        }                                              \
         vbl.request.sequence = (intel)->vbl_seq;       \
         drmWaitVBlank((intel)->driFd, &vbl);           \
         (intel)->swap_scheduled = 0;                   \